| MATLAB® Compiler™ | ![]() |
extern "C" long libnameGetMcrID
The extern "C" long libnameGetMcrID returns the identifier of the MCR instance associated with the software component libname. It allows applications that use more than one MATLAB Compiler generated software component (and hence, have more than one MCR instance active in-process) to distinguish between MCR instances when setting or getting MCR instance specific data. This function is automatically generated into every component created by MATLAB Compiler. 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.
if( !mclInitializeApplication(NULL,0) )
{
fprintf(stderr, "Could not initialize the application.\n");
return -1;
}
if (!libmatrixInitialize())
{
fprintf(stderr,"Could not initialize the library.\n");
return -2;
}
long mcrID = libmatrixGetMcrID();
mxArray *value = mxCreateString("/home/user/config.xml");
if (!mclSetMCRUserData(mcrID, "DCTConfigFile", value) )
{
fprintf(stderr, "Could not set DCTConfigFile MCR user data.\n");
return -3;
}
...
mclGetMCRUserData, mclSetMCRUserData
![]() | deploytool | getmcruserdata | ![]() |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |