PDD_DESTROYDDLOCAL callback function (ddrawint.h)

The D3dDestroyDDLocal function destroys all the Microsoft Direct3D surfaces previously created by the D3dCreateSurfaceEx function that belong to the same given local Microsoft DirectDraw object.

Syntax

PDD_DESTROYDDLOCAL PddDestroyddlocal;

DWORD PddDestroyddlocal(
  PDD_DESTROYDDLOCALDATA unnamedParam1
)
{...}

Parameters

unnamedParam1

Points to a DDHAL_DESTROYDDLOCALDATA structure that contains the information required for the driver to destroy the surfaces.

Return value

D3dDestroyDDLocal returns one of the following callback codes:

Remarks

All Direct3D drivers must support D3dDestroyDDLocal.

Direct3D calls D3dDestroyDDLocal when the application indicates that the Direct3D context is no longer required and it will be destroyed along with all surfaces associated to it. The association comes through the pointer to the local DirectDraw object. The driver must free any memory that the driver's D3dCreateSurfaceEx callback allocated for each surface, if necessary.

The driver should not destroy the DirectDraw surfaces associated with these Direct3D surfaces. This is the application's responsibility.

The pointer to the DD_DIRECTDRAW_LOCAL structure that was passed in as the lpDDLcl member of the D3DHAL_CONTEXTCREATEDATA structure when D3dContextCreate was called is released by the operating system after D3dDestroyDDLocal returns.

D3dDestroyDDLocal can be called with a disabled PDEV. A PDEV is disabled or enabled by calling the display driver's DrvAssertMode function. See Managing PDEVs for more information.

Requirements

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

See also

D3DHAL_CONTEXTCREATEDATA

D3dContextCreate

D3dCreateSurfaceEx

DDHAL_DESTROYDDLOCALDATA

DD_DIRECTDRAW_LOCAL