DLL in Automation Anywhere | How DLL Works | Automation Anywhere

 RPA | DLL in Automation Anywhere| Automation Anywhere- Part-53

DLL in Automation Anywhere - In this blog we will discuss another useful and interesting action or package provided by Automation Anywhere i.e. DLL or Dynamic Link Library. We will also see the working of DLL package or action using A2019 Automation Anywhere also known as Automation 360.

Before we dig deep into DLL using Automation Anywhere first of all we will discuss what are DLL or dynamic link library.

What is DLL?

A DLL is a library that contains code and data which can be used by more than one program at the same time. By using DLL, a program can be modularized into separate components. For example, the Comdlg32 dll performs common dialog box related functions. Each program can use the functionality that is contained in this dll to implement Open dialog box. It helps promote code reuse and efficient memory usage.

So now we will see each of the actions or commands present under DLL in detail one by one which is as follows:

  • Open Action - This command is used to add a user specified DLL reference which can be used in the run action. As of now only C# DLLs are supported. To use this action it requires bot agent version which will be 21.89 or above. In the properties section we need to pass in the DLL file which can be present either in the control room, desktop location or we can store the location of the DLL file in a variable and can use that variable and also we need to pass the session name which would be used further in the actions that we will be using in our process.
  • Run Function Action - This command is used to run the specific DLL function with parameters. To use this action it requires bot agent version which will be 21.89 or above. In the properties section pass in the same session name which we gave in the open action, then enter the namespace name, pass in the class name and the name of the function which is to be executed. Then click on the Add parameters to add the required parameters needed for the DLL execution and then finally assign the output to a string variable data type.
  • Close Action - This action is used to close the DLL reference. To use this action it requires bot agent version which will be 21.89 or above. In the properties section we just need to pass in the same session name which we gave in the Open action.
Now that we have discussed the various actions present under the DLL package now we will look at the steps to discuss the steps required to use these actions for creation of the bot.

  • We will pass the BitcoinPrice.dll to the open action where we need to select the file.
  • Then using the run action we need to pass the namespace as BitcoinPrice, then the name of the function as GetPriceOfBitcoin, class name as GetBitcoinPrice, then add currency parameter as USD in the parameters section and store the output in vBitCoinPrice variable of string data type.
  • Use the message box to display the output so pass in the variable name created in step 2 in the message box field.
  • Now run the bot to check the output. You will receive an error message i.e. could not load file or assembly RestSharp as this dll file is the dependency for the BitcoinPrice.dll to execute. So add the dependent file and then try to run the bot and now this time we will receive the output.
Here is the code snippet for the steps that we have discussed above which is as follows:

DLL in Automation Anywhere


So with that we have come to the end of this blog where we discussed about the working of DLL using A2019 Automation Anywhere which is also known as Automation 360. If you have any queries regarding this article then you can raise your queries in the comment section and I would be more than happy to answer all of your queries. 

Last but not the least please provide your valuable feedback as it matters the most to me.

Comments

  1. https://www.youtube.com/watch?v=qc_YxmgU1q4

    ReplyDelete
  2. in case if DLL dint close(missed), how to close at backend.. any workaround to close ..

    ReplyDelete

Post a Comment

If you have any doubts, please letme know.