How to detect 32/64 platform?

前端 未结 1 1039
孤街浪徒
孤街浪徒 2021-01-28 01:28

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 n

1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-28 02:10

    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.

    0 讨论(0)
提交回复
热议问题