Unit 'EXEC' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#amunits]

OpenLibrary

Open a library to use

Declaration

Source position: exec.pas line 1258

function OpenLibrary(

  const libName: pCHAR;

  version: LongWord

):pLibrary;

function OpenLibrary(

  const libName: string;

  version: LongWord

):pLibrary;

Arguments

libName

  

The name of the library to open

version

  

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

Function result

A library pointer for a successful open, else nil

Arguments

libName

  

The name of the library to open

version

  

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

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