External Interfaces Reference Previous page   Next Page
interfaces

List custom interfaces to COM server

Syntax

Description

C = h.interfaces returns cell array of strings C listing all custom interfaces implemented by the component in a specific COM server. The server is designated by input argument, h, which is the handle returned by the actxcontrol or actxserver function when creating that server.

C = interfaces(h) is an alternate syntax for the same operation.

Examples

Once you have created a COM server, you can query the server component to see if any custom interfaces are implemented. Use the interfaces function to return a list of all available custom interfaces:

To get a handle to the custom interface you want, use the invoke function, specifying the handle returned by actxcontrol or actxserver and also the name of the custom interface:

You can now use this handle with most of the COM client functions to access the properties and methods of the object through the selected custom interface. For example, to list the properties available through the ICalc1 interface, use

To list the methods, use

Add and multiply numbers using the Add and Multiply methods of the custom object c1:

See Also

actxcontrol, actxserver, invoke, get


Previous page  get (COM) invoke Next page

© 1994-2005 The MathWorks, Inc.