1 | ' Winver.ab
|
---|
2 |
|
---|
3 | #ifndef __WINVER_AB
|
---|
4 | #define __WINVER_AB
|
---|
5 |
|
---|
6 | #ifdef UNICODE
|
---|
7 | Const _FuncName_VerFindFile = "VerFindFileW"
|
---|
8 | Const _FuncName_VerInstallFile = "VerInstallFileW"
|
---|
9 | Const _FuncName_GetFileVersionInfoSize = "GetFileVersionInfoSizeW"
|
---|
10 | Const _FuncName_GetFileVersionInfo = "GetFileVersionInfoW"
|
---|
11 | Const _FuncName_GetFileVersionInfoSizeEx = "GetFileVersionInfoSizeExW"
|
---|
12 | Const _FuncName_GetFileVersionInfoEx = "GetFileVersionInfoExW"
|
---|
13 | Const _FuncName_VerLanguageName = "VerLanguageNameW"
|
---|
14 | Const _FuncName_VerQueryValue = "VerQueryValueW"
|
---|
15 | #else
|
---|
16 | Const _FuncName_VerFindFile = "VerFindFileA"
|
---|
17 | Const _FuncName_VerInstallFile = "VerInstallFileA"
|
---|
18 | Const _FuncName_GetFileVersionInfoSize = "GetFileVersionInfoSizeA"
|
---|
19 | Const _FuncName_GetFileVersionInfo = "GetFileVersionInfoA"
|
---|
20 | Const _FuncName_GetFileVersionInfoSizeEx = "GetFileVersionInfoSizeExA"
|
---|
21 | Const _FuncName_GetFileVersionInfoEx = "GetFileVersionInfoExA"
|
---|
22 | Const _FuncName_VerLanguageName = "VerLanguageNameA"
|
---|
23 | Const _FuncName_VerQueryValue = "VerQueryValueA"
|
---|
24 | #endif
|
---|
25 |
|
---|
26 | ' Symbols
|
---|
27 | Const VS_FILE_INFO = RT_VERSION
|
---|
28 | Const VS_VERSION_INFO = 1
|
---|
29 | Const VS_USER_DEFINED = 100
|
---|
30 |
|
---|
31 | ' VS_VERSION.dwFileFlags
|
---|
32 | Const VS_FFI_SIGNATURE = &hFEEF04BD
|
---|
33 | Const VS_FFI_STRUCVERSION = &h00010000
|
---|
34 | Const VS_FFI_FILEFLAGSMASK = &h0000003F
|
---|
35 |
|
---|
36 | ' VS_VERSION.dwFileFlags
|
---|
37 | Const VS_FF_DEBUG = &h00000001
|
---|
38 | Const VS_FF_PRERELEASE = &h00000002
|
---|
39 | Const VS_FF_PATCHED = &h00000004
|
---|
40 | Const VS_FF_PRIVATEBUILD = &h00000008
|
---|
41 | Const VS_FF_INFOINFERRED = &h00000010
|
---|
42 | Const VS_FF_SPECIALBUILD = &h00000020
|
---|
43 |
|
---|
44 | ' VS_VERSION.dwFileOS
|
---|
45 | Const VOS_UNKNOWN = &h00000000
|
---|
46 | Const VOS_DOS = &h00010000
|
---|
47 | Const VOS_OS216 = &h00020000
|
---|
48 | Const VOS_OS232 = &h00030000
|
---|
49 | Const VOS_NT = &h00040000
|
---|
50 | Const VOS_WINCE = &h00050000
|
---|
51 |
|
---|
52 | Const VOS__BASE = &h00000000
|
---|
53 | Const VOS__WINDOWS16 = &h00000001
|
---|
54 | Const VOS__PM16 = &h00000002
|
---|
55 | Const VOS__PM32 = &h00000003
|
---|
56 | Const VOS__WINDOWS32 = &h00000004
|
---|
57 |
|
---|
58 | Const VOS_DOS_WINDOWS16 = &h00010001
|
---|
59 | Const VOS_DOS_WINDOWS32 = &h00010004
|
---|
60 | Const VOS_OS216_PM16 = &h00020002
|
---|
61 | Const VOS_OS232_PM32 = &h00030003
|
---|
62 | Const VOS_NT_WINDOWS32 = &h00040004
|
---|
63 |
|
---|
64 | ' VS_VERSION.dwFileType
|
---|
65 | Const VFT_UNKNOWN = &h00000000
|
---|
66 | Const VFT_APP = &h00000001
|
---|
67 | Const VFT_DLL = &h00000002
|
---|
68 | Const VFT_DRV = &h00000003
|
---|
69 | Const VFT_FONT = &h00000004
|
---|
70 | Const VFT_VXD = &h00000005
|
---|
71 | Const VFT_STATIC_LIB = &h00000007
|
---|
72 |
|
---|
73 | ' VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV
|
---|
74 | Const VFT2_UNKNOWN = &h00000000
|
---|
75 | Const VFT2_DRV_PRINTER = &h00000001
|
---|
76 | Const VFT2_DRV_KEYBOARD = &h00000002
|
---|
77 | Const VFT2_DRV_LANGUAGE = &h00000003
|
---|
78 | Const VFT2_DRV_DISPLAY = &h00000004
|
---|
79 | Const VFT2_DRV_MOUSE = &h00000005
|
---|
80 | Const VFT2_DRV_NETWORK = &h00000006
|
---|
81 | Const VFT2_DRV_SYSTEM = &h00000007
|
---|
82 | Const VFT2_DRV_INSTALLABLE = &h00000008
|
---|
83 | Const VFT2_DRV_SOUND = &h00000009
|
---|
84 | Const VFT2_DRV_COMM = &h0000000A
|
---|
85 | Const VFT2_DRV_INPUTMETHOD = &h0000000B
|
---|
86 | Const VFT2_DRV_VERSIONED_PRINTER = &h0000000C
|
---|
87 |
|
---|
88 | ' VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT
|
---|
89 | Const VFT2_FONT_RASTER = &h00000001
|
---|
90 | Const VFT2_FONT_VECTOR = &h00000002
|
---|
91 | Const VFT2_FONT_TRUETYPE = &h00000003
|
---|
92 |
|
---|
93 | ' VerFindFile() flags
|
---|
94 | Const VFFF_ISSHAREDFILE = &h0001
|
---|
95 |
|
---|
96 | Const VFF_CURNEDEST = &h0001
|
---|
97 | Const VFF_FILEINUSE = &h0002
|
---|
98 | Const VFF_BUFFTOOSMALL = &h0004
|
---|
99 |
|
---|
100 | ' VerInstallFile() flags
|
---|
101 | Const VIFF_FORCEINSTALL = &h0001
|
---|
102 | Const VIFF_DONTDELETEOLD = &h0002
|
---|
103 |
|
---|
104 | Const VIF_TEMPFILE = &h00000001
|
---|
105 | Const VIF_MISMATCH = &h00000002
|
---|
106 | Const VIF_SRCOLD = &h00000004
|
---|
107 |
|
---|
108 | Const VIF_DIFFLANG = &h00000008
|
---|
109 | Const VIF_DIFFCODEPG = &h00000010
|
---|
110 | Const VIF_DIFFTYPE = &h00000020
|
---|
111 |
|
---|
112 | Const VIF_WRITEPROT = &h00000040
|
---|
113 | Const VIF_FILEINUSE = &h00000080
|
---|
114 | Const VIF_OUTOFSPACE = &h00000100
|
---|
115 | Const VIF_ACCESSVIOLATION = &h00000200
|
---|
116 | Const VIF_SHARINGVIOLATION = &h00000400
|
---|
117 | Const VIF_CANNOTCREATE = &h00000800
|
---|
118 | Const VIF_CANNOTDELETE = &h00001000
|
---|
119 | Const VIF_CANNOTRENAME = &h00002000
|
---|
120 | Const VIF_CANNOTDELETECUR = &h00004000
|
---|
121 | Const VIF_OUTOFMEMORY = &h00008000
|
---|
122 |
|
---|
123 | Const VIF_CANNOTREADSRC = &h00010000
|
---|
124 | Const VIF_CANNOTREADDST = &h00020000
|
---|
125 |
|
---|
126 | Const VIF_BUFFTOOSMALL = &h00040000
|
---|
127 | Const VIF_CANNOTLOADLZ32 = &h00080000
|
---|
128 | Const VIF_CANNOTLOADCABINET = &h00100000
|
---|
129 |
|
---|
130 | Const FILE_VER_GET_LOCALISED = &h01
|
---|
131 | Const FILE_VER_GET_NEUTRAL = &h02
|
---|
132 |
|
---|
133 | ' Types and structures
|
---|
134 |
|
---|
135 | Type VS_FIXEDFILEINFO
|
---|
136 | dwSignature As DWord
|
---|
137 | dwStrucVersion As DWord
|
---|
138 | dwFileVersionMS As DWord
|
---|
139 | dwFileVersionLS As DWord
|
---|
140 | dwProductVersionMS As DWord
|
---|
141 | dwProductVersionLS As DWord
|
---|
142 | dwFileFlagsMask As DWord
|
---|
143 | dwFileFlags As DWord
|
---|
144 | dwFileOS As DWord
|
---|
145 | dwFileType As DWord
|
---|
146 | dwFileSubtype As DWord
|
---|
147 | dwFileDateMS As DWord
|
---|
148 | dwFileDateLS As DWord
|
---|
149 | End Type
|
---|
150 |
|
---|
151 | ' Function prototypes
|
---|
152 |
|
---|
153 | Declare Function VerFindFile Lib "version" Alias _FuncName_VerFindFile (
|
---|
154 | uFlags As DWord,
|
---|
155 | szFileName As LPCTSTR,
|
---|
156 | szWinDir As LPCTSTR,
|
---|
157 | szAppDir As LPCTSTR,
|
---|
158 | szCurDir As LPTSTR,
|
---|
159 | ByRef uCurDirLen As DWord,
|
---|
160 | szDestDir As LPTSTR,
|
---|
161 | ByRef uDestDirLen As DWord _
|
---|
162 | ) As DWord
|
---|
163 |
|
---|
164 | Declare Function VerInstallFile Lib "version" Alias _FuncName_VerInstallFile (
|
---|
165 | uFlags As DWord,
|
---|
166 | szSrcFileName As LPCTSTR,
|
---|
167 | szDestFileName As LPCTSTR,
|
---|
168 | szSrcDir As LPCTSTR,
|
---|
169 | szDestDir As LPCTSTR,
|
---|
170 | szTmpFile As LPTSTR,
|
---|
171 | ByRef uTmpFileLen As DWord _
|
---|
172 | ) As DWord
|
---|
173 |
|
---|
174 | Declare Function GetFileVersionInfoSize Lib "version" Alias _FuncName_GetFileVersionInfoSize (
|
---|
175 | lptstrFilename As LPCTSTR,
|
---|
176 | ByRef dwHandle As DWord _
|
---|
177 | ) As DWord
|
---|
178 |
|
---|
179 | Declare Function GetFileVersionInfo Lib "version" Alias _FuncName_GetFileVersionInfo (
|
---|
180 | lptstrFilename As LPCTSTR,
|
---|
181 | dwHandle As DWord,
|
---|
182 | dwLen As DWord,
|
---|
183 | lpData As VoidPtr _
|
---|
184 | ) As BOOL
|
---|
185 |
|
---|
186 | Declare Function GetFileVersionInfoSizeEx Lib "version" Alias _FuncName_GetFileVersionInfoSizeEx (
|
---|
187 | dwFlags As DWord,
|
---|
188 | lptstrFilename As LPCTSTR,
|
---|
189 | ByRef dwHandle As DWord _
|
---|
190 | ) As DWord
|
---|
191 |
|
---|
192 | Declare Function GetFileVersionInfoEx Lib "version" Alias _FuncName_GetFileVersionInfoEx (
|
---|
193 | dwFlags As DWord,
|
---|
194 | lptstrFilename As LPCTSTR,
|
---|
195 | dwHandle As DWord,
|
---|
196 | dwLen As DWord,
|
---|
197 | lpData As VoidPtr _
|
---|
198 | ) As BOOL
|
---|
199 |
|
---|
200 | Declare Function VerLanguageName Lib "version" Alias _FuncName_VerLanguageName (
|
---|
201 | wLang As DWord,
|
---|
202 | szLang As LPTSTR,
|
---|
203 | cchLang As DWord _
|
---|
204 | ) As DWord
|
---|
205 |
|
---|
206 | Declare Function VerQueryValue Lib "version" Alias _FuncName_VerQueryValue (
|
---|
207 | pBlock As VoidPtr,
|
---|
208 | lpSubBlock As LPCTSTR,
|
---|
209 | ByRef lpBuffer As VoidPtr,
|
---|
210 | ByRef uLen As DWord _
|
---|
211 | ) As BOOL
|
---|
212 |
|
---|
213 | #endif '__WINVER_AB
|
---|