This project has moved and is read-only. For the latest updates, please go here.


Mar 23, 2012 at 7:41 PM

Hi there.  First of all, thanks so much for sharing your's been very helpful.  I do have a question about compiling some of the code.  I'm not sure if this is the right place to post this, but as a first step I downloaded the WinDivert code samples and have been attempting to get them working as a first step.  I contacted you a few days ago about getting everything compiled using VS 2010 and using your self-signed divert.dll files.  I've done that and gotten a lot further with the code.  I've also done as you've suggested and used the code from your WinDivertApi files.

What I'm running into is this:  with the code for the "passthru" sample I'm able to successfully load the divert.dll.  I then make a call to DivertOpen.  I do this twice as per the instructions from yourself (WinDivert issue at first time load).  This still fails with an INVALID_HANDLE_VALUE and when I do a GetLastError call I receive a 110 code or "The system cannot open the device or file specified".  I've set permissions on the folders but have had no success.

I know this is a bit more of a WinDivert question, but I'm hoping you may have some experience in solving this.  I'm more than happy to share the entire project if that's helpful.

Any info you could provide would be much appreciated.


Mar 23, 2012 at 9:42 PM
Edited Mar 23, 2012 at 9:45 PM

You may run windivert from one location and move it to other location. I have such issue before. try delete windivert service with following code and run your application again.

Note1: run the following code with administrator privilege in command prompt

Note2: Don't forget that "divert.inf", "divert.sys", "WdfCoInstaller01009.dll" and "divert.dll" should exists in your application exe folder.

sc delete divert

I don't have any other experince.