From 24ca502e3af452603ed191948e5ece016e2204b2 Mon Sep 17 00:00:00 2001 From: DrFrugal Date: Mon, 30 Dec 2024 18:42:10 +0100 Subject: init --- Launcher/Launcher.cpp | 35 +++++++++ Launcher/Launcher.vcxproj | 145 ++++++++++++++++++++++++++++++++++++++ Launcher/Launcher.vcxproj.filters | 25 +++++++ Launcher/Launcher.vcxproj.user | 4 ++ Launcher/packages.config | 4 ++ 5 files changed, 213 insertions(+) create mode 100644 Launcher/Launcher.cpp create mode 100644 Launcher/Launcher.vcxproj create mode 100644 Launcher/Launcher.vcxproj.filters create mode 100644 Launcher/Launcher.vcxproj.user create mode 100644 Launcher/packages.config (limited to 'Launcher') diff --git a/Launcher/Launcher.cpp b/Launcher/Launcher.cpp new file mode 100644 index 0000000..5ea62f5 --- /dev/null +++ b/Launcher/Launcher.cpp @@ -0,0 +1,35 @@ +#include +#include +#include + +int main() +{ + std::string wow_directory = R"(C:\Users\alphaomega\Documents\World-of-Warcraft-3.3.5a.12340-enUS-WIN\)"; + char launcherDirectory[MAX_PATH] = { 0 }; + GetModuleFileNameA(NULL, launcherDirectory, MAX_PATH); + size_t lastBackslash = ((std::string)launcherDirectory).rfind('\\'); + std::string lpDllName = ((std::string)launcherDirectory).substr(0, lastBackslash + 1) + "Hook.dll"; + + STARTUPINFOA lpStartupInfo; + ZeroMemory(&lpStartupInfo, sizeof(lpStartupInfo)); + PROCESS_INFORMATION lpProcessInformation; + ZeroMemory(&lpProcessInformation, sizeof(lpProcessInformation)); + lpStartupInfo.cb = sizeof(lpStartupInfo); + + DetourCreateProcessWithDllA( + (wow_directory + "Wow.exe").c_str(), // lpApplicationName + NULL, // lpCommandLine, + NULL, // lpProcessAttributes, + NULL, // lpThreadAttributes, + TRUE, // bInheritHandles, + CREATE_DEFAULT_ERROR_MODE | CREATE_SUSPENDED, // dwCreationFlags, + NULL, // lpEnvironment, + wow_directory.c_str(), // lpCurrentDirectory, + &lpStartupInfo, // lpStartupInfo + &lpProcessInformation, // lpProcessInformation + lpDllName.c_str(), // lpDllName + NULL // pfCreateProcessA + ); + ResumeThread(lpProcessInformation.hThread); + return 0; +} diff --git a/Launcher/Launcher.vcxproj b/Launcher/Launcher.vcxproj new file mode 100644 index 0000000..d222dd3 --- /dev/null +++ b/Launcher/Launcher.vcxproj @@ -0,0 +1,145 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {ff29a740-acad-45dc-ae66-47144fa61afb} + Launcher + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + \ No newline at end of file diff --git a/Launcher/Launcher.vcxproj.filters b/Launcher/Launcher.vcxproj.filters new file mode 100644 index 0000000..9c067cd --- /dev/null +++ b/Launcher/Launcher.vcxproj.filters @@ -0,0 +1,25 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + + \ No newline at end of file diff --git a/Launcher/Launcher.vcxproj.user b/Launcher/Launcher.vcxproj.user new file mode 100644 index 0000000..0f14913 --- /dev/null +++ b/Launcher/Launcher.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Launcher/packages.config b/Launcher/packages.config new file mode 100644 index 0000000..7b19a9c --- /dev/null +++ b/Launcher/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file -- cgit v1.2.3