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.

95 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. version.h
  5. Abstract:
  6. Declares the structures used for version checkings.
  7. Author:
  8. Calin Negreanu (calinn) 01/20/1999
  9. Revision History:
  10. --*/
  11. #pragma once
  12. #include <windows.h>
  13. #include <winnt.h>
  14. #define MAX_TRANSLATION 32
  15. typedef struct {
  16. WORD CodePage;
  17. WORD Language;
  18. } TRANSLATION, *PTRANSLATION;
  19. typedef struct {
  20. PBYTE VersionBuffer;
  21. PTRANSLATION Translations;
  22. PBYTE StringBuffer;
  23. UINT Size;
  24. DWORD Handle;
  25. VS_FIXEDFILEINFO *FixedInfo;
  26. UINT FixedInfoSize;
  27. TCHAR TranslationStr[MAX_TRANSLATION];
  28. UINT MaxTranslations;
  29. UINT CurrentTranslation;
  30. UINT CurrentDefaultTranslation;
  31. PCTSTR FileSpec;
  32. PCTSTR VersionField;
  33. } VERSION_STRUCT, *PVERSION_STRUCT;
  34. BOOL
  35. ShCreateVersionStruct (
  36. OUT PVERSION_STRUCT VersionStruct,
  37. IN PCTSTR FileSpec
  38. );
  39. VOID
  40. ShDestroyVersionStruct (
  41. IN PVERSION_STRUCT VersionStruct
  42. );
  43. ULONGLONG
  44. ShVerGetFileVer (
  45. IN PVERSION_STRUCT VersionStruct
  46. );
  47. ULONGLONG
  48. ShVerGetProductVer (
  49. IN PVERSION_STRUCT VersionStruct
  50. );
  51. DWORD
  52. ShVerGetFileDateLo (
  53. IN PVERSION_STRUCT VersionStruct
  54. );
  55. DWORD
  56. ShVerGetFileDateHi (
  57. IN PVERSION_STRUCT VersionStruct
  58. );
  59. DWORD
  60. ShVerGetFileVerOs (
  61. IN PVERSION_STRUCT VersionStruct
  62. );
  63. DWORD
  64. ShVerGetFileVerType (
  65. IN PVERSION_STRUCT VersionStruct
  66. );
  67. BOOL
  68. ShGlobalVersionCheck (
  69. IN PVERSION_STRUCT VersionData,
  70. IN PCTSTR NameToCheck,
  71. IN PCTSTR ValueToCheck
  72. );