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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

shGetSpecialFolderPath

Status
Not open for further replies.

michaenh

Programmer
Aug 7, 2002
205
NO
Hi

I use shGetSpecialFolderPath in a function that I want to get a special folder path ex. C:\Documents and Settings\mha

It work like a charm in Win98, WinXp, Win2000 but in WinNT4.0 it doesn't work.

An error message appears: Shell32.dll does not support shGetSpecialFolderPath function.

I found that Shell32.dll in WinNt4.0 is a 4.0 version, but in the other OS they are 4.72 or 5.0.

Does anyone know how to patch up winNT4.0 shell32.dll version4.0 to 4.72?

Or what about another way to get my documents path?

cheers,
mha
 
Solved it!

var
pidl : PItemIDList;
InFolder : array[0..MAX_PATH] of Char;
begin
SHGetSpecialFolderLocation(application.Handle, CSIDL_PERSONAL, pidl);
SHGetPathFromIDList(PIDL, InFolder);
result := InFolder;

cheers,
mha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top