// videoagp.h
PAGP_COMMIT_VIRTUAL PagpCommitVirtual;
PVOID PagpCommitVirtual(
[in] IN PVOID HwDeviceExtension,
[in] IN PVOID VirtualReserveContext,
[in] IN ULONG Pages,
[in] IN ULONG Offset
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The AgpCommitVirtual function maps reserved virtual memory to an associated range of AGP-decodable physical addresses.
HwDeviceExtension [in]Pointer to the device extension of the miniport driver'.
VirtualReserveContext [in]Identifies a reserved virtual address range. The context handle was obtained from AgpReserveVirtual.
Pages [in]Specifies the number of pages of virtual memory to map.
Offset [in]Specifies the page offset at which to commit the pages. The offset is applied to the reserved virtual address range that is identified by VirtualReserveContext.
AgpCommitVirtual returns the virtual address for the base of the committed pages if the mapping succeeded; otherwise returns NULL.
Before calling AgpCommitVirtual to commit a range of virtual pages, you must do the following:
After these items are completed, you can call AgpCommitVirtual to map a portion of the reserved virtual pages to pages that have already been mapped and locked by AgpCommitPhysical. You must not attempt to map a page of virtual addresses if the corresponding page of physical addresses has not already been mapped.
Video miniport drivers that run on Microsoft Windows 2000 should always commit a virtual range whose size is a multiple of 64 kilobytes. If you call AgpCommitVirtual to commit a virtual range that is not a multiple of 64 kilobytes, it can return an invalid virtual address.
On Windows XP and later, AgpCommitVirtual automatically expands the committed range so that it is a multiple of 64 kilobytes.
When a miniport driver calls AgpCommitVirtual, a portion of the virtual address range identified by VirtualReserveContext is mapped to physical addresses. The mapped portion begins Offset pages into the virtual address range that is identified by VirtualReserveContext.