From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing file system HANDLE parameters to and from LabVIEW

Hi All,

I am developing a WIN32 DLL (written in C) that talks to custom
hardware via a COM port. I have a test wrapper written in C working
with the DLL just fine, next job is to create a LabVIEW (7.1 and 8.5)
demo application.

As part of the comms, I need to pass a pointer to a HANDLE into my
init routine (within the DLL), so that the DLL can return a parameter
that I can pass to successive DLL function calls. Again, this all
works fine in a C (actually VC6) environment.

Can anyone point me to the NI white paper that covers passing HANDLEs
to and from LabVIEW apps. I assume that I have to cast everything to
either a VOID* or U32 so that LV can fetch and pass back parameters to
the DLL.

Also, a tutorial of just what the precise implementation of a WIN32
HANDLE is. I have seen rather wishy washy descriptions, but nothing
concrete.

Many thanks,

Mark

0 Kudos
Message 1 of 2
(2,082 Views)
Hi Mark,
normally handles are I32 values, so you have no problem to pass them to LabView. Here is also a link which maybe helps.

Mike
0 Kudos
Message 2 of 2
(2,071 Views)