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.

82 lines
2.1 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // File: cmplat.h
  4. //
  5. // Module: CMSETUP.LIB
  6. //
  7. // Synopsis: Definition of the CPlatform class.
  8. //
  9. // Copyright (c) 1997-1999 Microsoft Corporation
  10. //
  11. // Author: quintinb Created Header 08/19/99
  12. //
  13. //+----------------------------------------------------------------------------
  14. #ifndef __CMPLAT_H
  15. #define __CMPLAT_H
  16. #include <windows.h>
  17. //________________________________________________________________________________
  18. //
  19. // Class: CPlatform
  20. //
  21. // Synopsis: .instantiate one of these then query it with any of the member
  22. // functions.
  23. //
  24. // Public Interface Include :
  25. // IsX86();
  26. // IsAlpha();
  27. // IsWin95();
  28. // IsWin98();
  29. // IsWin9x();
  30. // IsNT31();
  31. // IsNT351();
  32. // IsNT4();
  33. // IsNT5();
  34. // IsNT();
  35. // Notes: m_ClassState enum is very valuable. All new functions should make use of it.
  36. //
  37. // History: a-anasj Created 2/04/1998
  38. //
  39. //________________________________________________________________________________
  40. class CPlatform
  41. {
  42. public:
  43. enum e_ClassState{good,bad};
  44. CPlatform();
  45. BOOL IsX86();
  46. BOOL IsAlpha();
  47. BOOL IsIA64();
  48. BOOL IsWin95Gold(); // only build 950
  49. BOOL IsWin95(); // any win95 build up one before the memphis builds
  50. BOOL IsWin98Gold();
  51. BOOL IsWin98Sr();
  52. BOOL IsWin98();
  53. BOOL IsWin9x();
  54. BOOL IsNT31();
  55. BOOL IsNT351();
  56. BOOL IsNT4();
  57. BOOL IsNT5();
  58. BOOL IsNT51();
  59. BOOL IsAtLeastNT5();
  60. BOOL IsAtLeastNT51();
  61. BOOL IsNT();
  62. BOOL IsNTSrv();
  63. BOOL IsNTWks();
  64. private:
  65. DWORD ServicePack(int spNum){return 0;}; //Not implemented
  66. BOOL IsOS(DWORD OS, DWORD buildNum);
  67. BOOL IsOSExact(DWORD OS, DWORD buildNum);
  68. SYSTEM_INFO m_SysInfo;
  69. OSVERSIONINFO m_OSVer;
  70. e_ClassState m_ClassState;
  71. };
  72. #endif // __CMPLAT_H