In order to add custom C++ functions to the CONTROL, it is necessary to write a CtrlExtension that implements a derivation of the BaseExternHdl class. |
All
non - |
bcm.dll or .a (Linux)
libBasics.dll or .a (Linux)
libConfigs.dll or .a (Linux)
libDatapoint.dll or .a (Linux)
libMessages.dll or .a (Linux)
libManager.dll or .a (Linux)
libCtrl.dll or .a (Linux)
libV24.lib or .a (Linux)
These
libraries are part of the |
The following libraries |
|
are also included in the API interface. However, they may not be used. |
Via the keyword #uses you can specify which CTRL extensions are needed in a script or in a panel. Therfore, the extensions must not be entered into the config file anymore. This facilitates the use of the extensions and the extensions are loaded first when they are needed. Which extensions a manager should load can also be defined via entries in the config.level file. We, however, recommend to use the keyword #uses. How to use the keyword #uses or how you can define which extensions should be loaded via the entries in the config.level file are described in the following.
NOTE
The driver plugins used under Linux with CtrlADO were renamed due to QT4: QMYSQL3 -> QMYSQL (for MySQL 4 and higher) QOCI8 -> QOCI (for Oracle 9i, 10g and higher) Keyword #usesVia the keyword #uses you can define which extension a panel or a script needs. The file extension can be omitted since it is set automatically depending on the operating system.
#uses "CtrlADO"
The extensions specified in a script or in a panel are not valid only in the script but manager wide and remain in the memory until the manager is stopped. The extensions are loaded into the memory by the CTRL kernel. The keyword can be used in each script before the functions and in panel global functions. An arbitrary number of #uses definitions can be used in panels and scripts. Note that the opening of panels may take a little bit longer when one or more big libraries are loaded for the first time. Entries in the config.level fileIn order for a manager to load an extension it must be
For searching CTRL extensions the following way is used:
NOTE We recommend to use a CONTROL extension without file name extension in the #uses statement since the script remains platfrom neutral and can be executed without changes on all platforms. If you specify the extension, for example, "CtrlADO.dll", this extension would not be found under Linux since it is called CtrlADO.so. It is better to use #uses "CtrlADO".
Example
Under Windows the following config entry can be used to load a DLL:
CtrlDLL = "CtrlADO"
First, the program looks for this DLL in the <proj_path>/bin
directory. If it is not found there, the program looks in the <
This entry can only be made in the [ui] or [ctrl] section. If a DLL is used by UI and CTRL, it must be entered in both sections. Any number of DLLs may be loaded. |
Chapter |
Description |
Permissible and prohibited classes for a CTRL extension, loading a CTRL extension. | |
Implementation with the example of the ADO interface. | |
Summary of required methods and objects. |
V 3.11 SP1
Copyright