1On Windows open this file in WordPad. 2 3Contents of the "windll/csharp" sub-archive 4 5This directory contains Visual C Sharp (C#) sample project for 6using the unzip32.dll library. This project was generously donated 7by Adrian Maull. The Zip source archive contains a corresponding 8project for using the zip32.dll library. 9 10These sample projects are distributed as part of the Info-ZIP distribution 11under the Info-ZIP license. 12 13Note that the files may be saved in "UNIX LF" format with carriage returns 14stripped. These may need to be restored before the project can be successfully 15used. 16 17The project is based on .NET Framework 1.1. It was contributed 18to the Info-Zip project April 2005. If you have questions or comments, 19contact us at www.Info-ZIP.org or for specific questions about these 20projects contact Adrian Maull directly at adrian.maull@sprintpcs.com. 21 22See UnZip.cs for more detailed information about the project. Currently 23the sample project has some bugs as noted in the above file. 24 25The original code has been adapted to the modified WinDLL interface of 26UnZip 6, using Visual C# 2005 (.Net Framework 2.0) and a unzip32.dll compiled 27by Visual C++ 6.0. The provided project file is still in the format for 28Visual Studio 7.1 (VS .Net 2003, .Net 1.1). But the code of the project 29can be used with newer Visual Studio versions (2005 = 8.0 or 2008 = 9.0); 30only the project file gets (irreversibly) converted to the newer Visual 31Studio format when first opened. 32 33However, this project is not tested throughoutly by us at this time. 34 35Note on using Visual Studio C# 2005, 2008 (or newer?): 36The UnZip maintainer was unsuccessful to run the C# sample code using 37Visual Studio 2005 or 2008 together with an unzip32.dll compiled with 38the same Visual Studio version in default configuration (unzip32.dll linked 39against the DLL version of the C runtime library). The C# program failed 40to load the unzip32.dll because of an "OS loader lock" conflict. This conflict 41should only show up when loading "mixed mode" dll that contain both managed 42and unmanaged code. So, it cannot be caused by the "pure native code" 43unzip32.dll directly, which contains nothing dangerous in its DLLMain() 44function. It seems to be caused by the new "side-by-side" C runtime dlls 45(msvcr80.dll or msvcr90.dll being loaded multiple times by a .NET application 46that uses msvcr??-linked native dlls). 47To fix this issue, one of the following work-arounds could be used: 48a) use an unzip32.dll that was linked against the system msvcrt.dll (the 49 "old" MSVC 6.0 runtime) that is a core system component of all Windows 50 versions from Windows 98/Windows ME and Windows 2000 and newer (at least 51 up to Windows Vista/Windows Server 2008), 52or 53b) use a statically linked variant of unzip32.dll (see the option DLLSTANDALONE 54 in the MSC Makefile for Win32 executables, "win32/Makefile"). 55 56Ed Gordon, Christian Spieler 572009/01/17 58