LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL Importer and array pointers

I have a DLL of a few hundred functions that I need to import.  Many of which use array pointers.

 

Normally, this would be handled by re-configuring the library call in the resulting VI.

 

I couldn't find anywhere in the DLL importer tool to specify array pointer inputs and outputs.  So, am I stuck havinng to go into every generated VI and update/reconfigure?

 

I would be exceptionally cool if this configuration could be automated in some fashion (Scripted or special header definitions that would tell the LabView importer how to handle pointers).  I hate the thought of hand tweaking autogenerated VIs!  Especially hundreds of them.

 

Thanks,

 

XL600

0 Kudos
Message 1 of 3
(2,851 Views)

Hi XL600,

 

Unfortunately the Wizard doesn't have the ability to see the difference between a pointer to a number and a pointer to an array since they are technically both the same thing.  This is outlined here but it looks like you already knew this. 

 

Fortunately there is a way to modify your call library function nodes dynamically! VI scripting is a wonderful thing.  You can dynamically modify (and create) a library function node dynamically by parsing a header file and using VI server tools. Here is a quick snippet I whipped up so that you can see how to modify the inputs and outputs of a prexisting library function node.

Modify Call Library parameters.png

 

Hopefully that's enough to get you started!

Regards,

 

Pat B

Certified LabVIEW Developer | Applications Engineer | National Instruments

ni.com/support

Message 2 of 3
(2,771 Views)

Didn't know that could be done.  I'll give it a try.  Thanks!

 

XL600

0 Kudos
Message 3 of 3
(2,768 Views)