RAD Studio (Common)
ContentsIndex
PreviousUpNext
Libraries and Packages

This section describes how to create static and dynamically loadable libraries in Delphi.

Name 
Description 
A dynamically loadable library is a dynamic-link library (DLL) on Win32, and an assembly (also a DLL) on the .NET platform. It is a collection of routines that can be called by applications and by other DLLs or shared objects. Like units, dynamically loadable libraries contain sharable code or resources. But this type of library is a separately compiled executable that is linked at runtime to the programs that use it.
Delphi programs can call DLLs and assemblies written in other languages, and applications written in other languages can call DLLs or assemblies written in Delphi. 
The following topics describe elements of writing dynamically loadable libraries, including
  • The exports clause.
  • Library initialization code.
  • Global variables.
  • Libraries and system variables.
 
The following topics describe packages and various issues involved in creating and compiling them.
  • Package declarations and source files
  • Naming packages
  • The requires clause
  • Avoiding circular package references
  • Duplicate package references
  • The contains clause
  • Avoiding redundant source code uses
  • Compiling packages
  • Generated files
  • Package-specific compiler directives
  • Package-specific command-line compiler switches
 
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!