LibUsbDotNet 2.2.8
ReleaseInterface Method (deviceHandle, interfaceNumber)
Library Reference ► MonoLibUsb ► MonoUsbApi ► ReleaseInterface(MonoUsbDeviceHandle, Int32)
|
Release an interface previously claimed with ClaimInterface(MonoUsbDeviceHandle, Int32).
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static int ReleaseInterface( MonoUsbDeviceHandle deviceHandle, int interfaceNumber )
Public Shared Function ReleaseInterface ( _ deviceHandle As MonoUsbDeviceHandle, _ interfaceNumber As Integer _ ) As Integer
public: static int ReleaseInterface( [InAttribute] MonoUsbDeviceHandle^ deviceHandle, int interfaceNumber )
Parameters
- deviceHandle (MonoUsbDeviceHandle)
- A device handle.
- interfaceNumber (Int32)
- the bInterfaceNumber of the interface you wish to claim.
Return Value
- 0 on success
- ErrorNotFound if the interface was not claimed
- ErrorNoDevice if the device has been disconnected
- another MonoUsbError code on other failure
Remarks
You should release all claimed interfaces before closing a device handle.
This is a blocking function. A SET_INTERFACE control request will be sent to the device, resetting interface state to the first alternate setting.
Note:
Member documentation was originally generated using the Libusb-1.0 API documentation:
Device handling and enumeration