Поделиться через


LPISSUE_CONTROL_TRANSFER (Compact 2013)

3/26/2014

This function initiates a control transfer with a universal serial bus (USB) device on the specified endpoint.

Syntax

typedef USB_TRANSFER (* LPISSUE_CONTROL_TRANSFER)(
  USB_PIPE hPipe,
  LPTRANSFER_NOTIFY_ROUTINE lpStartAddress,
  LPVOID lpvNotifyParameter,
  DWORD dwFlags,
  LPCVOID 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.
  • 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 might be NULL, of the data buffer.

Return Value

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, this function invokes the callback function optionally specified by lpStartAddress when the transfer is complete.

Remarks

This function initiates a control transfer to a USB device.

Requirements

Header

usbdi.h

See Also

Reference

USB Driver Functions
LPABORT_TRANSFER
LPGET_TRANSFER_STATUS
LPIS_TRANSFER_COMPLETE
LPTRANSFER_NOTIFY_ROUTINE