Expand Minimize
This topic has not yet been rated - Rate this topic

SHGetNameFromIDList function

Retrieves the display name of an item identified by its IDList.

Syntax


HRESULT SHGetNameFromIDList(
  _In_   PCIDLIST_ABSOLUTE pidl,
  _In_   SIGDN sigdnName,
  _Out_  PWSTR *ppszName
);

Parameters

pidl [in]

Type: PCIDLIST_ABSOLUTE

A PIDL that identifies the item.

sigdnName [in]

Type: SIGDN

A value from the SIGDN enumeration that specifies the type of display name to retrieve.

ppszName [out]

Type: PWSTR*

A value that, when this function returns successfully, receives the address of a pointer to the retrieved display name.

Return value

Type: HRESULT

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

Remarks

It is the responsibility of the caller to free the string pointed to by ppszName when it is no longer needed. Call CoTaskMemFree on *ppszName to free the memory.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

DLL

Shell32.dll

 

 

Send comments about this topic to Microsoft

Build date: 11/28/2012

Community Additions

ADD
© 2013 Microsoft. All rights reserved.