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.

64 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 2001, Microsoft Corporation
  3. Module Name:
  4. dimmwrp.h
  5. Abstract:
  6. This file defines the CActiveIMMApp Interface Class.
  7. Author:
  8. Revision History:
  9. Notes:
  10. --*/
  11. #ifndef _DIMMWRP_H_
  12. #define _DIMMWRP_H_
  13. #include "resource.h"
  14. #include "dimmex.h"
  15. //+---------------------------------------------------------------------------
  16. //
  17. // CActiveIMMApp
  18. //
  19. //----------------------------------------------------------------------------
  20. class CActiveIMMApp : public CComActiveIMMApp,
  21. public CComObjectRoot_CreateInstance_Verify<CActiveIMMApp>
  22. {
  23. public:
  24. BEGIN_COM_MAP_IMMX(CActiveIMMApp)
  25. COM_INTERFACE_ENTRY_IID(IID_IActiveIMMAppTrident4x, CActiveIMMApp)
  26. COM_INTERFACE_ENTRY_IID(IID_IActiveIMMAppPostNT4, CActiveIMMApp)
  27. COM_INTERFACE_ENTRY(IActiveIMMApp)
  28. COM_INTERFACE_ENTRY(IActiveIMMMessagePumpOwner)
  29. COM_INTERFACE_ENTRY(IAImmThreadCompartment)
  30. COM_INTERFACE_ENTRY(IServiceProvider)
  31. END_COM_MAP_IMMX()
  32. static HRESULT CreateInstance(IUnknown *pUnkOuter, REFIID riid, void **ppvObj)
  33. {
  34. if (IsOldAImm())
  35. {
  36. // aimm12 has some whacky CreateIntance rules to support trident
  37. return CActiveIMM_CreateInstance_Legacy(pUnkOuter, riid, ppvObj);
  38. }
  39. else
  40. {
  41. return CComObjectRoot_CreateInstance_Verify<CActiveIMMApp>::CreateInstance(pUnkOuter, riid, ppvObj);
  42. }
  43. }
  44. static BOOL VerifyCreateInstance(IUnknown *pUnkOuter, REFIID riid, void **ppvObj);
  45. static void PostCreateInstance(REFIID riid, void *pvObj);
  46. };
  47. #endif // _DIMMWRP_H_