this is all that is needed to call the device (C#):
Code:
public static class FusionUSB
{
[System.Runtime.InteropServices.DllImport("FusionUSB.dll")]
public static extern bool FUSB_Initialize(ref UInt32 pFusionUSB, String deviceID, UInt32 instanceNumber);
[System.Runtime.InteropServices.DllImport("FusionUSB.dll")]
public static extern bool FUSB_Receive(UInt32 pFusionUSB, byte[] buffer);
[System.Runtime.InteropServices.DllImport("FusionUSB.dll")]
public static extern bool FUSB_Send(UInt32 pFusionUSB, byte[] buffer);
[System.Runtime.InteropServices.DllImport("FusionUSB.dll")]
public static extern UInt32 FUSB_Free(ref UInt32 pFusionUSB);
[System.Runtime.InteropServices.DllImport("FusionUSB.dll")]
public static extern bool FUSB_printf(UInt32 pFusionUSB);
[System.Runtime.InteropServices.DllImport("FusionUSB.dll")]
public static extern UInt32 FUSB_GetWinUSBerror(UInt32 pFusionUSB);
[System.Runtime.InteropServices.DllImport("FusionUSB.dll")]
public static extern UInt32 FUSB_GetFUSBstatus(UInt32 pFusionUSB);
[System.Runtime.InteropServices.DllImport("FusionUSB.dll")]
public static extern String FUSB_GetDeviceInstanceID(UInt32 pFusionUSB);
}
The easiest way is to initialize first by passing in the device ID and getting a pointer. Then just use send (byte[64]) and then receive which returns a byte[64]. When you are done call Free with passing in the pointer.
Bookmarks