Hi Morten!
I think we have a lot of experience with this.
We got it by building TTNCF (
http://tttncf.pp-p.com)
)
The bigest problem for you is name decoration!!!
So since the real definition is
static int GetNavigatorVersionInfoV01(TNavVersionInfoV01& aVersionInfo);
And this is a static member function of the class CTomTomNavigatorCom.
So have a look at the lib (or the dll - the lib is better to read) and find
out:
GetSdkVersionInfoV01@CTomTomNavigatorCom@@SAHAAUTNavVersionInfoV01@1@@Z
That is the signature of the function.
If you are not familiar with C++ Name decoration.....
The exported function name builds from
A.) the function name
B.) the class
C.) the parameters
D.) the returntype
Lets take a short look at
BringNavigatorToForeground@CTomTomNavigatorCom@@SAHXZ
or
SwitchToNavigatorView@CTomTomNavigatorCom@@SAHXZ
Both off them take no parameter - and return an int!
static INT AddPoi( LPCTSTR aFilename, long aLongitude, long aLatitude,
LPCTSTR aName, LPCTSTR anId );
looks like:
AddPoi@CTomTomNavigatorCom@@SAHPBGJJ00@Z
and
static INT DeleteClosestPoi( LPCTSTR aFilename, long aLongitude, long
aLatitude );
DeleteClosestPoi@CTomTomNavigatorCom@@SAHPBGJJ@Z
So from this simple examples you can see that JJ stands for the two longs in
the functions.
static INT MoveClosestPoi( LPCTSTR aFilename, long aLongitude, long
aLatitude, long aNewLongitude, long aNewLatitude );
looks like
MoveClosestPoi@CTomTomNavigatorCom@@SAHPBGJJJJ@Z
You see - four time J - there are 4 longs!!!!
So what you will have to do - use the decorated names in your PInvokes.
And alias them to get a "useable" name for the code!
Other problems are the things around GFFile (Registred window messages and
so on).
What we also found tricky is the GPSDriver support in the SDK!
This is documented in the full SDK (not in the downloadable documentation).
There are "LoadLibrary" "GetProcAdress" and other funny things to do!
In our TTNCF version 1.0 we do not support it, but we have a version 1.1
where we do.
A last tip: you can open the TTNCom.lib direct in VS (as a binary - hex
view); there you will find
the decorated names.
HTH
Manfred