DLL Registrations

Ask general questions here.
behdad
Posts: 16
Joined: Wed Nov 22, 2006 10:56 pm
Location: Australia

DLL Registrations

Post by behdad » Thu Nov 23, 2006 3:49 am

Hello,

I would like to know if there is a way that I could place the RanorexCore.dll and RanorexNet.dll under a different directory than my test executable?

I tried to use regasm and regsvr32 but no luck.

Does the ranorex dlls have to be in the same directory of the test dlls?

Thanks in advance for you help.

Cheers,
Behdad.

admin
Site Admin
Site Admin
Posts: 350
Joined: Wed Jul 05, 2006 7:44 pm

Post by admin » Thu Nov 23, 2006 10:38 pm

behdad wrote:Does the ranorex dlls have to be in the same directory of the test dlls?
No, you can do the following if you want the dlls only ones:

C++

You need only the RanorexCore.dll.
Copy the RanorexCore.dll into the Windows\System32 directory.

Python

You need the RanorexCore.dll and RanorexPython.dll.
Copy the Binaries RanorexCore.dll and RanorexPython.dll in the DLLs directory of the Python installation (e.g. C:\Python24\DLLs).

.NET

You need the RanorexCore.dll and RanorexNet.dll.
Copy the RanorexCore.dll into the Windows\System32 directory.
We don't suggest to put the RanorexNet dll into the GAC (Global Assembly Cache), it'a better way to add to the References and deploy it together with the test dlls.

Jenö Herget
Ranorex Team

tkondal
Posts: 24
Joined: Fri Nov 03, 2006 5:50 pm

Post by tkondal » Wed Nov 29, 2006 2:50 pm

Actually, I have been using RanorexPython with custom paths.

Here are the steps in Python:
1. Create a .pth file in C:\Python24\Lib\site-packages
e.g. C:\Python24\Lib\site-packages\Ranorex.pth

2. Edit the file Ranorex.pth with a text editor and add the path to the folder containing the Ranorex DLLs.
e.g. D:\MyCustomPythonLibs\Ranorex\

3. Create an empty file called __init__.py in your DLL direcrory and it's parent.
e.g. D:\MyCustomPythonLibs\__init__.py
D:\MyCustomPythonLibs\Ranorex\__init__.py

4. You should be able to call import the module in your script as:

Code: Select all

import MyCustomPythonLibs.Ranorex.RanorexPython as Ranorex;

behdad
Posts: 16
Joined: Wed Nov 22, 2006 10:56 pm
Location: Australia

Post by behdad » Tue Dec 05, 2006 12:27 am

Thanks Jeno.

Also thanks tkondal. I will try to see if I can do the same in .Net.

Cheers,
Behdad.