mirror of https://github.com/duggerd/KFDtool.git
51 lines
1.0 KiB
C#
51 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HidLibrary
|
|
{
|
|
public class HidDeviceAttributes
|
|
{
|
|
public int VendorId
|
|
{
|
|
get;
|
|
private set;
|
|
}
|
|
|
|
public int ProductId
|
|
{
|
|
get;
|
|
private set;
|
|
}
|
|
|
|
public int Version
|
|
{
|
|
get;
|
|
private set;
|
|
}
|
|
|
|
public string VendorHexId
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
public string ProductHexId
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
internal HidDeviceAttributes(NativeMethods.HIDD_ATTRIBUTES attributes)
|
|
{
|
|
VendorId = attributes.VendorID;
|
|
ProductId = attributes.ProductID;
|
|
Version = attributes.VersionNumber;
|
|
VendorHexId = "0x" + attributes.VendorID.ToString("X4");
|
|
ProductHexId = "0x" + attributes.ProductID.ToString("X4");
|
|
}
|
|
}
|
|
}
|