| Dart Home | PowerTCP Zip Compression for Active | Custom Development | Reply | PowerTCP Zip Compression for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Zip Compression for ActiveX Topic: Archive with all files of zero bytes length |
| User262 Posts: 2 Member Since: 02/04/02 |
posted February 4, 2002 8:56 AM e're evaluating your DartZip component to zip enable our applications. During our tests we found that your component randomly outputs a zip archive with all contained files of zero bytes length. We are not able to find any difect in our code: Dim ZippedImage As DartZip.Zip Dim Source1 As DartZip.DartStream Dim Source2 As DartZip.DartStream Dim TestBuffer1 As String Dim TestBuffer2 As String TestBuffer1 = "This is the first file This is the first file This is the first file" TestBuffer2 = "This is the second file This is the second file This is the second file" Set Source1 = New DartStream Set Source2 = New DartStream Source1.Write TestBuffer1 Source2.Write TestBuffer2 Source1.Position = 0 Source2.Position = 0 Set ZippedImage = New DartZip.Zip ZippedImage.DoEvents = False ZippedImage.FileStore.Add Source1, , , , zipNoEncryption ZippedImage.FileStore.Add Source2, , , , zipNoEncryption ZippedImage.FileStore.Item(1).Name = "Test1.txt" ZippedImage.FileStore.Item(2).Name = "Test2.txt" Call ZippedImage.FileStore.Zip("C:\Test.Zip") Set Source1 = Nothing Set Source2 = Nothing Set ZippedImage = Nothing Are we doing anything wrong in our code or is it a problem in your product (evaluation version)? Please reply as soon as possible, infact due to our short deadline we need to choose a component in few days. Thank you in advance for your support. Best regards, Francesco Carlo |
| N/A | posted February 4, 2002 11:29 AM Hi Francesco, Can you narrow down the circumstances under which the bad archive occurs? I just ran your code 15 times without seeing the problem. Thanks, -ken K M Drake Dart Tech Support |
| User262 Posts: 2 Member Since: 02/04/02 |
posted February 4, 2002 1:03 PM The problem is more frequent under the following circumstances: Platform Windows 2000 Advanced Server SP 2 - Build an ActiveX Dll in visual basic that uses your control to create the zip file; - Add the ActiveX into a package in Component Services; - Write an asp page that calls the ActiveX just built - point you browser to the asp page Whe use the following code to send the zip to client from the ActiveX DLL: ... Set tmp = New DartZip.DartStream Call ZippedImage.FileStore.Zip(tmp) tmp.Position = 0 Set Resp = GetObjectContext().Item("Response") Resp.ContentType = "application/ms-downloads" Resp.AddHeader "Content-Disposition", "attachment; filename=" & """" & "Test.zip" & """" Do Call tmp.Read(Buffer, 1024) Resp.BinaryWrite Buffer Loop While tmp.Position <> tmp.Size Resp.End() The first time the ASP application starts, the zip file contains all zero length file items. If you renew the request to web server, the archive is correct. If you unload the Web application and refresh the page on your browser the problem raises again. I've had the same problem on a VB application but only twice. Thanks again for your support. |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted February 4, 2002 3:44 PM Hi, Please see email sent to you directly. -ken K M Drake Dart Tech Support |
| User99 Posts: 1 Member Since: 04/18/02 |
posted April 18, 2002 2:28 PM Hi, I am having similar problem, it is archiving with files of zero bytes length but randomly. System: Windows 2000, Visual Basic 6.0 SP5 ------------------------------------------- Private Sub CreateZip(m_vFile As Variant, m_sFilename As String, _ m_sExportPath As String) Dim objStream As New DartZip.DartStream Dim objZip As New DartZip.Zip objStream.FileMode = createAlways objStream.Write m_vFile objZip.FileStore.Add objStream objZip.FileStore.Format = zipMicrosoft objZip.FileStore(1).Attributes.HiddenFile = False objZip.FileStore(1).Attributes.ArchiveFile = True objZip.FileStore(1).Name = m_sFilename objZip.FileStore.Zip m_sExportPath Set objStream = Nothing Set objZip = Nothing m_vFile = "" m_sFilename = "" m_sExportPath = "" End Sub |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted April 18, 2002 3:00 PM Hi, Does this happen with the latest update? http://www.dart.com/downloads/update.exe Are you sure BackgroundOperation is set to none? Thanks, -ken K M Drake Dart Tech Support |
| Reply | PowerTCP Zip Compression for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|