SysInit.UnloadDelayLoadedDLL2

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure UnloadDelayLoadedDLL2(szDll: _PAnsiChr);

C++

extern DELPHI_PACKAGE void __stdcall UnloadDelayLoadedDLL2(char * szDll);

Properties

Type Visibility Source Unit Parent
procedure
function
public
SysInit.pas
SysInit.hpp
SysInit SysInit

Description

Unloads a delay loaded library.

Use UnloadDelayLoadedDLL2 to unload a previously delay loading-enabled library. If nil is specified, all delayed-load DLLs are unloaded.

Unloading a library is safe because, if the functions are needed, the delay loading mechanism loads them again.

Note:  If a library is both implicitly loaded and delay loaded, using the UnloadDelayLoadedDLL2 routine unloads it. This happens because the regular library imports hold the library in memory. In this case, using UnloadDelayLoadedDLL2 resets the delay load tables so that the next call to a delayed import function reloads it.

See Also