08-07-2003 04:02 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
08-07-2003 09:27 PM
08-07-2003 09:36 PM
08-08-2003 08:14 AM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
08-08-2003 08:19 AM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
08-08-2003 08:42 AM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
08-08-2003 09:30 AM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
08-08-2003 11:04 AM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
11-03-2010 11:07 AM
Hi, Steve
I have a similar issue as you had. can you show me your solution in VI?
let me explain what I have:
I have a 3rd party library functions in dll ( from Finger Lakes Instrumentation) which I like to call in Labview.
one of the functions looks like:
long FLIList (long domain, char*** names)
This function returns a pointer to a NULL terminated list of available device names. The pointer should be freed later with FLIFreeList(). Each device name
in the returned list includes the filename needed by FLIOpen()
Return Value: Zero on success.
Non-zero on failure.
Parameters:
domain: a bitwiseORed combination of interface method and device type.
names: Pointer to where the device name list will be placed.
I read the article on http://decibel.ni.com/content/docs/DOC-9079
"Calling C/C++ DLLs Containing Simple and Complex Datatypes from LabVIEW"
and added a function in PassingDataSampleDLL.c as
void ReturningValuesByReference_2DArrayOfStrings (int rows, int strLength, char ***newArray)
{
int i, j;
char *array;
char strArray[10][10]={"this","is","my","test", "OK",
"lets","see","if","it", "works" };
array =malloc (sizeof( char) * rows* strLength);
for (i=0; i<rows; i++)
{
strcpy((array + i*cols), strArray[i]);
}
*newArray=array;
}
I am then able to read back the array of strings, see attached VIs. But I have to give strLength and rows in order to do that correctly.
The 3rd party function FLIList() has no dimension information about the device name list. How can I read back? any suggestion?
Cheers
Xiaofeng