MAPI with .Net

  • Thread starter Thread starter Dave Waldman
  • Start date Start date
D

Dave Waldman

Does anyone know why MAPI is not supported in .Net? I'm trying to traverse
a mailbox into folder/file format keeping links in place. I've written some
code using MAPI and CDO as well as a version using Outlook objects. If
anyone has information relating to this topic please let me know.

Many Thanks,
Dave
 
Hi Dave,

Dave Waldman said:
Does anyone know why MAPI is not supported in .Net? I'm trying to traverse
a mailbox into folder/file format keeping links in place. I've written some
code using MAPI and CDO as well as a version using Outlook objects. If
anyone has information relating to this topic please let me know.

With CDO (1.21) you will have to make sure that you are using STA threads
otherwise you will get into COM apartment trouble. Also CDO as being quite
IDispatch and VARIANT oriented is not too nice to use via Interop.

When it comes to MAPI - hmm, I think nobody has worked through mapping all
the data structures to managed types which tends to be quite some manual
work as there is no typelib for MAPI.

I think you might end up in Managed C++ or the upcoming CLI/C++ to wrap MAPI
in managed types like CDO does it for COM clients. As this is a complex task
Microsoft seems to protect itself from supporting such work ;)

Bye,
SvenC
 
Thanks

Sven Carstensen said:
Hi Dave,



With CDO (1.21) you will have to make sure that you are using STA threads
otherwise you will get into COM apartment trouble. Also CDO as being quite
IDispatch and VARIANT oriented is not too nice to use via Interop.

When it comes to MAPI - hmm, I think nobody has worked through mapping all
the data structures to managed types which tends to be quite some manual
work as there is no typelib for MAPI.

I think you might end up in Managed C++ or the upcoming CLI/C++ to wrap MAPI
in managed types like CDO does it for COM clients. As this is a complex task
Microsoft seems to protect itself from supporting such work ;)

Bye,
SvenC
 
There is someone doing a lot of work on exposing MAPI to .NET.
He claims, that he will do all of it.
Although not complete, the current version of this is quite good.
The control is called MAPI33, You can find it at:

http://www.mapi33.freeservers.com/
 
Back
Top