login about faq

Hello, How can I use the AbortCheck / events capabilitiers for the ActiveX components. The zip2 and mailman reference documentations (http://www.chilkatsoft.com/refdoc/xChilkatZip2Ref.html ...) describe a HeartBeat properties but no event is described and the AbortCheck callback is not documented. Is there any possibility to monitor the completion (percentage done) of a task for ActiveX components ?

Thank you!

asked Jan 28 '14 at 06:24

Dwoops's gravatar image

Dwoops
8123


For WriteZipPercentDone (which will change to "PercentDone" in the next version (v9.5.0) of Chilkat).

WriteZipPercentDone(ByVal pctDone As Long, abort As Long)

(This description is for the standardized "PercentDone" event in the next version, but applies to WriteZipPercentDone) Provides the percentage completed for any method that involves network communications or time-consuming processing. This event is only fired when it is possible to know a percentage completion, and when it makes sense to express the operation as a percentage completed. The pctDone argument will have a value from 1 to 100. For operations (Chilkat method calls) that complete very quickly, the number of PercentDone callbacks will vary, but the final callback should have a value of 100. For long running operations, no more than one callback per percentage point will occur (for example: 1, 2, 3, ... 98, 99, 100). The abort output argument provides a means for aborting the operation. Setting it to 1 will cause the method to abort and return a failed status (or whatever return value indicates failure).

The PercentDone callback counts as an AbortCheck event. For method calls that complete quickly such that PercentDone events fire, it may be that AbortCheck events don't fire because the opportunity to abort is already provided in the PercentDone callback. For time consuming operations, where the amount of time between PercentDone callbacks are long, AbortCheck callbacks may be used to allow for the operation to be aborted in a more responsive manner.

VB6 Event callback implementation:

Dim WithEvents myZip As ChilkatZip

Private Sub myZip_WriteZipPercentDone(ByVal pctDone As Long, abort As Long)

'Insert application code here.

End Function

link

answered Jan 30 '14 at 11:53

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

If using VB6, this is how you would use the AbortCheck event:

AbortCheck(abort As Long)

Provides the opportunity for a method call to be aborted. The AbortCheck event is fired periodically based on the value of the HeartbeatMs property. If HeartbeatMs is 0, then no AbortCheck events will fire. As an example, to fire 5 AbortCheck events per second, set the HeartbeatMs property equal to 200.

VB6 Event callback implementation:

Dim WithEvents myZip As ChilkatZip

Private Sub myZip_AbortCheck(abort As Long)

'Insert application code here.

End Function

link

answered Jan 30 '14 at 11:49

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

edited Jan 30 '14 at 11:49

The UnzipPercentDone event is the same as WriteZipPercentDone, with only a difference in the name. In v9.5.0, these events coalesce into a single PercentDone event. This will be documented in the release notes, and an alternative backward-compatible DLL will be provided in v9.5.0 as well (but apps will need to switch to the new API w/ the new DLL to move beyond v9.5.0) see http://www.chilkatforum.com/questions/4692/next-activex-update

link

answered Jan 30 '14 at 11:56

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×96
×19
×14

Asked: Jan 28 '14 at 06:24

Seen: 7,456 times

Last updated: Jan 30 '14 at 11:56

powered by OSQA