Virtualbox WDDM之DxgkDdiQueryChildRelations

来源:互联网 发布:中国人的凝聚力 知乎 编辑:程序博客网 时间:2024/05/31 19:46

枚举多个显示器,

The DxgkDdiQueryChildRelations function enumerates the child devices of a display adapter.

https://msdn.microsoft.com/en-us/library/windows/hardware/ff559750(v=vs.85).aspx


TypeVideoOutput

Indicates that the child device is a video output. A video output is the circuitry on the display adapter that supplies a video signal to an external or integrated monitor (or other display device). Note that monitors, integrated LCD panels, and other devices that actually display an image are not considered child devices of the display adapter.

HpdAwarenessAlwaysConnected

Indicates that the child device is always connected; that is, it does not serve as a connector for external devices.

D3DKMDT_MOA_NONE

Indicates that the video output device is unable to determine the orientation of a connected external display device.

D3DKMDT_VOT_OTHER

Indicates that the video output device connects to an external display device through a connector that is not one of the types that is indicated by the following values in this enumeration.

SupportsSdtvModes

Indicates whether the video output supports standard definition TV (SDTV) modes.

ChildRelations
 The last structure in the array must remain zeroed.

https://msdn.microsoft.com/en-us/library/windows/hardware/ff559750(v=vs.85).aspx


NTSTATUS DxgkDdiQueryChildRelations(    IN CONST PVOID MiniportDeviceContext,    IN OUT PDXGK_CHILD_DESCRIPTOR ChildRelations,    IN ULONG ChildRelationsSize    ){    dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));    for(ULONG i = 0; i < ChildRelationsSize; i++)    {        ChildRelations[i].ChildDeviceType = TypeVideoOutput;        ChildRelations[i].ChildCapabilities.Type.VideoOutput.InterfaceTechnology = D3DKMDT_VOT_OTHER;        ChildRelations[i].ChildCapabilities.Type.VideoOutput.MonitorOrientationAwareness = D3DKMDT_MOA_NONE;        ChildRelations[i].ChildCapabilities.Type.VideoOutput.SupportsSdtvModes = FALSE;        ChildRelations[i].ChildCapabilities.HpdAwareness = HpdAwarenessAlwaysConnected;        ChildRelations[i].AcpiUid =  i+1; /* @todo: do we need it? could it be zero ? */        ChildRelations[i].ChildUid = i+1; /* could it be zero ? */    }    dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));    return STATUS_SUCCESS;}


0 0
原创粉丝点击