bool__stdcallmlxInputChar(char *CharArray){//100% ready. Function of passing command/function/text to desktop/* ** Check if virtual machine and string are present */
----> // Original with Bug -> if((pEng == NULL)&&(strlen(CharArray)<1)) return false; <---if(( pEng == NULL) || (strlen(CharArray)<1))returnfalse;
/* ** Enter formula into MATLAB desktop */engEvalString((Engine *) pEng, CharArray);
returntrue;
}
我在 UnitDll.cpp 中发现了一个小错误
最好用 OR 而不是 AND 进行检查
因此您不能向关闭的引擎发送命令