COM Component Integration

Integrate COM components into applications

Integrating MATLAB® generated COM components into an application requires you to use a combination of APIs. MATLAB Compiler SDK™ uses APIs to initialize the MATLAB Runtime, load the compiled MATLAB functions into the MATLAB Runtime, and manage data that is passed between the COM components and the MATLAB Runtime. The compiler generates some of the APIs based on the signatures of the compiled functions. MATLAB Runtime provides other APIs that are consistent for all applications.

Use COM components for integrating MATLAB functions into Microsoft® Office products. MATLAB Compiler™ offers direct integration with Microsoft Excel®.

Examples and How To

Register and Reference the Utility Library

How to register and reference the utilities you need in your program

Call the Methods of a Class Instance

Describes how you call the class methods to access the encapsulated MATLAB functions

Call COM Objects in Visual C++ Programs

How to integrate a COM object into a Visual C++® program

Pass Arguments

Describes how you can pass multiple arguments as a varargin array by creating a Variant array, assigning each element of the array to the respective input argument

Control Array Formatting and Data Conversion

Describes array formatting and data conversion flags

Use MATLAB Global Variables in Visual Basic

Describes class properties, which allow an object to retain an internal state between method calls

Block Execution of Applications that Create Figures

How to handle interaction in a console-based program that creates MATLAB figures

Obtain Registry Information

How to use MATLAB function componentinfo to query the system registry for any installed COM components created with the MATLAB Compiler SDK product

Integrate Magic Square into a COM Application

Demonstrates the creation of a COM component from a simple MATLAB file

Install COM Components

Describes how to install/deploy created components on target computers

Concepts

General Techniques

Describes the integration of COM components created with the MATLAB Compiler SDK product into programs

MATLAB Runtime Path Settings for Development and Testing

Path settings for machines where you want to develop and test applications that contain compiled MATLAB code

MATLAB Runtime Options

When you roll-out a COM component to end users, there are times when you need to specify MATLAB Runtime options to create a log file or improve performance.

Share MATLAB Runtime Instances

Information using a singleton MATLAB Runtime to share runtime instances

Handle Errors During a Method Call

Describes the Microsoft Visual Basic® exception handling capability

Component Registration

Describes the registration process for COM components created by the MATLAB Compiler SDK product.

Data Conversion

Converting between MATLAB and COM variants.

Calling Conventions

Describes the calling conventions for COM components created by the MATLAB Compiler SDK product

Was this topic helpful?