digitalmars.D.learn - Detect if running 32 bit program on 64 bit Windows OS
- Josh (6/6) Oct 09 2012 Is there a way to do that? I've tried
- Simen Kjaeraas (4/9) Oct 09 2012 http://msdn.microsoft.com/en-us/library/ms684139(v=vs.85).aspx
Is there a way to do that? I've tried getenv("PROCESSOR_ARCHITECTURE") and shell("echo %PROCESSOR_ARCHITECTURE%"), and both of them return "x86" instead of "AMD64" like cmd. I want to use this to run a 64 bit version of an external program if the OS is 64 bit, and the 32 bit version if not.
Oct 09 2012
On 2012-01-10 02:10, Josh <moonburntm gmail.com> wrote:Is there a way to do that? I've tried getenv("PROCESSOR_ARCHITECTURE") and shell("echo %PROCESSOR_ARCHITECTURE%"), and both of them return "x86" instead of "AMD64" like cmd. I want to use this to run a 64 bit version of an external program if the OS is 64 bit, and the 32 bit version if not.http://msdn.microsoft.com/en-us/library/ms684139(v=vs.85).aspx -- Simen
Oct 09 2012