I came across this post in which someone wants to find out the name of their monitor using EnumDisplayDevices.
This is exactly what I want, and I tried to do something similar in C++ but the second call to EnumDisplayDevices never seems to return anything, I only get information about the graphics card.
DISPLAY_DEVICE dd;
memset(&dd, 0, sizeof(DISPLAY_DEVICE));
dd.cb = sizeof(dd);
int i = 0;
while(EnumDisplayDevices(NULL, i, &dd, 0))
{
Log(_T("Device Name: %s Device String: %s"), dd.DeviceName, dd.DeviceString);
if(EnumDisplayDevices(dd.DeviceName, 0, &dd, 0))
{
Log(_T("Monitor Name: %s Monitor String: %s"), dd.DeviceName, dd.DeviceString);
}
i++;
}
The output I get is
Device Name: \\.\DISPLAY1 Device String: NVIDIA GeForce 9300 GE
Device Name: \\.\DISPLAYV1 Device String: NetMeeting driver
Device Name: \\.\DISPLAYV2 Device String: RDPDD Chained DD
The target platform is XP, and I can't any standard way of finding out the monitor name. Any ideas?
Thanks.