From aa9fae921da829919a9056b4946641de7a0da8b5 Mon Sep 17 00:00:00 2001 From: Bo Branten Date: Mon, 19 Feb 2024 22:29:42 +0100 Subject: [PATCH] updated to build with Visual Studio 2022 and latest WDK --- Ext2Mgr/Ext2Mgr.vcxproj | 8 ++++---- Ext2Srv/Ext2Srv.vcxproj | 8 ++++---- Ext4Fsd/debug.c | 13 +++++++++++-- Ext4Fsd/fsctl.c | 2 +- Ext4Fsd/memory.c | 2 +- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Ext2Mgr/Ext2Mgr.vcxproj b/Ext2Mgr/Ext2Mgr.vcxproj index 311a01d..38b2ddc 100644 --- a/Ext2Mgr/Ext2Mgr.vcxproj +++ b/Ext2Mgr/Ext2Mgr.vcxproj @@ -28,14 +28,14 @@ Application true - v142 + v143 MultiByte Dynamic Application false - v142 + v143 true MultiByte Dynamic @@ -43,14 +43,14 @@ Application true - v142 + v143 MultiByte Dynamic Application false - v142 + v143 true MultiByte Dynamic diff --git a/Ext2Srv/Ext2Srv.vcxproj b/Ext2Srv/Ext2Srv.vcxproj index 6f794ec..8c9c070 100644 --- a/Ext2Srv/Ext2Srv.vcxproj +++ b/Ext2Srv/Ext2Srv.vcxproj @@ -28,26 +28,26 @@ Application true - v142 + v143 MultiByte Application false - v142 + v143 true MultiByte Application true - v142 + v143 MultiByte Application false - v142 + v143 true MultiByte diff --git a/Ext4Fsd/debug.c b/Ext4Fsd/debug.c index 2f7eb53..fa12919 100644 --- a/Ext4Fsd/debug.c +++ b/Ext4Fsd/debug.c @@ -2687,8 +2687,17 @@ Ext2AllocatePool( IN ULONG Tag ) { - return ExAllocatePoolWithTag( - PoolType, + POOL_FLAGS PoolFlags; + + if (PoolType == PagedPool) + PoolFlags = POOL_FLAG_PAGED; + else if (PoolType == NonPagedPool) + PoolFlags = POOL_FLAG_NON_PAGED; + else + PoolFlags = 0; + + return ExAllocatePool2( + PoolFlags, NumberOfBytes, Tag); } diff --git a/Ext4Fsd/fsctl.c b/Ext4Fsd/fsctl.c index f97d098..d9cd484 100644 --- a/Ext4Fsd/fsctl.c +++ b/Ext4Fsd/fsctl.c @@ -2601,7 +2601,7 @@ Ext2CheckDismount ( BOOLEAN bDeleted = FALSE, bTearDown = FALSE; ULONG UnCleanCount = 0; - NewVpb = ExAllocatePoolWithTag(NonPagedPool, VPB_SIZE, TAG_VPB); + NewVpb = Ext2AllocatePool(NonPagedPool, VPB_SIZE, TAG_VPB); if (NewVpb == NULL) { DEBUG(DL_ERR, ( "Ex2CheckDismount: failed to allocate NewVpb.\n")); return FALSE; diff --git a/Ext4Fsd/memory.c b/Ext4Fsd/memory.c index 2fdde1f..cd85408 100644 --- a/Ext4Fsd/memory.c +++ b/Ext4Fsd/memory.c @@ -459,7 +459,7 @@ struct dentry *Ext2BuildEntry(PEXT2_VCB Vcb, PEXT2_MCB Dcb, PUNICODE_STRING File de->d_parent = Dcb->de; Oem.MaximumLength = (USHORT)Ext2UnicodeToOEMSize(Vcb, FileName) + 1; - Oem.Buffer = ExAllocatePool(PagedPool, Oem.MaximumLength); + Oem.Buffer = Ext2AllocatePool(PagedPool, Oem.MaximumLength, 'EB2E'); if (!Oem.Buffer) { DEBUG(DL_ERR, ( "Ex2BuildEntry: failed to allocate OEM name.\n")); __leave;