There are three types of COM servers:
Automation — A server that supports the OLE Automation standard.
Automation servers are based on the IDispatch
interface.
Clients of all types, including scripting clients, access Automation
servers.
Custom — A server that implements an interface directly derived
from IUnknown
. MATLAB® does not support custom interfaces.
Dual — A server that implements a combination of Automation and Custom interfaces.
The MATLAB Automation server has two modes:
Shared — One or more client applications connect to the same MATLAB server. All clients share server.
Dedicated — Each client application creates its own dedicated MATLAB server.
If you use matlab.application
as your ProgID, MATLAB creates a shared server. For more information, see Shared or Dedicated Server.
To create an instance of a COM object, you use its programmatic identifier, or ProgID. The ProgID is a unique string defined by the component vendor to identify the COM object. You obtain a ProgID from your vendor documentation.
The MATLAB ProgIDs for shared servers are:
Matlab.Application
— Starts a command window
Automation server with the version of MATLAB that was most recently used as an Automation server (might not
be the latest installed version of MATLAB).
Matlab.Autoserver
— Starts a command window
Automation server using the most recent version of MATLAB.
Matlab.Desktop.Application
— Starts the full
desktop MATLAB as an Automation server using the most recent version of
MATLAB.
The ProgIDs for dedicated servers are:
Matlab.Application.Single
Matlab.Autoserver.Single
These version-independent MATLAB ProgIDs specify the currently installed and registered version of MATLAB.
In order to create an instance of a specific installed and registered MATLAB version, you can use a version-dependent ProgID. For example, using
the ProgID Matlab.Application.7.14
creates an instance of
MATLAB version 7.14 (R2012a).
You can configure a server three ways. MATLAB supports all of these configurations.
An in-process server is a component implemented as a dynamic link library (DLL) or ActiveX® control that runs in the same process as the client application, sharing address space. Communication between client and server is relatively fast and simple.
A local out-of-process server is a component implemented as an executable
(EXE
) file that runs in a separate process from the
client application. The client and server processes are on the same computer
system. This configuration is slower due to the overhead required when
transferring data across process boundaries.
This is a type of out-of-process server; however, the client and server processes are on different systems and communicate over a network. Network communications, in addition to the overhead required for data transfer, can make this configuration slower than the local out-of-process configuration. This configuration runs only on systems that support the Distributed Component Object Model (DCOM).