I have a problem with this function... It returns 1000 after I call it and then when I call mlPvFind I get access violation. In the OpenML specification there is no 1000 status. What is wrong with my code?
char *buf = new char;
status = mlGetCapabilities( ML_SYSTEM_LOCALHOST, &systemCap);
MLpv* deviceIds = mlPvFind(systemCap, ML_SYSTEM_DEVICE_IDS_INT64_ARRAY);
if( deviceIds->length > 0 )
sprintf(buf, "%d", deviceIds->value.pInt64);
MessageBox(NULL, "", buf, MB_OK);
mlFreeCapabilities( systemCap );
Please have a look at
and the enumeration "mlStatusReturnEnum"
around line 59.
You could also use the function:
const char* mlStatusName( MLstatus status )
to get the "text" version of your error code.
That said, code 1000 is "internal error". I suppose that could mean a number of things, but most likely is that your ML daemon is not running. The daemon must be running in order for any ML program to work.