Search code examples
mapioutlook-redemption

Is it possible (and how) to make an RDOMail object wrap a MAPI IMessage object?


I am working to create a plugin for some application using C++. The application would provide me MAPI messages and gives me a chance to work on them. The application gives me the MAPI messages as pointers to the IMessage interface.

I am used to working with MAPI messages using the Outlook Redemption library mainly with C#. But in this case, I always get an RDOMail object when I open messages (not IMessage objects).

I was wondering if it is possible to use the RDOMail object in Outlook Redemption to wrap an existing message that I have a pointer to (the IMessage object).

The RDOMail interface has a MAPIOBJECT property that returns the underlying MAPI object. However, this property is read-only.

Is there a way to wrap a MAPI message using Outlook Redemption using the IMessage pointer?


Solution

  • Sure, you can pass IMessage interface to RDOSession.GetRDOObjectFromOutlookObject.