STDAPI CTextService::Deactivate() { if(_pThreadMgr == nullptr) { return S_OK; } _SaveUserDic(); _EndCandidateList(); _EndInputModeWindow(); _UninitFunctionProvider(); _UninitPreservedKey(0); _UninitPreservedKey(1); _UninitKeyEventSink(); _UninitLanguageBar(); _InitTextEditSink(nullptr); _UninitCompartmentEventSink(); _UninitThreadFocusSink(); _UninitThreadMgrEventSink(); _UninitD2D(); SafeRelease(&_pThreadMgr); _ClientId = TF_CLIENTID_NULL; return S_OK; }
STDAPI CTextService::Deactivate() { // delete the candidate list object if it exists. if (_pCandidateList != NULL) { delete _pCandidateList; _pCandidateList = NULL; } // // Unadvise TextEditSink if it is advised. // _InitTextEditSink(NULL); // // Uninitialize ThreadMgrEventSink. // _UninitThreadMgrEventSink(); // // Uninitialize Language Bar. // _UninitLanguageBar(); // // Uninitialize KeyEventSink // _UninitKeyEventSink(); // // Uninitialize PreservedKeys // _UninitPreservedKey(); // we MUST release all refs to _pThreadMgr in Deactivate if (_pThreadMgr != NULL) { _pThreadMgr->Release(); _pThreadMgr = NULL; } _tfClientId = TF_CLIENTID_NULL; return S_OK; }
STDAPI CTextService::Deactivate() { _UninitFunctionProvider(); _UninitPreservedKey(); _UninitKeyEventSink(); _UninitLanguageBar(); _UninitCompartmentEventSink(); _UninitThreadMgrEventSink(); if(_pThreadMgr != NULL) { _pThreadMgr->Release(); _pThreadMgr = NULL; } _ClientId = TF_CLIENTID_NULL; return S_OK; }