4 * Declarations supporting the API for retrieval of version informatation
5 * from a PE-COFF file's associated version resources.
9 * Written by Anders Norlander <anorland@hem2.passagen.se>
10 * Copyright (C) 1998, 1999, 2002, 2006, 2009, 2012, 2015, 2016, 2018,
14 * Permission is hereby granted, free of charge, to any person obtaining a
15 * copy of this software and associated documentation files (the "Software"),
16 * to deal in the Software without restriction, including without limitation
17 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 * and/or sell copies of the Software, and to permit persons to whom the
19 * Software is furnished to do so, subject to the following conditions:
21 * The above copyright notice and this permission notice (including the next
22 * paragraph) shall be included in all copies or substantial portions of the
25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
30 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
31 * DEALINGS IN THE SOFTWARE.
36 #pragma GCC system_header
38 #define VS_FILE_INFO RT_VERSION
39 #define VS_VERSION_INFO 1
40 #define VS_USER_DEFINED 100
41 #define VS_FFI_SIGNATURE 0xFEEF04BD
42 #define VS_FFI_STRUCVERSION 0x10000
43 #define VS_FFI_FILEFLAGSMASK 0x3F
45 #define VS_FF_PRERELEASE 2
46 #define VS_FF_PATCHED 4
47 #define VS_FF_PRIVATEBUILD 8
48 #define VS_FF_INFOINFERRED 16
49 #define VS_FF_SPECIALBUILD 32
51 #define VOS_DOS 0x10000
52 #define VOS_OS216 0x20000
53 #define VOS_OS232 0x30000
54 #define VOS_NT 0x40000
56 #define VOS__WINDOWS16 1
59 #define VOS__WINDOWS32 4
60 #define VOS_DOS_WINDOWS16 0x10001
61 #define VOS_DOS_WINDOWS32 0x10004
62 #define VOS_OS216_PM16 0x20002
63 #define VOS_OS232_PM32 0x30003
64 #define VOS_NT_WINDOWS32 0x40004
71 #define VFT_STATIC_LIB 7
72 #define VFT2_UNKNOWN 0
73 #define VFT2_DRV_PRINTER 1
74 #define VFT2_DRV_KEYBOARD 2
75 #define VFT2_DRV_LANGUAGE 3
76 #define VFT2_DRV_DISPLAY 4
77 #define VFT2_DRV_MOUSE 5
78 #define VFT2_DRV_NETWORK 6
79 #define VFT2_DRV_SYSTEM 7
80 #define VFT2_DRV_INSTALLABLE 8
81 #define VFT2_DRV_SOUND 9
82 #define VFT2_DRV_COMM 10
83 #define VFT2_DRV_INPUTMETHOD 11
84 #define VFT2_FONT_RASTER 1
85 #define VFT2_FONT_VECTOR 2
86 #define VFT2_FONT_TRUETYPE 3
87 #define VFFF_ISSHAREDFILE 1
88 #define VFF_CURNEDEST 1
89 #define VFF_FILEINUSE 2
90 #define VFF_BUFFTOOSMALL 4
91 #define VIFF_FORCEINSTALL 1
92 #define VIFF_DONTDELETEOLD 2
93 #define VIF_TEMPFILE 1
94 #define VIF_MISMATCH 2
96 #define VIF_DIFFLANG 8
97 #define VIF_DIFFCODEPG 16
98 #define VIF_DIFFTYPE 32
99 #define VIF_WRITEPROT 64
100 #define VIF_FILEINUSE 128
101 #define VIF_OUTOFSPACE 256
102 #define VIF_ACCESSVIOLATION 512
103 #define VIF_SHARINGVIOLATION 1024
104 #define VIF_CANNOTCREATE 2048
105 #define VIF_CANNOTDELETE 4096
106 #define VIF_CANNOTRENAME 8192
107 #define VIF_CANNOTDELETECUR 16384
108 #define VIF_OUTOFMEMORY 32768
109 #define VIF_CANNOTREADSRC 65536
110 #define VIF_CANNOTREADDST 0x20000
111 #define VIF_BUFFTOOSMALL 0x40000
114 /* Additional type definitions and function declarations, which extend
115 * beyond the requirements of the resource compiler, may depend on the
116 * custom windows types defined in <windef.h>
123 struct tagVS_FIXEDFILEINFO {
125 DWORD dwStrucVersion;
126 DWORD dwFileVersionMS;
127 DWORD dwFileVersionLS;
128 DWORD dwProductVersionMS;
129 DWORD dwProductVersionLS;
130 DWORD dwFileFlagsMask;
139 /* The following functions are each provided with prototype variants
140 * supporting strings in ANSI or UTF-16LE encodings, distinguised by
141 * the "A" suffix in the ANSI case, or the "W" suffix for UTF-16LE.
142 * Each pair is associated with a single generic function name, which
143 * is mapped to the appropriate prototype by the __AW_SUFFIXED__ macro,
144 * according to the defined state of the UNICODE macro; representation
145 * of the generic name becomes the ANSI prototype when UNICODE is NOT
146 * defined, or the UTF-16LE prototype when UNICODE is defined.
148 #define VerFindFile __AW_SUFFIXED__( VerFindFile )
149 DWORD WINAPI VerFindFileA( DWORD, LPSTR, LPSTR, LPSTR, LPSTR, PUINT, LPSTR, PUINT );
150 DWORD WINAPI VerFindFileW( DWORD, LPWSTR, LPWSTR, LPWSTR, LPWSTR, PUINT, LPWSTR, PUINT );
152 #define VerInstallFile __AW_SUFFIXED__( VerInstallFile )
153 DWORD WINAPI VerInstallFileA( DWORD, LPSTR, LPSTR, LPSTR, LPSTR, LPSTR, LPSTR, PUINT );
154 DWORD WINAPI VerInstallFileW( DWORD, LPWSTR, LPWSTR, LPWSTR, LPWSTR, LPWSTR, LPWSTR, PUINT );
156 #define GetFileVersionInfoSize __AW_SUFFIXED__( GetFileVersionInfoSize )
157 DWORD WINAPI GetFileVersionInfoSizeA( LPCSTR, PDWORD );
158 DWORD WINAPI GetFileVersionInfoSizeW( LPCWSTR, PDWORD );
160 #define GetFileVersionInfo __AW_SUFFIXED__( GetFileVersionInfo )
161 BOOL WINAPI GetFileVersionInfoA( LPCSTR, DWORD, DWORD, PVOID );
162 BOOL WINAPI GetFileVersionInfoW( LPCWSTR, DWORD, DWORD, PVOID );
164 #if NTDDI_VERSION >= NTDDI_VISTA
165 /* Windows-Vista added extended variants of the preceding two functions,
166 * each taking one additional DWORD flags argument, (in first position).
168 * WARNING: Although documented as supported by Windows-Vista and later,
169 * the ANSI variants of these two functions appear to be unsupported in
170 * VERSION.DLL, prior to Windows-8. If using these functions, you are
171 * advised to use a LoadLibrary/GetProcAddress (or dlopen/dlsym) probe,
172 * to confirm availability of the API entry points within VERSION.DLL
173 * on the run-time host.
175 #define GetFileVersionInfoEx __AW_SUFFIXED__( GetFileVersionInfoEx )
176 #define GetFileVersionInfoSizeEx __AW_SUFFIXED__( GetFileVersionInfoSizeEx )
177 #if NTDDI_VERSION >= NTDDI_WIN8
178 DWORD WINAPI GetFileVersionInfoSizeExA( DWORD, LPCSTR, PDWORD );
179 BOOL WINAPI GetFileVersionInfoExA( DWORD, LPCSTR, DWORD, DWORD, PVOID );
181 DWORD WINAPI GetFileVersionInfoSizeExW( DWORD, LPCWSTR, PDWORD );
182 BOOL WINAPI GetFileVersionInfoExW( DWORD, LPCWSTR, DWORD, DWORD, PVOID );
184 /* Values permitted for the flags in each of these functions; these may be
185 * combined by logically adding them together (using the OR operator).
187 #define FILE_VER_GET_LOCALISED 0x01
188 #define FILE_VER_GET_NEUTRAL 0x02
190 * ...and an additional one, for the GetFileVersionInfoEx() function
191 * only; (must be combined with the value derived from the preceding
192 * pair, as used in a prior call to GetFileVersionInfoSizeEx()).
194 #define FILE_VER_GET_PREFETCHED 0x04
197 #define VerLanguageName __AW_SUFFIXED__( VerLanguageName )
198 DWORD WINAPI VerLanguageNameA( DWORD, LPSTR, DWORD );
199 DWORD WINAPI VerLanguageNameW( DWORD, LPWSTR, DWORD );
201 #define VerQueryValue __AW_SUFFIXED__( VerQueryValue )
202 BOOL WINAPI VerQueryValueA( LPCVOID, LPCSTR, LPVOID *, PUINT );
203 BOOL WINAPI VerQueryValueW( LPCVOID, LPCWSTR, LPVOID *, PUINT );
207 #endif /* ! defined RC_INVOKED */
208 #endif /* ! defined _WINVER_H: $RCSfile$: end of file */