use external dll (C++) or jar (java) with ranorex

Class library usage, coding and language questions.
eyalsofer
Posts: 2
Joined: Sun Sep 13, 2015 1:56 pm

use external dll (C++) or jar (java) with ranorex

Post by eyalsofer » Sun Sep 13, 2015 2:00 pm

Hello,
I need to use an external dll (C++) or jar (java) in my automation project.
I will be happy to get some information regarding this topic since I don't have any experience with doing this.
thanks in advance! Eyal

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: use external dll (C++) or jar (java) with ranorex

Post by odklizec » Mon Sep 14, 2015 1:29 pm

Hi and welcome here,

Could you be a bit more specific about what exactly you want to achieve? How do you want to use the external dll or jar in your project?

Basically, you can add an external dll file to your project via Project >> Add Reference menu.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

CookieMonster
Certified Professional
Certified Professional
Posts: 74
Joined: Mon Aug 14, 2006 7:17 pm
Location: CH

Re: use external dll (C++) or jar (java) with ranorex

Post by CookieMonster » Mon Sep 14, 2015 1:54 pm

Hi ,

I'm not completely agree with odklizec, to add the the C++ dll over add reference to a C# or VB project, but I'm speaking about unmanaged C++ dll. The most of the time you have to add something like below at your class.

Code: Select all

[DllImport("myCPlusPlus.dll")]
internal extern static int Authenticate(string username, string password, string requestUrl, bool isHttps);
to access a method in your c++ dll.

For Java you can use maybe http://www.ikvm.net/ but I have never tried it.

But as odklizec told some more information would be helpful.

Regards
Dan

eyalsofer
Posts: 2
Joined: Sun Sep 13, 2015 1:56 pm

Re: use external dll (C++) or jar (java) with ranorex

Post by eyalsofer » Wed Sep 16, 2015 9:19 am

Hi
Thank you both!
I will try and let you know if I need more help.
ATM I don't have more information but when I do I will let you know.
Eyal