GetEurekaLogModuleVersion function

Top  Previous  Next

EurekaLog includes a function called GetEurekaLogModuleVersion, that enables you to obtain the EurekaLog  version used to compile a specified module (0 if the module it isn't compiled with EurekaLog, 400 if is compiled with EurekaLog 4.0.0, 512 if is compiled with EurekaLog 5.1.2, ...).

 

Syntax of this function is as follows:

 

function GetEurekaLogModuleVersion(HModule: THandle): Word;

 

Example:

 

 

uses ExceptionLog; // The required unit...

 

 

// This function returns the EurekaLog version used to compile a specified file...

function GetEurekaLogFileVersion(const FileName: string): Word;

var

   Module: THandle;

begin

   Result := 0;

   // Load the file to obtain its Handle...

   Module := LoadLibrary(PChar(FileName));

   if (Module <> 0then

   try

     Result := GetEurekaLogModuleVersion(Module);

   finally

     // Unload the file...

     FreeLibrary(Module)

   end;

end;