IDirectDraw4

Applications use the methods of the IDirectDraw4 interface to create DirectDraw objects and work with system-level variables. For a conceptual overview, see DirectDraw in the Graphics and Multimedia guide.

The methods of the IDirectDraw4 interface are organized into the following groups:

Allocating memory Compact
Cooperative levels SetCooperativeLevel
  TestCooperativeLevel
Creating objects CreateClipper
  CreatePalette
  CreateSurface
Device capabilities GetCaps
Display modes EnumDisplayModes
  GetDisplayMode
  GetMonitorFrequency
  RestoreDisplayMode
  SetDisplayMode
  WaitForVerticalBlank
Display status GetScanLine
  GetVerticalBlankStatus
Miscellaneous GetAvailableVidMem
  GetFourCCCodes
Surface management DuplicateSurface
  EnumSurfaces
  FlipToGDISurface
  GetGDISurface
  GetSurfaceFromDC
  RestoreAllSurfaces

The IDirectDraw4 interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

IUnknown AddRef
  QueryInterface
  Release

The IDirectDraw4::GetDeviceIdentifier and IDirectDraw4::Initialize methods are not supported in Windows CE.

The IDirectDraw4 interface extends the features of previous versions of the interface by offering methods enabling more flexible surface management. Note that all of the surface-related methods in the IDirectDraw4 interface accept slightly different parameters than their counterparts in the IDirectDraw2 interface.

Wherever an IDirectDraw2 interface method might accept a DDSURFACEDESC structure and retrieve an IDirectDrawSurface3 interface, the methods in IDirectDraw4 accept a DDSURFACEDESC2 structure and retrieve an IDirectDrawSurface5 interface instead.

IDirectDraw4 introduces improved compliance with COM rules dictating the lifetimes of child objects.

You can use the LPDIRECTDRAW, LPDIRECTDRAW2, or LPDIRECTDRAW4 data types to declare a variable that contains a pointer to an IDirectDraw, IDirectDraw2, or IDirectDraw4 interface. The Ddraw.h header file declares these data types with the following code.

typedef struct IDirectDraw     FAR *LPDIRECTDRAW;
typedef struct IDirectDraw2    FAR *LPDIRECTDRAW2;
typedef struct IDirectDraw4    FAR *LPDIRECTDRAW4;

Requirements

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header: Ddraw.h.
Link Library: Ddraw.lib.

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.