Functions Index :: L :: LoadLibrary

[<< up one level]


:: loader


LoadLibrary(string library, int "config")


Loads the specified library making its entire code and global data available to scripts.[1]

In coopearion with DefinePackage and DefineModule ensures that library components are loaded just once.


library: The name of the library

config: An integer specifying one of the library's predefined configurations (set of modules and packages that will be loaded).

Notes and conditions on arguments relations:

Third party libraries must be structured in a way similar to AVSLib for this function to be interoperable (see the "Using the loader module to build Avisynth script libraries" backgrounder).



dummy = LoadLibrary("avslib", CONFIG_AVSLIB_FULL)

dummy = LoadLibrary("avslib", CONFIG_AVSLIB_ARRAYS)


[<< top]


[1]: User code must assign the return value of the function to a dummy variable if the last special Avisynth global variable is used by the script. Else, last will be the function's return value (usually not a clip and in any case not the clip intended by the script writer).

This is of concern if the call to the function is made at the middle or near the end of the script and the script's coding style makes use of the implicit assignment to last (ie filter / function calls do not assign their value to a variable).