Expand Minimize

VideoPortAllocateCommonBuffer function

The VideoPortAllocateCommonBuffer function allocates and maps system memory so that it is simultaneously accessible from both the processor and a device for common-buffer DMA operations.

Syntax


PVOID VideoPortAllocateCommonBuffer(
  _In_   PVOID HwDeviceExtension,
  _In_   PVP_DMA_ADAPTER VpDmaAdapter,
  _In_   ULONG DesiredLength,
  _Out_  PPHYSICAL_ADDRESS LogicalAddress,
  _In_   BOOLEAN CacheEnabled,
  _Out_  PVOID Reserved
);

Parameters

HwDeviceExtension [in]

Pointer to the miniport driver's device extension.

VpDmaAdapter [in]

Pointer to the VP_DMA_ADAPTER structure that represents the bus-master adapter. This structure was returned by a previous call to VideoPortGetDmaAdapter.

DesiredLength [in]

Specifies the requested number of bytes of memory.

LogicalAddress [out]

Pointer to a memory location that receives the logical address to be used by the adapter to access the allocated buffer.

CacheEnabled [in]

Specifies whether the allocated memory can be cached. For more information, see the description of the CacheEnabled parameter for AllocateCommonBuffer.

Reserved [out]

Is currently ignored by the video port driver; should be set to NULL.

Return value

VideoPortAllocateCommonBuffer returns the base virtual address of the allocated buffer if successful; otherwise, it returns NULL if the buffer cannot be allocated.

Remarks

When the buffer is no longer needed, the video miniport driver should release it by calling VideoPortReleaseCommonBuffer.

Requirements

Version

Available in Windows XP and later versions of the Windows operating systems.

Header

Video.h (include Video.h)

Library

Videoprt.lib

DLL

Videoprt.sys

IRQL

PASSIVE_LEVEL

See also

AllocateCommonBuffer
VideoPortGetDmaAdapter
VideoPortReleaseCommonBuffer
VP_DMA_ADAPTER

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.