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.

307 lines
9.2 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) 1993-1995, Microsoft Corp. 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. #define VS_FFI_SIGNATURE 0xFEEF04BDL
  23. #define VS_FFI_STRUCVERSION 0x00010000L
  24. #define VS_FFI_FILEFLAGSMASK 0x0000003FL
  25. /* ----- VS_VERSION.dwFileFlags ----- */
  26. #define VS_FF_DEBUG 0x00000001L
  27. #define VS_FF_PRERELEASE 0x00000002L
  28. #define VS_FF_PATCHED 0x00000004L
  29. #define VS_FF_PRIVATEBUILD 0x00000008L
  30. #define VS_FF_INFOINFERRED 0x00000010L
  31. #define VS_FF_SPECIALBUILD 0x00000020L
  32. /* ----- VS_VERSION.dwFileOS ----- */
  33. #define VOS_UNKNOWN 0x00000000L
  34. #define VOS_DOS 0x00010000L
  35. #define VOS_OS216 0x00020000L
  36. #define VOS_OS232 0x00030000L
  37. #define VOS_NT 0x00040000L
  38. #define VOS__BASE 0x00000000L
  39. #define VOS__WINDOWS16 0x00000001L
  40. #define VOS__PM16 0x00000002L
  41. #define VOS__PM32 0x00000003L
  42. #define VOS__WINDOWS32 0x00000004L
  43. #define VOS_DOS_WINDOWS16 0x00010001L
  44. #define VOS_DOS_WINDOWS32 0x00010004L
  45. #define VOS_OS216_PM16 0x00020002L
  46. #define VOS_OS232_PM32 0x00030003L
  47. #define VOS_NT_WINDOWS32 0x00040004L
  48. /* ----- VS_VERSION.dwFileType ----- */
  49. #define VFT_UNKNOWN 0x00000000L
  50. #define VFT_APP 0x00000001L
  51. #define VFT_DLL 0x00000002L
  52. #define VFT_DRV 0x00000003L
  53. #define VFT_FONT 0x00000004L
  54. #define VFT_VXD 0x00000005L
  55. #define VFT_STATIC_LIB 0x00000007L
  56. /* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV ----- */
  57. #define VFT2_UNKNOWN 0x00000000L
  58. #define VFT2_DRV_PRINTER 0x00000001L
  59. #define VFT2_DRV_KEYBOARD 0x00000002L
  60. #define VFT2_DRV_LANGUAGE 0x00000003L
  61. #define VFT2_DRV_DISPLAY 0x00000004L
  62. #define VFT2_DRV_MOUSE 0x00000005L
  63. #define VFT2_DRV_NETWORK 0x00000006L
  64. #define VFT2_DRV_SYSTEM 0x00000007L
  65. #define VFT2_DRV_INSTALLABLE 0x00000008L
  66. #define VFT2_DRV_SOUND 0x00000009L
  67. #define VFT2_DRV_COMM 0x0000000AL
  68. #define VFT2_DRV_INPUTMETHOD 0x0000000BL
  69. /* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT ----- */
  70. #define VFT2_FONT_RASTER 0x00000001L
  71. #define VFT2_FONT_VECTOR 0x00000002L
  72. #define VFT2_FONT_TRUETYPE 0x00000003L
  73. /* ----- VerFindFile() flags ----- */
  74. #define VFFF_ISSHAREDFILE 0x0001
  75. #define VFF_CURNEDEST 0x0001
  76. #define VFF_FILEINUSE 0x0002
  77. #define VFF_BUFFTOOSMALL 0x0004
  78. /* ----- VerInstallFile() flags ----- */
  79. #define VIFF_FORCEINSTALL 0x0001
  80. #define VIFF_DONTDELETEOLD 0x0002
  81. #define VIF_TEMPFILE 0x00000001L
  82. #define VIF_MISMATCH 0x00000002L
  83. #define VIF_SRCOLD 0x00000004L
  84. #define VIF_DIFFLANG 0x00000008L
  85. #define VIF_DIFFCODEPG 0x00000010L
  86. #define VIF_DIFFTYPE 0x00000020L
  87. #define VIF_WRITEPROT 0x00000040L
  88. #define VIF_FILEINUSE 0x00000080L
  89. #define VIF_OUTOFSPACE 0x00000100L
  90. #define VIF_ACCESSVIOLATION 0x00000200L
  91. #define VIF_SHARINGVIOLATION 0x00000400L
  92. #define VIF_CANNOTCREATE 0x00000800L
  93. #define VIF_CANNOTDELETE 0x00001000L
  94. #define VIF_CANNOTRENAME 0x00002000L
  95. #define VIF_CANNOTDELETECUR 0x00004000L
  96. #define VIF_OUTOFMEMORY 0x00008000L
  97. #define VIF_CANNOTREADSRC 0x00010000L
  98. #define VIF_CANNOTREADDST 0x00020000L
  99. #define VIF_BUFFTOOSMALL 0x00040000L
  100. #ifndef RC_INVOKED /* RC doesn't need to see the rest of this */
  101. /* ----- Types and structures ----- */
  102. typedef struct tagVS_FIXEDFILEINFO
  103. {
  104. DWORD dwSignature; /* e.g. 0xfeef04bd */
  105. DWORD dwStrucVersion; /* e.g. 0x00000042 = "0.42" */
  106. DWORD dwFileVersionMS; /* e.g. 0x00030075 = "3.75" */
  107. DWORD dwFileVersionLS; /* e.g. 0x00000031 = "0.31" */
  108. DWORD dwProductVersionMS; /* e.g. 0x00030010 = "3.10" */
  109. DWORD dwProductVersionLS; /* e.g. 0x00000031 = "0.31" */
  110. DWORD dwFileFlagsMask; /* = 0x3F for version "0.42" */
  111. DWORD dwFileFlags; /* e.g. VFF_DEBUG | VFF_PRERELEASE */
  112. DWORD dwFileOS; /* e.g. VOS_DOS_WINDOWS16 */
  113. DWORD dwFileType; /* e.g. VFT_DRIVER */
  114. DWORD dwFileSubtype; /* e.g. VFT2_DRV_KEYBOARD */
  115. DWORD dwFileDateMS; /* e.g. 0 */
  116. DWORD dwFileDateLS; /* e.g. 0 */
  117. } VS_FIXEDFILEINFO;
  118. /* ----- Function prototypes ----- */
  119. #ifndef UNICODE_ONLY
  120. DWORD
  121. APIENTRY
  122. VerFindFileA(
  123. DWORD uFlags,
  124. LPSTR szFileName,
  125. LPSTR szWinDir,
  126. LPSTR szAppDir,
  127. LPSTR szCurDir,
  128. PUINT lpuCurDirLen,
  129. LPSTR szDestDir,
  130. PUINT lpuDestDirLen
  131. );
  132. #endif //!UNICODE_ONLY
  133. #ifndef ANSI_ONLY
  134. DWORD
  135. APIENTRY
  136. VerFindFileW(
  137. DWORD uFlags,
  138. LPWSTR szFileName,
  139. LPWSTR szWinDir,
  140. LPWSTR szAppDir,
  141. LPWSTR szCurDir,
  142. PUINT lpuCurDirLen,
  143. LPWSTR szDestDir,
  144. PUINT lpuDestDirLen
  145. );
  146. #endif //!ANSI_ONLY
  147. #ifdef UNICODE
  148. #define VerFindFile VerFindFileW
  149. #else
  150. #define VerFindFile VerFindFileA
  151. #endif // !UNICODE
  152. #ifndef UNICODE_ONLY
  153. DWORD
  154. APIENTRY
  155. VerInstallFileA(
  156. DWORD uFlags,
  157. LPSTR szSrcFileName,
  158. LPSTR szDestFileName,
  159. LPSTR szSrcDir,
  160. LPSTR szDestDir,
  161. LPSTR szCurDir,
  162. LPSTR szTmpFile,
  163. PUINT lpuTmpFileLen
  164. );
  165. #endif //!UNICODE_ONLY
  166. #ifndef ANSI_ONLY
  167. DWORD
  168. APIENTRY
  169. VerInstallFileW(
  170. DWORD uFlags,
  171. LPWSTR szSrcFileName,
  172. LPWSTR szDestFileName,
  173. LPWSTR szSrcDir,
  174. LPWSTR szDestDir,
  175. LPWSTR szCurDir,
  176. LPWSTR szTmpFile,
  177. PUINT lpuTmpFileLen
  178. );
  179. #endif //!ANSI_ONLY
  180. #ifdef UNICODE
  181. #define VerInstallFile VerInstallFileW
  182. #else
  183. #define VerInstallFile VerInstallFileA
  184. #endif // !UNICODE
  185. /* Returns size of version info in bytes */
  186. DWORD
  187. APIENTRY
  188. GetFileVersionInfoSizeA(
  189. LPSTR lptstrFilename, /* Filename of version stamped file */
  190. LPDWORD lpdwHandle
  191. ); /* Information for use by GetFileVersionInfo */
  192. /* Returns size of version info in bytes */
  193. DWORD
  194. APIENTRY
  195. GetFileVersionInfoSizeW(
  196. LPWSTR lptstrFilename, /* Filename of version stamped file */
  197. LPDWORD lpdwHandle
  198. ); /* Information for use by GetFileVersionInfo */
  199. #ifdef UNICODE
  200. #define GetFileVersionInfoSize GetFileVersionInfoSizeW
  201. #else
  202. #define GetFileVersionInfoSize GetFileVersionInfoSizeA
  203. #endif // !UNICODE
  204. /* Read version info into buffer */
  205. BOOL
  206. APIENTRY
  207. GetFileVersionInfoA(
  208. LPSTR lptstrFilename, /* Filename of version stamped file */
  209. DWORD dwHandle, /* Information from GetFileVersionSize */
  210. DWORD dwLen, /* Length of buffer for info */
  211. LPVOID lpData
  212. ); /* Buffer to place the data structure */
  213. /* Read version info into buffer */
  214. BOOL
  215. APIENTRY
  216. GetFileVersionInfoW(
  217. LPWSTR lptstrFilename, /* Filename of version stamped file */
  218. DWORD dwHandle, /* Information from GetFileVersionSize */
  219. DWORD dwLen, /* Length of buffer for info */
  220. LPVOID lpData
  221. ); /* Buffer to place the data structure */
  222. #ifdef UNICODE
  223. #define GetFileVersionInfo GetFileVersionInfoW
  224. #else
  225. #define GetFileVersionInfo GetFileVersionInfoA
  226. #endif // !UNICODE
  227. DWORD
  228. APIENTRY
  229. VerLanguageNameA(
  230. DWORD wLang,
  231. LPSTR szLang,
  232. DWORD nSize
  233. );
  234. DWORD
  235. APIENTRY
  236. VerLanguageNameW(
  237. DWORD wLang,
  238. LPWSTR szLang,
  239. DWORD nSize
  240. );
  241. #ifdef UNICODE
  242. #define VerLanguageName VerLanguageNameW
  243. #else
  244. #define VerLanguageName VerLanguageNameA
  245. #endif // !UNICODE
  246. #ifndef UNICODE_ONLY
  247. BOOL
  248. APIENTRY
  249. VerQueryValueA(
  250. const LPVOID pBlock,
  251. LPSTR lpSubBlock,
  252. LPVOID * lplpBuffer,
  253. PUINT puLen
  254. );
  255. #endif //!UNICODE_ONLY
  256. #ifndef ANSI_ONLY
  257. BOOL
  258. APIENTRY
  259. VerQueryValueW(
  260. const LPVOID pBlock,
  261. LPWSTR lpSubBlock,
  262. LPVOID * lplpBuffer,
  263. PUINT puLen
  264. );
  265. #endif //!ANSI_ONLY
  266. #ifdef UNICODE
  267. #define VerQueryValue VerQueryValueW
  268. #else
  269. #define VerQueryValue VerQueryValueA
  270. #endif // !UNICODE
  271. #endif /* !RC_INVOKED */
  272. #ifdef __cplusplus
  273. }
  274. #endif
  275. #endif /* !VER_H */