Hi, Does anyone know a clean way to figure out wheter we are running 32 or 64 bit Windows ?
Regards,
@+Maarten,
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Dear Maarten,
>Does anyone know a clean way to figure out wheter we are running 32 or 64 bit Windows ? > If you do not already know whether the image itself is 32-bit or 64-bit, calling ObjectMemory is64Bit answers that one. Obviously, if the answer is true, you're on a 64-bit machine. If the answer is false, then on Windows, code like is32BitVWOn64BitWin := true. SystemUtils getEnvironmentVariable: 'PROCESSOR_ARCHITEW6432' ifAbsent: [is32BitVWOn64BitWin := false]. will decide whether your 32-bit image is running on a 32-bit machine or a 64-bit one. HTH Niall Ross _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Dear Maarten,
I don't know "ObjectMemory is64Bit" nor the environment variable "PROCESSOR_ARCHITEW6432". Be aware that there exists also an environment variable "PROCESSOR_ARCHITECTURE". You will have to check if this is the same as "PROCESSOR_ARCHITEW6432". At least looking for 'PROCESSOR_ARCHITECTURE' will not do the job. This is only detecting the capability of the CPU. Imagine running a 32 bit Windows on a 64 bit CPU. So much I know there is no easy way to determine if the application runs on a 32 or 64 bit Windows system. A better way would be the approach which is descripted in http://1code.codeplex.com/SourceControl/changeset/view/39074#842775. Best regards, Tom Grünewald ________ Carl Zeiss Industrielle Messtechnik GmbH Softwareentwicklung/Software Development T o m G r ü n e w a l d 73446 Oberkochen, Germany tel: +49.7364.20-8541 fax: +49.7364.20-4800 email: [hidden email] http://www.zeiss.de/imt Carl Zeiss Industrielle Messtechnik GmbH Carl-Zeiss-Straße 22, 73447 Oberkochen Aufsichtsratsvorsitzender: Dr. Michael Kaschke Geschäftsführer: Dr. Rainer Ohnheiser (Vorsitzender), Felix Hoben, Harald Klaiber Sitz der Gesellschaft: 73446 Oberkochen, Deutschland Handelsregister: Amtsgericht Ulm, HRB 501561 USt-IdNr.: DE 811 515 346 -----Ursprüngliche Nachricht----- Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Niall Ross Gesendet: Montag, 7. Juli 2014 18:52 An: [hidden email] Cc: VWNC Betreff: Re: [vwnc] 32 OS or 64 OS Dear Maarten, >Does anyone know a clean way to figure out wheter we are running 32 or 64 bit Windows ? > If you do not already know whether the image itself is 32-bit or 64-bit, calling ObjectMemory is64Bit answers that one. Obviously, if the answer is true, you're on a 64-bit machine. If the answer is false, then on Windows, code like is32BitVWOn64BitWin := true. SystemUtils getEnvironmentVariable: 'PROCESSOR_ARCHITEW6432' ifAbsent: [is32BitVWOn64BitWin := false]. will decide whether your 32-bit image is running on a 32-bit machine or a 64-bit one. HTH Niall Ross _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi Tom and Nial, Actually things didn't came clear from the environment variables as you pointed out. I wanted to open the ODBC configuration manager from windows which is different for 32 and 64 architectures. For the moment I just check the existance of the SysWoW64 directory crossing fingers that this is reliable ...
Thanks anyway.
Maarten,
> "Gruenewald, Tom" <[hidden email]> | > Dear Maarten, > I don't know "ObjectMemory is64Bit" nor the environment variable > "PROCESSOR_ARCHITEW6432". > > Be aware that there exists also an environment variable "PROCESSOR_ARCHITECTURE". > You will have to check if this is the same as "PROCESSOR_ARCHITEW6432". > At least looking for 'PROCESSOR_ARCHITECTURE' will not do the job. This is only > detecting the capability of the CPU. Imagine running a 32 bit Windows on a 64 bit > CPU. > So much I know there is no easy way to determine if the application runs on a 32 > or 64 bit Windows system. > A better way would be the approach which is descripted in > http://1code.codeplex.com/SourceControl/changeset/view/39074#842775. > > Best regards, > Tom Grünewald > > ________ > > Carl Zeiss Industrielle Messtechnik GmbH > Softwareentwicklung/Software Development > > T o m G r ü n e w a l d > > 73446 Oberkochen, Germany > tel: +49.7364.20-8541 > fax: +49.7364.20-4800 > email: [hidden email] > http://www.zeiss.de/imt > > Carl Zeiss Industrielle Messtechnik GmbH > Carl-Zeiss-Straße 22, 73447 Oberkochen > Aufsichtsratsvorsitzender: Dr. Michael Kaschke > Geschäftsführer: Dr. Rainer Ohnheiser (Vorsitzender), Felix Hoben, > Harald Klaiber > Sitz der Gesellschaft: 73446 Oberkochen, Deutschland > Handelsregister: Amtsgericht Ulm, HRB 501561 > USt-IdNr.: DE 811 515 346 > > > -----Ursprüngliche Nachricht----- > Von: [hidden email] [mailto:[hidden email]] Im Auftrag von > Niall Ross > Gesendet: Montag, 7. Juli 2014 18:52 > An: [hidden email] > Cc: VWNC > Betreff: Re: [vwnc] 32 OS or 64 OS > > Dear Maarten, > > >Does anyone know a clean way to figure out wheter we are running 32 or 64 bit > Windows ? > > > > If you do not already know whether the image itself is 32-bit or 64-bit, calling > > ObjectMemory is64Bit > > answers that one. Obviously, if the answer is true, you're on a 64-bit machine. > If the answer is false, then on Windows, code like > > is32BitVWOn64BitWin := true. > SystemUtils > getEnvironmentVariable: 'PROCESSOR_ARCHITEW6432' > ifAbsent: [is32BitVWOn64BitWin := false]. > > will decide whether your 32-bit image is running on a 32-bit machine or a 64-bit > one. > > HTH > Niall Ross > > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
The api call you are looking for is
IsWow64Process
in kernel.dll
http://msdn.microsoft.com/en-us/library/windows/desktop/ms684139(v=vs.85).aspx
From: [hidden email] [mailto:[hidden email]]
On Behalf Of [hidden email] Hi Tom and Nial, Actually things didn't came clear from the environment variables as you pointed out. I wanted to open the ODBC configuration manager from windows which is different for 32 and 64 architectures. For the moment I just check the existance of the SysWoW64 directory crossing fingers that this is reliable ... Thanks anyway. Maarten,
> "Gruenewald, Tom" <[hidden email]> | > Dear Maarten, _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |