SetFeature

This function sends a SET_FEATURE request to a USB device.

Syntax

USB_TRANSFER SetFeature( 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] Specifies USB_NO_WAIT or 0, plus one of the following:
USB_SEND_TO_DEVICE
Request for device.
USB_SEND_TO_INTERFACE
Request for interface.
USB_SEND_TO_ENDPOINT
Request for endpoint ( default ).
wFeature
[IN] Specifies one of the USB_FEATURE_* values, declared in the USB 100.h header file.
bIndex
[IN] Specifies 0 for DEVICE, or interface/endpoint number.

Return Values

A USB_TRANSFER handle indicates success. NULL indicates failure.

Remarks

This function initiates a control transfer to a USB device, requesting that a specified feature be enabled.

This function is defined in the Mousedrv.cpp file.

See Also

AbortTransfer, ClearFeature, GetTransferStatus, IsTransferComplete