TS_String

 (Available in 00 TS Tools(Base) - TS_Tools_String)

Purpose

String and BSTR(PTR) container

Syntax

oString:=TS_String{ ["SomeString"|pSomeWordString] }

Arguments

ucpWordString
Optional initial value NIL,STRING or BSTR(PTR)

Access methods

ByteString - Get value as string
WordString - Get value as BSTR(PTR)
MemFree - Test the 'MemFree' flag

Assign methods

ByteString - Set new value as string
WordString - Set value as BSTR(PTR)
MemFree - Set the 'MemFree' flag

Methods

TSTraceInfo -
INIT - Create a 'TS_String' instance
NEW - CALLBACK: New ( OnInited event )
Destroy - CALLBACK: It is adviced to use 'oObject:Axit()'

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.

Inherits from

TS_Root0

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

CLASS TS_String INHERIT TS_Root0
   DECLARE ACCESS ByteString
   DECLARE ACCESS MemFree
   DECLARE ACCESS WordString
   DECLARE ASSIGN ByteString
   DECLARE ASSIGN MemFree
   DECLARE ASSIGN WordString