 library SverkaSF;

uses
  SysUtils,
  Dialogs,
  Classes,
  Forms,
  Windows,
  Messages,
  Graphics,
  Controls,
  DB,
  DBTables,
  LibrUnit in 'LibrUnit.pas',
  Common in 'Common.pas',
  uAct1N in 'uAct1N.pas' {frmAct1N},
  FindPredprUnit in 'FindPredprUnit.pas' {FindPredprForm};

//,
//  uAct3 in 'uAct3.pas' {frmAct3},
//  uAct2 in 'uAct2.pas' {frmAct2};

{$R *.res}

 var DllApp:TApplication;

procedure DllEntryPoint(Reason: Integer);
  begin
   if Reason = DLL_PROCESS_DETACH then
   begin
    try
     if Assigned(frmAct1N) then
     begin
      frmAct1N.Free;
      frmAct1N:= nil;
     end;
    finally
     if Assigned(DllApp)
      then Application := DllApp;
    end;
  end;
end;

 Procedure ShowSverkaSF(App:TAppLication);    //stdcall;
  begin
  if frmAct1N<>nil then frmAct1N.Show;  // Exit;
  if not Assigned(DllApp) then
  begin
  DllApp:=Application;
  Application:=App;
  end;
   try
    if not Assigned(frmAct1N) then
      frmAct1N:=TfrmAct1N.Create(Application);
    LockWindowUpdate(DllApp.Handle);
    frmAct1N.Show;
   except
   end;
  end;



 exports
  ShowSverkaSF;

begin
DllProc:=@DllEntryPoint;
end.


