Settings ProjectDLLPathSettings/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „== DLL action Blocks and DLLs == The DLL-call elementary blocks are used to call functions of a DLL ("''Dynamic Link Library''"), also called "Shared Library"…“)
 
Zeile 1: Zeile 1:
== DLL action Blocks and DLLs ==
== DLL action Blocks and DLLs ==


The DLL-call elementary blocks are used to call functions of a DLL ("''Dynamic Link Library''"), also called "Shared Library" or "Shared Object" in the Unix world.
The DLL-call elementary blocks are used to call functions of a DLL ("''Dynamic Link Library''"), also called "''Shared Library''" or "''Shared Object''" in the Unix world.


These are files which contain compiled code, typically written in languages like C or C++. To call a function from a DLL, you do not need to know, in which language a DLL's functions were originally written. However, you need to know the name of the function, the number and types of arguments and the return type.
These are files which contain compiled code, typically written in languages like C or C++. To call a function from a DLL, you do not need to know, in which language a DLL's functions were originally written. However, you need to know the name of the function, the number and types of arguments and the return type.
Zeile 7: Zeile 7:


This last item can become a problem, because both the suffixes and the basename of DLL's might be different between operating systems.
This last item can become a problem, because both the suffixes and the basename of DLL's might be different between operating systems.
For example, the Unix convention is to name them "XXX.so", whereas under Windows, they are named "XXX.dll".
For example, the Unix convention is to name them "<code>XXX.so</code>", whereas under Windows, they are named "<code>XXX.dll</code>".


== Default Suffixes ==
== Default Suffixes ==

Version vom 6. Dezember 2016, 19:35 Uhr

DLL action Blocks and DLLs[Bearbeiten]

The DLL-call elementary blocks are used to call functions of a DLL ("Dynamic Link Library"), also called "Shared Library" or "Shared Object" in the Unix world.

These are files which contain compiled code, typically written in languages like C or C++. To call a function from a DLL, you do not need to know, in which language a DLL's functions were originally written. However, you need to know the name of the function, the number and types of arguments and the return type. And of course, the location and name of the DLL, in which the desired function is located.

This last item can become a problem, because both the suffixes and the basename of DLL's might be different between operating systems. For example, the Unix convention is to name them "XXX.so", whereas under Windows, they are named "XXX.dll".

Default Suffixes[Bearbeiten]

Expecco will itself add the appropriate suffix, if the name in the DLL-action definition has none. Therefore, for portability of your test suites between Windows and Linux (if ever desired), it is highly recommended to only specify the basename of the DLL in the action block.

DLL Basename Mapping[Bearbeiten]

If the basename of the Unix DLL is the same as the basename of the Windows DLL, your test suite using DLL action blocks should run unchanged on both systems.

However, if they are different, you need a mapping mechanism, which dynamically specifies a replacement name for a given DLL, and this replacement depends on the machine on which you are executing expecco (i.e. Linux vs. Windows32 vs. Windows64). Therefore, this mapping is kept in your personal preferences, not in the test suite.

The replacement given in the DLL name mapping can be either another basename, a basename-plus-suffix or a complete relative or absolute path to the target DLL.

A concrete example for this is the autoitV3 DLL, which is named "autoItV3.dll" under win32, but "autoItV3_64.dll" under win64. Here, you would specify "autoItV3" in the DLL action block, and only provide the mapping "autoItV3" -> "autoItV3_64" if running on a win64 system.

Other Uses[Bearbeiten]

Another use of the DLL name mapping scheme is to run test suites with different versions (stable, developer, debug vs. production etc.) of a DLL. Assuming your DLL is named "myFuncs.dll", and two versions of it are present in two different folders named "c:\...\folder_v1\myFuncs.dll" and "c:\...\folder_v\myFuncs.dll", then you should specify "myFuncs" in the DLL action step, and provide mappings to either directory, dependig on which version you want to use.



Copyright © 2014-2024 eXept Software AG