Platform SDK: DirectX

DirectDraw7.GetDisplayModesEnum

The DirectDraw7.GetDisplayModesEnum method returns a DirectDrawEnumModes object filled with display-mode information.

object.GetDisplayModesEnum( _ 
    flags As CONST_DDEDMFLAGS, _ 
    ddsd As DDSURFACEDESC2) As DirectDrawEnumModes

Parameters

object
Object expression that resolves to a DirectDraw7 object.
flags
One of the constants of the CONST_DDEDMFLAGS enumeration.
ddsd
DDSURFACEDESC2 type to be filled with a description of the surface display mode.

Return Values

If the method succeeds, it returns a DirectDrawEnumModes object that you can then query for a description of the display modes.

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

An application should not save the information returned by this method to restore the display mode on clean-up. The application should use the DirectDraw7.RestoreDisplayMode method to restore the mode on clean-up, thus avoiding mode-setting conflicts that could arise in a multiprocess environment.

See Also

DirectDraw7.SetDisplayMode, DirectDraw7.RestoreDisplayMode, DirectDraw7.GetDisplayModesEnum