Could not retrieve IMessage: Interface not supported

J

Jeff

On some of my customers' machines, I'm receiving the following error
when my code accesses the SafeMailItem.Recipients property:

"Could not retrieve IMessage: Interface not supported"

I'm using Redemption 4.3 via late binding and registration-free COM.

Any ideas?

Thanks,
Jeff
 
D

Dmitry Streblechenko

Do you by any chnace have both Exchange Server and Outlook on the same
machine?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
J

Jeff

I presume not, but I will double check. Also, I believe that we are
using Redemption 4.7, not 4.3 as I wrote in my original post.

The customer ran the Repair feature of Outlook 2007's installer, and
that did not help. It seems that all of our Outlook COM and Redemption
code works, except the Recipients property.

We installed a previous version of our product that uses a 2006-era
version of Redemption, and the errors went away.

We were able to duplicate the error message on a test machine by
installing Outlook 2007, then installing Outlook 2003, and then un-
installing Outlook 2003. The error went away once we Repaired Outlook
2007.
 
D

Dmitry Streblechenko

Yes, that is a strong indication that you have 2 versions of MAPI
installed - MailItem.MAPIOBJECT marshaling from the outlook.exe address
space to your app is done by the version of MAPI loaded by Outlook, while it
gets unmarshalled by another version of MAPI loaded by Redemption in your
app address space.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
I presume not, but I will double check. Also, I believe that we are
using Redemption 4.7, not 4.3 as I wrote in my original post.

The customer ran the Repair feature of Outlook 2007's installer, and
that did not help. It seems that all of our Outlook COM and Redemption
code works, except the Recipients property.

We installed a previous version of our product that uses a 2006-era
version of Redemption, and the errors went away.

We were able to duplicate the error message on a test machine by
installing Outlook 2007, then installing Outlook 2003, and then un-
installing Outlook 2003. The error went away once we Repaired Outlook
2007.
 
J

Jeff

Yes, that is a strong indication that you have 2 versions of MAPI
installed - MailItem.MAPIOBJECT marshaling from the outlook.exe address
space to your app is done by the version of MAPI loaded by Outlook, whileit
gets unmarshalled by another version of MAPI loaded by Redemption in your
app address space.

--
Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

I presume not, but I will double check. Also, I believe that we are
using Redemption 4.7, not 4.3 as I wrote in my original post.

The customer ran the Repair feature of Outlook 2007's installer, and
that did not help. It seems that all of our Outlook COM and Redemption
code works, except the Recipients property.

We installed a previous version of our product that uses a 2006-era
version of Redemption, and the errors went away.

We were able to duplicate the error message on a test machine by
installing Outlook 2007, then installing Outlook 2003, and then un-
installing Outlook 2003. The error went away once we Repaired Outlook
2007.

We've also been able to duplicate the error message by setting the
default mail client to be Outlook Express instead of Outlook 2007. I
suspect that is the cause of the issue that our customer is
experiencing, as they do have Outlook Express set to be the default
mail client for reasons I won't get in to.

If you have any suggestions based on that information, let me know. I
wanted to post this in case it helps some one else in the future.

Thanks,
Jeff

Are
 
J

Jeff

I have a couple more findings that I want to share w/ everyone.

1)
Something in Redemption.dll changed between v3.4 and v4.5 that causes
my original issue. Simply by switching to different versions of my
custom Redemption dll, I was able to make the issue appear and
disappear.


2)
The solution to this issue is to add Redemption.dll (or your
customized Redemption dll name) to the following registry key:

Parent registry key name:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Messaging Subsystem
\MSMapiApps

New key Name:
Redemption.dll (or your customized Redemption dll name)

New key Data:
"Microsoft Outlook"

This will tell Windows to route all extended mapi calls coming from
any process that has Redeption.dll loaded into memory to use the
extended mapi routing information found at the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Microsoft Outlook

My original problem was caused by Redemption's extended mapi calls to
be routed to Outlook Express and not Outlook. Older version of
Redemption seems to be unaffected by this.

See the following for mapi call routing details:

Explicitly Mapping MAPI Calls to MAPI DLLs
http://msdn.microsoft.com/en-us/library/dd162405.aspx

Mapi32.dll Stub Registry Settings
http://msdn.microsoft.com/en-us/library/dd162409.aspx


Note that this issue only happens if Outlook 2007 is installed and
Outlook Express is set to be the default mail client. Also note that
I'm not registering (via regsvr32.exe) my custom Redemption dll, I'm
using registration free COM.

Does anyone know which installer is responsible for maintaining
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Messaging Subsystem
\MSMapiApps ?

Thanks,
jb
 
J

Jeff

I have a couple more findings that I want to share w/ everyone.

1)
Something in Redemption.dll changed between v3.4 and v4.5 that causes
my original issue. Simply by switching to different versions of my
custom Redemption dll, I was able to make the issue appear and
disappear.

2)
The solution to this issue is to add Redemption.dll (or your
customized Redemption dll name) to the following registry key:

Parent registry key name:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Messaging Subsystem
\MSMapiApps

New key Name:
Redemption.dll (or your customized Redemption dll name)

New key Data:
"Microsoft Outlook"

This will tell Windows to route all extended mapi calls coming from
any process that has Redeption.dll loaded into memory to use the
extended mapi routing information found at the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Microsoft Outlook

My original problem was caused by Redemption's extended mapi calls to
be routed to Outlook Express and not Outlook. Older version of
Redemption seems to be unaffected by this.

See the following for mapi call routing details:

Explicitly Mapping MAPI Calls to MAPI DLLshttp://msdn.microsoft.com/en-us/library/dd162405.aspx

Mapi32.dll Stub Registry Settingshttp://msdn.microsoft.com/en-us/library/dd162409.aspx

Note that this issue only happens if Outlook 2007 is installed and
Outlook Express is set to be the default mail client. Also note that
I'm not registering (via regsvr32.exe) my custom Redemption dll, I'm
using registration free COM.

Does anyone know which installer is responsible for maintaining
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Messaging Subsystem
\MSMapiApps ?

Thanks,
jb

I see that the issue i just described is listed on Dmitry's FAQ as
item number 7:

http://www.dimastr.com/redemption/faq.htm#7
 
D

Dmitry Streblechenko

Actually AFAIK MSMapiApps registry key handles only executables, not dlls.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
I have a couple more findings that I want to share w/ everyone.

1)
Something in Redemption.dll changed between v3.4 and v4.5 that causes
my original issue. Simply by switching to different versions of my
custom Redemption dll, I was able to make the issue appear and
disappear.

2)
The solution to this issue is to add Redemption.dll (or your
customized Redemption dll name) to the following registry key:

Parent registry key name:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Messaging Subsystem
\MSMapiApps

New key Name:
Redemption.dll (or your customized Redemption dll name)

New key Data:
"Microsoft Outlook"

This will tell Windows to route all extended mapi calls coming from
any process that has Redeption.dll loaded into memory to use the
extended mapi routing information found at the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Microsoft Outlook

My original problem was caused by Redemption's extended mapi calls to
be routed to Outlook Express and not Outlook. Older version of
Redemption seems to be unaffected by this.

See the following for mapi call routing details:

Explicitly Mapping MAPI Calls to MAPI
DLLshttp://msdn.microsoft.com/en-us/library/dd162405.aspx

Mapi32.dll Stub Registry
Settingshttp://msdn.microsoft.com/en-us/library/dd162409.aspx

Note that this issue only happens if Outlook 2007 is installed and
Outlook Express is set to be the default mail client. Also note that
I'm not registering (via regsvr32.exe) my custom Redemption dll, I'm
using registration free COM.

Does anyone know which installer is responsible for maintaining
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Messaging Subsystem
\MSMapiApps ?

Thanks,
jb

I see that the issue i just described is listed on Dmitry's FAQ as
item number 7:

http://www.dimastr.com/redemption/faq.htm#7
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top