如何从设备管理器获取信息? [英] How to get information from device manager?

查看:231
本文介绍了如何从设备管理器获取信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#应用程序中,如何读取有关设备的特定信息?
我尝试过WMI,但它不提供我需要的信息。

How can I, in my C# applictation, read specific information about a device? I have tried WMI and it does not provide the information that I need.

我想要的信息存储在设备的详细信息选项卡中,并且我想要的信息是父母。

The information that I want is stored in the Details tab of a device and the information I want there is "Parent".

我也在regedit中看过,没有运气。

I have also looked in regedit, without any luck.

推荐答案

Microsoft提供了一个示例: http://support.microsoft.com/ kb / 311272

Microsoft provides a sample: http://support.microsoft.com/kb/311272

从C#中,捕获devcon的输出可能比集成API容易。如果您对此感到满意,那么C ++ / CLI是迄今为止将设备信息导入.NET的最简单方法(我之前已经做过)。

From C#, it might be easier to capture the output of devcon than integrating the APIs. If you feel comfortable with it, C++/CLI is by far the easiest way to get device information into .NET (I've done this before).

这篇关于如何从设备管理器获取信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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