HeapVidMemAllocAligned function (dmemmgr.h)
The HeapVidMemAllocAligned function allocates off_screen_memory for a display driver by using the DirectDraw video memory heap manager.
FLATPTR HeapVidMemAllocAligned( [in] LPVIDMEM lpVidMem, [in] DWORD dwWidth, [in] DWORD dwHeight, [in] LPSURFACEALIGNMENT lpAlignment, [out] LPLONG lpNewPitch );
Pointer to a VIDEOMEMORY structure that represents the DirectDraw heap from which to allocate the surface.
Is the width in bytes of the requested surface.
Is the height in scan lines of the requested surface.
Pointer to a SURFACEALIGNMENT structure that describes the alignment restrictions for the surface.
Is the location in which the resulting pitch value is written. This information is relevant only to linear (nonrectangular) off-screen heaps.
HeapVidMemAllocAligned returns the FLATPTR offset of the resulting allocation upon success. Otherwise, it returns zero.
The driver should use the array of VIDEOMEMORY structures its DrvGetDirectDrawInfo function receives to determine the value of lpVidMem with which to call HeapVidMemAllocAligned. The driver receives this array in the pvmList parameter during the second call to DrvGetDirectDrawInfo. It is possible that DrvGetDirectDrawInfo might not be called when low memory conditions exist on the system. Consequently, the driver should always check to ensure that it has a non-NULL pointer in pvmList.
|Minimum supported client||Available in Windows 2000 and later versions of the Windows operating systems.|
|Header||dmemmgr.h (include Winddi.h)|