Loading resources from wine dlls

Robert Shearman rob at codeweavers.com
Wed Aug 24 23:50:30 CDT 2005

Michael Jung wrote:

>I would like to add a 'My Documents' icon to shell32. This icon has a resource 
>ID of 235 in WinXP's shell32.
>Apparently one can't load resources from wine's own dlls, though. If you call 
>PrivateExtractIcons with 'c:\windows\system32\shell32.dll' as the file name 
>parameter, you'll get a 'WARN: File %s not found or path too long'. I guess 
>that's because there is no such file in wine's fake windows environment.
>There is a hack (which is even declared as a hack in the comment) in the 
>initialization code of the 'Shell Icon Cache' (starting from line 372 in 
>'dlls/shell32/iconcache.c'). It loads the first 38 icons from shell32 at 
>initialization time, and later returns them from the cache without having to 
>access the file (which would'nt work).
>This seems to be a principal problem (Loading resources from wine dlls, if 
>they are accessed by the filename they have on a windows system). Are there 
>any plans on how to fix this?

Anything that uses SearchPath is similarly broken when needing to find a 
builtin dll or exe. We should add a hack^H^H^H^Hextension to that 
function to make it be able to find installed .so files with a similar name.

Rob Shearman

More information about the wine-devel mailing list