LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use 3rd Party DLL which has WINAPI defined functions.

I'm trying to implement a dll into CVI which comes with its LIB and H file for NT.
A typical function:
BOOL WINPAPI GetExFastStatus (.......)
What do I do with the WINAPI

Windows2000
CVI 6.0

Scott Youngren
Northrop/Grumman Navigation Systems
0 Kudos
Message 1 of 6
(4,015 Views)
Hello,

At windef.h, WINAPI is a #define for __cdecl

Be sure to
#define WIN32_LEAN_AND_MEAN
and
#include
-----------------------
/* Nothing past this point should fail if the code is working as intended */
0 Kudos
Message 2 of 6
(4,007 Views)
Should read:

#include windows.h
with the appropriate brackets
-----------------------
/* Nothing past this point should fail if the code is working as intended */
0 Kudos
Message 3 of 6
(4,004 Views)
I would guess that the .h file for the third party DLL #includes windows.h, but if it doesn't, #include windows.h and/or windef.h before you #include the DLL .h file. Add the .lib file for the third party DLL to your CVI project.
Message 4 of 6
(3,999 Views)
So thanks to all who responded. The 3rd party DLL has been successfully implemented.
And I continue to learn how to make things work.

Scott Youngren
0 Kudos
Message 5 of 6
(3,976 Views)
I am having the exact same problem as described here, but for some reason I can't get it to work. The error I get is "Undefined symbol '_Gx1838Initialize@12' referenced in "DC Source.c"". The Gx1838 is the function I am trying to use. I have included the .h file for the dll, the .lib file but it still cannot find it. I also have #include before I include the .h file. Do I need to do something with the .dll?

Thanks for any suggestions!
0 Kudos
Message 6 of 6
(3,897 Views)