HidLibrary.NativeMethods.HidD_SetOutputReport C# (CSharp) Method

HidD_SetOutputReport() private method

private HidD_SetOutputReport ( IntPtr hidDeviceObject, byte lpReportBuffer, int reportBufferLength ) : bool
hidDeviceObject System.IntPtr
lpReportBuffer byte
reportBufferLength int
return bool
        internal static extern bool HidD_SetOutputReport(IntPtr hidDeviceObject, byte[] lpReportBuffer, int reportBufferLength);

Same methods

NativeMethods::HidD_SetOutputReport ( SafeFileHandle hidDeviceObject, byte lpReportBuffer, int reportBufferLength ) : bool

Usage Example

Example #1
0
 /// <summary>
 /// Handle data transfers on the control channel.  This method places data on the control channel for devices
 /// that do not support the interupt transfers
 /// </summary>
 /// <param name="report">The outbound HID report</param>
 /// <returns>The result of the tranfer request: true if successful otherwise false</returns>
 ///
 public bool WriteReportSync(HidReport report)
 {
     if (null != report)
     {
         byte[] buffer = report.GetBytes();
         return(NativeMethods.HidD_SetOutputReport(WriteHandle, buffer, buffer.Length));
     }
     else
     {
         throw new ArgumentException("The output report is null, it must be allocated before you call this method", "report");
     }
 }
All Usage Examples Of HidLibrary.NativeMethods::HidD_SetOutputReport