When trying to Rotate Desktop, running the code in a Remote Desktop, I've got the exception:
Error trying to GetActiveDisplays() : QueryDisplayConfig() failed. Status: InvalidParameter;
Running it in local works fine!
It is not possible to do in Remote Desktop?
The code is:
var pathInfoArray = new DisplayConfigPathInfo[numPathArrayElements];
var modeInfoArray = new DisplayConfigModeInfo[numModeInfoArrayElements];
// topology ID only valid with QDC_DATABASE_CURRENT
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);
Running this on remote desktops queryDisplayStatus
returns with InvalidParameter
.