Length Property

The Length property gets or sets the bLength 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_Length(
  [in]           BYTE bLength
);

HRESULT get_Length(
  [out, retval]  BYTE *pbLength
);

Property Value

The new length of the device qualifier descriptor.

Error Codes

Length returns S_OK if the operation succeeds or E_POINTER if the pbLength parameter is not a valid pointer.

Remarks

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

HRESULT CLoopBackDevice::GetDevQualSize(BYTE *pbSize)
{
HRESULT hr = S_OK;
if(NULL == pbSize)
{
  hr = E_POINTER;
  goto Exit;
}

// Initialize the return size
*pbSize = 0;


// Get the descriptor length
hr = m_piDevQual->get_Length(pbSize);

Exit:
return hr;
}

Requirements

Header

SoftUSBif.h

See Also

ISoftUSBDeviceQualifier

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010