Recompiling WinDivert - TechnikEmpire/HttpFilteringEngine GitHub Wiki

The current release(s) of WinDivert, on which this project depends, are compiled using VS 2012. When creating MSI installers for software the uses this library, this adds an extra dependency, the CRT for VS 2012. Recompiling WinDivert is desirable because this way your entire project will share the same CRT and you'll only have to bundle in a single MSM module for the CRT that your current version of VS uses and includes.

To fully compile WinDivert, you need the Windows Driver Development Kit and, if you intend to distribute, a valid certificate with which to sign drivers. However, as outlined here, it's not necessary to recompile the sys files to recompile the dll files.

The solution is outlined in the linked post above.


  1. Download a source release of WinDivert.
  2. Download the same binary release you intend to link against, if you have not already.
  3. In the extracted source directory, create the following directory structure:
    SOURCE_DIR\install\WDDK\amd64
    SOURCE_DIR\install\WDDK\i386
  4. From the binary release, copy WinDivert64.sys to SOURCE_DIR\install\WDDK\amd64 and WinDivert32.sys to SOURCE_DIR\install\WDDK\i386
  5. Open the DLL (and optionally test) project files, allow Visual Studio to upgrade the solutions. Save and close.
  6. Open a VS command prompt for x86. Change to the SOURCE_DIR and run msvc-build.bat
  7. Open a VS command prompt for x64. Change to the SOURCE_DIR and run msvc-build.bat

By the end of this, you should have two new DLLs for both x86 and x64 targets, compiled with and dependent on your version of MSVC.