Extended Surface Description Structure
The extended DirectDraw surface description structure, DDSURFACEDESC2, is identical to the DDSURFACEDESC structure, except that the pointer to the DDSCAPS structure at the end of the structure has been replaced with a pointer to a DDSCAPS2 structure.
The data blocks for the DdCreateSurface and DdCanCreateSurface driver calls each contain a pointer to a DDSURFACEDESC structure. Beginning with DirectX 6.0, these pointers might actually point to a DDSURFACEDESC2 structure, even though the pointers remain typed as LPDDSURFACEDESC. If a driver chooses, it can examine the dwSize member of the DDSURFACEDESC pointer, and thereby decide if the pointer actually points to a DDSURFACEDESC2 structure. If your driver must run on pre-DirectX 6.0 installations, it must make this check.
If the size returned is sizeof(DDSURFACEDESC2), the driver can then examine the dwCaps2, dwCaps3, and dwCaps4 members of the DDSCAPS2 structure.