# 怎样简单使用winring0驱动

By [Tinychenlin](https://paragraph.com/@cryptometaman) · 2021-11-18

---

Winring0 驱动内部集成了读写MSR、读写物理地址、读写PCI配置空间、读写IO地址空间等常见的操作。目前签名版的不具备读写物理地址的能力，想要读写物理地址需要重新编译驱动，并将Windows设置成测试模式。本文介绍，如何使用VS2019编译Winring0驱动及如何使用， 测试代码 github ：

[https://github.com/Tinycl/easy\_winring0](https://github.com/Tinycl/easy_winring0)

（1）下载并安装VS2019

[https://visualstudio.microsoft.com/zh-hans/vs/](https://visualstudio.microsoft.com/zh-hans/vs/)

（2）下载并安装相同版本的SDK和WDK， 比如SDK 10.0.18362 WDK 10.0.18362

[https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk](https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk)

（3）编译驱动

（4)编写测试案例

（4.1）加载驱动

（4.2）使用驱动的API

Good Luck!

---

*Originally published on [Tinychenlin](https://paragraph.com/@cryptometaman/winring0)*
