Detours
Detours copied to clipboard
Added libdetours that generates detours.dll
Exported functions, that inject DLLs into other processes (for eventual consumption from .NET)
Microsoft Reviewers: Open in CodeFlow
Microsoft Reviewers: Open in CodeFlow
Microsoft Reviewers: Open in CodeFlow
I believe making detours a static library only is an intentional choice. Why not simply expose ways to call these Detours APIs directly in the DLL you're trying to inject?
@sylveon that would bring all the DLL's dependencies into the process that wants to perform injection.
Injected DLLs should already strive to as little deps as possible.
@sylveon I mean yes, that's the ideal, but having the host to be compatible with all target related dependencies is not always achievable.
The other scenario would be the need to inject multiple DLLs or inject DLLs based on runtime information (mine is close to this - I am trying to detour APIs called by games, and the set of hooks varies by game).