StrRetToStrW function (shlwapi.h)
Takes an STRRET structure returned by IShellFolder::GetDisplayNameOf and returns a pointer to an allocated string containing the display name.
Syntax
LWSTDAPI StrRetToStrW(
[in, out] STRRET *pstr,
[in, optional] PCUITEMID_CHILD pidl,
[out] LPWSTR *ppsz
);
Parameters
[in, out] pstr
Type: STRRET*
A pointer to the STRRET structure. When the function returns, this pointer will no longer be valid.
[in, optional] pidl
Type: PCUITEMID_CHILD
A pointer to the item's ITEMIDLIST structure. This value can be NULL.
[out] 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.
Remarks
Note
The shlwapi.h header defines StrRetToStr as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
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) |