wiresock / ndisapi

Windows Packet Filter library for network packet interception and manipulation, suitable for custom firewall, VPN and traffic analysis applications.
https://www.ntkernel.com/windows-packet-filter/
MIT License
289 stars 78 forks source link

Visual Studio 2017 and Win 10 SDK 10.0.17763.0 can't build ndisapi.dll, ndisapi.lib and ndisapi.net #2

Closed frankzha closed 5 years ago

frankzha commented 5 years ago
  1. when i tried to build those 3 projects, it gave the error like below ( i specified the build output to be verbose): (I am using vs community 2017, build 15.9.4)

1>------ Up-To-Date check: Project: ndisapi.dll, Configuration: Debug x64 ------ 1>Project is not up-to-date: last build was unsuccessful. 1>------ Build started: Project: ndisapi.dll, Configuration: Debug x64 ------ 1>Object reference not set to an instance of an object. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

wiresock commented 5 years ago

Most of the projects were configured for the earlier version of SDK (16299, which you probably had not installed), so to fix this you only had to change the SDK version in the project settings. Anyway, to simplify the things I've updated SDK version to 10.0.17763.0, just make a pull.

frankzha commented 5 years ago

Which version of visual studio are you using? I am using VS 2017 community. I got the latest code and still had the same error. I wonder if it's due to I am using community version.

wiresock commented 5 years ago

Visual Studio 2017 Community works just fine, however that depends on what components you have installed. Besides main Workloads: ".NET desktop development" and "Desktop development with C++" note to add Optionals: "Visual C++ MFC for x86 and x64" and "C++/CLI support". It should fix the issues.

frankzha commented 5 years ago

Finally after i upgraded visual studio community 15.9.4 to latest 15.9.7 and it started to work. Thank you very much!

BTW, the linker for ebridge is not a valid path: $(SolutionDir)..\ndisapi\bin\lib\$(Platform)\$(Configuration)\

It should be: $(SolutionDir)\bin\lib\$(Platform)\$(Configuration)\

wiresock commented 5 years ago

Thank for clue! Original project layout was a little bit different.