Determine graphics card
-
Hi together, I need your help: I have to find out what kind of graphics card is installed on a PC (e.g. ATI or NVIDIA and what kind of model). More specifically, I need to know if the card supports the languages cg or glsl, but that can be derived from the graphics card model, of course. Can anybody give me a hint on how to do that? :rose:Thank you very much in advance. Regards, Marcus.
-
Hi together, I need your help: I have to find out what kind of graphics card is installed on a PC (e.g. ATI or NVIDIA and what kind of model). More specifically, I need to know if the card supports the languages cg or glsl, but that can be derived from the graphics card model, of course. Can anybody give me a hint on how to do that? :rose:Thank you very much in advance. Regards, Marcus.
You can use a simple diagnostic program called dxdiag to determine your computer's hardware, operating system, and graphics card. To use the dxdiag program: 1. Select "Start" 2. Choose "Run." 3. Type "dxdiag" in the box and click "OK." 4. Click "Yes" to the prompt, and the program will begin running. 5. Select the "Display" tab and the Name listed under the "Device" section is the name of your graphics card. Appu.. "If you judge people, you have no time to love them."
-
You can use a simple diagnostic program called dxdiag to determine your computer's hardware, operating system, and graphics card. To use the dxdiag program: 1. Select "Start" 2. Choose "Run." 3. Type "dxdiag" in the box and click "OK." 4. Click "Yes" to the prompt, and the program will begin running. 5. Select the "Display" tab and the Name listed under the "Device" section is the name of your graphics card. Appu.. "If you judge people, you have no time to love them."
Thank you very much for the detailed instruction. The information presented in the dialog is exacly what I was looking for, but I need it in a C++ program. I forgot to mention that, but that's why I posted my question to the C++ forum :) Do you have any idea how to do that? Thanks again! Regards, Marcus.
-
Hi together, I need your help: I have to find out what kind of graphics card is installed on a PC (e.g. ATI or NVIDIA and what kind of model). More specifically, I need to know if the card supports the languages cg or glsl, but that can be derived from the graphics card model, of course. Can anybody give me a hint on how to do that? :rose:Thank you very much in advance. Regards, Marcus.
If no other solutions, you can try Windows Management Instrumentation (WMI), which allows you to find some hardware and software details programmatically. The next sample displays available video controller(s):
#include "stdafx.h" #define _WIN32_WINNT 0x0400 #include #include #include #pragma comment(lib, "wbemuuid.lib") _COM_SMARTPTR_TYPEDEF(IWbemLocator, __uuidof(IWbemLocator)); _COM_SMARTPTR_TYPEDEF(IWbemServices, __uuidof(IWbemServices)); _COM_SMARTPTR_TYPEDEF(IEnumWbemClassObject, __uuidof(IEnumWbemClassObject)); _COM_SMARTPTR_TYPEDEF(IWbemClassObject, __uuidof(IWbemClassObject)); void ShowVideoControllers() { CoInitializeEx(NULL, COINIT_MULTITHREADED); CoInitializeSecurity( NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL); IWbemLocatorPtr locator; CoCreateInstance( CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID *)&locator ); IWbemServicesPtr services; locator->ConnectServer( _bstr_t(L"ROOT\\CIMV2"), NULL, NULL, 0, NULL, 0, 0, &services ); IEnumWbemClassObjectPtr enumerator; services->ExecQuery( bstr_t("WQL"), bstr_t("SELECT * FROM Win32_VideoController"), WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &enumerator); IWbemClassObjectPtr object = 000; for( ; ; ) { ULONG ret; enumerator->Next(WBEM_INFINITE, 1, &object, &ret); if( ret == 0) break; _variant_t variant; object-&Get(L"Name", 0, &variant, 0, 0); _bstr_t model = variant; MessageBox(0, model, "", MB_OK); } // TODO: check HRESULTs for error // TODO: release objects }
Hope it helps. -- modified at 9:41 Wednesday 21st June, 2006
-
If no other solutions, you can try Windows Management Instrumentation (WMI), which allows you to find some hardware and software details programmatically. The next sample displays available video controller(s):
#include "stdafx.h" #define _WIN32_WINNT 0x0400 #include #include #include #pragma comment(lib, "wbemuuid.lib") _COM_SMARTPTR_TYPEDEF(IWbemLocator, __uuidof(IWbemLocator)); _COM_SMARTPTR_TYPEDEF(IWbemServices, __uuidof(IWbemServices)); _COM_SMARTPTR_TYPEDEF(IEnumWbemClassObject, __uuidof(IEnumWbemClassObject)); _COM_SMARTPTR_TYPEDEF(IWbemClassObject, __uuidof(IWbemClassObject)); void ShowVideoControllers() { CoInitializeEx(NULL, COINIT_MULTITHREADED); CoInitializeSecurity( NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL); IWbemLocatorPtr locator; CoCreateInstance( CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID *)&locator ); IWbemServicesPtr services; locator->ConnectServer( _bstr_t(L"ROOT\\CIMV2"), NULL, NULL, 0, NULL, 0, 0, &services ); IEnumWbemClassObjectPtr enumerator; services->ExecQuery( bstr_t("WQL"), bstr_t("SELECT * FROM Win32_VideoController"), WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &enumerator); IWbemClassObjectPtr object = 000; for( ; ; ) { ULONG ret; enumerator->Next(WBEM_INFINITE, 1, &object, &ret); if( ret == 0) break; _variant_t variant; object-&Get(L"Name", 0, &variant, 0, 0); _bstr_t model = variant; MessageBox(0, model, "", MB_OK); } // TODO: check HRESULTs for error // TODO: release objects }
Hope it helps. -- modified at 9:41 Wednesday 21st June, 2006