Home» Msdn Library Vb6 Zip

Msdn Library Vb6 Zip

Zip and Unzip Using VB5 or VB6. WEBINAR On demand webcast. How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2. REGISTER This code shows how to use the freeware Info. Zip Zip. 32. DLL and Un DLL files from the. Ive included the two dlls in the download file at the end of this article. The Info. Zip DLLs are open source DLLs that are available for programmers to utilise free of charge. They are standard C DLLs and were very trickyimpossible to interface with VB until VB56 offered the addressof operator. I have a large Visual Basic 6 application which has been running for about 6 years on Windows XP, SP3. Ive made a few changes to it to accomodate using it on Windows. DotNetZip is a FAST, FREE class library and toolset for manipulating zip files. Use VB, C or any. NET language to easily create, extract, or update zip files. About this Code I based this code on the ZipUnzip examples that come with the downloadable DLLs and encapsulated that code into re usable class modules that can either be used in an Active. X DLL, or just placed into your project as required. The downloadable project contains the source code for an Active. X DLL called CGZip. Library and a sample project which uses that DLL. The example program simply takes everything in its own directory and zips it into a file. Visual-Basic-6.0-Portable.png' alt='Msdn Library Vb6 Zip' title='Msdn Library Vb6 Zip' />Msdn Library Vb6  ZipYou can then unzip this file straight into the TEMP directory. You can check the structure of the Zip file using Win. Zip or similar if you want to check that the Zip is intact Ive had no problems with it at all. The Class Modules CGZip. Files and CGUn Files have a lot of properties its worth reading through the code in these classes to learn how to get the best from them. A sample piece of code using the Zip class could be as simple as. Dim o. Zip as CGZip. Files. set o. Zip new CGZip. Files. o. Zip. Zip. File. Name My. Zip. Zip. o. Zip. Add. File c mystuffmyfiles. Zip. Add. File c mystuffmymedia If o. Zip. Make. Zip. File lt 0 then. Msg. Box o. Zip. Get. Last. Message. set o. Zip nothing. The code for Unzipping files is just as straight forward. Dim o. Un. Zip as CGUn. Zip. Files. set o. Un. Zip new CGUn. Zip. Files. o. Un. Power Now Mobi. Zip. Zip. File. Name My. Zip. Zip. o. Un. Zip. Extract. Dir App. Path or whatever you like Un. Zip. Honour. Directories true keep dir structure. If o. Un. Zip. Un. Zip lt 0 then. Msg. Box o. Un. Zip. Get. Last. Message. Un. Zip nothing. Note This code is provided as is I know that there are a few bugs in the interface to the ZipUnzip DLLs including a frustrating one thats got a real cludge work around see if you can spot it. Its designed as a starting point to allow you to use Zip and Unzip functionality in your programs. You should really place the Zip. DLL and Un 32. DLL into your windowssystem directory although you can just have them in the same directory as the Active. X DLL. Ive been a version of this code for several weeks in a production application and its just been superb.