Group: Shell Functions - Library: shell32
Browsing Windows Known Folders (Special Folders)
HRESULT SHGetSpecialFolderLocation(
__in HWND hwndOwner,
__in int nFolder,
__out PIDLIST_ABSOLUTE *ppidl
);
DECLARE INTEGER SHGetSpecialFolderLocation IN shell32;
INTEGER hwndOwner,;
INTEGER nFolder,;
INTEGER @ppidl
hwndOwner [in] Reserved.
nFolder [in] A CSIDL value that identifies the folder of interest.
ppidl [out] A PIDL specifying the folder"s location relative to the root of the namespace (the desktop).
If the method succeeds, it returns S_OK (0). Otherwise, it returns an HRESULT error code.
It is the responsibility of the calling application to free the returned IDList by using CoTaskMemFree.
See also: SHGetFolderPath, SHGetKnownFolderPath, SHGetPathFromIDList.