I don't have any experience developing a VNC application, but maybe a suggestion might start you off on the right path.
Download wmiexplorer
- Run the program
- Here you can explorer different classes in WMI, which will be the lowest level I think you're going to get
- Go to the Query tab and enter the query:
"select * from Win32_DesktopMonitor"
I think this is the information you can use to figure out information about your monitors. (I'm not sure what classes have information that relates to monitors)
In particular, check out Availability for the Win32_DesktopMonitor class.
Update
Running this query on a remote machine Description and DeviceID and Name came back as "Default Monitor." On my real machine, it came back as "Generic PnP Monitor" as well as had a MonitorManufacturer
set, where as the remote machine didn't. You could even go as far as comparing the queried monitor with Screen
resolution or maybe SystemName
returned in the query vs. the system name of the computer running the application.
Use the ManagementObjectSearcher to execute WMI queries.
Edit
You could also do the mapping/cross-checking of devices like the example shown here does. Notice the ClassGUID
is the same between MonitorDesktop and PnPEntity.