Επεξεργασία

Κοινή χρήση μέσω


SHILCreateFromPath function (shlobj_core.h)

[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(
  [in]                PCWSTR           pszPath,
  [out]               PIDLIST_ABSOLUTE *ppidl,
  [in, out, optional] DWORD            *rgfInOut
);

Parameters

[in] pszPath

Type: PCWSTR

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

[out] ppidl

Type: PIDLIST_ABSOLUTE*

The path in pszPath expressed as a PIDL.

[in, out, optional] 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

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-1 (introduced in Windows 10, version 10.0.10240)