Function Reference


Retrieves the path of a known folder as an ITEMIDLIST structure

#include <WinAPIShellEx.au3>
_WinAPI_ShellGetKnownFolderIDList ( $sGUID [, $iFlags = 0 [, $hToken = 0]] )


$sGUID The GUID ($FOLDERID_*) that identifies the standard folders registered with the system.
$iFlags [optional] The flags that specify special retrieval options. This parameter can be one or more of the following values.

Windows 7 or later
$hToken [optional] The access token that represents a particular user. If this parameter is 0, the function requests
the known folder for the current user. Assigning the $hToken parameter a value of (-1) indicates the
Default User. Note that access to the Default User folders requires administrator privileges.

Return Value

Success: The PIDL of the folder.
Failure: 0 and sets the @error flag to non-zero, @extended flag may contain the HRESULT error code.


To free the returned PIDL, call the _WinAPI_CoTaskMemFree() function.

This function requires Windows Vista or later.



See Also

Search SHGetKnownFolderIDList in MSDN Library.