Interval Property
The Interval property gets or sets the bInterval 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_Interval(
[in] BYTE bInterval
);
HRESULT get_Interval(
[out, retval] BYTE *pbInterval
);
Property Value
The new value for the endpoint interval.
Error Codes
Interval returns S_OK if the operation succeeds or E_POINTER if the pbInterval parameter is not a valid pointer.
Remarks
The following C++ code example shows to set and get the Interval property.
HRESULT CLoopBackDevice::UpdateInterval(ISoftUSBEndpoint *piEndpoint)
{
HRESULT hr = S_OK;
BYTE bInterval = 0;
BYTE bNewInterval = 0;
if(NULL == piEndpoint)
{
hr = E_INVALIDARG;
goto Exit;
}
// Get the current endpoint interval
hr = piEndpoint->get_Interval (&bInterval);
if(FAILED(hr))
goto Exit;
// Update the endpoint interval if required
if (bNewInterval != bInterval)
{
hr = piEndpoint->put_Interval (bNewInterval);
if(FAILED(hr))
goto Exit;
}
Exit:
return hr;
}
Requirements
Header |
SoftUSBif.h |
See Also
Send comments about this topic to Microsoft
Build date: 9/21/2010