From 07c88999bae147524d58feda23a513956e37f627 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Tue, 27 Jun 2023 16:24:33 +0300 Subject: [PATCH 1/7] Create a Visual Studio project Compiling this driver is difficult using newer VS and WDK, so I made a VS project that will help doing this. Also I'm using newer WDK, so an updated .inf file is required. You can still build this project with bat scripts, if your environment mathes the old requirements. --- .gitignore | 4 + USBPcap.sln | 35 +++++++++ USBPcapDriver/USBPcap.filters | 93 +++++++++++++++++++++++ USBPcapDriver/USBPcap.inf | 56 ++++++++++++++ USBPcapDriver/USBPcap.user | 4 + USBPcapDriver/USBPcap.vcxproj | 137 ++++++++++++++++++++++++++++++++++ 6 files changed, 329 insertions(+) create mode 100644 .gitignore create mode 100644 USBPcap.sln create mode 100644 USBPcapDriver/USBPcap.filters create mode 100644 USBPcapDriver/USBPcap.inf create mode 100644 USBPcapDriver/USBPcap.user create mode 100644 USBPcapDriver/USBPcap.vcxproj diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e8f6e1b --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +build +USBPcapCMD/build +USBPcapDriver/build +.vs diff --git a/USBPcap.sln b/USBPcap.sln new file mode 100644 index 0000000..cfd40b2 --- /dev/null +++ b/USBPcap.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.6.33815.320 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "USBPcap", "USBPcapDriver\USBPcap.vcxproj", "{9C54EF34-97C5-44BA-BBA6-5B2385C53F64}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 + Debug|x64 = Debug|x64 + Release|ARM64 = Release|ARM64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.ActiveCfg = Release|ARM64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.Build.0 = Release|ARM64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.Deploy.0 = Release|ARM64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.ActiveCfg = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.Build.0 = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.Deploy.0 = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.ActiveCfg = Release|ARM64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.Build.0 = Release|ARM64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.Deploy.0 = Release|ARM64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|x64.ActiveCfg = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|x64.Build.0 = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|x64.Deploy.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5F2D536B-9C6E-4755-9E31-7795CEA12E12} + EndGlobalSection +EndGlobal diff --git a/USBPcapDriver/USBPcap.filters b/USBPcapDriver/USBPcap.filters new file mode 100644 index 0000000..be729c0 --- /dev/null +++ b/USBPcapDriver/USBPcap.filters @@ -0,0 +1,93 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {8E41214B-6785-4CFE-B992-037D68949A14} + inf;inv;inx;mof;mc; + + + + + Driver Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + diff --git a/USBPcapDriver/USBPcap.inf b/USBPcapDriver/USBPcap.inf new file mode 100644 index 0000000..9e882ae --- /dev/null +++ b/USBPcapDriver/USBPcap.inf @@ -0,0 +1,56 @@ +[Version] +Signature = "$WINDOWS NT$" +Class = USB +ClassGuid = {36FC9E60-C465-11CF-8056-444553540000} +DriverPackageType = ClassFilter +Provider = %PROVIDER% +CatalogFile.NTx86 = USBPcapx86.cat +CatalogFile.NTamd64 = USBPcapamd64.cat +CatalogFile.NTarm64 = USBPcaparm64.cat + +[DestinationDirs] +DefaultDestDir = 12 + +[SourceDisksNames] +1 = %DiskId1%,,,"." + +[SourceDisksFiles] +USBPcap.sys = 1,, + +[DefaultInstall.NT$ARCH$] +CopyFiles = @USBPcap.sys +AddReg = USBPcap.AddReg + +[DefaultUninstall.NT$ARCH$] +DelFiles = @USBPcap.sys +DelReg = USBPcap.DelReg +LegacyUninstall = 1 + +[USBPcap.AddReg] +;Add USBPcap to UpperFilters +HKLM, System\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}, UpperFilters, 0x00010008, USBPcap + +[USBPcap.DelReg] +;Delete USBPcap from UpperFilters +HKLM, System\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}, UpperFilters, 0x00018002, USBPcap + +[DefaultInstall.NT$ARCH$.Services] +AddService = USBPcap,,Service.AddService + +[DefaultUninstall.NT$ARCH$.Services] +DelService = USBPcap,0x00000200 + +[Service.AddService] +DisplayName = %USBPcap.SvcDesc% +ServiceType = 1 ; SERVICE_KERNEL_DRIVER +StartType = 3 ; SERVICE_DEMAND_START +ErrorControl = 2 ; SERVICE_ERROR_SEVERE +ServiceBinary = %12%\USBPcap.sys + +[Strings] +PROVIDER = "USBPcap" +StdMfg = "USBPcap Developers" +DiskId1 = "USBPcap Installation Disk #1" +USBPcap.DeviceDesc = "USBPcap Filter Driver" +USBPcap.SvcDesc = "USBPcap Capture Service" + diff --git a/USBPcapDriver/USBPcap.user b/USBPcapDriver/USBPcap.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/USBPcapDriver/USBPcap.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/USBPcapDriver/USBPcap.vcxproj b/USBPcapDriver/USBPcap.vcxproj new file mode 100644 index 0000000..fd247f6 --- /dev/null +++ b/USBPcapDriver/USBPcap.vcxproj @@ -0,0 +1,137 @@ + + + + + Release + x64 + + + Release + ARM64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64} + {497e31cb-056b-4f31-abb8-447fd55ee5a5} + v4.5 + 12.0 + Debug + x64 + USBPcap + USBPcap + $(LatestTargetPlatformVersion) + + + + Windows10 + false + WindowsKernelModeDriver10.0 + Driver + KMDF + Universal + + + Windows10 + false + WindowsKernelModeDriver10.0 + Driver + KMDF + Universal + + + + + + + <_NT_TARGET_VERSION> + + + + + + + + + + + + DbgengKernelDebugger + $(IncludePath) + $(VC_IncludePath);$(WindowsSDK_IncludePath); + $(SolutionDir)build\driver\$(Platform)\$(ConfigurationName)\ + build\$(Platform)\$(ConfigurationName)\ + + + DbgengKernelDebugger + $(SolutionDir)build\driver\$(Platform)\$(ConfigurationName)\ + build\$(Platform)\$(ConfigurationName)\ + + + + true + true + true + false + %(AdditionalIncludeDirectories) + + + sha256 + + + $(DDK_LIB_PATH)wdmsec.lib;$(DDK_LIB_PATH)usbd.lib + + + + + true + true + true + false + + + sha256 + + + true + oldnames.lib;%(IgnoreSpecificDefaultLibraries) + FxDriverEntry + $(DDK_LIB_PATH)wdmsec.lib;$(DDK_LIB_PATH)usbd.lib;%(AdditionalDependencies) + + + + + + + + + + + + From b93fadc064cb713fea6dc099178241b99892fbe1 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Tue, 27 Jun 2023 23:43:50 +0300 Subject: [PATCH 2/7] Add signing and fix x64 compilation --- USBPcapDriver/USBPcap.vcxproj | 11 ++++++++++- USBPcapDriver/USBPcap.vcxproj.user | 9 +++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 USBPcapDriver/USBPcap.vcxproj.user diff --git a/USBPcapDriver/USBPcap.vcxproj b/USBPcapDriver/USBPcap.vcxproj index fd247f6..e7fb5e5 100644 --- a/USBPcapDriver/USBPcap.vcxproj +++ b/USBPcapDriver/USBPcap.vcxproj @@ -87,11 +87,15 @@ $(VC_IncludePath);$(WindowsSDK_IncludePath); $(SolutionDir)build\driver\$(Platform)\$(ConfigurationName)\ build\$(Platform)\$(ConfigurationName)\ + http://sha256timestamp.ws.symantec.com/sha256/timestamp + true DbgengKernelDebugger $(SolutionDir)build\driver\$(Platform)\$(ConfigurationName)\ build\$(Platform)\$(ConfigurationName)\ + http://sha256timestamp.ws.symantec.com/sha256/timestamp + true @@ -103,9 +107,13 @@ sha256 + /as /td sha256 /tr "http://sha256timestamp.ws.symantec.com/sha256/timestamp" %(AdditionalOptions) - $(DDK_LIB_PATH)wdmsec.lib;$(DDK_LIB_PATH)usbd.lib + $(DDK_LIB_PATH)wdmsec.lib;$(DDK_LIB_PATH)usbd.lib;%(AdditionalDependencies) + + + true @@ -117,6 +125,7 @@ sha256 + /as /tr "http://sha256timestamp.ws.symantec.com/sha256/timestamp" /td sha256 %(AdditionalOptions) true diff --git a/USBPcapDriver/USBPcap.vcxproj.user b/USBPcapDriver/USBPcap.vcxproj.user new file mode 100644 index 0000000..56d2225 --- /dev/null +++ b/USBPcapDriver/USBPcap.vcxproj.user @@ -0,0 +1,9 @@ + + + + ..\certificates\USBPcapTestCert.pfx + + + ..\certificates\USBPcapTestCert.pfx + + \ No newline at end of file From 43c79f291b56b9fbc394d6f7d208240dd025be82 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Mon, 23 Oct 2023 16:26:58 +0300 Subject: [PATCH 3/7] Combine arm64 and x64 configs where possible Remove non-working debug configs --- USBPcap.sln | 8 -------- USBPcapDriver/USBPcap.vcxproj | 27 ++------------------------- USBPcapDriver/USBPcap.vcxproj.user | 5 +---- 3 files changed, 3 insertions(+), 37 deletions(-) diff --git a/USBPcap.sln b/USBPcap.sln index cfd40b2..1cdb163 100644 --- a/USBPcap.sln +++ b/USBPcap.sln @@ -7,18 +7,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "USBPcap", "USBPcapDriver\US EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM64 = Debug|ARM64 - Debug|x64 = Debug|x64 Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.ActiveCfg = Release|ARM64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.Build.0 = Release|ARM64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.Deploy.0 = Release|ARM64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.ActiveCfg = Release|x64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.Build.0 = Release|x64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.Deploy.0 = Release|x64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.ActiveCfg = Release|ARM64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.Build.0 = Release|ARM64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.Deploy.0 = Release|ARM64 diff --git a/USBPcapDriver/USBPcap.vcxproj b/USBPcapDriver/USBPcap.vcxproj index e7fb5e5..5eaf54c 100644 --- a/USBPcapDriver/USBPcap.vcxproj +++ b/USBPcapDriver/USBPcap.vcxproj @@ -49,7 +49,7 @@ $(LatestTargetPlatformVersion) - + Windows10 false WindowsKernelModeDriver10.0 @@ -57,22 +57,6 @@ KMDF Universal - - Windows10 - false - WindowsKernelModeDriver10.0 - Driver - KMDF - Universal - - - - - - - <_NT_TARGET_VERSION> - - @@ -81,7 +65,7 @@ - + DbgengKernelDebugger $(IncludePath) $(VC_IncludePath);$(WindowsSDK_IncludePath); @@ -90,13 +74,6 @@ http://sha256timestamp.ws.symantec.com/sha256/timestamp true - - DbgengKernelDebugger - $(SolutionDir)build\driver\$(Platform)\$(ConfigurationName)\ - build\$(Platform)\$(ConfigurationName)\ - http://sha256timestamp.ws.symantec.com/sha256/timestamp - true - true diff --git a/USBPcapDriver/USBPcap.vcxproj.user b/USBPcapDriver/USBPcap.vcxproj.user index 56d2225..062f390 100644 --- a/USBPcapDriver/USBPcap.vcxproj.user +++ b/USBPcapDriver/USBPcap.vcxproj.user @@ -1,9 +1,6 @@  - - ..\certificates\USBPcapTestCert.pfx - - + ..\certificates\USBPcapTestCert.pfx \ No newline at end of file From 5c9165d498155a05becae77bdaa5fc3f8c7606a5 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Mon, 23 Oct 2023 18:36:33 +0300 Subject: [PATCH 4/7] Include local getopt header instead of a system one --- USBPcapCMD/getopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/USBPcapCMD/getopt.c b/USBPcapCMD/getopt.c index 21e094e..75681fa 100644 --- a/USBPcapCMD/getopt.c +++ b/USBPcapCMD/getopt.c @@ -54,7 +54,7 @@ #include #include #include -#include +#include "getopt.h" #include #include #include From 2aa9e38f00e86796a0309104b9d04287b8b21d9d Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Mon, 23 Oct 2023 18:37:15 +0300 Subject: [PATCH 5/7] Add USBPcapCMD Visual Studio project --- USBPcap.sln | 30 +++ USBPcapCMD/USBPcapCMD.manifest | 6 +- USBPcapCMD/USBPcapCMD.vcxproj | 251 ++++++++++++++++++++++++++ USBPcapCMD/USBPcapCMD.vcxproj.filters | 77 ++++++++ USBPcapCMD/USBPcapCMD.vcxproj.user | 4 + 5 files changed, 365 insertions(+), 3 deletions(-) create mode 100644 USBPcapCMD/USBPcapCMD.vcxproj create mode 100644 USBPcapCMD/USBPcapCMD.vcxproj.filters create mode 100644 USBPcapCMD/USBPcapCMD.vcxproj.user diff --git a/USBPcap.sln b/USBPcap.sln index 1cdb163..cf52faf 100644 --- a/USBPcap.sln +++ b/USBPcap.sln @@ -5,18 +5,48 @@ VisualStudioVersion = 17.6.33815.320 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "USBPcap", "USBPcapDriver\USBPcap.vcxproj", "{9C54EF34-97C5-44BA-BBA6-5B2385C53F64}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "USBPcapCMD", "USBPcapCMD\USBPcapCMD.vcxproj", "{B2537488-6872-4FF7-8E80-E71BB57AD3BE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.ActiveCfg = Release|ARM64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.Build.0 = Release|ARM64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.Deploy.0 = Release|ARM64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.ActiveCfg = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.Build.0 = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.Deploy.0 = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.ActiveCfg = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.Build.0 = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.Deploy.0 = Release|x64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.ActiveCfg = Release|ARM64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.Build.0 = Release|ARM64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.Deploy.0 = Release|ARM64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|x64.ActiveCfg = Release|x64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|x64.Build.0 = Release|x64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|x64.Deploy.0 = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|x86.ActiveCfg = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|x86.Build.0 = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|x86.Deploy.0 = Release|x64 + {B2537488-6872-4FF7-8E80-E71BB57AD3BE}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {B2537488-6872-4FF7-8E80-E71BB57AD3BE}.Debug|ARM64.Build.0 = Debug|ARM64 + {B2537488-6872-4FF7-8E80-E71BB57AD3BE}.Debug|x64.ActiveCfg = Debug|x64 + {B2537488-6872-4FF7-8E80-E71BB57AD3BE}.Debug|x64.Build.0 = Debug|x64 + {B2537488-6872-4FF7-8E80-E71BB57AD3BE}.Debug|x86.ActiveCfg = Debug|Win32 + {B2537488-6872-4FF7-8E80-E71BB57AD3BE}.Debug|x86.Build.0 = Debug|Win32 + {B2537488-6872-4FF7-8E80-E71BB57AD3BE}.Release|ARM64.ActiveCfg = Release|ARM64 + {B2537488-6872-4FF7-8E80-E71BB57AD3BE}.Release|ARM64.Build.0 = Release|ARM64 + {B2537488-6872-4FF7-8E80-E71BB57AD3BE}.Release|x64.ActiveCfg = Release|x64 + {B2537488-6872-4FF7-8E80-E71BB57AD3BE}.Release|x64.Build.0 = Release|x64 + {B2537488-6872-4FF7-8E80-E71BB57AD3BE}.Release|x86.ActiveCfg = Release|Win32 + {B2537488-6872-4FF7-8E80-E71BB57AD3BE}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/USBPcapCMD/USBPcapCMD.manifest b/USBPcapCMD/USBPcapCMD.manifest index 7e3424b..86820f8 100644 --- a/USBPcapCMD/USBPcapCMD.manifest +++ b/USBPcapCMD/USBPcapCMD.manifest @@ -2,9 +2,9 @@ - + USBPcapCMD diff --git a/USBPcapCMD/USBPcapCMD.vcxproj b/USBPcapCMD/USBPcapCMD.vcxproj new file mode 100644 index 0000000..a84e92b --- /dev/null +++ b/USBPcapCMD/USBPcapCMD.vcxproj @@ -0,0 +1,251 @@ + + + + + Debug + ARM64 + + + Debug + Win32 + + + Release + ARM64 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 17.0 + Win32Proj + {b2537488-6872-4ff7-8e80-e71bb57ad3be} + USBPcapCMD + 10.0 + + + + Application + true + v143 + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + $(VC_IncludePath);$(WindowsSDK_IncludePath);..\USBPcapDriver\include + $(SolutionDir)build\cmd\$(Platform)\$(ConfigurationName)\ + build\$(Platform)\$(ConfigurationName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Windows + true + $(CoreLibraryDependencies);Cfgmgr32.lib;Setupapi.lib;%(AdditionalDependencies) + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Windows + true + $(CoreLibraryDependencies);Cfgmgr32.lib;Setupapi.lib;%(AdditionalDependencies) + + + + + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + $(CoreLibraryDependencies);Cfgmgr32.lib;Setupapi.lib;%(AdditionalDependencies) + + + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + $(CoreLibraryDependencies);Cfgmgr32.lib;Setupapi.lib;%(AdditionalDependencies) + + + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Windows + true + $(CoreLibraryDependencies);Cfgmgr32.lib;Setupapi.lib;%(AdditionalDependencies) + + + + + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + $(CoreLibraryDependencies);Cfgmgr32.lib;Setupapi.lib;%(AdditionalDependencies) + + + + + + + + diff --git a/USBPcapCMD/USBPcapCMD.vcxproj.filters b/USBPcapCMD/USBPcapCMD.vcxproj.filters new file mode 100644 index 0000000..c4ef0fd --- /dev/null +++ b/USBPcapCMD/USBPcapCMD.vcxproj.filters @@ -0,0 +1,77 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + + + + Resource Files + + + diff --git a/USBPcapCMD/USBPcapCMD.vcxproj.user b/USBPcapCMD/USBPcapCMD.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/USBPcapCMD/USBPcapCMD.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file From 963737b8c9175025ae17f53ed86192501d313d69 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Mon, 23 Oct 2023 18:53:01 +0300 Subject: [PATCH 6/7] Add Debug config for the driver --- USBPcap.sln | 18 +++++++++--------- USBPcapDriver/USBPcap.vcxproj | 19 ++++++++++++++++--- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/USBPcap.sln b/USBPcap.sln index cf52faf..5e7bb87 100644 --- a/USBPcap.sln +++ b/USBPcap.sln @@ -17,15 +17,15 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.ActiveCfg = Release|ARM64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.Build.0 = Release|ARM64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.Deploy.0 = Release|ARM64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.ActiveCfg = Release|x64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.Build.0 = Release|x64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.Deploy.0 = Release|x64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.ActiveCfg = Release|x64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.Build.0 = Release|x64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.Deploy.0 = Release|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.Build.0 = Debug|ARM64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.ActiveCfg = Debug|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.Build.0 = Debug|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.Deploy.0 = Debug|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.ActiveCfg = Debug|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.Build.0 = Debug|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.Deploy.0 = Debug|x64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.ActiveCfg = Release|ARM64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.Build.0 = Release|ARM64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.Deploy.0 = Release|ARM64 diff --git a/USBPcapDriver/USBPcap.vcxproj b/USBPcapDriver/USBPcap.vcxproj index 5eaf54c..758e340 100644 --- a/USBPcapDriver/USBPcap.vcxproj +++ b/USBPcapDriver/USBPcap.vcxproj @@ -5,10 +5,18 @@ Release x64 + + Debug + x64 + Release ARM64 + + Debug + ARM64 + @@ -51,12 +59,17 @@ Windows10 - false WindowsKernelModeDriver10.0 Driver KMDF Universal + + false + + + true + @@ -74,7 +87,7 @@ http://sha256timestamp.ws.symantec.com/sha256/timestamp true - + true true @@ -93,7 +106,7 @@ true - + true true From da384e766f27f8c0c8f131e19496a33756f6c103 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Mon, 23 Oct 2023 19:15:50 +0300 Subject: [PATCH 7/7] Further VS project fixes --- USBPcap.sln | 6 +-- USBPcapCMD/USBPcapCMD.vcxproj | 54 ++----------------- USBPcapDriver/USBPcap.vcxproj | 12 ++++- ...SBPcap.filters => USBPcap.vcxproj.filters} | 0 4 files changed, 17 insertions(+), 55 deletions(-) rename USBPcapDriver/{USBPcap.filters => USBPcap.vcxproj.filters} (100%) diff --git a/USBPcap.sln b/USBPcap.sln index 5e7bb87..23e2d65 100644 --- a/USBPcap.sln +++ b/USBPcap.sln @@ -23,9 +23,9 @@ Global {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.ActiveCfg = Debug|x64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.Build.0 = Debug|x64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x64.Deploy.0 = Debug|x64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.ActiveCfg = Debug|x64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.Build.0 = Debug|x64 - {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.Deploy.0 = Debug|x64 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.ActiveCfg = Debug|Win32 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.Build.0 = Debug|Win32 + {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Debug|x86.Deploy.0 = Debug|Win32 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.ActiveCfg = Release|ARM64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.Build.0 = Release|ARM64 {9C54EF34-97C5-44BA-BBA6-5B2385C53F64}.Release|ARM64.Deploy.0 = Release|ARM64 diff --git a/USBPcapCMD/USBPcapCMD.vcxproj b/USBPcapCMD/USBPcapCMD.vcxproj index a84e92b..04af522 100644 --- a/USBPcapCMD/USBPcapCMD.vcxproj +++ b/USBPcapCMD/USBPcapCMD.vcxproj @@ -46,9 +46,6 @@ - - - @@ -63,66 +60,23 @@ 10.0 - - Application - true - v143 - Unicode - - - Application - true - v143 - Unicode - - - Application - false - v143 - true - Unicode - - + Application - false v143 - true Unicode - - Application + true - v143 - Unicode - - Application + false - v143 - true - Unicode - - - - - - - - - - - - - - - - + diff --git a/USBPcapDriver/USBPcap.vcxproj b/USBPcapDriver/USBPcap.vcxproj index 758e340..07f0619 100644 --- a/USBPcapDriver/USBPcap.vcxproj +++ b/USBPcapDriver/USBPcap.vcxproj @@ -17,6 +17,14 @@ Debug ARM64 + + Release + Win32 + + + Debug + Win32 + @@ -87,7 +95,7 @@ http://sha256timestamp.ws.symantec.com/sha256/timestamp true - + true true @@ -106,7 +114,7 @@ true - + true true diff --git a/USBPcapDriver/USBPcap.filters b/USBPcapDriver/USBPcap.vcxproj.filters similarity index 100% rename from USBPcapDriver/USBPcap.filters rename to USBPcapDriver/USBPcap.vcxproj.filters