[delphizip] Re: ZipBuilder UnzBusy problem?

  • From: "James Turner" <james.d.h.turner@xxxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Wed, 4 Dec 2002 18:36:54 -0000

Petko,

What I think is happening is Extract is being called by an event handler
before a previous call has completed. Since you mention use of the UnzBusy
flag, I think that you've worked this much out for yourself. I think you
need to create a global variable that is set before extraction begins and
cleared when it ends. Since my C++ is not very good I'll explain in Pascal

var PreviewBusy : Boolean; // MUST BE GLOBAL

procedure PreviewText;
begin
  if PreviewBusy then exit;

  PreviewBusy := true;
  try ...
       ...
       ZipMaster.Extract
       ...
       ...
  finally PreviewBusy := false end;
end;

I think that this will prevent the lockup you describe, however, you will
have to write code that ensures that this procedure is called later if
called when busy.

It's a simple solution, but it should work.

-- James Turner
www.skaro.net


----- Original Message -----
From: "Petko Kafedjiski" <kafedjiski@xxxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Wednesday, December 04, 2002 5:49 PM
Subject: [delphizip] Re: ZipBuilder UnzBusy problem?


>
>
> James,
>
> The files have various sizes, I am not sure whether the problem is related
> to the file size.
>
> How can I know when the file extraction is complete? I use file-to-stream
> extraction.
>
> If I could know, when the extraction is complete, maybe I could use my
> validation method.
>
> Thank you!
>
> Petko Kafedjiski  >From: "James Turner" >Reply-To: delphizip@xxxxxxxxxxxxx
> >To: >Subject: [delphizip] Re: ZipBuilder UnzBusy problem? >Date: Wed, 4
Dec
> 2002 16:29:46 -0000 >>>Petko, >>How large are the text files? >Are
messages
> being processed during file extraction (perhaps by an >OnProgress event
> handler)? >Are you instructing the DLL to extract data before the previous
> extraction >has completed? >Have you tried ignoring the UnzBusy property
in
> favour of your own >validation to ensure that the earlier unzip request
has
> completed? (It >sounds like UnzBusy may not be reliable in all
> circumstances.) >>James Turner >www.skaro.net
>
> --------------------------------------------------------------------------
--
> the new MSN 8[1] and get 2 months FREE*
>
> --- Links ---
>    1 http://g.msn.com/8HMSEN/2015
>


Other related posts: