From d561f232ed26d018c8c3ec09b4e1bb2d8f3ae704 Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Sun, 18 Dec 2016 21:02:47 +0100 Subject: [SDK][KERNEL32] Add defines for PEB.AppCompatFlags --- 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 882d432..f747137 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 & APPCOMPAT_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 48ea19c..f568f30 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 +{ + APPCOMPAT_GetShortPathNameNT4 = 0x1, + APPCOMPAT_GetDiskFreeSpace2GB = 0x8, + APPCOMPAT_FTMFromCurrentAPI = 0x20, + APPCOMPAT_DisallowCOMBindingNotifications = 0x40, + APPCOMPAT_Ole32ValidatePointers = 0x80, + APPCOMPAT_DisableCicero = 0x100, + APPCOMPAT_Ole32EnableAsyncDocFile = 0x200, + APPCOMPAT_EnableLegacyExceptionHandlinginOLE = 0x400, + APPCOMPAT_DisableAdvanceRPCClientHardening = 0x800, + APPCOMPAT_DisableMaybeNULLSizeisConsistencycheck = 0x1000, + APPCOMPAT_DisableAdvancedRPCrangeCheck = 0x4000, + APPCOMPAT_EnableLegacyExceptionHandlingInRPC = 0x8000, + APPCOMPAT_EnableLegacyNTFSFlagsForDocfileOpens = 0x10000, + APPCOMPAT_DisableNDRIIDConsistencyCheck = 0x20000, + APPCOMPAT_UserDisableForwarderPatch = 0x40000, + APPCOMPAT_DisableNewWMPAINTDispatchInOLE = 0x100000, + APPCOMPAT_DoNotAddToCache = 0x80000000, +} APPCOMPAT_FLAGS; + // // Process Environment Block (PEB) -- 2.7.0.windows.2