PathEngine home | previous: | next: |
Applications running against the PathEngine testbed are built as dlls which are loaded and executed by the testbed executable.
By default the testbed looks for an application named "TestApplication".
You can tell the testbed to load a different application by passing a command line parameter
'app=dllname' (where dllname indicates the name of the dll to load).
You can also specify relative or absolute paths with this parameter.
On Windows, LoadLibrary() will add a '.dll' extension, if not already present, and will search the current directory, windows system directories and pathed directories for a dll with the specified name.
(See the MSDN documentation for LoadLibrary() for more details.)
The testbed looks for the following entrypoint within this dll:
extern "C" { __declspec(dllexport) void __stdcall TestApplicationEntryPoint(iPathEngine* pathengine, iTestBed* testbed); } |
The test application must use the interface to PathEngine passed in to this entry point as opposed to
loading the PathEngine dll explicitly.
It is important to check the interface version numbers for the interfaces passed in to the entrypoint.
This ensures that the interfaces provided by the testbed are binary compatible with the headers used to compile the test application.
(See
The resulting code at the entrypoint should look something like this:
extern "C" { __declspec(dllexport) void __stdcall TestApplicationEntryPoint(iPathEngine *pathengine, iTestBed *testbed) { // check if interfaces are compatible with the headers used for compilation if(testbed->getInterfaceMajorVersion()!=TESTBED_INTERFACE_MAJOR_VERSION || testbed->getInterfaceMinorVersion()<TESTBED_INTERFACE_MINOR_VERSION) { testbed->reportError("Fatal","TestApplication: testbed version is incompatible with headers used for compilation.",0); return; } if(pathengine->getInterfaceMajorVersion()!=PATHENGINE_INTERFACE_MAJOR_VERSION || pathengine->getInterfaceMinorVersion()<PATHENGINE_INTERFACE_MINOR_VERSION) { testbed->reportError("Fatal","TestApplication: pathengine version is incompatible with headers used for compilation.",0); return; } // use the interfaces.. } } |
TESTBED_INTERFACE_MAJOR_VERSION and TESTBED_INTERFACE_MINOR_VERSION are defined in i_testbed.h.
The testbed is supplied as 32 bit and 64 bit Windows binaries, but can also be built from source for use on other platforms.
(See
Testbed command line arguments can be accessed by the client dll with
For requirements, and other information about working with the Testbed, see
Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEngine | next: |