I am looking for API hooking code which will hook 4 functions, namely TextOutA, TextOutW, ExtTextOutA and ExtTextOutW.
Your code should have 2 basic functions which I will call:
1) InjectAll
2) UnInjectAll
When I call InjectAll you should start a thread which will look for any processes which have not been hooked and inject our hooking DLL into them. Obviously, when our application starts you will have to hook every process since nothing is hooked.. Afterwards, you will just look for any new processes and hook those. When I call UnInjectAll, simply unhook all the alive processes which we have injected into. Keep in mind that this has to work on 32 and 64 bit systems, so there will be a 32 bit and 64 bit version of our DLL to inject. If the target process is 64 bit, then we inject the 64 bit DLL and likewise for the 32 bit.
Also, IE7 has a protected mode which makes it a bit tricky to inject a DLL into it, but there is a way around it which I can discuss with you later. The actual code for the hooked TextOut functions in the DLL should just be stub functions (I'll fill in the code that modifies the functionality of TextOut myself).
Please, no crashes at any cost. Whatever hooking technique you use..do not crash the target app. Note that you don't need to reinvent the wheel here..you can use a hooking library such as EasyHook which takes care of most of the mudane hooking chores. There are other libraries available online as well.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
Win XP, Vista 32/64 bit, VC++ Should be able to hook IE7 as well in protected mode (willing to discuss further) No Administrative access will be available on target OS