engOpenSingleUse (C)
Start MATLAB engine session for single, nonshared use
C Syntax
#include "engine.h" Engine *engOpenSingleUse(const char *startcmd, void *dcom, int *retstatus);
Description
This routine allows you to start multiple MATLAB® processes using MATLAB as a computational engine.
engOpenSingleUse starts a MATLAB process, establishes a connection, and returns a unique engine identifier, or
NULL if the open fails. Each call to
engOpenSingleUse starts a new MATLAB process.
engOpenSingleUse opens a COM channel to MATLAB. This starts the MATLAB software you registered during installation. If you did not register during
installation, enter the following command at the MATLAB prompt:
!matlab -regserver
engOpenSingleUse allows single-use instances of an engine server.
engOpenSingleUse differs from engOpen, which
allows multiple applications to use the same engine server.
See MATLAB COM Integration for additional details.
Note
The MATLAB Engine API for C++ functions are recommended over
engOpenSingleUse. The MATLAB Engine API for C++ includes modern C++ features for writing engine
applications. For more information, see Call MATLAB from C++. There are no
plans to remove engOpenSingleUse or the Engine API for C.
Arguments
startcmdString to start MATLAB process. On Microsoft® Windows® systems, the
startcmdstring must beNULL.dcomReserved for future use; must be
NULL.retstatusReturn status; possible cause of failure.
Returns
Microsoft Windows Operating System Only
Pointer to an engine handle, or NULL if the
open fails.
UNIX Operating System
Not supported on UNIX® systems.