06-05-2017 06:35 PM
Hello,
I would like to use a USB BPI watchdog card with labview so I tried to import the dll but I'm getting the error saying "no function is found and recognized in the header file" even though there is a header file. How can I fix this? I have attached the files here.
Solved! Go to Solution.
06-05-2017 09:40 PM
The problem for all but 4 functions is the type definitions. The header uses lots of UINT32, UINT64, and so on - these are not standard types.
You can get LabVIEW to import the dll by providing a copy of stdint.h somewhere the wizard can find (either copy the file to the directory from which the dll is being imported, or specify the path explicitly in the header) and then adding the following lines to the top of the header (I placed them just above TYPEDEF PVOID...
#include "C:\Program Files (x86)\National Instruments\CVI2015\include\ansi\stdint.h" typedef uint32_t UINT32; typedef void* PVOID; typedef uint64_t UINT64; typedef int32_t INT32; typedef unsigned char UCHAR;
Here I included the stdint.h file by path from CVI. You can write instead
#include "stdint.h"
if you place it next to the dll.
If you don't have a copy of stdint.h you can include, a portable copy is apparently available here: http://www.azillionmonkeys.com/qed/pstdint.h
Note: I haven't tried that file.
06-06-2017 08:50 AM
Thank you for your response. I tried what you suggested but it didnt work. Basically, I downloaded the stdint.h, placed it in the same dir as my WDog_Univrsl.dll, and put the following in "WDog_Univrsl.h".
#include "stdint.h" typedef uint32_t UINT32; typedef void* PVOID; typedef uint64_t UINT64; typedef int32_t INT32; typedef unsigned char UCHAR;
The after clicking Next twice, the labview crashed. I tried this on both 32 and 64 bit versions and they both crashed. I have attached the report here. Note that I'm using a trial license so I dont know if that could be the cause. Please let me know if I can try something else and thanks again for helping!
06-06-2017 10:23 AM
06-06-2017 12:41 PM
Your files worked great, it didnt crash my Labview and I was able to get the dll imported. Thanks a lot!