1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-09-20 02:09:25 +03:00

v4.19-9577-beta

This commit is contained in:
dnobori
2015-09-15 14:22:53 +09:00
parent 4b65e251f2
commit 9a82b3c65c
1088 changed files with 1634 additions and 1973 deletions

View File

@ -119,6 +119,8 @@
#include "Wfp.h"
static WFP_CTX *wfp = NULL;
static bool g_is_win8 = false;
static POOL_TYPE g_pool_type = NonPagedPool;
// Dispatch function
NTSTATUS DriverDispatch(DEVICE_OBJECT *device_object, IRP *irp)
@ -780,12 +782,24 @@ NTSTATUS DriverEntry(DRIVER_OBJECT *driver_object, UNICODE_STRING *registry_path
{
NTSTATUS ret;
FWPM_SESSION0 t;
ULONG os_ver1 = 0, os_ver2 = 0;
if (wfp != NULL)
{
return STATUS_UNSUCCESSFUL;
}
g_is_win8 = false;
g_pool_type = NonPagedPool;
PsGetVersion(&os_ver1, &os_ver2, NULL, NULL);
if ((os_ver1 == 6 && os_ver2 >= 2) || (os_ver1 >= 7))
{
g_is_win8 = true;
g_pool_type = 512;
}
wfp = ZeroMalloc(sizeof(WFP_CTX));
RtlInitUnicodeString(&wfp->DeviceName, WFP_DEVICE_NAME);
@ -1049,7 +1063,7 @@ void *Malloc(UINT size)
{
void *p;
p = ExAllocatePoolWithTag(NonPagedPool, size + sizeof(UINT), MEMPOOL_TAG);
p = ExAllocatePoolWithTag(g_pool_type, size + sizeof(UINT), MEMPOOL_TAG);
*((UINT *)p) = size;
return ((UCHAR *)p) + sizeof(UINT);

View File

@ -78,9 +78,9 @@
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalOptions="/driver /subsystem:native,6.00 /FULLBUILD /align:0x80 /osversion:6.00 /STACK:0x40000,0x1000 /MERGE:_PAGE=PAGE /MERGE:_TEXT=.text /NODEFAULTLIB /stub:C:\WINDDK\7600.16385.0\lib\wlh\stub512.com"
AdditionalOptions="/driver /subsystem:native,6.00 /FULLBUILD /align:0x80 /osversion:6.00 /STACK:0x40000,0x1000 /MERGE:_PAGE=PAGE /MERGE:_TEXT=.text /NODEFAULTLIB /stub:C:\WINDDK\7600.16385.0\lib\wlh\stub512.com /ALIGN:4096"
AdditionalDependencies="wdm.lib ndis.lib ntoskrnl.lib fwpkclnt.lib &quot;$(SolutionDir)tmp\VersionResources\$(ProjectName)_$(PlatformName).res&quot;"
OutputFile="$(OutDir)\pxwfp_x86.sys"
OutputFile="$(OutDir)\pxwfp_x86_unsigned.sys"
LinkIncremental="1"
AdditionalLibraryDirectories="C:\WINDDK\7600.16385.0\lib\wlh\i386"
GenerateManifest="false"
@ -121,7 +121,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="$(SolutionDir)bin\BuildUtil.exe /CMD:SignCode &quot;$(TargetPath)&quot; /COMMENT:&quot;VPN Software&quot; /KERNEL:yes"
CommandLine="$(SolutionDir)bin\BuildUtil.exe /CMD:SignCode &quot;$(TargetPath)&quot; /DEST:&quot;$(TargetDir)pxwfp_x86.sys&quot; /COMMENT:&quot;VPN Software&quot; /KERNEL:yes /CERTID:0 /SHAMODE:0&#x0D;&#x0A;$(SolutionDir)bin\BuildUtil.exe /CMD:SignCode &quot;$(TargetPath)&quot; /DEST:&quot;$(TargetDir)pxwfp_x86_win10.sys&quot; /COMMENT:&quot;VPN Software&quot; /KERNEL:yes /CERTID:0 /SHAMODE:2"
/>
</Configuration>
<Configuration
@ -182,9 +182,9 @@
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalOptions="/driver /subsystem:native /FULLBUILD /align:0x80 /osversion:6.00 /STACK:0x40000,0x1000 /MERGE:_PAGE=PAGE /MERGE:_TEXT=.text /NODEFAULTLIB /stub:C:\WINDDK\7600.16385.0\lib\wlh\stub512.com"
AdditionalOptions="/driver /subsystem:native /FULLBUILD /align:0x80 /osversion:6.00 /STACK:0x40000,0x1000 /MERGE:_PAGE=PAGE /MERGE:_TEXT=.text /NODEFAULTLIB /stub:C:\WINDDK\7600.16385.0\lib\wlh\stub512.com /ALIGN:4096"
AdditionalDependencies="wdm.lib ndis.lib wdmsec.lib ntoskrnl.lib fwpkclnt.lib &quot;$(SolutionDir)tmp\VersionResources\$(ProjectName)_$(PlatformName).res&quot;"
OutputFile="$(OutDir)\pxwfp_x64.sys"
OutputFile="$(OutDir)\pxwfp_x64_unsigned.sys"
LinkIncremental="1"
AdditionalLibraryDirectories="C:\WINDDK\7600.16385.0\lib\wlh\amd64"
GenerateManifest="false"
@ -225,7 +225,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="$(SolutionDir)bin\BuildUtil.exe /CMD:SignCode &quot;$(TargetPath)&quot; /COMMENT:&quot;VPN Software&quot; /KERNEL:yes"
CommandLine="$(SolutionDir)bin\BuildUtil.exe /CMD:SignCode &quot;$(TargetPath)&quot; /DEST:&quot;$(TargetDir)pxwfp_x64.sys&quot; /COMMENT:&quot;VPN Software&quot; /KERNEL:yes /CERTID:0 /SHAMODE:0&#x0D;&#x0A;$(SolutionDir)bin\BuildUtil.exe /CMD:SignCode &quot;$(TargetPath)&quot; /DEST:&quot;$(TargetDir)pxwfp_x64_win10.sys&quot; /COMMENT:&quot;VPN Software&quot; /KERNEL:yes /CERTID:0 /SHAMODE:2"
/>
</Configuration>
</Configurations>