LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI Detected an inconsistency of run time stack

Hi,
 
When i am trying to call a DLL function using LoadLibrary function in Labwindows\cvi 6.0 we are able to access the function with out any problem.
 
But when we are trying to do the Same thing in  Labwindows\cvi 8.0 we are facing a runtime error
 
CVI has detected an inconsistency of the runtime stack. This might have been caused by a calling convention mismatch in the
last function call.
 
please let me know the reason.
 
Thanks in Advance.
 
Srinivas.P
 
 
0 Kudos
Message 1 of 3
(4,670 Views)
Hi Srinivas,
 
The error that you posted indicates that the calling convention (__cdecl or __stdcall) of the functions are different than the compilers calling convention.  First off, you could compare what calling conventions you have set in CVI 6.0 to CVI 8.0 and make sure they are the same. Do this by selecting Options >> Build Options and observing the "Default calling convention" option.  Make sure that whatever you have set in there, is the same that your function is declared with (you could check this by looking at the header file of the DLL).   
 
Additionally, the error detection in CVI has improved over time, so some issues may not have been caught in earlier versions.
 
Let me know if this helps!
 
Best Regards,
Jonathan N.
National Instruments
Message 2 of 3
(4,655 Views)

Thank u

sir its working fine now....

 

 

0 Kudos
Message 3 of 3
(4,627 Views)