DescriptorType Property
The DescriptorType property gets or sets the value of the bDescriptorType field of the endpoint descriptor, as described in section 9.6.6 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 the DescriptorType property.
HRESULT CLoopBackDevice::GetEndpointType(BYTE *pbType)
{
HRESULT hr = S_OK;
if (NULL == m_piEndpoint)
{
hr = E_INVALIDARG;
goto Exit;
}
if(NULL == pbType)
{
hr = E_POINTER;
goto Exit;
}
// Initialize the return size
*pbType = 0;
hr = m_piEndpoint ->get_DescriptorType(pbType);
Exit:
return hr;
}
Requirements
Header |
SoftUSBif.h |
See Also
Send comments about this topic to Microsoft
Build date: 9/21/2010