![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
Does lpMessage point to a valid IMessage object?
You can play with IConverterSession in OutlookSpy (click Misc | IConverterSession). Do you get an access violation there? BTW, the best place to ask your Extended MAPI questions is the microsoft.public.win32.programmer.messaging newsgroup. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Scott McFadden" wrote in message ... 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 |
#3
|
|||
|
|||
![]()
Thanks for the tip. I wasn't aware that I had to pass a instantiated
IMessage (figured it was an output parm that gave you an instantiated IMessage). Now I just need to figure out how to create a new empty / disconnected IMessage on the fly. The end goal is to convert the eml to a standalone mapi msg file on the file system. thanks Dmitry "Dmitry Streblechenko" wrote in message ... Does lpMessage point to a valid IMessage object? You can play with IConverterSession in OutlookSpy (click Misc | IConverterSession). Do you get an access violation there? BTW, the best place to ask your Extended MAPI questions is the microsoft.public.win32.programmer.messaging newsgroup. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Scott McFadden" wrote in message ... 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 |
#4
|
|||
|
|||
![]()
You can easily create IMessage on top of an MSG file (an existing or a newly
created one) - Google OpenIMsgOnIStg for numerous code snippets. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Scott McFadden" wrote in message ... Thanks for the tip. I wasn't aware that I had to pass a instantiated IMessage (figured it was an output parm that gave you an instantiated IMessage). Now I just need to figure out how to create a new empty / disconnected IMessage on the fly. The end goal is to convert the eml to a standalone mapi msg file on the file system. thanks Dmitry "Dmitry Streblechenko" wrote in message ... Does lpMessage point to a valid IMessage object? You can play with IConverterSession in OutlookSpy (click Misc | IConverterSession). Do you get an access violation there? BTW, the best place to ask your Extended MAPI questions is the microsoft.public.win32.programmer.messaging newsgroup. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Scott McFadden" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
IConverterSession::MIMEToMAPI | Scott McFadden | Outlook - General Queries | 2 | March 25th 06 09:34 AM |