03-20-2013 04:48 AM
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
03-20-2013 10:45 AM
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.