OpenLibrary()
Syntax
Result.l = OpenLibrary(#Library, Filename$)Description
Opens a shared library in order that the functions within it may be accessed. If a library is opened with the same identifying number as another library which was already open, the library previously opened will then be automatically closed.
Parameters
#Library - The identifying number for this library. If #PB_Any is used as the '#Library' parameter, the new library number will be returned as 'Result'. This number should then be used in all function calls which make use of this library.
Filename$ - A string containing the filename of the shared library to open. Typically, if a path is not provided as part of the filename, then the library will be searched for within the application directory. If at this point, the library still has not been found, the system library directory will be searched.
Return value
Result - A value which determines whether the library could be opened. If the value is zero, then the library could not be opened. This indicates that either the file could not be found, or that the file is corrupt. Any non-zero value indicates the library has been successfully opened.
Advanced users only:
The value returned by this function, is the OS handle or pointer to the library, which then becomes available after the library is loaded. At that point, the programmer has the ability to use the opened library directly, using API function calls.
Supported OS
All