[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'sysutils' (#rtl)

# SafeLoadLibrary

Load a library safely

## Declaration

Source position: sysutilh.inc line 247

`function SafeLoadLibrary(`
`const FileName: AnsiString;`
`ErrorMode: DWord = 0`
`):HMODULE;`

## Description

SafeLoadLibrary saves and restores some registers before and after issuing a call to LoadLibrary.

## Errors

None.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.