COM 与 WMI 信息提供比较
如果我想向用户提供一些信息,使用什么更好的方法 关于我的硬件设备。
我应该开发专有的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为这是显而易见的: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.
WMI 非常好。 尝试一下使用此工具 WMI Code Creator,非常适合学习WMI。
WMI is very good. Play a bit with using this tool WMI Code Creator, good for learn WMI.