Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

StrRetToStr function

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

Syntax


HRESULT StrRetToStr(
  _Inout_   STRRET *pstr,
  _In_opt_  PCUITEMID_CHILD pidl,
  _Out_     LPTSTR *ppszName
);

Parameters

pstr [in, out]

Type: STRRET*

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

pidl [in, optional]

Type: PCUITEMID_CHILD

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

ppszName [out]

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]

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 5.0 or later)

Unicode and ANSI names

StrRetToStrW (Unicode) and StrRetToStrA (ANSI)

See also

StrRetToBuf

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.