Unit 'exec' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#os4units]

OpenLibrary

Open a library to use

Declaration

Source position: exec.pas line 1833

function OpenLibrary(

  const Name: PChar;

  Version: LongWord

):PLibrary;

Arguments

Version

  

The version of the library required, 0 if no special version required.

Function result

A library pointer for a successful open, else nil

Description

This function returns a pointer to a library that was previously installed into the system. If the requested library is exists, and if the library version is greater than or equal to the requested version, then the open will succeed.

The library may exist in memory, or on disk; this is transparent to the OpenLibrary caller. Only Processes are allowed to call OpenLibrary (since OpenLibrary may in turn call dos.library).

A full path name for the library name is legitimate. For example "wp:libs/wp.library". This allows the use of custom libraries without requiring the user to copy the library into the system's LIBS: directory.

See also

CloseLibrary

  

Close access to library


Documentation generated on: 2021-07-30