VT

 (Available in 01 TS COM - TS_COM_VariantArg)

Source

ASSIGN VT( siNewVT AS SHORT ) AS SHORT PASCAL CLASS TS_VariantArg
LOCAL pstruWinVariantArgBot AS _WinVARIANTARG
LOCAL hResult AS LONG
LOCAL siVT AS SHORT
   TSTrace Enter
   pstruWinVariantArgBot:=SELF:_WinVariantArgBot
   IF pstruWinVariantArgBot<>NULL_PTR
      SELF:_WinVariantArgBot:=MemAlloc( _SIZEOF( _WinVARIANTARG  ; ...
     ... ) )
      IF SELF:_WinVariantArgBot==NULL_PTR
         TSTrace Fatal "SELF:_WinVariantArgBot:=MemAlloc(_SizeOf(_WinVARIANTARG))==NULL_PTR"
         SELF:_WinVariantArgBot:=pstruWinVariantArgBot
         siVT:=VT_ERROR
      ELSE
         VariantInit( SELF:_WinVariantArgBot )
         hResult:=VariantChangeType( SELF:_WinVariantArgBot,  ; ...
        ... pstruWinVariantArgBot, 0, siNewVT )
         IF TS_HFailed( hResult, TRUE )
            siVT:=VT_ERROR
            IF TS_HFailed( VariantClear( SELF:_WinVariantArgBot  ; ...
           ... ), TRUE )
               TSTrace Warning "TS_HFailed(VariantClear(SELF:_WinVariantArgBot),TRUE)"
            END
            IF LOGIC( _CAST, MemFree( SELF:_WinVariantArgBot  ; ...
           ... ) )
               TSTrace Warning "LOGIC(_CAST,MemFree(SELF:_WinVariantArgBot))"
            END
            SELF:_WinVariantArgBot:=pstruWinVariantArgBot
         ELSE
            siVT:=SELF:_WinVariantArgBot.vt
            IF TS_HFailed( VariantClear( pstruWinVariantArgBot ), TRUE )
               TSTrace Warning "TS_HFailed(VariantClear(pstruWinVariantArgBot),TRUE)"
            END
            IF LOGIC( _CAST, MemFree( pstruWinVariantArgBot ) )
               TSTrace Warning "LOGIC(_CAST,MemFree(pstruWinVariantArgBot))"
            END
         END
      END
   ELSE
      TSTrace Warning "pstruWinVariantArgBot:=SELF:_WinVariantArgBot==NULL_PTR"
      siVT:=VT_ERROR
   END
   TSTrace Leave
RETURN siVT