PureBasic - Library

Overview

Libraries are shared OS components which contain specific functions available to the programmer. For example, a library can contain commands to handle and manipulate pictures easily. Each OS provides a number of shared libraries to ease the programmers life. With PureBasic, it's possible to use these external libraries easily and dynamically!

The reason that libraries are so useful is because they are separate from the applications but are shared between them. A library file will only need to be loaded into memory once, therefore saving memory, especially if it is a commonly used library. They also benefit the programmer as it means you do not need to keep re-inventing the wheel every time you want to use a clever feature in your program.

Libraries are also good to keep procedures that are used by several programs and can be easily updated without the need to change your main executable.

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