Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mclInitializeApplication

Set up application state shared by all MATLAB Runtime instances created in current process

Synopsis

bool 
  mclInitializeApplication(const char **options, int count)

Description

Set up the application state shared by all MATLAB® Runtime instances created in current process. Call only once per process. The function takes an array of strings (possibly of zero length) and a count containing the size of the string array. The string array may contain the following MATLAB command line switches, which have the same meaning as they do when used in MATLAB:

  • -appendlogfile

  • -Automation

  • -beginfile

  • -debug

  • -defer

  • -display

  • -Embedding

  • -endfile

  • -fork

  • -java

  • -jdb

  • -logfile

  • -minimize

  • -MLAutomation

  • -noaccel

  • -nodisplay

  • -noFigureWindows

  • -nojit

  • -nojvm

  • -noshelldde

  • -nosplash

  • -r

  • -Regserver

  • -shelldde

  • -singleCompThread

  • -student

  • -Unregserver

  • -useJavaFigures

  • -mwvisual

  • -xrm

Caution

mclInitializeApplication must be called once only per process. Calling mclInitializeApplication more than once may cause your application to exhibit unpredictable or undesirable behavior.

Caution

When running on Mac, if -nodisplay is used as one of the options included in mclInitializeApplication, then the call to mclInitializeApplication must occur before calling mclRunMain.

Examples

To start all MATLAB Runtime in a given process with the -nodisplay option, for example, use the following code:

const char *args[] = { "-nodisplay" }; 
if (! mclInitializeApplication(args, 1))
{
   fprintf(stderr, 
           "An error occurred while initializing: \n %s ",
           mclGetLastErrorMessage());
   return -1;  
}

Introduced in R2009a

Was this topic helpful?