LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

C++ DLL in LabVIEW

I have a DLL function call whose definition is
void * OpenComm(Char* device, char autodet, struct settings* setgs);
 
struct defn is:
 
struct settings
{
long baud;
char protocol;
}
 
how can i configure my Call Library function node for this?
i have used this before, but i have not interfaces with void* and structs!
0 Kudos
Message 1 of 2
(2,659 Views)

Hi rkpat,

There's probably another way, but I pass cluster-information as an array (see attached.)

Baud may need the byte-order switched - if your DLL wants it in Big-endian format.

The Device (char *) input can probably be re-defined as a C-string - then the explicit zero-termination won't be necessary (LabVIEW will take care of it).

As you know, CLF calls can be tricky, hopefully this is at least close to what you'll need. Smiley Wink

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 2 of 2
(2,636 Views)