AMT Help Files

Loading the LionRepository Module

Copying the Amt LionRepository Module files

When the Amt LionRepository Module will be used on a machine which does not have an installed AMT Environment, it is necessary to copy the Amt LionRepository Module library files to this machine.

Copy the files LionRepository.dll, LionRepository.comhost.dll , Asysco.Amt.Libs.dll and Asysco.Amt.Windows.dll from the folder <Your AMT Environment>\Lion, on a server with an installed AMT Environment, to a folder on the machine the Amt LionRepository Module will be used.

Visual Basic

Please be aware that the Amt ComScript Module has limited functionality in non .NET languages due to restrictions of COM services.
As such the module should only be used in non .NET languages to maintain legacy applications.

 

Registering the LionRepository Module

Before the LionRepository Module can be used in a Visual Basic (Script) program it first has to be registered as a COM service in the Windows Operating System.

 

Regsvr32.exe can be found in the C:\Windows\System32 folder.

Note that on a 64-bit version of the Windows operating system, there are two versions of the Regsv32.exe file:

 

Be sure to use the correct version of Regsvr32.exe depending on the application that will use the Amt LionRepository Module.

 

Unregistering the LionRepository Module

It is important when upgrading AMT to a new fix or patch to first unregister the old LionRepository module with the command

regsvr32.exe /u <Path to LionRepository Module>\LionRepository.comhost.dll 

and then register the new version after AMT was upgraded.

 

To unregister older .NET framework versions of the LionRepository Module, the following command can be used:

Regasm /unregister <Path to LionRepository Module>\LionRepository.dll

 

Loading the Module

When starting the Visual Basic program the LionRepository Module has to be loaded into memory and an object of the basic LionRepository class has to be created. The code to do this is:

Set ReposModule = CreateObject("Asysco.Lion.Repository.Model.LionRepository")

 

PowerShell

 

The LionRepository Module requires PowerShell 7.4.1 or higher when using the Module in a PowerShell script.
Information on how to download, install and use PowerShell 7.4.1 can be found on the Microsoft PowerShell website.

 

# First load both the AMT Library dll and the LionRepository Module dll
Add-Type -Path '<Path to LionRepository Module>\Asysco.Amt.Libs.dll'
Add-Type -Path '<Path to LionRepository Module>\LionRepository.dll'

# Then create a LionRepository Module object
$Obj_Module = New-Object Asysco.Lion.Repository.Model.LionRepository

 

C# (.NET)

Refering to the LionRepository dll

Open (Create) the project to use the Com Module in, in Visual Studio. Then right click the References node of the project and click 'Add Reference'. Browse to the folder <Path to LionRepository Module> and add a reference to the LionRepository.dll.

The LionRepository Module can then be used in the code of the project.

It is advised to add the 'using Asysco.Lion.Repository.Model;' and
'using Asysco.Lion.Repository.Interfaces;' directives to every code file the LionRepository Module will be used in.