PureBasic - Library

Overview

Libraries are shared OS components which contain specific functions available to the programmer. For example, a library may contain functions designed to handle and manipulate pictures with ease. Each OS provides a number of shared libraries which help to ease the programmers life. With PureBasic, it is possible to access these external libraries not only easily, but also dynamically!

The reason that libraries are so useful, is due to the fact that they are separate from the applications which use them, but at the same time shared between these applications. A library file requires only that it be loaded into memory once, this therefore saves memory, especially when it is a commonly used library. The programmer also benefits, since there is no need to keep re-inventing the wheel every time a clever feature is called for within an application.

In addition, libraries are an excellent place to store procedures which are used by several programs. These libraries are easy to update, and when changes are made, there is no need to change the main executable which makes use of this library.

Under the Windows OS, shared libraries are well known as: 'DLL's, or Dynamic Link Libraries.

Command Index

CallCFunction
CallCFunctionFast
CallFunction
CallFunctionFast
CloseLibrary
CountLibraryFunctions
ExamineLibraryFunctions
GetFunction
GetFunctionEntry
IsLibrary
LibraryFunctionAddress
LibraryFunctionName
LibraryID
NextLibraryFunction
OpenLibrary

Example

Library.pb

Supported OS

All

Reference Manual - Index