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.

51 lines
1.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // File: guidmap.cpp
  4. //
  5. // Contents: IActiveIMMAppEx::GetGuidAtom routines
  6. //
  7. //----------------------------------------------------------------------------
  8. #include "private.h"
  9. #include "context.h"
  10. #include "globals.h"
  11. #include "cdimm.h"
  12. //
  13. // IActiveIMMAppEx::GetGuidAtom method
  14. //
  15. STDMETHODIMP CActiveIMM::GetGuidAtom(HIMC hIMC, BYTE bAttr, TfGuidAtom* pGuidAtom)
  16. {
  17. if (pGuidAtom == NULL) {
  18. return E_INVALIDARG;
  19. }
  20. *pGuidAtom = TF_INVALID_GUIDATOM;
  21. HRESULT hr;
  22. CActiveIMM *pActiveIMM;
  23. if (pActiveIMM = GetTLS())
  24. {
  25. if (pActiveIMM->_IsRealIme(NULL))
  26. return E_FAIL;
  27. }
  28. else
  29. return E_UNEXPECTED;
  30. DIMM_IMCLock imc(hIMC);
  31. if (FAILED(hr=imc.GetResult())) {
  32. return hr;
  33. }
  34. if (imc->m_pContext != NULL) {
  35. return imc->m_pContext->GetGuidAtom(hIMC, bAttr, pGuidAtom);
  36. }
  37. return E_UNEXPECTED;
  38. }