Loading the COM Module
Copying the Amt COM Module files
When the Amt COM Module will be used on a machine which does not have an installed AMT COBOL Environment, it is necessary to copy the Amt COM Module library files to this machine.
To do this copy the contents of the folder <Your AMT Environment>\AmtTools\ComModule, from a server with an installed AMT Environment, to a folder on the machine the Amt COM Module will be used.
A Side-by-side assembly manifest (application manifest) file, named 'AmtCOMModule.X.manifest', is also located in the ComModule folder.
Powershell
# First load the COMModule dll
Add-Type -Path '<Path to COMModule>\AmtCOMModule.dll'
# Then create a COM Module object
$COBOLapp = New-Object Asysco.Amt.COMModule.AmtCOMConnection
Add-Type -Path '<Path to COMModule>\AmtCOMModule.dll'
# Then create a COM Module object
$COBOLapp = New-Object Asysco.Amt.COMModule.AmtCOMConnection
C# (.NET)
Refering to the COMModule dll
Open (Create) the project to use the COMModule in, in Visual Studio. Then right click the References node of the project and click 'Add Reference'. Browse to the folder <Your Environment>\AmtTools\ComModule and add a reference to the AmtCOMModule.dll executable. The COM Module can then be used in the code of the project.It is advised to add a 'using Asysco.Amt.COMModule;' directive to every code file the COMModule will be used. |