What does the "PR_INTERNET_CONTENT" property mean

Apr 23, 2009 at 3:21 AM
  My application converts emails in a PST file into a .eml (MIME message) file. It crashes when IConverterSession::MAPIToMIMEStm call is made with a 




Access violation reading location 0x00000000

The message class of the email is REPORT.IPM.Schedule.Meeting.Resp.Neg.IPNNRN .

I wanted to check if the same problem occurs when using MFCMAPI's "save as eml" functionality. However, MfcMapi does not convert emails whose PR_INTERNET_CONTENT property is not set - which was the case for this email.

1. When & why is this property set ?
2. Does the absence of this  property indicate that the  IConverterSession::MAPIToMIMEStm call will fail ?

Any help is greatly appreciated.

Thank you
Apr 23, 2009 at 1:43 PM
MFCMAPI has two functions to get an EML file from a message. The one you tried, "EML file (using PR_INTERNET_CONTENT)"asks the server for PR_INTERNET_CONTENT. This can only work with Exchange 2000 and 2003 and only if the message has not undergone full conversion from MIME to MAPI. If the message is still natively a MIME message in the streaming store, requesting PR_INTERNET_CONTENT asks the store to fetch that MIME message and return it. No conversion takes place.

The other function MFCMAPI has, and the one you intended to test, uses IConverterSession. Access this one with "EML file (using IConverterSession)". This crash will repro with MFCMAPI as well. It's a known issue with MAPIToMIMEStm that was just recently reported. We're working on a hotfix for it.
Apr 23, 2009 at 9:12 PM

Thanks for the prompt response.

1. I was using an older version of MFCMapi, which did not have the EML file (using IConverterSession)" option. I did try the option in the latest build - I was able to reproduce the crash.
2. Regarding the hotfix
  - Will the hotfix be provided for both Outlook 2007 & 2003 or just the latest version ?
  - Whats the time frame for the hotfix release ? Whats the best way to find out about the hotfix release time in case the time hasnt been decided yet.

3. In the the mfcmapi src, MapiMime.cpp, ExportIMessageToEML method - the IConverterSession::MAPIToMIMEStm is given an in-memory stream to hold the mime message. This stream is then copied to the file backed stream. Is there a reason why this is done ? Why not use the file stream in MAPIToMIMEStm call directly ?

Thank you

Apr 23, 2009 at 9:16 PM
1 - Cool.
2 - 2007 for sure, not certain if the fix will be ported back to 2003. Look for this months cumulative rollup for 2007.
3 - I don't recall why I did it that way.