Archived Forum Post

Index of archived forum posts


Issue when using Async zip operation

Dec 24 '15 at 04:42


I've already sent a message a couple of days ago but didn't received a reply, so I try again by adding a screenshot that could eventually bring some light.

I'm a registered user of your "Bundle" and I'm experiencing an issue when dealing with "Async" zip operations.

To make the long story short, I'm developing a DLL in Visual C++ which can be invoked from Visual Basic 6: one of the operations the DLL needs to perform is to zip a folder which contains a certain number of sound files so, being a potentially long operation, I choose to use the "Async" function WriteZipAsync in order to be able giving back the percentage of advancement: the code I've developed works quite well in most environments with the only exception of Visual Basic 6 which, unfortunately, is still widely used by our customers.

The problem raises when the VB6 application is closed: if during the application's life I make a call to the WriteZipAsync function, when the application is closed an exception 0xC0000005 is raised and the VB6 environment crashes. It's important to note that this doesn't happen always when the application is launched using its EXE instead of the Visual Basic 6 environment debugger (VB6.exe): when it happens, the call stack of the crash is visible inside the following screenshot:

In order to be sure that the issue is not related to my own code, I've developed a very small DLL project and a very small VB6 project and I was able to replicate the issue with a certain frequency so it's very likely that your library is doing something odd which is causing the issue to the VB6 environment. A zip containing the DLL project and the VB6 project is available on the link below:

After unzipping the file, you will see that there is a solution from my DLL (TestZip.sln) that generates in output TestZip.dll: this should be copied into c:WindowsSystem32 before running the VB6 sample which is under the "VB6" folder (TestZip.vbp). After launching the VB6 project just: - enter into the text box a path to a folder containing a few files to zip - press the "Test Async" button - wait for a few until the destination zip "" is generated inside the "c:" folder (you may obviously change this destination folder) - close the application: the crash should happen after a few seconds

I know that VB6 is quite unreliable when dealing with callbacks and events from secondary threads but in this case, as you will see, my DLL doesn't communicate with VB6 directly during the async zipping session so I hope that you could bring some light in order to avoid or turnaround the issue: any suggestion is welcome.

Kind Regards

Severino Delaurenti