Skip to content

Logon fails due to missing VCRUNTIME140_1.dll for msmapi32.dll #981

Description

@theultramage

Hi, I have a curious and annoying to pinpoint cause of Logon failure for you. As the title suggests, if the msvc++ 2015-2022 x64 redistributable package is missing, the mapi dll that Office 2019 (and 2021) uses will silently fail to load.

The leadup to this was: Windows 10 22H2 with freshly installed Office 2019 proplus retail via ODT CTR. I assume the dlls got installed then (although I cannot confirm). This host, unusually, has no bloatware or third party software that would also want to install the crt and thus increase its refcount in MSI or whatever. The next day, the host was upgraded to Windows 11 25H2. After that, the crt was gone. My only theory thusfar is that the upgrader decided that the crt is unreferenced and can be skipped during migration. Curiously, the Office suite seems to run just fine without it, even Outlook doesn't care. Though there may be other stuff silently breaking in the background.

This issue manifests during Logon first as a popup from Microsoft Office Outlook saying that there is no default mail client configured or the current mail client cannot process the request. This is followed by a popup from mfcapi saying "MAPIInitialize failed with error 0x80004005 == MAPI_E_CALL_FAILED." and some things to check. Of course, nothing works. Most disturbingly, Quick Repair and not even Full Online Repair addresses the issue. (This seems like a pretty glaring omission in the repair process.)

What finally helped was some not-too-helpful AI assistance, which made me aware of DllPathEx and that a special dll is involved, and made me aware of other stuff in the mfcmapi dropdown menu, that being manual MAPI unload and load. The latter, when fed DllPathEx, produced

Error: The specified module could not be found.

Code: 0x8007007E == 0x8007007E
Function import::MyLoadLibraryW(lme->m_pName)
File C:\__w\1\s\MFCMAPI\UI\Dialogs\ContentsTable\MainDlg.cpp
Line 166

As a msvc dev, seeing 'LoadLibrary' failing immediately signaled a dependency / sxs problem, so I used procmon (sxstrace would have also worked), repeated the manual load attempt and saw VCRUNTIME140_1.dll NAME_NOT_FOUND. Installing the latest redist package fixed it instantly.

Not sure what the lesson is here. Add a dedicated check for this? Add it to the suggestions popup? Ignore it because maybe the circumstances I described cannot be reproduced and were a one-off fluke, and this only happens if someone carelessly uninstalls the crt? Anyway, thanks for reading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions