// d3dumddi.h
PFND3DDDI_DESTROYDEVICE Pfnd3dddiDestroydevice;
HRESULT Pfnd3dddiDestroydevice(
HANDLE hDevice
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The DestroyDevice function destroys a graphics context.
hDeviceA handle to the display device (graphics context) being destroyed.
DestroyDevice returns S_OK or an appropriate error result.
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.