NIL,STRING or BSTR(PTR) ( Optional initial value )
Description
The 'TS_String' class is to help the application with converting strings to BSTR's and BSTR's to string. The class is registered to the GC and deallocating the allocated BSTR is done when the object is destructed.
Example
oString:=TS_String{ cProgID }
IF oString:WordString==NULL_PTR
lRetVal:=FALSE
ELSE
hResult:=CLSIDFromProgID( oString:WordString, pstruCLSID )
lRetVal:=TS_HSucceeded( hResult, TRUE )
END
oString:Axit( )
oString:=NULL_OBJECT
Source
METHOD INIT( ucpWordString ) CLASS TS_String
LOCAL cAccessTypeList AS STRING
LOCAL cString AS STRING
LOCAL pString AS PTR
LOCAL lInit AS LOGIC
TSTrace Enter CREATE
IF LOGIC( _CAST, _AND( SELF:_ObjectStat1, TS_OBJSTAT1_ININIT ; ...
... ) )
SELF:_ObjectStat1+=TS_OBJSTAT1_COUNTVALUE
cAccessTypeList:=TS_AccessTypeList( ucpWordString )
DO CASE
CASE cAccessTypeList=="U"
cString:=NULL_STRING