Unit 'System' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

GetProcedureAddress

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

Declaration

Source position: dynlibh.inc line 55

function GetProcedureAddress(

  Lib: TLibHandle;

  const ProcName: AnsiString

):Pointer;

function GetProcedureAddress(

  Lib: TLibHandle;

  Ordinal: TOrdinalEntry

):Pointer;

Description

GetProcedureAddress returns a pointer to the location in memory of the symbol ProcName or ordinal value Ordinal in the dynamically loaded library specified by it's handle lib. If the symbol cannot be found or the handle is invalid, Nil is returned.

On Windows, only an exported procedure or function can be searched this way. On Unix platforms the location of any exported symbol can be retrieved this way.

Only windows and OS/2 support getting the address of a function using an ordinal value.

Errors

If the symbol cannot be found, Nil is returned.

See also

LoadLibrary

  

Load a dynamic library and return a handle to it.

UnLoadLibrary

  

Unload a previously loaded library.


Documentation generated on: Oct 27 2024