对象管理与互操作 [英] Object Management vs Interop

查看:58
本文介绍了对象管理与互操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对C#还是比较陌生,我正在尝试了解最好的编程方法.我目前正在尝试制作一个简单的程序来获取一些系统信息.我遇到了几种不同的方法. ManagementObjectSearcher和互操作.这是我想获得的一些不同东西的列表:物理内存,虚拟内存,处理器,常规OS信息,视频卡.我想认为速度是一个问题.所以我想我的问题是获取此类信息的最佳方法是什么?

I am relatively new to C# and I am trying to understand the best programming methods. I current am trying to make a simple program to get some system info. I have come across a few different methods. ManagementObjectSearcher and Interop. Here is a list of a few different things I would like to get: Physical Memory, Virtual Memory, Processor, General OS info, VideoCard. And I would like to think speed is an issue. So I guess my question is what is the best way to get that kind of info?

推荐答案

检查本文

如何获取硬件信息(CPU ID,主板信息,硬盘序列号,系统信息等) [ ^ ]
Check this article

How To Get Hardware Information (CPU ID, MainBoard Info, Hard Disk Serial, System Information , ...)[^]


您可能想看看这个

Windows管理规范类 [ ^ ]
You may want look at this

Windows Management Instrumentation Classes[^]


尝试
用于脚本和应用程序的WMI任务
[ ^ ]
Win32_Processor类 [ http://www.terminally-incoherent .com/blog/2010/02/18/collecting-hardware-information-using-c-and-wmi/ [获取硬件信息 [ ^ ]
Try
WMI Tasks for Scripts and Applications
[^]
Win32_Processor class[^]
http://www.terminally-incoherent.com/blog/2010/02/18/collecting-hardware-information-using-c-and-wmi/[^]
Getting Hardware Information[^]


这篇关于对象管理与互操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆