mclSetMCRUserData - Associate MATLAB data value with string key of MCR instance uniquely identified by mcrID
Synopsis
extern "C"
bool mclSetMCRUserData(
long mcrID, // Integer MCR instance identifier
const char *key, // Store user data under this key
mxArray *value // User data value
);
Description
This external C function associates a MATLAB data value
with the string key of the MCR instance uniquely identified by mcrID. mclSetMCRUserData registers
the mxArray value under the string key, which may
later be used by mclGetMCRInstanceData to retrieve
the data. mclSetMCRUserData is defined in the MCLMCR
module and is only available to wrapper code in deployed applications.
This function makes a shared copy of the input data and does not
assume ownership of the mxArray value. You must
call mxDestroyArray on value eventually
in your application or memory leak problems may occur.
This command is part of the MCR User Data interface API. For
information about this function, as well as complete examples of usage,
see Improving Data Access Using the MCR User Data Interface.
Note
A compiled application should set mcruserdata ParallelConfigurationFile before calling
any Parallel Computing Toolbox code. Once this code has been called,
setting ParallelConfigurationFile to point to a
different file has no effect. |
Example
mxArray *value = mxCreateString("/usr/userdir/config.mat");
if (!mclSetMCRUserData(mcrID, "ParallelConfigurationFile",
"/usr/userdir/config.mat") )
{
fprintf(stderr, "Could not set PCTConfigFile MCR
user data. \n");
return -3;
}
See Also
mclSetCmdLineUserData, mclGetMCRUserData
 | mclSetCmdLineUserData | | mclTerminateApplication |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit