sevenzipsharp


SevenZipSharp: Aborting In ProgressCompression


Using SevenZipSharp wrapper has anyone succeeded in aborting an in-progress compression? I used:
FileCompressionStarted(ByVal sender As Object, ByVal e As SevenZip.FileNameEventArgs)
to see some activity and tried:
e.cancel = true
but nothing happened. Compression continues working until all files are packed. Any ideas?
resolved and explained in other forum, please see link, thanks everyone
http://www.vbforums.com/showthread.php?697661-RESOLVED-SevenZipSharp-aborting-compression&p=4272389#post4272389
PS. Just to have solution here, in case anyone needs
e.cancel isn't treated well in library because (like I expected) when I set e.cancel = true once, the library may not catch this request. I'm not sure this is sevenzipsharp.dll problem or 7z.dll but in code posted, when many clicks hits to my Abort button, finally, library aborted compression !!!
So implementation needs to be:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
abort = True
console.addLine("Abort requested...")
End Sub
Private Sub fFileCompressionStarted(ByVal sender As Object, ByVal e As SevenZip.FileNameEventArgs)
Dim s As String = ""
If abort Then
e.Cancel = True
s = " aborted"
End If
console.addLine("[CompressionStarted event] e.Filename = " + e.FileName + ", e.PercentDone = " + e.PercentDone.ToString + s)
End Sub
Public Sub fCompressionFinished(ByVal sender As Object, ByVal e As System.EventArgs)
console.addLine("[CompressionFinished event]")
abort = False
End Sub
Best regards,
Edouard Gora, YO3HCV

Related Links

SevenZipArchiveException: Invalid archive. open/read error
SevenZipSharp: Aborting In ProgressCompression
SevenZipSharp Password Check?

Categories

HOME
rest
cil
batch-processing
udp
openssl
filterrific
textwatcher
d
wms
command
csvhelper
phaser-framework
defragmentation
adsense
user
metronic
window
ssr
wordpress-theming
xlsx
uiview
react-leaflet
cloudflare
grub2
jpeg2000
google-api-java-client
linq-to-sql
tortoisegit
rails-activerecord
fop
jquery-form-validator
binutils
remove-method
tflearn
nmf
jflex
compare-and-swap
codelite
metadata-extractor
spring-data-neo4j
owl-api
nesc
mangodb
bitcoin-testnet
roundcube
referenceerror
swiftcharts
precedence
xen
text-files
poco-libraries
visualstudio.testtools
twiki
viewgroup
paho
spring-bean
fastq
z3py
timesten
bnd
chrome-remote-desktop
tcserver
sqlexception
barcode-printing
keycode
backstop.js
spark-cassandra-connector
database-backups
scriptlet
concur
portfolio
plone-3.x
getrusage
android-cursoradapter
data-import
windowlistener
twitter-rest-api
lines-of-code
swift2.1
callstack
stackframe
uptodate
lexicographic
symfony-2.6
grunt-contrib-concat
genetic-programming
author
method-overriding
humanizer
alpha-transparency
boost-test
level
late-static-binding
sim900
sqljdbc
gamepad
bigint
osx-snow-leopard
jqmobi
carddav
resgen
zend-lucene
usn
cadisplaylink
scrollto
hashalgorithm
easygui
noir
hardware-acceleration
surefire
iphone-sdk-3.2
scatterview
web-statistics
opcodes
configurable

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App