/csharp-windows-kernel-driver

A C# Windows Kernel Driver sample built with blaft and bflat/zerolib

Primary LanguageC#GNU Affero General Public License v3.0AGPL-3.0

C# Windows Kernel Driver

A C# Windows Kernel Driver sample built with blaft and bflat/zerolib. Since zerolib doesn't contain a memory deallocation stub routine (like C's free()), there is memory leaks and due this there is no practical use for coding drivers with it yet. If you want to build it, you will need to build bflat layouts then get an updated EWDK (Enterprise WDK) image and copy its WDF and Kernel x64 libraries (/Program Files/Windows Kits/<windows-version>/Lib/**/*.lib) to layouts/<target-bflat-layout>/lib/windowskernel/x64/. Then you can build the CSharpDriver.sys with bflat build ./samples/WindowsKernelDriver/Driver.cs ./samples/WindowsKernelDriver/Win32.cs --stdlib:zero --os:windowskernel -o:CSharpDriver.sys. To debug it, try some debugger like WinDbg.