LibUsbDotNet 2.2.8
AttachKernelDriver Method (deviceHandle, interfaceNumber)
Library Reference ► MonoLibUsb ► MonoUsbApi ► AttachKernelDriver(MonoUsbDeviceHandle, Int32)
|
Re-attach an interface's kernel driver, which was previously detached using DetachKernelDriver(MonoUsbDeviceHandle, Int32).
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static int AttachKernelDriver( MonoUsbDeviceHandle deviceHandle, int interfaceNumber )
Public Shared Function AttachKernelDriver ( _ deviceHandle As MonoUsbDeviceHandle, _ interfaceNumber As Integer _ ) As Integer
public: static int AttachKernelDriver( [InAttribute] MonoUsbDeviceHandle^ deviceHandle, int interfaceNumber )
Parameters
- deviceHandle (MonoUsbDeviceHandle)
- A device handle.
- interfaceNumber (Int32)
- The interface to attach the driver from.
Return Value
- 0 on success.
- ErrorNotFound if no kernel driver was active.
- ErrorInvalidParam if the interface does not exist.
- ErrorNoDevice if the device has been disconnected.
- ErrorBusy if the driver cannot be attached because the interface is claimed by a program or driver.
- Another MonoUsbError code on other failure.
Remarks
Note:
Member documentation was originally generated using the Libusb-1.0 API documentation:
Device handling and enumeration