Subject | Re: [IBO] To use TIB_ as parameter DLL, need to use ShareMem or SimpleShareMem in uses clause? |
---|---|
Author | hamacker |
Post date | 2015-02-04T13:36:49Z |
AVs are always evil surprises. :-(
One thing to watch out for is the timing of your library
release. IBObjects does a number of things based on timer,
and the total release many Windows resources is not as
predictable as it could be. You may need to delay the
release of your DLL.
Note that you can also dynamically load and unload Delphi
runtime packages (see LoadPackage and UnloadPackage functions).
I do this in one my applications to provide a sort of plug-in
facility. (This application is still in Delphi6, I am in the
process of trying to upgrade, but it's a big application.)
Using this system I am sharing TIB_Connection and pretty much
everything other sort of component without problems. I do
the release in the application OnIdle processing by checking
reference counts on the dynamically loaded packages. (I
can't remember why I first did that, the code was written 15
years ago, but I do remember having trouble getting them to
release cleanly.)