SHILCreateFromPath function

[SHILCreateFromPath is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Applications should use SHParseDisplayName instead]

Creates a pointer to an item identifier list (PIDL) from a path.

Syntax

SHSTDAPI SHILCreateFromPath(
  PCWSTR           pszPath,
  PIDLIST_ABSOLUTE *ppidl,
  DWORD            *rgfInOut
);

Parameters

pszPath

Type: PCWSTR

A pointer to a null-terminated string of maximum length MAX_PATH containing the path to be converted.

ppidl

Type: PIDLIST_ABSOLUTE*

The path in pszPath expressed as a PIDL.

rgfInOut

Type: DWORD*

A pointer to a DWORD value that, on entry, indicates any attributes of the folder named in pszPath that the calling application would like to retrieve along with the PIDL. On exit, this value contains those requested attributes. For a list of possible attribute flags for this parameter, see IShellFolder::GetAttributesOf.

Return Value

Type: HRESULT

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

Requirements

   
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)