Main Content

Use COM Objects in MATLAB

Access COM components from MATLAB®

The Microsoft® Component Object Model (COM) provides a framework for integrating reusable, binary software components into an application. Because components are implemented with compiled code, the source code can be written in programming languages that support COM. Upgrades to applications are simplified, as components can simply be swapped without the need to recompile the entire application. In addition, a component's location is transparent to the application, so components can be relocated to a separate process or even a remote system without having to modify the application.

Alternatively, consider using a Microsoft .NET application. For more information, see Call .NET from MATLAB.

MATLAB supports COM and .NET on the Windows® platform only.

Functions

actxserverCreate COM server
actxGetRunningServerHandle to running instance of Automation server
methodsviewView class methods
eventlistenersList event handler functions associated with COM object events
registereventAssociate event handler for COM object event at run time
unregisteralleventsUnregister all event handlers associated with COM object events
unregistereventUnregister event handler associated with COM object event at run time
iscomDetermine whether input is COM object
iseventDetermine whether input is COM object event
isinterfaceDetermine whether input is COM interface

Objects

COMAccess COM components from MATLAB

Topics

COM Integration

Microsoft Office

Troubleshooting

MATLAB COM Support Limitations

Microsoft does not support loading 32-bit DLLs or in-process COM servers into a 64-bit application, or conversely.

Interpreting Argument Callouts in COM Error Messages

When a MATLAB client sends a command with an invalid argument to a COM server application, the server sends back an error message in the following format.