This is a dll plugin.
Written in C++ using Visual Studio 2005.
I will have to run some tests to see if it is related to a particular
message or messages.
CComPtr<OESTORE::IOEMessage> m_spIOEMsg;
HRESULT CSBOEPlugIn::OnCurrentMessageChanged(long nMsgId)
{
HRESULT hr = S_OK;
if (m_pIEScanner && nMsgId != -1)
{
CComPtr<OESTORE::IOEFolder> spIFolder;
long nFolderId = 0;
hr = m_spIOEApi->GetSelectedFolderID(&nFolderId );
if (SUCCEEDED(hr))
{
if (m_spIFolderMgr != NULL)
hr = m_spIFolderMgr->GetFolder(nFolderId , &spIFolder);
if (SUCCEEDED(hr) && (spIFolder != NULL))
{
COEMailItem emailItem(spIFolder, nMsgId);
m_pIEScanner->ScanNow(&emailItem);
}
}
}
return hr;
}
COEMailItem::COEMailItem(OESTORE::IOEFolder *pIFolder, long nMsgId)
{
if (NULL != pIFolder)
{
HRESULT hr = pIFolder->OEGetMessage(nMsgId, &m_spIOEMsg);
if (FAILED(hr))
{
m_spIOEMsg = NULL;
CAtlString sMsg;
sMsg.Format(L"Get Message failed. 0x%x", hr);
SBLOG(SBLogger_LogLevelError, __WFUNCTION__, sMsg);
}
}
}
CComBSTR COEMailItem::GetMessageSource()
{
CComBSTR bstrVal;
if (m_spIOEMsg)
{
HRESULT hr = m_spIOEMsg->GetAllSource(&bstrVal);
if (FAILED(hr))
{
bstrVal.Empty();
CAtlString sMsg;
sMsg.Format(L"GetAllSource Failed. 0x%x", hr);
SBLOG(SBLogger_LogLevelError, __WFUNCTION__, sMsg);
}
else
{
CAtlString sMsg;
sMsg.Format(L"GetMessageSource. (%s)", bstrVal);
SBLOG(SBLogger_LogLevelTrace, __WFUNCTION__, sMsg);
if(!bstrVal.Length())
{
// it's EMPTY! try getting just the text body
bstrVal = GetTextBody();
sMsg.Format(L"GetMessageSource was empty trying to use the
TextBody instead. (%s)", bstrVal);
SBLOG(SBLogger_LogLevelTrace, __WFUNCTION__, sMsg);
}
}
}
return bstrVal;
}
On Oct 8, 10:01 am, Nektra OEAPI Support <
oeapi-supp...@nektra.com>
wrote: