Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.2 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993.
  5. //
  6. // File: bmconfig.cxx
  7. //
  8. // Contents: configuration inquiry and reporting
  9. //
  10. // Classes:
  11. //
  12. // Functions: ReportBMConfig
  13. //
  14. // History: 2-July-93 t-martig Created
  15. //
  16. //--------------------------------------------------------------------------
  17. #include <benchmrk.hxx>
  18. #include <bmdriver.hxx>
  19. //+-------------------------------------------------------------------
  20. //
  21. // Function: ReportBMConfig
  22. //
  23. // Synopsis: Writes the current system / hardware configuration
  24. // to a specified output class
  25. //
  26. // Parameters: [lpswzConfigFile] Name and path of .ini file
  27. // [output] Output class
  28. //
  29. // History: 2-July-93 t-martig Created
  30. //
  31. //--------------------------------------------------------------------
  32. void ReportBMConfig (CTestInput &input, CTestOutput &output)
  33. {
  34. TCHAR cname[MAX_COMPUTERNAME_LENGTH+1];
  35. SYSTEM_INFO sinf;
  36. TCHAR *temp;
  37. DWORD dwSize = MAX_COMPUTERNAME_LENGTH+1;
  38. GetComputerName (cname, &dwSize);
  39. output.WriteTextString (cname);
  40. output.WriteString (TEXT("\t"));
  41. output.WriteConfigEntry (input, TEXT("Config"), TEXT("Mfg"), TEXT("n/a"));
  42. GetSystemInfo (&sinf);
  43. switch (sinf.dwProcessorType)
  44. {
  45. case 386:
  46. temp = TEXT("i386");
  47. break;
  48. case 486:
  49. temp = TEXT("i486");
  50. break;
  51. case 860:
  52. temp = TEXT("i860");
  53. break;
  54. case 2000:
  55. temp = TEXT("R2000");
  56. break;
  57. case 3000:
  58. temp = TEXT("R3000");
  59. break;
  60. case 4000:
  61. temp = TEXT("R4000");
  62. break;
  63. default:
  64. temp = TEXT("Unknown");
  65. break;
  66. }
  67. output.WriteString (TEXT("\t"));
  68. output.WriteConfigEntry (input, TEXT("Config"), TEXT("CPU"), temp);
  69. output.WriteString (TEXT("\t"));
  70. output.WriteConfigEntry (input, TEXT("Config"), TEXT("RAM"), TEXT("n/a"));
  71. output.WriteString (TEXT("\t"));
  72. output.WriteConfigEntry (input, TEXT("Config"), TEXT("OS"), TEXT("Cairo"));
  73. output.WriteString (TEXT("\t"));
  74. output.WriteConfigEntry (input, TEXT("Driver"), TEXT("InitFlag"), TEXT("COINIT_MULTITHREADED"));
  75. output.WriteString (TEXT("\n\t\t\t\t"));
  76. output.WriteString (TEXT("All times in microseconds\n"));
  77. // NtQuerySystemInformation
  78. }