具有32位和64位代码的DWORD有多大? [英] How large is a DWORD with 32- and 64-bit code?

查看:1197
本文介绍了具有32位和64位代码的DWORD有多大?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在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.

您可以在这里找到官方列表:
http://msdn.microsoft.com/en-us/library/ aa383751(VS.85).aspx

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有多大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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