LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a LabView struct to a C++ DLL

Hello everyone,

I am new to working with LabView, and have the following question:

suppose I have a struct declared in LabView, is it possible to pass this to
a DLL created in MS Visual C++ 6.0 ??

If so, do I have to declare the same struct in the DLL to use it, or how
would one go about to implement this...???

Any suggestions welcome,

Gunter
0 Kudos
Message 1 of 3
(3,074 Views)
Hi,

Try this link.. there should be an example here that will help.

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5065000000080000006E600000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 3
(3,074 Views)
GV,

Is the DLL created yet? If it is, then find out if the DLL is packed at 8 bytes (the default) or one byte (what LabVIEW does when passing structures). If the DLL is packed at 8 bytes, then you can add dummy numeric values to your cluster in LabVIEW to fill up the space.

If the DLL is not created yet, then see the following:
http://zone.ni.com/devzone/conceptd.nsf/2d17d611efb58b22862567a9006ffe76/7d6a20fe02edbf318625690700704cf3?OpenDocument
http://zone.ni.com/devzone/explprog.nsf/webmain/9E21592A5F39238C862569880064D694?OpenDocument
http://pong.ni.com/public.nsf/websearch/A6705FEC7EA42300862567B70054206E?OpenDocument

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 3 of 3
(3,074 Views)