LibUsbDotNet 2.2.8
OpenUsbDevice Method (devInterfaceGuid, usbDevice)
Library Reference ► LibUsbDotNet ► UsbDevice ► OpenUsbDevice(Guid%, UsbDevice%)
|
Opens a WinUsb device by its DeviceInterfaceGUID.
Declaration Syntax
C# | Visual Basic | Visual C++ |
Public Shared Function OpenUsbDevice ( _ ByRef devInterfaceGuid As Guid, _ <OutAttribute> ByRef usbDevice As UsbDevice _ ) As Boolean
public: static bool OpenUsbDevice( Guid% devInterfaceGuid, [OutAttribute] UsbDevice^% usbDevice )
Return Value
True on success.
Remarks
This is the Microsoft-recommended way for opening a WinUsb device.
LibUsb device can be opened in this way as well. In order to open
LibUsb devices in this manner, an entry must be added to the driver
inf file:
[Install.HW]
Addreg=Add_LibUsb_Guid_Reg
[Add_LibUsb_Guid_Reg]
HKR,,LibUsbInterfaceGUIDs,0x10000,"{Your-Unique-Guid-String}"