Page 1 of 1

HookApi on the latest Windows Server 2019

Posted: Tue Nov 02, 2021 11:27 am
by x_art
H madshi.

After a recent update on Windows 2019, the application crashes with the following call stack.
It worked perfectly for years before on all OS including Win2019. This problem appears on Win2019 only.

Note: the application tries to hook API in the same process (no hooking DLLs and drivers).

005387c9 +031 app.exe madCodeHook cmpxchg8b
0053880a +02e app.exe madCodeHook AtomicMove
0053f1de +456 app.exe madCodeHook HookLoadLibrary
0053f769 +2fd app.exe madCodeHook HookCodeX_
0053fad3 +06f app.exe madCodeHook HookCodeX
0054001c +0f8 app.exe madCodeHook HookAPI
00544262 +01e app.exe unit1 282 + 2 InstallHooks

procedure InstallHooks;
begin
madCodeHook.CollectHooks;
HookAPI('User32.dll', 'DispatchMessageA', @hookDispatchMessageA, @nextDispatchMessageA);
HookAPI('User32.dll', 'DispatchMessageW', @hookDispatchMessageW, @nextDispatchMessageW);
madCodeHook.FlushHooks;
end;

Re: HookApi on the latest Windows Server 2019

Posted: Wed Nov 03, 2021 2:24 pm
by madshi
Hi there,

sorry about that, I think this build should fix it:

http://madshi.net/madCollection2019.exe

New official build coming "soon".

Re: HookApi on the latest Windows Server 2019

Posted: Fri Nov 05, 2021 12:08 pm
by x_art
Unfortunately, I don't have a license for the latest version :sorry:

Re: HookApi on the latest Windows Server 2019

Posted: Fri Nov 05, 2021 12:34 pm
by madshi
That's too bad. Do you have the source code? The fix is simple.

Re: HookApi on the latest Windows Server 2019

Posted: Thu Nov 11, 2021 4:18 am
by x_art
I don't have sources for madCodeHook. You didn't provide it before.