LibUsbDotNet 2.2.8
OpenUsbDevice Method (devInterfaceGuid, usbDevice)
Library ReferenceLibUsbDotNetUsbDeviceOpenUsbDevice(Guid%, UsbDevice%)
LibUsbDotNet on SourceForge
Opens a WinUsb device by its DeviceInterfaceGUID.
Declaration Syntax
C#Visual BasicVisual C++
public static bool OpenUsbDevice(
	ref Guid devInterfaceGuid,
	out UsbDevice usbDevice
)
Public Shared Function OpenUsbDevice ( _
	ByRef devInterfaceGuid As Guid, _
	<OutAttribute> ByRef usbDevice As UsbDevice _
) As Boolean
public:
static bool OpenUsbDevice(
	Guid% devInterfaceGuid, 
	[OutAttribute] UsbDevice^% usbDevice
)
Parameters
devInterfaceGuid (Guid%)
Device Interface GUID of the usb device to open.
usbDevice (UsbDevice%)
On success, a new UsbDevice instance.
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}"

Assembly: LibUsbDotNet (Module: LibUsbDotNet) Version: 2.2.8.104 (2.2.8.104)