2 out of 3 rated this helpful - Rate this topic

SHGetPathFromIDList function

Applies to: desktop apps only

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

Minimum supported server

Windows 2000 Server

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

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Return value
TRUE on success.
Return value
So what does the function return? A BOOL, but with what value? The description just says the function 'might fail', but does this imply the BOOL will be FALSE?