1
0
mirror of synced 2024-11-27 17:00:53 +01:00
This commit is contained in:
BroGamer 2022-08-19 05:12:05 +12:00
parent dadc030205
commit 59f883efda
2 changed files with 5 additions and 9 deletions

View File

@ -70,11 +70,12 @@ HOOK_DYNAMIC (u64, __stdcall, bngrw_ReqAiccAuth) { return 1; }
HOOK_DYNAMIC (u64, __stdcall, bngrw_ReqBeep) { return 1; }
HOOK_DYNAMIC (u64, __stdcall, bngrw_ReqFwCleanup) { return 1; }
HOOK_DYNAMIC (u64, __stdcall, bngrw_ReqFwVersionUp) { return 1; }
HOOK_DYNAMIC (i32, __stdcall, bngrw_ReqLatchID, u32 a1) { return (a1 < 8 ? -100 : 1); }
HOOK_DYNAMIC (i32, __stdcall, bngrw_ReqLatchID) { return 1; }
HOOK_DYNAMIC (u64, __stdcall, bngrw_ReqLed) { return 1; }
HOOK_DYNAMIC (i32, __stdcall, bngrw_ReqSendMail, u32 a1, u32 a2, u32 a3, u64 a4, u64 a5) { return (7 < a1 || !a5 ? -100 : 1); }
HOOK_DYNAMIC (i32, __stdcall, bngrw_ReqSendUrl, u32 a1, u32 a2, u32 a3, u64 a4, u64 a5) { return (7 < a1 || !a5 ? -100 : 1); }
HOOK_DYNAMIC (i32, __stdcall, bngrw_ReqSendMail) { return 1; }
HOOK_DYNAMIC (i32, __stdcall, bngrw_ReqSendUrl) { return 1; }
HOOK_DYNAMIC (u64, __stdcall, bngrw_ReqSetLedPower) { return 0; }
HOOK_DYNAMIC (i32, __stdcall, bngrw_reqCancel) { return 1; }
void
init_boilerplate () {
@ -105,4 +106,5 @@ init_boilerplate () {
INSTALL_HOOK_DYNAMIC (bngrw_ReqSendMail, PROC_ADDRESS ("bngrw.dll", "BngRwReqSendMailTo"));
INSTALL_HOOK_DYNAMIC (bngrw_ReqSendUrl, PROC_ADDRESS ("bngrw.dll", "BngRwReqSendUrlTo"));
INSTALL_HOOK_DYNAMIC (bngrw_ReqSetLedPower, PROC_ADDRESS ("bngrw.dll", "BngRwReqSetLedPower"));
INSTALL_HOOK_DYNAMIC (bngrw_reqCancel, PROC_ADDRESS ("bngrw.dll", "BngRwReqCancel"));
}

View File

@ -134,11 +134,6 @@ HOOK_DYNAMIC (i32, __stdcall, bngrw_reqWaitTouch, u32 a1, i32 a2, u32 a3, callba
return 1;
}
HOOK_DYNAMIC (i32, __stdcall, bngrw_ReqCancel, u32 a1) {
waitingForTouch = false;
return (7 < a1 ? -100 : 1);
}
i32 __stdcall DllMain (HMODULE mod, DWORD cause, void *ctx) {
if (cause == DLL_PROCESS_DETACH) DisposePoll ();
if (cause != DLL_PROCESS_ATTACH) return true;
@ -147,7 +142,6 @@ i32 __stdcall DllMain (HMODULE mod, DWORD cause, void *ctx) {
INSTALL_HOOK_DYNAMIC (bngrw_attach, PROC_ADDRESS ("bngrw.dll", "BngRwAttach"));
INSTALL_HOOK_DYNAMIC (bngrw_reqWaitTouch, PROC_ADDRESS ("bngrw.dll", "BngRwReqWaitTouch"));
INSTALL_HOOK_DYNAMIC (bngrw_ReqCancel, PROC_ADDRESS ("bngrw.dll", "BngRwReqCancel"));
// Set current directory to the directory of the executable
// Find all files in the plugins directory that end with .dll