msctf: Setup global CompartmentMgr.
This commit is contained in:
parent
0baa711b0b
commit
936713fe33
|
@ -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 =
|
||||
|
|
Loading…
Reference in New Issue