LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI6.0 DLL and CVI7.1 DLL runtime error

When we use the CVI6.0 we don't have any problem to access the DLL and get the parameter, however, when we use the CVI7.1, every time when I call the DLL function, it will have following run-time error.

And the parameters inside will be crashed and cannot passed to main program successfully.

At first, we tried to use the CVI7.1 to generate the DLL again and use the CVI7.1 to run the test, however, the same thing happened again.

Here's some files attached and hope to get your answer?

How to solve such kind of problem.?

DLL Source files:

exportDLL_testtemp.h

tempDLL.C

 

Test the DLL files:

Test_exportDLL.c

 

Regards,

 

Mike Cheong

Download All
0 Kudos
Message 1 of 2
(2,816 Views)
Make sure to match the calling conventions. Your DLL is using stdcall, but you dont specify a calling convention in your function signature when loading it. By default, the CVI build options use cdecl. You can change these in the build options or explicitly state it in the function pointer signature.
Bilal Durrani
NI
Message 2 of 2
(2,804 Views)