IDispatch Class

The IDispatch class is the abstract class that provides a superclass for all ActiveX control and automation interface classes created when you import an ActiveX control or automation type library into JADE.

A class is generated as a subclass of the IDispatch class for each required ActiveX interface. Each of these generated classes has properties and methods added to it that map to the properties and methods of the interface. The properties (using mapping methods) and methods call an external method that updates the object.

To use an event interface, you must register your interest in a specific event, which involves specifying the event method of the interface and the method that you want executed when the event is triggered. (For details, see the beginNotifyAutomationEvent method.)

When you create an instance (that is, a subclass) of the JADE ActiveXAutomation or ActiveXControl class that corresponds to the ActiveX object that you want to use in JADE, a transient instance of the default interface is also created as a subclass of the IDispatch class. A reference is established between the ActiveX class and its default interface.

When you call JADE ActiveX class methods (as you do for any other JADE class), these method calls are passed by the default interface to the actual ActiveX object. If the ActiveX object returns a reference to another interface in response to a method call or the getting of a property, JADE creates an instance of the corresponding JADE interface class and returns a reference to that instance instead.

You can create neither transient nor persistent instances of the IDispatch class. Instances of this class are created by JADE at run time when an ActiveX object supplies an interface pointer and they are deleted when the ActiveX object that is using them is deleted.

Use the getInterface method defined in the ActiveXAutomation and ActiveXControl classes to access any interface for an imported ActiveX object.

The IJadeAutoFont, IJadeAutoFontEvents, and IJadeAutoPicture standard interface classes were created as subclasses of the IDispatch class when the OLE Automation library that has been preloaded into the RootSchema was imported.

For details about:

IUnknown

IJadeAutoFont, IJadeAutoFontEvents, and IJadeAutoPicture classes preloaded into the RootSchema with the OLE_Automation object class, ActiveX control and automation object classes imported by developers