HalAllocateCommonBuffer
This function allocates memory, locks it down, and maps it so that it is simultaneously accessible from both the processor and a device for DMA operations.
PVOID HalAllocateCommonBuffer(
PDMA_ADAPTER_OBJECT DmaAdapter,
ULONG Length,
PPHYSICAL_ADDRESS LogicalAddress,
BOOLEAN CacheEnabled
);
Parameters
- DmaAdapter
[in] Pointer to DMA adapter descriptor structure, DMA_ADAPTER_OBJECT. - Length
[in] Size of buffer to allocate. - LogicalAddress
[out] Pointer to the bus-relative, logical address buffer used by the DMA controller on the specified bus. - CacheEnabled
[in] Ignored. The buffer returned is always at an uncached virtual address.
Return Values
Pointer to an allocated buffer for the device driver to use, or NULL if failure.
Remarks
Allocates a shared buffer of locked, physically contiguous pages, and returns the virtual address to be used by the DMA device driver and the logical address to be used by the DMA adapter for DMA operations.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: CEDDK.h.
Link Library: CEDDK.lib.
See Also
DMA_ADAPTER_OBJECT | HalFreeCommonBuffer | Direct Memory Access | Implementing CEDDK.dll
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.