@ OP: It helps to know what you'er looking for. The technique you are looking for is called function hooking and the library you want to look into is the Detours library published by Microsoft: http://research.microsoft.com/en-us/projects/detours/
There are other methods, but most of those require some inline assembly and for obvious reasons they piss off UAC and most AV clients.