32 OS or 64 OS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

32 OS or 64 OS

Maarten Mostert

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
Reply | Threaded
Open this post in threaded view
|

Re: 32 OS or 64 OS

Niall Ross
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
Reply | Threaded
Open this post in threaded view
|

Re: 32 OS or 64 OS

Gruenewald, Tom-2
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
Reply | Threaded
Open this post in threaded view
|

Re: 32 OS or 64 OS

Maarten Mostert

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
Reply | Threaded
Open this post in threaded view
|

Re: 32 OS or 64 OS

Henrik Høyer

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

 

 


Henrik Høyer
Chief Software Architect
[hidden email] • (+45) 4029 2092
Tigervej 27 • 4600 Køge
www.sPeople.dk • (+45) 7023 7775


From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email]
Sent: 9. juli 2014 21:54
To: Gruenewald, Tom
Cc: VWNC
Subject: Re: [vwnc] 32 OS or 64 OS

 

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] [[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