locked
x64 outlook2016 and CoCreateInstance error 0x80040155 on win10 RRS feed

  • Question

  • There is a document How to: Check the Version of Outlook https://msdn.microsoft.com/en-us/library/office/dd941331(v=office.15).aspx#

    it gives componentId for outlook2010,outlook2013, what is the id for outlook2016? Where I can find the ID for outlook2016?

    Also I found office 2016 automation can not work well on x64 win10. The following code will create outlook process instance, the code work fine with both 32bit and 64bit outlook2010,outlook2013 on win7/win8.

    CComPtr<outlook::_application>spApp;

    hr = spApp.CoCreateInstance(__uuidof(Outlook::Application), NULL, CLSCTX_LOCAL_SERVER);

    The code works fine with both x32/x64 outlook2016 on win7,the code works fine too with 32 bit outlook2016 on x64 win10 too, but the code will get error hr=0x80040155 with 64 bit outlook2016 on win10, uninstall/reinstall x64 office2016 won’t fix the problem. Could it be a Win10 compatible issue with x64 outlook automation?

    Thanks in advance.

    Monday, April 18, 2016 6:53 PM

Answers

  • Hello,

    You can use Orca tool for getting the component ID value for Outlook 2016. Take a look at the following link for more information:

    faq-item-where-to-find-the-pia-component-ids-for-the-different-office-applications

    The “ORCA Tool” is third party tool. So you can use this tool at your own risk.

    Do you try to create a new Outlook Application instance from a service?


    [custom.development]

    • Marked as answer by whshu Wednesday, April 27, 2016 7:59 PM
    Monday, April 18, 2016 9:37 PM

  • The “ORCA Tool” is third party tool. So you can use this tool at your own risk.

    I wouldn't worry about using the Orca tool provided by Microsoft as part of the Windows SDK. See Orca.exe
    • Marked as answer by whshu Wednesday, April 27, 2016 7:59 PM
    Monday, April 18, 2016 10:11 PM
  • Hi whshu,

    To check whether the outlook is corrupt, I suggest you automation outlook from Outlook application with VBA. If it did not work either, I assume the outlook is corrupt, and I suggest you repair your outlook.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Marked as answer by whshu Wednesday, April 27, 2016 8:03 PM
    Tuesday, April 19, 2016 6:33 AM
  • It's possible that msi files are compressed inside the setup programs or some other file.  You can use a program like 7zip (http://www.7-zip.org/) to search for msi files.
    Wednesday, April 20, 2016 9:54 PM

All replies

  • Hello,

    You can use Orca tool for getting the component ID value for Outlook 2016. Take a look at the following link for more information:

    faq-item-where-to-find-the-pia-component-ids-for-the-different-office-applications

    The “ORCA Tool” is third party tool. So you can use this tool at your own risk.

    Do you try to create a new Outlook Application instance from a service?


    [custom.development]

    • Marked as answer by whshu Wednesday, April 27, 2016 7:59 PM
    Monday, April 18, 2016 9:37 PM

  • The “ORCA Tool” is third party tool. So you can use this tool at your own risk.

    I wouldn't worry about using the Orca tool provided by Microsoft as part of the Windows SDK. See Orca.exe
    • Marked as answer by whshu Wednesday, April 27, 2016 7:59 PM
    Monday, April 18, 2016 10:11 PM
  • Thanks Eugene Astafiev and RLWA32 for the response to the first question.

    For the problem x64 outlook2016 failed on CoCreateInstance with error 0x80040155 on win10, it is not to create a new Outlook Application instance from a service, we have a GUI application, it will try to dynamically create outlook instance when user click a menu item from UI and use outlook automation API to construct/send email or  disable/re-enable outlook addin...

    The above code work fine for any x32/x64 outlook version on vista/win7/win8, for x32/x64 outlook2016 the above code works fine on win7 too, also no issue for x32 outlook2016 on Win10, but for x64 outlook2016 on win10, the above code will fail with error 0x80040155.

    Actually we try to CoCreateInstance for x64 powerpoint 2016 on x64 win10, it fail too with the same error, but x32 powerpoint 2016 works fine on x64 win10.

    I guess it should not be a problem in office2016, because both x32 and x64 office2016 works fine in vista/win7/win8. Maybe a problem in win10 for x64 office.


    • Edited by whshu Monday, April 18, 2016 10:36 PM
    Monday, April 18, 2016 10:34 PM
  • Give it a try with the CLSCTX_ACTIVATE_64_BIT_SERVER flag specified in the call to CoCreateInstance.
    Monday, April 18, 2016 11:05 PM
  • Thanks RLWA32,

    But I already tried to add flag CLSCTX_ACTIVATE_64_BIT_SERVER in the call hr = spApp.CoCreateInstance(__uuidof(Outlook::Application), NULL, CLSCTX_LOCAL_SERVER | CLSCTX_ACTIVATE_64_BIT_SERVER);

    will get the same error.

    Monday, April 18, 2016 11:12 PM
  • Hi whshu,

    To check whether the outlook is corrupt, I suggest you automation outlook from Outlook application with VBA. If it did not work either, I assume the outlook is corrupt, and I suggest you repair your outlook.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Marked as answer by whshu Wednesday, April 27, 2016 8:03 PM
    Tuesday, April 19, 2016 6:33 AM
  • More question about orca.exe.

    I can use “ORCA Tool” to open msi for office 2003,2010,2013, but for office2016, I just download the iso file en_office_professional_plus_2016_x86_x64_dvd_6962141.iso, this iso only contains setup32.exe, setup64.exe and a "data" folder, there is no any msi file in the iso. How can I use orca.exe for office2016 to check outlook2016 pia component Id? 

    Wednesday, April 20, 2016 9:15 PM
  • It's possible that msi files are compressed inside the setup programs or some other file.  You can use a program like 7zip (http://www.7-zip.org/) to search for msi files.
    Wednesday, April 20, 2016 9:54 PM
  • I use 7-zip to check the exe, size of setup64.exe only  4190K, 7-zip "open inside" can open the exe, but there is no msi. also checked the biggest file stream.x64.x-none.dat 0.98 GB, it is not a archive file and can not be opened by 7-zip.

    but thanks RLWA32 anyway.

    Wednesday, April 27, 2016 7:59 PM
  • Thanks Edward Z. We tried x64 office outlook on another win10, our code works fine. So mostly the office on that PC is corrupt.
    Wednesday, April 27, 2016 8:03 PM
  • whshu,  Were you able to successfully use orca to get the component id of Outlook 2016?  I am struggling with the same problem.
    Monday, May 9, 2016 4:37 PM