class SiUSBXp
{
[DllImport("SiUSBXp.dll", CharSet = CharSet.Ansi)]
public static extern int SI_GetNumDevices(ref IntPtr NumDevice);
[DllImport("SiUSBXp.dll", CharSet = CharSet.Ansi)]
public static extern int SI_GetProductString(int DeviceNum,
StringBuilder DeviceString,
int Options);
[DllImport("SiUSBXp.dll", CharSet = CharSet.Ansi)]
public static extern int SI_Open(int DeviceNum, ref IntPtr Handle);
[DllImport("SiUSBXp.dll", CharSet = CharSet.Ansi)]
public static extern int SI_Close(IntPtr Handle);
[DllImport("SiUSBXp.dll", CharSet = CharSet.Ansi)]
public static extern int SI_Read(IntPtr Handle,
StringBuilder buffer,
int NumBytesToRead,
ref IntPtr NumBytesReturned,
int overlaped);
[DllImport("SiUSBXp.dll", CharSet = CharSet.Ansi)]
public static extern int SI_SetTimeouts(int ReadTimeout, int WriteTimeout);
[DllImport("SiUSBXp.dll", CharSet = CharSet.Ansi)]
public static extern int SI_FlushBuffers(IntPtr Handle, byte valR, byte valT);
}
|