I want to get the path to the %APPDATA% folder.
In win 2000 & xp it’s in: C:\Documents and Settings\user name\Application Data
In vista & win7 it’s in: C:\Users\user name\AppData\Roaming
I know there is the function SHGetSpecialFolderPath but it retrieves a BOOL
and I want to get the path as a string.
The third parameter of
SHGetSpecialFolderPath(), namedlpszPath, is marked as__out.Something like this should do:
Note: I haven’t done any Win API work in years. Very likely someone comes along shortly pointing out where I blew it.