You need the
QueryDisplayConfig function via user32.dll.
The parameter
pCurrentTopologyId determines whether multiple monitors run in cloned mode.
See the
DISPLAYCONFIG_TOPOLOGY_ID enumeration for interpretation.
I found this subproject on GitHub:
MultiMonitorHelper
Line 86 in
DisplayModels/Win7/Win7DisplayModel.Helper.cs:
var queryDisplayStatus = pathType == QueryDisplayFlags.DatabaseCurrent ?
CCDWrapper.QueryDisplayConfig(
pathType,
ref numPathArrayElements, pathInfoArray,
ref numModeInfoArrayElements, modeInfoArray, out topologyId) :
CCDWrapper.QueryDisplayConfig(
pathType,
ref numPathArrayElements, pathInfoArray,
ref numModeInfoArrayElements, modeInfoArray);