DXGKDDI_COLLECTDBGINFO callback function (d3dkmddi.h)

The DxgkDdiCollectDbgInfo function outputs driver information for a debug report.



NTSTATUS DxgkddiCollectdbginfo(



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


[in] A pointer to a DXGKARG_COLLECTDBGINFO structure that describes information for the debug report.

Return value

DxgkDdiCollectDbgInfo returns one of the following values:

Return code Description
STATUS_SUCCESS DxgkDdiCollectDbgInfo successfully output driver information for a debug report; otherwise, the operating system ignored the content in the buffer that the pBuffermember of the DXGKARG_COLLECTDBGINFO structure pointed to and added no information from DxgkDdiCollectDbgInfo to the debug report.
STATUS_NO_MEMORY DxgkDdiCollectDbgInfo could not allocate memory that was required for it to complete.
STATUS_UNSUCCESSFULL Another error prevented the driver from collecting valid debug information.


The DirectX graphics kernel subsystem calls the display miniport driver's DxgkDdiCollectDbgInfo function whenever the operating system is about to generate a driver-related debug report. DxgkDdiCollectDbgInfo might be called either immediately before Timeout Detection and Recovery (TDR) work (for more information, see DxgkDdiResetFromTimeout) or immediately before the operating system bug checks.

The display miniport driver should collect debug information. When DxgkDdiCollectDbgInfo is called, the driver receives a bug-check code in the Reason member of the DXGKARG_COLLECTDBGINFO structure that the pCollectDbgInfo parameter points to that indicates the type of information required for the debug report. The driver copies the required debug information to the buffer that the pBuffer member of DXGKARG_COLLECTDBGINFO points to. The BufferSize member of DXGKARG_COLLECTDBGINFO specifies the maximum number of bytes of information that the driver can copy.

DxgkDdiCollectDbgInfo generally runs at an undefined IRQL. However, if the Reason member of the DXGKARG_COLLECTDBGINFO structure that the pCollectDbgInfo parameter points to is set to VIDEO_TDR_TIMEOUT_DETECTED (to indicate an adapter-wide reset) or VIDEO_ENGINE_TIMEOUT_DETECTED (available starting with Windows 8 to indicate a reset of one or more nodes within a physical adapter), the driver must ensure that DxgkDdiCollectDbgInfo is pageable, runs at IRQL = PASSIVE_LEVEL, and supports synchronization zero level.

For more information, see TDR changes in Windows 8.


Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Desktop
Header d3dkmddi.h

See also