 |
SHGetSpecialFolderLocation ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Retrieves a pointer to the ITEMIDLIST structure of a special folder. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| 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. |
 |
 |
| Usage: |
 |
hPidl = 0
nResult = SHGetSpecialFolderLocation(;
0, nFolderId, @hPidl )
IF nResult = 0
* some code that employs the obtained PIDL...
* ...
= CoTaskMemFree( m.hPidl )
ENDIF
|
 |
 |
| My comment: |
 |
It is the responsibility of the calling application to free the returned IDList by using CoTaskMemFree.
See also: SHGetFolderPath, SHGetKnownFolderPath, SHGetPathFromIDList |
 |
 |
| Word Index links for the SHGetSpecialFolderLocation : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2011-01-20 08:11:27 | | Modified: | 2011-01-20 08:36:41 | Visited in last 7 days: 20 |