Ejemplo n.º 1
0
 /// <summary>
 /// Retrieve a top-level collection's HIDP_CAPS structure for this device.
 /// </summary>
 /// <param name="pPreparsedData">Pointer to a top-level collection's preparsed data.</param>
 /// <param name="Caps">Pointer to a caller-allocated buffer that the routine uses to return a collection's HIDP_CAPS structure</param>
 /// <returns>TRUE is success, otherwise FALSE</returns>
 private bool GetCapabilities(IntPtr pPreparsedData, out HidPCaps Caps)
 {
     if (Win32API.HidP_GetCaps(pPreparsedData, out Caps) != NtStatus.Success)
     {
         return(false);
     }
     return(true);
 }
Ejemplo n.º 2
0
        private bool GetOutputValueCapabilities(IntPtr pPreparsedData, HidPCaps Caps, out HidPValueCaps[] pValueCaps)
        {
            ushort capsLength = Caps.NumberOutputValueCaps;

            pValueCaps = new HidPValueCaps[capsLength];
            if (Win32API.HidP_GetValueCaps(HidPReportType.Output, pValueCaps, ref capsLength, pPreparsedData) != NtStatus.Success)
            {
                return(false);
            }
            return(true);
        }