Windows 上的新驱动程序安装
我试图找出为 Windows 安装新驱动程序时会发生什么。 (修改了哪些内核数据结构。)有谁知道有关此主题的任何好的文档。调试这个有点痛苦。
谢谢
I am trying to find what happens when new driver is installed for windows. (What kernel data structures are modified.) Does anyone know any good documentation on this topic. It is a bit painful to debug this.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
安装驱动程序后,会将其放入驱动程序存储中(请参阅 http://msdn.microsoft.com/en-us/library/ff544868%28v=vs.85%29.aspx)
当发现新设备时如果当前没有驱动程序关联,PNP 管理器会查看驱动程序存储以查看是否有任何存储的驱动程序与新设备相匹配。
如果 PNP 管理器找到与设备匹配的驱动程序,它将执行驱动程序 inf 文件中的指令。这通常会在注册表 (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services) 中创建一个服务条目,将驱动程序二进制文件复制到 \Windows\System32\drivers 等位置。 PNP 管理器将创建该设备与该驱动程序的关联(我认为是 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum),以便下次可以快捷方式的过程。
我认为安装驱动程序时不会修改任何内核数据结构。你的意思是问什么时候加载驱动程序?
When a driver is installed is it placed into the Driver Store (see http://msdn.microsoft.com/en-us/library/ff544868%28v=vs.85%29.aspx)
When a new device is discovered that does not have a current driver association the PNP manager looks at the driver store to see if any of the stored drivers will match the new device.
If the PNP manager finds a driver to match the device it will execute the directives in the drivers inf file. This typically creates a service entry in the registry (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services), copies the driver binaries to somewhere like \Windows\System32\drivers etc. Also the PNP manager will create an association of that device to that driver (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum I think) so that next time it can shortcut the process.
I don't think any kernel data structures are modified when a driver is installed. Do you mean to ask when a driver is loaded?