Method AutomationObject():queryInterface() Foundation

Queries a dedicated interface

Syntax
:queryInterface( <cGUID> ) --> oAutomationObject | NIL
Parameters
<cGUID>
<cGUID> is a string with the length of 38 characters and has the following syntax: {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}, where each n represents a character in the range of '0'-'9', 'a'-'f' or 'A'-'F'.
A GUID is a world-wide unique value and is the identifier of an interface.
Return

This method creates and returns an AutomationObject. It is connected to the COM/ActiveX component via the interface whose ID is passed in <cGUID>. If the object executing the method does not support the interface requested, :queryInterface() returns NIL.

Description

If an AutomationObject is created, it is automatically connected to a COM/ActiveX component. Subsequently, the application can use the AutomationObject to call methods and access properties exposed by the COM/ActiveX component's default COM interface.

However, often COM/ActiveX components also expose methods and properties in additional interfaces. In this case, :queryInterface() must be used to access this functionality. The method creates and returns an AutomationObject that is connected using a specific COM interface. The object can then be used to access methods and properties of the COM/ActiveX component that are exposed by the COM interface.

To create an AutomationObjects that is connected to a certain COM interfaces, :queryInterface() is called with the GUID of the desired interface.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.