12
12
// auto RestorenjectionFunctions = (f_RestoreInjectionFunctions)GetProcAddress(hInjectionMod, "RestorenjectionFunctions");
13
13
//
14
14
// Symbol state:
15
- // auto GetSymbolState = (f_GetSymbolState)GetProcAddress(hInjectionMod, "GetSymbolState");
16
- // auto GetDownloadProgress = (f_GetDownloadProgress)GetProcAddress(hInjectionMod, "GetDownloadProgress");
15
+ // auto GetSymbolState = (f_GetSymbolState)GetProcAddress(hInjectionMod, "GetSymbolState");
16
+ // auto GetImportState = (f_GetImportState)GetProcAddress(hInjectionMod, "GetImportState");
17
+ //
18
+ // Download progress:
19
+ // auto GetDownloadProgressEx = (f_GetDownloadProgress)GetProcAddress(hInjectionMod, "GetDownloadProgressEx");
17
20
18
21
#pragma once
19
22
20
- #define GH_INJ_VERSIONW L" 4.0 "
21
- #define GH_INJ_VERSIONA " 4.0 "
23
+ #define GH_INJ_VERSIONW L" 4.6 "
24
+ #define GH_INJ_VERSIONA " 4.6 "
22
25
23
26
#define GH_INJ_MOD_NAME64W L" GH Injector - x64.dll"
24
27
#define GH_INJ_MOD_NAME86W L" GH Injector - x86.dll"
@@ -131,18 +134,22 @@ struct HookInfo
131
134
// Manual mapping options:
132
135
#define INJ_MM_CLEAN_DATA_DIR 0x00010000 // removes data from the dlls PE header, ignored if INJ_MM_SET_PAGE_PROTECTIONS is set
133
136
#define INJ_MM_RESOLVE_IMPORTS 0x00020000 // resolves dll imports
134
- #define INJ_MM_RESOLVE_DELAY_IMPORTS 0x00040000 // resolves delayed imports
135
- #define INJ_MM_EXECUTE_TLS 0x00080000 // executes TLS callbacks and initializes static TLS data
137
+ #define INJ_MM_RESOLVE_DELAY_IMPORTS 0x00040000 // resolves delayed imports
138
+ #define INJ_MM_EXECUTE_TLS 0x00080000 // executes TLS callbacks and initializes static TLS data
136
139
#define INJ_MM_ENABLE_EXCEPTIONS 0x00100000 // enables exception handling
137
140
#define INJ_MM_SET_PAGE_PROTECTIONS 0x00200000 // sets page protections based on section characteristics, if set INJ_MM_CLEAN_DATA_DIR will be ignored
138
141
#define INJ_MM_INIT_SECURITY_COOKIE 0x00400000 // initializes security cookie for buffer overrun protection
139
- #define INJ_MM_RUN_DLL_MAIN 0x00800000 // executes DllMain
142
+ #define INJ_MM_RUN_DLL_MAIN 0x00800000 // executes DllMain
140
143
// this option induces INJ_MM_RESOLVE_IMPORTS
141
144
#define INJ_MM_RUN_UNDER_LDR_LOCK 0x01000000 // runs the DllMain under the loader lock
142
145
#define INJ_MM_SHIFT_MODULE_BASE 0x02000000 // shifts the module base by a random offset
143
146
144
147
#define MM_DEFAULT (INJ_MM_RESOLVE_IMPORTS | INJ_MM_RESOLVE_DELAY_IMPORTS | INJ_MM_INIT_SECURITY_COOKIE | INJ_MM_EXECUTE_TLS | INJ_MM_ENABLE_EXCEPTIONS | INJ_MM_RUN_DLL_MAIN | INJ_MM_SET_PAGE_PROTECTIONS)
145
148
149
+ // Arguments for GetDownloadProgressEx
150
+ #define PDB_DOWNLOAD_INDEX_NTDLL (int )0 // ntdll pdb download
151
+ #define PDB_DOWNLOAD_INDEX_KERNEL32 (int )1 // kernel32 pdb download (Windows 7 only)
152
+
146
153
using f_InjectA = DWORD(__stdcall*)(INJECTIONDATAA * pData);
147
154
using f_InjectW = DWORD(__stdcall*)(INJECTIONDATAW * pData);
148
155
@@ -160,4 +167,4 @@ using f_StartDownload = void(__stdcall *)();
160
167
using f_InterruptDownload = void (__stdcall *)();
161
168
162
169
using f_raw_print_callback = void (__stdcall *)(const char * szText);
163
- using f_SetRawPrintCallback = DWORD(__stdcall *)(f_raw_print_callback callback);
170
+ using f_SetRawPrintCallback = DWORD(__stdcall *)(f_raw_print_callback callback);
0 commit comments