我正在构建一个Outlook外接程序,它运行在64位操作系统和64位Outlook上。
但是,我无法获得正确的指针大小来触发RedemptionLoader代码来加载64位DLL文件.它总是给我4的指针大小。
我读过下面的文章,也遵循了他们的建议,但不去.
https://stackoverflow.com/questions/9206483/why-intptr-size-is-4-on-windows-x64
https://stackoverflow.com/questions/2846666/intptr-in-32-bit-os-uint64-in-64-bit-os
因此,在我的项目,一个C#项目的Visual Studio 2015中,我已经将它设置为任何CPU,然后在我的64位WiX安装项目中,我确保它将x64作为$(Platform)。就像这样,
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
当我试图加载我的外接程序并转储出指针大小"Pointer size? " + IntPtr.Size
时,它只打印4而不是我所期望的8.
我还缺什么.?
Windows 10 64位
Office 365,Outlook 64位
操作系统和Outlook都是64位:
即使在安装外接程序期间,外接程序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.
发布于 2017-01-11 19:33:49
如果为4,则可以确保进程为32位。编译为“任意CPU”将匹配主机应用程序(Outlook)的比特性,而不是主机操作系统。
Outlook真的说它是64位吗?
https://stackoverflow.com/questions/41598986
复制相似问题