PathEngine home previous: Project setupnext: Loading a mesh
Contents, Programmers Guide, Example Projects, Tutorials, A basic application, Defining an entry point

Defining an entry point

The dll entry point is defined as follows:

extern "C"
{
	__declspec(dllexport) void __stdcall TestApplicationEntryPoint(iPathEngine* pathengine, iTestBed* testbed)
	{	 		
		//...
	}
}

This entrypoint will be called by the testbed.
The test application will update the testbed from within this entry point.
When the test application is complete it will return from this entry point, and the testbed will close down.

See Linking with the TestBed for further details about linkage between test applications and the testbed.

Version checking

Every testbed application should start by checking that the version of the testbed used is compatible with the headers compiled against.

This is done by adding the following code to the entry point:

// 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.");
	    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.");
	    return;
    }

See Interface Version Numbers for further details about the PathEngine versioning system.


Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: Loading a mesh