Read and Review Automation Anywhere Documentation

Automation 360

Close Contents


Open Contents

DLL package

  • Updated: 2022/01/19
    • Automation 360 v.x
    • Build
    • RPA Workspace

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

Perform the following actions within the DLL package as part of using the set of available actions:
  • 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.
Important: If you use different versions of the DLL package in a parent bot and a child bot, the capability to share a session across bots is currently not supported. To share a session across parent and child bots, ensure that you use the same version of the package in both the parent and child bots.
  1. 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.
  2. Use the Run function action to run a function from the .dll and save its output value as a variable.
  3. 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> Each zipped folder contains a file with data on the code execution, which is useful for debugging.

Note: If the .dll file uses .NET functions or classes from another .dll file, you must add the second .dll file as a manual dependency of the bot.

Bot dependencies

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 Closes the current session. In the Session name field, enter the name of the session.
Open Opens the reference file.
  • In the File path field, specify the location of the path.
  • Select any of the following tabs to specify the location of the DLL you want to use:
    • Control Room file: Use a DLL that is available in the Control Room.
    • Desktop file: Use a DLL that is available on a device.
    • Variable: Use a file variable to specify the location of the DLL.
  • Select any of the following tabs to create a DLL session:
    • Local session: Specify a session name that can be used only in the current bot.
    • Global session: Specify a session name that can be used across multiple bots such as parent bots, child bots, and other child bots of the parent bots.

      See Sharing sessions across bots.

    • Variable: Specify a session variable that can be used to share that session with other child bots.

      When you run the bot, it passes the session variable to the child bot, which enables the child bot to use the DLL opened in the parent bot.

Note: The DLL package supports only DLLs written in C#.
Run function (Legacy) See Using the Run function action.
  • The Run function (Legacy) action is no longer available in the Run DLL package. We recommend that you use the Run Function action from the Run DLL package because this action is an improved version of the Run function (Legacy) action.

    Note that existing bots that use the Run function (Legacy) will continue to run successfully without any issues.

  • This action is called Run function (Legacy) starting from Enterprise A2019.16. The action is called Run function in Enterprise A2019.15 and previous releases.
Run function See Using the Run function action.

Supported data types in DLL functions

The following table list the variables and data types that you can use as an input or output parameter in DLL functions.
Note: The Run function and Run function (Legacy) actions do not support any user-defined data types in the Parameter to the function or Assign output to variable field.
Variable type as input or output parameters Supported data types in .NET
  • Char
  • Byte
  • String
  • string
  • SByte
  • UInt16
  • Int16
  • UInt32
  • Int32
  • UInt64
  • Int64
  • Int
  • Single
  • Decimal
  • Float
  • Double
  • Boolean
  • bool
  • Datetime
  • UInt16[]
  • Int16[]
  • Int32[]
  • Int64[]
  • Int[]
  • Char[]
  • Single[]
  • Decimal[]
  • Float[]
  • Double[]
  • Boolean[]
  • bool[]
  • Byte[]
  • String[]
  • Datetime[]
  • List<UInt16>
  • List<Int16>
  • List<Int32>
  • List<Int64>
  • List<Int>
  • List<Char>
  • List<Single>
  • List<Decimal>
  • List<Float>
  • List<Double>
  • List<Boolean>
  • List<bool>
  • List<Byte>
  • List<String>
  • List<Datetime>
  • List<SByte>
  • List<UInt32>
  • List<UInt64>
Note: The C# IList data type is not supported and does not work with the Automation 360 List data type.
  • UInt16[,]
  • Int16[,]
  • Int32[,]
  • Int64[,]
  • Int[,]
  • Char[,]
  • Single[,]
  • Decimal[,]
  • Float[,]
  • Double[,]
  • Boolean[,]
  • bool[,]
  • Byte[,]
  • String[,]
  • Datetime[,]
  • Byte[,]
  • UInt32[,]
  • UInt64[,]
  • Dictionary<String,UInt16>
  • Dictionary<String,Int16>
  • Dictionary<String,Int32>
  • Dictionary<String,Int64>
  • Dictionary<String,Int>
  • Dictionary<String,Char>
  • Dictionary<String,Single>
  • Dictionary<String,Decimal>
  • Dictionary<String,Float>
  • Dictionary<String,Double>
  • Dictionary<String,Boolean>
  • Dictionary<String,bool>
  • Dictionary<String,Byte>
  • Dictionary<String,String>
  • Dictionary<String,Datetime>
  • Dictionary<Int,String>
  • Dictionary<Decimal,String>
  • Dictionary<Boolean,String>
  • Dictionary<String,SByte>
  • Dictionary<String,UInt32>
  • Dictionary<String,UInt64>
Note: When creating the .Net DLL function, use the IDictionary data type instead of the Dictionary data type.
Send Feedback