Syntax: LIBRARY [libraryname][initialization] [termination]
This statement identifies the executable file as a dynamic-link library and optionally defines the name and library module initialization required.
If <libraryname> is given, it becomes the name of the library as it is known by OS/2. This name can be any valid file name. If <libraryname> is not given, the name of the executable file - with the extension removed - becomes the name of the library.
If <initialization> is given, it defines the library initialization required and can be one of the values below. If omitted, <initialization> defaults to INITGLOBAL.
INITGLOBAL
Using this keyword without a termination flag implies TERMGLOBAL for DLLs with 32-bit entry points.
Using this keyword without a termination flag implies TERMINSTANCE for DLLs with 32-bit entry points.
If <termination> is given, it defines the library termination required and can be one of the values below. If omitted, <initialization> defaults to TERMGLOBAL. The termination flag can only apply to DLLs with 32-bit entry points.
TERMGLOBAL
Using this keyword without an initialization flag implies INITGLOBAL.
Using this keyword without an initialization flag implies INITINSTANCE.
If the LIBRARY statement is included in a module definition file, the NAME statement cannot appear. If no LIBRARY statement appears, the module definition file describes an application.
The following example assigns the name calendar to the dynamic-link library and specifies that library initialization be performed each time a new process gains access.
LIBRARY calendar INITINSTANCE