Compartilhar via


DMAOpenBuffer (Compact 2013)

3/26/2014

This function is used to map a virtual buffer to a physical DMA block.

Syntax

DMA_BUFFER_HANDLE DMAOpenBuffer (
  PCE_DMA_ADAPTER pDmaAdapter,
  DWORD dwNumBuffer,
  PVOID pBufferArray[],
  DWORD aLength[],
);

Parameters

  • pDmaAdapter
    [in] Pointer to a CE_DMA_ADAPTER structure, which is either returned by the function DMAGetAdapter or is created by the caller for Bus Mastering DMA.
  • DwNumBuffer
    [in] Number of virtual buffers passed into DMAOpenBuffer.
  • pBufferArray[]
    [in] Pointer to an array of virtual addresses. This array is bounded by the value of the parameter dwNumBuffer.
  • aLength[]
    [in] Pointer to an array of lengths. This array is bounded by the value dwNumber.

Return Value

Returns a nonzero value on success. Returns zero on failure. For extended error information, the user driver can call GetLastError.

Remarks

The DMA_BUFFER_HANDLE returned by this function can be used with other DMA buffer functions. DMAOpenBuffer will allocate internal structures and create a DMA buffer block descriptor. If necessary, it will also call HalAllocateCommonBuffer.

Requirements

Header

oaldma.h

Library

CEDDK.lib

See Also

Reference

Ceddk.dll DMA Functions
Ceddk.dll DMA Structures