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.

59 lines
800 B

  1. /*++
  2. Copyright (c) 2002 Microsoft Corporation
  3. Module Name:
  4. Patrol.cpp
  5. Abstract:
  6. Kill USER32!PostQuitMessage to prevent the control panel applet from taking
  7. out explorer.
  8. Notes:
  9. This is an app specific shim.
  10. History:
  11. 20/06/2002 linstev Created
  12. --*/
  13. #include "precomp.h"
  14. IMPLEMENT_SHIM_BEGIN(Patrol)
  15. #include "ShimHookMacro.h"
  16. APIHOOK_ENUM_BEGIN
  17. APIHOOK_ENUM_ENTRY(PostQuitMessage)
  18. APIHOOK_ENUM_END
  19. /*++
  20. Kill this API
  21. --*/
  22. VOID
  23. APIHOOK(PostQuitMessage)(
  24. int nExitCode
  25. )
  26. {
  27. LOGN(eDbgLevelError, "[PostQuitMessage] Ignoring quit message");
  28. return;
  29. }
  30. /*++
  31. Register hooked functions
  32. --*/
  33. HOOK_BEGIN
  34. APIHOOK_ENTRY(USER32.DLL, PostQuitMessage)
  35. HOOK_END
  36. IMPLEMENT_SHIM_END