Source code of Windows XP (NT5)
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.

70 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. MSAccess2000IME.cpp
  5. Abstract:
  6. MSAccess 2000 disable IME for the non text column but failing enable IME
  7. when user move the caret into text column with non IME keyboard ex.German.
  8. When user switch keyboard from German to IME, IME is disabled and user
  9. cannot input Far East language text.
  10. This shim disregard the attempt to disable IME.
  11. The problem is fixed in MSAccess 2002.
  12. Notes:
  13. This is an app specific shim.
  14. History:
  15. 12/14/2001 hioh Created
  16. --*/
  17. #include "precomp.h"
  18. IMPLEMENT_SHIM_BEGIN(MSAccess2000IME)
  19. #include "ShimHookMacro.h"
  20. APIHOOK_ENUM_BEGIN
  21. APIHOOK_ENUM_ENTRY(ImmAssociateContext)
  22. APIHOOK_ENUM_END
  23. /*++
  24. Disregard disabling IME.
  25. --*/
  26. HIMC
  27. APIHOOK(ImmAssociateContext)(HWND hWnd, HIMC hIMC)
  28. {
  29. // enable by original
  30. if (hIMC != NULL)
  31. {
  32. return (ORIGINAL_API(ImmAssociateContext)(hWnd, hIMC));
  33. }
  34. // disregard disable
  35. // msaccess.exe saves the input context return value as static, fool this
  36. return (ImmGetContext(hWnd));
  37. }
  38. /*++
  39. Register hooked functions
  40. --*/
  41. HOOK_BEGIN
  42. APIHOOK_ENTRY(IMM32.DLL, ImmAssociateContext)
  43. HOOK_END
  44. IMPLEMENT_SHIM_END