Partager via


IssueBulkTransfer

This function initiates a bulk transfer to a USB device on the specified endpoint.

USB_TRANSFER IssueBulkTransfer(
  USB_PIPE hPipe,
  LPTRANSFER_NOTIFY_ROUTINE lpStartAddress,
  LPVOID lpvNotifyParameter,
  DWORD dwFlags,
  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 these values..
  • dwBufferSize
    [in] Size of the data buffer, in bytes.
  • lpvBuffer
    [in] Pointer to the 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. IssueBulkTransfer 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.

Requirements

OS Versions: Windows CE 2.10 and later.
Header: Usbclient.h.

See Also

AbortTransfer | GetTransferStatus | IsTransferComplete | USB Drivers

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.