Use hook method
This commit is contained in:
@@ -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);
|
||||
|
||||
2
main.cpp
2
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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user