DescriptorType Property

The DescriptorType property gets or sets the bDescriptorType field of the string descriptor as described in section 9.6.7 of the USB 2.0 specification.

This property is read/write.

Syntax

HRESULT put_DescriptorType(
  [in]   BYTE bDescriptorType
);

HRESULT get_DescriptorType(
  [out]  BYTE *pbDescriptorType
);

Property Value

The new value of the bDescriptorType.

Error Codes

DescriptorType returns S_OK if the operation succeeds.

This property can return other standard COM return values.

Examples

The following C++ code example shows how to get the DescriptorType property.

HRESULT CLoopBackDevice::GetStringDescriptor(BYTE *pbDescriptor)
{
HRESULT hr = S_OK;


 if(NULL == pbDescriptor)
{
 hr = E_POINTER;
 goto Exit;
}

// Initialize the return size
*pbDescriptor = 0;

// Validate that this descriptor is a string descriptor
 hr = m_piString ->get_DescriptorType(pbDescriptor);

Exit:
 return hr;
}

Requirements

Header

SoftUSBif.h

See Also

ISoftUSBString

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010