[fpc-pascal] Re: Library callback : how do I do that?

Sven Barth pascaldragon at googlemail.com
Fri Aug 9 13:00:15 CEST 2013

Am 09.08.2013 11:32, schrieb Lukasz Sokol:
> (OT) (On a side note to the runtime packages, some years ago I had to
> look for and indeed I came on someone's 'plugin system' for delphi (7)
> that ran with .dll (as opposed to .bpk where it usually is possible)
> and could add forms to your main application at runtime... needless to
> say, it was a paid-for (and IIRC with NDA attached) system;
> But I was /under impression/ that it would be as easy as having
> same memory/heap manager instance for main program and for dll
> (of which some were open source), and that was the main hurdle too,
> and passing the Application instance into it by using some Interfaces,
> and the dll capabilities back in the same manner;
> but before I had time to get /less/ inept on Interfaces, the demand
>   for this feature has ended...
> so I can't really remember anything else out of that area, sorry.
It's not only the memory that needs to be shared. All DLLs need to use 
the same RTL functions and the VMT pointers need to be equal as well. If 
you have two DLLs and both use TObject than for a TObject variable of 
DLL A "is" is not true for a TObject from DLL B. This is what runtime 
packages solve correctly (in addition to dependency loading, etc).


More information about the fpc-pascal mailing list