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
1.3 KiB

  1. /*++
  2. Copyright (c) 2001, Microsoft Corporation
  3. Module Name:
  4. tmgrevcb.cpp
  5. Abstract:
  6. This file implements the CInputContextOwnerCallBack Class.
  7. Author:
  8. Revision History:
  9. Notes:
  10. --*/
  11. #include "private.h"
  12. #include "tmgrevcb.h"
  13. #include "imc.h"
  14. #include "tls.h"
  15. #include "cic.h"
  16. #include "delay.h"
  17. // static
  18. HRESULT
  19. CThreadMgrEventSink_DIMCallBack::DIMCallback(
  20. UINT uCode,
  21. ITfDocumentMgr* dim,
  22. ITfDocumentMgr* dim_prev,
  23. void* pv)
  24. {
  25. DebugMsg(TF_FUNC, TEXT("CThreadMgrEventSink_DIMCallBack"));
  26. HRESULT hr = S_OK;
  27. switch (uCode) {
  28. case TIM_CODE_INITDIM:
  29. case TIM_CODE_UNINITDIM:
  30. break;
  31. case TIM_CODE_SETFOCUS:
  32. {
  33. TLS* ptls = TLS::ReferenceTLS(); // Should not allocate TLS. ie. TLS::GetTLS
  34. // DllMain -> ImeDestroy -> DeactivateIMMX -> Deactivate
  35. if (ptls == NULL)
  36. {
  37. DebugMsg(TF_ERROR, TEXT("CThreadMgrEventSink_DIMCallBack::DIMCallback. TLS==NULL"));
  38. return E_FAIL;
  39. }
  40. CicBridge::CTFDetection(ptls, dim);
  41. }
  42. break;
  43. }
  44. return hr;
  45. }