Detours icon indicating copy to clipboard operation
Detours copied to clipboard

Added libdetours that generates detours.dll

Open lostmsu opened this issue 2 years ago • 4 comments
trafficstars

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

lostmsu avatar Mar 24 '23 19:03 lostmsu

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 avatar Mar 24 '23 21:03 sylveon

@sylveon that would bring all the DLL's dependencies into the process that wants to perform injection.

lostmsu avatar Mar 24 '23 22:03 lostmsu

Injected DLLs should already strive to as little deps as possible.

sylveon avatar Mar 24 '23 23:03 sylveon

@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).

lostmsu avatar Mar 24 '23 23:03 lostmsu