I'm looking for a way to intercept and redirect reads to a certain registry keys. Naturally, Detours can do it. But I need it for a commercial application and MS $10K license fee is a bit too steep. Are there any alternatives ?
Madshi's madCodeHook is what you're looking for.
The EasyHook Library might be what you are looking for. It is licensed under LGPL and its description sounds quite nice.
I have never actually used it myself because Detours was always enough for my private projects.
There is also an article about it on CodeProject but that is rather old and shows only .NET examples.
You can also use Deviare API Hook if you want to solve also the IPC or Deviare In-Process for a Detours replacement. It's open source and well maintained.
I would recommend Mhook, which is free and works great for both x86 and x64.
Make sure to use apriorit's fork of Mhook, it has lots of improvements and bug fixes that are not merged back to the original project.
Detours 4 is now open source under the MIT license! So there is no $10k license fee anymore.
来源:https://stackoverflow.com/questions/4895617/detours-alternative-for-registry-interception