HidP_GetCaps() private méthode

private HidP_GetCaps ( IntPtr preparsedData, HIDP_CAPS &capabilities ) : int
preparsedData System.IntPtr
capabilities HIDP_CAPS
Résultat int
Exemple #1
0
        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));
        }