iscom - Is input COM object

Syntax

tf = h.iscom
tf = iscom(h)

Description

tf = h.iscom returns logical 1 (true) if the input handle, h, is a COM or Microsoft® ActiveX® object. Otherwise, iscom returns logical 0 (false) .

tf = iscom(h) is an alternate syntax for the same operation.

Examples

Create a COM server running Microsoft® Excel® software. The actxserver function returns a handle h to the server object. Testing this handle with iscom returns true:

h = actxserver('Excel.application');

h.iscom
ans =
   1

Create an interface to workbooks, returning handle w. Testing this handle with iscom returns false:

w = h.get('workbooks');

w.iscom
ans =
   0

See Also

isinterface

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS