Microsoft Windows CE 3.0  

ClearFeature

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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] Specify USB_NO_WAIT or 0, plus one of the following:
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] Specifies 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 Windows CE USBDI functions, is not directly accessible by any client drivers. It is invoked by dereferencing the lpClearFeaturefield 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 USB 1.1 specification 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.

Sucessful 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

Runs on Versions Defined in Include Link to
Windows CE OS 2.10 and later      
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

AbortTransfer, GetTransferStatus, IsTransferComplete, SetFeature



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.