LibUsbDotNet 2.2.8
OpenDeviceWithVidPid Method (sessionHandle, vendorID, productID)
Library Reference ► MonoLibUsb ► MonoUsbApi ► OpenDeviceWithVidPid(MonoUsbSessionHandle, Int16, Int16)
|
![]() |
Convenience function for finding a device with a particular idVendor/idProduct combination.

C# | Visual Basic | Visual C++ |
public static MonoUsbDeviceHandle OpenDeviceWithVidPid( MonoUsbSessionHandle sessionHandle, short vendorID, short productID )
Public Shared Function OpenDeviceWithVidPid ( _ sessionHandle As MonoUsbSessionHandle, _ vendorID As Short, _ productID As Short _ ) As MonoUsbDeviceHandle
public: static MonoUsbDeviceHandle^ OpenDeviceWithVidPid( [InAttribute] MonoUsbSessionHandle^ sessionHandle, short vendorID, short productID )

- sessionHandle (MonoUsbSessionHandle)
- A valid MonoUsbSessionHandle.
- vendorID (Int16)
- The idVendor value to search for.
- productID (Int16)
- The idProduct value to search for.

Null if the device was not opened or not found, otherwise an opened device handle.

