Go to the source code of this file.
|
| #define | SHIM_REASON_INIT 100 |
| |
| #define | SHIM_REASON_DEINIT 101 |
| |
| #define | SHIM_REASON_DLL_LOAD 102 /* Arg: PLDR_DATA_TABLE_ENTRY */ |
| |
| #define | SHIM_REASON_DLL_UNLOAD 103 /* Arg: PLDR_DATA_TABLE_ENTRY */ |
| |
| #define | SHIM_NOTIFY_ATTACH 1 |
| |
| #define | SHIM_NOTIFY_DETACH 2 |
| |
| #define | SHIM_NOTIFY_DLL_LOAD 3 /* Arg: PLDR_DATA_TABLE_ENTRY */ |
| |
| #define | SHIM_NOTIFY_DLL_UNLOAD 4 /* Arg: PLDR_DATA_TABLE_ENTRY */ |
| |
| #define | SHIM_MSG(fmt, ...) do { if (g_ShimEngDebugLevel) SeiDbgPrint(SEI_MSG, SHIM_OBJ_NAME(g_szModuleName), fmt, ##__VA_ARGS__ ); } while (0) |
| |
| #define | SHIM_FAIL(fmt, ...) do { if (g_ShimEngDebugLevel) SeiDbgPrint(SEI_FAIL, SHIM_OBJ_NAME(g_szModuleName), fmt, ##__VA_ARGS__ ); } while (0) |
| |
| #define | SHIM_WARN(fmt, ...) do { if (g_ShimEngDebugLevel) SeiDbgPrint(SEI_WARN, SHIM_OBJ_NAME(g_szModuleName), fmt, ##__VA_ARGS__ ); } while (0) |
| |
| #define | SHIM_INFO(fmt, ...) do { if (g_ShimEngDebugLevel) SeiDbgPrint(SEI_INFO, SHIM_OBJ_NAME(g_szModuleName), fmt, ##__VA_ARGS__ ); } while (0) |
| |
◆ SHIM_FAIL
◆ SHIM_INFO
◆ SHIM_MSG
◆ SHIM_NOTIFY_ATTACH
◆ SHIM_NOTIFY_DETACH
◆ SHIM_NOTIFY_DLL_LOAD
◆ SHIM_NOTIFY_DLL_UNLOAD
◆ SHIM_REASON_DEINIT
| #define SHIM_REASON_DEINIT 101 |
◆ SHIM_REASON_DLL_LOAD
◆ SHIM_REASON_DLL_UNLOAD
◆ SHIM_REASON_INIT
◆ SHIM_WARN
◆ _PVGetHookAPIs
◆ _PVNotify
◆ HOOKAPI
◆ PHOOKAPI
◆ PSHIMREG
◆ SEI_LOG_LEVEL
◆ SHIMREG
◆ _SEI_LOG_LEVEL
| Enumerator |
|---|
| SEI_MSG | |
| SEI_FAIL | |
| SEI_WARN | |
| SEI_INFO | |
Definition at line 57 of file shimlib.h.
57 {
enum _SEI_LOG_LEVEL SEI_LOG_LEVEL
◆ SeiDbgPrint()
Outputs diagnostic info.
- Parameters
-
| [in] | Level | The level to log this message with, choose any of [SHIM_ERR, SHIM_WARN, SHIM_INFO]. |
| [in] | FunctionName | The function this log should be attributed to. |
| [in] | Format | The format string. |
| ... | Variable arguments providing additional information. |
- Returns
- Success: TRUE Failure: FALSE.
Definition at line 160 of file shimeng.c.
161{
164 const char* LevelStr;
168
171
174
176 {
178 LevelStr = "MSG ";
179 break;
181 LevelStr = "FAIL";
182 break;
184 LevelStr = "WARN";
185 break;
187 LevelStr = "INFO";
188 break;
189 default:
190 LevelStr = "USER";
191 break;
192 }
193
196 else
198
201
207
210}
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define STRSAFE_NULL_ON_FAILURE
VOID SeiInitDebugSupport(VOID)
ULONG g_ShimEngDebugLevel
STRSAFEAPI StringCchVPrintfExA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCSTR pszFormat, va_list argList)
STRSAFEAPI StringCchPrintfExA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCSTR pszFormat,...)
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Referenced by SeiBuildShimRefArray(), and SeiInit().
◆ ShimLib_Deinit()
Definition at line 39 of file shimlib.c.
40{
41
43}
BOOL WINAPI HeapDestroy(HANDLE hHeap)
static HANDLE g_ShimLib_Heap
Referenced by DllMain().
◆ ShimLib_GetHookAPIs()
◆ ShimLib_Init()
Definition at line 30 of file shimlib.c.
31{
34
37}
HANDLE WINAPI HeapCreate(DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximumSize)
static PSLIST_HEADER g_UsedShims
static HINSTANCE g_ShimLib_hInstance
PVOID ShimLib_ShimMalloc(SIZE_T dwSize)
NTSYSAPI VOID NTAPI RtlInitializeSListHead(_Out_ PSLIST_HEADER ListHead)
union _SLIST_HEADER * PSLIST_HEADER
Referenced by DllMain().
◆ ShimLib_Instance()
◆ ShimLib_NotifyShims()
Definition at line 136 of file shimlib.c.
137{
139
142
144 {
147#if (WINVER > _WIN32_WINNT_WS03)
150#endif
153#if (WINVER > _WIN32_WINNT_WS03)
155 pUsed->bInitCalled =
TRUE;
156#endif
157
159 }
160
162}
static DWORD const fdwReason
BOOL WINAPI SHIM_OBJ_NAME() Notify(DWORD fdwReason, PVOID ptr)
BOOL(WINAPI * _PVNotify)(DWORD, PVOID)
#define SHIM_NOTIFY_ATTACH
#define CONTAINING_RECORD(address, type, field)
_Must_inspect_result_ NTSYSAPI PSLIST_ENTRY NTAPI RtlFirstEntrySList(_In_ const SLIST_HEADER *ListHead)
Referenced by NotifyShims().
◆ ShimLib_ShimFree()
◆ ShimLib_ShimMalloc()
◆ ShimLib_StrAEqualsWNC()
◆ ShimLib_StringDuplicateA()
Definition at line 67 of file shimlib.c.
68{
70}
int WINAPI lstrlenA(LPCSTR lpString)
PCSTR ShimLib_StringNDuplicateA(PCSTR szString, SIZE_T stringLengthIncludingNullTerm)
Referenced by InitIgnoreFreeLibrary().
◆ ShimLib_StringNDuplicateA()
◆ g_ShimEngDebugLevel
| ULONG g_ShimEngDebugLevel |
|
extern |