HookApi on the latest Windows Server 2019

c++ / delphi package - dll injection and api hooking
Post Reply
x_art
Posts: 20
Joined: Wed Jan 27, 2010 9:26 am

HookApi on the latest Windows Server 2019

Post 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;
madshi
Site Admin
Posts: 10820
Joined: Sun Mar 21, 2004 5:25 pm

Re: HookApi on the latest Windows Server 2019

Post by madshi »

Hi there,

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

http://madshi.net/madCollection2019.exe

New official build coming "soon".
x_art
Posts: 20
Joined: Wed Jan 27, 2010 9:26 am

Re: HookApi on the latest Windows Server 2019

Post by x_art »

Unfortunately, I don't have a license for the latest version :sorry:
madshi
Site Admin
Posts: 10820
Joined: Sun Mar 21, 2004 5:25 pm

Re: HookApi on the latest Windows Server 2019

Post by madshi »

That's too bad. Do you have the source code? The fix is simple.
x_art
Posts: 20
Joined: Wed Jan 27, 2010 9:26 am

Re: HookApi on the latest Windows Server 2019

Post by x_art »

I don't have sources for madCodeHook. You didn't provide it before.
Post Reply