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.

75 lines
2.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1998.
  5. //
  6. // File: platform.h
  7. //
  8. // Contents: Platform Challenge data structures and functions.
  9. //
  10. // History: 02-19-98 FredCh Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #ifndef _PLATFORM_H_
  14. #define _PLATFORM_H_
  15. ///////////////////////////////////////////////////////////////////////////////
  16. //
  17. // Definition of the platform ID.
  18. //
  19. // The platform ID is made up of portions:
  20. // The most significant BYTE is used for identifying the OS platform which the
  21. // client is running and the second most significant BYTE is used for identifying
  22. // the ISV that has provided the client image. The last 2 bytes are used by
  23. // the ISV to specify the build of the client image.
  24. //
  25. // When supplying the platform ID for platform challenge, the client will use
  26. // the logical OR value of the OS and IMAGE identifiers. For example, a
  27. // Microsoft win32 build 356 client running on WINNT 4.0 will give the platform
  28. // value of:
  29. //
  30. // CLIENT_OS_ID_WINNT_40 | CLIENT_IMAGE_ID_MICROSOFT | 0x00000164
  31. //
  32. #define CLIENT_OS_ID_WINNT_351 0x01000000
  33. #define CLIENT_OS_ID_WINNT_40 0x02000000
  34. #define CLIENT_OS_ID_WINNT_50 0x03000000
  35. #define CLIENT_OS_ID_MINOR_WINNT_51 0x00000001
  36. #define CLIENT_OS_ID_WINNT_POST_51 0x04000000
  37. #define CLIENT_OS_ID_OTHER 0xFF000000
  38. #define CLIENT_OS_INDEX_OTHER 0x00000000
  39. #define CLIENT_OS_INDEX_WINNT_50 0x00000001
  40. #define CLIENT_OS_INDEX_WINNT_51 0x00000002
  41. #define CLIENT_OS_INDEX_WINNT_POST_51 0x00000003
  42. #define CLIENT_IMAGE_ID_MICROSOFT 0x00010000
  43. #define CLIENT_IMAGE_ID_CITRIX 0x00020000
  44. ///////////////////////////////////////////////////////////////////////////////
  45. //
  46. // Macros for getting the individual component of the platform ID
  47. //
  48. #define GetOSId( _PlatformId ) \
  49. _PlatformId & 0xFF000000
  50. #define GetImageId( _PlatformId ) \
  51. _PlatformId & 0x00FF0000
  52. #define GetImageRevision( _PlatformId ) \
  53. _PlatformId & 0x0000FFFF
  54. ///////////////////////////////////////////////////////////////////////////////
  55. //
  56. // platform challenge is 128 bits random number
  57. //
  58. #define PLATFORM_CHALLENGE_SIZE 16
  59. #define PLATFORM_CHALLENGE_IMAGE_FILE_SIZE 16384
  60. #endif