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.

217 lines
7.1 KiB

  1. /*****************************************************************************\
  2. * *
  3. * winver.h - Version management functions, types, and definitions *
  4. * *
  5. * Include file for VER.DLL. This library is *
  6. * designed to allow version stamping of Windows executable files*
  7. * and of special .VER files for DOS executable files. *
  8. * *
  9. * Copyright (c) Microsoft Corporation. All rights reserved. *
  10. * *
  11. \*****************************************************************************/
  12. #ifndef VER_H
  13. #define VER_H
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. /* ----- Symbols ----- */
  18. #define VS_FILE_INFO RT_VERSION
  19. #define VS_VERSION_INFO 1
  20. #define VS_USER_DEFINED 100
  21. /* ----- VS_VERSION.dwFileFlags ----- */
  22. #ifndef _MAC
  23. #define VS_FFI_SIGNATURE 0xFEEF04BDL
  24. #else
  25. #define VS_FFI_SIGNATURE 0xBD04EFFEL
  26. #endif
  27. #define VS_FFI_STRUCVERSION 0x00010000L
  28. #define VS_FFI_FILEFLAGSMASK 0x0000003FL
  29. /* ----- VS_VERSION.dwFileFlags ----- */
  30. #define VS_FF_DEBUG 0x00000001L
  31. #define VS_FF_PRERELEASE 0x00000002L
  32. #define VS_FF_PATCHED 0x00000004L
  33. #define VS_FF_PRIVATEBUILD 0x00000008L
  34. #define VS_FF_INFOINFERRED 0x00000010L
  35. #define VS_FF_SPECIALBUILD 0x00000020L
  36. /* ----- VS_VERSION.dwFileOS ----- */
  37. #define VOS_UNKNOWN 0x00000000L
  38. #define VOS_DOS 0x00010000L
  39. #define VOS_OS216 0x00020000L
  40. #define VOS_OS232 0x00030000L
  41. #define VOS_NT 0x00040000L
  42. #define VOS__BASE 0x00000000L
  43. #define VOS__WINDOWS16 0x00000001L
  44. #define VOS__PM16 0x00000002L
  45. #define VOS__PM32 0x00000003L
  46. #define VOS__WINDOWS32 0x00000004L
  47. #define VOS_DOS_WINDOWS16 0x00010001L
  48. #define VOS_DOS_WINDOWS32 0x00010004L
  49. #define VOS_OS216_PM16 0x00020002L
  50. #define VOS_OS232_PM32 0x00030003L
  51. #define VOS_NT_WINDOWS32 0x00040004L
  52. /* ----- VS_VERSION.dwFileType ----- */
  53. #define VFT_UNKNOWN 0x00000000L
  54. #define VFT_APP 0x00000001L
  55. #define VFT_DLL 0x00000002L
  56. #define VFT_DRV 0x00000003L
  57. #define VFT_FONT 0x00000004L
  58. #define VFT_VXD 0x00000005L
  59. #define VFT_STATIC_LIB 0x00000007L
  60. /* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV ----- */
  61. #define VFT2_UNKNOWN 0x00000000L
  62. #define VFT2_DRV_PRINTER 0x00000001L
  63. #define VFT2_DRV_KEYBOARD 0x00000002L
  64. #define VFT2_DRV_LANGUAGE 0x00000003L
  65. #define VFT2_DRV_DISPLAY 0x00000004L
  66. #define VFT2_DRV_MOUSE 0x00000005L
  67. #define VFT2_DRV_NETWORK 0x00000006L
  68. #define VFT2_DRV_SYSTEM 0x00000007L
  69. #define VFT2_DRV_INSTALLABLE 0x00000008L
  70. #define VFT2_DRV_SOUND 0x00000009L
  71. #define VFT2_DRV_COMM 0x0000000AL
  72. #define VFT2_DRV_INPUTMETHOD 0x0000000BL
  73. #define VFT2_DRV_VERSIONED_PRINTER 0x0000000CL
  74. /* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT ----- */
  75. #define VFT2_FONT_RASTER 0x00000001L
  76. #define VFT2_FONT_VECTOR 0x00000002L
  77. #define VFT2_FONT_TRUETYPE 0x00000003L
  78. /* ----- VerFindFile() flags ----- */
  79. #define VFFF_ISSHAREDFILE 0x0001
  80. #define VFF_CURNEDEST 0x0001
  81. #define VFF_FILEINUSE 0x0002
  82. #define VFF_BUFFTOOSMALL 0x0004
  83. /* ----- VerInstallFile() flags ----- */
  84. #define VIFF_FORCEINSTALL 0x0001
  85. #define VIFF_DONTDELETEOLD 0x0002
  86. #define VIF_TEMPFILE 0x00000001L
  87. #define VIF_MISMATCH 0x00000002L
  88. #define VIF_SRCOLD 0x00000004L
  89. #define VIF_DIFFLANG 0x00000008L
  90. #define VIF_DIFFCODEPG 0x00000010L
  91. #define VIF_DIFFTYPE 0x00000020L
  92. #define VIF_WRITEPROT 0x00000040L
  93. #define VIF_FILEINUSE 0x00000080L
  94. #define VIF_OUTOFSPACE 0x00000100L
  95. #define VIF_ACCESSVIOLATION 0x00000200L
  96. #define VIF_SHARINGVIOLATION 0x00000400L
  97. #define VIF_CANNOTCREATE 0x00000800L
  98. #define VIF_CANNOTDELETE 0x00001000L
  99. #define VIF_CANNOTRENAME 0x00002000L
  100. #define VIF_CANNOTDELETECUR 0x00004000L
  101. #define VIF_OUTOFMEMORY 0x00008000L
  102. #define VIF_CANNOTREADSRC 0x00010000L
  103. #define VIF_CANNOTREADDST 0x00020000L
  104. #define VIF_BUFFTOOSMALL 0x00040000L
  105. #define VIF_CANNOTLOADLZ32 0x00080000L
  106. #define VIF_CANNOTLOADCABINET 0x00100000L
  107. #ifndef RC_INVOKED /* RC doesn't need to see the rest of this */
  108. /* ----- Types and structures ----- */
  109. typedef struct tagVS_FIXEDFILEINFO
  110. {
  111. DWORD dwSignature; /* e.g. 0xfeef04bd */
  112. DWORD dwStrucVersion; /* e.g. 0x00000042 = "0.42" */
  113. DWORD dwFileVersionMS; /* e.g. 0x00030075 = "3.75" */
  114. DWORD dwFileVersionLS; /* e.g. 0x00000031 = "0.31" */
  115. DWORD dwProductVersionMS; /* e.g. 0x00030010 = "3.10" */
  116. DWORD dwProductVersionLS; /* e.g. 0x00000031 = "0.31" */
  117. DWORD dwFileFlagsMask; /* = 0x3F for version "0.42" */
  118. DWORD dwFileFlags; /* e.g. VFF_DEBUG | VFF_PRERELEASE */
  119. DWORD dwFileOS; /* e.g. VOS_DOS_WINDOWS16 */
  120. DWORD dwFileType; /* e.g. VFT_DRIVER */
  121. DWORD dwFileSubtype; /* e.g. VFT2_DRV_KEYBOARD */
  122. DWORD dwFileDateMS; /* e.g. 0 */
  123. DWORD dwFileDateLS; /* e.g. 0 */
  124. } VS_FIXEDFILEINFO;
  125. /* ----- Function prototypes ----- */
  126. DWORD
  127. APIENTRY
  128. VerFindFile%(
  129. DWORD uFlags,
  130. LPTSTR% szFileName,
  131. LPTSTR% szWinDir,
  132. LPTSTR% szAppDir,
  133. LPTSTR% szCurDir,
  134. PUINT lpuCurDirLen,
  135. LPTSTR% szDestDir,
  136. PUINT lpuDestDirLen
  137. );
  138. DWORD
  139. APIENTRY
  140. VerInstallFile%(
  141. DWORD uFlags,
  142. LPTSTR% szSrcFileName,
  143. LPTSTR% szDestFileName,
  144. LPTSTR% szSrcDir,
  145. LPTSTR% szDestDir,
  146. LPTSTR% szCurDir,
  147. LPTSTR% szTmpFile,
  148. PUINT lpuTmpFileLen
  149. );
  150. /* Returns size of version info in bytes */
  151. DWORD
  152. APIENTRY
  153. GetFileVersionInfoSize%(
  154. LPTSTR% lptstrFilename, /* Filename of version stamped file */
  155. LPDWORD lpdwHandle
  156. ); /* Information for use by GetFileVersionInfo */
  157. /* Read version info into buffer */
  158. BOOL
  159. APIENTRY
  160. GetFileVersionInfo%(
  161. LPTSTR% lptstrFilename, /* Filename of version stamped file */
  162. DWORD dwHandle, /* Information from GetFileVersionSize */
  163. DWORD dwLen, /* Length of buffer for info */
  164. LPVOID lpData
  165. ); /* Buffer to place the data structure */
  166. DWORD
  167. APIENTRY
  168. VerLanguageName%(
  169. DWORD wLang,
  170. LPTSTR% szLang,
  171. DWORD nSize
  172. );
  173. BOOL
  174. APIENTRY
  175. VerQueryValue%(
  176. const LPVOID pBlock,
  177. LPTSTR% lpSubBlock,
  178. LPVOID * lplpBuffer,
  179. PUINT puLen
  180. );
  181. #endif /* !RC_INVOKED */
  182. #ifdef __cplusplus
  183. }
  184. #endif
  185. #endif /* !VER_H */