我是MAPI编程的新手。 我正在尝试检查MAPI Imessage(c ++ IUnknown对象)是否已加密,如果我手头有mime,我将检查内容类型,但要在MAPI IMessage对象中检查什么? 我见过PR_X400_CONTENT_TYPE属性,我不确定这是否是所需的属性,因为我无法使用IMessage :: GetProps函数获取它。 我尝试使用以下代码:
SizedSPropTagArray(9, mcols) = { 9, { PR_MESSAGE_CLASS, PR_SENDER_NAME, PR_SENDER_EMAIL_ADDRESS, PR_RTF_IN_SYNC, PR_RECEIVED_BY_EMAIL_ADDRESS, PR_RECEIVED_BY_NAME, PR_RECEIVED_BY_ENTRYID, PR_TRANSPORT_MESSAGE_HEADERS, PR_X400_CONTENT_TYPE } }; ULONG pcount; SPropValue *props = 0; HRESULT hr; hr = message->GetProps((SPropTagArray*)&mcols, 0, &pcount, &props); if (props[8].ulPropTag == PR_X400_CONTENT_TYPE) { // not going here }但它没有归还这个特定的财产。 提前致谢。
i am new to MAPI programming. i am trying to check if a MAPI Imessage (c++ IUnknown object) is encrypted or not, if i have a mime in hand i will check for the content type, but what to check for in MAPI IMessage object? i have seen PR_X400_CONTENT_TYPE property, i am not sure if this is the desired property, because i am not able to get it using IMessage::GetProps function. i tried using the following code:
SizedSPropTagArray(9, mcols) = { 9, { PR_MESSAGE_CLASS, PR_SENDER_NAME, PR_SENDER_EMAIL_ADDRESS, PR_RTF_IN_SYNC, PR_RECEIVED_BY_EMAIL_ADDRESS, PR_RECEIVED_BY_NAME, PR_RECEIVED_BY_ENTRYID, PR_TRANSPORT_MESSAGE_HEADERS, PR_X400_CONTENT_TYPE } }; ULONG pcount; SPropValue *props = 0; HRESULT hr; hr = message->GetProps((SPropTagArray*)&mcols, 0, &pcount, &props); if (props[8].ulPropTag == PR_X400_CONTENT_TYPE) { // not going here }but its not returning this specific property. thanks in advance.
最满意答案
MAPI不存储内容类型,因为MIME不是MAPI的本机存储。 使用PR_MESSAGE_CLASS属性 - 签名消息的IPM.NOTE.SMIME.MultipartSigned。*和加密消息的IPM.NOTE.SMIME。*。
MAPI does not store the content type since MIME is not a native storage for MAPI. Use the PR_MESSAGE_CLASS property - it will be IPM.NOTE.SMIME.MultipartSigned.* for the signed messages and IPM.NOTE.SMIME.* for the encrypted messages.
更多推荐
发布评论