SHCloneSpecialIDList function (shlobj_core.h)

[SHCloneSpecialIDList is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use SHGetSpecialFolderLocation.]

Retrieves a pointer to the ITEMIDLIST structure that specifies a special folder.

Syntax

PIDLIST_ABSOLUTE SHCloneSpecialIDList(
       HWND hwnd,
  [in] int  csidl,
  [in] BOOL fCreate
);

Parameters

hwnd

Type: HWND

Reserved.

[in] csidl

Type: int

A CSIDL value that identifies the folder of interest.

[in] fCreate

Type: BOOL

A value of type BOOL that indicates if the folder should be created if it does not already exist. If fCreate is TRUE, the folder is created. If it is FALSE, the folder is not created.

Return value

Type: PIDLIST_ABSOLUTE

Returns a pointer to the ITEMIDLIST structure of a special folder specified by csidl. The function creates the folder if fCreate is TRUE.

Remarks

When finished, you should free the pointer to the cloned folder with ILFree.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shlobj_core.h (include Shlobj.h)
Library Shell32.lib
DLL Shell32.dll (version 5.0 or later)
API set ext-ms-win-shell-shell32-l1-2-2 (introduced in Windows 10, version 10.0.14393)