Click or drag to resize

UsbDeviceOpen Method

Open the USB device for I/O.

Namespace:  WinUsbNet
Assembly:  WinUsbNet (in WinUsbNet.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public void Open()
Exceptions
ExceptionCondition
IOExceptionThe IsAttached property is false.
Win32ExceptionAn error was reported by the operating system.
Remarks

If the open method succeeds, it will create the PipeStreams collection and populate it with PipeStream objects corresponding to the endpoints on the USB device. The initial value of the ReadTimeout property of each PipeStream will be set to DefaultReadTimeout.

If the open fails, an exception will be thrown.

USB devices are opened exclusively. That is, once a USB device has been opened and not yet closed, any additional attempt to open it (whether in the same or a different application) will fail with the Win32ExceptionAccess is denied, NativeErrorCode value 0x00000005.

See Also