Share via


OutQueueSize Property

The OutQueueSize property gets or sets the maximum number of OUT transactions that an endpoint will hold in its queue before the device simulator consumes them.

This property is read/write.

Syntax

HRESULT put_OutQueueSize(
  [in]           long lOutQueueSize
);

HRESULT get_OutQueueSize(
  [out, retval]  long *plOutQueueSize
);

Property Value

The new maximum number of OUT transactions for the endpoint.

Error Codes

OutQueueSize returns S_OK if the operation succeeds or E_POINTER if the plOutQueueSize parameter is not a valid pointer.

Remarks

If the endpoint's queue reaches the maximum number of OUT transactions and the device simulator does not consume the transactions, any additional transactions will be discarded and cause the endpoint to stall. The default number of OUT transactions is 512.

The following C++ code example shows to set and get the OutQueueSize property.

HRESULT CLoopBackDevice::UpdateOutQueueSize(ISoftUSBEndpoint *piEndpoint)
{
HRESULT hr = S_OK;
 long lOutQueueSize = 0;
 long lNewOutQueueSize = 10;

 if(NULL == piEndpoint)
{
 hr = E_INVALIDARG;
 goto Exit;
}

// Get the current value of the OutQueueSize property
 hr = piEndpoint->get_OutQueueSize (&lOutQueueSize);
 if(FAILED(hr))
 goto Exit;

// Update the OutQueueSize if required
 if (lNewOutQueueSize != lOutQueueSize)
{
 hr = piEndpoint->put_OutQueueSize (lNewOutQueueSize);
 if(FAILED(hr))
 goto Exit;
}
Exit:
 return hr;
}

Requirements

Header

SoftUSBif.h

See Also

ISoftUSBEndpoint

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010