LibUsbDotNet 2.2.8
DetachKernelDriver Method (deviceHandle, interfaceNumber)
Library Reference ► MonoLibUsb ► MonoUsbApi ► DetachKernelDriver(MonoUsbDeviceHandle, Int32)
|
Detach a kernel driver from an interface.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static int DetachKernelDriver( MonoUsbDeviceHandle deviceHandle, int interfaceNumber )
Public Shared Function DetachKernelDriver ( _ deviceHandle As MonoUsbDeviceHandle, _ interfaceNumber As Integer _ ) As Integer
public: static int DetachKernelDriver( [InAttribute] MonoUsbDeviceHandle^ deviceHandle, int interfaceNumber )
Parameters
- deviceHandle (MonoUsbDeviceHandle)
- A device handle.
- interfaceNumber (Int32)
- The interface to detach 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
- Another MonoUsbError code on other failure.
Remarks
If successful, you will then be able to claim the interface and perform I/O.
Note:
Member documentation was originally generated using the Libusb-1.0 API documentation:
Device handling and enumeration