withdll - a tool to inject DLLs into remote processes
I am happy to share with you a new open-source troubleshooting utility: withdll. I created it inspired by one of the samples in the Detours library with the same name. Withdll is a small tool, written in C#, that can inject DLLs into newly started or already running Windows processes (both 32- and 64-bit). If you are wondering why you may want to load a DLL into a remote process, think of those two example scenarios: patching some code in a remote process memory or collecting a trace of function calls made by a remote process. For the latter scenario, I prepared a short guide in which I present how you may use Detours sample libraries to collect traces of Win API calls. The withdll source code is available in its GitHub repository.
PS. If you need to interact with native libraries on Windows, I highly recommend checking the CsWin32 project. It helped me tremendously in generating the C# bindings for the Detours library. In case you are interested, I described the whole process in a post on my blog.