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