DXGKDDI_QUERY_CHILD_STATUS callback function (dispmprt.h)

The DxgkDdiQueryChildStatus function returns the status of an individual child device of a display adapter.

Syntax

DXGKDDI_QUERY_CHILD_STATUS DxgkddiQueryChildStatus;

NTSTATUS DxgkddiQueryChildStatus(
  [in]      IN_CONST_PVOID MiniportDeviceContext,
  [in, out] INOUT_PDXGK_CHILD_STATUS ChildStatus,
  [in]      IN_BOOLEAN NonDestructiveOnly
)
{...}

Parameters

[in] MiniportDeviceContext

A handle to a context block associated with a display adapter. The display miniport driver's DxgkDdiAddDevice function previously provided this handle to the DirectX graphics kernel subsystem.

[in, out] ChildStatus

A pointer to a DXGK_CHILD_STATUS structure. The caller supplies ChildStatus->Type and ChildStatus->ChildUid. On return, the remaining structure member (a union) receives the requested status.

[in] NonDestructiveOnly

A BOOLEAN value that specifies whether the display miniport driver is permitted to determine the requested status in a way that causes visual artifacts. If the caller sets this parameter to TRUE, then the display miniport driver is not permitted to cause artifacts. If the caller sets this parameter to FALSE, then the display miniport driver is permitted to cause artifacts.

Return value

DxgkDdiQueryChildStatus returns STATUS_SUCCESS if it succeeds; otherwise, it returns one of the error codes defined in Ntstatus.h.

Remarks

During initialization, the display port driver calls DxgkDdiQueryChildRelations to get a list of devices that are children of the display adapter represented by MiniportDeviceContext. Then for each child that has an HPD awareness value of HpdAwarenessPolled or HpdAwarenessInterruptible, the display port driver calls DxgkDdiQueryChildStatus to determine whether the child currently has hardware (for example a monitor) connected to it.

DxgkDdiQueryChildStatus must perform the following actions:

  • If ChildStatus->Type is equal to StatusConnection, return a Boolean value in ChildStatus->HotPlug.Connected. Return TRUE if the child device identified by ChildStatus->ChildUid has external hardware connected to it; otherwise return FALSE.
  • If ChildStatus->Type is equal to StatusRotation, return (in ChildStatus->Rotation.Angle) the angle of rotation for the display connected to the child device identified by ChildStatus->ChildUid.
DxgkDdiQueryChildStatus should be made pageable.

Requirements

Requirement Value
Minimum supported client Windows Vista
Target Platform Desktop
Header dispmprt.h
IRQL PASSIVE_LEVEL

See also

DXGK_CHILD_STATUS

DXGK_CHILD_STATUS_TYPE

DxgkDdiQueryChildRelations