IssueControlTransfer
This function initiates a control transfer with a USB device on the specified endpoint.
USB_TRANSFER IssueControlTransfer(
USB_PIPE hPipe,
LPTRANSFER_NOTIFY_ROUTINE lpStartAddress,
LPVOID lpvNotifyParameter,
DWORD dwFlags,
NPCUSB_DEVICE_REQUEST lpvControlHeader,
DWORD dwBufferSize,
LPVOID lpvBuffer,
ULONG uBufferPhysicalAddress
);
Parameters
- hPipe
[in] Handle to an open USB pipe. - lpStartAddress
[in] Pointer to the address of a callback routine, or NULL if no callback routine is necessary. - lpvNotifyParameter
[in] Pointer to the parameter to pass to a callback routine. - dwFlags
[in] Flags for the transfer. Usbtypes.h declares the following flags:- USB_IN_TRANSFER
- USB_OUT_TRANSFER
- USB_NO_WAIT
- USB_SHORT_TRANSFER_OK
- USB_START_ISOCH_ASAP
- USB_COMPRESS_ISOCH
- USB_SEND_TO_DEVICE
- USB_SEND_TO_INTERFACE
- USB_SEND_TO_ENDPOINT
- USB_DONT_BLOCK_FOR_MEM
- lpvControlHeader
[in] Pointer to control header, 8 bytes. - dwBufferSize
[in] Size of the data buffer. - lpvBuffer
[in] Pointer to a data buffer. If a physical buffer address is specified, this must contain the virtual address of the buffer. - uBufferPhysicalAddress
[in] Physical address, which may be NULL, of the data buffer.
Return Values
A USB_TRANSFER handle indicates success. NULL indicates failure. IssueControlTransfer behaves either synchronously or asynchronously, depending on the value you provide for lpStartAddress and whether dwFlags contains the USB_NO_WAIT flag. The following table shows the possible flags.
lpStartAddress | dwFlags | USB_NO_WAIT | Behavior |
---|---|---|
NULL | 0 | Synchronous |
NULL | USB_NO_WAIT | Asynchronous |
Non-NULL | 0 | Asynchronous |
Non-NULL | USB_NO_WAIT | Asynchronous |
When behaving asynchronously, the function invokes your callback function, if lpStartAddress specifies one, when the transfer is complete.
Remarks
This function initiates a control transfer to a USB device.
Requirements
OS Versions: Windows CE 2.10 and later.
Header: Usbd.hpp.
See Also
AbortTransfer | GetTransferStatus | IsTransferComplete | USB Drivers
Last updated on Tuesday, May 18, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.