DDGPE::AllocSurface (Windows CE 5.0)
The DDGPE AllocSurface routines are extensions to its counterpart, the GPE::AllocSurface method. With the addition of the pixelFormat parameter or the pddgpeAllocSurfaceData, your driver can allocate many different types of surfaces, instead of a limited number of GPE surface types.
// Surface memory allocation
virtual SCODE AllocSurface(DDGPESurf** ppSurf, intwidth,intheight,EGPEFormatformat,EDDGPEPixelFormatpixelFormat,intsurfaceFlags);virtual SCODE AllocSurface(DDGPESurf** ppSurf,DDGPEAllocSurfaceData* pddgpeAllocSurfaceData);
Parameters
ppSurf
Pointer to a new DDGPESurf object.width
The desired width of the surface.height
The desired height of the surface.format
The desired format of the surface.pixelFormat
The desired pixel format of the surface.surfaceFlags
GPE surface flags for the surface.Flag Description GPE_REQUIRE_VIDEO_MEMORY Surface memory must be allocated in video memory. GPE_PREFER_VIDEO_MEMORY Surface memory should be allocated in video memory, if possible, but can be allocated in system memory, if necessary. If no flags are set, for example, if surfaceFlags is set to zero (0), the surface is allocated in system memory.
pddgpeAllocSurfaceData
See DDGPEAllocSurfaceData.
Return Values
The return value is S_OK, if the function is successful. Otherwise, an error code is returned.
Remarks
Your driver should override the first DDGPEAllocSurface function that follows to perform the necessary allocation. Otherwise, the function merely wraps to the standard GPEAllocSurface that you must define in your driver. In this case, the pixelFormat information is ignored. The default implementation of the second DDGPEAllocSurface routine that follows calls the first one, ignoring the information you might have in DDGPEStandardHeader. Your driver must override it if you want to take advantage of DDGPEStandardHeader.
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
GPE::AllocSurface | DDGPEAllocSurfaceData | DDGPE Class | DDGPE Class Definition
Send Feedback on this topic to the authors