I have a DLL file *library.dll* which contains a function *foo*. The function *foo* calls a WinAPI function *goo*. I wrote an application that calls *foo* from *library.dll*. The problem is that I want to override the call to *goo* function by my own function *hoo* I declared in the application (not in the DLL).

How can I hook the call to *goo* function? I'm not looking for a global hook, I just want to override calls made by application I wrote.