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.

56 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. UnMirrorImageList.cpp
  5. Abstract:
  6. PictureIt 2001 calls CImageListCache::AddImage() with the ICIFLAG_MIRROR set
  7. if the user default UI language is Arabic or Hebrew, This is shim to lie about
  8. the default UI language.
  9. GetUserDefaultUILanguage will rerun English for Arabic and Hebrew languages.
  10. This shim is app specific
  11. History:
  12. 04/17/2001 mhamid created
  13. --*/
  14. #include "precomp.h"
  15. IMPLEMENT_SHIM_BEGIN(UnMirrorImageList)
  16. #include "ShimHookMacro.h"
  17. APIHOOK_ENUM_BEGIN
  18. APIHOOK_ENUM_ENTRY(GetUserDefaultUILanguage)
  19. APIHOOK_ENUM_END
  20. LANGID
  21. APIHOOK(GetUserDefaultUILanguage)(VOID)
  22. {
  23. LANGID LangID = ORIGINAL_API(GetUserDefaultUILanguage)();
  24. if ((LangID == MAKELANGID(LANG_ARABIC, SUBLANG_DEFAULT))||
  25. (LangID == MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT)))
  26. {
  27. LangID = MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT);
  28. }
  29. return LangID;
  30. }
  31. /*++
  32. Register hooked functions
  33. --*/
  34. HOOK_BEGIN
  35. APIHOOK_ENTRY(KERNEL32.DLL, GetUserDefaultUILanguage)
  36. HOOK_END
  37. IMPLEMENT_SHIM_END