Call external DLL
Syntax
![]()
Command
Mandatory parameter Optional parameter Mandatory keyword Optional keyword |
CALL (<Procedure>, <Library>[, <Dlltype>])
Description
Accesses routines in an external dll library.
Diagram
Returned value type
None
Parameters
Parameter | Description |
<Procedure> | Expression giving the procedure name. |
<Library> | Expression giving the name of the dynamic link library in which the procedure can be found. |
Remarks
The system item SI-PARAM can be used to pass parameters to the routine and to receive results.
The status of the CALL command is stored in the system item GETLASTRESULT. If the CALL is executed
succesfull, GETLASTRESULT is empty. A more elaborate explanation of the usage of external libraries can be found in
Using External DLLs.
When the external library is written in C# and compiled using .NET the
classname the function (procedure) belongs to should be added the
<Procedure> description. See Adding your
own external .dll.
By default the library will be called by the same .NET version which runs AMT. To call the library with an older .NET version, the library must be added to either the Sys.ini parameter 'AMTCALLDLLNET48' or 'AMTCALLDLL'. See Configuring Sys.ini.
Example
call ('TestCall.CallHello', 'CallTest.dll')
if getlastresult = ''
sme ('result: ', si-param)
else
sme ('Error in dll CallTest!')
endif