LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interface Labview -> DLL with Parameter (char *argv[]) as a 2D string Array

Dear All,

 

I have a DLL compiled by myself with a Parameter char *argv[]

 

_declspec (dllexport) int elog(int argc, char *argv[])

 

this was a comandline program with text Paraneters:

 

elog -v -x -test

 

and itwas working fine

 

Now I do not know how  to pass this command string with labview to the DLL, a normal string is not working.

It seems to be a 2D String to be passed:

 

 if (argv[i][0] == '-' && argv[i][1] == 'v')
         verbose = 1;

 

Thank for help!

 

Best Hepman

 

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

Try the LabVIEW code in the snippet below, taken from: http://lavag.org/topic/14642-passing-array-of-string-to-c-dll/#entry87758

This shows how you can pass an array of LabVIEW strings to a DLL. Note that what you have is an array of strings, not a 2-D array of strings. Your C code treats it as a 2D array of characters, and it works due to the way C dereferences pointers.

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