Endpoint0 Property

The Endpoint0 property gets the object that represents a device's control endpoint.

This property is read-only.

Syntax

HRESULT get_Endpoint0(
  [out, retval]  ISoftUSBEndpoint **ppiEndpoint0
);

Property Value

Caller-allocated space to hold the ISoftUSBEndpoint interface that represents the control endpoint.

Error Codes

Endpoint0 returns S_OK if the operation succeeds or E_POINTER if the ppiEndPoint0 parameter is not a valid pointer.

Remarks

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

HRESULT CLoopBackDevice::UpdateEndpoint0()
{
HRESULT hr = S_OK;
 ISoftUSBEndpoint *piEndpoint0 = NULL;
BYTE                      bMaxPacketSize0 = 0;


 hr = m_piDevice->get_MaxPacketSize0(&bMaxPacketSize0);
 if(FAILED(hr))
 goto Exit;

// Get the control endpoint
 hr = m_piDevice->get_Endpoint0(&piEndpoint0);
 if(FAILED(hr))
 goto Exit;
 
// Update the endpoint maximum packet size
 hr = piEndpoint->put_MaxPacketSize(bMaxPacketSize0);
 if(FAILED(hr))
 goto Exit;

Exit:
 if( NULL != piEndpoint0)
{
 piEndpoint0->Release();
 piEndpoint0 = NULL;
} 
 return hr;
}

Requirements

Header

SoftUSBif.h

See Also

ISoftUSBDevice

ISoftUSBEndpoint

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010