简单判断系统是否是Windows 64位

#include "stdafx.h"
#include <windows.h>
#include <iostream>

using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{
	SYSTEM_INFO sysInfo;
	GetNativeSystemInfo(&sysInfo);

	if (sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
	{
		cout<<"64"<<endl;
	}
	else
	{
		cout<<"32"<<endl;
	}

	getchar();
	return 0;
}




你可能感兴趣的:(windows,System,include)