Microsoft Windows CE 3.0  

IDirectDraw4

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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

The methods of the IDirectDraw4interface are organized into the following groups:

Allocating memory Compact
  Initialize
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
  GetDeviceIdentifier
  GetFourCCCodes
Surface management DuplicateSurface
  EnumSurfaces
  FlipToGDISurface
  GetGDISurface
  GetSurfaceFromDC
  RestoreAllSurfaces

The IDirectDraw4interface, like all COM interfaces, inherits the IUnknowninterface methods. The IUnknowninterface supports the following three methods:

IUnknown AddRef
  QueryInterface
  Release

The IDirectDraw4interface 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 IDirectDraw4interface accept slightly different parameters than their counterparts in the IDirectDraw2interface.

Wherever an IDirectDraw2interface method might accept a DDSURFACEDESCstructure and retrieve an IDirectDrawSurface3interface, the methods in IDirectDraw4accept a DDSURFACEDESC2structure and retrieve an IDirectDrawSurface5interface instead.

IDirectDraw4introduces improved compliance with COM rules dictating the lifetimes of child objects. For more information, see "DirectDraw" in the Graphics and Multimedia guide.

You can use the LPDIRECTDRAW, LPDIRECTDRAW2, or LPDIRECTDRAW4data types to declare a variable that contains a pointer to an IDirectDraw, IDirectDraw2, or IDirectDraw4interface. 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

Runs on Versions Declared in Link to
Windows CE OS 2.12 or later. Version 2.12 requires DXPAK 1.0 or later. ddraw.h ddraw.lib