DXGKDDI_DESTROYMEMORYBASIS callback function (d3dkmddi.h)

KMD's DxgkDdiDestroyMemoryBasis function destroys a memory basis that was created by a previous call to DxgkDdiCreateMemoryBasis.

Syntax

DXGKDDI_DESTROYMEMORYBASIS DxgkddiDestroymemorybasis;

NTSTATUS DxgkddiDestroymemorybasis(
  IN_CONST_HANDLE hAdapter,
  IN_CONST_HANDLE hMemoryBasis
)
{...}

Parameters

hAdapter

[in] A handle to a context block associated with a display adapter. KMD previously provided this handle to Dxgkrnl in the MiniportDeviceContext output parameter of the DxgiDdiAddDevice function.

hMemoryBasis

Handle to the memory basis to destroy. This handle was previously created by a call to DxgkDdiCreateMemoryBasis.

Return value

DxgkDdiDestroyMemoryBasis returns STATUS_SUCCESS if the memory basis was successfully destroyed. Otherwise, it returns an NTSTATUS error code. See Remarks.

Remarks

Dxgkrnl interprets any returned NTSTATUS that isn't STATUS_SUCCESS as a catastrophic error notification return. There should be no correct-functioning path to return anything but success from this function, as it should be an assumed invariant that the supplied handle is one that was created and has not yet been destroyed. If KMD detects bad input, a returned error code lets Dxgkrnl assign the invariant failure to the OS kernel instead of a driver crash.

For more information, see Dirty bit tracking.

Requirements

Requirement Value
Minimum supported client Windows 11, version 24H2 (WDDM 3.2)
Header d3dkmddi.h
IRQL PASSIVE_LEVEL

See also

DxgkDdiCreateMemoryBasis