Configuration Property
The Configuration property gets the number of the device's currently selected configuration.
This property is read-only.
Syntax
HRESULT get_Configuration(
[out, retval] BYTE *pbConfig
);
Property Value
Caller-allocated space to hold the current configuration number.
Error Codes
Configuration returns S_OK if the operation succeeds or E_POINTER if the pbConfig parameter is not a valid pointer.
Remarks
The number that the Configuration property retrieves is the same number that the ISoftUSBConfiguration::ConfigurationValue property returns. You can use this property to determine the response data that is returned from a GET_CONFIGURATION request that is sent to the device, as described in section 9.4.2 of the USB 2.0 specification.
The following C++ code example how to set and get the Configuration property.
HRESULT GetCurrentConfig(BYTE *pbCurrentConfiguration)
{
HRESULT hr = OK:
if (NULL == pbCurrentConfiguration)
{
hr = E_POINTER;
goto Exit;
}
// Get the number of the configuration.
hr = m_piDevice->get_Configuration (pbCurrentConfiguation);
Exit:
return hr;
}
Requirements
Header |
SoftUSBif.h |
See Also
ISoftUSBConfiguration::ConfigurationValue
Send comments about this topic to Microsoft
Build date: 9/21/2010