ReactOS  0.4.14-dev-342-gdc047f9
compat_undoc.h
Go to the documentation of this file.
1 #ifndef COMPAT_UNDOC_H
2 #define COMPAT_UNDOC_H
3 
4 
5 typedef struct _ReactOS_ShimData
6 {
13 
14 
15 #define REACTOS_SHIMDATA_MAGIC 0xAC0DEDAB
16 #define REACTOS_COMPATVERSION_UNINITIALIZED 0xfffffffe
17 #define REACTOS_COMPATVERSION_IGNOREMANIFEST 0xffffffff
18 
19 // Returns values in the form of _WIN32_WINNT_VISTA, _WIN32_WINNT_WIN7 etc
20 static
21 inline
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 }
36 
37 
38 #endif // COMPAT_UNDOC_H
struct _ReactOS_ShimData ReactOS_ShimData
DWORD dwReserved1[130]
Definition: compat_undoc.h:7
static DWORD RosGetProcessCompatVersion(VOID)
Definition: compat_undoc.h:22
#define REACTOS_SHIMDATA_MAGIC
Definition: compat_undoc.h:15
unsigned long DWORD
Definition: ntddk_ex.h:95
#define REACTOS_COMPATVERSION_UNINITIALIZED
Definition: compat_undoc.h:16
#define NtCurrentPeb()
Definition: FLS.c:20
DWORD dwRosProcessCompatVersion
Definition: compat_undoc.h:11
DWORD dwReserved2[242]
Definition: compat_undoc.h:10