Permalink
Browse files

Create dll_hijack_test_dll.cpp

  • Loading branch information...
adamkramer committed Mar 24, 2015
1 parent efe8f1e commit f6999e25b4b5912706ce667aedb084dde5d82c7b
Showing with 22 additions and 0 deletions.
  1. +22 −0 demo/dll/dll_hijack_test_dll.cpp
@@ -0,0 +1,22 @@
/* Demo DLL, which once loaded will print a message to the user and then pause indefinitely (keeping the program running) */
#include "stdafx.h"
#include <stdio.h>
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
printf("DLL successfully loaded! Sleeping...");
for (;;)
Sleep(10000);
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

0 comments on commit f6999e2

Please sign in to comment.