LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Nugget: How to create interface to DLL easily

Colleagues,
Here is a very small tip, which is useful for me.
I using my own DLLs in my code pretty often (because in some cases its more convinient to develop some parts of the code in C instead of LabVIEW). So, sometimes compilcated structures should be passed into DLL and back. I manipulating with sctructures directly in DLL (resize arrays, strings, etc), and every time need to develop interface, which can be complicated. Easiest way to get all necessary typedefs is following:
- create interface cluster which should be passed into DLL (don't forget to add names)
- place CIN on the block diagram
- connect your data to CIN
- right click and choose: "Create *.c file...":
 
then you will get the file like this:
 
now just copy these strings, paste into your DLL source, and you have all what you need:
 
Maybe this tip will be useful for someone else...
 
best regards,
Andrey.
Message 1 of 2
(4,648 Views)
Wow that is a useful tip.Thanx
Message 2 of 2
(4,543 Views)