StrRetToStrA function

Takes an STRRET structure returned by IShellFolder::GetDisplayNameOf and returns a pointer to an allocated string containing the display name.

Syntax

LWSTDAPI StrRetToStrA(
  STRRET          *pstr,
  PCUITEMID_CHILD pidl,
  LPSTR           *ppsz
);

Parameters

pstr

Type: STRRET*

A pointer to the STRRET structure. When the function returns, this pointer will no longer be valid.

pidl

Type: PCUITEMID_CHILD

A pointer to the item's ITEMIDLIST structure. This value can be NULL.

ppsz

Type: LPTSTR*

A pointer to an allocated string containing the result. StrRetToStr allocates memory for this string with CoTaskMemAlloc. You should free the string with CoTaskMemFree when it is no longer needed.

Return Value

Type: HRESULT

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

Requirements

   
Minimum supported client Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shlwapi.h
Library Shlwapi.lib
DLL Shlwapi.dll (version 5.0 or later)

See Also

StrRetToBuf