Source code of Windows XP (NT5)
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.

57 lines
719 B

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FailGetStdHandle.cpp
  5. Abstract:
  6. This shim returns INVALID_HANDLE_VALUE when GetStdHandle is called.
  7. Notes:
  8. This is an app specific shim.
  9. History:
  10. 12/12/1999 cornel Created
  11. --*/
  12. #include "precomp.h"
  13. IMPLEMENT_SHIM_BEGIN(FailGetStdHandle)
  14. #include "ShimHookMacro.h"
  15. APIHOOK_ENUM_BEGIN
  16. APIHOOK_ENUM_ENTRY(GetStdHandle)
  17. APIHOOK_ENUM_END
  18. /*++
  19. Return INVALID_HANDLE_VALUE when GetStdHandle is called.
  20. --*/
  21. HANDLE
  22. APIHOOK(GetStdHandle)(DWORD nStdHandle)
  23. {
  24. return INVALID_HANDLE_VALUE;
  25. }
  26. /*++
  27. Register hooked functions
  28. --*/
  29. HOOK_BEGIN
  30. APIHOOK_ENTRY(KERNEL32.DLL, GetStdHandle)
  31. HOOK_END
  32. IMPLEMENT_SHIM_END