windows安装设备的过程(译自DDK doc)

以热插拔设备为例,不能热插拔的类似。

1. 用户插入设备。

2. 总线驱动接到一个新设备的notification。总线驱动调用IoInvalidateDeviceRelations通知内核PnP管理器。

    内核PnP管理器通过IRP_MJ_PNP, IRP_MN_QUERY_DEVICE_RELATIONS查询目前总线上有的设备。比较新的list和以前的list。

    内核PnP管理器发送IRP到到总线驱动收集新设备的信息,such as 设备的hardware ID等等。

3. 内核PnP管理器通知用户PnP管理器,有一个设备要安装。

4.The user-mode PnP manager creates a new process using rundll32.exe and launches newdev.dll to install the device

5. newdev.dll调用Setup API和 CfgMgr API。

    newdev.dll 调用SetupDiBuildDriverInfoList 为设备创建可能的驱动表。

6. The class installer and co-installers, if any, can participate in the installation by handling DIF requests.

7.Setup transfers control to kernel mode to load drivers and start the device.

8.The PnP manager loads the appropriate function driver and any optional filter drivers for the device.

9.Installers can supply wizard pages to change device settings.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值