Reserved Property
The Reserved property gets or sets the bReserved field of the device qualifier descriptor, as described in section 9.6.2 of the USB 2.0 specification.
This property is read/write.
Syntax
HRESULT put_Reserved(
[in] BYTE bReserved
);
HRESULT get_Reserved(
[out] BYTE *pbReserved
);
Property Value
The new reserved value for the device qualifier.
Error Codes
Reserved returns S_OK if the operation succeeds or E_POINTER if the pbReserved parameter is not a valid pointer.
This property can also return other standard COM return values.
Examples
The following C++ code example shows how to get and set the Reserved property.
HRESULT CLoopBackDevice::SetDeviceQualifierReserved(ISoftUSBDeviceQualifier *piQualifier)
{
HRESULT hr = S_OK;
BYTE bReserved = 0;
BYTE bNewReserved = 1;
if (NULL == piQualifier)
{
hr = E_INVALIDARG;
goto Exit;
}
// Get the current reserved value
hr = piQualifier->get_Reserved (&bReserved);
if(FAILED(hr))
goto Exit;
// Update the reserved value if required
if (bReserved!= bNewReserved)
{
hr = piQualifier->put_Reserved (bNewReserved);
if(FAILED(hr))
goto Exit;
}
Exit:
return hr;
}
Requirements
Header |
SoftUSBif.h |
See Also
Send comments about this topic to Microsoft
Build date: 9/21/2010