The UsbBuildInterruptOrBulkTransferRequest macro formats an URB to send or receive data on a bulk pipe, or to receive data from an interrupt pipe.
void UsbBuildInterruptOrBulkTransferRequest( _Inout_ PURB Urb, _In_ USHORT Length, _In_ USBD_PIPE_HANDLE PipeHandle, _In_opt_ PVOID TransferBuffer, _In_opt_ PMDL TransferBufferMDL, _In_ ULONG TransferBufferLength, _In_ ULONG TransferFlags, _In_ PURB Link );
- Urb [in, out]
Pointer to an URB to be formatted as an interrupt or bulk transfer request.
- Length [in]
Specifies the size, in bytes, of the URB.
- PipeHandle [in]
Specifies the handle for this pipe returned by the HCD when a configuration was selected.
- TransferBuffer [in, optional]
Pointer to a resident buffer for the transfer or is NULL if an MDL is supplied in TransferBufferMDL. The contents of this buffer depend on the value of TransferFlags. If USBD_TRANSFER_DIRECTION_IN is specified, this buffer will contain data read from the device on return from the HCD. Otherwise, this buffer contains driver-supplied data to be transferred to the device.
- TransferBufferMDL [in, optional]
Pointer to an MDL that describes a resident buffer or is NULL if a buffer is supplied in TransferBuffer. The contents of the buffer depend on the value of TransferFlags. If USBD_TRANSFER_DIRECTION_IN is specified, the described buffer will contain data read from the device on return from the HCD. Otherwise, the buffer contains driver-supplied data to be transferred to the device. The MDL must be allocated from nonpaged pool.
- TransferBufferLength [in]
Specifies the length, in bytes, of the buffer specified in TransferBuffer or described in TransferBufferMDL.
- TransferFlags [in]
Specifies zero, one, or a combination of the following flags:
Is set to request data from a device. To transfer data to a device, this flag must be clear.
Can be used if USBD_TRANSFER_DIRECTION_IN is set. If set, directs the HCD not to return an error if a packet is received from the device that is shorter than the maximum packet size for the endpoint. Otherwise, a short request returns an error condition.
- Link [in]
Reserved. Must be set to NULL.
This routine does not return a value.
Build date: 11/16/2013