DeviceListGetHidDeviceOrNull Method HIDSharp
Gets the first connected HID device that matches specified criteria.

Namespace: HidSharp
Assembly: HidSharp (in HidSharp.dll) Version: 2.0.0

public HidDevice GetHidDeviceOrNull(
	Nullable<int> vendorID = null,
	Nullable<int> productID = null,
	Nullable<int> releaseNumberBcd = null,
	string serialNumber = null


vendorID (Optional)
Type: SystemNullableInt32
The vendor ID, or null to not filter by vendor ID.
productID (Optional)
Type: SystemNullableInt32
The product ID, or null to not filter by product ID.
releaseNumberBcd (Optional)
Type: SystemNullableInt32
The device release number in binary-coded decimal, or null to not filter by device release number.
serialNumber (Optional)
Type: SystemString
The serial number, or null to not filter by serial number.

Return Value

Type: HidDevice
The device, or null if none was found.
See Also