diff --git a/launcher/launcher.cpp b/launcher/launcher.cpp index fb529fc..438d92e 100644 --- a/launcher/launcher.cpp +++ b/launcher/launcher.cpp @@ -18,6 +18,7 @@ enum LauncherError : int { E_OS_ERROR = -1, E_APP_NOT_FOUND = -2, E_MODENGINE_NOT_FOUND = -3, + E_CREATE_PROCESS_FAILED = -4, }; struct LaunchTargetParams { @@ -227,12 +228,15 @@ int main() fs::absolute(modengine_dll_path).native().c_str(), reinterpret_cast(create_process_addr)); + auto status = E_OK; + if (!success) { logger->error("Couldn't create process: {:x}", GetLastError()); + status = E_CREATE_PROCESS_FAILED; } CloseHandle(pi.hProcess); CloseHandle(pi.hThread); - return E_OK; + return status; } \ No newline at end of file