LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calling a dll that returns a handle

I am using the LV Call Library Function to call a reflective memory
board interface dll on a Windows 2000 system. The first call is to OPEN
with an argument of a pointer to a string containing the name of the
device. This opens the driver and returns a handle that is used in the
calls to all the other calls. Unfortunately, the return value in the
Call Library Function can't be set to handle.

If I set the return value to U32 (unsigned 32 bit int) it seems to work
since it returns the same value each time and it returns 0 (the error
value) if I give it the wrong device name. The problem is that when I
try to cast the returned value as a handle, all the other calls return 0
or error.

The board came with a command line in
terface program that allows me to
exercise the board so I know that everything is working except my
interface to the dll.

Ed Bogart
0 Kudos
Message 1 of 2
(2,542 Views)
How are you "casting" this U32 value to dll handle?
Which are the settings in configuration of dll call dialog like "calling conventions" and how the called dll function prototype looks like?
Is your dll thread-safe?
How you calling the second call library functio node? (may be sample diagram or picture)
Sergey
0 Kudos
Message 2 of 2
(2,542 Views)