[delphizip] Re: checking dll's silently

  • From: Achim Kalwa <achim.kalwa@xxxxxxxxxxx>
  • To: delphizip@xxxxxxxxxxxxx
  • Date: Fri, 19 Nov 2004 12:01:01 +0100

Hi,

zifnabbe@sourceforge wrote:

> Is there already a way to check if the dll is available on the system
> (and has the right version), without giving an exception when there
> is a problem? I want to disable the zip options if there is a problem
> with the Zip dll.

Yes, you can try to load the library yourself:

var
   h : THandle;
   ZipAvailable : Boolean;

begin
   h := LoadLibrary('zipdll.dll');
   if h > 0 then begin
     FreeLibrary(h);
     ZipAvaliable := True;
   end
   else
     ZipAvaliable := False;
...

HTH
Achim

-----------
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: