Manas

I have a 64 bit Intel processor but i have installed a 32 bit OS on it. I need to find out programmatically the "bits" of my processor. GetSystemInfo() gives same value for both 32 bit processor and 64 bit processor with the same 32 bit OS installed on each one of them.

Thanks in advance



Re: Visual C++ Express Edition How to get the "Bits" of my Processor programmatically.

einaros

Use WMI and retrieve the Win32_Processor -> AddressWidth or Description field.





Re: Visual C++ Express Edition How to get the "Bits" of my Processor programmatically.

Manas

I used WMI but it is not giving the correct information..

The AddressWidth in both the cases are 32 only...

Is there any other way, through assembly ...

I am using Windows Server 2003 as the OS and have the processor is a 64 bit one ...





Re: Visual C++ Express Edition How to get the "Bits" of my Processor programmatically.

einaros

And what does the description field show Did you enumerate all members of the Win32_Processor class





Re: Visual C++ Express Edition How to get the "Bits" of my Processor programmatically.

Manas

In 32 bit system the description field shows - x86 Family 15 Model 3 Stepping 3

In 64 bit system the description field shows - x86 Family 15 Model 79 Stepping 2

All other fields were also not able to differentiate the processor bit type.





Re: Visual C++ Express Edition How to get the "Bits" of my Processor programmatically.

einaros

Well I could expect AddressWidth to return whatever the currently running OS' address width was, but I'd really think description would show the real features of the CPU. In either case, have you grabbed yourself a WMI explorer and gone through all the relevant keys and classes Something may be stored away there somewhere.

If the WMI approach comes up short, you can turn your attention to solutions using the cpuid instruction, such as http://www3.intel.com/cd/ids/developer/asmo-na/eng/275339.htm.