[delphizip] Re: Autoload error handling problem

  • From: "Russell Peters" <russellpeters@xxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Wed, 1 Jan 2003 07:37:30 +1100

Personally I think that if it cannot load a valid dll then it should throw
an exception!
Looks like I missed even stopping things - will amend in new version (out
when get spanning volumes working).
For new version has the behaviour of renaming zipped files been agreed on ?
(it needs to be consistent).
Russell Peters
http://www.users.bigpond.com/russellpeters/delphizip.html
----- Original Message -----
From: <Eric.Engler@xxxxxxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Wednesday, January 01, 2003 5:49 AM
Subject: [delphizip] Autoload error handling problem


>
> When autoloading the DLLs, the code wasn't stopping if the DLL couldn't be
> found. Here's my proposed changes:
>
> I added these 2 lines and changed the third line:
>
>    if Result = 0 then
>       Exit; // couldn't load DLL
>    autoload := True;
>
> Here's the place in the ZIPDLL loading where I made my changes:
>
> function TZipMaster.Load_ZipDll(var autoload: boolean): integer; // New
1.70
> begin
>     autoload := false;
>     if ZipDllHandle = 0 then
>     begin
>         Result := Load_Zip_Dll;
>         if Result = 0 then
>           Exit; // couldn't load DLL
>         autoload := True;
>     end
>    <more code follows>
>
> Here's the place in the UNZDLL loading where I made my changes:
>
> function TZipMaster.Load_UnzDll(var autoload: boolean): integer; // New
1.70
> begin
>     autoload := false;
>     if UnzDllHandle = 0 then
>     begin
>         // DLL is not loaded already
>         Result := Load_Unz_Dll;
>         if Result = 0 then
>           Exit; // couldn't load DLL
>         autoload := True;
>     end
>     <more code follows>
>
> Eric
>
>



Other related posts: