相关文章推荐
性感的饼干  ·  Raspberry Pi 4 上的 ...·  1 年前    · 
正直的手电筒  ·  mysql实现首字母从A-Z排序 - ...·  1 年前    · 
火爆的咖啡  ·  printf的归宿-数据打印到哪儿了 - ...·  2 年前    · 
斯文的酱肘子  ·  【GIS开发】OpenLayers入门学习( ...·  2 年前    · 
Code  ›  IntPtr.Size总是4,尽管在64位操作系统上有AnyCPU。开发者社区
https://cloud.tencent.com/developer/ask/sof/113884350
爱热闹的小狗
12 月前
首页
学习
活动
专区
工具
TVP 最新优惠活动
返回腾讯云官网
提问

问 IntPtr.Size总是4,尽管在64位操作系统上有AnyCPU。

Stack Overflow用户
提问于 2017-01-11 19:16:46
EN

我正在构建一个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)。就像这样,

代码语言: javascript
复制
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">

当我试图加载我的外接程序并转储出指针大小 "Pointer size? " + IntPtr.Size 时,它只打印4而不是我所期望的8.

我还缺什么.?

Windows 10 64位

Office 365,Outlook 64位

操作系统和Outlook都是64位:

​

​

即使在安装外接程序期间,外接程序Express也检测到并安装为64位版本,而不会抛出任何错误.

代码语言: javascript
复制
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'.
 
推荐文章
性感的饼干  ·  Raspberry Pi 4 上的 Alpine Linux:无头安装和持久存储_weixin_0010034-Linux
1 年前
正直的手电筒  ·  mysql实现首字母从A-Z排序 - 龙昊雪 - 博客园
1 年前
火爆的咖啡  ·  printf的归宿-数据打印到哪儿了 - 腾讯云开发者社区-腾讯云
2 年前
斯文的酱肘子  ·  【GIS开发】OpenLayers入门学习(JavaScript库)_爱看书的小沐的技术博客_51CTO博客
2 年前
今天看啥   ·   Py中国   ·   codingpro   ·   小百科   ·   link之家   ·   卧龙AI搜索
删除内容请联系邮箱 2879853325@qq.com
Code - 代码工具平台
© 2024 ~ 沪ICP备11025650号