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


Load a dynamic library and return a handle to it.


Source position: dynlibs.pas line 31

function LoadLibrary(

  const Name: RawByteString


function LoadLibrary(

  const Name: UnicodeString



LoadLibrary loads a dynamic library in file Name and returns a handle to it. If the library cannot be loaded, NilHandle is returned.

No assumptions should be made about the location of the loaded library if a relative pathname is specified. The behaviour is dependent on the platform. Therefore it is best to specify an absolute pathname if possible.


On error, NilHandle is returned.

See also



Unload a previously loaded library



Get the address of a procedure or symbol in a dynamic library.

Documentation generated on: May 14 2021