我正在将我的开发电脑从 Windows XP(专业版、SP3、x86)迁移到 Windows 7(专业版、SP1、x86)。我正在处理的应用程序的源在两台机器上完全相同,但在启动 RDOSession 时在 Windows 7 机器上失败。
// Initialize the session.
_session = new RDOSession(); // Throws exception...
_session.LogonExchangeMailbox("mailbox@mydomain.com", "mail.mydomain.com");
这段代码导致以下异常:
System.Runtime.InteropServices.COMException was caught
Message=Creating an instance of the COM component with CLSID {29AB7A12-B531-450E-8F7A-EA94C2F3C05F} from the IClassFactory failed due to the following error: 8004010e.
Source=mscorlib
ErrorCode=-2147221234
StackTrace:
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at (...).DataAccess.ExchangeManager..ctor(ExchangeConfigurationSettings configurationSettings) in D:\Development\WIP\(...)\DataAccess\Exchange\ExchangeManager.cs:line 57
显然,我直接考虑 MAPI/CDO,所以我广泛检查并在 Office 2007 和 2010 上尝试了 Win7,但没有运气。我目前的配置如下:
- WinXP:VS2010SP1,无办公室,但安装了 Exchange MAPI 和 CDO 以及 Redemption 版本 5.5.0.3218。
- Win7:VS2010SP1,无办公室,但安装了 Exchange MAPI 和 CDO 以及 Redemption 版本 5.5.0.3218。
有人有线索吗?提前致谢!