• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 871
  • Last Modified:

MAPIInitialize failed and get an error message

Hi,

I get following error message when I call the 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."

Anyone knows what I can do to solve.

BTW, the following is the setting of my computer
OS is Vista.
IDE is Microsoft Visual Studio 2005
mail 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
0
sparkythedog
Asked:
sparkythedog
1 Solution
 
AndyAinscowFreelance programmer / ConsultantCommented:
Does
CoInitialize(NULL);
MAPIInitialize(NULL);
help?  MAPI requires COM to be initialised before it can be used.
0
 
sparkythedogAuthor Commented:
HI,

CoInitialize will be call automatically when MAPIInitialize is called.

anyway thanks for your reply.

Yours,
Michael.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now