mapi.MAPIInitialize((mapi.MAPI_INIT_VERSION,
mapi.MAPI_MULTITHREAD_NOTIFICATIONS))
I've also tried not passing any args and not passing
MAPI_MULTITHREAD_NOTIFICATIONS.
I've read about two possible causes for this issue:
* The user does not use Outlook as the default mail app. I get around
this issue by inserting my app into HKEY_LOCAL_MACHINE\SOFTWARE
\Microsoft\Windows Messaging Subsystem\MSMapiApps and specified a
value of "Microsoft Outlook". I tested on my machine and verified that
this fixes the error when Outlook is not the default. I also call
FIXMAPI.exe in my software before initializing MAPI to ensure that the
user has the stub dll installed properly.
* The user is using Outlook in Internet Mail Only mode. I'm not sure
how to detect this condition since I don't know which API to use to
detect the mode, although I don't think this can be responsible for
the high percentage of failures I'm seeing (esp. since Outlook 2003+
users are failing and my understanding is that those versions don't
have this mode).
Does anyone know of any other reason why MAPIInitialize might return
this error for so many users (most of whom are on WinXP, SP2)? Thanks
very much.
Mark
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
<mtim...@gmail.com> wrote in message
news:1193545557.5...@k35g2000prh.googlegroups.com...
On Oct 27, 11:34 pm, "Dmitry Streblechenko" <dmi...@dimastr.com>
wrote:
> Most likely you are loading the mapi32.dll library installed by OE in the
> system32 folder instead of loading the Outlook version of the dll
> (msmapi32.dll) from Program Files.
>
> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> <mtimo...@gmail.com> wrote in message
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
<mtim...@gmail.com> wrote in message
news:1193553514.9...@q3g2000prf.googlegroups.com...
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"blakeross" <blak...@gmail.com> wrote in message
news:1193601565....@e9g2000prf.googlegroups.com...
>I don't know how to verify that MAPIInitialize is actually calling
> through the correct stub, but I do verify that the dll loaded by
> LoadLibrary("MAPI32.DLL") is the stub (by virtue of the existence of
> the GetOutlookVersion function, which indicates the stub according to
> MSDN). Is that sufficient to verify that the stub is being used? (I
> also do call FIXMAPI first.)
>
> I've further verified that my registry value is correctly placed under
> the MSMapiApps key and that the Microsoft Outlook key does exist under
> Clients\Mail with a DLLPathEx value. Further, I've verified that the
> DLL specified by this value (usually "C:\Program Files\Common Files
> \SYSTEM\MSMAPI\1033\msmapi32.dll") is in fact loaded into the
> customer's process after MAPIInitialize fails. I've also tried adding
> the NO_COINIT flag since I CoInitialize myself before MAPIInitialize
> as a single-threaded apartment. Can you think of anything else to try
> here?
>
> Thanks a lot.
> Mark
>
> On Oct 28, 8:33 am, "Dmitry Streblechenko" <dmi...@dimastr.com> wrote:
>> *If* you end up calling the stub: other mail clients can be replacing
>> mapi32.dll with their own versions.
>> fixmapi.exe restores the stub dll.
>>
Separately, many of my customers fail the MAPIInitialize call, and
when I examine their registry, they don't have a Microsoft Outlook key
under Clients\Mail. (Note that my question above concerns the case
where it fails even when this key DOES exist.) Assuming they have
Outlook installed, is there anything that would cause this beyond
random registry corruption? And is there any good fix?
On Oct 28, 2:09 pm, "Dmitry Streblechenko" <dmi...@dimastr.com> wrote:
> Do you still get the error after all these checks?
>
> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "blakeross" <blaker...@gmail.com> wrote in message
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
<mtim...@gmail.com> wrote in message
news:1193634681.2...@t8g2000prg.googlegroups.com...
On Oct 29, 9:54 am, "Dmitry Streblechenko" <dmi...@dimastr.com> wrote:
> How many times do you call MAPIInitialize?
> Most client versions of MAPI break downa after
> MAPIInitialize/MAPIUninitialize pair is called a few (400-500) times.
>
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
<mtim...@gmail.com> wrote in message
news:1193691174....@q5g2000prf.googlegroups.com...