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