Bewerken

Delen via


VideoPortGetCommonBuffer function (video.h)

The VideoPortGetCommonBuffer function is obsolete in Windows XP and later, and is supported only for backward compatibility with existing drivers. In its place, driver writers should use VideoPortAllocateCommonBuffer.

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

Syntax

VIDEOPORT_DEPRECATED VIDEOPORT_API PVOID VideoPortGetCommonBuffer(
  [in]  IN PVOID              HwDeviceExtension,
  [in]  IN ULONG              DesiredLength,
  [in]  IN ULONG              Alignment,
  [out] OUT PPHYSICAL_ADDRESS LogicalAddress,
  [out] OUT PULONG            pActualLength,
  [in]  IN BOOLEAN            CacheEnabled
);

Parameters

[in] HwDeviceExtension

Pointer to the miniport driver's device extension.

[in] DesiredLength

Specifies the requested number of bytes of memory.

[in] Alignment

Specifies the requested alignment of the buffer. The video port driver currently ignores this parameter.

[out] LogicalAddress

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

[out] pActualLength

Pointer to a variable that receives the actual size, in bytes, of the buffer allocated for this request.

[in] CacheEnabled

Specifies whether the allocated memory can be cached.

Return value

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

Remarks

See Bus-Master DMA in Video Miniport Drivers for information about packet-based and common-buffer DMA transfers.

Requirements

Requirement Value
Minimum supported client Available in Windows 2000 and later versions of the Windows operating systems.
Target Platform Desktop
Header video.h (include Video.h)
Library Videoprt.lib
DLL Videoprt.sys
IRQL PASSIVE_LEVEL

See also

VideoPortAllocateCommonBuffer