Ejemplo n.º 1
0
 public static extern HidpStatus GetUsages(
     Int32 ReportType,
     short UsagePage,
     ushort LinkCollection,
     [In, Out] short[] UsageList,
     ref int UsageLength,
     SafePreparsedDataHandle PreparsedData,
     byte[] Report,
     int ReportLength
     );
Ejemplo n.º 2
0
        /// <summary>
        /// Retrieves the capabilities of a specified HID device.
        /// </summary>
        /// <param name="preparsedData">
        /// The preparsed data associated with the HID device.
        /// </param>
        /// <returns>
        /// The capabilities of the HID device.
        /// </returns>
        /// <exception cref="Win32Exception">
        /// The specified preparsed data is invalid.
        /// </exception>
        public static HidCaps GetCaps(SafePreparsedDataHandle preparsedData)
        {
            HidpStatus status = GetCaps(preparsedData, out HidCaps result);

            if (status != HidpStatus.HIDP_STATUS_SUCCESS)
            {
                throw new Win32Exception("The specified preparsed data is invalid");
            }

            return(result);
        }
Ejemplo n.º 3
0
 public static extern HidpStatus GetCaps(SafePreparsedDataHandle preparsedData, out HidCaps capacities);
Ejemplo n.º 4
0
 public static extern bool GetPreparsedData(SafeFileHandle device, out SafePreparsedDataHandle preparsedData);
Ejemplo n.º 5
0
 public static extern HidpStatus GetButtonCaps(Int32 ReportType, [In, Out] HidButtonCaps[] hidButtonCaps, ref short ButtonCapsLength, SafePreparsedDataHandle PreparsedData);
Ejemplo n.º 6
0
 public static extern HidpStatus HidP_GetData(Int32 ReportType, [In, Out] HIDP_DATA[] DataList,
                                              ref int DataLength, SafePreparsedDataHandle PreparsedData, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 5)] byte[] Report,
                                              int ReportLength);
Ejemplo n.º 7
0
 public static extern HidpStatus InitializeReportForID(
     Int32 ReportType,
     byte ReportID,
     SafePreparsedDataHandle PreparsedData,
     [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)] byte[] Report,
     int ReportLength);
Ejemplo n.º 8
0
 public static extern Int32 MaxDataListLength(Int32 ReportType, SafePreparsedDataHandle PreparsedData);