views:

217

answers:

1

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**

+1  A: 

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.

Alejandro Bologna