Trying to get C# call using VS2017 to work, I have gotten loopback to work, but USB2GetBenchmarkResults gives me a write access error. Below is code. Any help would be very appreciated.
Code:
[DllImport("USB2DLL.dll",EntryPoint = "USB2GetBenchmarkResults", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.I1)] static extern bool USB2GetBenchmarkResults([Out] int iOperations, [Out] int iErrors, [Out] float maxRate, [Out] float maxReadrate, [Out] float maxWriteRate, [Out] float avgRate, [Out] float avgPossible);
Code:
int loopCount = 0; int errorCount = 0; float maxRate = 0f; float maxReadrate = 0f; float maxWriteRate = 0f; float avgRate = 0f; float avgPossible = 0f; USB2GetBenchmarkResults(loopCount, errorCount, maxRate, maxReadrate, maxWriteRate, avgRate, avgPossible);
Comment