How to detect 32/64 platform?

痴心易碎 提交于 2019-12-02 20:30:00

问题


I need to detect if the app is running on Win32/64.

Update: People are reporting that relying on the [HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0] key is not a good idea.


回答1:


The code that you present in the question has a few wrinkles, but it does work correctly. I suspect that you are not actually running that code, and have made an error and somehow posted the wrong code.

FWIW, you should use TOSVersion from System.SysUtils to check the bitness of the underlying platform. The TOSVersion.Architecture property will tell you whether or not the underlying platform is 32 or 64 bit.



来源:https://stackoverflow.com/questions/29074673/how-to-detect-32-64-platform

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!