Expand Minimize

SHGetPathFromIDList function

Converts an item identifier list to a file system path.

Syntax


BOOL SHGetPathFromIDList(
  _In_   PCIDLIST_ABSOLUTE pidl,
  _Out_  LPTSTR pszPath
);

Parameters

pidl [in]

Type: PCIDLIST_ABSOLUTE

The address of an item identifier list that specifies a file or directory location relative to the root of the namespace (the desktop).

pszPath [out]

Type: LPTSTR

The address of a buffer to receive the file system path. This buffer must be at least MAX_PATH characters in size.

Return value

Type: BOOL

Returns TRUE if successful; otherwise, FALSE.

Remarks

If the location specified by the pidl parameter is not part of the file system, this function will fail.

If the pidl parameter specifies a shortcut, the pszPath will contain the path to the shortcut, not to the shortcut's target.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shlobj.h

Library

Shell32.lib

DLL

Shell32.dll (version 4.0 or later)

Unicode and ANSI names

SHGetPathFromIDListW (Unicode) and SHGetPathFromIDListA (ANSI)

See also

SHParseDisplayName
SHGetPathFromIDListEx

 

 

Community Additions

ADD
Show:
© 2014 Microsoft