Skip to content

Latest commit

 

History

History
76 lines (58 loc) · 3.04 KB

nc-d3dkmddi-dxgkcb_acquirehandledata.md

File metadata and controls

76 lines (58 loc) · 3.04 KB
UID title description ms.date keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.lib req.dll req.irql req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library targetos ms.custom tech.root f1_keywords topic_type api_type api_location api_name dev_langs
NC:d3dkmddi.DXGKCB_ACQUIREHANDLEDATA
DXGKCB_ACQUIREHANDLEDATA (d3dkmddi.h)
Learn more about the DXGKCB_ACQUIREHANDLEDATA callback function.
07/01/2024
DXGKCB_ACQUIREHANDLEDATA callback function
d3dkmddi.h
Windows 10 (WDDM 2.0)
<= APC_LEVEL
Windows
RS5
display
DXGKCB_ACQUIREHANDLEDATA
d3dkmddi/DXGKCB_ACQUIREHANDLEDATA
apiref
UserDefined
d3dkmddi.h
DXGKCB_ACQUIREHANDLEDATA
c++

DXGKCB_ACQUIREHANDLEDATA callback function

-description

DxgkcbAcquirehandledata acquires a reference to an allocation.

-parameters

-param unnamedParam1 [in]

Pointer to a DXGKARGCB_GETHANDLEDATA structure that describes an allocation handle returned by DxgkcbCreatecontextallocation.

-param unnamedParam2 [out]

Pointer to a release handle for the kernel-mode driver (KMD) to manage the lifetime of the reference to acquired allocation. The KMD uses this handle when it calls DxgkcbReleasehandledata to release the allocation reference.

-returns

DxgkcbAcquirehandledata returns a handle to the allocation that the KMD requested a reference to. The KMD uses this handle for subsequent operations on the allocation or resource.

-remarks

An application or user-mode driver can call D3DKMTDestroyAllocation at any time to destroy an allocation handle. Allocation destruction involves a request to the KMD to delete the allocation object that Dxgkrnl returned to them during allocation creation, so the KMD could end up with a stale pointer to freed memory. DxgkcbAcquirehandledata and DxgkcbReleasehandledata allow the driver to hold a reference on the Dxgkrnl object and ensure that Dxgkrnl doesn't destroy the allocation and the KMD-associated objects until after the release call is made.

DXGKCB_XXX functions are implemented by Dxgkrnl. To use this callback function, set the members of DXGKARGCB_GETHANDLEDATA and then call DxgkCbAcquireHandleData via the DXGKRNL_INTERFACE.

-see-also

DXGKARGCB_GETHANDLEDATA

DxgkcbCreatecontextallocation

DxgkcbReleasehandledata

DXGKRNL_INTERFACE