Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where is My Documents folder - SHGetSpecialFolderPath() for WinNT?

Status
Not open for further replies.

mingis

Programmer
Jan 23, 2002
475
LT
For Windows NT 4.0 it is on <windir>\Profiles\<user>\Personal\My Documents.
Well, I can get <windir> using GetWindowsDirectory(), <user> by means of GetUserName(). But the problem is, that in certain cases user data are stored in some prolonged folder like "peter.000". What API should I use to find out that profile path for current user?
I have even found a shell call SHGetSpecialFolderPath(), which works correctly on Win2000, but on WinNT produces an error like "<...> procedure entry point can not be located in SHELL32.DLL".
I need namely My Documents folder - global data of Adobe Acrobat are stored there. And I cannot ignore WinNT oldtimers - my little tool should work on all possible systems. Any advices?
Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top