[delphizip] Re: Why this source not Work?

  • From: "Roger Aelbrecht" <Roger.Aelbrecht@xxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Thu, 5 Jun 2003 18:39:11 +0200

brain2kx wrote:
> I must create a  New file Zip with name Test.zip.
> this is the steps:
>
> 1. i must create a file Test.zip (from zero)
> 2. i must add the programm "prog.exe".
>
> When start my application, go in crash because "test.zip" is not
> exist.
>
> Hot can i create a New Zip Archive file with name test.zip?
>
> Thanx
> ----- Original Message -----
> From: "Udo Nesshoever" <delphi@xxxxxxxxxxxxx>
> To: <delphizip@xxxxxxxxxxxxx>
> Sent: Wednesday, June 04, 2003 5:23 PM
> Subject: [delphizip] Re: Why this source not Work?
>
>
>> On Wed,  4 Jun 2003 14:25:55 +0200 you wrote in
>> "newsletter.DelphiZip" about "[delphizip] Re: [delphizip] Re: Why
>> this source not Work?":
>>
>>> Yes!
>>> The problem is on the Test.zip because not foud it but i wnat
>>> create a New Zip Archive. How can i do it?
>>
>> Do I understand that right? You can't find the "test.zip"?
>> Or try to use the debug mode to see, what the ZipBuilder does.
>> Did you set the options?
>>
>> Cheers,
>>    Udo
>> -----------
>> To unsubscribe from this list, send an empty e-mail
>> message to:
>>   delphizip-request@xxxxxxxxxxxxx
>> and put the word unsubscribe in the subject.
>
> -----------
> To unsubscribe from this list, send an empty e-mail
> message to:
>   delphizip-request@xxxxxxxxxxxxx
> and put the word unsubscribe in the subject.

Sorry for not answering sooner, could not do any computer work
couple of days.

First We need to know some basic details :
- what BCB are you using ? BCB5 or BCB6
  I ask because I can only check with BCB5 and maybe some change
  is not implemented in the BCB6 demo's

I looked into the code supplied for BCB6 and there is one change
not implemented for the OnProgress event.
In Main.cpp  the line
void __fastcall TMainForm::ZipBuilder1Progress(TObject *Sender,
         ProgressType ProgrType, String Filename, long FileSize)

chould be changed to
void __fastcall TMainForm::ZipBuilder1Progress(TObject *Sender,
         ProgressType ProgrType,  String Filename, unsigned FileSize)

In main.h change line
void __fastcall ZipBuilder1Progress( TObject *Sender, ProgressType
ProgrType,
                           String Filename, long FileSize );
into :
void __fastcall ZipBuilder1Progress( TObject *Sender, ProgressType
ProgrType,
                          String Filename, unsigned FileSize );

Second when you have the "crash" are you working in the IDE
I presume you are.
In the IDE go to menu Tools|Debugger Options
In the Tab OS Exceptions : make sure none of the exceptions is
checked ( none should have a red or green mark)
then at the bottom check Handled By ->User program
That way the exception are handled by TZipBuilder as it was
intended and not by the IDE

If these setting are OK the code you wrote should work.

HTH

Roger Aelbrecht
http://web.wanadoo.be/driehoeksw

-----------
To unsubscribe from this list, send an empty e-mail 
message to:
  delphizip-request@xxxxxxxxxxxxx 
and put the word unsubscribe in the subject.

Other related posts: