Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I integrate a ViChar _VI_FAR result[ ] in C#

I'm trying to use a wrapped VXIPnP Driver in C# .

 

I need to import the functions of these win32 dll in C#.net, so I call all the methodes with PInvoke.

These calls works for all Methods, except these Methods which returning a Pointer to a Array like(ViChar _VI_FAR result[ ]);

How can I handle these Types in C#;

 

 

int pInvokeResult = PInvoke.CmdString_Q(this._handle, cmd_string,ref size,out  result);

 

[DllImport("device_32.dll", EntryPoint = "device_cmdString_Q", CallingConvention = CallingConvention.StdCall)]

public static extern int CmdString_Q(System.Runtime.InteropServices.HandleRef vi, String cmd_string, ref Int32 size,  out char[]  result);

 

 

I'm not familiar with these Types.
 
Thanks very much.
 
 
Stefan
0 Kudos
Message 1 of 2
(3,969 Views)

Hi Stefan,

 

do you get a specific error message when handling the array?

Which driver do you use exactly and where did you get it from?

 

Best regards,

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 2 of 2
(3,897 Views)