From 17a622f5069924b24754e370ab20a09c5ac7ddaa Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Fri, 17 Feb 2017 16:12:19 +0000 Subject: [PATCH] [SDK][KERNEL32] Add defines for PEB.AppCompatFlags CORE-12768 #resolve svn path=/trunk/; revision=73815 --- reactos/dll/win32/kernel32/client/path.c | 2 +- reactos/sdk/include/ndk/pstypes.h | 25 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/kernel32/client/path.c b/reactos/dll/win32/kernel32/client/path.c index 7c426d631f4..7d91c052a85 100644 --- a/reactos/dll/win32/kernel32/client/path.c +++ b/reactos/dll/win32/kernel32/client/path.c @@ -1861,7 +1861,7 @@ GetShortPathNameW(IN LPCWSTR lpszLongPath, if (GetFileAttributesW(lpszLongPath) == INVALID_FILE_ATTRIBUTES) { /* Windows checks for an application compatibility flag to allow this */ - if (!(NtCurrentPeb()) || !(NtCurrentPeb()->AppCompatFlags.LowPart & 1)) + if (!(NtCurrentPeb()) || !(NtCurrentPeb()->AppCompatFlags.LowPart & GetShortPathNameNT4)) { /* It doesn't, so fail */ ReturnLength = 0; diff --git a/reactos/sdk/include/ndk/pstypes.h b/reactos/sdk/include/ndk/pstypes.h index 8e5fcfd26c5..eb1ef0a0583 100644 --- a/reactos/sdk/include/ndk/pstypes.h +++ b/reactos/sdk/include/ndk/pstypes.h @@ -735,6 +735,31 @@ typedef struct _Wx86ThreadState } Wx86ThreadState, *PWx86ThreadState; #endif +// +// PEB.AppCompatFlags +// Tag FLAG_MASK_KERNEL +// +typedef enum _APPCOMPAT_FLAGS +{ + GetShortPathNameNT4 = 0x1, + GetDiskFreeSpace2GB = 0x8, + FTMFromCurrentAPI = 0x20, + DisallowCOMBindingNotifications = 0x40, + Ole32ValidatePointers = 0x80, + DisableCicero = 0x100, + Ole32EnableAsyncDocFile = 0x200, + EnableLegacyExceptionHandlinginOLE = 0x400, + DisableAdvanceRPCClientHardening = 0x800, + DisableMaybeNULLSizeisConsistencycheck = 0x1000, + DisableAdvancedRPCrangeCheck = 0x4000, + EnableLegacyExceptionHandlingInRPC = 0x8000, + EnableLegacyNTFSFlagsForDocfileOpens = 0x10000, + DisableNDRIIDConsistencyCheck = 0x20000, + UserDisableForwarderPatch = 0x40000, + DisableNewWMPAINTDispatchInOLE = 0x100000, + DoNotAddToCache = 0x80000000, +} APPCOMPAT_FLAGS; + // // Process Environment Block (PEB) -- 2.17.1