次の方法で共有


HalAllocateCommonBuffer (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

PVOID HalAllocateCommonBuffer(
  PDMA_ADAPTER_OBJECT DmaAdapter,
  ULONG Length,
  PPHYSICAL_ADDRESS LogicalAddress,
  BOOLEAN CacheEnabled
);

Parameters

  • 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 Value

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

Header ceddk.h
Library CEDDK.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

CEDDK Dynamic-Link Library DMA Functions
DMA_ADAPTER_OBJECT
HalFreeCommonBuffer

Concepts

Direct Memory Access