IDirectDraw7::GetDisplayMode method (ddraw.h)

Retrieves the current display mode.

Syntax

HRESULT GetDisplayMode(
  [in] LPDDSURFACEDESC2 unnamedParam1
);

Parameters

[in] unnamedParam1

A pointer to a DDSURFACEDESC2 structure that receives a description of the current surface.

Return value

If the method succeeds, the return value is DD_OK.

If it fails, the method can return one of the following error values:

  • DDERR_INVALIDOBJECT
  • DDERR_INVALIDPARAMS
  • DDERR_UNSUPPORTEDMODE

Remarks

An application should not save the information that GetDisplayMode returns to restore the display mode on clean-up. The application should instead use the IDirectDraw7::RestoreDisplayMode method to restore the mode on clean-up, thus avoiding mode-setting conflicts that could arise in a multiprocess environment.

Requirements

Requirement Value
Target Platform Windows
Header ddraw.h
Library Ddraw.lib
DLL Ddraw.dll

See also

IDirectDraw7