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.

62 lines
843 B

  1. /*++
  2. Copyright (c) 2002 Microsoft Corporation
  3. Module Name:
  4. JetFighter4.cpp
  5. Abstract:
  6. The app has a malformed ICON in it's resource.
  7. Notes:
  8. This is an app specific shim.
  9. History:
  10. 01/30/2001 linstev Created
  11. --*/
  12. #include "precomp.h"
  13. IMPLEMENT_SHIM_BEGIN(JetFighter4)
  14. #include "ShimHookMacro.h"
  15. APIHOOK_ENUM_BEGIN
  16. APIHOOK_ENUM_ENTRY(LoadIconA)
  17. APIHOOK_ENUM_END
  18. /*++
  19. Check for the bad icon.
  20. --*/
  21. HICON
  22. APIHOOK(LoadIconA)(
  23. HINSTANCE hInstance,
  24. LPCSTR lpIconName
  25. )
  26. {
  27. if ((DWORD) lpIconName == 103) {
  28. lpIconName = (LPCSTR) 8;
  29. }
  30. return ORIGINAL_API(LoadIconA)(hInstance, lpIconName);
  31. }
  32. /*++
  33. Register hooked functions
  34. --*/
  35. HOOK_BEGIN
  36. APIHOOK_ENTRY(USER32.DLL, LoadIconA)
  37. HOOK_END
  38. IMPLEMENT_SHIM_END