Use hook method

This commit is contained in:
2025-10-06 21:47:04 +08:00
parent dc0e3ec2a2
commit aed088790a
2 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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";