다음을 통해 공유


IssueVendorTransfer (Compact 2013)

3/26/2014

This function sends a vendor-specific control transfer to a universal serial bus (USB) device.

Syntax

DWORD IssueVendorTransfer(
  LPCUSB_FUNCS UsbFuncs,
  HANDLE hUsbDevice,
  LPTRANSFER_NOTIFY_ROUTINE NotifyRoutine,
  PVOID NotifyContext,
  DWORD Flags,
  PUSB_DEVICE_REQUEST pControlHeader,
  LPVOID pBuf,
  ULONG PhysAddr,
  LPDWORD pBytesTransferred,
  DWORD dwTimeout,
  PUSB_ERROR pUsbRc
);

Parameters

  • UsbFuncs
    [in] Pointer to a USB_FUNCS structure.
  • hUsbDevice
    [in] Handle to a USB device.
  • NotifyContext
    [in] Pointer to the parameter to pass to a callback routine.
  • Flags
    [in] Flags for the transfer. These flags shown in the following list are declared in the Usbtypes.h header file.

    • 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
  • pControlHeader
    [in] Pointer to a device request header.
  • pBuf
    [in] Data buffer. If a physical buffer address is specified in PhysAddr, this parameter must contain the virtual address of the buffer.
  • PhysAddr
    [in] Physical address of the data buffer, which might be NULL.
  • pBytesTransferred
    [out] Number of bytes transferrred.
  • dwTimeout
    [in] Timeout in milliseconds (ms).
  • pUsbRc
    [out] USB_ERROR or USB_TRANSFER.

Return Value

A USB_TRANSFER handle indicates success. NULL indicates failure.

Remarks

This function initiates a control transfer to a USB device on the default endpoint, zero (0). This function is intended for vendor-specific transfers. For standard transfers, use a corresponding function, such as LPGET_INTERFACE or LPSET_INTERFACE.

Requirements

Header

usbclient.h

See Also

Reference

USB Host Client Driver Functions
AbortTransfer
LPGET_INTERFACE
GetTransferStatus
LPIS_TRANSFER_COMPLETE
LPTRANSFER_NOTIFY_ROUTINE
LPSET_INTERFACE
USB_FUNCS