locked
MAPIInitialize fails under 64bit Windows 7 & Outlook 2010 RRS feed

  • Question

  • Under Windows 7(64bit) & Outlook 2010(64bit), I call MAPIInitialize to initialize MAPI, but there will always be a popup message saying "Either there is no default mail client or the current mail client cannot fulfill the messaging request.Please run Microsoft Outlook and set it as the default mail client.", then MAPIInitialize will return 0x80004005, indicating fail to initialize MAPI.

    The same program works under Windows Vista(32bit) & Outlook 2007(32bit).

    What is the problem? Thanks.
    Wednesday, July 7, 2010 9:34 AM

Answers

  • Are you using the correct 64-bit version of MAPI, the correct 64-bit headers, and are you linking to it as discussed in articles in Stephen Griffin's blog? You do have the latest version of the MAPI download?

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007.
    Reminder Manager, Extended Reminders, Attachment Options.
    http://www.slovaktech.com/products.htm
     
     
    "alancc" <=?utf-8?B?YWxhbmNj?=> wrote in message news:0a2f2da2-8938-4ee9-b318-92f83fc82a89...
    Under Windows 7(64bit) & Outlook 2010(64bit), I call MAPIInitialize to initialize MAPI, but there will always be a popup message saying "Either there is no default mail client or the current mail client cannot fulfill the messaging request.Please run Microsoft Outlook and set it as the default mail client.", then MAPIInitialize will return 0x80004005, indicating fail to initialize MAPI.

    The same program works under Windows Vista(32bit) & Outlook 2007(32bit).

    What is the problem? Thanks.

    Ken Slovak MVP - Outlook
    • Marked as answer by Sue Mosher Monday, July 19, 2010 1:46 PM
    Wednesday, July 7, 2010 1:07 PM
  • You are correct - you need Visual Studio 2005 or later to compile for x64. There weren't any x64 processors until 2003 - hence why VC 6.0 doesn't have an x64 compiler :)
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Patrick Microsoft Online Community Support
    Thursday, July 8, 2010 12:45 PM

All replies

  • Are you using the correct 64-bit version of MAPI, the correct 64-bit headers, and are you linking to it as discussed in articles in Stephen Griffin's blog? You do have the latest version of the MAPI download?

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007.
    Reminder Manager, Extended Reminders, Attachment Options.
    http://www.slovaktech.com/products.htm
     
     
    "alancc" <=?utf-8?B?YWxhbmNj?=> wrote in message news:0a2f2da2-8938-4ee9-b318-92f83fc82a89...
    Under Windows 7(64bit) & Outlook 2010(64bit), I call MAPIInitialize to initialize MAPI, but there will always be a popup message saying "Either there is no default mail client or the current mail client cannot fulfill the messaging request.Please run Microsoft Outlook and set it as the default mail client.", then MAPIInitialize will return 0x80004005, indicating fail to initialize MAPI.

    The same program works under Windows Vista(32bit) & Outlook 2007(32bit).

    What is the problem? Thanks.

    Ken Slovak MVP - Outlook
    • Marked as answer by Sue Mosher Monday, July 19, 2010 1:46 PM
    Wednesday, July 7, 2010 1:07 PM
  • Thank you so much. Yes, you are correct. I am compiling the codes with Visual C++ 6.0, which produces 32bit executable codes, I think. So it is not compatible with 64bit Office and 64bit WIndows as mentioned in the article.

    Then, can you tell me how to compile the codes into 64bit? THere is no options to do so in Visual C++ 6.0.

    Thank you in advance.

    Thursday, July 8, 2010 2:52 AM
  • You are correct - you need Visual Studio 2005 or later to compile for x64. There weren't any x64 processors until 2003 - hence why VC 6.0 doesn't have an x64 compiler :)
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Patrick Microsoft Online Community Support
    Thursday, July 8, 2010 12:45 PM
  • In addition to what Patrick mentioned, also take a look at Stephen Griffin's blog [and Patrick's :)] for some steps you have to take with 64-bit MAPI for the headers and such.

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007.
    Reminder Manager, Extended Reminders, Attachment Options.
    http://www.slovaktech.com/products.htm
     
     
    "Patrick Creehan" <=?utf-8?B?UGF0cmljayBDcmVlaGFu?=> wrote in message news:078efa34-4caf-4daf-b809-02ed94870a34...
    You are correct - you need Visual Studio 2005 or later to compile for x64. There weren't any x64 processors until 2003 - hence why VC 6.0 doesn't have an x64 compiler :)
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Patrick Microsoft Online Community Support

    Ken Slovak MVP - Outlook
    Thursday, July 8, 2010 1:35 PM