GetSystemInfo - x64


/ Published in: C++
Save to your folder(s)



Copy this code and paste it in your HTML
  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. }

URL: http://codereflect.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.