How to get video driver version?
-
I've been trying to get video driver version information, and video adapter information. I'm using VC++ and the code needs to execute on Win95/Win NT 4.0, so that rules out using some of the newer functionality in Win98 and Win2000. I've tried, the following, but for the driver name I get a name that looks like a dll name (which coincidentally exists as a name.dll in \winnt\system32). The driver version value comes back as 0125 (0x0401). If I use the display properties->settings dialog I get a different name (ie its more like PerMedia Fire GL Pro 1000 etc) and a different version number. Anybody any idea what I should be doing instead of what I am doing? decodeVersion() just swaps the DWORD value into a double assuming that 0x0401 maps to 4.01 (which is true for other parts of the OS, like file versions). Hoping you can help me. Stephen Kellett (skellett at solidworks dot com) DEVMODE devMode; BOOL rc; ZeroMemory(&devMode, sizeof(devMode)); devMode.dmSize = sizeof(devMode); rc = EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devMode); if (rc) { // got valid data, see what we've got TCHAR text[200]; double version; version = decodeVersion(devMode.dmDriverVersion); _stprintf(text, _T("%s V%2.2f X%d Y%d %d bits %dHz"), devMode.dmDeviceName, version, devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel, devMode.dmDisplayFrequency); }
-
I've been trying to get video driver version information, and video adapter information. I'm using VC++ and the code needs to execute on Win95/Win NT 4.0, so that rules out using some of the newer functionality in Win98 and Win2000. I've tried, the following, but for the driver name I get a name that looks like a dll name (which coincidentally exists as a name.dll in \winnt\system32). The driver version value comes back as 0125 (0x0401). If I use the display properties->settings dialog I get a different name (ie its more like PerMedia Fire GL Pro 1000 etc) and a different version number. Anybody any idea what I should be doing instead of what I am doing? decodeVersion() just swaps the DWORD value into a double assuming that 0x0401 maps to 4.01 (which is true for other parts of the OS, like file versions). Hoping you can help me. Stephen Kellett (skellett at solidworks dot com) DEVMODE devMode; BOOL rc; ZeroMemory(&devMode, sizeof(devMode)); devMode.dmSize = sizeof(devMode); rc = EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devMode); if (rc) { // got valid data, see what we've got TCHAR text[200]; double version; version = decodeVersion(devMode.dmDriverVersion); _stprintf(text, _T("%s V%2.2f X%d Y%d %d bits %dHz"), devMode.dmDeviceName, version, devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel, devMode.dmDisplayFrequency); }
-
I've been trying to get video driver version information, and video adapter information. I'm using VC++ and the code needs to execute on Win95/Win NT 4.0, so that rules out using some of the newer functionality in Win98 and Win2000. I've tried, the following, but for the driver name I get a name that looks like a dll name (which coincidentally exists as a name.dll in \winnt\system32). The driver version value comes back as 0125 (0x0401). If I use the display properties->settings dialog I get a different name (ie its more like PerMedia Fire GL Pro 1000 etc) and a different version number. Anybody any idea what I should be doing instead of what I am doing? decodeVersion() just swaps the DWORD value into a double assuming that 0x0401 maps to 4.01 (which is true for other parts of the OS, like file versions). Hoping you can help me. Stephen Kellett (skellett at solidworks dot com) DEVMODE devMode; BOOL rc; ZeroMemory(&devMode, sizeof(devMode)); devMode.dmSize = sizeof(devMode); rc = EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devMode); if (rc) { // got valid data, see what we've got TCHAR text[200]; double version; version = decodeVersion(devMode.dmDriverVersion); _stprintf(text, _T("%s V%2.2f X%d Y%d %d bits %dHz"), devMode.dmDeviceName, version, devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel, devMode.dmDisplayFrequency); }