The GetDmaAlignment routine returns the alignment requirements of the DMA system.
ULONG
GetDmaAlignment(
IN PDMA_ADAPTER DmaAdapter
);
GetDmaAlignment returns the alignment requirements of the DMA system.
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
GetDmaAlignment is not a system routine that can be called directly by name. This routine is callable only by pointer from the address returned in a DMA_OPERATIONS structure. Drivers obtain the address of this routine by calling IoGetDmaAdapter.
A driver can call this routine to determine alignment requirements for DMA buffers it allocates. The returned value should be used to set the AlignmentRequirement field in the device object. A driver may need to increase this value because of additional hardware device restrictions. For more information, see Initializing a Device Object.
Callers of GetDmaAlignment must be running at IRQL = PASSIVE_LEVEL.