Skip to content

Instantly share code, notes, and snippets.

@Ice3man543
Created April 23, 2018 14:11
Show Gist options
  • Save Ice3man543/87a48ffc3f3dac122f0208543d44d26c to your computer and use it in GitHub Desktop.
Save Ice3man543/87a48ffc3f3dac122f0208543d44d26c to your computer and use it in GitHub Desktop.
Test DLL for dll injection guide
#include <windows.h>
BOOL APIENTRY DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
MessageBoxA(NULL, "Hello From The Injected DLL", "Injected !", MB_OK | MB_ICONINFORMATION);
break;
case DLL_THREAD_ATTACH:
MessageBoxA(NULL, "Hello From The Injected DLL", "Injected !", MB_OK | MB_ICONINFORMATION);
break;
case DLL_THREAD_DETACH:
MessageBoxA(NULL, "Hello Again From The Injected DLL", "Injected !", MB_OK | MB_ICONINFORMATION);
break;
case DLL_PROCESS_DETACH:
MessageBoxA(NULL, "Hello Again From The Injected DLL", "Injected !", MB_OK | MB_ICONINFORMATION);
break;
}
return TRUE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment