<<PATCH>> Added shell32.dll functions to browse for unix directory;

Robert van Herk robert at robertvanherk.nl
Wed Dec 1 13:06:52 CST 2004


Rolf Kalbermatter wrote:

>Robert van Herk wrote:
>
>  
>
>>-LPITEMIDLIST WINAPI SHBrowseForFolderA (LPBROWSEINFOA lpbi)
>>+static INT_PTR BrowseW (LPBROWSEINFOW lpbi, DLGPROC dlgproc, enum browsemode aBrowseMode)
>>+{
>>+        INT_PTR ret;
>>+       
>>+        browseMode = aBrowseMode;
>>    
>>
>	   ^^^^^^^^^^
>
>I may miss something here but this looks like a global variable and that would make
>these function theoretically thread unsafe. As long as only winecfg is going to use
>this functionality for the unix case it seems not a problem as there is probably not
>any chance that the native Windows version is called at that moment but this may of
>course change in the future.
>  
>
I guess you are right, but the strange thing is that this was already 
the case in the original code. The hwnd of the tree view and the pointer 
to the browseinfo structure are copied into a global variable, so at 
least my code is not worse here :-).

By the way, isn't it so that a copy of shell32.dll gets loaded for each 
application anyway? If so, then the variable is at least application 
local, and, c'mon, who is going to show two modal browsing dialog boxes 
at the same time :-)?

Robert



More information about the wine-devel mailing list