DescriptorType Property
The DescriptorType property gets or sets the value of the bDescriptorType 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_DescriptorType(
[in] BYTE bDescriptorType
);
HRESULT get_DescriptorType(
[out, retval] BYTE *pbDescriptorType
);
Property Value
The new descriptor type.
Error Codes
DescriptorType returns S_OK if the operation succeeds or E_POINTER if the pbDescriptorType parameter is not a valid pointer.
Remarks
The following C++ code example shows how to get DescriptorType property.
HRESULT CLoopBackDevice::GetDevQualDescriptorType(BYTE *pbType)
{
HRESULT hr = S_OK;
if(NULL == pbType)
{
hr = E_POINTER;
goto Exit;
}
// Initialize the return size
*pbType= 0;
// Validate that this descriptor is a device qualifier descriptor
hr = m_piDevQual->get_DescriptorType(pbType);
Exit:
return hr;
}
Requirements
Header |
SoftUSBif.h |
See Also
Send comments about this topic to Microsoft
Build date: 9/21/2010