ByteString
(Available in 00 TS Tools(Base) - TS_Tools_String)
Purpose
Get value as string
Syntax
? oString:ByteString
Description
Get value as string, this will be a NULL_STRING if no wordstring has been assigned
Example
oString:=TS_String{ SomeAPICallReturningWordString( ) }
? oString:ByteString
Source
ACCESS ByteString AS STRING PASCAL CLASS TS_String
LOCAL dwWordStringLength AS DWORD
LOCAL pdwWordString AS DWORD PTR
TSTrace Enter
IF SELF:IsValidObject
IF SELF:_ByteString==NULL_STRING .AND. SELF:_WordString ; ...
... <>NULL_PTR
pdwWordString:=SELF:_WordString
pdwWordString-=1U
dwWordStringLength:=DWORD( pdwWordString )>>1U
IF LOGIC( _CAST, dwWordStringLength )
SELF:_ByteString:=Buffer( dwWordStringLength )
IF SLen( SELF:_ByteString )<>dwWordStringLength
TSTrace Fatal "SLen(SELF:_ByteString)<>dwWordStringLength"
ELSE
SELF:_ByteString:=TS_UniCodeBSTR2String( SELF:_WordString ; ...
... , FALSE )
IF SELF:_ByteString==NULL_STRING