Can anyone tell me where I can find further information on the followng:

I want to be able to "hook" a Windows API call from within a third-party exe.

My reason for doing so is to provide additional functionality to the GetEnvironmentVariable call, without the need for a secondary DLL. The concept being that where the application makes a call to GetEnvironmentVariable, it would go to my own implementation instead.

I specifically want to modify the binary execuatable, not replace a system DLL with my own.

I know this can be done, but don't know where to start reading. Anyone any know where I can find out more about this subject?

Thanks