(Available in 01 TS COM - TS_COM_DelegateIDispatch)


Root class for all TS-dynamic-allocated IDispatch COM objects.


CLASS MyDelegateIClass INHERIT TS_DelegateIDispatch

Access methods

AIThis - Get a static 'This' COM interface pointer.
AITypeLib - Get a static 'ITypeLib' COM interface pointer.
FInit - Test if the enclosed interface is valid
IID - Get the IID of the enclosed interface.


TSTraceInfo -
CMGetIDsOfNames - Get ID's of names
CMGetTypeInfo - Get ITypeInfo interface pointer.
CMGetTypeInfoCount - Get TypeInfo count
CMInvoke - Invoke, Execute a method or property of the interface
Destroy - CALLBACK: It is adviced to use 'oObject:Axit()'
INIT - Create a 'TS_DelegateIDispatch' instance
NEW - CALLBACK: New ( OnInited event )
IsAccess - Test if 'symName' is a property get
IsAssign - Test if 'symName' is a property put
IsMethod - Test if 'symName' is a method
IVarGetCreateInstanceArgs - Get a property value as object
IVarGetCreateInstance - Get a property value as object
IVarGetArgs - Get a property value
IVarGet - Get a property value
IVarPutCreateInstanceArgs - Set a property value, Return value as object
IVarPutCreateInstance - Set a property value, Return value as object
IVarPutArgs - Set a property value
IVarPut - Set a property value
SendCreateInstance - Invoke a method, Return value as object
Send - Invoke a method, Return value as usual


This class is equivalent to the VO 'OLEAutoObject' class. It provodes a wrapper for the 'IDispatch' COM interface that is dynamicly allocated and will be collected by the GC when it looses scope.

The base class provides the standaard methods and properties for the COM 'IDispatch' interface, other methods, that are specific for a given interface must be added before the class can do any actual work.

The simplest way to do this is using the 'TS Automation Server' tool from the VO 'Tools'-menu. An alternative way is to use the 'TS OLEAutoConverter' progam ( also part of the COMSDK ).

The code-generators use prefixes for the method and property names to prevent name clashes, CA for ACCESS/ASSIGN, CM for methods.

All code needed to instanciate 'MS Outlook' is given in the example below, as you can see the amount of code needed is verry little. More secure code to do the same will be generated when one of the code generators is used. Also have a look at the 'VO2Outlook' application ( and others ) that is supplied with the COMSDK.

Inherits from



CLASS MyOutlookApplication INHERIT DelegateIDispatch

METHOD Inil( uoOwner ) CLASS MyOutlookApplication
   SUPER:INIT( uoOwner, "Outlook.Application", NIL  ; ...
  ... )

ACCESS CAFeatureInstall CLASS MyOutlookApplication
RETURN SELF:IVarGet( #FeatureInstall )

ASSIGN CAFeatureInstall( uParam001 ) CLASS MyOutlookApplication
RETURN SELF:IVarPut( #FeatureInstall, uParam001 )

METHOD CMCreateItem( ItemType ) CLASS MyOutlookApplication
RETURN SELF:Send( #CreateItem, ItemType )


CLASS TS_DelegateIDispatch INHERIT TS_DelegateIUnknown
   DECLARE METHOD IVarGetCreateInstance
   DECLARE METHOD IVarGetCreateInstanceArgs
   DECLARE METHOD IVarPutCreateInstance
   DECLARE METHOD IVarPutCreateInstanceArgs