GetConfiguration Method (deviceHandle, configuration)

LibUsbDotNet

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 Basic Visual C++
public static int GetConfiguration(
	MonoUsbDeviceHandle deviceHandle,
	ref int configuration
)
Public Shared Function GetConfiguration ( _
	deviceHandle As MonoUsbDeviceHandle, _
	ByRef configuration As Integer _
) As Integer
public:
static int GetConfiguration(
	[InAttribute] MonoUsbDeviceHandle^ deviceHandle, 
	int% configuration
)
Parameters
deviceHandle (MonoUsbDeviceHandle)
A device handle.
configuration (Int32%)
Output location for the bConfigurationValue of the active configuration. (only valid for return code 0)
Return Value
Remarks

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: 2.2.8.104 (2.2.8.104)