为 MAPI-MIME 转换创建 IDL

发布于 2024-07-04 18:29:32 字数 538 浏览 6 评论 0原文

我正在尝试为 IConverterSession 接口创建 IDL,但我对 MIMETOMAPI 方法。 它将 LPMESSAGE pmsg 参数指定为 [out],但注释指出它是指向要加载的 MAPI 消息的指针。

我不清楚这些函数是否分配 MAPI 消息对象并设置指针,在这种情况下它不应该是指向 MESSAGE 指针的指针吗? 或者调用代码是否期望已实例化消息对象,在这种情况下为什么标记为 [out] 而不是 [in]?

最终这个接口是从 VB6 代码中使用的,所以它必须是 [in] 或 [in, out] 但我确实需要知道是否在我使用的 IDL 中:-

[in] IMessage pmsg* 

或者

[in, out] IMessage pmsg**

I'm trying to create the IDL for the IConverterSession interface and I'm confused by the definition of the MIMETOMAPI method. It specifies the LPMESSAGE pmsg parameter as [out] yet the comments state its the pointer to the MAPI message to be loaded.

Its unclear to me whether the functions allocates the MAPI message object and sets the pointer in which case shouldn't it be a pointer to a pointer of MESSAGE? OR is the calling code expected to have instanced the message object already in which case why is marked [out] and not [in]?

Utlitmately this interface is to be consumed from VB6 code so it will either have to be [in] or [in, out] but I do need to know whether in the the IDL I used:-

[in] IMessage pmsg* 

OR

[in, out] IMessage pmsg**

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

抱猫软卧 2024-07-11 18:29:32

请参阅 MFCMapi 源 (http://mfcmapi.codeplex.com/) 中的 MAPIMime.h 作为权威源。

See MAPIMime.h from MFCMapi source (http://mfcmapi.codeplex.com/) as a definitive source.

九命猫 2024-07-11 18:29:32

正确的文档可以在这里找到:https: //learn.microsoft.com/en-us/office/client-developer/outlook/mapi/iconvertersession-mimetomapi。 调用者必须提供一条消息供 API 填写,因此该对象必须进入[in]。

The correct documentation can be found here: https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/iconvertersession-mimetomapi. The caller must supply a message for the API to fill out, so the object must go [in].

海未深 2024-07-11 18:29:32

我认为在这种情况下,文档将参数标记为 [out] 时具有误导性。 您必须将有效的 LPMESSAGE 传递给该方法,这就是它不是双指针的原因。 所以我会选择 [in] 你的 idl 定义。

I think in this case the documentation is misleading when it marks the parameter as [out]. You have to pass a valid LPMESSAGE to the method, and that's why is not a double pointer. So i would go with [in] on your idl definition.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文