DrvEnableDirectDraw function (winddi.h)

The DrvEnableDirectDraw function enables hardware for DirectDraw use.

Syntax

BOOL DrvEnableDirectDraw(
  DHPDEV              dhpdev,
  DD_CALLBACKS        *pCallBacks,
  DD_SURFACECALLBACKS *pSurfaceCallBacks,
  DD_PALETTECALLBACKS *pPaletteCallBacks
);

Parameters

dhpdev

Handle to the PDEV returned by the driver's DrvEnablePDEV routine.

pCallBacks

Points to the DD_CALLBACKS structure to be initialized by the driver.

pSurfaceCallBacks

Points to the DD_SURFACECALLBACKS structure to be initialized by the driver.

pPaletteCallBacks

Points to the DD_PALETTECALLBACKS structure to be initialized by the driver.

Return value

DrvEnableDirectDraw returns TRUE if it succeeds; otherwise, it returns FALSE.

Remarks

GDI calls the driver's DrvEnableDirectDraw function to obtain pointers to the DirectDraw callbacks that the driver supports. The driver should set the function pointer members of DD_CALLBACKS, DD_SURFACECALLBACKS, and DD_PALETTECALLBACKS to point to those functions that it implements. A driver should also set the corresponding bitfields in the dwFlags members of these structures for all supported callbacks.

A driver's DrvEnableDirectDraw implementation can also dedicate hardware resources such as display memory for use by DirectDraw only.

Requirements

Requirement Value
Target Platform Desktop
Header winddi.h (include Winddi.h)

See also

DD_CALLBACKS

DD_PALETTECALLBACKS

DD_SURFACECALLBACKS

DrvDisableDirectDraw

DrvEnablePDEV

DrvGetDirectDrawInfo