Loading Configuration

[<<<] [>>>]

  scriba_LoadConfiguration(pProgram,pszForcedConfigurationFileName);

The next function call is scriba_LoadConfiguration(). This function gets the configuration information from the compiled configuration file. The details of configuration files is detailed in section Configuration File Handling.

It is not a must to call this function from the embedding application, but with some few exceptions most embedding applications will do. Most ScriptBasic interpreter program objects need configuration information to be executed successfully.

To get the configuration for a program object there are two ways:

The second approach is necessary to gain performance in case there are several interpreters running one after the other or in parallel threads in the same process. If all these interpreters need the same configuration information they can use the same memory data, because the configuration information is not alterable by the interpreter. This way you can save the successive file loading and the extra memory space.

When the configuration is inherited it is very important that the program object holding the configuration is not destroyed while any of the inheriting program objects are alive. Therefore such applications usually create a program object that does not run any program but holds the configuration information loaded calling scriba_LoadConfiguration() and that exists for the life of the whole process.

For more information how to inherit the configuration information see the function scriba_InheritConfiguration().


[<<<] [>>>]