Expand Minimize

WdfDmaTransactionSetMaximumLength method

[Applies to KMDF only]

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

Syntax


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

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:

  • If the specified value is less than the default value that the driver specified in its WDF_DMA_ENABLER_CONFIG structure, the specified value overrides the default value.

  • If the specified value is greater than the default value, the specified value is ignored.

Return value

None.

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

Remarks

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,
                                 );

Requirements

Minimum KMDF version

1.0

Header

Wdfdmatransaction.h (include Wdf.h)

Library

Wdf01000.sys (see Framework Library Versioning.)

IRQL

<=DISPATCH_LEVEL

DDI compliance rules

DriverCreate

See also

WdfDmaTransactionCreate
WDF_DMA_ENABLER_CONFIG

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft