AITypeLib

 (Available in 01 TS COM - TS_COM_DelegateISink)

Purpose

Get a static 'ITypeLib' COM interface pointer.

Syntax

oAIUnknown:=oDelegateIDispatch:AITypeLib

Description

Get a static 'ITypeLib' COM interface pointer. The object ( interface pointer ) returned by this property must be released by using the 'Release()' method of the returend object. Normaly this property is used when a interface pointer must be passed to an interface in the form of a parameter.

Returns

OBJECT(InterfacePointer), Refereing to a static COM interface

Example

oResultAIUnknown:=oInterfaceSafe:AITypeLib
IF oResultAIUnknown<>NULL_OBJECT
   OBJECT( PTR( _CAST, poAIUnknown ) ):=oResultAIUnknown
   lRetVal:=TRUE
ELSE
   TSTrace Warning "oResultAIUnknown:=oParamDIUnknown:AITypeLib==NULL_OBJECT"
   OBJECT( PTR( _CAST, poAIUnknown ) ):=NULL_OBJECT
   LONG( phResult ):=E_FAIL
   lRetVal:=FALSE
END

Source

ACCESS AITypeLib AS TS_AbstractITypeLib PASCAL CLASS TS_DelegateISink
LOCAL oAITypeLib AS TS_AbstractITypeLib
   TSTrace Enter
   IF IsAccess( SELF:_Owner, #AITypeLib )
      oAITypeLib:=IVarGet( SELF:_Owner, #AITypeLib )
      IF oAITypeLib==NULL_OBJECT
         TSTrace Warning "IVarGet(SELF:_Owner,#AITypeLib)==NULL_OBJECT"
      END
   ELSE
      TSTrace Warning "!IsAccess(SELF:_Owner,#AITypeLib)"
      oAITypeLib:=NULL_OBJECT
   END
   TSTrace Leave
RETURN oAITypeLib