DD_SURFACE_GLOBAL

typedef struct _DD_SURFACE_GLOBAL{
    DWORD                dwBlockSizeY;
    union {
        DWORD            dwBlockSizeX;
        DWORD            dwUserMemSize;
    };
    FLATPTR              fpVidMem;
    LONG                 lPitch;
    LONG                 yHint;
    LONG                 xHint;
    DWORD                wHeight;
    DWORD                wWidth;
    DWORD                dwReserved1;
    DDPIXELFORMAT        ddpfSurface;
} DD_SURFACE_GLOBAL;

The DD_SURFACE_GLOBAL structure contains surface-related data that applies globally to all duplicate surface objects.

Members

dwBlockSizeY
Location in which the driver returns the height, in scanlines, of the off-screen memory block that it wants DirectDraw to allocate. The driver should set this value when it returns DDHAL_PLEASEALLOC_BLOCKSIZE in fpVidMem.
dwBlockSizeX
Location in which the driver returns the size in bytes of the width of the off-screen memory block that it wants DirectDraw to allocate. The driver should set this value when it returns DDHAL_PLEASEALLOC_BLOCKSIZE in fpVidMem.
dwUserMemSize
Location in which the driver returns the size in bytes of the memory block that it wants DirectDraw to allocate in user-mode system memory. The driver should set this value when it returns DDHAL_PLEASEALLOC_USERMEM in fpVidMem.
fpVidMem
If the driver allocates the memory block, it should return the offset into video memory in this field. If the driver wants DirectDraw to do the memory allocation, it can instead return one of the following values in this field from its CreateSurface routine:

Value

Meaning

DDHAL_PLEASEALLOC_BLOCKSIZE

Driver wants DirectDraw to allocate a memory block of size dwBlockSizeX in off-screen memory.

DDHAL_PLEASEALLOC_USERMEM

Driver wants DirectDraw to allocate a memory block of size dwBlockSizeX in user-mode memory.

lPitch
Specifies the pitch of the surface; that is, the distance to the start of the next line. This is also known as the stride of the surface.
yHint
Specifies the y-coordinate of the surface. This field is a 2D Cartesian coordinate specified in device space.
xHint
Specifies the x-coordinate of the surface. This field is a 2D Cartesian coordinate specified in device space.
wHeight
Specifies the height of the surface.
wWidth
Specifies the width of the surface.
dwReserved1
Reserved for use by the display driver.
ddpfSurface
Pointer to the DDPIXELFORMAT structure that describes the pixel format of the surface.