HRESULT STDMETHODCALLTYPE CIEHtmlElement::setAttribute(BSTR strAttributeName, VARIANT AttributeValue, LONG lFlags) { if (strAttributeName == NULL) { return E_INVALIDARG; } nsCOMPtr<nsIDOMElement> element = do_QueryInterface(mDOMNode); if (!element) { return E_UNEXPECTED; } // Get the name from the BSTR USES_CONVERSION; nsAutoString name(OLE2W(strAttributeName)); // Get the value from the variant CComVariant vValue; if (FAILED(vValue.ChangeType(VT_BSTR, &AttributeValue))) { return E_INVALIDARG; } // Set the attribute nsAutoString value(OLE2W(vValue.bstrVal)); element->SetAttribute(name, value); return S_OK; }
STDMETHODIMP CTaskbar7::AddUserTask(BSTR name, BSTR path, BSTR arguments, BSTR icon, int iconIndex, BSTR workingFolder) { // Do nothing on XP & Vista if (!m_isWindows7) return S_OK; USES_CONVERSION; AddCustomDestination(Task, L"", OLE2W(name), OLE2W(path), OLE2W(arguments), OLE2W(icon), iconIndex, OLE2W(workingFolder)); return S_OK; }
STDMETHODIMP CTaskbar7::SetTabsIcon(BSTR icon) { // Remove icon if icon path is empty if (CComBSTR(icon) == CComBSTR("")) { if (m_isWindows7) SetClassLong(m_hwnd, GCL_HICON, NULL); return S_OK; } USES_CONVERSION; Bitmap* bitmap = NULL; HRESULT hr = LoadImageFromFile(OLE2W(icon), &bitmap); // return a proper error if (!SUCCEEDED(hr)) return hr; // Do nothing on XP & Vista if (!m_isWindows7) { delete bitmap; return S_OK; } HICON hIcon; bitmap->GetHICON(&hIcon); SetClassLong(m_hwnd, GCL_HICON, (LONG)hIcon); // Cleanup the HICON & Bitmap DestroyIcon(hIcon); delete bitmap; return S_OK; }
HRESULT STDMETHODCALLTYPE CIEHtmlElement::removeAttribute(BSTR strAttributeName, LONG lFlags, VARIANT_BOOL __RPC_FAR *pfSuccess) { if (strAttributeName == NULL) { return E_INVALIDARG; } nsCOMPtr<nsIDOMElement> element = do_QueryInterface(mDOMNode); if (!element) { return E_UNEXPECTED; } BOOL bCaseSensitive = (lFlags == VARIANT_TRUE) ? TRUE : FALSE; // Get the name from the BSTR USES_CONVERSION; nsAutoString name(OLE2W(strAttributeName)); // Remove the attribute nsresult nr = element->RemoveAttribute(name); BOOL bRemoved = (nr == NS_OK) ? TRUE : FALSE; if (pfSuccess) { *pfSuccess = (bRemoved) ? VARIANT_TRUE : VARIANT_FALSE; } return S_OK; }
STDMETHODIMP CTaskbar7::AddDestination(BSTR category, BSTR name, BSTR path, BSTR arguments, BSTR icon, int iconIndex, BSTR workingFolder) { if (CComBSTR(category) == CComBSTR("")) return CCOMError::DispatchError(SYNTAX_ERR, CLSID_Taskbar7, _T("Invalid category!"), "You must specify a category!", 0, NULL); if (CComBSTR(category) == CComBSTR("Tasks")) return CCOMError::DispatchError(SYNTAX_ERR, CLSID_Taskbar7, _T("Invalid category!"), "Tasks is a reserved category. Use AddUserTask instead!", 0, NULL); // Do nothing on XP & Vista if (!m_isWindows7) return S_OK; USES_CONVERSION; AddCustomDestination(Custom, OLE2W(category), OLE2W(name), OLE2W(path), OLE2W(arguments), OLE2W(icon), iconIndex, OLE2W(workingFolder)); return S_OK; }
STDMETHODIMP CTaskbar7::UpdateButton(int id, BSTR image, BSTR tooltip, int flags) { // All parameters are optional, apart from id USES_CONVERSION; THUMBBUTTON button; HRESULT hr = LoadButton(id, OLE2W(image), OLE2W(tooltip), flags, &button); if (!SUCCEEDED(hr)) return hr; // Do nothing on XP & Vista if (m_isWindows7) m_pTaskbarList->ThumbBarUpdateButtons(m_hwnd, 1, &button); // Cleanup the HICON DestroyIcon(button.hIcon); return S_OK; }
/************************************* * Overlay *************************************/ STDMETHODIMP CTaskbar7::SetOverlayIcon(BSTR path, BSTR description) { if (!m_pTaskbarList || m_parentHwnd == NULL) return S_OK; USES_CONVERSION; wstring image(OLE2W(path)); wstring desc(OLE2W(description)); // if no path is given, we remove the overlay if (image.empty()) { if (m_isWindows7) return m_pTaskbarList->SetOverlayIcon(m_parentHwnd, NULL, L""); return S_OK; } Bitmap* bitmap = NULL; HRESULT hr = LoadImageFromFile(image, &bitmap); if (!SUCCEEDED(hr)) return hr; // Do nothing on XP & Vista if (!m_isWindows7) { delete bitmap; return S_OK; } HICON pIcon; bitmap->GetHICON(&pIcon); // Sets the overlay icon hr = m_pTaskbarList->SetOverlayIcon(m_parentHwnd, pIcon, desc.c_str()); DestroyIcon(pIcon); delete bitmap; return hr; }
STDMETHODIMP CTaskbar7::AddSeparator(BSTR category) { // Do nothing on XP & Vista if (!m_isWindows7) return S_OK; USES_CONVERSION; AddCustomDestination(Separator, OLE2W(category), L"", L"", L"", L"", 0, L""); return S_OK; }
/************************************* * ThumbBar *************************************/ STDMETHODIMP CTaskbar7::SetupButton(int id, BSTR image, BSTR tooltip, int flags) { // No more than 7 buttons are permitted if (m_buttons.size() == 7) return CCOMError::DispatchError(INDEX_SIZE_ERR, CLSID_Taskbar7, _T("Error setting up buttons!"), "You cannot have more than 7 buttons on a thumbbar.", 0, NULL); // Do nothing on XP & Vista if (!m_isWindows7) return S_OK; // All parameters are optional, apart from id USES_CONVERSION; ThumbButton button; button.id = id; button.image = OLE2W(image); button.tooltip = OLE2W(tooltip); button.flags = flags; m_buttons.push_back(button); return S_OK; }
STDMETHODIMP CTaskbar7::DeleteList(BSTR appID) { if (CComBSTR(appID) == CComBSTR("")) return CCOMError::DispatchError(INDEX_SIZE_ERR, CLSID_Taskbar7, _T("Error deleting list!"), "appID cannot be NULL or empty", 0, NULL); // Do nothing on XP & Vista if (!m_isWindows7) return S_OK; USES_CONVERSION; /*HRESULT hr = */m_pCustomDestinationList->DeleteList(OLE2W(appID)); return S_OK; }
HRESULT CAnalyzer::Analyze(BSTR bstr_Wordform) { USES_CONVERSION; if (m_pDb == NULL) { ERROR_LOG (L"DB pointer is NULL."); return E_FAIL; } m_coll.clear(); vector<CHasher> vec_possible_analyses; int i_wf_count = iAnalyze(OLE2W(bstr_Wordform), vec_possible_analyses, TRUE); if (i_wf_count < 0) { ERROR_LOG (L"Negative number returned from i_Analyze."); return E_FAIL; } if (i_wf_count == 0) { return S_FALSE; } // Otherwise, i_wf_count > 0 // Then, for every wordform found, put the data to the collection for (vector<CHasher>::iterator itWf = vec_possible_analyses.begin(); itWf != vec_possible_analyses.end(); itWf++) { CComObject<CWordForm> *wF = NULL; hHasher2Wordform(OLE2W(bstr_Wordform), *itWf, wF); m_coll.push_back(CComVariant(wF)); } vec_possible_analyses.clear(); return S_OK; } // Analyze(BSTR bstr_Wordform)
static std::string bstr2string(BSTR bstr) { wchar_t *str = OLE2W(bstr); std::string ret; int len = WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL); if (len > 0) { HGLOBAL utf8Str = GlobalAlloc(GMEM_FIXED | GMEM_ZEROINIT, len + 1); if (utf8Str != NULL) { WideCharToMultiByte(CP_UTF8, 0, str, -1, (char *)utf8Str, len, NULL, NULL); ret.assign((char *)utf8Str); GlobalFree(utf8Str); } } return ret; }
HRESULT STDMETHODCALLTYPE CIEHtmlElement::getAttribute(BSTR strAttributeName, LONG lFlags, VARIANT __RPC_FAR *AttributeValue) { if (strAttributeName == NULL) { return E_INVALIDARG; } if (AttributeValue == NULL) { return E_INVALIDARG; } VariantInit(AttributeValue); // Get the name from the BSTR USES_CONVERSION; nsAutoString name(OLE2W(strAttributeName)); nsCOMPtr<nsIDOMElement> element = do_QueryInterface(mDOMNode); if (!element) { return E_UNEXPECTED; } BOOL bCaseSensitive = (lFlags == VARIANT_TRUE) ? TRUE : FALSE; // Get the attribute nsAutoString value; nsresult rv = element->GetAttribute(name, value); if (NS_SUCCEEDED(rv)) { USES_CONVERSION; AttributeValue->vt = VT_BSTR; AttributeValue->bstrVal = SysAllocString(W2COLE(value.get())); return S_OK; } else { return S_FALSE; } return S_OK; }
void ComErrorInfo(HRESULT hres) { if(FAILED(hres)) { HRESULT hresult; HRESULT hr; GUID guidErrSrc; CComBSTR ErrDesc,ErrSrc; CComPtr<IErrorInfo> pIErrorInfo; hr = hres; // backup orig HRESULT hresult = GetErrorInfo(0,&pIErrorInfo); if (hresult == S_OK) { USES_CONVERSION; pIErrorInfo->GetGUID(&guidErrSrc); pIErrorInfo->GetSource(&ErrSrc); pIErrorInfo->GetDescription(&ErrDesc); acutPrintf(OLE2W(ErrSrc)); } } }
ET_ReturnCode CT_LexPreprocessor::LoadDb(BSTR bstrPath) { USES_CONVERSION; if (m_pDb) { delete m_pDb; } sDbPath = OLE2W(bstrPath); m_pDb = new CSqlite(sDbPath); if (m_pDb == NULL) { ERROR_LOG(L"Failed to instantiate CSqlite."); return E_FAIL; } // Create and initialize an IDictionary object to work with ET_ReturnCode hr = H_NO_ERROR; hr = sp_dict.CoCreateInstance(__uuidof(ZalDictionary)); if (hr != H_NO_ERROR) { ERROR_LOG(L"CreateInstance failed for ZalDictionary."); return hr; } sp_dict->put_DbPath(bstrPath); // Load several tables for faster preprocessing vector<CEString> vecTablesToLoad; /* vecTablesToLoad.push_back(L"irregular_forms"); vecTablesToLoad.push_back(L"irregular_stress"); vecTablesToLoad.push_back(L"nonexistent_forms"); vecTablesToLoad.push_back(L"homonyms"); vecTablesToLoad.push_back(L"common_deviation"); vecTablesToLoad.push_back(L"headword"); vecTablesToLoad.push_back(L"stress"); */ /* m_pDb->bLoadTables(vecTablesToLoad); m_pDb->bCreateIndex(L"irregular_forms", L"descriptor_id"); m_pDb->bCreateIndex(L"irregular_stress", L"form_id"); m_pDb->bCreateIndex(L"nonexistent_forms", L"descriptor_id"); m_pDb->bCreateIndex(L"homonyms", L"headword_id"); m_pDb->bCreateIndex(L"common_deviation", L"inflection_id"); m_pDb->bCreateIndex(L"headword", L"id"); m_pDb->bCreateIndex(L"stress", L"headword_id"); */ CEString str_query = L"Select * from endings_for_analysis"; m_pDb->PrepareForSelect(str_query); int iCurSubtableId = -1, iPrevSubtableId = -1; CEndingsTable coEndingsTable; while (m_pDb->bGetRow()) { stInflexion soInflexionTmp; m_pDb->GetData(1, iCurSubtableId); m_pDb->GetData(2, soInflexionTmp.sEnding); m_pDb->GetData(3, soInflexionTmp.iGram); m_pDb->GetData(4, soInflexionTmp.iStress); if (iCurSubtableId != iPrevSubtableId && iPrevSubtableId != -1) { CEndingsTable coCopy(coEndingsTable); vecDb.push_back(coCopy); coEndingsTable.Clear(); } coEndingsTable.iAddEnding(soInflexionTmp.iGram, soInflexionTmp.sEnding, soInflexionTmp.iStress); iPrevSubtableId = iCurSubtableId; } if (coEndingsTable.m_vecEndings.size() > 0) { vecDb.push_back(coEndingsTable); } iDbSize = vecDb.size(); return H_NO_ERROR; }
HRESULT CAnalyzer::LoadDb(BSTR bstrPath) { USES_CONVERSION; int iDebugFlag = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ); iDebugFlag |= _CRTDBG_LEAK_CHECK_DF; if (m_pDb) { delete m_pDb; } m_sDbPath = OLE2W(bstrPath); m_pDb = new CSqlite(m_sDbPath); if (m_pDb == NULL) { ERROR_LOG (L"Failed to instantiate CSqlite."); return E_FAIL; } // Fill umap_freq_stems umap_freq_stems.clear(); CEString str_query = L"Select * from stems_for_analysis"; // TODO: frequencies m_pDb->PrepareForSelect(str_query); stStemLinks s_links; CEString str_stem = L"", str_stem_without_yo = L""; while (m_pDb->bGetRow()) { m_pDb->GetData(0, s_links.iStemId); m_pDb->GetData(1, s_links.llLexemeId); m_pDb->GetData(2, str_stem); m_pDb->GetData(3, s_links.iStressPos); m_pDb->GetData(4, s_links.iEndingsLink); m_pDb->GetData(5, s_links.sLemma); if (str_stem.bIsEmpty()) { continue; } umap_freq_stems.insert(pair<CEString, stStemLinks>(str_stem, s_links)); str_stem_without_yo = str_stem; str_stem_without_yo.Replace(0, str_stem_without_yo.uiLength(), L'ё', L'е'); if (str_stem_without_yo != str_stem) { umap_freq_stems.insert (pair<CEString, stStemLinks> (str_stem_without_yo, s_links)); } } m_pDb->Finalize(); // Fill arr_freq_endings int i_subtable_id, i_cur_subtable_id = -1, i_hash, iStressPos; CEString str_ending = L"", str_ending_without_yo = L""; if (arr_freq_endings != NULL) { delete[] arr_freq_endings; } int i_last_subtable = m_pDb->iLastID(L"endings_for_analysis"); if (i_last_subtable < -1) { return E_FAIL; } arr_freq_endings = new CEndingsTable[i_last_subtable + 1]; str_query = L"Select * from endings_for_analysis order by subtable_id asc"; m_pDb->PrepareForSelect(str_query); CEndingsTable co_et; while (m_pDb->bGetRow()) { m_pDb->GetData(1, i_subtable_id); m_pDb->GetData(2, str_ending); m_pDb->GetData(3, i_hash); m_pDb->GetData(4, iStressPos); if (i_subtable_id != i_cur_subtable_id) { // Push the current subtable to the array if (i_cur_subtable_id >= 0) { CEndingsTable coETCopy(co_et); arr_freq_endings[i_cur_subtable_id] = coETCopy; } i_cur_subtable_id = i_subtable_id; co_et.Clear(); } co_et.iAddEnding(i_hash, str_ending, iStressPos); str_ending_without_yo = str_ending; str_ending_without_yo.Replace(0, str_ending_without_yo.uiLength(), L'ё', L'е'); if (str_ending_without_yo != str_ending) { co_et.iAddEnding(i_hash, str_ending_without_yo, iStressPos); } } m_pDb->Finalize(); // Fill umap_endings2subtbl umap_endings2subtbl.clear(); str_query = L"Select * from subtables_for_heuristics"; m_pDb->PrepareForSelect(str_query); int iLexemeCount = 0, iCutRight = 0; CEString sStemFinal = L"", sLemmaFinal = L""; while (m_pDb->bGetRow()) { m_pDb->GetData (1, i_subtable_id); m_pDb->GetData (2, iLexemeCount); m_pDb->GetData (3, sStemFinal); m_pDb->GetData (4, iCutRight); m_pDb->GetData (5, sLemmaFinal); arr_freq_endings[i_subtable_id].m_iLexemeCount = iLexemeCount; arr_freq_endings[i_subtable_id].m_iCutRight = iCutRight; arr_freq_endings[i_subtable_id].m_sStemFinal = sStemFinal; arr_freq_endings[i_subtable_id].m_sLemmaFinal = sLemmaFinal; for (vector<stInflexion>::iterator iterEnding = arr_freq_endings[i_subtable_id].m_vecEndings.begin(); iterEnding != arr_freq_endings[i_subtable_id].m_vecEndings.end(); ++iterEnding) { // umap_endings2subtbl.insert(unordered_multimap<CEString, int>::value_type(*iter_ending, i_subtable_id)); umap_endings2subtbl.insert(pair<CEString, int>(iterEnding->sEnding, i_subtable_id)); } } m_pDb->Finalize(); return S_OK; }
static bool isUrlJs(BSTR url) { return wcsncmp(OLE2W(url), L"javascript:", 11) == 0; }
ET_ReturnCode CT_LexPreprocessor::PrepareLexemes(__int64 llStart, __int64 llEnd, BOOL bStress) { USES_CONVERSION; if (llStart < 0 || llEnd < 0 || m_pDb == NULL || sp_dict == NULL) { ERROR_LOG(L"Illegal argument."); return H_ERROR_INVALID_ARG; } if (llStart == 0 && llEnd == 0) { // Call the i_ClassifyStems function instead of preparing lexemes iClassifyStems(); return H_NO_ERROR; } // TEST bStress = TRUE; CEString sStem; int iMaxStems = 0; const int MAX_NUM_STEMS = 9; long lItems = 0, lId = 0, lWordforms = 0; __int64 llLexemeId; ET_ReturnCode hr; wsmatch result; CEString *arr_sParadigm, **parr_sStems, sEnding; parr_sStems = new CEString*; *parr_sStems = new CEString[1]; bool bMatch; m_pDb->BeginTransaction(); for (llLexemeId = llStart; llLexemeId <= llEnd; ++llLexemeId) // for every lexeme within the range { int *arr_iSubtableId, *arr_iHash; parr_sStems = new CEString*; *parr_sStems = new CEString[1]; int iWf = 0; CComPtr<ILexeme> sp_lex; // Find the lexeme in the db; generate its paradigm // (i_th element of arr_str_Paradigm has form arr_l_Hash[i]) try { hr = sp_dict->GetLexeme((LONG)llLexemeId, &sp_lex); if (hr != H_NO_ERROR) { ERROR_LOG(L"GetLexeme() failed."); return hr; } CComBSTR bstrLemma; sp_lex->get_InitialForm(&bstrLemma); ET_PartOfSpeech eoPOS = POS_UNDEFINED; hr = sp_lex->get_PartOfSpeech(&eoPOS); // --------- Test ---------- //if (eoPOS != POS_NOUN && eoPOS != POS_ADJ && eoPOS != POS_VERB && eoPOS != POS_PRONOUN_ADJ) //if (eoPOS == POS_NUM_ADJ) //{ // continue; //} // --------- /Test ---------- BOOL bHasIrregularForms = 0; sp_lex->get_HasIrregularForms(&bHasIrregularForms); if (eoPOS == POS_VERB && bHasIrregularForms != 0) { iMaxStems = 5; } else if ((eoPOS == POS_NOUN && bHasIrregularForms == 0) || (eoPOS == POS_ADJ && bHasIrregularForms == 0) || eoPOS == POS_PRONOUN_ADJ || eoPOS == POS_NUM || eoPOS == POS_NUM_ADJ) { iMaxStems = 2; } else { iMaxStems = 3; } hr = sp_lex->GenerateWordForms(); if (hr == H_ERROR_UNEXPECTED) // Just skip it { continue; } if (hr != H_NO_ERROR) { ERROR_LOG (L"GenerateWordForms() failed."); continue; //return h_r; } hr = sp_lex->get_Count(&lWordforms); if (lWordforms <= 0) { ERROR_LOG (L"l_Wordforms = " + CEString::sToString<long>(lWordforms) + L"."); //return E_FAIL; continue; } arr_sParadigm = new CEString[lWordforms]; arr_iHash = new int[lWordforms]; for (long lItem = 1; lItem <= lWordforms; ++lItem) { CComVariant sp_disp = NULL; hr = sp_lex->get_Item(lItem, &sp_disp); if (hr != H_NO_ERROR) { ERROR_LOG(L"get_Item failed."); continue; //return h_r; } CComQIPtr<IWordForm> sp_wf = sp_disp.pdispVal; CComBSTR bstrWordForm; CEString sWordForm; long lHash = -1; sp_wf->get_Wordform(&bstrWordForm); if (bstrWordForm.Length() <= 0) { ERROR_LOG(L"Empty wordform!"); } sp_wf->get_Hash(&lHash); arr_iHash[lItem - 1] = (int)lHash; // TODO: it should be of the same type throughout the whole project sWordForm = OLE2W(bstrWordForm); if (bStress) { long lStressPos = -1; long lStressCount = 0; BOOL bPrimary = FALSE; sp_wf->get_StressCount(&lStressCount); for (long lStress = 0; lStress < lStressCount; ++lStress) { // Use only the first primary stress sp_wf->GetStressPos(lStress, &lStressPos, &bPrimary); if (bPrimary == TRUE) { break; } else { lStressPos = -1; } } CEString sWfStressed = sInsertStress(lStressPos, OLE2W(bstrWordForm)); arr_sParadigm[lItem - 1] = sWfStressed; } else { arr_sParadigm[lItem - 1] = OLE2W(bstrWordForm); } sp_disp.Clear(); } // Create several gr_stems int iStems = 0; while (iStems <= 0 && iMaxStems <= MAX_NUM_STEMS) { delete[] *parr_sStems; delete parr_sStems; parr_sStems = new CEString*; *parr_sStems = new CEString[1]; iStems = iLCP(arr_sParadigm, parr_sStems, (int)lWordforms, iMaxStems); if (iStems == 1 && (*parr_sStems)[0].uiLength() <= 0) { iStems = 0; } iMaxStems += 2; } // Split every wordform into stem and ending, // then for every gr_stem create a table of endings usable with it CEndingsTable *arr_m_Endings; arr_m_Endings = new CEndingsTable[iStems]; arr_iSubtableId = new int[iStems]; for (iWf = 0; iWf < lWordforms; ++iWf) { for (int iS = 0; iS < iStems; ++iS) { bMatch = arr_sParadigm[iWf].bRegexMatch((*parr_sStems)[iS] + L"(.*)"); if (bMatch == true) { sEnding = arr_sParadigm[iWf].sGetRegexMatch(0); // TODO: Several stress positions int iStressPos = iDeleteStress(sEnding); if ((*parr_sStems)[iS].sSubstr((*parr_sStems)[iS].uiLength() - 1, 1) == L"<") { iStressPos = 0; } // Write the ending and its grammatical meaning // to the temporary "endings table" no. i_s arr_m_Endings[iS].iAddEnding(arr_iHash[iWf], sEnding, iStressPos); break; } } } // Write the "endings tables" to the db if necessary; // get their subtable_id's for (int iS = 0; iS < iStems; ++iS) { arr_iSubtableId[iS] = arr_m_Endings[iS].iDbWrite(vecDb); } // Add the stems with links to the corresponding subtables to the db vInsertStemsAndLinks(parr_sStems, OLE2W(bstrLemma), arr_iSubtableId, iStems, llLexemeId); // Delete the arrays for (int i_ = 0; i_ < iStems; ++i_) { arr_m_Endings[i_].~CEndingsTable(); } delete[] arr_sParadigm; delete[] arr_iHash; delete[] arr_iSubtableId; delete[] (*parr_sStems); delete parr_sStems; // Commit transactions approximately every 200 entries if (llLexemeId % 200 == 0) { m_pDb->CommitTransaction(); m_pDb->BeginTransaction(); } } catch (...) { ERROR_LOG (L"Exception thrown."); //return E_FAIL; continue; } } // for (llLexemeId = llStart; llLexemeId <= llEnd; ++llLexemeId)... m_pDb->CommitTransaction(); m_pDb->BeginTransaction(); for (int iTable = iDbSize; iTable < vecDb.size(); ++iTable) { vecDb[iTable].iDbWrite(m_pDb, false, iTable); } m_pDb->CommitTransaction(); iDbSize = vecDb.size(); sp_dict->Clear(); CoUninitialize(); return H_NO_ERROR; } // PrepareLexemes(__int64 ll_start, __int64 ll_end)