WdfDmaTransactionSetMaximumLength - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfdmatransaction.h

VOID WdfDmaTransactionSetMaximumLength(
  [in] WDFDMATRANSACTION DmaTransaction,
  [in] size_t            MaximumLength
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfdmatransaction-wdfdmatransactionsetmaximumlength)

WdfDmaTransactionSetMaximumLength function

Description

[Applies to KMDF only]

The WdfDmaTransactionSetMaximumLength method sets the maximum length for the DMA transfers that are associated with a specified DMA transaction.

Parameters

DmaTransaction [in]

A handle to a DMA transaction object that the driver obtained from a previous call to WdfDmaTransactionCreate.

MaximumLength [in]

The maximum size, in bytes, that the device can handle in a single DMA transfer operation. If your driver must run on versions of the Microsoft Windows operating systems that support a maximum of 16 map registers, MaximumLength must be less than 65536.

The MaximumLength value applies only to the specified DMA transaction, as follows:

Remarks

A bug check occurs if the driver supplies an invalid object handle.

Your driver must initialize the DMA transaction before calling WdfDmaTransactionSetMaximumLength.

For information about initializing a DMA transaction, see Creating and Initializing a DMA Transaction.

Examples

The following code example sets the maximum transfer length to a driver-defined value, for a specified DMA transaction.

WdfDmaTransactionSetMaximumLength(
                                 dmaTransaction,
                                 MAX_TRANSFER_LENGTH/2,
                                 );

See also

WDF_DMA_ENABLER_CONFIG

WdfDmaTransactionCreate