This class represents a surface allocated, either by the driver or by the Graphical Device Interface (GDI). The surface retains pixels in system memory or, if available on the Windows CE–based platform, in video memory.
Generally, this class is created for all surfaces when the driver allocates memory; for example, in response to the DrvCreateDeviceBitmap function. If the GDI allocates the surface, the driver creates a temporary surface of the TmpGPESurf class, which is derived from this class. This class is a wrapper around the SURFOBJ type created by the GPE. TmpGPESurf objects persist only for the duration of the call to the display driver.
This class provides a number of methods for a driver to retrieve pointers to pixel data, pixel format, stride, height, and width. In addition, GPESurf retains a flag to indicate whether the data is stored in video memory, which is verified by a call to the GPESurf::InVideoMemory method. The class also retains a flag that determines whether memory should be de-allocated when the GPESurf object is deleted.
Typically, you derive a new surface class based on the GPESurf class for video memory allocations.