SHGetFolderPath on Windows 98

SHGetFolderPath doesn’s seem to work on Windows 98. If you use it to try  to find like the “My Pictures” directory,  it will error out.  I have read that some versions of Win98 do work, depends on the version of shell32.dll (5 and greater). A workaround that you can use , which probably isn’t 100%  good, but works is looking for the My Pictures path in the registry  (HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders). Just another quirky thing with the different Microsoft OS’s.

Advertisements

2 thoughts on “SHGetFolderPath on Windows 98”

  1. Well, you shouldn’t be too shocked about this.. From MSDN:

    “Minimum operating systems Windows 95 with Internet Explorer 5.0, Windows 98 with Internet Explorer 5.0, Windows 98 Second Edition (SE), Windows NT 4.0 with Internet Explorer 5.0, Windows NT 4.0 with Service Pack 4 (SP4) ”

    So if they’re on vanilla 98 w/o IE5, then it won’t work.

    The proper way around it is to use SHGetSpecialFolderPath if you’re unable to dynamically load SHGetFolderPath and give that a shot. The Registry may seem like it works, but it’s always a bad idea to rely on the registry for stuff the shell DLLs can already tell you.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s