Salius wrote:
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.
Hm. I'm sorry, I wasn't clear enough. From MSDN on SHGetFolderPath:
This function is a superset of SHGetSpecialFolderPath, included with earlier versions of the Shell. On systems preceeding those including Shell32.dll version 5.0 (Windows Millennium Edition (Windows Me) and Windows 2000), SHGetFolderPath was obtained through SHFolder.dll, distributed with Microsoft Internet Explorer 4.0 and later versions. SHFolder.dll always calls the current platform's version of this function. If that fails, it will try to simulate the appropriate behavior.
So, I think your patch is a good first step, to use GetProcAddress rather than letting the linker do it. A next step would be, I think, to do what I suggested: if this fails, try to GetProcAddress for SHGetSpecialFolderPath, since this was available on older versions of shell32. You might have to search by ordinal if searching by name fails.
So, I don't think my suggestion is that different from Juergen's, just that I suggest an implementation of "try to simulate the appropriate behavior" if the function is not in fact in shell32.
--Juan
_______________________________ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush
On Mon, 30 Aug 2004, Juan Lang wrote:
From MSDN on SHGetFolderPath:
This function is a superset of SHGetSpecialFolderPath, included with earlier versions of the Shell. On systems preceeding those including Shell32.dll version 5.0 (Windows Millennium Edition (Windows Me) and Windows 2000), SHGetFolderPath was obtained through SHFolder.dll, distributed with Microsoft Internet Explorer 4.0 and later versions. SHFolder.dll always calls the current platform's version of this function. If that fails, it will try to simulate the appropriate behavior.
So, I think your patch is a good first step, to use GetProcAddress rather than letting the linker do it.
Maybe, but it became of no use.
A next step would be, I think, to do what I suggested: if this fails, try to GetProcAddress for SHGetSpecialFolderPath, since this was available on older versions of shell32. You might have to search by ordinal if searching by name fails.
I don't know ordinal value of this function. The only way to get it for me would be to debug shfolder.dll DllMain() from/on some old windows boxes. OTOH, Juergen writes [1]:
* > Which means Win98's shell32 does not have an SHGetFolderPath at * > all. * * It has a SHGetFolderPathA exported by ordinal. (like the nt4 one has * SHGetFolderPathW on the _same_ ordinal). Later versions did it in a * clean way.
So if SHGetSpecialFolderPath* can be found this way, maybe SHGetFolderPath* could be found also? It is a pity I have no Win95 box at my hand and cannot test this situation with very old version of shell32.dll.
So, I don't think my suggestion is that different from Juergen's, just that I suggest an implementation of "try to simulate the appropriate behavior" if the function is not in fact in shell32.
Yes, I understand now. IMHO, the easiest way still would be to move the code from shell32 to shfolder. But forget it.
[1] http://www.winehq.org/hypermail/wine-devel/2000/12/0049.html
--- Saulius Krasuckas saulius2@ar.fi.lt wrote:
I don't know ordinal value of this function.
I neither. I don't have this versions handy at the moment either. Maybe some kind soul who does can provide them?
Yes, I understand now. IMHO, the easiest way still would be to move the code from shell32 to shfolder. But forget it.
I'm not sure that's true. It depends how the application decides whether to look for these functions in shfolder.dll. I'm not sure what the "correct" way is; MS isn't very clear on this. I think, reading from MSDN, you can ship shfolder.dll and dynamically load it if you can't find these exports in shell32.dll. But that apparently isn't what your app is doing, and I'm not sure what it is doing instead.
For what it's worth, I'm working on the functions SHGetFolderPath/A/W, SHGetFolderLocation/A/W, SHGetSpecialFolderPath/A/W, and SHGetSpecialFolderLocation/A/W. They're a bit off at the moment, but not horribly so; I don't think too many apps will be broken by their incorrectness. But if your app is having trouble specifically because of these, help may be on the way :)
--Juan
__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail
On Mon, Aug 30, 2004 at 02:55:46PM -0700, Juan Lang wrote:
--- Saulius Krasuckas saulius2@ar.fi.lt wrote:
I don't know ordinal value of this function.
I neither. I don't have this versions handy at the moment either. Maybe some kind soul who does can provide them?
My linux box has a dyfunct (partially working) Win95 partition, and I have access to a Win98SE box. Both are reasonably recent, and I can try extracting an original Win95 version from the cabs on the local CAB archives (which come from the CD).
What are the specific filenames again?
Oh, and do you want them compressed in any way (i.e. leave them, zip them, or tar/gz them), and do you want them on list or off? Note, that I'll only do this once, so that means that if you want an archive, I'd have to send them to the list.
Yes, I understand now. IMHO, the easiest way still would be to move the code from shell32 to shfolder. But forget it.
I'm not sure that's true. It depends how the application decides whether to look for these functions in shfolder.dll. I'm not sure what the "correct" way is; MS isn't very clear on this. I think, reading from MSDN, you can ship shfolder.dll and dynamically load it if you can't find these exports in shell32.dll. But that apparently isn't what your app is doing, and I'm not sure what it is doing instead.
For what it's worth, I'm working on the functions SHGetFolderPath/A/W, SHGetFolderLocation/A/W, SHGetSpecialFolderPath/A/W, and SHGetSpecialFolderLocation/A/W. They're a bit off at the moment, but not horribly so; I don't think too many apps will be broken by their incorrectness. But if your app is having trouble specifically because of these, help may be on the way :)
Good luck!
--Juan
__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail
Doing my best, --Michael Chang