新程序安装后:System.Runtime.InteropServices.SEHException (0x80004005):

After new program installation: System.Runtime.InteropServices.SEHException (0x80004005):

我的程序在我们公司的 20 多台 PC 上使用,运行 没有任何问题。但是现在一台 PC 已经安装了 Inventor 2020,它更新了一些常用的 DLL(我不知道是哪些),因为安装后出现以下错误:

System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.

应用程序打开 Microsoft 访问的 DBConnection 时发生错误。下面的连接示例之一。

List<string> myList = new List<string>();


OleDbConnection conn = new OleDbConnection(connectionString);

string sql = "select * from PendingOrders";
OleDbCommand cmd = new OleDbCommand(sql, conn);
conn.Open();


OleDbDataReader reader;
reader = cmd.ExecuteReader();

据我了解,有一个 DLL 会抛出异常,我如何确定是哪一个?或者更好的办法是找到一个解决方法让它再次工作。

提前致谢!

更新: 使用 DebugView (DbgView.exe) 在用户 PC 上调试后,我可以看到以下内容。

ModLoad: 7c450000 7c7a6000   C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll
ModLoad: 74f00000 74ffb000   C:\Windows\SysWOW64\CRYPT32.dll
ModLoad: 76a30000 76a3e000   C:\Windows\SysWOW64\MSASN1.dll
ModLoad: 08e40000 08ea8000   image08e40000
ModLoad: 0c670000 0c6d8000   image0c670000
ModLoad: 00000000`7c7b0000 00000000`7c7fc000   System.Transactions.dll
ModLoad: 00000000`0fde0000 00000000`0fe2c000   System.Transactions.dll
ModLoad: 00000000`7c7b0000 00000000`7c7fc000   C:\Windows\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll
ModLoad: 00000000`7c800000 00000000`7c8cb000   C:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll
ModLoad: 00000000`7c8d0000 00000000`7c8f2000   C:\Windows\SysWOW64\MSDART.DLL
ModLoad: 00000000`71920000 00000000`71928000   C:\Windows\SysWOW64\DPAPI.dll
ModLoad: 00000000`7c900000 00000000`7ca54000   C:\Windows\SysWOW64\comsvcs.dll
ModLoad: 00000000`7ca60000 00000000`7cabd000   C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\ACEOLEDB.DLL
ModLoad: 00000000`7cac0000 00000000`7cb63000   C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9619_none_508d9c7abcbd32b6\MSVCR90.dll
ModLoad: 00000000`78d30000 00000000`79ef7000   C:\Program Files (x86)\Common Files\Microsoft Shared\office14\mso.dll
ModLoad: 00000000`72ba0000 00000000`72f01000   C:\Windows\SysWOW64\msi.dll
ModLoad: 00000000`6a2e0000 00000000`6a306000   C:\Windows\SysWOW64\srpapi.dll
ModLoad: 00000000`79f00000 00000000`7a108000   C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\ACECORE.DLL
ModLoad: 00000000`7a110000 00000000`7a19e000   C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9619_none_508d9c7abcbd32b6\MSVCP90.dll
ModLoad: 00000000`10660000 00000000`10a7a000   C:\Program Files (x86)\Common Files\Microsoft Shared\office14\Cultures\office.odf
ModLoad: 00000000`10660000 00000000`10a7a000   C:\Program Files (x86)\Common Files\Microsoft Shared\office14\Cultures\office.odf
ModLoad: 00000000`10a80000 00000000`10b55000   C:\Program Files\Common Files\Microsoft Shared\OFFICE1433\ACEWSTR.DLL
ModLoad: 00000000`1c440000 00000000`2096b000   C:\Program Files (x86)\Common Files\Microsoft Shared\office14\MSORES.DLL
ModLoad: 00000000`1c440000 00000000`2096b000   C:\Program Files (x86)\Common Files\Microsoft Shared\office14\MSORES.DLL
ModLoad: 00000000`67aa0000 00000000`67ab9000   C:\Windows\SysWOW64\DavClnt.DLL
ModLoad: 00000000`53fd0000 00000000`53fda000   C:\Windows\SysWOW64\DAVHLPR.dll
ModLoad: 00000000`10a80000 00000000`10ce3000   C:\Program Files (x86)\Common Files\Microsoft Shared\office1433\MSOINTL.DLL
ModLoad: 00000000`10a80000 00000000`10ce3000   C:\Program Files (x86)\Common Files\Microsoft Shared\office1433\MSOINTL.DLL
ModLoad: 00000000`6ccf0000 00000000`6cecd000   C:\Windows\SysWOW64\msxml6.dll
ModLoad: 00000000`24b70000 00000000`24c45000   C:\Program Files\Common Files\Microsoft Shared\OFFICE1433\ACEWSTR.DLL
(136c.2a98): Unknown exception - code c06d007e (first chance)
(136c.2a98): Unknown exception - code c06d007e (first chance)
(136c.2a98): Unknown exception - code c06d007e (first chance)
ModLoad: 00000000`24b70000 00000000`24d00000   image00000000`24b70000
ModLoad: 00000000`24d00000 00000000`24e90000   image00000000`24d00000
ModLoad: 00000000`7a1a0000 00000000`7a2a5000   C:\Windows\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll

您可以使用 DebugView (DbgView.exe),它非常适合识别此类异常,来自 SysInternals。