ISink

 (Available in 01 TS COM - TS_COM_DelegateISink)

Purpose

Get a static 'Sink' COM interface pointer.

Syntax

oIUnknown:=oDelegateIUnknown:ISink

Description

Get a static 'Sink' 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:ISink
IF oResultAIUnknown<>NULL_OBJECT
   OBJECT( PTR( _CAST, poAIUnknown ) ):=oResultAIUnknown
   lRetVal:=TRUE
ELSE
   TSTrace Warning "oResultAIUnknown:=oParamDIUnknown:ISink==NULL_OBJECT"
   OBJECT( PTR( _CAST, poAIUnknown ) ):=NULL_OBJECT
   LONG( phResult ):=E_FAIL
   lRetVal:=FALSE
END

Source

ACCESS ISink AS TS_ISink CLASS TS_DelegateISink
LOCAL oISink AS TS_ISink
   TSTrace Enter
   IF SELF:FInit
      oISink:=SELF:_ISink
      oISink:AddRef( )
   ELSE
      TStrace Warning "!SELF:FInit"
      oISink:=NULL_OBJECT
   END
   TSTrace Leave
RETURN oISink