StrRetToBufA function

Converts an STRRET structure returned by IShellFolder::GetDisplayNameOf to a string, and places the result in a buffer.

Syntax

LWSTDAPI StrRetToBufA(
  STRRET          *pstr,
  PCUITEMID_CHILD pidl,
  LPSTR           pszBuf,
  UINT            cchBuf
);

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.

pszBuf

Type: LPTSTR

A buffer to hold the display name. It will be returned as a null-terminated string. If cchBuf is too small, the name will be truncated to fit.

cchBuf

Type: UINT

The size of pszBuf, in characters. If cchBuf is too small, the string will be truncated to fit.

Return Value

Type: HRESULT

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

Remarks

If the uType member of the structure pointed to by pstr is set to STRRET_WSTR, the pOleStr member of that structure will be freed on return.

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

StrRetToStr

StrRetToStrN