LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cluster array to c structure in DLL

Hello,

I have a problem which I am stuck at so I would really appreciate any help.

I have this function that i need to access in Labview.

ViStatus _VI_FUNC Ki_GetSystemInfo (ViSession instrumentHandle,
void *systemInfo);

Now the structure for systeminfo is as follows:

typedef struct _SYSTEM_INFO
{
char pchModelNum[MODEL_NUM_LEN];
char pchSerialNum[SERIAL_NUM_LEN];
char pchSysSoftwareVer[SOFTVER_LEN];
char pchPlatformVer[PLATVER_LEN];
char pchOpSystemVer[SYSTVER_LEN];
int bCardType[MAX_SLOTS]; // Enum slot_types
} systeminfo;

When i use the call Library Node function to access the above function what
should be mine
input and out paramteres. I tries making cluster of 5 st
rings and an array
of integers
It doesnt seem to work. Any help shall be appreciated.

Premal
0 Kudos
Message 1 of 3
(2,574 Views)
Hi Premal,
Try to use arrays of [U8] instead of strings. Also, pay attention to INT - is OS dependent (assuming that you are using win9x/NT/2000, use [I32]). If you try with strings, be sure that the input string contains enough characters to store the result.

Hope this helps
p.s.: take a look on those articles mentioned in "cluster array to c structure in DLL" [http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=506500000005000000C05C0000&HTHREAD=000023744&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0]
0 Kudos
Message 2 of 3
(2,573 Views)
hi premal,
I have posted a comment to your question. Please check your email for the relevant link, as I can't seem to find it again. It is a comment to my orignal question.

Regards,
Setu.
0 Kudos
Message 3 of 3
(2,573 Views)