How can I hook Windows functions in C/C++?
Take a look at Detours, it’s perfect for this sort of stuff. For system-wide hooking, read this article from MSDN. First, create a DLL which handles hooking the functions. This example below hooks the socket send and receive functions. #include <windows.h> #include <detours.h> #pragma comment( lib, “Ws2_32.lib” ) #pragma comment( lib, “detours.lib” ) #pragma comment( … Read more