Class Hid
- Namespace
- HidApi
- Assembly
- HidApi.Net.dll
Global methods to interact with HID devices.
public static class Hid
- Inheritance
-
Hid
- Inherited Members
Methods
Enumerate(ushort, ushort)
Enuemrate available HID devices.
public static IEnumerable<DeviceInfo> Enumerate(ushort vendorId = 0, ushort productId = 0)
Parameters
vendorId
ushortVendor id of devices to open or 0 to match any vendor
productId
ushortProduct id of devices to open or 0 to match any product
Returns
- IEnumerable<DeviceInfo>
Enumerable of DeviceInfo
Exit()
Frees all memory of static data.
public static void Exit()
Remarks
Should be called at the end of a programm to avoid memory leaks.
Exceptions
- HidException
Thrown if an error occurs
Init()
Initializes HIDAPI.
public static void Init()
Remarks
The initialization happens automatically and must only be invoked manually if multiple threads try to connect devices at the same time.
Exceptions
- HidException
Thrown if an error occurs
Version()
Returns the HIDAPI version.
public static ref ApiVersion Version()
Returns
- ApiVersion
A reference to ApiVersion containing the information
Remarks
Available since hidapi 0.10.0
VersionString()
Returns the version of HIDAPI.
public static string VersionString()
Returns
- string
A string representing the version number
Remarks
Available since hidapi 0.10.0