See this question and use the provided (and corrected in response) shell for QueryDisplayConfig.
change the import signature to have out DisplayConfigTopologyId topologyas the last parameter.
Use QueryDisplayFlags.DatabaseCurrentfor display flags, otherwise you will get the status 87 (invalid parameter)
After calling QueryDisplayFlags, the topology will be Clone, Extendetc.
...
var status = CCDWrapper.QueryDisplayConfig(
CCDWrapper.QueryDisplayFlags.DatabaseCurrent,
ref numPathArrayElements, pathInfoArray, ref numModeInfoArrayElements,
modeInfoArray, out currentTopologyId);
numPathArrayElements , . " 1", 1 , . " 2" 1 . "Cloned" 2 .