|
使用 cvi 和matlab 混合编程,启动matlab后出现错误 类没有注册,错误代码-2147221164
使用cvi提供的文档
- Upgrade to the most recent version of the LabWindows/CVI runtime engine available here.
- Replace the provided MATLAB instrument driver with one that is compatible with your version of MATLAB. Remove the current MATLAB instrument and rebuild the MATLAB Automation Server Type Library by going to Tools»Create ActiveX Controller. The name of the MATLAB instrument will be MATLAB Application Type Library. Save the newly created ActiveX controller with the same name as the one provided with the shipping example (as in, replace the one that is already in the shipping example directory with the newly created one).
- Change the launch callback within the shipping example matlabdemo.c to read:
stat = MLApp_NewDIMLApp (NULL, 1, LOCALE_NEUTRAL, 0, &hMatlab);
instead of
stat = MLApp_NewDIMLApp (NULL, &hMatlab);
- Open the source code for the MATLAB instrument and search and replace ALL instances of &MLApp_IID_DIMLApp with &IID_IDispatch. Since parameters were added to the NewDIMLApp function, appropriate modification has to be made to any code using this function. Also, instances of &MLApp_IID_DIMLApp needs to be replaced with &IID_IDispatch for certain versions of the MATLAB software since its automation server only seems to honor the IDispatch interface ID.
完全修改后 发现错误还在 怎么解决啊 我的软件版本 cvi8 +matlab r2007a
谢谢 高手们 |
|