My C++ library currently detours Wow's EndScene function and executes there the commands it receives via named pipes.
For the detour part I'm using MS's detours.lib (detours.h), sadly Microsoft only supports 32Bit in the express edition, the professionell one is really expensive.
How do you guys detour functions on 64bit?