TechnikEmpire / Divert.Net

.NET Wrapper for WinDivert
MIT License
53 stars 10 forks source link

Issue with trying NetDump sample #16

Open maczbal opened 7 years ago

maczbal commented 7 years ago

Hello!

I already used WinDivert in C++ and Python and I wanted to try your Divert.Net, sadly I having issues using it. I am not really familiar with wrappers so it's possible I miss something really obvious, please help me if you can.

For example I wanted to try out your NetDump example but after opening the solution in VS2015 it can't find the already added by default Divert.Net reference (yellow triangle) and having issues with "using Divert.Net;" too, missing a using directive or an assembly reference.

image

image

I've read the wiki of Divert.Net and as the wiki says I created the necessary directory structure in the root directory of the NetDump example.

The root directory of my project: image

The deps\windivert: image The deps\windivert\x64: image The deps\windivert\x86: image

Should I make any other changes in VS2015 too? I am thinking about things which are not written in the wiki because they are too obvious, but not for me.

Thank you in advance!

TechnikEmpire commented 7 years ago

Hey @maczbal, so I made this wrapper a long time ago, and I am interested in solving any issues with it. However, as you've experienced, it's a mess to get the project off the ground. I'll see if I can make a nuget package. You're going to have to follow the Wiki, build Divert.NET, then manually add the reference again if you want to get it up and running right now. Alternatively you can try my Pinvoke class (it's under my repositories list) but this requires the "unsafe" flag because it uses raw pointers.

maczbal commented 7 years ago

Thank you for your fast reply!

Can I ask you to link a sample code for your Pinvoke class?

TechnikEmpire commented 7 years ago

@maczbal I don't have an example published. I'll see if I can get one together.

TechnikEmpire commented 6 years ago

@maczbal You can find an example in one of my other projects, which is a filtering, local, transparent proxy server here.

TechnikEmpire commented 6 years ago

Oops, still need to investigate this.