The files are very helpful! Thanks a lot.
One problem still leaves me in confusion. If I use dlltool command to
create a library using the Netscape implementation of MAPI32.dll,
machines using Microsoft Outlook as the default e-mail client may
complain. Now if I use the Outlook implementation of MAPI32.dll and run
it on a machine with Netscape Messenger as its default e-mail client,
the program will crash! Is there a particular version of MAPI32.dll
that is relatively robust?
John Fattaruso wrote:
> About two years ago I ran into this same problem with mapi.h missing. I
> corresponded on this list with Mumit about proper 'clean room' techniques,
> and put together a first cut at a working mapi.h. I had emailed it to
> Mumit, but his time suddenly got scarce and I never saw anything of it
> later. FWIW, here is my original email, and attached are the files if they
> are of use to you....
> > Hello Mumit:
> > I've finished off what work I can do on the mapi.h header,
> > so I'll hand it off to you. Attached find mapi.h, mapi32.def and two
> > test C programs. They work fine in a console window of Win95 using
> > Netscape as a MAPI server. testmapi1.c posts a simple email message
> > (with hard coded recipients, both ending up to me), and testmapi2.c
> > reads the first message in the Inbox.
> > I assembled the structures and prototypes in mapi.h from various
> > documentation web pages at MS, and all the constants I got from a sample
> > VB program they posted. For some reason they had left out
> > MAPI_LONG_MSGID, so I did a web search and found some code posted by a
> > Spanish speaking virus author that had it defined, and I hope it is
> > correct. Bear in mind that this is a header for the 'Simple MAPI'
> > collection of functions. I think the functions in 'Extended MAPI' take
> > mapix.h as a header.
> > I don't know what is in the libmapi32.a library in MinGW, but when I
> > linked my test code against it, it still reported all the MAPI functions
> > as undefined. So I rolled my own import library with the attached
> > mapi32.def file running:
> > dlltool --dllname mapi32.dll --def mapi32.def --output-lib
> > libmapi32jf.a -k
> > and then compiled with:
> > gcc -Wall -L. testmapi1.c -lmapi32jf