From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-18-2011 01:26 PM
I am using a C# wrapper to call the methods from niHSDIO.dll. I am having trouble with the HWC_FetchSampleErrors method, in particular the Reserved1 and Reserved2 parameters.
Solved! Go to Solution.
03-18-2011 05:31 PM
Hey syndiant,
What other kinds of workarounds have you tried? And when you say it does not work, does that mean that the code is not building for you? One thing you can try is to pass 0 into those parameters in the function call in your code, without making any changes to the wrapper, for example ....., 0, 0). If this doesn't work, there might be some other things we can do. Let me know how the 0 value works for you. Thanks, and have a great weekend.
Regards,
DJ L.
03-15-2013 09:49 AM - edited 03-15-2013 09:50 AM
Here is my solution. You have to change the Reserved1 and Reserved2 parameters to type uint[] instead of uint. Then you can pass null.
Declare them in your program as such.
uint[] res1 = null;
uint[] res2 = null;
Change the method in the C# wrapper:
public int HWC_FetchSampleErrors(int Sample_Errors_to_Read, int Max_Time_Milliseconds, out int Number_Of_Samples_Error_Read, double[] Error_Sample_Numbers, uint[] Error_Bits, uint[] Error_Repeat_Counts, uint[] Reserved_1, uint[] Reserved_2)
{
int pInvokeResult = PInvoke.HWC_FetchSampleErrors(this._handle, Sample_Errors_to_Read, Max_Time_Milliseconds, out Number_Of_Samples_Error_Read, Error_Sample_Numbers, Error_Bits, Error_Repeat_Counts, Reserved_1, Reserved_2);
PInvoke.TestForError(this._handle, pInvokeResult);
return pInvokeResult;
}