次の方法で共有


StrRetToBuf (Compact 2013)

3/28/2014

This function takes a STRRET structure returned by IShellFolder::GetDisplayNameOf, converts it to a string, and places the result in a buffer.

Syntax

HRESULT StrRetToBuf(
  LPSTRRET pstr, 
  LPCITEMIDLIST pidl, 
  LPTSTR pszBuf, 
  UINT cchBuf
);

Parameters

  • pstr
    [in] Pointer to the STRRET structure. When the function returns, this pointer is no longer valid.
  • pidl
    [in] Pointer to the item's ITEMIDLIST structure.
  • pszBuf
    [out] Buffer to hold the display name. It is returned as a null-terminated string. If cchBuf is too small, the name is truncated to fit.
  • cchBuf
    [in] Size of pszBuf, in characters. If cchBuf is too small, the string is truncated to fit.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

If the uType member of the structure that pstr points to is set to STRRET_WSTR then the pOleStr member of that structure is freed on return.

Requirements

Header

shlwapi.h

Library

ceshell.lib

See Also

Reference

Shell Functions