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.

299 lines
9.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 1993 - 1998 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. #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. /* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT ----- */
  74. #define VFT2_FONT_RASTER 0x00000001L
  75. #define VFT2_FONT_VECTOR 0x00000002L
  76. #define VFT2_FONT_TRUETYPE 0x00000003L
  77. /* ----- VerFindFile() flags ----- */
  78. #define VFFF_ISSHAREDFILE 0x0001
  79. #define VFF_CURNEDEST 0x0001
  80. #define VFF_FILEINUSE 0x0002
  81. #define VFF_BUFFTOOSMALL 0x0004
  82. /* ----- VerInstallFile() flags ----- */
  83. #define VIFF_FORCEINSTALL 0x0001
  84. #define VIFF_DONTDELETEOLD 0x0002
  85. #define VIF_TEMPFILE 0x00000001L
  86. #define VIF_MISMATCH 0x00000002L
  87. #define VIF_SRCOLD 0x00000004L
  88. #define VIF_DIFFLANG 0x00000008L
  89. #define VIF_DIFFCODEPG 0x00000010L
  90. #define VIF_DIFFTYPE 0x00000020L
  91. #define VIF_WRITEPROT 0x00000040L
  92. #define VIF_FILEINUSE 0x00000080L
  93. #define VIF_OUTOFSPACE 0x00000100L
  94. #define VIF_ACCESSVIOLATION 0x00000200L
  95. #define VIF_SHARINGVIOLATION 0x00000400L
  96. #define VIF_CANNOTCREATE 0x00000800L
  97. #define VIF_CANNOTDELETE 0x00001000L
  98. #define VIF_CANNOTRENAME 0x00002000L
  99. #define VIF_CANNOTDELETECUR 0x00004000L
  100. #define VIF_OUTOFMEMORY 0x00008000L
  101. #define VIF_CANNOTREADSRC 0x00010000L
  102. #define VIF_CANNOTREADDST 0x00020000L
  103. #define VIF_BUFFTOOSMALL 0x00040000L
  104. #ifndef RC_INVOKED /* RC doesn't need to see the rest of this */
  105. /* ----- Types and structures ----- */
  106. typedef struct tagVS_FIXEDFILEINFO
  107. {
  108. DWORD dwSignature; /* e.g. 0xfeef04bd */
  109. DWORD dwStrucVersion; /* e.g. 0x00000042 = "0.42" */
  110. DWORD dwFileVersionMS; /* e.g. 0x00030075 = "3.75" */
  111. DWORD dwFileVersionLS; /* e.g. 0x00000031 = "0.31" */
  112. DWORD dwProductVersionMS; /* e.g. 0x00030010 = "3.10" */
  113. DWORD dwProductVersionLS; /* e.g. 0x00000031 = "0.31" */
  114. DWORD dwFileFlagsMask; /* = 0x3F for version "0.42" */
  115. DWORD dwFileFlags; /* e.g. VFF_DEBUG | VFF_PRERELEASE */
  116. DWORD dwFileOS; /* e.g. VOS_DOS_WINDOWS16 */
  117. DWORD dwFileType; /* e.g. VFT_DRIVER */
  118. DWORD dwFileSubtype; /* e.g. VFT2_DRV_KEYBOARD */
  119. DWORD dwFileDateMS; /* e.g. 0 */
  120. DWORD dwFileDateLS; /* e.g. 0 */
  121. } VS_FIXEDFILEINFO;
  122. /* ----- Function prototypes ----- */
  123. DWORD
  124. APIENTRY
  125. VerFindFileA(
  126. DWORD uFlags,
  127. LPSTR szFileName,
  128. LPSTR szWinDir,
  129. LPSTR szAppDir,
  130. LPSTR szCurDir,
  131. PUINT lpuCurDirLen,
  132. LPSTR szDestDir,
  133. PUINT lpuDestDirLen
  134. );
  135. DWORD
  136. APIENTRY
  137. VerFindFileW(
  138. DWORD uFlags,
  139. LPWSTR szFileName,
  140. LPWSTR szWinDir,
  141. LPWSTR szAppDir,
  142. LPWSTR szCurDir,
  143. PUINT lpuCurDirLen,
  144. LPWSTR szDestDir,
  145. PUINT lpuDestDirLen
  146. );
  147. #ifdef UNICODE
  148. #define VerFindFile VerFindFileW
  149. #else
  150. #define VerFindFile VerFindFileA
  151. #endif // !UNICODE
  152. DWORD
  153. APIENTRY
  154. VerInstallFileA(
  155. DWORD uFlags,
  156. LPSTR szSrcFileName,
  157. LPSTR szDestFileName,
  158. LPSTR szSrcDir,
  159. LPSTR szDestDir,
  160. LPSTR szCurDir,
  161. LPSTR szTmpFile,
  162. PUINT lpuTmpFileLen
  163. );
  164. DWORD
  165. APIENTRY
  166. VerInstallFileW(
  167. DWORD uFlags,
  168. LPWSTR szSrcFileName,
  169. LPWSTR szDestFileName,
  170. LPWSTR szSrcDir,
  171. LPWSTR szDestDir,
  172. LPWSTR szCurDir,
  173. LPWSTR szTmpFile,
  174. PUINT lpuTmpFileLen
  175. );
  176. #ifdef UNICODE
  177. #define VerInstallFile VerInstallFileW
  178. #else
  179. #define VerInstallFile VerInstallFileA
  180. #endif // !UNICODE
  181. /* Returns size of version info in bytes */
  182. DWORD
  183. APIENTRY
  184. GetFileVersionInfoSizeA(
  185. LPSTR lptstrFilename, /* Filename of version stamped file */
  186. LPDWORD lpdwHandle
  187. ); /* Information for use by GetFileVersionInfo */
  188. /* Returns size of version info in bytes */
  189. DWORD
  190. APIENTRY
  191. GetFileVersionInfoSizeW(
  192. LPWSTR lptstrFilename, /* Filename of version stamped file */
  193. LPDWORD lpdwHandle
  194. ); /* Information for use by GetFileVersionInfo */
  195. #ifdef UNICODE
  196. #define GetFileVersionInfoSize GetFileVersionInfoSizeW
  197. #else
  198. #define GetFileVersionInfoSize GetFileVersionInfoSizeA
  199. #endif // !UNICODE
  200. /* Read version info into buffer */
  201. BOOL
  202. APIENTRY
  203. GetFileVersionInfoA(
  204. LPSTR lptstrFilename, /* Filename of version stamped file */
  205. DWORD dwHandle, /* Information from GetFileVersionSize */
  206. DWORD dwLen, /* Length of buffer for info */
  207. LPVOID lpData
  208. ); /* Buffer to place the data structure */
  209. /* Read version info into buffer */
  210. BOOL
  211. APIENTRY
  212. GetFileVersionInfoW(
  213. LPWSTR lptstrFilename, /* Filename of version stamped file */
  214. DWORD dwHandle, /* Information from GetFileVersionSize */
  215. DWORD dwLen, /* Length of buffer for info */
  216. LPVOID lpData
  217. ); /* Buffer to place the data structure */
  218. #ifdef UNICODE
  219. #define GetFileVersionInfo GetFileVersionInfoW
  220. #else
  221. #define GetFileVersionInfo GetFileVersionInfoA
  222. #endif // !UNICODE
  223. DWORD
  224. APIENTRY
  225. VerLanguageNameA(
  226. DWORD wLang,
  227. LPSTR szLang,
  228. DWORD nSize
  229. );
  230. DWORD
  231. APIENTRY
  232. VerLanguageNameW(
  233. DWORD wLang,
  234. LPWSTR szLang,
  235. DWORD nSize
  236. );
  237. #ifdef UNICODE
  238. #define VerLanguageName VerLanguageNameW
  239. #else
  240. #define VerLanguageName VerLanguageNameA
  241. #endif // !UNICODE
  242. BOOL
  243. APIENTRY
  244. VerQueryValueA(
  245. const LPVOID pBlock,
  246. LPSTR lpSubBlock,
  247. LPVOID * lplpBuffer,
  248. PUINT puLen
  249. );
  250. BOOL
  251. APIENTRY
  252. VerQueryValueW(
  253. const LPVOID pBlock,
  254. LPWSTR lpSubBlock,
  255. LPVOID * lplpBuffer,
  256. PUINT puLen
  257. );
  258. #ifdef UNICODE
  259. #define VerQueryValue VerQueryValueW
  260. #else
  261. #define VerQueryValue VerQueryValueA
  262. #endif // !UNICODE
  263. #endif /* !RC_INVOKED */
  264. #ifdef __cplusplus
  265. }
  266. #endif
  267. #endif /* !VER_H */