Click to See Complete Forum and Search --> : Detecting 64-bit Vista


tle
September 19th, 2006, 03:04 PM
Hi all,

I saw this sample code on how to detect Windows Vista & Longhorn on MSDN website but it doesn't show how to distinguish 32-bit and 64-bit versions. When I tried to get the processor architecture data on Intel Xeon system that has 32-bit Vista installed, the result I got back is PROCESSOR_ARCHITECTURE_AMD64, which is not correct. Could you help?

The sample codes on MSDN:

if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0 )
{
if( osvi.wProductType == VER_NT_WORKSTATION )
printf ("Microsoft Windows Vista ");
else printf ("Windows Server \"Longhorn\" " );
}


Thanks