summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/DLL_FAQ.txt99
-rw-r--r--win32/zlib1.rc10
2 files changed, 55 insertions, 54 deletions
diff --git a/win32/DLL_FAQ.txt b/win32/DLL_FAQ.txt
index 80b6b42..a3ed5dd 100644
--- a/win32/DLL_FAQ.txt
+++ b/win32/DLL_FAQ.txt
@@ -12,7 +12,7 @@ in the zlib distribution, or at the following location:
12 1. What is ZLIB1.DLL, and how can I get it? 12 1. What is ZLIB1.DLL, and how can I get it?
13 13
14 - ZLIB1.DLL is the official build of zlib as a DLL. 14 - ZLIB1.DLL is the official build of zlib as a DLL.
15 (Please remark the symbol '1' in the name.) 15 (Please remark the character '1' in the name.)
16 16
17 Pointers to a precompiled ZLIB1.DLL can be found in the zlib 17 Pointers to a precompiled ZLIB1.DLL can be found in the zlib
18 web site at: 18 web site at:
@@ -37,20 +37,19 @@ in the zlib distribution, or at the following location:
37 and build settings. If you do build the DLL yourself, please 37 and build settings. If you do build the DLL yourself, please
38 make sure that it complies with all the above requirements, 38 make sure that it complies with all the above requirements,
39 and it runs with the precompiled test programs, bundled with 39 and it runs with the precompiled test programs, bundled with
40 the original ZLIB1.DLL distribution and available at the zlib 40 the original ZLIB1.DLL distribution.
41 web site.
42 41
43 If, for any reason, you need to build an incompatible DLL, 42 If, for any reason, you need to build an incompatible DLL,
44 please use a different name. 43 please use a different file name.
45 44
46 45
47 2. Why did you change the name of the DLL to ZLIB1.DLL? 46 2. Why did you change the name of the DLL to ZLIB1.DLL?
48 What happened to the old ZLIB.DLL? 47 What happened to the old ZLIB.DLL?
49 48
50 - The old ZLIB.DLL, built from zlib-1.1.x and earlier, required 49 - The old ZLIB.DLL, built from zlib-1.1.4 or earlier, required
51 compilation settings that were incompatible to those used by a 50 compilation settings that were incompatible to those used by
52 static build. The DLL settings were supposed to be enabled by 51 a static build. The DLL settings were supposed to be enabled
53 defining the macro ZLIB_DLL, before including "zlib.h". 52 by defining the macro ZLIB_DLL, before including "zlib.h".
54 Incorrect handling of this macro was silently accepted at 53 Incorrect handling of this macro was silently accepted at
55 build time, resulting in two major problems: 54 build time, resulting in two major problems:
56 55
@@ -65,8 +64,8 @@ in the zlib distribution, or at the following location:
65 functions. Failure to do so resulted in creating binaries 64 functions. Failure to do so resulted in creating binaries
66 that were unable to run with the official ZLIB.DLL build. 65 that were unable to run with the official ZLIB.DLL build.
67 66
68 The only possible solution that we could foresee was to make a 67 The only possible solution that we could foresee was to make
69 binary-incompatible change in the DLL interfacing, in order to 68 a binary-incompatible change in the DLL interface, in order to
70 remove the dependency on the ZLIB_DLL macro, and to release 69 remove the dependency on the ZLIB_DLL macro, and to release
71 the new DLL under a different name. 70 the new DLL under a different name.
72 71
@@ -85,17 +84,13 @@ in the zlib distribution, or at the following location:
85 84
86 - In principle, you can do it by assigning calling convention 85 - In principle, you can do it by assigning calling convention
87 keywords to the macros ZEXPORT and ZEXPORTVA. In practice, 86 keywords to the macros ZEXPORT and ZEXPORTVA. In practice,
88 it depends on what you mean by "an old ZLIB.DLL", because 87 it depends on what you mean by "an old ZLIB.DLL", because the
89 the old DLL exists in several mutually-incompatible versions. 88 old DLL exists in several mutually-incompatible versions.
90 89 You have to find out first what kind of calling convention is
91 If you have a compiled application that works with a certain 90 being used in your particular ZLIB.DLL build, and to use the
92 ZLIB.DLL without any known security issues, there is hardly 91 same one in the new build. If you don't know what this is all
93 a need to rebuild the DLL from new sources only to link it to 92 about, you might be better off if you would just leave the old
94 the old app binary. But if you really want to do it, you have 93 DLL intact.
95 to find out first what kind of calling convention uses your
96 particular ZLIB.DLL build, and to use the same one in the new
97 build. If you don't know what this is all about, you might be
98 better off if you would just forget it.
99 94
100 95
101 4. Can I compile my application using the new zlib interface, and 96 4. Can I compile my application using the new zlib interface, and
@@ -170,19 +165,19 @@ in the zlib distribution, or at the following location:
170 the K&R-style function prototypes, where the argument types 165 the K&R-style function prototypes, where the argument types
171 are not specified; but that is another story for another day. 166 are not specified; but that is another story for another day.
172 167
173 The fact that remains is that CDECL is the default convention. 168 The remaining fact is that CDECL is the default convention.
174 Even if an explicit convention (such as STDCALL or FASTCALL) 169 Even if an explicit convention is hard-coded into the function
175 is hard-coded into the function prototypes inside C headers, 170 prototypes inside C headers, problems may appear. The
176 problems may appear. One problem, for example, deals with the 171 necessity to expose the convention in users' callbacks is one
177 necessity to expose the convention in users' callbacks. 172 of these problems.
178 173
179 The calling convention issues are also important when using 174 The calling convention issues are also important when using
180 zlib in other programming languages. Some of them, like Ada 175 zlib in other programming languages. Some of them, like Ada
181 (GNAT) and Fortran (GNU G77), have C bindings implemented 176 (GNAT) and Fortran (GNU G77), have C bindings implemented
182 initially on Unix, and relying on the C calling convention. 177 initially on Unix, and relying on the C calling convention.
183 On the other hand, the pre- .NET versions of Microsoft Visual 178 On the other hand, the pre- .NET versions of Microsoft Visual
184 Basic require STDCALL, while Borland Delphi prefers (although 179 Basic require STDCALL, while Borland Delphi prefers, although
185 it does not require) FASTCALL. 180 it does not require, FASTCALL.
186 181
187 In fairness to all possible uses of zlib outside the C 182 In fairness to all possible uses of zlib outside the C
188 programming language, we choose the default "C" convention. 183 programming language, we choose the default "C" convention.
@@ -208,7 +203,16 @@ in the zlib distribution, or at the following location:
208 zlib distribution. 203 zlib distribution.
209 204
210 205
211 8. If my application uses ZLIB1.DLL, should I link it to 206 8. I need a DLL for my Microsoft .NET project. What can I do?
207
208 - We did not implement a COM wrapper around zlib, so you will
209 have to develop it yourself, or to get it from somewhere else.
210
211 If you would be so generous as to contribute such a wrapper,
212 we would like to include it in a future zlib version.
213
214
215 9. If my application uses ZLIB1.DLL, should I link it to
212 MSVCRT.DLL? Why? 216 MSVCRT.DLL? Why?
213 217
214 - It is not required, but it is recommended to link your 218 - It is not required, but it is recommended to link your
@@ -223,7 +227,7 @@ in the zlib distribution, or at the following location:
223 depend on it should also be linked to MSVCRT.DLL. 227 depend on it should also be linked to MSVCRT.DLL.
224 228
225 229
226 9. Why are you saying that ZLIB1.DLL and my application must be 23010. Why are you saying that ZLIB1.DLL and my application must be
227 linked to the same C run-time (CRT) library? I linked my 231 linked to the same C run-time (CRT) library? I linked my
228 application and my DLLs to different C libraries (e.g. my 232 application and my DLLs to different C libraries (e.g. my
229 application to a static library, and my DLLs to MSVCRT.DLL), 233 application to a static library, and my DLLs to MSVCRT.DLL),
@@ -255,11 +259,11 @@ in the zlib distribution, or at the following location:
255 and DLLs are avoiding the corruption of each of the CRTs' 259 and DLLs are avoiding the corruption of each of the CRTs'
256 internal states, maybe by careful design, or maybe by fortune. 260 internal states, maybe by careful design, or maybe by fortune.
257 261
258 Also note that linking ZLIB1.DLL to non-Microsoft CRTs (such 262 Also note that linking ZLIB1.DLL to non-Microsoft CRTs, such
259 as those provided by Borland) raises similar problems. 263 as those provided by Borland, raises similar problems.
260 264
261 265
26210. Why are you linking ZLIB1.DLL to MSVCRT.DLL? 26611. Why are you linking ZLIB1.DLL to MSVCRT.DLL?
263 267
264 - MSVCRT.DLL exists on every Windows 95 with a new service pack 268 - MSVCRT.DLL exists on every Windows 95 with a new service pack
265 installed, or with Microsoft Internet Explorer 4 or later, and 269 installed, or with Microsoft Internet Explorer 4 or later, and
@@ -269,12 +273,11 @@ in the zlib distribution, or at the following location:
269 software provider for free. 273 software provider for free.
270 274
271 The fact that MSVCRT.DLL does not exist on a virgin Windows 95 275 The fact that MSVCRT.DLL does not exist on a virgin Windows 95
272 is not so problematic. The number of Windows 95 installations 276 is not so problematic. Windows 95 is scarcely found nowadays,
273 is rapidly decreasing, Microsoft stopped supporting it a long 277 Microsoft ended its support a long time ago, and many recent
274 time ago, and many recent applications from various vendors, 278 applications from various vendors, including Microsoft, do not
275 including Microsoft, do not even run on it. Furthermore, no 279 even run on it. Furthermore, no serious user should run
276 serious user should run Windows 95 without a proper update 280 Windows 95 without a proper update installed.
277 installed.
278 281
279 There is also the fact that the mainstream C compilers for 282 There is also the fact that the mainstream C compilers for
280 Windows are Microsoft Visual C++ 6.0, and gcc/MinGW. Both 283 Windows are Microsoft Visual C++ 6.0, and gcc/MinGW. Both
@@ -283,7 +286,7 @@ in the zlib distribution, or at the following location:
283 select by users. 286 select by users.
284 287
285 288
28611. Why are you not linking ZLIB1.DLL to 28912. Why are you not linking ZLIB1.DLL to
287 <<my favorite C run-time library>> ? 290 <<my favorite C run-time library>> ?
288 291
289 - We considered and abandoned the following alternatives: 292 - We considered and abandoned the following alternatives:
@@ -314,7 +317,7 @@ in the zlib distribution, or at the following location:
314 Windows NT systems. 317 Windows NT systems.
315 318
316 319
31712. I need to link my own DLL build to a CRT different than 32013. I need to link my own DLL build to a CRT different than
318 MSVCRT.DLL. What can I do? 321 MSVCRT.DLL. What can I do?
319 322
320 - Feel free to rebuild the DLL from the zlib sources, and link 323 - Feel free to rebuild the DLL from the zlib sources, and link
@@ -330,7 +333,7 @@ in the zlib distribution, or at the following location:
330 CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL. 333 CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL.
331 334
332 335
33313. May I include additional pieces of code that I find useful, 33614. May I include additional pieces of code that I find useful,
334 link them in ZLIB1.DLL, and export them? 337 link them in ZLIB1.DLL, and export them?
335 338
336 - No. A legitimate build of ZLIB1.DLL must not include code 339 - No. A legitimate build of ZLIB1.DLL must not include code
@@ -338,14 +341,12 @@ in the zlib distribution, or at the following location:
338 But you can make your own private DLL build, under a different 341 But you can make your own private DLL build, under a different
339 file name, as suggested in the previous answer. 342 file name, as suggested in the previous answer.
340 343
341 For example, in Borland Delphi and C++ Builder, zlib is a part 344 For example, zlib is a part of the VCL library, distributed
342 of the standard VCL library. If an application links to VCL 345 with Borland Delphi and C++ Builder. The DLL build of VCL
343 dynamically, the name of the distributable binary (VCLxx.DLL) 346 is a redistributable file, named VCLxx.DLL.
344 does not posess any danger of clashing with a legitimate but
345 incompatible ZLIB1.DLL.
346 347
347 348
34814. May I remove some functionality out of ZLIB1.DLL, by enabling 34915. May I remove some functionality out of ZLIB1.DLL, by enabling
349 macros like NO_GZCOMPRESS or NO_GZIP at compile time? 350 macros like NO_GZCOMPRESS or NO_GZIP at compile time?
350 351
351 - No. A legitimate build of ZLIB1.DLL must provide the complete 352 - No. A legitimate build of ZLIB1.DLL must provide the complete
@@ -354,7 +355,7 @@ in the zlib distribution, or at the following location:
354 different file name, as suggested in the previous answer. 355 different file name, as suggested in the previous answer.
355 356
356 357
35715. I made my own ZLIB1.DLL build. Can I test it for compliance? 35816. I made my own ZLIB1.DLL build. Can I test it for compliance?
358 359
359 - We prefer that you download the official DLL from the zlib 360 - We prefer that you download the official DLL from the zlib
360 web site. If you need something peculiar from this DLL, you 361 web site. If you need something peculiar from this DLL, you
diff --git a/win32/zlib1.rc b/win32/zlib1.rc
index 19fdc99..130493a 100644
--- a/win32/zlib1.rc
+++ b/win32/zlib1.rc
@@ -5,8 +5,8 @@ VS_VERSION_INFO VERSIONINFO
5#else 5#else
6VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 6VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
7#endif 7#endif
8 FILEVERSION 1,2,1,1 8 FILEVERSION 1,2,1,2
9 PRODUCTVERSION 1,2,1,1 9 PRODUCTVERSION 1,2,1,2
10 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 10 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
11#ifdef _DEBUG 11#ifdef _DEBUG
12 FILEFLAGS 1 12 FILEFLAGS 1
@@ -23,12 +23,12 @@ BEGIN
23 //language ID = U.S. English, char set = Windows, Multilingual 23 //language ID = U.S. English, char set = Windows, Multilingual
24 BEGIN 24 BEGIN
25 VALUE "FileDescription", "zlib data compression library\0" 25 VALUE "FileDescription", "zlib data compression library\0"
26 VALUE "FileVersion", "1.2.1.1\0" 26 VALUE "FileVersion", "1.2.1.2\0"
27 VALUE "InternalName", "zlib1.dll\0" 27 VALUE "InternalName", "zlib1.dll\0"
28 VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0" 28 VALUE "LegalCopyright", "(C) 1995-2004 Jean-loup Gailly & Mark Adler\0"
29 VALUE "OriginalFilename", "zlib1.dll\0" 29 VALUE "OriginalFilename", "zlib1.dll\0"
30 VALUE "ProductName", "zlib\0" 30 VALUE "ProductName", "zlib\0"
31 VALUE "ProductVersion", "1.2.1.1\0" 31 VALUE "ProductVersion", "1.2.1.2\0"
32 VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 32 VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
33 END 33 END
34 END 34 END