External Interfaces Previous page   Next Page

Identifying Objects and Interfaces

You can get some additional information about a control or server using the following functions.

Function
Description
class
Return the class of an object
isa
Determine if an object is of a given MATLAB class
iscom
Determine if the input is a COM or ActiveX object
isinterface
Determine if the input is a COM interface

This example creates a COM object in an Automation server running Excel, giving it the handle h, and a Workbooks interface to the object, with handle w.

Use the iscom function to see if variable h is a handle to a COM or ActiveX object:

Use the isa function to test variable h against a known class name:

Use isinterface to see if variable w is a handle to a COM interface:

Use the class function to find out the class of variable w:


Previous page  Invoking Commands on a COM Object Invoking Methods Next page

© 1994-2005 The MathWorks, Inc.