Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SHGetSpecialFolderLocation
Collapse the table of content
Expand the table of content

SHGetSpecialFolderLocation function

[SHGetSpecialFolderLocation is not supported and may be altered or unavailable in the future. Instead, use SHGetFolderLocation.]

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

Syntax


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

Parameters

hwndOwner [in]

Type: HWND

Reserved.

nFolder [in]

Type: int

A CSIDL value that identifies the folder of interest.

ppidl [out]

Type: PIDLIST_ABSOLUTE*

A 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

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

End of client support

Windows 2000 Professional

End of server support

Windows 2000 Server

Header

Shlobj.h

Library

Shell32.lib

DLL

Shell32.dll (version 4.0 or later)

See also

SHGetSpecialFolderPath

 

 

Community Additions

ADD
Show:
© 2015 Microsoft