SHGetSpecialFolderLocation Function
SHGetSpecialFolderLocation Function

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

Syntax

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

Parameters

hwndOwner
[in] Reserved.
nFolder
[in] A CSIDL value that identifies the folder of interest.
ppidl
[out] A pointer to an item identifier list (PIDL) specifying the folder's location relative to the root of the namespace (the desktop). It is the responsibility of the calling application to free the returned IDList by using CoTaskMemFree.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

With Microsoft Windows 2000, this function is superseded by SHGetFolderLocation.

Function Information

Minimum DLL Versionshell32.dll version 4.0 or later
Custom ImplementationNo
Headershlobj.h
Import libraryshell32.lib
Minimum operating systems Windows NT 4.0, Windows 95

See Also

SHGetSpecialFolderPath
© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View