HidLibrary.NativeMethods.HidD_GetAttributes C# (CSharp) Method

HidD_GetAttributes() private method

private HidD_GetAttributes ( IntPtr hidDeviceObject, HIDD_ATTRIBUTES &attributes ) : bool
hidDeviceObject System.IntPtr
attributes HIDD_ATTRIBUTES
return bool
        internal static extern bool HidD_GetAttributes(IntPtr hidDeviceObject, ref HIDD_ATTRIBUTES attributes);

Usage Example

Example #1
0
        private static HidDeviceAttributes GetDeviceAttributes(IntPtr hidHandle)
        {
            var deviceAttributes = default(NativeMethods.HIDD_ATTRIBUTES);

            deviceAttributes.Size = Marshal.SizeOf(deviceAttributes);
            NativeMethods.HidD_GetAttributes(hidHandle, ref deviceAttributes);
            return(new HidDeviceAttributes(deviceAttributes));
        }