DDGPE::AllocVideoSurface
This method creates a DDGPESurf object in video memory, and optionally associates it with a DirectDraw surface.
virtual SCODE AllocVideoSurface(
DDGPESurf** ppSurf,
int width,
int height,
EGPEFormat format,
EDDGPEPixelFormat pixelFormat,
unsigned long* pOffsetInVideoMemory
);
virtual SCODE AllocVideoSurface(
LPDDRAWI_DDRAWSURFACE_GBL lpDDSurface,
int width,
int height,
EGPEFormat format,
EDDGPEPixelFormat pixelFormat,
unsigned long* pOffsetInVideoMemory
);
virtual SCODE AllocVideoSurface(
DDGPESurf** ppSurf,
DDGPEAllocSurfaceData* pddgpeAllocSurfaceData,
unsigned long* pOffsetInVideoMemory
);
virtual SCODE AllocVideoSurface(
LPDDRAWI_DDRAWSURFACE_GBL lpDDSurface,
DDGPEAllocSurfaceData* pddgpeAllocSurfaceData,
unsigned long* pOffsetInVideoMemory
);
Parameters
- ppSurf
Will contain a pointer to a new DDGPESurf object. - lpDDSurface
A 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
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. - pOffsetInVideoMemory
Will contain a 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 function in your DirectDraw HAL implementation to create a surface in video memory and attach it to a DirectDraw surface for later use.
Keep in mind that 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
Last updated on Tuesday, May 18, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.