Hi all,

A little bit of background first...

I have a small application which basically consists of a MDI form 
which acts as host to a series of plugin forms. The application is 
relatively immature and subject to change. 

The application is only used at one site and all users have access to 
a shared directory on the network where the most up to date versions 
of the plugins are kept, this means it is relatively easy to check 
that the application always has the latest versions of the plugins.

Recently I have suffered from a bit of 'project creep', and I was 
looking at a way of applying the same system of updating the 
applications main form.

The Problem...

I decided to move all of the MDI Form (ie pretty much the whole 
application) into a dll, create a Loader program which checks the 
(local) dll version number against the (network) dll and downloads it 
as necessary and then loads the dll and opens the form.

This all seems to work fine, except... when the MDI form is closed 
the application crashes with an unknown exception. 

I've checked the MDI Form and as far as I can tell every object that 
is created as the form loads is freed and it unloads.

The following is the Code for the Library Project.

library FEBAPI;

uses
  ShareMem,
  madExcept,
  madLinkDisAsm,
  Forms,
  Dialogs,
  MainUI in 'Source\MainUI.pas' {FrameworkUI};

{$R *.res}

procedure RunFEB; stdcall;
var
  FrameworkUI: TFrameworkUI;
begin
  FrameworkUI := TFrameworkUI.Create(nil);
  FrameworkUI.ShowModal;
  FrameworkUI.Release;
end;

  exports RunFEB;

begin
end.

When stepping through the RunFEB method, after FrameworkUI.Release is 
called, there are repeated calls to stdWinProc (around 5 at last 
count) until the Application crashes with an unknown exception.

Any pointers most gratefully received.

Paul Bennett

Reply via email to