PFND3DDDI_DESTROYDEVICE callback function (d3dumddi.h)

The DestroyDevice function destroys a graphics context.

Syntax

PFND3DDDI_DESTROYDEVICE Pfnd3dddiDestroydevice;

HRESULT Pfnd3dddiDestroydevice(
  HANDLE hDevice
)
{...}

Parameters

hDevice

A handle to the display device (graphics context) being destroyed.

Return value

DestroyDevice returns S_OK or an appropriate error result.

Remarks

The driver should free all of the resources that it allocated for the device and clean up any internal tracking data structures.

Before the driver calls the pfnDeallocateCb function to release allocations, the driver must ensure that the allocations are unlocked. In other words, in the lifetime of a device, every call to the pfnLockCb function to lock an allocation must be paired with a call to the pfnUnlockCb function to unlock the allocation. However, in one call to pfnUnlockCb, the driver can unlock multiple allocations that were each allocated in separate pfnLockCb calls.

Requirements

   
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Desktop
Header d3dumddi.h (include D3dumddi.h)

See also

CreateDevice

pfnDeallocateCb

pfnLockCb

pfnUnlockCb