DDGPE::AllocVideoSurface (Windows CE 5.0)
This method creates a DDGPESurf object in video memory and optionally associates it with a DirectDraw surface.
virtual SCODE AllocVideoSurface(DDGPESurf** ppSurf,intwidth,intheight,EGPEFormatformat,EDDGPEPixelFormatpixelFormat,unsignedlong* pOffsetInVideoMemory);virtualSCODE AllocVideoSurface(LPDDRAWI_DDRAWSURFACE_GBLlpDDSurface,intwidth,intheight,EGPEFormatformat,EDDGPEPixelFormat pixelFormat,unsignedlong* pOffsetInVideoMemory);virtual SCODE AllocVideoSurface(DDGPESurf** ppSurf,DDGPEAllocSurfaceData* pddgpeAllocSurfaceData,unsigned long* pOffsetInVideoMemory);virtual SCODE AllocVideoSurface(LPDDRAWI_DDRAWSURFACE_GBLlpDDSurface,DDGPEAllocSurfaceData* pddgpeAllocSurfaceData,unsigned long* pOffsetInVideoMemory);
Parameters
- ppSurf
Pointer to a new DDGPESurf object. - lpDDSurface
Pointer to an existing DirectDraw surface. A new DDGPESurf object will be attached to it. Any existing DDGPESurf object attached to this surface will be replaced. The driver is responsible for management of surfaces replaced in this manner. - width
Desired width of the surface. - height
Desired height of the surface. - format
Desired format of the surface. - pixelFormat
Desired pixel format of the surface. - pOffsetInVideoMemory
Value representing the surface's offset in video memory. - pddgpeAllocSurfaceData
See DDGPEAllocSurfaceData.
Return Values
The return value is S_OK, if the function is successful. Otherwise, an error code is returned.
Remarks
You can this use function in your DirectDraw hardware abstraction layer (DDHAL) implementation to create a surface in video memory and attach it to a DirectDraw surface for later use.
This is not an implementation of the method GPE::AllocSurface that you are required to provide in your GPE-based class. It is also not an implementation of the optional DDGPE::AllocSurface. You must still define these methods in your own source code.
Requirements
OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header: Ddgpe.h.
Link Library: Ddgpe.lib.
See Also
DDGPEAllocSurfaceData | DDGPE Class | DDGPE Class Definition
Send Feedback on this topic to the authors