LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Array of Srings between Visual Basic and Labview dll

I have searched and searched for the correct way to pass an array of strings between Visual Basic 6.0 and a Labview 7 dll. So far, I still do not know how to pass the array. When I create the dll in LV, the array of strings is presented as a string, not an array. I am familiar with passing arrays of type double, but I really need to know how to pass an array of strings. Any and all help is appreciated.

Bob

0 Kudos
Message 1 of 2
(2,758 Views)

Hey Bob,

From what I understand, that can get kind of messy. You have to allocate the memory in VB in the format that LabVIEW expects (see the externalcode.h file in National Instruments\LabVIEW 7.0\cintools for details). Then pass a pointer to that location to LabVIEW. There are a couple of related examples online. They don't necessarily show how to pass an array of strings to VB, but they should show how to pass a string and an array. I hope this helps.

Using Microsoft Visual Basic to Call LabVIEW DLLs That Pass String Data Types
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B123AE0CB9B0111EE034080020E74861&p_...

Using Microsoft Visual Basic to Call LabVIEW DLLs That Pass Array Data Pointers
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3D9E556A4E034080020E74861&p_...

Regards,
Chris J

0 Kudos
Message 2 of 2
(2,713 Views)