[delphizip] Zipmaster

  • From: Alistair George <bigal@xxxxxxxxxx>
  • To: "Eric.Engler@xxxxxxxxxxxxxx" <delphizip@xxxxxxxxxxxxx>
  • Date: Wed, 30 Oct 2002 10:13:34 +1300

Hello Eric,

Suggested code change:
procedure TZipMaster.Load_Zip_Dll;
var
  fullpath: string;
begin
   // This is new code that tries to locate the DLL before loading it.
   // The user can specify a dir in the DLLDirectory property.
   // The user's dir is our first choice, but we'll still try the
   // standard Windows DLL dirs (Windows, Windows System, Current dir).
   //Some users may make FDLLDirectory with, or without the appendbackslash
  fullpath := '';

  if FDLLDirectory <> '' then
    if FileExists(FDLLDirectory + '\ZIPDLL.DLL') then
      fullpath := FDLLDirectory + '\ZIPDLL.DLL'
    else if FileExists(FDLLDirectory + 'ZIPDLL.DLL') then
      fullpath := FDLLDirectory + 'ZIPDLL.DLL';

  if fullpath = '' then
    fullpath := 'ZIPDLL.DLL'; // Let Windows search the std dirs





and

procedure TZipMaster.Load_Unz_Dll;
var
  fullpath: string;
begin
   // This is new code that tries to locate the DLL before loading it.
   // The user can specify a dir in the DLLDirectory property.
   // The user's dir is our first choice, but we'll still try the
   // standard Windows DLL dirs (Windows, Windows System, Current dir).
  //Some users may make FDLLDirectory with, or without the appendbackslash
  fullpath := '';
  if FDLLDirectory <> '' then
    if FileExists(FDLLDirectory + '\UNZDLL.DLL') then
      fullpath := FDLLDirectory + '\UNZDLL.DLL'
    else if FileExists(FDLLDirectory + 'UNZDLL.DLL') then
      fullpath := FDLLDirectory + 'UNZDLL.DLL';


Other related posts: