Commit 936713fe authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

msctf: Setup global CompartmentMgr.

parent 0baa711b
......@@ -74,6 +74,7 @@ static UINT activated = 0;
DWORD tlsIndex = 0;
TfClientId processId = 0;
ITfCompartmentMgr *globalCompartmentMgr = NULL;
const WCHAR szwSystemTIPKey[] = {'S','O','F','T','W','A','R','E','\\','M','i','c','r','o','s','o','f','t','\\','C','T','F','\\','T','I','P',0};
......
......@@ -29,6 +29,7 @@
extern DWORD tlsIndex;
extern TfClientId processId;
extern ITfCompartmentMgr *globalCompartmentMgr;
extern HRESULT ThreadMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut);
extern HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink*, ITfDocumentMgr **ppOut);
......
......@@ -390,8 +390,22 @@ static HRESULT WINAPI ThreadMgr_GetGlobalCompartment( ITfThreadMgr* iface,
ITfCompartmentMgr **ppCompMgr)
{
ThreadMgr *This = (ThreadMgr *)iface;
FIXME("STUB:(%p)\n",This);
return E_NOTIMPL;
HRESULT hr;
TRACE("(%p) %p\n",This, ppCompMgr);
if (!ppCompMgr)
return E_INVALIDARG;
if (!globalCompartmentMgr)
{
hr = CompartmentMgr_Constructor(NULL,&IID_ITfCompartmentMgr,(IUnknown**)&globalCompartmentMgr);
if (FAILED(hr))
return hr;
}
ITfCompartmentMgr_AddRef(globalCompartmentMgr);
*ppCompMgr = globalCompartmentMgr;
return S_OK;
}
static const ITfThreadMgrVtbl ThreadMgr_ThreadMgrVtbl =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment