DLL package
- Updated: 2024/10/16
DLL package
A dynamic-link library (DLL) file contains a shared library of functions that can be used by Windows programs. The DLL package uses a .dll file as reference and calls functions from the bot.
Before you start
- 32-bit DLL functions are supported as AutomationAnywhere.ManagedDLLWrapper.exe uses 32-bit libraries.
- If you create bots using custom DLL, and the custom DLL has a
dependency on the Apache log4net library, then we recommend using:
- log4net version 2.0.11 or later in the custom DLL.
- Update the Bot Agent (version 21.210 or later) even if the Bot Agent update is optional.
- Only the DLLs built using the Microsoft .NET Framework are supported.
- The Run DLL package is compatible with the following versions of Microsoft .NET: 4.6, 4.7, and 4.8.
- When you create a bot and use the local session with loop, ensure that you use the close session action in the bot. If you do not use the close session command, then the local session will open AutomationAnywhere.ManagedDLLWrapper.exe with each iteration of the loop. As a result, you will run out of memory space and the bot will fail.
- Use the Open
action to specify the location of the .dll
file you want to use and session name. Use this same session name for the other
actions. The
.dll
referenced is automatically added as a bot dependency. - Use the Run function action to run a function from the .dll and save its output value as a variable.
- After running the required functions, close the .dll
reference. It is important to close the .dll reference to
free the memory of the operating system.
Windows and appropriate versions of Microsoft .NET Framework are available on the devices running the DLLs.
To review the bot launcher logs, navigate to C:\ProgramData\AutomationAnywhere\BotRunner\Logs\<current month>\Bot_Launcher-<today's date>.log.zip. Each zipped folder contains a file with data on the code execution, which is useful for debugging.
When you import multiple DLLs that have one main DLL and other DLLs are referenced from it, ensure you have all the DLLs in one folder. Also, the referenced DLLs must be called using a session name that is different from the name used in the main DLL. Your bot execution will fail if the same session name is used in both the main and the referenced DLLs.
Actions in the DLL package
The DLL package includes the following actions:
Action | Description |
---|---|
Close |
See Close action |
Open |
See Open action |
Run function | See Using the Run function action. |
Supported data types in DLL functions
Variable type as input or output parameters | Supported data types in .NET |
---|---|
String |
|
Number |
|
Boolean |
|
Datetime |
|
List |
Note: The C# IList data type is not supported and
does not work with the Automation 360 List data
type.
|
Table |
Note: The Table type
variable is equivalent to a two-dimensional array type variable in
.NET.
|
Dictionary |
Note: When creating the .Net DLL function, use the
IDictionary data type instead of the Dictionary data type.
|