问题描述
在 this 帖子之后,我需要检测真正使用的是哪个显卡。 为了确保使用专用的 NVIDIA 而不是集成的英特尔 I:
- 已设置为全球使用
- 被迫在我的应用程序中使用它
所以我很确定我的程序使用的是 NVIDIA 也是因为我在任务管理器中看到了GPU的使用情况
话虽如此,我需要一种方法来确认我使用的是 NVIDIA 而不是 INTEL 显卡。
string strgraphicCards = "Graphic cards: ";
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_VideoController");
foreach (ManagementObject mo in searcher.Get())
{
PropertyData currentBitsPerPixel = mo.Properties["CurrentBitsPerPixel"];
PropertyData description = mo.Properties["Description"];
if (currentBitsPerPixel != null && description != null)
{
if (mo["CurrentBitsPerPixel"] != null && mo["CurrentHorizontalResolution"] != null)
strgraphicCards += " **USED** " + description.Value + ",";
else
strgraphicCards += description.Value + ",";
}
}
Serializers.Loggers.WriteNLog(strgraphicCards,eLogLevel.Trace);
感谢您帮助理解难题所在
帕特里克
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)