HidD_SetOutputReport() приватный Метод

private HidD_SetOutputReport ( IntPtr HidDeviceObject, byte lpReportBuffer, uint ReportBufferLength ) : bool
HidDeviceObject System.IntPtr
lpReportBuffer byte
ReportBufferLength uint
Результат bool
Пример #1
0
        /// <summary>
        /// Write a report to the Wiimote
        /// </summary>
        private void WriteReport()
        {
            if (mAltWriteMethod)
            {
                HIDImports.HidD_SetOutputReport(this.mHandle.DangerousGetHandle(), mBuff, (uint)mBuff.Length);
            }
            else
            {
                mStream.Write(mBuff, 0, REPORT_LENGTH);
            }

            Thread.Sleep(100);
        }
Пример #2
0
 /// <summary>
 /// Write a report to the Wiimote
 /// </summary>
 private void WriteReport()
 {
     try
     {
         if (mAltWriteMethod)
         {
             HIDImports.HidD_SetOutputReport(this.mHandle.DangerousGetHandle(), mBuff, (uint)mBuff.Length);
         }
         else if (mStream != null)
         {
             mStream.Write(mBuff, 0, REPORT_LENGTH);
         }
     }
     catch (Exception ex)
     {
     }
     finally
     {
         Thread.Sleep(100);
     }
 }