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