Leaked source code of windows server 2003
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.

304 lines
9.5 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_WINCE 0x00050000L
  43. #define VOS__BASE 0x00000000L
  44. #define VOS__WINDOWS16 0x00000001L
  45. #define VOS__PM16 0x00000002L
  46. #define VOS__PM32 0x00000003L
  47. #define VOS__WINDOWS32 0x00000004L
  48. #define VOS_DOS_WINDOWS16 0x00010001L
  49. #define VOS_DOS_WINDOWS32 0x00010004L
  50. #define VOS_OS216_PM16 0x00020002L
  51. #define VOS_OS232_PM32 0x00030003L
  52. #define VOS_NT_WINDOWS32 0x00040004L
  53. /* ----- VS_VERSION.dwFileType ----- */
  54. #define VFT_UNKNOWN 0x00000000L
  55. #define VFT_APP 0x00000001L
  56. #define VFT_DLL 0x00000002L
  57. #define VFT_DRV 0x00000003L
  58. #define VFT_FONT 0x00000004L
  59. #define VFT_VXD 0x00000005L
  60. #define VFT_STATIC_LIB 0x00000007L
  61. /* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV ----- */
  62. #define VFT2_UNKNOWN 0x00000000L
  63. #define VFT2_DRV_PRINTER 0x00000001L
  64. #define VFT2_DRV_KEYBOARD 0x00000002L
  65. #define VFT2_DRV_LANGUAGE 0x00000003L
  66. #define VFT2_DRV_DISPLAY 0x00000004L
  67. #define VFT2_DRV_MOUSE 0x00000005L
  68. #define VFT2_DRV_NETWORK 0x00000006L
  69. #define VFT2_DRV_SYSTEM 0x00000007L
  70. #define VFT2_DRV_INSTALLABLE 0x00000008L
  71. #define VFT2_DRV_SOUND 0x00000009L
  72. #define VFT2_DRV_COMM 0x0000000AL
  73. #define VFT2_DRV_INPUTMETHOD 0x0000000BL
  74. #define VFT2_DRV_VERSIONED_PRINTER 0x0000000CL
  75. /* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT ----- */
  76. #define VFT2_FONT_RASTER 0x00000001L
  77. #define VFT2_FONT_VECTOR 0x00000002L
  78. #define VFT2_FONT_TRUETYPE 0x00000003L
  79. /* ----- VerFindFile() flags ----- */
  80. #define VFFF_ISSHAREDFILE 0x0001
  81. #define VFF_CURNEDEST 0x0001
  82. #define VFF_FILEINUSE 0x0002
  83. #define VFF_BUFFTOOSMALL 0x0004
  84. /* ----- VerInstallFile() flags ----- */
  85. #define VIFF_FORCEINSTALL 0x0001
  86. #define VIFF_DONTDELETEOLD 0x0002
  87. #define VIF_TEMPFILE 0x00000001L
  88. #define VIF_MISMATCH 0x00000002L
  89. #define VIF_SRCOLD 0x00000004L
  90. #define VIF_DIFFLANG 0x00000008L
  91. #define VIF_DIFFCODEPG 0x00000010L
  92. #define VIF_DIFFTYPE 0x00000020L
  93. #define VIF_WRITEPROT 0x00000040L
  94. #define VIF_FILEINUSE 0x00000080L
  95. #define VIF_OUTOFSPACE 0x00000100L
  96. #define VIF_ACCESSVIOLATION 0x00000200L
  97. #define VIF_SHARINGVIOLATION 0x00000400L
  98. #define VIF_CANNOTCREATE 0x00000800L
  99. #define VIF_CANNOTDELETE 0x00001000L
  100. #define VIF_CANNOTRENAME 0x00002000L
  101. #define VIF_CANNOTDELETECUR 0x00004000L
  102. #define VIF_OUTOFMEMORY 0x00008000L
  103. #define VIF_CANNOTREADSRC 0x00010000L
  104. #define VIF_CANNOTREADDST 0x00020000L
  105. #define VIF_BUFFTOOSMALL 0x00040000L
  106. #define VIF_CANNOTLOADLZ32 0x00080000L
  107. #define VIF_CANNOTLOADCABINET 0x00100000L
  108. #ifndef RC_INVOKED /* RC doesn't need to see the rest of this */
  109. /* ----- Types and structures ----- */
  110. typedef struct tagVS_FIXEDFILEINFO
  111. {
  112. DWORD dwSignature; /* e.g. 0xfeef04bd */
  113. DWORD dwStrucVersion; /* e.g. 0x00000042 = "0.42" */
  114. DWORD dwFileVersionMS; /* e.g. 0x00030075 = "3.75" */
  115. DWORD dwFileVersionLS; /* e.g. 0x00000031 = "0.31" */
  116. DWORD dwProductVersionMS; /* e.g. 0x00030010 = "3.10" */
  117. DWORD dwProductVersionLS; /* e.g. 0x00000031 = "0.31" */
  118. DWORD dwFileFlagsMask; /* = 0x3F for version "0.42" */
  119. DWORD dwFileFlags; /* e.g. VFF_DEBUG | VFF_PRERELEASE */
  120. DWORD dwFileOS; /* e.g. VOS_DOS_WINDOWS16 */
  121. DWORD dwFileType; /* e.g. VFT_DRIVER */
  122. DWORD dwFileSubtype; /* e.g. VFT2_DRV_KEYBOARD */
  123. DWORD dwFileDateMS; /* e.g. 0 */
  124. DWORD dwFileDateLS; /* e.g. 0 */
  125. } VS_FIXEDFILEINFO;
  126. /* ----- Function prototypes ----- */
  127. DWORD
  128. APIENTRY
  129. VerFindFileA(
  130. DWORD uFlags,
  131. LPSTR szFileName,
  132. LPSTR szWinDir,
  133. LPSTR szAppDir,
  134. LPSTR szCurDir,
  135. PUINT lpuCurDirLen,
  136. LPSTR szDestDir,
  137. PUINT lpuDestDirLen
  138. );
  139. DWORD
  140. APIENTRY
  141. VerFindFileW(
  142. DWORD uFlags,
  143. LPWSTR szFileName,
  144. LPWSTR szWinDir,
  145. LPWSTR szAppDir,
  146. LPWSTR szCurDir,
  147. PUINT lpuCurDirLen,
  148. LPWSTR szDestDir,
  149. PUINT lpuDestDirLen
  150. );
  151. #ifdef UNICODE
  152. #define VerFindFile VerFindFileW
  153. #else
  154. #define VerFindFile VerFindFileA
  155. #endif // !UNICODE
  156. DWORD
  157. APIENTRY
  158. VerInstallFileA(
  159. DWORD uFlags,
  160. LPSTR szSrcFileName,
  161. LPSTR szDestFileName,
  162. LPSTR szSrcDir,
  163. LPSTR szDestDir,
  164. LPSTR szCurDir,
  165. LPSTR szTmpFile,
  166. PUINT lpuTmpFileLen
  167. );
  168. DWORD
  169. APIENTRY
  170. VerInstallFileW(
  171. DWORD uFlags,
  172. LPWSTR szSrcFileName,
  173. LPWSTR szDestFileName,
  174. LPWSTR szSrcDir,
  175. LPWSTR szDestDir,
  176. LPWSTR szCurDir,
  177. LPWSTR szTmpFile,
  178. PUINT lpuTmpFileLen
  179. );
  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. LPCSTR 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. LPCWSTR 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. LPCSTR 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. LPCWSTR 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. BOOL
  247. APIENTRY
  248. VerQueryValueA(
  249. const LPVOID pBlock,
  250. LPSTR lpSubBlock,
  251. LPVOID * lplpBuffer,
  252. PUINT puLen
  253. );
  254. BOOL
  255. APIENTRY
  256. VerQueryValueW(
  257. const LPVOID pBlock,
  258. LPWSTR lpSubBlock,
  259. LPVOID * lplpBuffer,
  260. PUINT puLen
  261. );
  262. #ifdef UNICODE
  263. #define VerQueryValue VerQueryValueW
  264. #else
  265. #define VerQueryValue VerQueryValueA
  266. #endif // !UNICODE
  267. #endif /* !RC_INVOKED */
  268. #ifdef __cplusplus
  269. }
  270. #endif
  271. #endif /* !VER_H */