| DirectX SDK | 
The DirectDraw7.GetDisplayModesEnum method returns a DirectDrawEnumModes object filled with display-mode information.
object.GetDisplayModesEnum( _ 
    flags As CONST_DDEDMFLAGS, _ 
    ddsd As DDSURFACEDESC2) As DirectDrawEnumModes
If the method succeeds, it returns a DirectDrawEnumModes object that you can then query for a description of the display modes.
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 | 
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.
DirectDraw7.SetDisplayMode, DirectDraw7.RestoreDisplayMode, DirectDraw7.GetDisplayModesEnum