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