JCL Help:StrRetToString

From Project JEDI Wiki
Jump to navigationJump to search


Converts a TStrRet record to a string.


 function StrRetToString(IdList: PItemIdList; StrRet: TStrRet; Free: Boolean): string;


Parameters Description
IdList: PItemIdList The item identifier list for which the TStrRet record is supplied in the StrRet parameter (only used when StrRet.uType = STRRET_OFFSET).
StrRet: TStrRet The TStrRet record to convert to a string.
Free: Boolean Determines whether the memory associated with the pOleStr member of StrRet is freed (only applies if StrRet.uType = STRRET_WSTR).

Return Value

If the function succeeds it returns the string extracted from the StrRet parameter. If it fails the return value is an empty string.


StrRetToString converts the StrRet record to a Delphi long string. If the function succeeds it returns the converted string, if it fails it returns an empty string. If Free is set to False you must manually release the memory associated with the StrRet.pOleStr member by using the StrRetFreeMem. function.

See Also






Marcel van Brakel


Windows 2000 introduced StrRetToStr and StrRetToBuf which can be used instead.

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page