ReactOS 0.4.15-dev-7788-g1ad9096
shimeng.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Application compatibility module
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Shim engine structures
5 * COPYRIGHT: Copyright 2017 Mark Jansen (mark.jansen@reactos.org)
6 */
7
8#ifndef SHIMENG_H
9#define SHIMENG_H
10
11/* This header is ReactOS specific */
12
13/* Structure that allows dynamic growing.
14 Be aware, the data may move! */
15typedef struct _ARRAY
16{
22
23typedef struct _SHIMINFO *PSHIMINFO;
24typedef struct _SHIMMODULE *PSHIMMODULE;
25
26typedef struct tagHOOKAPIEX *PHOOKAPIEX;
27
28/* Shims know this structure as HOOKAPI, with 2 reserved members (the last 2). */
29typedef struct tagHOOKAPIEX
30{
38
39C_ASSERT(sizeof(HOOKAPIEX) == sizeof(HOOKAPI));
41
42typedef struct _INEXCLUDE
43{
47
48typedef struct _SHIMINFO
49{
54 ARRAY InExclude; /* INEXCLUDE */
56
57typedef struct _SHIMMODULE
58{
61
63 BOOL (WINAPI* pNotifyShims)(DWORD fdwReason, PVOID ptr);
64
65 ARRAY EnabledShims; /* PSHIMINFO */
67
68typedef struct _HOOKMODULEINFO
69{
72
73 ARRAY HookApis; /* PHOOKAPIEX */
74
76
77typedef struct _FLAGINFO
78{
83
84
85#if SDBAPI_DEBUG_ALLOC
86
87LPVOID SdbpAlloc(SIZE_T size, int line, const char* file);
88LPVOID SdbpReAlloc(LPVOID mem, SIZE_T size, SIZE_T oldSize, int line, const char* file);
89VOID SdbpFree(LPVOID mem, int line, const char* file);
90
91#define SeiAlloc(size) SdbpAlloc(size, __LINE__, __FILE__)
92#define SeiReAlloc(mem, size, oldSize) SdbpReAlloc(mem, size, oldSize, __LINE__, __FILE__)
93#define SeiFree(mem) SdbpFree(mem, __LINE__, __FILE__)
94
95#else
96
100
101#define SeiAlloc(size) SdbpAlloc(size)
102#define SeiReAlloc(mem, size, oldSize) SdbpReAlloc(mem, size, oldSize)
103#define SeiFree(mem) SdbpFree(mem)
104
105#endif
106
107#endif // SHIMENG_H
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
#define C_ASSERT(e)
Definition: intsafe.h:73
static tGETHOOKAPIS pGetHookAPIs
Definition: dispmode.c:26
DWORD * PDWORD
Definition: pedump.c:68
#define offsetof(TYPE, MEMBER)
struct _ARRAY * PARRAY
struct _FLAGINFO FLAGINFO
LPVOID SdbpAlloc(SIZE_T size)
Definition: sdbapi.c:55
struct tagHOOKAPIEX HOOKAPIEX
struct _HOOKMODULEINFO HOOKMODULEINFO
struct tagHOOKAPIEX * PHOOKAPIEX
Definition: shimeng.h:26
struct _INEXCLUDE * PINEXCLUDE
LPVOID SdbpReAlloc(LPVOID mem, SIZE_T size, SIZE_T oldSize)
Definition: sdbapi.c:68
struct _ARRAY ARRAY
struct _SHIMMODULE SHIMMODULE
struct _HOOKMODULEINFO * PHOOKMODULEINFO
struct _SHIMMODULE * PSHIMMODULE
Definition: shimeng.h:24
struct _INEXCLUDE INEXCLUDE
struct _SHIMINFO * PSHIMINFO
Definition: shimeng.h:23
struct _FLAGINFO * PFLAGINFO
struct _SHIMINFO SHIMINFO
VOID SdbpFree(LPVOID mem)
Definition: sdbapi.c:81
Definition: shimeng.h:16
PVOID Data__
Definition: shimeng.h:17
DWORD Size__
Definition: shimeng.h:18
DWORD ItemSize__
Definition: shimeng.h:20
DWORD MaxSize__
Definition: shimeng.h:19
ULONG ProcessParameters_Flags
Definition: shimeng.h:81
ULARGE_INTEGER AppCompatFlagsUser
Definition: shimeng.h:80
ULARGE_INTEGER AppCompatFlags
Definition: shimeng.h:79
PVOID BaseAddress
Definition: shimeng.h:71
UNICODE_STRING Name
Definition: shimeng.h:70
ARRAY HookApis
Definition: shimeng.h:73
BOOL Include
Definition: shimeng.h:45
UNICODE_STRING Module
Definition: shimeng.h:44
PHOOKAPIEX pHookApi
Definition: shimeng.h:51
DWORD dwHookCount
Definition: shimeng.h:52
PSHIMMODULE pShimModule
Definition: shimeng.h:53
PCWSTR ShimName
Definition: shimeng.h:50
ARRAY InExclude
Definition: shimeng.h:54
UNICODE_STRING Name
Definition: shimeng.h:59
LPCWSTR PDWORD pdwHookCount
Definition: shimeng.h:62
PVOID BaseAddress
Definition: shimeng.h:60
BOOL(WINAPI *pNotifyShims)(DWORD fdwReason
ARRAY EnabledShims
Definition: shimeng.h:65
PVOID ptr
Definition: shimeng.h:63
LPCWSTR wszShimName
Definition: shimeng.h:62
Definition: fci.c:127
Definition: parser.c:49
Definition: mem.c:156
PHOOKAPIEX ApiLink
Definition: shimeng.h:36
PCSTR LibraryName
Definition: shimeng.h:31
PVOID ReplacementFunction
Definition: shimeng.h:33
PSHIMINFO pShimInfo
Definition: shimeng.h:35
PVOID OriginalFunction
Definition: shimeng.h:34
PCSTR FunctionName
Definition: shimeng.h:32
const uint16_t * PCWSTR
Definition: typedefs.h:57
ULONG_PTR SIZE_T
Definition: typedefs.h:80
const char * PCSTR
Definition: typedefs.h:52
uint32_t ULONG
Definition: typedefs.h:59
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define WINAPI
Definition: msvc.h:6
const char * LPCSTR
Definition: xmlstorage.h:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185