Re: MAPIInitialize failed and get an error message



Hi,

Yes. It is really helpful. Thank you so much.

Yours,
Michael

"Stephen Griffin [MSFT]" wrote:

If you can't change the config, then it's up to you to load Outlook's MAPI
manually. You won't be able to rely on mapi32.lib and the MAPI stub library.

You REALLY need to read this article:
http://blogs.msdn.com/stephen_griffin/archive/2007/01/18/where-did-mapisvc-inf-go.aspx

FGetComponentPath is gonna be your best friend here in locating Outlook's
MAPI.

Steve

"zhanglr" <zhanglr@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2FF867EF-E6AC-42C9-8972-447CEFC6598C@xxxxxxxxxxxxxxxx
Hi,

First of all, thank you for reply.

But, I cannot ask user to change the config. And I am not right to modify
any record under HKEY_LOCAL_MACHINE in vista.

Any other suggestion?

Best Regards

"huzaifa kagazwala" wrote:

The error is returned if Outlook is not your default mail client and the
default mail client does not support MAPI. There are two ways of getting
around this problem.

1.. Make Microsoft Outlook your default mail client.
2.. Or make an entry for you application under the path
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Messaging
Subsystem\\MSMapiApps" with the value set to "Microsoft Outlook". This
will
divert all MAPI related calls to Outlook even if it is not the default
mail
client.
Regards,
Huzaifa Kagazwala

"zhanglr" <zhanglr@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3B1745A6-AF7F-4409-A9C3-162EA624FDBB@xxxxxxxxxxxxxxxx
Hi,

I get following error message when I call MAPIInitialize( NULL );
-- Either there is no default mail client or the current mail client
cannot
fulfill the messaging request. Please run Microsoft Office Outlook and
set
it
as the default mail client.

BTW, my pc setting is:
OS is Vista.
IDE is Microsoft Visual Studio 2005
email client:
1) outlook 2003 (no default)
2) Windows mail (default email client) -- I manually set it as default
email client.
(1. Click to open Set Program Access and Computer Defaults.? If you
are
prompted for an administrator password or confirmation, type the
password
or
provide confirmation.
2. Under Choose a configuration, click Custom.
3. Under Choose a default e-mail program, click the e-mail program
you'd
like to use, and then click OK.)

Best Regards,
Michael






.



Relevant Pages

  • Re: Emailing with default client
    ... Amazingly it works when I have either Outlook Express or Thuderbird as my default mail client. ... I've tried using the VB6 MAPI controls, I can sent through Outlook Express, but not Thunderbird. ... I'm writing a desktop application that I would like to have the ability to email files. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: MAPIInitialize failed and get an error message
    ... If you can't change the config, then it's up to you to load Outlook's MAPI ... Make Microsoft Outlook your default mail client. ...
    (microsoft.public.win32.programmer.messaging)
  • Re: Msgs are not going out automatically as desired with Outlook 2
    ... I tried creating a new user and profile (I removed all the xisting ... The app still cant Logon with simple mapi. ... > 3> set outlook as the default mail client ... > 4> configure outlook as the machines which works ...
    (microsoft.public.win32.programmer.messaging)
  • Re: Why does Send to Mail recipient open Express?
    ... Is Microsoft Outlook set as your default mail client? ... over to Outlook Express, select apply, and then switch it back to Microsoft ...
    (microsoft.public.outlook.general)
  • Re: no default client
    ... Please run Microsoft Outlook ... and set it as the default mail client. ... mail client cannot fulfill the messaging request. ... Microsoft Outlook and set it as the default mail client. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)