Access Violation in SHBrowseForFolder

Wolfgang Schwotzer wolfgang.schwotzer at gmx.net
Sun Apr 18 11:07:18 CDT 2004


Description: It's not documented in MSDN but SHBrowseForFolder supports
             lpBrowseInfo->pszDisplayName = NULL. In this case Wine
             currently responds with an access violation when pressing
             OK in the Shell Browse Folder. The patch avoids this.
ChangeLog: In SHBrowseForFolder support lpBrowseInfo->pszDisplayName to be NULL
-------------- next part --------------
Index: dlls/shell32/brsfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/brsfolder.c,v
retrieving revision 1.49
diff -u -r1.49 brsfolder.c
--- dlls/shell32/brsfolder.c	7 Jan 2004 00:47:35 -0000	1.49
+++ dlls/shell32/brsfolder.c	10 Apr 2004 23:03:40 -0000
@@ -391,7 +391,8 @@
 	    switch (wParam)
 	    { case IDOK:
 	        pdump ( pidlRet );
-	        SHGetPathFromIDListW(pidlRet, lpBrowseInfo->pszDisplayName);
+		if (lpBrowseInfo->pszDisplayName)
+	            SHGetPathFromIDListW(pidlRet, lpBrowseInfo->pszDisplayName);
 	        EndDialog(hWnd, (DWORD) ILClone(pidlRet));
 	        return TRUE;
 


More information about the wine-patches mailing list