DelphiFAQ Home Search:
General :: Windows :: Programming :: Windows with Delphi :: Windows API
Windows programming with Delphi


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Only the 40 most recently viewed articles are shown.
You can see the full list here.

Featured Article

Hooking into Windows API calls

A very clever person has written a DLL called ApiHooks which will sneak in between a running program and any the Win API functions you choose, and divert the function calls through your own DLL !
I didn't see source code for the ApiHooks, but I can live with that.
Documentation is minimal, but there was enough for me to get it going.
There is a Delphi example of its use. APIHooks lets you hook another program with no instability or apparent slowdown of Windows. You can hook just the API calls you need.

Get ApiHooks from

ApiHooks lets you write a DLL and attach it to the process you want to hook. You then have to communicate between that attached DLL and your application. I am using a memory mapped file which makes an area of RAM accessible to both the DLL and my application.

Based on my experience, you'd have no trouble hooking gdi32.CreatePalette with ApiHooks.

Generated 20:02:12 on Dec 11, 2017