On Sun, 29 Aug 2004, Juan Lang wrote:
1, whether is better to duplicate code SHGetFolderPathW() or to try finding it by an ordinal its value (the case for the older versions of SHELL32.DLL) as it was stated by Juergen?
What are you trying to accomplish? For example, it seems reasonable to assert that you must use the builtin shell32 and shfolder.dll in combination, or not at all, as Alexandre once suggested.
Maybe it really sounds reasonable for those who know that there are only two functions exported by shlfolder.dll. Yesterday I wasn't aware of this and I was annoyed when Wine failed to run with "shfolder=n" set.
Or, in order for Wine's shfolder.dll to succeed on older (native) versions of shell32.dll, it seems reasonable to have it call SHGetSpecialFolderPath* from SHGetFolderPath*, as MS' version does.
I am sure shfolder.dll from win98se installation calls GetProcAddress() to get the address of SHGetFolderPathW @ shell32.dll. Moreover, my shell32.dll doesn't export SHGetSpecialFolderPath* by a name, also. Versions of the dlls I have are:
shfolder: 6.00.2600.000 shell32: 4.72.3812.600
What versions do you mention, Juan?
In other words, why do you need the combination of native shell32 and builtin shfolder.dll?
I would like to optimize Wine setup, where the optimization criterion is achieving as small amount of native dll code used as it can be possible (without loosing some required functionality).
And combination of native shell32+shdocvw+shlwapi dlls are needed for mIRC and TotalCommander to function more properly.
On Sun, 29 Aug 2004, Filip Navara wrote:
1, whether is better to duplicate code SHGetFolderPathW() or to try finding it by an ordinal its value (the case for the older versions of SHELL32.DLL) as it was stated by Juergen?
ShFolder is redistributable. I believe the best solution would be to move the code from Shell32 to ShFolder and then making the Shell32 exports forwarders to ShFolder.
=) Now there are 4 possible solutions to get mixing work:
1, try linking to SHGetFolderW @ shell32 dynamically - search it by a name or an ordinal value. Kind of smart autodetection (suggested by Juergen).
2, to copy the SHGetFolder* code from shell32.dll (Alexandre).
3, to move the SHGetFolder* code from shell32.dll (Filip).
4, try linking to SHGetSpecialFolderPath* @ shell32 dynamically (Juan).
IMHO the 3rd and the 4th solutions would fail when using native shell32.dll from win98se. Or maybe only the 4th case will do so.
Where I am wrong? What direction to go? Feel free to explain it.