UNITS
CLASSES, INTERFACES, OBJECTS
TYPES
VARIABLES
CONSTANTS
FUNCTIONS, PROCEDURES
IDENTIFIERS

Class TDLEManager

Unit

DynamicLibraryElement

Declaration

type TDLEManager = class

Description

The DLE Manager is designed to manage the addition of new elements, loaded dynamically from files. Of course, in order to be used, the file is a Delphi Execution package, which declares descendents of TDynamicLibraryElement class.

Fields

NameDescription
FDLEList  
FIsFinalizingPackageRequired  
FPackageList  
FPackageNamesList  
FRegistryKey  

Methods

Overview

constructor Create; virtual;
destructor Destroy; override;
function AddElement( anElement : TDynamicLibraryElementClass) : integer; virtual;
function AddPackage( aHandle : HModule; aPath : String) : integer; virtual;
procedure FreePackageList;
function GetCount: integer;
function GetElements(index: integer): TDynamicLibraryElementClass;
function GetPackageNames(index: integer): String;
function isPackageLoaded( aPackagePath : String) : boolean; virtual;
Procedure LoadElements( PackageName : String);
Function LoadPackage( PackageName : String; UnitNames : TStrings) : HMODULE;
procedure LoadRegisteredPackages;
procedure RegisterDLEIntoRegistry( aDLEClassName : String; aPackageFileName : String);
procedure RemoveElement( anElement : TDynamicLibraryElementClass) ;
procedure SetElements(index: integer; const Value: TDynamicLibraryElementClass);
procedure SetIsFinalizingPackageRequired(const Value: Boolean);
procedure SetRegistryKey(const Value: String);
Procedure UnloadPackage( PackagePath : String);
procedure UnLoadRegisteredPackages;
procedure UnregisterDLE( aDLEClassName : String);

Description

constructor Create; virtual;

 

destructor Destroy; override;

 

function AddElement( anElement : TDynamicLibraryElementClass) : integer; virtual;

 

function AddPackage( aHandle : HModule; aPath : String) : integer; virtual;

 

procedure FreePackageList;

 

function GetCount: integer;

 

function GetElements(index: integer): TDynamicLibraryElementClass;

 

function GetPackageNames(index: integer): String;

 

function isPackageLoaded( aPackagePath : String) : boolean; virtual;

 

Procedure LoadElements( PackageName : String);

This procedure loads the elements, after the loading of the package by calling the different InitialiseUnitElements of the units of the package. This procedure must be called by the main program, and not by the package.

Function LoadPackage( PackageName : String; UnitNames : TStrings) : HMODULE;

Procedure to load a package knowing its name and path. The UnitNames string list must be initialized. It is emptied and the list of units of the package is returned.

procedure LoadRegisteredPackages;

This procedure loads all DLE packages registered in the Windows registry.

procedure RegisterDLEIntoRegistry( aDLEClassName : String; aPackageFileName : String);

This procedure allows the DLE to be registered into the Windows Registry. The package file name should have the full path name, in order to load it from the disk.

procedure RemoveElement( anElement : TDynamicLibraryElementClass) ;

 

procedure SetElements(index: integer; const Value: TDynamicLibraryElementClass);

 

procedure SetIsFinalizingPackageRequired(const Value: Boolean);

 

procedure SetRegistryKey(const Value: String);

 

Procedure UnloadPackage( PackagePath : String);

This procedure must be called to unload the package from the application. When this occurs, all objects of the classes declared in the package must be freed. This is the responsibility of the classes declared in the package. The full path must be provided.

procedure UnLoadRegisteredPackages;

This procedure unloads all DLE packages registered in the Windows registry.

procedure UnregisterDLE( aDLEClassName : String);

 

Properties

Overview

Count:
Elements[ index : integer]:
IsFinalizingPackageRequired:
PackageNames[ index : integer]:
RegistryKey:

Description

Count:

 

Elements[ index : integer]:

 

IsFinalizingPackageRequired:

This variable can be set to true, only if you are sure your package does not cause an AV in its finalization. Set it BEFORE calling UnloadPackage.

PackageNames[ index : integer]:

List of packages names linked to elements : the index is the same as for the elements.

RegistryKey:

This property can be set to indicate the standard DLE storage or any specific one. Set it up before calling any registry-dedicated procedure


Generated by pasdoc 0.6.20 on Sun 5 Nov 2000 19:56:15