DirectX SDK

DirectDraw7.GetSurfacesEnum

The DirectDraw7.GetSurfacesEnum method returns a DirectDrawEnumSurfaces object that is used to enumerate the attached surfaces of the DirectDraw7 object.

object.GetSurfacesEnum( _ 
    flags As CONST_DDENUMSURFACESFLAGS, _ 
    desc As DDSURFACEDESC2) As DirectDrawEnumSurfaces

Parameters

object
Object expression that resolves to a DirectDraw7 object.
flags
CONST_DDENUMSURFACESFLAGS enumeration containing a combination of one search-type flag and one matching flag. The search-type flag determines how the method searches for matching surfaces; you can search for surfaces that can be created, using the description in the desc parameter, or you can search for existing surfaces that already match that description. The matching flag determines whether the method enumerates all surfaces, only those that match, or only those that do not match the description in the desc parameter.
desc
DDSURFACEDESC2 type that defines the surface of interest.

Return Values

If the method succeeds, it returns a DirectDrawEnumSurfaces object that you can then query for a description of the attached surfaces.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
E_OUTOFMEMORY

Remarks

If the DDENUMSURFACES_CANBECREATED flag is set, this method attempts to temporarily create a surface that meets the search criteria.