Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/GermanAizek/WinRing0
WinRing0 is a hardware access library for Windows.
https://github.com/GermanAizek/WinRing0
access-control driver hardware ioport msr pci ring0 windows winring0
Last synced: about 2 months ago
JSON representation
WinRing0 is a hardware access library for Windows.
- Host: GitHub
- URL: https://github.com/GermanAizek/WinRing0
- Owner: GermanAizek
- License: gpl-3.0
- Created: 2019-12-15T23:29:59.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-17T14:37:12.000Z (11 months ago)
- Last Synced: 2024-08-02T16:33:24.314Z (5 months ago)
- Topics: access-control, driver, hardware, ioport, msr, pci, ring0, windows, winring0
- Language: C
- Homepage:
- Size: 146 KB
- Stars: 246
- Watchers: 12
- Forks: 62
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/hiyohiyo) <[[email protected]](mailto:[email protected])> - original author
* 2019-2024 [GermanAizek](https://github.com/GermanAizek) <[[email protected]](mailto:[email protected])> - current maintainerSPECIAL THANKS
* 2007 kashiwano masahiro <> - PCI Debug Library for Win32
* 2007 Yariv Kaplan, WinIo ([http://www.internals.com/](http://www.internals.com/))
* 2008 habe - translation support & technical assistance
* 2009 Patrick - bug patch
* 2023 [Vitalii Khoruzhyi](https://github.com/Merlin1st) <> - x64 build, additional features and work on code
* 2023 [Sophie Lemos](https://github.com/SecurityAndStuff) - fixed fatal BSOD error and porting to Windows ARM
* 2023 [drvexplorer](https://github.com/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
1. Add WinRing0.lib or WinRing0x64.lib to your project.
2. Add #include "OlsApi.h" statement to your source file.
3. Call InitializeOls().
4. Call GetDllStatus() to check error.
5. Call the library's functions.
6. Call DeinitializeOls().
Reference : [Load-Time Dynamic Linking (MSDN)](https://docs.microsoft.com/en-us/windows/win32/dlls/load-time-dynamic-linking)#### Run-Time Dynamic Linking
1. Add #include "OlsApiInit.h" statement to your source file.
2. Call InitOpenLibSys().
3. Call GetDllStatus() to check error.
4. Call the library's functions. *
5. 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)](https://docs.microsoft.com/en-us/windows/win32/dlls/run-time-dynamic-linking)### C#
See also sample application.
1. Put OpenLibSys.cs into your project.
2. Add using OpenLibSys; statement to your source file.
3. Call GetStatus() and GetDllStatus() to check error.
4. 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)
1. [Get WDK from MSDN](https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk)
2. Install WDK
3. cd WinRing0/source/dll/sys
4. build :trollface:### VxD (9x Driver)
Required Windows XP SP1 DDK + Win Me support
1. Get Windows XP SP1 DDK from MSDN
2. Install Windows XP SP1 DDK with Win Me support
3. Open "Win Me Free Build Environment"
4. cd WinRing0\source\dll\vxd
5. nmake