Posted By

sarat on 10/09/10


Tagged

Win32x64x86


Versions (?)

GetSystemInfo - x64


 / Published in: C++
 

URL: http://codereflect.com

  1. #include "stdafx.h"
  2. #include <Windows.h>
  3.  
  4. void displayPrcessorInfo( SYSTEM_INFO &stInfo )
  5. {
  6. switch( stInfo.wProcessorArchitecture )
  7. {
  8. case PROCESSOR_ARCHITECTURE_INTEL:
  9. printf( "Processor Architecture: Intel x86\n");
  10. break;
  11. case PROCESSOR_ARCHITECTURE_IA64:
  12. printf( "Processor Type: Intel x64\n");
  13. break;
  14. case PROCESSOR_ARCHITECTURE_AMD64:
  15. printf( "Processor Type: AMD 64\n");
  16. break;
  17. default:
  18. printf( "Unknown processor architecture\n");
  19. }
  20. }
  21.  
  22. int _tmain(int argc, _TCHAR* argv[])
  23. {
  24. SYSTEM_INFO stInfo;
  25. GetSystemInfo( &stInfo );
  26. displayPrcessorInfo(stInfo);
  27.  
  28. GetNativeSystemInfo( &stInfo );
  29. displayPrcessorInfo(stInfo);
  30. return 0;
  31. }

Report this snippet  

You need to login to post a comment.