TS_DelegateISink

 (Available in 01 TS COM - TS_COM_DelegateISink)

Purpose

Root class for all TS-dynamic-allocated COM ISink objects

Syntax

oDelegateISink:=TS_DelegateISink{ oOwner, oInvokeHandler }

Access methods

AITypeLib - Get a static 'ITypeLib' COM interface pointer.
FInit - Test if the enclosed interface is valid
ISink - Get a static 'Sink' COM interface pointer.
DateTimeAsDate - Get the 'DateTimeAsDate' property
IID - Get the IID of the enclosed interface.
IsValidObject - Test if the object is 'Valid'

Assign methods

DateTimeAsDate - Set the 'DateTimeAsDate' property

Methods

TSTraceInfo -
CreateClassMember - Define a classmember ( Method or property name )
UnRegisterOwner - CALLBACK: Called when a owner unregisters itself
Destroy - CALLBACK: It is adviced to use 'oObject:Axit()'
INIT - Create an instance of the 'TS_DelegateISink' class
NEW - CALLBACK: New ( OnInited event )

Description

Root class for all TS-dynamic-allocated COM ISink objects. Normaly this class is used to delegate events from the 'ISink' interface to the 'InvokeHandler' object. If no 'InvokeHandler' object is specified then the 'TS_DelegateISink' instance will try to delegate the event to 'SELF' before signaling an error.

Inherits from

TS_Root2

Example

CLASS TS_HOutlookApplicationEvents INHERIT TS_DelegateISink

ACCESS IID AS _WinGUID PTR PASCAL CLASS TS_HOutlookApplicationEvents
LOCAL STATIC pstruIID AS _WinGUID
   IF pstruIID==NULL_PTR
      pstruIID:=MemAlloc( _SIZEOF( _WinGUID ) )
      pstruIID.Data1:=0x0006304EU
      pstruIID.Data2:=0x0000
      pstruIID.Data3:=0x0000
      pstruIID.Data4[ 1 ]:=0xC0
      pstruIID.Data4[ 2 ]:=0x00
      pstruIID.Data4[ 3 ]:=0x00
      pstruIID.Data4[ 4 ]:=0x00
      pstruIID.Data4[ 5 ]:=0x00
      pstruIID.Data4[ 6 ]:=0x00
      pstruIID.Data4[ 7 ]:=0x00
      pstruIID.Data4[ 8 ]:=0x46
   END
RETURN pstruIID

METHOD INIT( uoOwner, uoInvokeHandler, uloSelfDestruct ) CLASS TS_HOutlookApplicationEvents
   SUPER:INIT( uoOwner, uoInvokeHandler, uloSelfDestruct  ; ...
  ... )
   SELF:CreateClassMember( #OnApplicationItemSend, 0x0000F002  ; ...
  ... )
   SELF:CreateClassMember( #OnApplicationNewMail, 0x0000F003  ; ...
  ... )
   SELF:CreateClassMember( #OnApplicationReminder, 0x0000F004  ; ...
  ... )
   SELF:CreateClassMember( #OnApplicationOptionsPagesAdd, 0x0000F005  ; ...
  ... )
   SELF:CreateClassMember( #OnApplicationStartup, 0x0000F006  ; ...
  ... )
   SELF:CreateClassMember( #OnApplicationQuit, 0x0000F007 )
RETURN SELF

METHOD OnApplicationItemSend( oIItem, rlCancel ) CLASS TS_HOutlookApplicationEvents
// Responde to the event
RETURN NIL

Source

CLASS TS_DelegateISink INHERIT TS_Root2
   DECLARE ACCESS AITypeLib
   DECLARE ACCESS DateTimeAsDate
   DECLARE ACCESS FInit
   DECLARE ACCESS IID
   DECLARE ASSIGN DateTimeAsDate
   DECLARE METHOD CreateClassMember