From 6f793283d8c73b9e27a8130955a40c9073f13693 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: Sun, 6 Oct 2024 00:51:50 +0800 Subject: [PATCH] fix --- plugins/CMakeLists.txt | 2 +- plugins/shareddllproxy/aspatch.cpp | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index a6a51499..5aae82e0 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 42) -set(VERSION_PATCH 0) +set(VERSION_PATCH 1) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h) diff --git a/plugins/shareddllproxy/aspatch.cpp b/plugins/shareddllproxy/aspatch.cpp index 13266b70..9af33b43 100644 --- a/plugins/shareddllproxy/aspatch.cpp +++ b/plugins/shareddllproxy/aspatch.cpp @@ -82,15 +82,12 @@ struct ThreadParam uint64_t ctx2; // The subcontext of the hook: 0 by default, generated in a method specific to the hook }; typedef void (*ProcessEvent)(DWORD); -typedef void (*ThreadEvent)(wchar_t *, char *, ThreadParam); -typedef void (*OutputCallback)(wchar_t *, char *, ThreadParam, const wchar_t *); -typedef void (*ConsoleHandler)(const wchar_t *); typedef void (*HookInsertHandler)(uint64_t, const wchar_t *); typedef void (*EmbedCallback)(const wchar_t *, ThreadParam); nlohmann::json config; std::map translation; std::unordered_set connectedpids; -void (*Luna_Start)(ProcessEvent Connect, ProcessEvent Disconnect, ThreadEvent Create, ThreadEvent Destroy, OutputCallback Output, ConsoleHandler console, HookInsertHandler hookinsert, EmbedCallback embed); +void (*Luna_Start)(ProcessEvent Connect, ProcessEvent Disconnect, void *, void *, void *, void *, HookInsertHandler hookinsert, EmbedCallback embed, void *); void (*Luna_Inject)(DWORD pid, LPCWSTR basepath); void (*Luna_EmbedSettings)(DWORD pid, UINT32 waittime, UINT8 fontCharSet, bool fontCharSetEnabled, wchar_t *fontFamily, UINT32 spaceadjustpolicy, UINT32 keeprawtext, bool fastskipignore); void (*Luna_useembed)(DWORD pid, uint64_t address, uint64_t ctx1, uint64_t ctx2, bool use); @@ -128,10 +125,10 @@ public: connectedpids.erase(pid); ReleaseSemaphore(hsema, 1, NULL); }, - [](auto, auto, auto) {}, - [](auto, auto, auto) {}, - [](auto, auto, auto, auto) {}, - [](auto) {}, + 0, + 0, + 0, + 0, [](uint64_t addr, const wchar_t *output) { std::wstring newhookcode = output; @@ -161,7 +158,8 @@ public: Luna_embedcallback(pid, output, trans.c_str()); } } - }); + }, + 0); } void run() {