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.

75 lines
1020 B

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. CUASDisableCicero.cpp
  5. Abstract:
  6. This shim is for apps that don't support CUAS.
  7. Notes:
  8. This is a general purpose shim.
  9. History:
  10. 12/11/2001 yutakas Created
  11. --*/
  12. #include "precomp.h"
  13. IMPLEMENT_SHIM_BEGIN(CUASDisableCicero)
  14. #include "ShimHookMacro.h"
  15. APIHOOK_ENUM_BEGIN
  16. APIHOOK_ENUM_END
  17. typedef BOOL (*PFNIMMDISABLETEXTFRAMESERVICE)(DWORD);
  18. void TurnOffCicero()
  19. {
  20. PFNIMMDISABLETEXTFRAMESERVICE pfn;
  21. HMODULE hMod = LoadLibrary(TEXT("imm32.dll"));
  22. if (hMod)
  23. {
  24. pfn = (PFNIMMDISABLETEXTFRAMESERVICE)GetProcAddress(hMod,
  25. "ImmDisableTextFrameService");
  26. if (pfn)
  27. pfn(-1);
  28. }
  29. }
  30. BOOL
  31. NOTIFY_FUNCTION(
  32. DWORD fdwReason
  33. )
  34. {
  35. if (fdwReason == SHIM_STATIC_DLLS_INITIALIZED) {
  36. TurnOffCicero();
  37. }
  38. return TRUE;
  39. }
  40. /*++
  41. Register hooked functions
  42. --*/
  43. HOOK_BEGIN
  44. CALL_NOTIFY_FUNCTION
  45. HOOK_END
  46. IMPLEMENT_SHIM_END