Skip to content

Commit

Permalink
Move installer code from Packet.dll to NPFInstall.
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsaiviking committed Sep 10, 2021
1 parent e614f5c commit 643090e
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 42 deletions.
18 changes: 3 additions & 15 deletions packetWin7/Dll/Packet32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
#include <string>
#include <ntddndis.h>

#include "ProtInstall.h"
#include "Packet32-Int.h"
#include "../npf/npf/ioctls.h"

Expand Down Expand Up @@ -292,9 +291,10 @@ BOOL NpcapCreatePipe(const char *pipeName, HANDLE moduleName)
_splitpath_s(lpFilename, szDrive, BUFSIZE, szDir, BUFSIZE, NULL, 0, NULL, 0);
_makepath_s(lpFilename, BUFSIZE, szDrive, szDir, "NpcapHelper", ".exe");

if (!PathFileExistsA(lpFilename))
nResult = GetFileAttributesA(lpFilename);
if (nResult == INVALID_FILE_ATTRIBUTES || (nResult & FILE_ATTRIBUTE_DIRECTORY))
{
TRACE_PRINT1("PathFileExistsA failed. GLE=%d\n", GetLastError());
TRACE_PRINT1("%s does not exist or is a directory.", lpFileName);
TRACE_EXIT();
return FALSE;
}
Expand Down Expand Up @@ -1863,18 +1863,6 @@ BOOL PacketStopDriver()
return ret;
}

BOOL PacketStopDriver60()
{
BOOL result;

TRACE_ENTER();

result = (BOOL) UninstallDriver();

TRACE_EXIT();
return result;
}

/*!
\brief Opens an adapter.
\param AdapterName A string containing the name of the device to open.
Expand Down
6 changes: 1 addition & 5 deletions packetWin7/Dll/Project/Packet.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1167,16 +1167,12 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\AdInfo.cpp" />
<ClCompile Include="..\netcfgapi.cpp" />
<ClCompile Include="..\Packet32.cpp" />
<ClCompile Include="..\ProtInstall.cpp" />
<ClCompile Include="..\..\npf\npf\win_bpf_filter.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\debug.h" />
<ClInclude Include="..\netcfgapi.h" />
<ClInclude Include="..\Packet32-Int.h" />
<ClInclude Include="..\ProtInstall.h" />
<ClInclude Include="..\strsafe.h" />
</ItemGroup>
<ItemGroup>
Expand All @@ -1185,4 +1181,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
12 changes: 0 additions & 12 deletions packetWin7/Dll/Project/Packet.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@
<ClCompile Include="..\AdInfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\netcfgapi.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Packet32.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ProtInstall.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\npf\npf\win_bpf_filter.c">
<Filter>Source Files</Filter>
</ClCompile>
Expand All @@ -35,15 +29,9 @@
<ClInclude Include="..\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\netcfgapi.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Packet32-Int.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\ProtInstall.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\strsafe.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down
10 changes: 5 additions & 5 deletions packetWin7/NPFInstall/NPFInstall/NPFInstall.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,9 @@
<ClCompile Include="LoopbackRecord.cpp" />
<ClCompile Include="LoopbackRename.cpp" />
<ClCompile Include="LoopbackRename2.cpp" />
<ClCompile Include="..\..\Dll\netcfgapi.cpp" />
<ClCompile Include="netcfgapi.cpp" />
<ClCompile Include="NPFInstall.cpp" />
<ClCompile Include="..\..\Dll\ProtInstall.cpp" />
<ClCompile Include="ProtInstall.cpp" />
<ClCompile Include="ProcessUtil.cpp" />
<ClCompile Include="RegUtil.cpp" />
</ItemGroup>
Expand All @@ -583,8 +583,8 @@
<ClInclude Include="LoopbackRename.h" />
<ClInclude Include="LoopbackRename2.h" />
<ClInclude Include="msg.h" />
<ClInclude Include="..\..\Dll\netcfgapi.h" />
<ClInclude Include="..\..\Dll\ProtInstall.h" />
<ClInclude Include="netcfgapi.h" />
<ClInclude Include="ProtInstall.h" />
<ClInclude Include="ProcessUtil.h" />
<ClInclude Include="rc_ids.h" />
<ClInclude Include="RegUtil.h" />
Expand All @@ -595,4 +595,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
10 changes: 5 additions & 5 deletions packetWin7/NPFInstall/NPFInstall/NPFInstall.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
<ClCompile Include="LoopbackRename2.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\Dll\netcfgapi.cpp">
<ClCompile Include="netcfgapi.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="NPFInstall.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\Dll\ProtInstall.cpp">
<ClCompile Include="ProtInstall.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="DriverStoreClear.cpp">
Expand Down Expand Up @@ -68,10 +68,10 @@
<ClInclude Include="msg.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\Dll\netcfgapi.h">
<ClInclude Include="netcfgapi.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\Dll\ProtInstall.h">
<ClInclude Include="ProtInstall.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="rc_ids.h">
Expand All @@ -92,4 +92,4 @@
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 643090e

Please sign in to comment.