Expand Minimize

DxgkDdiCancelCommand routine

Cleans up internal resources associated with a direct memory access (DMA) packet that was in the GPU scheduler's software queue but never reached the hardware queue because the device went into an error state. Such an error state is typically caused by a Timeout Detection and Recovery (TDR) event.



_Check_return_ NTSTATUS APIENTRY* DxgkDdiCancelCommand(
  _In_  const HANDLE hAdapter,
  _In_  const DXGKARG_CANCELCOMMAND *pCancelCommand
{ ... }


hAdapter [in]

A handle to a context block that is associated with a display adapter. The display miniport driver previously provided this handle to the DirectX graphics kernel subsystem in the MiniportDeviceContext output parameter of the DxgkDdiAddDevice function.

pCancelCommand [in]

A pointer to a DXGKARG_CANCELCOMMAND structure that specifies resources to be cleaned up after a command is removed from the hardware queue.

Return value

Returns STATUS_SUCCESS upon successful completion. If the driver instead returns an error code, the operating system causes a system bugcheck to occur. For more information, see the following Remarks section.


Note  The DirectX graphics kernel subsystem calls this function only if the DXGK_VIDSCHCAPS.CancelCommandAware member is set.

If the driver returns an error code, the DirectX graphics kernel subsystem causes a system bugcheck to occur. In a crash dump file, the error is noted by the message BugCheck 0x119, which has the following four parameters.

  1. 0x9
  2. The NTSTATUS error code returned from the failed driver call
  3. A pointer to the DXGKARG_CANCELCOMMAND structure
  4. A pointer to an internal scheduler data structure


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012


D3dkmddi.h (include D3dkmddi.h)



See also




Send comments about this topic to Microsoft

© 2014 Microsoft