问题描述
在Visual C ++中,DWORD只是一个无符号长,是机器,平台和SDK依赖。但是,由于DWORD是一个双字(即2 * 16),64位架构上的DWORD是32位吗?
In Visual C++ a DWORD is just an unsigned long that is machine, platform, and SDK dependent. However, since DWORD is a double word (that is 2 * 16), is a DWORD still 32-bit on 64-bit architectures?
推荐答案
实际上,在32位计算机上,一个字是32位,但是DWORD类型是16位的好日子的剩余部分。
Actually, on 32-bit computers a word is 32-bit, but the DWORD type is a leftover from the good old days of 16-bit.
您可以在这里找到官方列表:
You can find the official list here:http://msdn.microsoft.com/en-us/library/aa383751(VS.85).aspx
所有与平台相关的类型随着从32位转换为64位结束而改变,并带有_PTR DWORD_PTR在32位Windows上为32位,在64位Windows上为64位)。
All the platform-dependent types that changed with the transition from 32-bit to 64-bit end with _PTR (DWORD_PTR will be 32-bit on 32-bit Windows and 64-bit on 64-bit Windows).
这篇关于具有32位和64位代码的DWORD有多大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!