1
0
mirror of https://github.com/bobranten/Ext4Fsd.git synced 2025-10-29 13:18:30 -05:00

Merge pull request #43 from LTRData/master

Newer VS/SDK/DDK compatibility
This commit is contained in:
Bo Brantén
2024-03-04 21:32:32 +01:00
committed by GitHub
11 changed files with 136 additions and 21 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@ Debug/
Release/
*.vcxproj.user
Ext2Fsd-setup.exe
*/cab/

View File

@@ -22,20 +22,20 @@
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{E1AF85D7-0179-4CF0-B0D1-21AE72B6DC2E}</ProjectGuid>
<RootNamespace>Ext2Mgr</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
@@ -43,14 +43,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>

View File

@@ -22,32 +22,32 @@
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{6A5A0B13-7E05-4CA9-9A2B-FADF76DBAC20}</ProjectGuid>
<RootNamespace>Ext2Srv</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>

View File

@@ -42,26 +42,28 @@
<Configuration>Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
<RootNamespace>Ext4Fsd</RootNamespace>
<WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>WDM</DriverType>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
<Driver_SpectreMitigation>false</Driver_SpectreMitigation>
<ConfigurationType>Driver</ConfigurationType>
<DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>WDM</DriverType>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
<Driver_SpectreMitigation>false</Driver_SpectreMitigation>
<ConfigurationType>Driver</ConfigurationType>
<DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
@@ -71,6 +73,7 @@
<DriverType>WDM</DriverType>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
<Driver_SpectreMitigation>false</Driver_SpectreMitigation>
<DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
@@ -80,6 +83,7 @@
<DriverType>WDM</DriverType>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
<Driver_SpectreMitigation>false</Driver_SpectreMitigation>
<DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
@@ -88,6 +92,7 @@
<ConfigurationType>Driver</ConfigurationType>
<DriverType>WDM</DriverType>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
<DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
@@ -96,6 +101,7 @@
<ConfigurationType>Driver</ConfigurationType>
<DriverType>WDM</DriverType>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
<DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
@@ -104,6 +110,7 @@
<ConfigurationType>Driver</ConfigurationType>
<DriverType>WDM</DriverType>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
<DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
@@ -112,6 +119,7 @@
<ConfigurationType>Driver</ConfigurationType>
<DriverType>WDM</DriverType>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
<DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -119,6 +127,30 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="PropertySheet.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<Import Project="PropertySheet.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="PropertySheet.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<Import Project="PropertySheet.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="PropertySheet.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<Import Project="PropertySheet.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<Import Project="PropertySheet.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="PropertySheet.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -359,9 +391,6 @@
<ItemGroup>
<ResourceCompile Include="Ext4Fsd.rc" />
</ItemGroup>
<ItemGroup>
<Inf Include="Ext2Fsd.inf" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@@ -291,9 +291,4 @@
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Inf Include="Ext2Fsd.inf">
<Filter>Driver Files</Filter>
</Inf>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<DisableSpecificWarnings>4996;4064;4627;4627;4366;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

View File

@@ -12,6 +12,8 @@
#include "stdarg.h"
#include "ext2fs.h"
#include <wdm.h>
/* GLOBALS ***************************************************************/
#if EXT2_DEBUG

50
Ext4Fsd/ext2fsd_dummy.inf Normal file
View File

@@ -0,0 +1,50 @@
; DUMMY.INF
; Dummy inf file.
[Version]
signature = "$Windows NT$"
Class = SCSIAdapter
ClassGUID = {4D36E97B-E325-11CE-BFC1-08002BE10318}
Provider = "LTR Data"
DriverVer = 02/22/2024,12.51.57.866
CatalogFile = ext2fsd_dummy.cat
[SourceDisksNames]
1 = "EXT4 File System Driver"
[SourceDisksFiles.x86]
ext2fsd.sys = 1, x86
[SourceDisksFiles.amd64]
ext2fsd.sys = 1, x64
[SourceDisksFiles.arm]
ext2fsd.sys = 1, arm
[SourceDisksFiles.arm64]
ext2fsd.sys = 1, arm64
[DestinationDirs]
ext2fsdSysFiles = 12
[DefaultInstall.ntx86]
CopyFiles = ext2fsdSysFiles
[ext2fsdSysFiles]
ext2fsd.sys
[DefaultInstall.ntx86.Services]
AddService = ext2fsd, , ext2fsdDrv
[ext2fsdDrv]
DisplayName = "EXT4 File System Driver"
StartType = 1
ServiceType = 2
ErrorControl = 0
ServiceBinary = %12%\ext2fsd.sys

View File

@@ -61,18 +61,23 @@ extern "C" {
#else
#ifndef RtlUshortByteSwap
USHORT
FASTCALL
RtlUshortByteSwap(
IN USHORT Source
);
#endif
#ifndef RtlUlongByteSwap
ULONG
FASTCALL
RtlUlongByteSwap(
IN ULONG Source
);
#endif
#ifndef RtlUlonglongByteSwap
ULONGLONG
FASTCALL
RtlUlonglongByteSwap(
@@ -80,6 +85,8 @@ RtlUlonglongByteSwap(
);
#endif
#endif
#define __swab16(x) RtlUshortByteSwap(x)
#define __swab32(x) RtlUlongByteSwap(x)
#define __swab64(x) RtlUlonglongByteSwap(x)

View File

@@ -1006,6 +1006,8 @@ int _strnicmp(const char* str1, const char* str2, size_t count)
return (int)c1 - (int)c2;
}
#if !defined(_M_ARM64) && !defined(_M_ARM)
int strncmp(const char* str1, const char* str2, size_t count)
{
unsigned char c1, c2;
@@ -1037,6 +1039,8 @@ char* strncpy(char* dest, const char* src, size_t count)
#endif
#endif
//
// initialzer and destructor
//

15
Ext4Fsd/mkcab.cmd Normal file
View File

@@ -0,0 +1,15 @@
copy /y ext2fsd_dummy.inf Release\
stampinf -d * -v * -f Release\ext2fsd_dummy.inf -a NTx86,NTamd64,NTia64,NTARM,NTARM64 || goto :eof
inf2cat /driver:Release /os:XP_X86,2000,XP_X64,Vista_X86,Vista_X64,7_X86,7_X64,Server2003_X86,Server2003_X64,Server2003_IA64,Server2008_X86,Server2008_X64,Server2008_IA64,Server2008R2_X64,Server2008R2_IA64,8_X86,8_X64,8_ARM,10_RS3_X86,10_RS3_X64,10_RS3_ARM64 || goto :eof
if exist cab\ext2fsd.cab del cab\ext2fsd.cab
if not exist cab mkdir cab
cabarc -p -r n cab\ext2fsd.cab Release\ext2fsd_dummy.inf Release\ext2fsd*.sys Release\ext2fsd*.pdb || goto :eof
if not exist cab\ext2fsd.cab goto :eof
signtool sign /a /as /v /sha1 a065b19d9f5a23bc67bb1cf6872283f504ba04b1 /fd sha256 /tr "http://sha256timestamp.ws.symantec.com/sha256/timestamp" cab\ext2fsd.cab || goto :eof