Pregunta

I'm going to write a Windows application and it would be useful if the app could tell what graphics card is being used. At the least, it would be helpful to see the manufacturer of the GPU. I'm not set on a programming language as of yet.

What windows library exposes this information?

¿Fue útil?

Solución

See here for a C# way of doing it, using WMI. You could access WMI through pretty much any language:

C# detect which graphics card drives video

ManagementObjectSearcher searcher 
 = new ManagementObjectSearcher("SELECT * FROM Win32_DisplayConfiguration");

string graphicsCard = string.Empty;
foreach (ManagementObject mo in searcher.Get())
{
    foreach (PropertyData property in mo.Properties)
    {
       if (property.Name == "Description")
       {
           graphicsCard = property.Value.ToString();
       }
    }
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top