----- Original Message ----- From: "Sean Cross - CRM" <[EMAIL PROTECTED]> To: "Borland's Delphi Discussion List" <[email protected]> Sent: Tuesday, March 28, 2006 11:04 PM Subject: RE: Modular Program
> IMHO packages are a better solution as you can pass objects between modules. Doing this with dll's is rather difficult, > but you could probably get around it by using interfaces. In one project we passed a pointer to each DLL, when loaded, indicating the main form of the calling executable (the form with this panel is in the USES declaration of the DLL so that its structure is in the scope of the DLL (though the form itself is not initialised in the DLL, but only in the calling program); anything in the .exe main form can be referenced using this pointer: a panel in the DLL can be planted on the .exe by redirecting its parent property to the pointer: very neat (to be safe you need to test that the pointer is not NULL before using it, and later to destroy the DLL objects on unloading the DLL from memory, assuming you want to dynamically load and unload multiple DLLs, as was our case); _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

