Skip to content

Commit

Permalink
Fix lack of wait for second DLL
Browse files Browse the repository at this point in the history
  • Loading branch information
YaLTeR committed Aug 19, 2021
1 parent e01a762 commit a7ce73d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Injector/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ auto wmain(int argc, wchar_t* argv[]) -> int
if (!reset_event) {
std::wcerr << L"The DLL `" << dll_file_name << L"` does not exist.\n";
std::getchar();
resume_event = NULL;
}
resume_event = NULL;
} else {
std::wcout << L"Injecting `" << dll_file_name << L"`.\n";
if (!DoInjection(process, dll_file_name)) {
Expand All @@ -335,7 +335,7 @@ auto wmain(int argc, wchar_t* argv[]) -> int
}

if (need_to_resume) {
if (resume_event != NULL && !reset_event) {
if (resume_event != NULL) {
std::wcout << L"Waiting for the DLL to finish loading to resume the process.\n";
if (WaitForSingleObject(resume_event, INFINITE) == WAIT_FAILED)
std::wcerr << L"Error waiting for the event: " << GetErrorMessage();
Expand Down

0 comments on commit a7ce73d

Please sign in to comment.