engOpenSingleUse returns a retstatus of -3 and doesn't start the MatLab engine.

1 view (last 30 days)
I'm calling engOpenSingleUse and it's returning a retstatus of -3 and doesn't start the MatLab engine.
I haven't been able to find out what a retstatus -3 means and why that isn't letting me open the engine.
int retstatus = 0;
if (g_Plotting)
l_MLEngine = engOpenSingleUse(NULL, NULL, &retstatus);
if (retstatus != 0)
I'm using MatLab 2012b with the mapping toolbox and this same code snippet works on other machines running MatLab 2011 and 2008 with the corresponding toolbox.

Accepted Answer

Renee
Renee on 15 Feb 2013
If anyone is looking for the retstatus error codes they are:
0 = success -2 = error - second argument must be NULL -3 = error - engOpenSingleUse failed
To ultimately fix my engOpenSingleUse problem I had to run a command prompt as an administrator and type the command: matlab /regserver
This now lets me run my code and successfully opens the engine. (At least in debug mode!)

More Answers (0)

Categories

Find more on Model Compatibility in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!