Next Previous Up Top Contents Index

4.5 Building an Automation controller application

4.5.9 Controllers using more than one dispinterface

If the server provides more than one dispinterface, the first dispinterface that the controller gets back is whatever the server developer designated the default dispinterface. The controller can find the other dispinterfaces by calling the method QueryInterface, page 356, passing the default dispinterface and the ID (from make-GUID, page 351) of the desired interface. See also "Servers providing more than one dispinterface" on page 187.

For example:

let (status, foo-interface) =
  QueryInterface(dispinterface, interface-id);

if (FAILED?(status)) error(...); // Requested interface not found else ... // Use foo-interface Release(foo-interface); // Mandatory when finished end;


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

Next Previous Up Top Contents Index