Board index » delphi » some correcting question words

some correcting question words

there is a big problem about plugin hierarchied projects...

1:Main Project (Exe) has mainform... which calls form in DLL
2:First DLL Project (Dll) has a form..which will called from main
application

---->loading DLL from main application (hastapplication ). than creating the
form.thats OKAY.
---->in DLL form I wantto learn the applications mainform's name

if both Main Project and DLL building with option <build with runtime
packages>then I Can get the
exe's mainformname.this code is in DLL form...
but if both Main Project and DLL building WITHOUT option <build with runtime
packages>then
exe's mainformname always nil. and Accessviolation occurs.

I Wantto EMBED form (in DLL) to hostapplications mainform.
but impossible if dll and host application build WITHOUT option <build with
runtime packages>
if this option is checked than all I can do.
DLLForm Embedding,Getting other loaded DLLs properties,HostApplication's
properties ETC.

I dont like to publish BPLs which my project uses.

SO I wantto do standalone Hostapplication's exe and standalone DLLs
without any BPL requirements. plus ;DLLFORMs can be embeeddible in
hostapplication's anyform.

everything ok if build with runtime packages.
but as I say. I dont like to publish 10-15mb bpl.for instance.

All I tried DLL plugin syle or package loading style (bpl).cant do that.

and I think no one have any comment about this.

and I think many people missed this problem.and this is a really big
problem.what I think will never be solved.

any opininon ?

 

Re:some correcting question words


If you're using a DLL to hold forms (not a BPL), then you need to make sure
the DLL is aware of the application.

When you first load the DLL, you need to call an initialization function and
pass in a pointer to the global Application variable.  This variable must be
set before loading ANY DLL forms, and must be re-set (to the old value)
before unloading the DLL.

I've had a lot of success doing this as the new forms behave just like
embedded forms.  Remember that passing data between these two files must be
done with caution or classes.

Eric

Other Threads