Thanks Roy, for answering.
As far as I understand, the Powershell is a command-based application used for VE administration. Maybe not easy to use this approach from within a client application? (Is Powershell available on all Windows versions?)
Is there an API that a C++ program can use to check at run-time if it is running in real or virtual mode? I have tried to use the presence of the registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SoftGrid] as an indication that the machine
is virtual, but after the latest Windows 10 update, this registry key is present even when running non-virtual.
The test for SoftGrid is probably just non-sense, but it has indeed seemed to work up until now.
I found
another suggestion to check the value of the environment variable SESSIONNAME. Maybe that is the way to go? (Which values to check for?)