避免x64陷阱 [英] x64 pitfalls to avoid

查看:96
本文介绍了避免x64陷阱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

再见一次.

我已经阅读了 Karpov Andrey 的文章,但我想在此方面提供更深入的指导不用什么.
示例MSDN说您应该使用DWORD_PTR/UINT_PTR/INT_PTR而不是DWORD/UINT/INT
SetClassLongPTR等.
我还有什么要开始做的吗?
像要避免使用的数据类型,还是要代替使用的数据类型?

我正在使用VS2010,并且已安装PVS-Studio试用版.有没有像样的x64静态代码分析器?

预先感谢.

Hi all again.

I have read the articles by Karpov Andrey, but I would like more indepth pointers in regards to what not to use.
Example MSDN says that you should use DWORD_PTR / UINT_PTR / INT_PTR instead of DWORD / UINT / INT
and SetClassLongPTR and such.
Is there anything else I should start doing?
Like data types to avoid and those to use instead?

I am using VS2010 and I have the PVS-Studio trial installed. Are there any decent x64 static code analyzers?

Thanks in advance.

推荐答案

Karpov Andrey似乎已经介绍了大部分内容.

只需检查您的解决方案是否不需要您链接到仅32位的库即可;或具有任何其他32位互操作性要求,这会引起您很多麻烦.

祝你好运,
Espen Harlinn
Karpov Andrey seems to have covered most of it.

Just check that your solution does not require you to link against 32-bit only libraries; or has any other 32-bit interoperability requirements that will cause you a lot of grief.

Good luck,
Espen Harlinn


此外,库以及Espen所说的话:

所有三种指令集体系结构在一个进程无法使用的意义上是不兼容的.我在这里解释这些体系结构和兼容性方面:

如何使用32位DLL [ http://en.wikipedia.org/wiki/Dependency_Walker [ ^ ],^ ].

—SA
In addition the the library and what Espen says:

All three instruction-set architectures are incompatible in the sense that none two of them cannot be used is one process. I explain those architectures and compatibility aspects here:

How to use 32 bit DLL in 64 bit machine configuration.[^].

Microsoft Dependency Walker can help a lot, see http://en.wikipedia.org/wiki/Dependency_Walker[^], http://www.dependencywalker.com/[^].

—SA


这篇关于避免x64陷阱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆