|C#||Visual Basic||Visual C++|
Public Shared Function GetConfiguration ( _ deviceHandle As MonoUsbDeviceHandle, _ ByRef configuration As Integer _ ) As Integer
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.