如何在C#中获取GPU信息? [英] How get GPU information in C#?
本文介绍了如何在C#中获取GPU信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试开发一种软件,以检查有关用户视频图形卡的某些信息(例如:GPU时钟速度,总线宽度等).
I'm trying to make a software that check some information about user's Video Graphic Cards (Like: GPU Clock Speed, Bus width and etc).
我已经在TechPowerUp GPU-Z软件中看到了此信息,并在下图中看到了一些SDK的名称:
I've seen this information in TechPowerUp GPU-Z software and the names of some of the SDK that you can see in the following picture:
CUDA Toolkit 7 用于Nvidia和
CUDA Toolkit 7 for Nvidia and APP SDK for AMD
现在我有两个问题:
- 如何使用C#代码访问此信息?
- CUDA Toolkit 7和APP SDK是否有助于解决我的问题?如果可以,怎么办?
推荐答案
也许 GPU信息类可以为您提供帮助.
Maybe the Win32_VideoController CLASS or the GPUinformation Class can help you.
示例:
using System.Management;
public partial class Win_Win32_VideoController : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
using (var searcher = new ManagementObjectSearcher("select * from Win32_VideoController"))
{
foreach (ManagementObject obj in searcher.Get())
{
Response.Write("Name - " + obj["Name"] + "</br>");
Response.Write("DeviceID - " + obj["DeviceID"] + "</br>");
Response.Write("AdapterRAM - " + obj["AdapterRAM"] + "</br>");
Response.Write("AdapterDACType - " + obj["AdapterDACType"] + "</br>");
Response.Write("Monochrome - " + obj["Monochrome"] + "</br>");
Response.Write("InstalledDisplayDrivers - " + obj["InstalledDisplayDrivers"] + "</br>");
Response.Write("DriverVersion - " + obj["DriverVersion"] + "</br>");
Response.Write("VideoProcessor - " + obj["VideoProcessor"] + "</br>");
Response.Write("VideoArchitecture - " + obj["VideoArchitecture"] + "</br>");
Response.Write("VideoMemoryType - " + obj["VideoMemoryType"] + "</br>");
}
}
}
}
您还可以查阅 CUDAfy.net 库.
这篇关于如何在C#中获取GPU信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文