Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added libdetours that generates detours.dll #277

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lostmsu
Copy link

@lostmsu lostmsu commented Mar 24, 2023

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

@sylveon
Copy link
Contributor

sylveon commented Mar 24, 2023

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?

@lostmsu
Copy link
Author

lostmsu commented Mar 24, 2023

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

@sylveon
Copy link
Contributor

sylveon commented Mar 24, 2023

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

@lostmsu
Copy link
Author

lostmsu commented Mar 24, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants