CRC of SYNC_BODY in Outlook Message

F

Frank Sconzo

Hi,

Anyone know how Microsoft Outlook generates the CRC for message body
text in the TNEF msmail.dat rich-text attachment? I don't have access
to MAPI functions because the message is being generated on a non-MS
platform.

The problem I have is generating the value for the MAPI property
PR_RTF_SYNC_BODY_CRC. The msdn website doco has only this to say about
the CRC: The PR_RTF_SYNC_BODY_CRC property contains the cyclical
redundancy check (CRC) computed for the message text. The RTFSync
function computes the CRC using only the characters that it considers
to be significant to the message. For example, some white space and
other ignorable characters are omitted from the CRC.
http://msdn.microsoft.com/library/en-us/mapi/html/_mapi1book_pr_rtf_sync_body_crc.asp


For testing purposes, I sent a mail message from Outlook containing
only four characters in the message body (just to keep things simple).
The rich text version of the message body just contains the four
characters ABCD in italic. I believe the body text
(PR_RTF_SYNC_BODY_TAG_A) is supposed to represent a stripped version
of the PR_RTF_COMPRESSED value, and I believe this is the field the
CRC is computed from.

The CRC for these four characters, according to the
PR_RTF_SYNC_BODY_CRC property in the attachment Outlook generated, is:
b9 ff 53 fa

But when I try to generate the CRC from the same four characters, I
get:
db 17 20 a5

Anyone know how the CRC is computed by Outlook?

I've tried CRC16 in desperation, but it really must be CRC32 since the
CRC value is 32 bits. I assumed the defaults for CRC32, but that's not
working:
Generator polynomial: 0x04C11DB7
Initial remainder: 0xFFFFFFFF
Final XOR: 0xFFFFFFFF
Width: 32 bits

Perhaps the CRC is computed on some field other than
PR_RTF_SYNC_BODY_TAG_A? I tried the PR_RTF_COMPRESSED value, but that
didn't match either.

Thanks in advance.
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top