예제 #1
0
 public static Attributes? Get(IntPtr handle)
 {
     var deviceAttributes = new Attributes();
     deviceAttributes.Size = Marshal.SizeOf(deviceAttributes);
     if (HidD_GetAttributes(handle, ref deviceAttributes))
         return deviceAttributes;
     else
         return null;
 }
예제 #2
0
        internal HidDeviceAttributes(Attributes attributes)
        {
            VendorId = attributes.VendorID;
            ProductId = attributes.ProductID;
            Version = attributes.VersionNumber;

            VendorHexId = "0x" + attributes.VendorID.ToString("X4");
            ProductHexId = "0x" + attributes.ProductID.ToString("X4");
        }
예제 #3
0
 static internal extern bool HidD_GetAttributes(IntPtr hidDeviceObject, ref Attributes attributes);