Discussion:
Incorrect value for Environ() in VB6 in AMD64 machine
(too old to reply)
Anamika
2007-10-17 16:58:01 UTC
Permalink
Hi ,

I have a VB6 application with a call Environ(PROCESSOR_ARCHITECTURE).This
is working as expected in x86 machines, but in an AMD64 machine,this call
returned the value x86.The environment variable string PROCESSOR_ARCHITECTURE
and the regkey HKLM\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment\PROCESSOR_ARCHITECTURE is having a value of AMD64.

Is this a known behaviour?

Thanks
Ken Halter
2007-10-17 17:53:21 UTC
Permalink
Post by Anamika
Hi ,
I have a VB6 application with a call
Environ(PROCESSOR_ARCHITECTURE).This
is working as expected in x86 machines, but in an AMD64 machine,this call
returned the value x86.The environment variable string
PROCESSOR_ARCHITECTURE
and the regkey HKLM\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment\PROCESSOR_ARCHITECTURE is having a value of AMD64.
Is this a known behaviour?
Thanks
fwiw, these are environment settings for my work PC. It has an Intel 3.4ghz
hyperthreading processor on XP-Pro SP2

NUMBER_OF_PROCESSORS=2
OS=Windows_NT
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0401

It's not the processor. It's the utility that sets the environment. fwiw,
I've never owned an Intel processor. Since PC day 1, I've owned nothing but
AMD.
--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm
Anamika
2007-10-17 19:46:02 UTC
Permalink
Thanks for the reply.The call Environ(PROCESSOR_ARCHITECTURE) was used to
differentiate between x86 & x64 platforms.

The 64 bit machine had the following environment set

PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=EM64T Family 15 Model 4 Stepping 1, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0401

In a Vb6 environment,What is the method to distinguish between 32 bit & 64
bit platforms ?

Thanks
Post by Ken Halter
Post by Anamika
Hi ,
I have a VB6 application with a call
Environ(PROCESSOR_ARCHITECTURE).This
is working as expected in x86 machines, but in an AMD64 machine,this call
returned the value x86.The environment variable string
PROCESSOR_ARCHITECTURE
and the regkey HKLM\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment\PROCESSOR_ARCHITECTURE is having a value of AMD64.
Is this a known behaviour?
Thanks
fwiw, these are environment settings for my work PC. It has an Intel 3.4ghz
hyperthreading processor on XP-Pro SP2
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0401
It's not the processor. It's the utility that sets the environment. fwiw,
I've never owned an Intel processor. Since PC day 1, I've owned nothing but
AMD.
--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm
Loading...