【发布时间】:2017-05-26 17:20:36
【问题描述】:
我正在构建一个在 64 位操作系统和 64 位 Outlook 上运行的 Outlook 插件。 但是,我无法获得正确的指针大小以触发 RedemptionLoader 代码加载 64 位 dll ......它总是给我指针大小是 4。
我已经阅读了以下内容并遵循了他们的建议,但是不行......
why IntPtr.size is 4 on Windows x64?
IntPtr in 32 Bit OS, UInt64 in 64 bit OS
所以在我的项目中,Visual Studio 2015 中的 C# 项目中,我将其设置为 Any CPU,然后在我的 64 位 WiX 安装项目中,我确保它具有 x64 作为 @987654327 @。像这样,
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
当我尝试加载我的加载项并转储指针大小 "Pointer size? " + IntPtr.Size 时,它只打印 4 而不是我期望的 8...
我还缺少什么...?
Windows 10 64 位
Office 365,Outlook 64 位
编辑:看我不傻,操作系统和 Outlook 都是 64 位的。阅读其他帖子并尝试后在这里发帖真的是我最后的手段......
即使在安装插件的过程中,Add-in Express 也会检测到并安装为 64 位版本,而不会抛出任何错误...
Add-in Express Registrator Log File: 01/11/2017 15:36:47
Installation directory: C:\WINDOWS\Installer\
Registrator version: 8.4.4395.0
Operating System: Microsoft Windows 10 Professional (build 14393), 64-bit
Process Owner: System
Command Line: "C:\WINDOWS\Installer\MSI5FB0.tmp" /install="C:\Program Files\Blah\Blah.dll" /log=%RoamingAppDataFolder%/Blah
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: System
UAC (User Account Control): On
--------------------------------------------------------------
15:36:47 0448 Starting the add-in registration process.
15:36:47 0448 Loading mscoree.dll
15:36:47 0448 Success.
15:36:47 0448 .NET Framework installation directory:
15:36:47 0448 The latest version of .NET Framework: 'v4.0.30319'
15:36:47 0448 Loading CLR: v4.0.30319.
15:36:47 0448 Calling CLRCreateInstance method.
15:36:47 0448 Success.
15:36:47 0448 Calling GetRuntime method.
15:36:47 0448 Success.
15:36:47 0448 Checking if the hosting API of .NET Framework v4.0 beta is installed.
15:36:47 0448 The hosting API is up to date.
15:36:47 0448 Calling GetInterface method for the CorRuntimeHost interface.
15:36:47 0448 Success.
15:36:47 0448 Starting CLR...
15:36:47 0448 Success.
15:36:47 0448 Getting the CLR version.
15:36:47 0448 The CLR v4.0.30319 has been initialized successfully.
15:36:47 0448 Creating a new domain setup.
15:36:47 0448 Success.
15:36:47 0448 The 'shadow copy' is disabled.
15:36:47 0448 Creating a new application domain.
15:36:47 0448 Success.
15:36:47 0448 Getting the base directory for the domain.
15:36:47 0448 Success. The directory is 'C:\Program Files\Blah\'.
15:36:47 0448 Searching for the Add-in Express core library.
15:36:47 0448 Success. The 'AddinExpress.MSO.2005.dll' file is found.
15:36:47 0448 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
15:36:47 0448 Assembly identity is 'AddinExpress.MSO.2005'.
15:36:47 0448 Success.
15:36:47 0448 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
15:36:47 0448 Success.
15:36:47 0448 Calling the managed registration procedure (DISPID = 1610743823).
15:36:48 0448 Registration success.
15:36:48 0448 The add-in registration process is completed with HRESULT = 0.
【问题讨论】:
-
你确定主进程是64位的吗?
标签: c# outlook 64-bit outlook-redemption