PFND3DDDI_OPENRESOURCE callback function

The OpenResource function informs the driver that a shared resource is opened.

Syntax

PFND3DDDI_OPENRESOURCE Pfnd3dddiOpenresource;

HRESULT Pfnd3dddiOpenresource(
  HANDLE hDevice,
  D3DDDIARG_OPENRESOURCE *
)
{...}

Parameters

hDevice

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

*

Return Value

OpenResource returns S_OK or an appropriate error result if the resource is not successfully opened.

Remarks

The Microsoft Direct3D runtime calls the user-mode display driver's OpenResource function to inform the user-mode display driver that a shared resource is opened. The driver should store any information that is required to describe the resource and return a unique handle in the hResource member of the D3DDDIARG_OPENRESOURCE structure (pointed to by the pResource parameter) that identifies the new resource in subsequent calls that the Direct3D runtime makes to the driver. The private driver data that is passed to OpenResource is the same private driver data that was passed to the display miniport driver's DxgkDdiCreateAllocation function when the resource was created.

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.
Target Platform Desktop
Header d3dumddi.h (include D3dumddi.h)

See Also

D3DDDIARG_OPENRESOURCE

D3DDDI_DEVICEFUNCS

D3DDDI_OPENALLOCATIONINFO

DxgkDdiCreateAllocation