VideoPortAllocateCommonBuffer function (video.h)
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
VIDEOPORT_DEPRECATED VIDEOPORT_API PVOID VideoPortAllocateCommonBuffer(
[in] IN PVOID HwDeviceExtension,
[in] IN PVP_DMA_ADAPTER VpDmaAdapter,
[in] IN ULONG DesiredLength,
[out] OUT PPHYSICAL_ADDRESS LogicalAddress,
[in] IN BOOLEAN CacheEnabled,
[out] OUT PVOID Reserved
);
Parameters
[in] HwDeviceExtension
Pointer to the miniport driver's device extension.
[in] VpDmaAdapter
Pointer to the VP_DMA_ADAPTER structure that represents the bus-master adapter. This structure was returned by a previous call to VideoPortGetDmaAdapter.
[in] DesiredLength
Specifies the requested number of bytes of memory.
[out] LogicalAddress
Pointer to a memory location that receives the logical address to be used by the adapter to access the allocated buffer.
[in] CacheEnabled
Specifies whether the allocated memory can be cached. For more information, see the description of the CacheEnabled parameter for AllocateCommonBuffer.
[out] Reserved
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
Requirement | Value |
---|---|
Minimum supported client | Available in Windows XP 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 |