This is a sample (based on ZeroMemory's initial project) of injecting a custom DLL into a running process.
The way the code works is the following:
- The dll's full path is allocated in the target process's memory
- A thread is opened in the target process
- The thread loads the dll by calling LoadLibrary and suppling the allocated path to the dll file
- The handles and threads are freed
The DllInjector
makes use of modern C++ features to wrap the lifecycle of the loaded DLL, process and thread handles.
Injecting using pid and window name are currently supported.