Skip to content

Commit

Permalink
Dll should be in executable's working directory
Browse files Browse the repository at this point in the history
  • Loading branch information
BrendoCosta committed Jul 27, 2023
1 parent 3787b06 commit c04bea9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Source/Starter/Starter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ int main(int argc, char* argv[]) {
program.add_argument("gamepath")
.help("Path to game's executable file (\"GenshinImpact.exe\" or \"YuanShen.exe\")");

program.add_argument("payloadpath")
.help("Path to the payload DLL file to be injected");

try {

program.parse_args(argc, argv);

std::wstring gameExecutablePath = Dodoco::Native::StringUtil::Utf8ToWide(program.get<std::string>("gamepath"));
std::wstring dllPath = Dodoco::Native::StringUtil::Utf8ToWide(program.get<std::string>("payloadpath"));
std::wstring dllPath = L"Payload.dll";

if (!PathFileExistsW(gameExecutablePath.c_str())) {

Expand Down Expand Up @@ -73,6 +70,7 @@ int main(int argc, char* argv[]) {

std::cerr << err.what() << std::endl;
std::cerr << program;
Dodoco::Native::Process::CloseProcess(GetCurrentProcess(), EXIT_FAILURE);
return EXIT_FAILURE;

}
Expand Down

0 comments on commit c04bea9

Please sign in to comment.