IsLibrary Variable
In most cases, you should use ModuleIsLib
instead
of IsLibrary
to avoid complications caused by
packages.
If a library uses the vcl50 package, and that
library is loaded into an application that also uses the
vcl50 package, the library and the program will
share a single instance of the vcl50 package.
The application sets IsLibrary
to False, so the
library sees the same False value for IsLibrary
in
the vcl50 package. Any unit you write can also
be loaded simultaneously by an application and a library in the same
process, so the value of IsLibrary
is limited.
ModuleIsLib
does not have this problem.