1212// auto RestorenjectionFunctions = (f_RestoreInjectionFunctions)GetProcAddress(hInjectionMod, "RestorenjectionFunctions");
1313//
1414// 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");
1720
1821#pragma once
1922
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 "
2225
2326#define GH_INJ_MOD_NAME64W L" GH Injector - x64.dll"
2427#define GH_INJ_MOD_NAME86W L" GH Injector - x86.dll"
@@ -131,18 +134,22 @@ struct HookInfo
131134// Manual mapping options:
132135#define INJ_MM_CLEAN_DATA_DIR 0x00010000 // removes data from the dlls PE header, ignored if INJ_MM_SET_PAGE_PROTECTIONS is set
133136#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
136139#define INJ_MM_ENABLE_EXCEPTIONS 0x00100000 // enables exception handling
137140#define INJ_MM_SET_PAGE_PROTECTIONS 0x00200000 // sets page protections based on section characteristics, if set INJ_MM_CLEAN_DATA_DIR will be ignored
138141#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
140143 // this option induces INJ_MM_RESOLVE_IMPORTS
141144#define INJ_MM_RUN_UNDER_LDR_LOCK 0x01000000 // runs the DllMain under the loader lock
142145#define INJ_MM_SHIFT_MODULE_BASE 0x02000000 // shifts the module base by a random offset
143146
144147#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)
145148
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+
146153using f_InjectA = DWORD(__stdcall*)(INJECTIONDATAA * pData);
147154using f_InjectW = DWORD(__stdcall*)(INJECTIONDATAW * pData);
148155
@@ -160,4 +167,4 @@ using f_StartDownload = void(__stdcall *)();
160167using f_InterruptDownload = void (__stdcall *)();
161168
162169using 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