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

StrRetToBSTR function

Accepts a STRRET structure returned by IShellFolder::GetDisplayNameOf that contains or points to a string, and returns that string as a BSTR.

Syntax


HRESULT StrRetToBSTR(
  _Inout_  STRRET *pstr,
  _In_     PCUITEMID_CHILD pidl,
  _Out_    BSTR *pbstr
);

Parameters

pstr [in, out]

Type: STRRET*

A pointer to a STRRET structure. When the function returns, this pointer is longer valid.

pidl [in]

Type: PCUITEMID_CHILD

A pointer to an ITEMIDLIST that uniquely identifies a file object or subfolder relative to the parent folder. This value can be NULL.

pbstr [out]

Type: BSTR*

A pointer to a variable of type BSTR that receives the converted string.

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 STRRET structure pointed to by pstr is set to STRRET_WSTR, the pOleStr member of that structure is freed on return.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 5.5 or later)

See also

IShellFolder::GetDisplayNameOf
StrRetToBuf
StrRetToStr

 

 

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

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.