Count Property
The Count property returns the current count of objects in a collection of SoftUSBConfiguration objects. This property is read-only.
This property is read-only.
Syntax
HRESULT get_Count(
[out, retval] long *plCount
);
Property Value
Caller-allocated space to hold the current value of the Count property.
Error Codes
Count returns an HRESULT value. This property returns S_OK if the count is correctly returned and E_POINTER if the *plCount parameter is not a valid pointer.
Remarks
The following C++ code example shows how to get how many objects are in an ISoftUSBConfigurations collection.
HRESULT CTestDevice::GetConfigurationCount(LONG *plCount)
{
HRESULT hr = S_OK;
ISoftUSBConfigurations *piConfigList = NULL;
`//Initialize the incoming variable
if(NULL != plCount)
{
*plCount = 0;
}
else
{
goto Exit;
}
hr = m_piDevice->get_Configurations(&piConfigList);
if(!FAILED(hr))
{
hr = piConfigList->get_Count(plCount);
}
`
Exit:
if (NULL != piConfigList)
{
piConfigList->Release();
piConfigList = NULL;
}
return hr;
}
Requirements
Header |
SoftUSBif.h |
Send comments about this topic to Microsoft
Build date: 9/21/2010