ClearOrSetFeature (Windows CE 5.0)

Send Feedback

This function sends a CLEAR_FEATURE or SET_FEATURE request to a universal serial bus (USB) device.

DWORD ClearOrSetFeature(  LPCUSB_FUNCS UsbFuncs,  HANDLE hUsbDevice,  LPTRANSFER_NOTIFY_ROUTINE NotifyRoutine,  PVOID NotifyContext,  DWORD dwFlags,   WORD wFeature,  UCHAR bIndex,  DWORD dwTimeout,  BOOL bSet);

Parameters

  • UsbFuncs
    [in] Pointer to a USB_FUNCS structure.
  • hUsbDevice
    [in] Handle to a USB device.
  • NotifyRoutine
    [in] Pointer to a callback routine to signal a completion event. This is of type LPTRANSFER_NOTIFY_ROUTINE, which might be NULL.
  • NotifyContext
    [in] Context to pass to the LPTRANSFER_NOTIFY_ROUTINE, which is a handle to a BulkXXXcompletion event.
  • dwFlags
    [in] Value of USB_NO_WAIT or zero (0), and one of the values from the following table.
    Value Description
    USB_SEND_TO_DEVICE Request for device
    USB_SEND_TO_INTERFACE Request for interface
    USB_SEND_TO_ENDPOINT Request for endpoint, which is the default
  • wFeature
    [in] A USB_FEATURE_* value.
  • bIndex
    [in] Value of zero (0) for DEVICE, or the interface or endpoint number.
  • dwTimeout
    [in] Timeout in milliseconds (ms).
  • bSet
    [in] Set to TRUE to set the USB feature and FALSE to clear the USB feature.

Return Values

Returns a Microsoft® Win32® error code. For more information, see GetLastError.

Remarks

Synchronous calls to ClearOrSetFeature can negatively affect performance.

Requirements

OS Versions: Windows CE 2.10 and later.
Header: Usbclient.h.

See Also

LPTRANSFER_NOTIFY_ROUTINE | USB_FUNCS

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.