1

I am getting errors in event viewer every time my application runs this line:

Redemption.RDOSession rSession = RedemptionLoader.new_RDOSession();

event viewer error:

faulting application name: (my.exe)  
exception code: 0xc0000005  
faulting module path: C:\Program Files\Common Files\Microsoft Shared\Office16\mso20win32client.dll

The oddest part is that it proceeds to create the session and makes it to the end of my code if I let it, successfully looking up an email in Outlook. This is in production and has worked for years, but for some months now it has been racking up the same error in Event Viewer. End users don't notice, but IT is seeing thousands of errors now which makes it hard for them to know when other problems might be showing up.

I reproduced this on the first try with:

Windows 10 Home, OS build 19044.1706, Windows Feature Experience Pack 120.2212.4170.0
Outlook: Microsoft® Outlook® for Microsoft 365 MSO (Version 2205 Build 16.0.15225.20172) 64-bit

I added logging in my CS code to make sure this caused the error. The error occurs if set ignoreoutlook to "e", and not if I set it to "d":

Microsoft.Office.Interop.Outlook.Application oApp = (Application)Marshal.GetActiveObject("Outlook.Application");
if (ignoreoutlook.Equals("d")) return;
Redemption.RDOSession rSession = RedemptionLoader.new_RDOSession(); // new Redemption.RDOSession();
if (ignoreoutlook.Equals("e")) return;

As for:

C:\ProgramFiles\Common Files\Microsoft Shared\Office16\mso20win32client.dll  

it doesn't exist. There is a dll of that name in both:

C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX86\Microsoft Shared\OFFICE16  
C:\Program Files\Microsoft Office\root\vfs\ProgramFilesCommonX64\Microsoft Shared\OFFICE16

If Redemption wants to use that dll, how is it working without it? Is there a way to configure Redemption to skip that dll and move on to whatever else it must be doing to get it to work after that error?

Saeed Zhiany
  • 2,051
  • 9
  • 30
  • 41
rdriscoll
  • 11
  • 2
  • This problem might be talked about here: https://learn.microsoft.com/en-us/answers/questions/750017/outlook-2019-crashing-with-faulting-module-mso20wi.html. It shows some steps to repair Outlook, which might solve the missing mso20win32client.dll (Which is on my system in: `C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE16\Mso20win32client.dll` (I have office2013, 32 bits)) – Luuk Jun 19 '22 at 17:07

1 Answers1

0

There are quite a few things going on once the MAPI system (when Redemption loads it and calls MAPIInitialize) initializes common Office runtime, which has a bunch of its own problems, since it loads telemetry and licensing. Some of that functionlity only works when running inside the (virtualized) Office app environment (it patches a few Win API functions etc.)

Check if you see the same problem in MFCMAPI if you log to a profile (to ensure the MAPI system is loaded). If you do, that means the problem is in the MAPI system and you can work with MS support. If not, something is specific to your app.

One thing to keep in mind is that your app must embed a manifest and advertise its support for Windows 10. Otherwise common Office run-time tries to patch wrong Win API functions.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78