Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Delphi Interop with Detours Library?

Tags:

delphi

detours

I'm looking for Delphi samples, but I can find only the C++ sample codes.

For example, how to define the below hook in Delphi?

DETOUR_TRAMPOLINE(int   WINAPI SetScrollInfoT(HWND, int, LPCSCROLLINFO, BOOL), SetScrollInfo)
like image 866
Leo.W Avatar asked Feb 17 '23 08:02

Leo.W


1 Answers

If you only need to hook inside your own process the you can look at Detours library. I recently included it in my Cromis library with the consent of the author.

You can find it here. Just download the whole lib and use Cromis.Detours. It works on 32 and 64 bit and is very well written.

like image 105
Runner Avatar answered Feb 26 '23 18:02

Runner