ReactOS 0.4.15-dev-5672-gf73ac17
compat_undoc.h
Go to the documentation of this file.
1#ifndef COMPAT_UNDOC_H
2#define COMPAT_UNDOC_H
3
4
5typedef 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
20static
21inline
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
#define NtCurrentPeb()
Definition: FLS.c:22
static DWORD RosGetProcessCompatVersion(VOID)
Definition: compat_undoc.h:22
#define REACTOS_SHIMDATA_MAGIC
Definition: compat_undoc.h:15
struct _ReactOS_ShimData ReactOS_ShimData
#define REACTOS_COMPATVERSION_UNINITIALIZED
Definition: compat_undoc.h:16
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD dwReserved2[242]
Definition: compat_undoc.h:10
DWORD dwReserved1[130]
Definition: compat_undoc.h:7
DWORD dwRosProcessCompatVersion
Definition: compat_undoc.h:11