Libraries

A library, also called Dynamic Link Library (DLL), provides application-specific functions that can be used throughout the system, by many sessions. A library is a script that is stored in a separate component. The library is compiled independently of the program scripts that use it. Libraries are loaded at runtime by sessions that use them. When a session needs to access a library, the library is loaded, and the relevant routine is executed.

To create libraries

You can create and edit libraries in the Program Scripts / Libraries (ttadv2530m000) session.

Libraries are a type of program script. The program script code should start with “dll” and the script type should be “General Library”. This helps categorize the scripts into their general use.

Note

You edit and compile a library the same way that you edit and compile a program script. When you create a function in a library, you should consider these differences:

  • When you name the function, precede the function name with the library name.
  • Functions are declared as EXTERN.
  • The DllUsage / EndDllUsage block is used to communicate how the library function can be used. This text will be displayed when you generate the library documentation or perform a bic_info on the resulting object file.

For more information, refer to "Dynamic-link libraries" in the "3GL Language Features" section in the Infor ES Programmer's Guide.

User Exit DLLs

LN supports the use of User Exit DLLs. Customers can implement User Exit DLLs to create extra business logic, without having to change the standard LN software. The business logic in a User Exit DLL is automatically executed before and after the standard 'before' and 'after' handling of save and delete actions. In this way, you can conditionally publish data changes to the outside world.

A User Exit DLL meets these conditions:

  • The name of the DLL consists of the table code with "ue" as suffix. For example, tccom001ue
  • The DLL includes bic_dal, as follows: #include <bic_dal>

A User Exit DLL (UEDLL) contains specific hooks, such as the following:

  • ue.after.after.destroy.object()
  • ue.after.before.save.object()

In these hooks, you define the extra business logic to be executed. For 4GL sessions, the hooks are executed just before and after the corresponding defined standard sections/hooks of the UI script and/or DAL script. For 3GL scripts and DLLs, the hooks are executed just before and after the corresponding database operation, such as db.insert, db.update, or db.delete.

Note

The business logic in a User Exit DLL should not change the standard functionality of the LN software; for example, these DLLs are only intended for integration purposes, or to perform extra steps.