DXGKCB_ACQUIREHANDLEDATA callback function (d3dkmddi.h)

DXGKCB_ACQUIREHANDLEDATA acquires a reference to an allocation.

Syntax

DXGKCB_ACQUIREHANDLEDATA DxgkcbAcquirehandledata;

VOID * DxgkcbAcquirehandledata(
  [in]  IN_CONST_PDXGKARGCB_GETHANDLEDATA unnamedParam1,
  [out] PDXGKARG_RELEASE_HANDLE unnamedParam2
)
{...}

Parameters

[in] unnamedParam1

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

[out] unnamedParam2

Pointer to a release handle for the driver to use when releasing the allocation reference.

Return value

None.

Remarks

Allocation handles can be destroyed at any time by an application or by a user-mode driver call to D3DKMTDestroyAllocation on a valid handle. Allocation destruction involves a request to the kernel-mode driver 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. DXGKCB_ACQUIREHANDLEDATA and DXGKCB_RELEASEHANDLEDATA allow the driver to hold a reference on the Dxgkrnl object and ensure that Dxgkrnl does not 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.

Requirements

Requirement Value
Minimum supported client Windows 10 (WDDM 2.0)
Header d3dkmddi.h
IRQL <= APC_LEVEL

See also

DXGKARGCB_GETHANDLEDATA

DXGKCB_CREATECONTEXTALLOCATION

DXGKCB_RELEASEHANDLEDATA

DXGKRNL_INTERFACE