HidP_GetCaps() private method

private HidP_GetCaps ( IntPtr preparsedData, HIDP_CAPS &capabilities ) : int
preparsedData System.IntPtr
capabilities HIDP_CAPS
return int
コード例 #1
0
ファイル: HidDevice.cs プロジェクト: biletnam/homeControl
        private static HidDeviceCapabilities GetDeviceCapabilities(IntPtr hidHandle)
        {
            var capabilities         = default(NativeMethods.HIDP_CAPS);
            var preparsedDataPointer = default(IntPtr);

            if (NativeMethods.HidD_GetPreparsedData(hidHandle, ref preparsedDataPointer))
            {
                NativeMethods.HidP_GetCaps(preparsedDataPointer, ref capabilities);
                NativeMethods.HidD_FreePreparsedData(preparsedDataPointer);
            }
            return(new HidDeviceCapabilities(capabilities));
        }