Exporting Objects from DLLs
It's possible to access an object and its methods even if that object is contained within a DLL. There are some requirements, however, to how that object is defined within the DLL as well as some limitations as to how the object can be used. The technique we illustrate here is useful in very specific situations. Typically, you can achieve the same functionality by using packages or interfaces.
The following list summarizes the conditions and limitations to exporting an object from a DLL:
The calling application can only use methods of the object that have been declared as virtual.
The object instances must be created only within the DLL.
The object must be defined in both the DLL and calling application with methods ...
Get Borland® Delphi™ 6 Developer's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.