Name
IsLibrary Variable
Syntax
var IsLibrary: Boolean;
Description
Delphi sets IsLibrary to True in a library project
(DLL) or False in a program (EXE).
Tips and Tricks
In most cases, you should use
ModuleIsLibinstead ofIsLibraryto 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
IsLibraryto False, so the library sees the same False value forIsLibraryin 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 ofIsLibraryis limited.ModuleIsLibdoes not have this problem.
See Also
| Library Keyword, ModuleIsLib Variable, ModuleIsPackage Variable |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access