public void Open(string strPortName) { m_intPtrUSB = FIO.CreateFile(strPortName, 0, 3, IntPtr.Zero, 3, 0, IntPtr.Zero); if (-1 == m_intPtrUSB.ToInt32()) { throw new Exception(CMessages.GetLastWin32ErrorToString()); } HID.HidD_SetNumInputBuffers(m_intPtrUSB, 0x40); }