// dispmprt.h
DXGKCB_INDICATE_CHILD_STATUS DxgkcbIndicateChildStatus;
NTSTATUS DxgkcbIndicateChildStatus(
[in] HANDLE DeviceHandle,
[in] PDXGK_CHILD_STATUS ChildStatus
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The DxgkCbIndicateChildStatus function records the current status of a specified child device of a display adapter.
DeviceHandle [in]A handle that represents a display adapter. The display miniport driver previously obtained this handle in the DeviceHandle member of the DXGKRNL_INTERFACE structure that was passed to DxgkDdiStartDevice.
ChildStatus [in]A pointer to a DXGK_CHILD_STATUS structure that identifies the child device and describes the current status of the child device.
DxgkCbIndicateChildStatus returns STATUS_SUCCESS if it succeeds. Otherwise, it returns one of the error codes defined in Ntstatus.h.
The display miniport driver's DPC for ISR calls DxgkCbIndicateChildStatus when the display adapter generates an interrupt for any of the following reasons:
The display miniport driver's DxgkDdiNotifyAcpiEvent function calls DxgkCbIndicateChildStatus in the following situations:
The following code example shows how to record the current status of a child device.
NTSTATUS
AtiSimulateMonitor(HW_DEVICE_EXTENSION *pHwDeviceExtension, PR2_SIMULATE_MONITOR i_pEscape)
{
NTSTATUS Status;
PVOID MonitorDescriptor = NULL;
DXGK_CHILD_STATUS ChildStatus;
ChildStatus.ChildUid = pHwDeviceExtension->ulNumberDisplays | HW_ID_DISPLAY_CHILD;
ChildStatus.Type = StatusConnection;
if(i_pEscape->Data == NULL) {
// Remove a simulated monitor
if(pHwDeviceExtension->pvSimulatedMonitorDescriptor != NULL) {
ExFreePoolWithTag(pHwDeviceExtension->pvSimulatedMonitorDescriptor, ATI_TAG);
pHwDeviceExtension->pvSimulatedMonitorDescriptor = NULL;
pHwDeviceExtension->ulSimulatedMonitorDescriptorLength = 0;
pHwDeviceExtension->ulRetryCount = 0;
pHwDeviceExtension->bReportDescriptor = FALSE;
ChildStatus.HotPlug.Connected = FALSE;
Status = DxgkCbIndicateChildStatus(pHwDeviceExtension->DeviceHandle, &ChildStatus);
}
else {
// No simulated monitor is present so the request to remove one is invalid
return STATUS_INVALID_PARAMETER;
}
}
else {
//Add a simulated monitor
}
return Status;
}