64位Windows API:C / C ++“ DWORD”的大小是多少? [英] 64-bit Windows API: what is the size of a C/C++ "DWORD"?

查看:349
本文介绍了64位Windows API:C / C ++“ DWORD”的大小是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只安装了32位Windows,所以我无法自己验证。

I only have 32-bit Windows installed, so I cannot verify this myself.

如果我理解正确,则Microsoft API中各个位置使用的DWORD是

If I understand correctly, the DWORD used in various places in the Microsoft API is in reference to the original 16-bit word, and has nothing to do with the current hardware architecture?

因此,似乎是32位的DWORD甚至将保持32位当我最终编译并链接我的应用程序以在64位Windows上运行时?还是DWORD会变成128位宽?

So DWORD which seems to be 32 bits, will remain 32 bits even when I eventually compile and link my app to run in 64-bit Windows? Or will DWORD become 128 bits wide?

推荐答案

唯一改变大小在32到64之间的是指针。因此DWORD保持32位宽。

The only thing that changes size between 32 and 64 are pointers. So DWORD stays 32 bits wide.

有些东西显然不是立即的指针,例如手柄,LPARAM,WPARAM。但是这三个在实际持有指针时会改变宽度。

Some things are not immediately obviously pointers, e.g. HANDLE, LPARAM, WPARAM. But these three change width as they actually hold pointers.

这篇关于64位Windows API:C / C ++“ DWORD”的大小是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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