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.3 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. Outlook2000.cpp
  5. Abstract:
  6. If Outlook2000 is calling to set the system date to Hebrew, while the
  7. associated UserLocale is passed in the call as Arabic, the shim will
  8. replace the UserLocale with DefaultUserLocale and let the call proceed;
  9. this way Outlook2000 will be able to restore the date to Hebrew
  10. (which was prevented by the passing of an Arabic UserLocale).
  11. Notes:
  12. This is an app specific shim.
  13. History:
  14. 06/12/2001 geoffguo Created
  15. --*/
  16. #include "precomp.h"
  17. IMPLEMENT_SHIM_BEGIN(Outlook2000)
  18. #include "ShimHookMacro.h"
  19. APIHOOK_ENUM_BEGIN
  20. APIHOOK_ENUM_ENTRY(SetLocaleInfoA)
  21. APIHOOK_ENUM_END
  22. /*++
  23. This hooks SetLocaleInfo.
  24. --*/
  25. BOOL
  26. APIHOOK(SetLocaleInfoA)(
  27. LCID Locale,
  28. LCTYPE LCType,
  29. LPCSTR lpLCData
  30. )
  31. {
  32. LCID lcid = Locale;
  33. LPCSTR szCAL_HEBREW = "8";
  34. if (Locale == MAKELCID (LANG_ARABIC, SORT_DEFAULT) && lpLCData != NULL
  35. && lstrcmpA (lpLCData, szCAL_HEBREW) == 0) {
  36. lcid = LOCALE_USER_DEFAULT;
  37. }
  38. return SetLocaleInfoA(lcid, LCType, lpLCData);
  39. }
  40. /*++
  41. Register hooked functions
  42. --*/
  43. HOOK_BEGIN
  44. APIHOOK_ENTRY(KERNEL32.DLL, SetLocaleInfoA)
  45. HOOK_END
  46. IMPLEMENT_SHIM_END