示例#1
0
 /// <summary>
 /// Write an output report to the device.
 /// </summary>
 /// <param name="oOutRep">Output report to write</param>
 protected void Write(OutputReport oOutRep)
 {
     try
     {
         m_oFile.Write(oOutRep.Buffer, 0, oOutRep.BufferLength);
     }
     catch (IOException ex)
     {
         //Console.WriteLine(ex.ToString());
         // The device was removed!
         throw new HidDeviceException("Probbaly the device was removed");
     }
     catch (Exception exx)
     {
         Console.WriteLine(exx.ToString());
     }
 }
示例#2
0
 /// <summary>
 /// Write an output report to the device.
 /// </summary>
 /// <param name="oOutRep">Output report to write</param>
 protected void Write(OutputReport oOutRep)
 {
     try
     {
         m_oFile.Write(oOutRep.Buffer, 0, oOutRep.BufferLength);
     }
     catch (IOException ex)
     {
         //Console.WriteLine(ex.ToString());
         // The device was removed!
         throw new HidDeviceException("Probbaly the device was removed");
     }
     catch(Exception exx)
     {
         Console.WriteLine(exx.ToString());
     }
 }