COM 与 WMI 信息提供比较

发布于 2024-07-16 19:20:35 字数 99 浏览 8 评论 0原文

如果我想向用户提供一些信息,使用什么更好的方法 关于我的硬件设备

我应该开发专有的 COM 库还是应该开发 WMI 提供程序?

What is better method to use if I would like to provide the user with some information
about my Hardware device.

Should I develop a proprietary COM Library or should I develop a WMI provider?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浪漫之都 2024-07-23 19:20:35

我认为这是显而易见的:WMI 是 Microsoft 认可的提供性能和硬件信息的方式。

这应该是您提供所描述信息的方式。 Win32_Computer 和其他硬件类中有很多先例,它们提供了 CPU 详细信息、内存大小等(不会随软件运行而改变的内容)。

我这么说是因为您专门标记了“硬件设备”。 不要认为 WMI 仅用于报告软件类型的内容,例如内存使用情况或进程列表。

已经有大量专门用于查询 WMI 的软件(包括我的一个),因此不乏知道如何执行此操作的人。

I think that's a no-brainer: WMI is the Microsoft-blessed way of providing performance and hardware information.

That should be the way you provide the information you describe. There's plenty of precedent in the Win32_Computer and other hardware classes, which provide CPU details, memory size and so on (stuff that doesn't change with the software running).

I say that since you specifically marked out "hardware device". Don't think that WMI is for reporting just software type things like memory usage or process lists.

There's a large amount of software out there already specifically built to query WMI (including one of mine) so there's no shortage of people who will know how to do it.

沉鱼一梦 2024-07-23 19:20:35

WMI 非常好。 尝试一下使用此工具 WMI Code Creator,非常适合学习WMI。

WMI is very good. Play a bit with using this tool WMI Code Creator, good for learn WMI.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文