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
- 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
.dllreferenced 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:
|Close||Closes the current session. In the Session name field, enter the name of the session.|
|Open||Opens the reference file.
Note: The DLL package supports only DLLs written in C#.
|Run function (Legacy)||See Using the
Run function 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|