Main Content

Use COM Objects inMATLAB

Access COM components from MATLAB®

The Microsoft®Component Object Model(COM)提供了一个框架集成可重用,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.

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

Funzioni

actxserver Create COM server
actxGetRunningServer Handle to running instance of Automation server
methodsview View class methods
eventlisteners List event handler functions associated with COM object events
registerevent 韩副事件dler for COM object event at run time
unregisterallevents Unregister all event handlers associated with COM object events
unregisterevent Unregister event handler associated with COM object event at run time
iscom Determine whether input is COM object
isevent Determine whether input is COM object event
isinterface Determine whether input is COM interface

Oggetti

COM Access COM components fromMATLAB

Esempi e istruzioni

MicrosoftOffice

Concetti

Risoluzione dei problemi

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.