From eb50325e767f5781316cbb26e86a7d4390055692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Mon, 6 May 2024 22:24:06 +0800 Subject: [PATCH] Update host.cpp --- LunaHost/host.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/LunaHost/host.cpp b/LunaHost/host.cpp index 2dac4af..f7a47f6 100644 --- a/LunaHost/host.cpp +++ b/LunaHost/host.cpp @@ -291,15 +291,14 @@ namespace Host } void InjectProcess(DWORD processId,const std::wstring locationX) { - CreatePipe(processId); - std::thread([processId,locationX] - { - if(CheckProcess(processId)==false)return; + + auto check=CreatePipeAndCheck(processId); + if(check==false)return; + std::thread([=] + { if(InjectDll(processId,locationX))return ; AddConsoleOutput(INJECT_FAILED); - - }).detach(); }