如何从MAPI Imessage中检索内容类型(How to retrieve content type from a MAPI Imessage)

系统教程 行业动态 更新时间:2024-06-14 17:02:18
如何从MAPI Imessage中检索内容类型(How to retrieve content type from a MAPI Imessage)

我是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.

更多推荐

本文发布于:2023-04-21 18:45:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/9d572549530fc40d347a40dafaac3046.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:类型   内容   Imessage   MAPI   content

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!