StrRetToStrN function
Takes an STRRET structure returned by IShellFolder::GetDisplayNameOf, converts it to a string, and places the result in a buffer.
Syntax
BOOL StrRetToStrN(
_Out_ LPTSTR pszOut,
_In_ UINT cchOut,
_Inout_ LPSTRRET pStrRet,
_In_ LPCITEMIDLIST pidl
);
Parameters
-
pszOut [out]
-
Type: LPTSTR
Buffer to hold the display name. It will be returned as a null-terminated string. If cchOut is too small, the name will be truncated to fit.
-
cchOut [in]
-
Type: UINT
Size of pszOut, in characters. If cchOut is too small, the string will be truncated to fit.
-
pStrRet [in, out]
-
Type: LPSTRRET
Pointer to an STRRET structure. When the function returns, this pointer will no longer be valid.
-
pidl [in]
-
Type: LPCITEMIDLIST
Pointer to the item's ITEMIDLIST structure.
Return value
Type: BOOL
TRUE for success, FALSE for failure.
Remarks
Note
As of Shell32.dll version 5.0, calling this function is equivalent to calling StrRetToBuf.
StrRetToStrN is not exported by name. To use it, you must use GetProcAddress and request ordinal 96 from Shell32.dll to obtain a function pointer.
If the uType member of the structure pointed to by pStrRet is set to STRRET_WSTR, the pOleStr member of that structure will be freed on return.
Note that this function is exported from Shell32.dll rather than Shlwapi.dll. It is also included in Shlobj.h rather than Shlwapi.h.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
DLL |
|
See also