Created
April 23, 2018 14:11
-
-
Save Ice3man543/87a48ffc3f3dac122f0208543d44d26c to your computer and use it in GitHub Desktop.
Test DLL for dll injection guide
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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