Skip to content

Commit ca1a76b

Browse files
committed
Added GetSymbolState info/usage
1 parent ba4c2d5 commit ca1a76b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Injection.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
//If needed:
1111
//auto ValidateInjectionFunctions = (f_ValidateInjectionFunctions)GetProcAddress(hInjectionMod, "ValidateInjectionFunctions");
1212
//auto RestorenjectionFunctions = (f_RestoreInjectionFunctions)GetProcAddress(hInjectionMod, "RestorenjectionFunctions");
13+
//
14+
//Symbol state:
15+
//auto GetSymbolState = (f_GetSymbolState)GetProcAddress(hInjectionMod, "GetSymbolState");
16+
//auto GetDownloadProgress = (f_GetDownloadProgress)GetProcAddress(hInjectionMod, "GetDownloadProgress");
1317

1418
#pragma once
1519

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ Session seperation can be bypassed with all methods.
4444

4545
You can easily use mapper by including the compiled binaries in your project. Check the provided Injection.h header for more information.
4646
Make sure you have the compiled binaries in the working directory of your program.
47+
On first run the injection module will download pdb files for the native (and when run on x64 the wow64) version of the ntdll.dll to resolve symbol addresses.
48+
The injector can only function if that process is finished. The injection module exports GetSymbolState which will return INJ_ERROR_SUCCESS (0) if the pdb download and resolving of all required addresses is completed.
49+
Additionally GetDownloadProgress can be used to determine the progress of the download as percentage.
4750

4851
```cpp
4952

@@ -52,6 +55,12 @@ Make sure you have the compiled binaries in the working directory of your progra
5255
HINSTANCE hInjectionMod = LoadLibrary(GH_INJ_MOD_NAME);
5356

5457
auto InjectA = (f_InjectA)GetProcAddress(hInjectionMod, "InjectA");
58+
auto GetSymbolState = (f_GetSymbolState)GetProcAddress(hInjectionMod, "GetSymbolState");
59+
60+
while (GetSymbolState() != 0)
61+
{
62+
Sleep(10);
63+
}
5564

5665
DWORD TargetProcessId;
5766

0 commit comments

Comments
 (0)