From 3726e38b1952510124b6c22e2ddd492605a3e774 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Thu, 11 Jun 2009 13:33:33 -0500 Subject: [PATCH] msctf: Define ITfCompartmentMgr for Context. --- dlls/msctf/context.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/msctf/context.c b/dlls/msctf/context.c index be1ee2deb6e..2c7acb068bc 100644 --- a/dlls/msctf/context.c +++ b/dlls/msctf/context.c @@ -68,6 +68,9 @@ typedef struct tagContext { LONG refCount; BOOL connected; + /* Aggregation */ + ITfCompartmentMgr *CompartmentMgr; + TfClientId tidOwner; TfEditCookie defaultCookie; TS_STATUS documentStatus; @@ -175,6 +178,7 @@ static void Context_Destructor(Context *This) free_sink(sink); } + CompartmentMgr_Destructor(This->CompartmentMgr); HeapFree(GetProcessHeap(),0,This); } @@ -195,6 +199,10 @@ static HRESULT WINAPI Context_QueryInterface(ITfContext *iface, REFIID iid, LPVO { *ppvOut = &This->InsertAtSelectionVtbl; } + else if (IsEqualIID(iid, &IID_ITfCompartmentMgr)) + { + *ppvOut = This->CompartmentMgr; + } if (*ppvOut) { @@ -718,6 +726,8 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp This->tidOwner = tidOwner; This->connected = FALSE; + CompartmentMgr_Constructor((IUnknown*)This, &IID_IUnknown, (IUnknown**)&This->CompartmentMgr); + cookie->lockType = TF_ES_READ; cookie->pOwningContext = This;