From aed088790a1a3265b5a9113016c137b8a2a397cb Mon Sep 17 00:00:00 2001 From: lifegpc Date: Mon, 6 Oct 2025 21:47:04 +0800 Subject: [PATCH] Use hook method --- dllmain.cpp | 4 ++-- main.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dllmain.cpp b/dllmain.cpp index 73faef1..bade965 100644 --- a/dllmain.cpp +++ b/dllmain.cpp @@ -46,7 +46,7 @@ char* to_utf8(char* target, const char* source, UINT cp) { return result; } -char* jis_to_utf8(char* target, const char* source) { +char* __fastcall jis_to_utf8(char* target, const char* source) { char* result = to_utf8(target, source, CP_UTF8); if (!result) { result = to_utf8(target, source, 932); @@ -192,7 +192,7 @@ extern "C" __declspec(dllexport) void Attach() { DetourTransactionBegin(); DetourUpdateThread(GetCurrentThread()); h = GetHandle(); - // DetourAttach(&h, (PVOID)jis_to_utf8); + DetourAttach(&h, (PVOID)jis_to_utf8); DetourAttach(&TrueCreateFontW, HookedCreateFontW); DetourAttach(&TrueCreateFontA, HookedCreateFontA); DetourAttach(&TrueCreateFileW, HookedCreateFileW); diff --git a/main.cpp b/main.cpp index 970f56e..6108b97 100644 --- a/main.cpp +++ b/main.cpp @@ -9,7 +9,7 @@ void ShowErrorMsg(LPCWSTR text) { int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // 要启动的进程名 - const wchar_t* processName = L"jeweha_.exe"; + const wchar_t* processName = L"jeweha.exe"; // 要注入的 DLL 路径 const wchar_t* dllPath = L"jeweha_CHS_1.0.dll";