home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / winver.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  9.5 KB  |  304 lines

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