ReactOS 0.4.16-dev-250-g3ecd236
compat_undoc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _ReactOS_ShimData
 

Macros

#define REACTOS_SHIMDATA_MAGIC   0xAC0DEDAB
 
#define REACTOS_COMPATVERSION_UNINITIALIZED   0xfffffffe
 
#define REACTOS_COMPATVERSION_IGNOREMANIFEST   0xffffffff
 

Typedefs

typedef struct _ReactOS_ShimData ReactOS_ShimData
 

Functions

static DWORD RosGetProcessCompatVersion (VOID)
 
static UINT RosGetProcessEffectiveVersion (VOID)
 
BOOL WINAPI BaseCheckAppcompatCache (_In_ PCWSTR ApplicationName, _In_ HANDLE FileHandle, _In_opt_ PCWSTR Environment, _Out_opt_ PULONG pdwReason)
 

Macro Definition Documentation

◆ REACTOS_COMPATVERSION_IGNOREMANIFEST

#define REACTOS_COMPATVERSION_IGNOREMANIFEST   0xffffffff

Definition at line 17 of file compat_undoc.h.

◆ REACTOS_COMPATVERSION_UNINITIALIZED

#define REACTOS_COMPATVERSION_UNINITIALIZED   0xfffffffe

Definition at line 16 of file compat_undoc.h.

◆ REACTOS_SHIMDATA_MAGIC

#define REACTOS_SHIMDATA_MAGIC   0xAC0DEDAB

Definition at line 15 of file compat_undoc.h.

Typedef Documentation

◆ ReactOS_ShimData

Function Documentation

◆ BaseCheckAppcompatCache()

BOOL WINAPI BaseCheckAppcompatCache ( _In_ PCWSTR  ApplicationName,
_In_ HANDLE  FileHandle,
_In_opt_ PCWSTR  Environment,
_Out_opt_ PULONG  pdwReason 
)

Definition at line 229 of file appcache.c.

234{
235 BOOL ret = FALSE;
237
238 DPRINT("(%S, %p, %S, %p)\n", ApplicationName, FileHandle, Environment, pdwReason);
239
240 dwReason = 0;
242 {
243 dwReason |= 2;
244 }
245 else
246 {
248 if (!ret)
249 dwReason |= 1;
250 }
251
252 if (pdwReason)
253 *pdwReason = dwReason;
254
255 return ret;
256}
BOOL BasepShimCacheCheckBypass(_In_ PCWSTR ApplicationName, _In_ HANDLE FileHandle, _In_opt_ PCWSTR Environment, _In_ BOOL bUnknown, _Out_opt_ PULONG pdwReason)
Definition: appcache.c:142
BOOL BasepShimCacheLookup(_In_ PCWSTR ApplicationName, _In_ HANDLE FileHandle)
Definition: appcache.c:205
DWORD dwReason
Definition: misc.cpp:141
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231
PVOID PVOID PWCHAR PVOID Environment
Definition: env.c:47
PVOID PVOID PWCHAR ApplicationName
Definition: env.c:47
#define DPRINT
Definition: sndvol32.h:73
uint32_t ULONG
Definition: typedefs.h:59
int ret

Referenced by BasepCheckBadapp(), and Imm32CheckAndApplyAppCompat().

◆ RosGetProcessCompatVersion()

static DWORD RosGetProcessCompatVersion ( VOID  )
inlinestatic

Definition at line 22 of file compat_undoc.h.

23{
24 static DWORD g_CompatVersion = REACTOS_COMPATVERSION_UNINITIALIZED;
25 if (g_CompatVersion == REACTOS_COMPATVERSION_UNINITIALIZED)
26 {
27 ReactOS_ShimData* pShimData = (ReactOS_ShimData*)NtCurrentPeb()->pShimData;
28 if (pShimData && pShimData->dwMagic == REACTOS_SHIMDATA_MAGIC &&
29 pShimData->dwSize == sizeof(ReactOS_ShimData))
30 {
31 g_CompatVersion = pShimData->dwRosProcessCompatVersion;
32 }
33 }
34 return g_CompatVersion < REACTOS_COMPATVERSION_UNINITIALIZED ? g_CompatVersion : 0;
35}
#define NtCurrentPeb()
Definition: FLS.c:22
#define REACTOS_SHIMDATA_MAGIC
Definition: compat_undoc.h:15
#define REACTOS_COMPATVERSION_UNINITIALIZED
Definition: compat_undoc.h:16
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD dwRosProcessCompatVersion
Definition: compat_undoc.h:11

Referenced by LdrpApisetVersion(), and RosGetProcessEffectiveVersion().

◆ RosGetProcessEffectiveVersion()

static UINT RosGetProcessEffectiveVersion ( VOID  )
inlinestatic

Definition at line 39 of file compat_undoc.h.

40{
41 PPEB peb = NtCurrentPeb();
43 if (shimVer)
44 return shimVer;
45 else
46 return (peb->OSMajorVersion << 8) | (peb->OSMinorVersion);
47}
static DWORD RosGetProcessCompatVersion(VOID)
Definition: compat_undoc.h:22
unsigned int UINT
Definition: ndis.h:50
ULONG OSMinorVersion
Definition: ntddk_ex.h:301
ULONG OSMajorVersion
Definition: ntddk_ex.h:300

Referenced by CDefaultContextMenu::AddStaticContextMenusToMenu(), CDefaultContextMenu::InvokeRegVerb(), and CDefaultContextMenu::TryPickDefault().