Hardware Dev Center

Blt
Expand Minimize

DestroyDevice routine

The DestroyDevice function destroys a graphics context.

Syntax


PFND3DDDI_DESTROYDEVICE DestroyDevice;

__checkReturn HRESULT APIENTRY DestroyDevice(
  _In_ HANDLE hDevice
)
{ ... }

Parameters

hDevice [in]

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

Target platform

Desktop

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

D3dumddi.h (include D3dumddi.h)

See also

CreateDevice
pfnDeallocateCb
pfnLockCb
pfnUnlockCb

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft