RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.AddModuleUnloadProc Function

AddModuleUnloadProc adds a call to your defined routine when a package is unloaded.

Pascal
procedure AddModuleUnloadProc(Proc: TModuleUnloadProc); overload;
procedure AddModuleUnloadProc(Proc: TModuleUnloadProcLW); overload;
C++
AddModuleUnloadProc(TModuleUnloadProc Proc);
AddModuleUnloadProc(TModuleUnloadProcLW Proc);

System

Before Delphi unloads a package that was used by your application, it can optionally call your Proc routine. In essence, AddModuleUnloadProc adds your callback routine to the head of the list of internal routines that Delphi invokes to perform the unload.  

Use RemoveModuleUnloadProc to reverse the effect of AddModuleUnloadProc. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!