BSTR STDMETHODCALLTYPE TDocFracLibImpl::StringConvert() { std::string Temp; BSTR Result; try { Temp = DoxCore->StringConvert(); Result = StringToBSTR(Temp); return Result; } catch(Exception &e) { return StringToBSTR("Error"); } };
HRESULT DirectoryEnumerator::Next(BSTR* outName, DirectoryItemType* outType) { if (_pos >= _cachedItems.size()) { return E_FAIL; } if (outName) { std::string& sName = _cachedItems[_pos].first; *outName = StringToBSTR(sName); } if (outType) { DirectoryItemType type = _cachedItems[_pos].second; *outType = type; } return S_OK; }