使用ManagementClass获取cup,硬盘等信息,极少电脑会出问题,但是还是碰到了,提示
System.IO.FileNotFoundException:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
为什么会报错呢?
System.IO.FileNotFoundException:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
为什么会报错呢?
解决方案 »
- 1急求!编写一个程序,对于给定的一个字符串的集合,要求将其中交集不为空的集合合并,要求合并完成后的集合之间无交集
- 还是C#中引用COM组件的问题!!!!
- CCITT CRC 多项式为X16+X12+X5+1
- 新手问个问题哦!!!!!!!!!!!请大家帮忙。
- 如何取得word中的shape(不是inlineshape)的md5加密串
- treeview问题!怎样通过节点ID找到当前节点,在线等~~~
- 怎样拦截IE弹出菜单?
- 帮我看看这个比较怪的问题(MDI窗体关不了.)
- Treeview,与 DataGrid行的问题
- 在线等,关于给树型控件(web页面)动态地添加节点的问题,大虾都来帮忙!
- 求助,这个怎么处理?
- 使用DocX插件对文档标识符进行替换
string cpuInfo = " ";
using (ManagementClass cimobject = new ManagementClass("Win32_Processor"))
{
ManagementObjectCollection moc = cimobject.GetInstances(); foreach (ManagementObject mo in moc)
{
cpuInfo = mo.Properties["ProcessorId"].Value.ToString();
mo.Dispose();
}
}
在我电脑上没报错,是在客户电脑上出现的,是.net framework弹出来的框