[DllImport("quickusb.dll", CharSet = CharSet.Ansi)]
static extern int QuickUsbReadData(IntPtr Handle, byte[] outData, out int length);
None.
The functions in the QuickUsb library are really weird, or maybe I'm just not understanding something. But I don't understand how outData isn't out. Unless classes are refrence types and they are. I just don't understand, but this code works anyways...
Please add some!
//data is a instianciated byte array of 512 length
public bool Read(out byte[] data, int length)
{
//Placeholder array
byte[] readData = new byte[length];
int len = readData.Length; //Should be 512
int result = QuickUsbReadData(handle, readData, out len);
if (result == 0) //0 Means error
{
return false;
}
data = readData;
return true;
}