MAPI_E_CALL_FAILED for my own implementation of MAPI

Mar 2, 2010 at 12:14 PM



I'm trying to write my own version of MAPI which allows us to support the Mork addressbook format.


i have few questions:


1. can i replace the C:\Program Files\Microsoft Office\Office12\OLMAPI32.DLL the office outlook mapi with my own version of mapi so that the programs can access thunderbird address book using my mapi version?

2. when i try to replace the C:\Program Files\Microsoft Office\Office12\OLMAPI32.DLL and try to test the dll usin mfcmapi then on MAPIInitialize call it return the error MAPI_E_CALL_FAILED. what could be the reason?

Thanks and Regards


Mar 2, 2010 at 1:44 PM

Replacing MAPI is absolutely the wrong approach here. What you need to do is to implement an address book provider. I suggest starting with this one:

Mar 2, 2010 at 1:50 PM



i know my approach is wrong. ideally we should develop the address book provider. but the situation is something like this:


we have a already stable application and we don;t want to make any changes into it. it is capable of reading the mapi address book. what we want to do is replace the current default mapi which is reading the outlook address book with our mapi which will read thunderbird address book. Please give me some direction.





Mar 2, 2010 at 1:51 PM

i know this is not at all a good solution but business people need something like this. so i'm trying to solve this problem using this method.

Mar 2, 2010 at 1:59 PM

You're not taking the simpler or quicker route here. You're taking an insanely complicated route which is ultimately doomed to failure. MAPI doesn't know the first thing about reading address books, so replacing MAPI will never get you what you want. MAPI is a pluggable architecture. If you want to access an address book through MAPI, you have to build an address book provider for MAPI to call in to.


Mar 2, 2010 at 3:00 PM

but if i;ve developed mapi address book provider do i have to change my application to initialize that address book provider?

Mar 2, 2010 at 3:04 PM

An address book provider is just a means of providing data from some data source over to MAPI. In the sample's case, this data source is a file. In your case, the data source would be your mork thing (file?). I don't see where your application would be involved.

Mar 2, 2010 at 3:07 PM

i have application that displays various address books like outlook express and ms office address books. and our own address book format.

now we want to replace ms outlook with thunderbird. and we can change the application due to the business people;s resriction. so we decided to rewrite the mapi and replace the default mapi via installer.

Mar 2, 2010 at 3:15 PM

If you're taking Outlook off the box and replacing it with thunderbird, then MAPI shouldn't even be part of the equation.

Mar 2, 2010 at 3:17 PM

but my application is mapi compatible so i'm implementing the mapi with mork address book capabilities (file).