Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.38 KB

SHGetSpecialFolderLocation.md

File metadata and controls

60 lines (40 loc) · 1.38 KB

Home

Function name : SHGetSpecialFolderLocation

Group: Shell Functions - Library: shell32


Retrieves a pointer to the ITEMIDLIST structure of a special folder.


Code examples:

Browsing Windows Known Folders (Special Folders)

Declaration:

HRESULT SHGetSpecialFolderLocation(
  __in   HWND hwndOwner,
  __in   int nFolder,
  __out  PIDLIST_ABSOLUTE *ppidl
);  

FoxPro declaration:

DECLARE INTEGER SHGetSpecialFolderLocation IN shell32;
	INTEGER hwndOwner,;
	INTEGER nFolder,;
	INTEGER @ppidl
  

Parameters:

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).


Return value:

If the method succeeds, it returns S_OK (0). Otherwise, it returns an HRESULT error code.


Comments:

It is the responsibility of the calling application to free the returned IDList by using CoTaskMemFree.

See also: SHGetFolderPath, SHGetKnownFolderPath, SHGetPathFromIDList.