PFND3DDDI_DESTROYRESOURCE callback function

The DestroyResource function releases a specified resource.

Syntax

PFND3DDDI_DESTROYRESOURCE Pfnd3dddiDestroyresource;

HRESULT Pfnd3dddiDestroyresource(
  HANDLE hDevice,
   HANDLE
)
{...}

Parameters

hDevice

A handle to the display device (graphics context) that is used to destroy the resource.

HANDLE

Return Value

DestroyResource returns S_OK or an appropriate error result is the resource is not released.

Remarks

After the Microsoft Direct3D runtime calls the user-mode display driver's DestroyResource function, the user-mode display driver must first flush any batched commands that depend on the resource that is being destroyed by calling the runtime's pfnRenderCb function. The driver must then call the runtime's pfnDeallocateCb function to destroy allocations that are associated with the resource.

Note The driver's DestroyResource function is not required to call pfnDeallocateCb before returning; instead, the driver can defer allocation destruction.
Note A separate DestroyResource call is not made for each surface that is part of the resource. So, if a group of surfaces is atomically created, the group is always atomically destroyed as well.
For more information about creating and destroying resources, see Handling Resource Creation and Destruction.

Requirements

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

See Also

OpenResource

CreateResource

pfnRenderCb

pfnDeallocateCb

D3DDDI_DEVICEFUNCS

Send comments about this topic to Microsoft