LibUsbDotNet 2.2.8
GetConfiguration Method (deviceHandle, configuration)
Library ReferenceMonoLibUsbMonoUsbApiGetConfiguration(MonoUsbDeviceHandle, Int32%)
LibUsbDotNet on SourceForge
Determine the bConfigurationValue of the currently active configuration.
Declaration Syntax
C#Visual BasicVisual C++
public static int GetConfiguration(
	MonoUsbDeviceHandle deviceHandle,
	ref int configuration
Public Shared Function GetConfiguration ( _
	deviceHandle As MonoUsbDeviceHandle, _
	ByRef configuration As Integer _
) As Integer
static int GetConfiguration(
	[InAttribute] MonoUsbDeviceHandle^ deviceHandle, 
	int% configuration
deviceHandle (MonoUsbDeviceHandle)
A device handle.
configuration (Int32%)
Output location for the bConfigurationValue of the active configuration. (only valid for return code 0)
Return Value

You could formulate your own control request to obtain this information, but this function has the advantage that it may be able to retrieve the information from operating system caches (no I/O involved).

If the OS does not cache this information, then this function will block while a control transfer is submitted to retrieve the information.

This function will return a value of 0 in the configuration parameter if the device is in unconfigured state.

Note: Member documentation was originally generated using the Libusb-1.0 API documentation: Device handling and enumeration

Assembly: LibUsbDotNet (Module: LibUsbDotNet) Version: (