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(
  HWND             hwnd,
  int              csidl,
  PIDLIST_ABSOLUTE *ppidl
);

Parameters

hwnd

Type: HWND

Reserved.

csidl

Type: int

A CSIDL value that identifies the folder of interest.

ppidl

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

   
Windows version Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shlobj_core.h (include Shlobj.h)
Library Shell32.lib
DLL Shell32.dll (version 4.0 or later)

See Also

SHGetSpecialFolderPath