문제

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?

도움이 되었습니까?

해결책

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();
       }
    }
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top