SetupDiGetClassDevs

SetupDiGetClassDevs

HDEVINFO

    SetupDiGetClassDevs(

        IN PGUID  ClassGuid,    /* optional */

        IN PCTSTR  Enumerator,    /* optional */

        IN HWND  hwndParent,    /* optional */

        IN DWORD  Flags

        );

 

SetupDiGetClassDevs returns a device information set that contains all installed devices of a specified class.

获取一个指定类别或全部类别的所有已安装设备的信息

 

Parameters

ClassGuid

Supplies a pointer to the class GUID to use when creating the list of devices. If the DIGCF_ALLCLASSES flag is set, this parameter is ignored and the resulting list contains all installed classes.

一个特定类别GUID(需要查询注册表)的指针,如果设置了DIGCF_ALLCLASSES标记,该参数备忽略,将返回所有类别的设备信息表

 

Enumerator

Supplies the name of the key under the Enum registry branch that contains device instances for which information is to be retrieved. If this parameter is not specified, device information is retrieved for all device instances in the entire Enum tree.

过滤梅举的内容:如:PCI则只显示PCI设备,

 

hwndParent

Supplies the handle of the top-level window to be used for any user interface relating to the members of this set.

用于关联到集合成员中的用户接口的顶层窗口句柄

Flags

Supplies control options used in building the device information set. Can be one of the following values:

建立设备信息表的控制选项,可以是下列值

DIGCF_PRESENT

Return only devices that are currently present. (只列出当前存在的设备信息)

 

DIGCF_ALLCLASSES

Return a list of installed devices for all classes. If this flag is set, the ClassGuid parameter is ignored. (列出所有类别的一安装的设备表,如果设置了此值,则指定的类别将备忽略)

 

DIGCF_PROFILE

Return only devices that are a part of the current hardware profile. (只返回当前硬件概况部分)

Return Value

If the function succeeds, it returns a handle to a device information set containing all installed devices matching the specified parameters.

如成功,返回包含所有与指定参数匹配的已经安装设备信息句柄

 

If the function fails, it returns INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.

如失败则返回INVALID_HANDLE_VALUE


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值