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