[Win32utils-devel] SHGetFolderPath and stuff
zdennis at mktec.com
Mon Feb 7 11:29:58 EST 2005
Berger, Daniel wrote:
> Hi all,
> It looks like we have a consensus on using the 'Dir' class for these -
> The docs for SHGetFolderPath() say that only "some" of the CSIDL
> constants are supported. It lists 16, but in my experiments many more
> than that are supported. However, some are not.
> The odd thing is that there doesn't seem to be any rhyme or reason for
> why some CSIDL's are supported and some are not. For example, I get a
> return value for CSIDL_MYVIDEO but not for CSIDL_MYDOCUMENTS on my
> Windows XP Box. Why? Dunno.
here's the snippet I use to get the My Documents path on Windows Xp
proc = GetProcAddress( hDll , "SHGetSpecialFolderPathA" );
(proc)( NULL, cPath, PATH_MYDOCUMENTS, FALSE );
> So, I will just have to make sure that I document the 16 "officially"
> supported values, and the rest will just have to be trial and error for
> the users.
> Oh, and in case you were wondering, SHGetSpecialFolderPath() fares no
> better. It does worse, actually.
If you dumpbin shell32 you can grep for all of the SHGet functions...
for some odd reason there isa variation of methods for special folder
Not all exist on every system, is the experience I've had.
More information about the win32utils-devel