Next Previous Up Top Contents Index

4.12 The OLE-AUTOMATION module

call-simple-method

Function

Summary

This function provides a simple way to call a dispatch method in a dispinterface.

Signature

call-simple-method disp-interface dispatch-method #rest args => result 

Arguments

disp-interface
An instance of <LPDISPATCH>.

dispatch-method
An instance of <string> or <disp-id>.

The class class <disp-id> is defined as type-union(<integer>, <machine-word>). Usually, a dispatch ID value will be an <integer>, but occasionally it will not fit.

args
Instances of <object>.

Each args value can be either the actual value to be passed in the dispatch method call, or an instance of <ole-arg-spec> from the functions pass-as, out-ref, or inout-ref.

Values

result
An instance of <object>.

Description

This function provides a simple way to call a dispatch method in a dispinterface.

This function is limited to dispatch methods that have only positional arguments (as opposed to named arguments) and which do not need to have a locale specified.

The dispatch-method argument is either the name of the dispatch method (a <string>), or its DISPID. If you expect to call the dispatch method more than once, it is much more efficient to use get-id-of-name to map the name to a DISPID just once.


OLE, COM, ActiveX and DBMS Reference - 31 MAR 2000

Next Previous Up Top Contents Index