MAPIInitialize( ) fails after April 24, 2020 update of Office 365

故事扮演 提交于 2020-07-09 16:13:15

问题


Starting on April 22, 2020 this code snippet started failing:

 HRESULT hRes;
 MAPIINIT_0 MAPIINIT= { 0, MAPI_MULTITHREAD_NOTIFICATIONS};
 hRes = MAPIInitialize(&MAPIINIT);   <---  Program halts here.

This code has been running without a problem since at least the year 2000 (20 years).

This failed on at least one computer after an Office 365 Update. However, this problem is associated with several different Outlook versions:

Office 365 Version 2005 - 16.0.12823.20000 64bit - Windows Insider.

Office 365 Version 2003 - 12624.20520 (Click to Run) - Current Release.

So far - only on Windows 10.

Has anyone found a way to run MAPIInitialize( )?


回答1:


Yes, the latest Insider Slow (Monthly) update broke MAPIInitialize.

Microsoft is aware of the problem, but there is no fix yet. The only workarounds are either installing the Insider Fast build (https://www.msoutlook.info/question/office-365-for-business-office-insider-fast-builds) or downgrading to one of the previous versions https://support.microsoft.com/en-us/help/2770432/how-to-revert-to-an-earlier-version-of-office-2013-or-office-2016-clic

You can also try to modify the system PATH: https://github.com/stephenegriffin/mfcmapi/issues/367

Loading

%ProgramFiles%\Microsoft Office\root\vfs\ProgramFilesCommonX86\Microsoft Shared\OFFICE16\Mso20win32client.dll

and

%ProgramFiles%\Microsoft Office\root\Office16\OutlookServicing.dll

prior to calling MAPIInitialize() gets rid of the crash.




回答2:


For us, the System Path modification worked well. The exact path is different for different versions including 32/64 bit. We built a small executable to handle this in an end-user-friendly way:

https://www.companionlink.com/files/special/Fix365MAPI.exe

To add path:  fix365mapi
To remove path:  fix365mapi /u
Reboot the PC to ensure the path is used.

We have a large installed base. We have validated the problem with customers who have Insider Slow, Insider Fast, Insider Fast (April 27 update), and Monthly customers. However, clearly only a fraction of our installed base are seeing this problem. So there must be a second factor, maybe (Click-to-run) or the April Windows 10 update in addition to the Office 365 update.

In our testing adding the path fixed the issue so it looks like a simple dependency problem.



来源:https://stackoverflow.com/questions/61469343/mapiinitialize-fails-after-april-24-2020-update-of-office-365

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!