LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BPI Watchdog dll import

Solved!
Go to solution

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.

0 Kudos
Message 1 of 5
(3,611 Views)

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.


GCentral
0 Kudos
Message 2 of 5
(3,579 Views)

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!

 

 

 

 

 

 

0 Kudos
Message 3 of 5
(3,552 Views)
Solution
Accepted by topic author MaxXx

I'm pretty sure the dll is only going to work for you in 32 bit LabVIEW. I'm not sure why it crashed - it worked for me in 2016 32-bit. I'll upload a copy of the stdint.h I used along with the modified WDog_Univrsl.h in case that was the problem but I'm doubtful. 


GCentral
Download All
0 Kudos
Message 4 of 5
(3,539 Views)

Your files worked great, it didnt crash my Labview and I was able to get the dll imported. Thanks a lot!

0 Kudos
Message 5 of 5
(3,533 Views)