Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
832 B

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. TerminateExe.cpp
  5. Abstract:
  6. This shim terminates an exe on startup. (Die Die DIE!!!)
  7. Notes:
  8. This is a general purpose shim.
  9. History:
  10. 05/01/2001 mnikkel Created
  11. --*/
  12. #include "precomp.h"
  13. IMPLEMENT_SHIM_BEGIN(TerminateExe)
  14. #include "ShimHookMacro.h"
  15. APIHOOK_ENUM_BEGIN
  16. APIHOOK_ENUM_END
  17. BOOL
  18. NOTIFY_FUNCTION(
  19. DWORD fdwReason)
  20. {
  21. switch (fdwReason)
  22. {
  23. case DLL_PROCESS_ATTACH:
  24. DPFN( eDbgLevelSpew, "Terminating Exe.\n");
  25. ExitProcess(0);
  26. break;
  27. default:
  28. break;
  29. }
  30. return TRUE;
  31. }
  32. /*++
  33. Register hooked functions
  34. --*/
  35. HOOK_BEGIN
  36. CALL_NOTIFY_FUNCTION
  37. HOOK_END
  38. IMPLEMENT_SHIM_END