Q:

How to watch winapi dll function calls with C++

I'm trying to write a program which should catch WinAPI dll calls, such as Registry reading/editing or file reading/writing.
I know that reading a registry record is done by using the RegOpenKeyExW method in the advapi32 library.
I've found a project which has the abilities I need in here: http://jacquelin.potier.free.fr/winapioverride32/
But  I've no idea how to write my own.
It seems that I cant find the correct search terms since I couldn't find any resource, or tutorial about how can I do it.
I know that it is a very complicated and I dont expect a full answer. It would just be awesome if I can just get one little tip or a blog entry which can give me a bit of clue.

A:

The term you're looking for is "hooking". There seem to be plenty of useful resources available through the linked Google search. You can start with CodeProject's guide:
http://www.codeproject.com/Articles/2082/API-hooking-revealed
Another invaluable resource is Microsoft's Detours library.

