[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'dynlibs' (#rtl)

InitializeLibrary

Load a library and initialize a set of symbols

Declaration

Source position: line 0

function InitializeLibrary(

  var Handler: TLibHandler;

  const LibraryNames: array of String;

  const User: Pointer = nil;

  const NoSymbolErrors: Boolean = false

):Integer;

function InitializeLibrary(

  var Handler: TLibHandler;

  const LibraryName: String = '';

  const User: Pointer = nil;

  const NoSymbolErrors: Boolean = false

):Integer;

Description

InitializeLibrary will attempt to load the library described in Handler, and will attempt to load it from FileName or FileNames if an array of names is provided. When the library is loaded, the addresses of the symbols defined in Handler.Symbols will be loaded and written to the indicated location.

The function returns the reference count of the library (number of times a load was attempted), or raises an exception on error. An error may occur if the library cannot be loaded or when some required symbols could not be found.

Errors

On error, a EInOutError exception is raised.

See also

TryInitializeLibrary

  

Try to load a library and initialize a set of symbols

ReleaseLibrary

  

Unload a library


Documentation generated on: Oct 02 2010