ClearFeature

This function sends a CLEAR_FEATURE request to a USB device.

USB_TRANSFER ClearFeature(
  USB_HANDLE hDevice,
  LPTRANSFER_NOTIFY_ROUTINE lpStartAddress,
  LPVOID lpvNotifyParameter,
  DWORD dwFlags,
  WORD wFeature,
  UCHAR bIndex 
);

Parameters

  • hDevice
    [in] Handle to a USB device.
  • lpStartAddress
    [in] Pointer to the address, which may be NULL, of a callback routine.
  • lpvNotifyParameter
    [in] Pointer to the parameter to pass to a callback routine.
  • 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.
  • wFeature
    [in] Feature selector. One of USB_FEATURE_* declared in the USB100.h header file.
  • bIndex
    [in] Value of zero (0) for DEVICE or the interface or endpoint number.

Return Values

A USB_TRANSFER handle indicates success. NULL indicates failure.

Remarks

This function, like all other USB driver interface functions, is not directly accessible by any client drivers. Invoke it by dereferencing the lpClearFeature member of the USB_FUNCS structure passed to the client driver in the invocation of its USBDeviceAttach function.

This function initiates a control transfer to a USB device, requesting that a specified feature be disabled. The Universal Serial Bus SpecificationRevision 1.1 defines features and appropriate feature request recipients. There is no facility for class- or vendor-specific feature selectors; vendors who need to implement non-standard operations should use vendor-specific requests rather than the standard requests.

Successful return from this function indicates that the request was issued to the device, or queued for issuing if USB_NO_WAIT was set; it does not mean that the feature was actually cleared. You must wait for and check the transfer completion status to determine if the device was able to clear the feature or not.

Requirements

OS Versions: Windows CE 2.10 and later.
Header: Usbd.hpp.

See Also

AbortTransfer | GetTransferStatus | IsTransferComplete | SetFeature | USBDeviceAttach | USB Drivers

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.