Skip to content

Commit d9a8a19

Browse files
committed
Added Win7, Win8, Win8.1, Win10 1507 - 21H1 and Win11 21H2 support, many bug fixes and reworks
1 parent d8f3220 commit d9a8a19

38 files changed

+4456
-1809
lines changed

GH Injector Library/Download Manager.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ class DownloadManager : public IBindStatusCallback
2020

2121
HRESULT __stdcall QueryInterface(const IID & riid, void ** ppvObject);
2222

23-
ULONG STDMETHODCALLTYPE AddRef(void);
23+
ULONG STDMETHODCALLTYPE AddRef();
2424

25-
ULONG STDMETHODCALLTYPE Release(void);
25+
ULONG STDMETHODCALLTYPE Release();
2626

2727
virtual HRESULT STDMETHODCALLTYPE OnStartBinding(DWORD dwReserved, IBinding * pib);
2828

@@ -32,7 +32,7 @@ class DownloadManager : public IBindStatusCallback
3232

3333
virtual HRESULT STDMETHODCALLTYPE OnStopBinding(HRESULT hresult, LPCWSTR szError);
3434

35-
virtual HRESULT STDMETHODCALLTYPE GetBindInfo(DWORD * grfBINDF, BINDINFO *pbindinfo);
35+
virtual HRESULT STDMETHODCALLTYPE GetBindInfo(DWORD * grfBINDF, BINDINFO * pbindinfo);
3636

3737
virtual HRESULT STDMETHODCALLTYPE OnDataAvailable(DWORD grfBSCF, DWORD dwSize, FORMATETC * pformatetc, STGMEDIUM * pstgmed);
3838

GH Injector Library/Error.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@
7777
#define INJ_ERR_WCSRCHR_FAILED 0x00000038 //wcsrchr : - : wcsrchr failed to find a character in a string (usually '\\' in a path)
7878
#define INJ_ERR_TARGET_EXE_NAME_IS_NULL 0x00000039 //internal error : - : the length of the name of the specified process is 0
7979
#define INJ_ERR_LDR_ENTRY_IS_NULL 0x0000003A //internal error : - : LdrpLoadDll(Internal) didn't return a valid LDR_DATA_TABLE_ENTRY pointer
80+
#define INJ_ERR_NOT_SUPPORTED 0x0000003B //internal error : - : the requested operation is not supported on the current operating system
81+
#define INJ_ERR_CREATE_EVENT_FAILED 0x0000003C //CreateEventEx : win32 error : failed to create an event for wow64 process
82+
#define INJ_ERR_CREATE_PROCESS_FAILED 0x0000003D //CreateProcessW : win32 error : failed to create process for wow64 module addresses
83+
#define INJ_ERR_WAIT_FAILED 0x0000003E //WaitForSingleObject : win32 error : failed to wait for an event to trigger
84+
#define INJ_ERR_WAIT_TIMEOUT 0x0000003F //WaitForSingleObject : - : event timed out
85+
#define INJ_ERR_WINDOWS_VERSION 0x00000040 //internal error : - : failed to resolve the version number of the operating system
86+
#define INJ_ERR_WINDOWS_TOO_OLD 0x00000041 //internal error : - : the injection library only runs on Windows 7 or higher
8087

8188

8289
///////////////////
@@ -298,7 +305,7 @@
298305
#define SYMBOL_CANT_OPEN_PROCESS 0x40000014 //OpenProcess : can't get PROCESS_QUERY_LIMITED_INFORMATION handle to current process
299306
#define SYMBOL_ERR_COPYFILE_FAILED 0x40000015 //CopyFileA : copying the file from the cache directory failed
300307
#define SYMBOL_ERR_INTERRUPT 0x40000016 //internal error : download has been interrupted
301-
308+
#define SYMBOL_ERR_CANNOT_CONNECT 0x40000017 //InternetCheckConnectionW : GetLastError returned ERROR_INTERNET_CANNOT_CONNECT which might be caused by a firewall rule
302309

303310

304311
/// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

GH Injector Library/GH Injector Library.vcxproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<VCProjectVersion>15.0</VCProjectVersion>
2323
<ProjectGuid>{AC732425-E265-40FF-842F-C59CECE9A96C}</ProjectGuid>
2424
<RootNamespace>GHInjectorLibrary</RootNamespace>
25-
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
25+
<WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion>
2626
</PropertyGroup>
2727
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2828
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -174,13 +174,20 @@
174174
<ClInclude Include="Injection Internal.h" />
175175
<ClInclude Include="Injection.h" />
176176
<ClInclude Include="Manual Mapping.h" />
177-
<ClInclude Include="NT Stuff.h" />
177+
<ClInclude Include="NT Defs.h" />
178+
<ClInclude Include="NT Funcs.h" />
178179
<ClInclude Include="pch.h" />
179180
<ClInclude Include="Process Info.h" />
180181
<ClInclude Include="resource.h" />
181182
<ClInclude Include="Start Routine.h" />
182183
<ClInclude Include="Symbol Parser.h" />
183184
<ClInclude Include="Tools.h" />
185+
<ClInclude Include="VEH Shell.h" />
186+
<ClInclude Include="Win10.h" />
187+
<ClInclude Include="Win11.h" />
188+
<ClInclude Include="Win7.h" />
189+
<ClInclude Include="Win8.h" />
190+
<ClInclude Include="Win81.h" />
184191
<ClInclude Include="WOW64 Shells.h" />
185192
</ItemGroup>
186193
<ItemGroup>
@@ -222,6 +229,7 @@
222229
<ClCompile Include="Thread Hijacking WOW64.cpp" />
223230
<ClCompile Include="Thread Hijacking.cpp" />
224231
<ClCompile Include="Tools.cpp" />
232+
<ClCompile Include="VEH Shell.cpp" />
225233
</ItemGroup>
226234
<ItemGroup>
227235
<ResourceCompile Include="GH Injector Library.rc" />

GH Injector Library/GH Injector Library.vcxproj.filters

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
<Filter Include="Headerdateien\Injection Methods">
3535
<UniqueIdentifier>{d3c5e067-fa7b-4ff9-9579-418c449c7978}</UniqueIdentifier>
3636
</Filter>
37+
<Filter Include="Headerdateien\NT">
38+
<UniqueIdentifier>{844b590b-6d34-422e-8d4f-d27e3e5defb5}</UniqueIdentifier>
39+
</Filter>
3740
</ItemGroup>
3841
<ItemGroup>
3942
<ClInclude Include="Handle Hijacking.h">
@@ -45,9 +48,6 @@
4548
<ClInclude Include="Injection.h">
4649
<Filter>Headerdateien</Filter>
4750
</ClInclude>
48-
<ClInclude Include="NT Stuff.h">
49-
<Filter>Headerdateien</Filter>
50-
</ClInclude>
5151
<ClInclude Include="Process Info.h">
5252
<Filter>Headerdateien</Filter>
5353
</ClInclude>
@@ -87,6 +87,30 @@
8787
<ClInclude Include="resource.h">
8888
<Filter>Headerdateien</Filter>
8989
</ClInclude>
90+
<ClInclude Include="NT Funcs.h">
91+
<Filter>Headerdateien\NT</Filter>
92+
</ClInclude>
93+
<ClInclude Include="Win7.h">
94+
<Filter>Headerdateien\NT</Filter>
95+
</ClInclude>
96+
<ClInclude Include="Win8.h">
97+
<Filter>Headerdateien\NT</Filter>
98+
</ClInclude>
99+
<ClInclude Include="Win81.h">
100+
<Filter>Headerdateien\NT</Filter>
101+
</ClInclude>
102+
<ClInclude Include="Win10.h">
103+
<Filter>Headerdateien\NT</Filter>
104+
</ClInclude>
105+
<ClInclude Include="NT Defs.h">
106+
<Filter>Headerdateien\NT</Filter>
107+
</ClInclude>
108+
<ClInclude Include="Win11.h">
109+
<Filter>Headerdateien\NT</Filter>
110+
</ClInclude>
111+
<ClInclude Include="VEH Shell.h">
112+
<Filter>Headerdateien\Injection Methods</Filter>
113+
</ClInclude>
90114
</ItemGroup>
91115
<ItemGroup>
92116
<ClCompile Include="Handle Hijacking.cpp">
@@ -176,6 +200,9 @@
176200
<ClCompile Include="KernelCallback WOW64.cpp">
177201
<Filter>Quelldateien\wow64\Start Routine Methods</Filter>
178202
</ClCompile>
203+
<ClCompile Include="VEH Shell.cpp">
204+
<Filter>Quelldateien\native\Injection Methods</Filter>
205+
</ClCompile>
179206
</ItemGroup>
180207
<ItemGroup>
181208
<ResourceCompile Include="GH Injector Library.rc">

0 commit comments

Comments
 (0)