Extended Mapi!

D

Dmitry Streblechenko

You can sure try... But why would you want to? VB is a tool, and the tool
must be selected based on the task, not the other way around when the task
is modified to fit the tool.

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

Hans

You can sure try... But why would you want to?
Because many people know how to program in VB but has no skills in
Delphi/C++.



I'm not trying to do anything particular here I'm just curious. I have used
your redemption component for a couple of years and that probably saved me a
lot of time but when asked by a colleague why extended mapi cannot be used
from VB I could not give an answer.



I have seen many answers to this question and most of them say it is
impossible but I have not found an answer why it is impossible. I suspect
that there are complex datastructures that cannot be handled by VB but I'm
not sure. Maybe it is a myth that it cannot be accessed from VB?


Regards
/Hans
 
V

Vladimir Chtchetkine

Complex data structures and "raw" pointers is just a side-effect of the fact
that MAPI is COM-based and not Automation-compatible. If you look at
declarations of MAPI interfaces you will see that they are IUnknown-derived
and not IDispatch-derived. This means that there is no way you can bind to
those interfaces in runtime. You have to compile and link your code using
headers/libs in order to bind to MAPI API. What you can do though is to
write an automation-compatible wrapper around each MAPI interface / each
MAPI data structure and use it from VB... But it's easier to learn
C++/Delphy :)
 
D

Dmitry Streblechenko

Actually you can have IUnknown-derived interfaces described in a type
library and VB can use them just fine, but the MAPI data structures are the
problem. They cannot be defined in a type library, and I am not sure they
can be defined in VB code either.

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

Hans

Thanks Vladimir and Dmitry!

Well I guess I have to start coding Delphi again. Have not been working with
Delphi since 16-bit Delphi 1.0 (like Delphi more than C++)!

Regards
/Hans
 

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