WinRing0
WinRing0 is a hardware access library for Windows.
Install / Use
/learn @GermanAizek/WinRing0README
WinRing0
WinRing0 is a hardware access library for Windows.
Features
WinRing0 library allows x86/x64 Windows applications to access
- I/O port
- MSR (Model-Specific Register)
- PCI
Copyrights
- 2007-2009 hiyohiyo <hiyohiyo@crystalmark.info> - original author
- 2019-2024 GermanAizek <GermanAizek@yandex.ru> - current maintainer
SPECIAL THANKS
- 2007 kashiwano masahiro <http://www.otto.to/~kasiwano/> - PCI Debug Library for Win32
- 2007 Yariv Kaplan, WinIo (http://www.internals.com/)
- 2008 habe - translation support & technical assistance
- 2009 Patrick - bug patch
- 2023 Vitalii Khoruzhyi <merlin_1st@livejournal.com> - x64 build, additional features and work on code
- 2023 Sophie Lemos <Press F to pay respects, thanks to microsoft-github> - fixed fatal BSOD error and porting to Windows ARM
- 2023 drvexplorer - I suggested using fileIoCreateDeviceSecure() and tidying up output files
How to Use
Put WinRing0.dll, WinRing0x64.dll, WinRing0.sys, WinRing0x64.sys, and WinRing0.vxd into the directory where your application's executable file resides.
C++
See also sample application.
Load-Time Dynamic Linking
- Add WinRing0.lib or WinRing0x64.lib to your project.
- Add #include "OlsApi.h" statement to your source file.
- Call InitializeOls().
- Call GetDllStatus() to check error.
- Call the library's functions.
- Call DeinitializeOls().
Reference : Load-Time Dynamic Linking (MSDN)
Run-Time Dynamic Linking
- Add #include "OlsApiInit.h" statement to your source file.
- Call InitOpenLibSys().
- Call GetDllStatus() to check error.
- Call the library's functions. *
- Call DeinitOpenLibSys().
*If you would like to call the library's functions on other source files, you should add #include "OlsApiInitExt.h" statement to the source files.
Reference : Run-Time Dynamic Linking (MSDN)
C#
See also sample application.
- Put OpenLibSys.cs into your project.
- Add using OpenLibSys; statement to your source file.
- Call GetStatus() and GetDllStatus() to check error.
- Call the library's functions.
*Supported platform target is "x86", "x64" and "Any CPU". But WinRing0 does not support "IA64".
How to Build (Requirement)
Sample Code
C++ and C#
Required Visual Studio 2015 Community or higher because of using MFC.
SYS (NT Driver)
Required WDK (Windows Driver Kits)
- Get WDK from MSDN
- Install WDK
- cd WinRing0/source/dll/sys
- build :trollface:
VxD (9x Driver)
Required Windows XP SP1 DDK + Win Me support
- Get Windows XP SP1 DDK from MSDN
- Install Windows XP SP1 DDK with Win Me support
- Open "Win Me Free Build Environment"
- cd WinRing0\source\dll\vxd
- nmake
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
