Skip to content

Commit

Permalink
fix dll injection / ejection not working:
Browse files Browse the repository at this point in the history
fixed injection not working when dll-path has spaces
fixed ejection not working by running gameluancher as admin
  • Loading branch information
Alia5 committed Nov 27, 2016
1 parent 3dbd4de commit 56edf5b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion GloSC_GameLauncher/GloSC_GameLauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,10 @@ bool GloSC_GameLauncher::IsProcessRunning(DWORD pid)
void GloSC_GameLauncher::unhookBindings()
{
QProcess proc;
proc.setNativeArguments(" --process-name Steam.exe --module-name EnforceBindingDLL.dll --eject ");
proc.setNativeArguments(" --process-name Steam.exe --module-name \"EnforceBindingDLL.dll\" --eject ");
proc.start("Injector.exe", QIODevice::ReadOnly);
proc.waitForFinished();
bHookedSteam = false;
}


Expand Down
2 changes: 2 additions & 0 deletions GloSC_GameLauncher/GloSC_GameLauncher.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
Expand All @@ -122,6 +123,7 @@
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion SteamTarget/SteamTargetRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void SteamTargetRenderer::hookBindings()
dir = dir.mid(0, dir.lastIndexOf("\\"));

QProcess proc;
proc.setNativeArguments(" --process-name Steam.exe --module-name " + dir + "\\EnforceBindingDLL.dll --inject ");
proc.setNativeArguments(" --process-name Steam.exe --module-name \"" + dir + "\\EnforceBindingDLL.dll\" --inject ");
proc.start(dir + "\\Injector.exe", QIODevice::ReadOnly);
proc.waitForFinished();
if (QString::fromStdString(proc.readAll().toStdString()).contains("Successfully injected module!")) //if we have injected (and patched the function)
Expand Down

0 comments on commit 56edf5b

Please sign in to comment.