Yes... this is my problem too. In my office, we used "late binding" in VB. Main EXE load OCX when it just needed, the OCXs are registered to main EXE via database. I wanted the same too, I was using LoadPackage to load those BPL. Before I know that BPL can be used to save "MDI child" form, I used a DLL (with LoadLibrary). But I always got a problems with errors (don't know what the error is).
FYI : I put the forms in BPL into form container in main EXE. (frmBPL.parent = frmContainerHandle) Sorry for my bad english... (what I'm talking about !>_<) Niksen Harjanto On 6/22/09, Paul Bennett <[email protected]> wrote: > on the contrary, if I use early binding (ie declare the dll function as > external) the it all works as expected. The problem I have is in trying > to use late (dynamic) binding (ie using loadlibrary to load the dll and > then get the process address for the (only) exported function.Experience > is something you don't get until just after you need it. > > Paul. > > ----- Original Message ----- > From: "Niksen Harjanto" > To: [email protected] > Subject: Re: [delphi-en] Running Forms in DLLs > Date: Sat, 20 Jun 2009 08:57:23 +0700 > > > > I was having similar problems with yours, strugling with DLLs, but > thats the problem. MDI Child form can not be created from a dll. Use > BPL (Borland Package Library) instead. > Here some articles you can read. > > Sorry for my bad english... > > Niksen Harjanto > > On 6/19/09, Paul Bennett <[email protected]> wrote: > > 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 > > > > > > > > ------------------------------------ > > > > ----------------------------------------------------- > > Home page: http://groups.yahoo.com/group/delphi-en/ > > To unsubscribe: [email protected]! Groups > Links > > > > > > > > > > [Non-text portions of this message have been removed] > > > > -- > _______________________________________________ > Surf the Web in a faster, safer and easier way: > Download Opera 9 at http://www.opera.com > > Powered by Outblaze > > > [Non-text portions of this message have been removed] > > > > ------------------------------------ > > ----------------------------------------------------- > Home page: http://groups.yahoo.com/group/delphi-en/ > To unsubscribe: [email protected]! Groups Links > > > >

