Skip to content

Instantly share code, notes, and snippets.

@ADeltaX
ADeltaX / dllmain.cpp
Created March 22, 2021 17:54
Example for accessing SetWindowBand function via dll injection via explorer.exe
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mutex>
//INSTALL DETOURS FROM NUGET! (or build from source yourself)
#include <detours.h>
//Definitions
typedef BOOL(WINAPI* SetWindowBand)(IN HWND hWnd, IN HWND hwndInsertAfter, IN DWORD dwBand);
typedef BOOL(WINAPI* NtUserEnableIAMAccess)(IN ULONG64 key, IN BOOL enable);