Share via


Halted Property

Gets or sets whether the endpoint is currently halted.

This property is read/write.

Syntax

HRESULT put_Halted(
  [in]           VARIANT_BOOL Halted
);

HRESULT get_Halted(
  [out, retval]  VARIANT_BOOL *pHalted
);

Property Value

The new halted state for the endpoint.

Error Codes

Halted returns S_OK if the operation succeeds or E_POINTER if the pHalted parameter is not a valid pointer.

Remarks

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

HRESULT CLoopBackDevice::UpdateHaltedState(ISoftUSBEndpoint *piEndpoint)
{
HRESULT hr = S_OK;
VARIANT_BOOL   fHalted = FALSE;
VARIANT_BOOL   fNewHalted = FALSE;

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

// Get the current halted value
 hr = piEndpoint->get_Halted (&fHalted);
 if(FAILED(hr))
 goto Exit;

// Update the halted state if required
 if (fNewHalted != fHalted)
{
 hr = piEndpoint->put_Halted (fNewHalted);
 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