Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The GetDmaAlignment routine returns the alignment requirements of the DMA system.
Syntax
PGET_DMA_ALIGNMENT PgetDmaAlignment;
ULONG PgetDmaAlignment(
[in] PDMA_ADAPTER DmaAdapter
)
{...}
Parameters
[in] DmaAdapter
A pointer to the DMA_ADAPTER structure returned by IoGetDmaAdapter that represents the bus-master adapter or DMA controller.
Return value
GetDmaAlignment returns the alignment requirements, in bytes, of the DMA system. The starting address and length of DMA buffers must be a multiple of this value.
Remarks
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available starting with Windows 2000. |
Target Platform | Desktop |
Header | wdm.h (include Wdm.h, Ntddk.h, Ntifs.h) |
IRQL | PASSIVE_LEVEL |
DDI compliance rules | IrqlDispatch(wdm) |