ReactOS 0.4.15-dev-8119-g4fb2fdb
sdbpapi.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 private functions
5 * COPYRIGHT: Copyright 2013 Mislav Blažević
6 * Copyright 2015-2017 Mark Jansen (mark.jansen@reactos.org)
7 */
8
9#ifndef SDBPAPI_H
10#define SDBPAPI_H
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16void SdbpHeapInit(void);
17void SdbpHeapDeinit(void);
18
19#if SDBAPI_DEBUG_ALLOC
20
21LPVOID SdbpAlloc(SIZE_T size, int line, const char* file);
22LPVOID SdbpReAlloc(LPVOID mem, SIZE_T size, SIZE_T oldSize, int line, const char* file);
23void SdbpFree(LPVOID mem, int line, const char* file);
24
25#define SdbAlloc(size) SdbpAlloc(size, __LINE__, __FILE__)
26#define SdbReAlloc(mem, size, oldSize) SdbpReAlloc(mem, size, oldSize, __LINE__, __FILE__)
27#define SdbFree(mem) SdbpFree(mem, __LINE__, __FILE__)
28
29#else
30
33void SdbpFree(LPVOID mem);
34
35#define SdbAlloc(size) SdbpAlloc(size)
36#define SdbReAlloc(mem, size, oldSize) SdbpReAlloc(mem, size, oldSize)
37#define SdbFree(mem) SdbpFree(mem)
38
39#endif
40
41#if !defined(SDBWRITE_HOSTTOOL)
42typedef struct tagMEMMAPPED {
49
52#endif
53
54
57DWORD SdbpStrlen(PCWSTR string);
59
62
63#ifndef WINAPIV
64#define WINAPIV
65#endif
66
67typedef enum _SHIM_LOG_LEVEL {
72
75
76#define SHIM_ERR(fmt, ...) do { if (g_ShimDebugLevel) ShimDbgPrint(SHIM_ERR, __FUNCTION__, fmt, ##__VA_ARGS__ ); } while (0)
77#define SHIM_WARN(fmt, ...) do { if (g_ShimDebugLevel) ShimDbgPrint(SHIM_WARN, __FUNCTION__, fmt, ##__VA_ARGS__ ); } while (0)
78#define SHIM_INFO(fmt, ...) do { if (g_ShimDebugLevel) ShimDbgPrint(SHIM_INFO, __FUNCTION__, fmt, ##__VA_ARGS__ ); } while (0)
79
80#ifdef __cplusplus
81} // extern "C"
82#endif
83
84#endif // SDBPAPI_H
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char * FunctionName
Definition: acpixf.h:1279
#define write
Definition: acwin.h:97
DWORD TAGID
INT PATH_TYPE
static PDB pdb
Definition: db.cpp:172
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLenum GLenum GLenum GLenum mapping
Definition: glext.h:9031
BYTE * PBYTE
Definition: pedump.c:66
DWORD SdbpStrsize(PCWSTR string)
Definition: sdbapi.c:157
enum _SHIM_LOG_LEVEL SHIM_LOG_LEVEL
BOOL WINAPIV ShimDbgPrint(SHIM_LOG_LEVEL Level, PCSTR FunctionName, PCSTR Format,...)
Definition: apphelp.c:106
BOOL WINAPI SdbpCheckTagType(TAG tag, WORD type)
Definition: sdbapi.c:254
#define SHIM_INFO(fmt,...)
Definition: sdbpapi.h:78
ULONG g_ShimDebugLevel
Definition: apphelp.c:35
LPVOID SdbpAlloc(SIZE_T size)
Definition: sdbapi.c:55
void WINAPI SdbpCloseMemMappedFile(PMEMMAPPED mapping)
Definition: sdbapi.c:244
struct tagMEMMAPPED MEMMAPPED
LPVOID SdbpReAlloc(LPVOID mem, SIZE_T size, SIZE_T oldSize)
Definition: sdbapi.c:68
struct tagMEMMAPPED * PMEMMAPPED
void WINAPI SdbpFlush(PDB pdb)
Definition: sdbapi.c:140
#define SHIM_WARN(fmt,...)
Definition: sdbpapi.h:77
void SdbpHeapInit(void)
Definition: sdbapi.c:34
void SdbpHeapDeinit(void)
Definition: sdbapi.c:42
BOOL WINAPI SdbpCheckTagIDType(PDB pdb, TAGID tagid, WORD type)
Definition: sdbapi.c:261
BOOL WINAPI SdbpOpenMemMappedFile(LPCWSTR path, PMEMMAPPED mapping)
Definition: sdbapi.c:170
void SdbpFree(LPVOID mem)
Definition: sdbapi.c:81
_SHIM_LOG_LEVEL
Definition: sdbpapi.h:67
#define WINAPIV
Definition: sdbpapi.h:64
DWORD SdbpStrlen(PCWSTR string)
Definition: sdbapi.c:152
#define SHIM_ERR(fmt,...)
Definition: sdbpapi.h:76
PDB WINAPI SdbpCreate(LPCWSTR path, PATH_TYPE type, BOOL write)
Definition: sdbapi.c:93
Definition: fs_rec.h:143
Definition: fci.c:127
Definition: parser.c:49
Definition: mem.c:156
SIZE_T size
Definition: sdbpapi.h:46
PBYTE view
Definition: sdbpapi.h:45
SIZE_T mapped_size
Definition: sdbpapi.h:47
HANDLE file
Definition: sdbpapi.h:43
HANDLE section
Definition: sdbpapi.h:44
Definition: ecma_167.h:138
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
#define WINAPI
Definition: msvc.h:6
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:56
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185