04-26-2005 11:11 PM
04-27-2005 04:05 PM
05-11-2005 08:37 AM
05-11-2005
02:17 PM
- last edited on
07-08-2025
02:36 PM
by
Content Cleaner
Hello toidi,
1) So I would suggest, if you haven't already, upgrading your runtime engine to CVI 7.1.1. The CVI runtime engine is backwards compatible so you will still be able to build you applications in CVI 7.0.
2) Once you do this, recreate the Matlab instrument. Remove the current Matlab instrument and recreate 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 previous one (as in, just replace the one that is already in the shipping example directory with the newly created one).
3) Change the matlabdemo.c launch callback to read
stat = MLApp_NewDIMLApp (NULL, 1, LOCALE_NEUTRAL, 0, &hMatlab);
instead of
stat = MLApp_NewDIMLApp (NULL, &hMatlab);
4) Open the source code for the Matlab instrument and search and replace ALL instances of &MLApp_IID_DIMLApp with &IID_IDispatch.
After doing this, I was able to run the Matlab example with Matlab 6.5 R13 and CVI 7.1.
Let me know how this goes. Thanks.
05-12-2005 10:24 PM
05-13-2005 02:34 PM
08-08-2005 08:47 AM
I had used the method provided by Wendy L . However, after I searching and replacing ALL instances of &MLApp_IID_DIMLApp with &IID_IDispatch in matlabsrvr.c,another problem came: 82, 61 Undeclared identifier 'IID_IDispatchb'. So I defined the cosnt 'IID_IDispatchb'
with const IID IID_IDispatchb=
{
0x669CEC93, 0x6E22, 0x11CF, 0xA4, 0xD6, 0x0, 0xA0, 0x24, 0x58, 0x3C, 0x19
};
Was it right?
After this replacing ,there was no error.However,when running,error came back. It can not link to matlab. What's wrong?!
My matlab version is 6.5, and Labwindows is 7.0
08-08-2005 08:48 PM
Hello icestar,
I would double check and make sure that you replaced all instances of &MLApp_IID_DIMLApp with &IID_IDispatch instead of &IID_IDispatchb. The generated matlabsrvr.c code should not have references to &IID_IDispatchb. After doing this, does the problem resolve itself?
Thanks
08-09-2005 05:16 AM