Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using HidSharp;
- using System.Collections.Generic;
- using System;
- namespace device_test
- {
- class Program
- {
- static void Main(string[] args)
- {
- IEnumerable<HidDevice> Devices = DeviceList.Local.GetHidDevices();
- foreach (HidDevice device in Devices)
- {
- Console.WriteLine(device.ToString());
- Console.WriteLine(device.GetFileSystemName());
- HidStream stream;
- Console.WriteLine(Convert.ToString(device.TryOpen(out stream)));
- Console.WriteLine(Convert.ToString(device.GetMaxInputReportLength()));
- //byte[] raws = device.GetRawReportDescriptor();
- //foreach (byte raw in raws)
- //{
- // Console.WriteLine(" {0,-8} --> 0x{1}",
- // raw, Convert.ToString(raw, 2));
- //}
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement