microsoft / Detours

Detours is a software package for monitoring and instrumenting API calls on Windows. It is distributed in source code form.
MIT License
5.02k stars 981 forks source link

Feature: Add safe DetoursAttach (and friends) overloads #178

Closed sylveon closed 3 years ago

sylveon commented 3 years ago

Fixes #176

I've also added a sample (a copy of the simple sample, but without the (PVOID&) casts) to validate the functionality.

Microsoft Reviewers: Open in CodeFlow
bgianfo commented 3 years ago

Would you mind writing some documentation for these new APIs? Like: https://github.com/microsoft/Detours/wiki/Reference#apis-for-inserting-dlls-and-payloads-into-new-processes

bgianfo commented 3 years ago

@sylveon sigh... msftbot went crazy :) would you mind addressing the feedback in a follow up PR?

sylveon commented 3 years ago

As for the docs... I can't edit the wiki but I don't think making a new page is required, would be better to just add a second declaration or a note to the existing pages for DetourAttach and friends to make the overload known