A global injection and hooking example. Injects into all processes and hooks the
MessageBoxW
function. Also hooks the CreateProcessInternalW
function to be
able to inject into newly created processes. Refer to the blog post for details:
Implementing Global Injection and Hooking in
Windows.
Debug
or
Release
:
global-inject-demo
, Platform Win32
.global-inject-lib
, Platform Win32
.global-inject-lib
, Platform x64
.global-inject-demo.exe
32\global-inject-lib.dll
64\global-inject-lib.dll
global-inject-demo.exe
to load the library in all processes.Use any program that displays a message box using the MessageBoxW
WinAPI
function. An easy option is running slmgr.vbs
via the Run dialog (Win+R).