Share via


DDGPE::AllocVideoSurface (Windows Embedded CE 6.0)

1/6/2010

This method creates a DDGPESurf object in video memory and optionally associates it with a DirectDraw surface.

Syntax

virtual SCODE AllocVideoSurface(
  DDGPESurf** ppSurf,
  int width,
  int height,
  EGPEFormat format,
  EDDGPEPixelFormat pixelFormat,
  unsigned long* pOffsetInVideoMemory
);
virtual SCODE AllocVideoSurface(
  LPDDRAWI_DDRAWSURFACE_LCL 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_LCL lpDDSurface,
  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.

Return Value

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

Header ddgpe.h
Library Ddgpe.lib
Windows Embedded CE Windows Embedded CE 6.0 and later

See Also

Reference

DDGPEAllocSurfaceData

Concepts

DDGPE Class
DDGPE Class Definition