Microsoft Windows CE 3.0  

AllocVideoSurface

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The AllocVideoSurfacefunction creates a DDGPESurfobject in video memory, and optionally associates it with a DirectDraw surface.

You would use 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 function, 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 functions in your own source code.

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 DDGPESurfobject.
lpDDSurface
A pointer to an existing DirectDraw surface. A new DDGPESurfobject will be attached to it. Any existing DDGPESurfobject 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.



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.