Using HWC_FetchSampleErrors with c#

I use a c# wrapper to call the methods of niHSDIO.dll.  I have problems with the method HWC_FetchSampleErrors, in particular the Reserved1 and Reserved2 parameters.

Here is my solution.  You must change the Reserved1 and Reserved2 type uint [] instead of uint.  Then, you can pass null.

Declare 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, Number_Of_Samples_Error_Read, Error_Sample_Numbers, Error_Bits, Error_Repeat_Counts, Reserved_1 and Reserved_2);
PInvoke.TestForError (._handle, pInvokeResult);
Return pInvokeResult;
}

Tags: NI Hardware

Similar Questions

Maybe you are looking for

  • Transfer data to the new phone

    I upgraded my Iphone 5 to the SE.  AT & T helped me transfer my photos and contacts.  I saved my 5S for my laptop, but do not know how to transfer the data from this backup on my new phone.

  • Satellite P300D-h-13 restarts after I click on shut down

    Brand new Toshiba P300D-h-13 with preinstalled Vista 32bits.When I click on the start menu--> Shut down, computer laptop restarts and after the reboot, when I click again on farm, laptop off of the beautiful. How can I solve this problem? BIOS upgrad

  • Lost all messages in my Inbox

    After installing the update OS X El Capitan mail in my Inbox disappeared. Is it possible to recover the lost mail?

  • I have the Pixma 8720. Can I still print grayscale photos.

    When one of the cartridges 3 color runs out of ink, I'll still be able to print text/pictures without having to replace the empty cartridge?

  • Unable to connect to on the XP computer administrator accounts

    Both my administrator account and the hidden admin account have been password protected. How can I get around this? Please? Windows XP Professional SP3I am not able to burn all the programs to use. My teacher said that I can use these forums to get a