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.

71 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. PickyEater.cpp
  5. Abstract:
  6. The application AVs during startup.
  7. When the app receives a WM_PALETTECHANGED message,
  8. it should compare the wParam and the hWnd. If they
  9. match, it should not handle the message. If they don't,
  10. it should.
  11. Notes:
  12. This is an app specific shim.
  13. History:
  14. 01/04/2001 rparsons Created
  15. --*/
  16. #include "precomp.h"
  17. IMPLEMENT_SHIM_BEGIN(PickyEater)
  18. #include "ShimHookMacro.h"
  19. APIHOOK_ENUM_BEGIN
  20. APIHOOK_ENUM_ENTRY(SendMessageA)
  21. APIHOOK_ENUM_END
  22. /*++
  23. Eat the WM_PALETTECHANGED if the hWnd is NULL
  24. --*/
  25. BOOL
  26. APIHOOK(SendMessageA)(
  27. HWND hWnd,
  28. UINT uMsg,
  29. WPARAM wParam,
  30. LPARAM lParam
  31. )
  32. {
  33. if ((hWnd == NULL) && (uMsg == WM_PALETTECHANGED))
  34. {
  35. return TRUE;
  36. }
  37. return FALSE;
  38. }
  39. /*++
  40. Register hooked functions
  41. --*/
  42. HOOK_BEGIN
  43. APIHOOK_ENTRY(USER32.DLL, SendMessageA)
  44. HOOK_END
  45. IMPLEMENT_SHIM_END