如题,跪谢了

解决方案 »

  1.   

    kernel32.dll
    GetNativeSystemInfo()根据返回的stSystemInfo.wProcessorArchitecture;
      

  2.   

    不知道行不?
    http://www.codeproject.com/KB/system/camel.aspx
      

  3.   

    感谢1楼的回答,wProcessorArchitecture存放的WORD类型的,如何使用啊
      

  4.   

    <winnt.h>
    #define PROCESSOR_ARCHITECTURE_AMD64            9
      

  5.   

    LPSYSTEM_INFO lpSystemInfo=new SYSTEM_INFO;

    GetNativeSystemInfo(lpSystemInfo);
    if(lpSystemInfo->wProcessorArchitecture==PROCESSOR_ARCHITECTURE_UNKNOWN)
    MessageBox("无法获得当前版本信息");
    if(lpSystemInfo->wProcessorArchitecture==PROCESSOR_ARCHITECTURE_INTEL)
    MessageBox("Windows   Me/98/95");
    if(lpSystemInfo->wProcessorArchitecture==PROCESSOR_ARCHITECTURE_MIPS)
    MessageBox("Windows   NT   3.51");
    if(lpSystemInfo->wProcessorArchitecture==PROCESSOR_ARCHITECTURE_ALPHA)
    MessageBox("Windows   NT   4.0   and   earlier ALPHA");
    if(lpSystemInfo->wProcessorArchitecture==PROCESSOR_ARCHITECTURE_PPC)
    MessageBox("Windows   NT   4.0   and   earlier PPC");
    if(lpSystemInfo->wProcessorArchitecture==PROCESSOR_ARCHITECTURE_IA64)
    MessageBox("64-bit   Windows IA64");
    if(lpSystemInfo->wProcessorArchitecture==PROCESSOR_ARCHITECTURE_IA32_ON_WIN64)
    MessageBox("64-bit   Windows IA32_ON_WIN64");
    if(lpSystemInfo->wProcessorArchitecture==PROCESSOR_ARCHITECTURE_AMD64)
    MessageBox("64-bit   Windows AMD64");
    delete lpSystemInfo
    无论如何都是MessageBox("Windows   Me/98/95")他的值好像是0.换到其他系统运行也是一样
      

  6.   

    int a;
    int b=sizeof(a);
    判断b是4 或者8 是否可行?