【netty高级编程源码】【pholcus源码分析】【csdnc源码制作】基于vb的mo源码_vb的实例源码
1.ç¨vb.netå¦ä½åå¾macå°åï¼
2.vb2013 如何获得显卡GPU温度
ç¨vb.netå¦ä½åå¾macå°åï¼
è¿æ¯C#çï¼ä½ å¯ä»¥è½¬æ¢ä¸ä¸
using System.Management;
//è·åç½å¡çç³»åå·
private static string GetMacAddress()
{
string ret = "";
try
{
ManagementClass cimobject = new ManagementClass("Win_NetworkAdapterConfiguration");
ManagementObjectCollection moc = cimobject.GetInstances();
if (moc.Count == 0)
return "";
else
{
foreach (ManagementObject mo in moc)
{
if ((bool)mo["IPEnabled"] == true)
{
ret = (string)mo.Properties["MacAddress"].Value;
break;
}
}
}
}
catch
{
ret = "";
}
return ret;
}
vb 如何获得显卡GPU温度
利用 WMI。
.NET 中有个命名空间是源源码netty高级编程源码 System.Management.ManagementObjectSearcher,可以进行相关硬件设备信息的实例pholcus源码分析读取。
代码参考:
Dim CPUtprt As Double = 0Dim mos As System.Management.ManagementObjectSearcher = New System.Management.ManagementObjectSearcher("root\WMI",基于csdnc源码制作 "Select * From MSAcpi_ThermalZoneTemperature")
For Each mo As System.Management.ManagementObject in mos.Get
CPUtprt = Convert.ToDouble(Convert.ToDouble(mo.GetPropertyValue("CurrentTemperature").ToString()) - ) /
Console.Write("CPU 温度 : " & CPUtprt.ToString & " °C")
Next
注:以上代码为我对照 C# 转换过来的,未经过 IDE 环境下测试。源源码rocketmq原文源码
实例源字典源码实例源字典源码