Blt
Expand Minimize

OpenResource routine

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

Syntax


PFND3DDDI_OPENRESOURCE OpenResource;

__checkReturn HRESULT APIENTRY OpenResource(
  _In_     HANDLE hDevice,
  _Inout_  D3DDDIARG_OPENRESOURCE *pResource
)
{ ... }

Parameters

hDevice [in]

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

pResource [in, out]

A pointer to a D3DDDIARG_OPENRESOURCE structure that describes the resource that is opened.

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

Version

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

Header

D3dumddi.h (include D3dumddi.h)

See also

D3DDDIARG_OPENRESOURCE
D3DDDI_DEVICEFUNCS
D3DDDI_OPENALLOCATIONINFO
DxgkDdiCreateAllocation

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft