HalAllocateCommonBuffer (Windows CE 5.0)

Send Feedback

This function allocates memory, locks it down, and maps it so that it is simultaneously accessible from the processor and a device for direct memory access (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

Returns a pointer to an allocated buffer for the device driver to use. Returns NULL if the function fails.

Remarks

This function allocates a shared buffer of locked, physically contiguous pages. It then 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

Direct Memory Access | DMA_ADAPTER_OBJECT | HalFreeCommonBuffer

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.