S
Scott McFadden
I used Microsoft's IConverterSession->MAPIToMIMEStm (exposed by Outlook
2003) to save an MSG into EML / RFC822 format.
I then turned around and tried to convert the eml file back to a MAPI MSG /
LPMESSAGE using the reverse call of IConverterSession->MIMEToMAPI.
When I invoke the MIMEtoMAPI call I get an Access Violation reading location
0.x00000000. Has anyone else had any luck using MAPIToMimeStrm?
Here is a code snippet of what I am doing:
hr = OpenStreamOnFile(MAPIAllocateBuffer, MAPIFreeBuffer, STGM_READ,
inMimeFile, NULL, &pMimeStream);
_ASSERTE(SUCCEEDED(hr));
hr=CoCreateInstance(CLSID_IConverterSession, NULL, CLSCTX_INPROC_SERVER,
IID_IConverterSession, (void **) &pConverterSession);
_ASSERTE(SUCCEEDED(hr));
pConverterSession->SetEncoding(IET_QP);
pConverterSession->SetSaveFormat(SAVE_RFC822);
hr = pConverterSession->MIMEToMAPI(pMimeStream, lpMessage , NULL, CCSF_SMTP
| CCSF_INCLUDE_BCC); <--access violation error ocurrs here
_ASSERTE(SUCCEEDED(hr));
scott
2003) to save an MSG into EML / RFC822 format.
I then turned around and tried to convert the eml file back to a MAPI MSG /
LPMESSAGE using the reverse call of IConverterSession->MIMEToMAPI.
When I invoke the MIMEtoMAPI call I get an Access Violation reading location
0.x00000000. Has anyone else had any luck using MAPIToMimeStrm?
Here is a code snippet of what I am doing:
hr = OpenStreamOnFile(MAPIAllocateBuffer, MAPIFreeBuffer, STGM_READ,
inMimeFile, NULL, &pMimeStream);
_ASSERTE(SUCCEEDED(hr));
hr=CoCreateInstance(CLSID_IConverterSession, NULL, CLSCTX_INPROC_SERVER,
IID_IConverterSession, (void **) &pConverterSession);
_ASSERTE(SUCCEEDED(hr));
pConverterSession->SetEncoding(IET_QP);
pConverterSession->SetSaveFormat(SAVE_RFC822);
hr = pConverterSession->MIMEToMAPI(pMimeStream, lpMessage , NULL, CCSF_SMTP
| CCSF_INCLUDE_BCC); <--access violation error ocurrs here
_ASSERTE(SUCCEEDED(hr));
scott