NumConfigurations Property
The NumConfigurations property gets the value of the bNumConfigurations field of the device descriptor, as defined in section 9.6.1 of the USB 2.0 specification.
This property is read-only.
Syntax
HRESULT get_NumConfigurations(
[out, retval] BYTE *pbNumConfigs
);
Property Value
Caller-allocated space to hold the returned number of configurations.
Error Codes
NumConfigurations returns S_OK if the operation succeeds or E_POINTER if the pbNumConfigs parameter is not a valid pointer.
Remarks
The value for the bNumConfigurations field is taken from the Count property of the ISoftUSBConfigurations interface that the ISoftUSBDevice::Configurations specifies.
The following C++ code example shows how to get the NumConfigurations property.
HRESULT CLoopBackDevice::GetNumerConfigurations(BYTE *pbNumConfigs)
{
HRESULT hr = OK:
if (NULL == m_piDevice)
{
hr = E_UNEXPECTED;
goto Exit;
}
if (NULL == pbNumConfigs)
{
hr = E_POINTER;
goto Exit;
}
// Initialize the return parameter
*pbNumConfigs = 0;
// Get the number of configurations
hr = m_piDevice->get_NumConfigurations (pbNumConfigs);
Exit:
return hr;
}
Requirements
Header |
SoftUSBif.h |
See Also
ISoftUSBDevice::Configurations
Send comments about this topic to Microsoft
Build date: 9/21/2010