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
840 B

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. EmulateDeleteObject.cpp
  5. Abstract:
  6. This shim returns TRUE when the DeleteObject API is called regardless of
  7. actual result: just like Win9x.
  8. Notes:
  9. This is a general purpose shim.
  10. History:
  11. 10/10/1999 linstev Created
  12. --*/
  13. #include "precomp.h"
  14. IMPLEMENT_SHIM_BEGIN(EmulateDeleteObject)
  15. #include "ShimHookMacro.h"
  16. APIHOOK_ENUM_BEGIN
  17. APIHOOK_ENUM_ENTRY(DeleteObject)
  18. APIHOOK_ENUM_END
  19. /*++
  20. Force DeleteObject to return TRUE.
  21. --*/
  22. BOOL
  23. APIHOOK(DeleteObject)(
  24. HGDIOBJ hObject
  25. )
  26. {
  27. ORIGINAL_API(DeleteObject)(hObject);
  28. return TRUE;
  29. }
  30. /*++
  31. Register hooked functions
  32. --*/
  33. HOOK_BEGIN
  34. APIHOOK_ENTRY(GDI32.DLL, DeleteObject)
  35. HOOK_END
  36. IMPLEMENT_SHIM_END