Page 1 of 1

How to use PWDBLib.DLL with BASIC programs?

Posted: Mon Jun 11, 2007 12:37 am
by Plenz
I have PathAway 3 (without TTQV) and want to export my trackings. Since the PathAwayLog.txt has a limited size, I wrote a program which tries to find tracks in PathAwayDBV.cdb.

My program is not perfect (because I don't have any information about the structure of PathAwayDBV.cdb), but it works rather fine. It shows the tracks on the screen and is able to export them as an Excel file (time, degrees, and x/y/z coordinates), as an AutoCAD script for drawing a 3D line, as a KML file and as a BMP image.

Now I stumbled over PWDBLib.DLL and tried to include it into my program. It seems to work because the result is 0 when my PPC is plugged in, and -7 when it is disconnected. But all other results are also 0. I am trying PWDBCEGetInfo. Whatever I code: flags and pState are always 0, and the pData string is empty.

Are there any further informations how to use this DLL?

Or are there any informations about PathAwayDBV.cdb: how can I find out which track points belong to one track and which ones are actually deleted?

Any hint is appreciated.

Paul Lenz

Posted: Mon Jun 11, 2007 8:32 pm
by Scott
Some notes:
In PathAway 4, you can specify the size of your PathAwayLog.txt.
In PathAway 4 PRO, you can even specify the name of the tracklog and the sentences to record.

As for Basic, if someone can write a wrapper for PWDBLib.DLL to make PathAway work better with Basic, it would be appreciated. It is on our to-do list to address this issue soon.

Posted: Mon Jun 11, 2007 8:34 pm
by Scott
I do not recommend parsing PathAwayDBV.cdb. It is intended for internal use and may change at any time. The DLL is the better choice since it will always be compatible. Note, The PathAway Data Transfer Utility uses the PWDBLib.dll extensively.

Posted: Wed Jun 13, 2007 12:46 am
by Plenz
Why does PWDBLib.DLL need a wrapper? Is it not possible to use it in a BASIC program?

Surely I would prefer to use PWDBLib.DLL instead of parsing PathAwayDBV.cdb, but if it doesn't work, I have to other choice. And I am happy enough with PA3, so I have no reason to upgrade to a version which is not compatible with my program.

Paul Lenz

Posted: Wed Jun 13, 2007 1:29 am
by Scott
If you want to send me your program, I can do some debugging to determine why the data is not going through.

Posted: Wed Jun 13, 2007 8:31 am
by Plenz
Scott wrote:If you want to send me your program, I can do some debugging to determine why the data is not going through.

Thankyou very much for your offer. But the first problem is: when I receive no data, can I blame the DLL or did I write a wrong code? Because there seem to be several ways to call the DLL from a BASIC program.

Actually I write my program in Rapid-Q which is a very nice free kind of VB clone. I discussed my problem in a forum, there you can find several proposals: I would really like to send you my program (you mean as an compiled EXE file?), but I am not sure which of all these proposals I should compile for you.

Posted: Wed Jun 13, 2007 6:10 pm
by Scott
I would just need the compiled EXE file. I can then run a debugger on the PathAway DLL to see the data coming in.

Posted: Thu Jun 14, 2007 2:25 am
by Plenz
Thankyou very much. I tried to send you a file, but it exceeds the maximum upload size because it has about 314 kB (and can not be smaller). How can I send it to you?

Paul Lenz

Posted: Thu Jun 14, 2007 11:12 pm
by Plenz
I created a download page on my homepage where you can find my PA track reader and also four trials for the dll file. Please download at least one of the trials and let me know what your debugger reports.

Thanks, Paul

Posted: Wed Jun 20, 2007 9:00 pm
by Scott
Ok Paul,
We will give it a try.

Posted: Tue Jun 26, 2007 12:51 am
by Plenz
Scott wrote:We will give it a try.

Thankyou very much. Any results?

Posted: Wed Sep 05, 2007 10:18 pm
by Scott
I believe this issue is resolved right?

Posted: Fri Sep 07, 2007 12:59 am
by Guest
Scott wrote:I believe this issue is resolved right?

I am sorry to say: not at all. But I have no idea how to get any success, and I can not find out whether the problem is your DLL or my lack of knowledge or the programming langue/compiler which I am using. So I set my focus to other projects at present.

Thanks anyway, Paul

Posted: Wed Sep 12, 2007 11:35 pm
by Plenz
Well, I tried something else: I asked in the newsgroup how to call and use the DLL. The answers were disappointing:

Usally, C/C++ works with a convention named "cdecl", but BASIC can only work with a convention named "stdcall" (whatever this all means). First advise to me: I should write a "wrapper" DLL which can handle both conventions and works like a translator between your DLL and my BASIC program. The second advice: to use an error catcher which overrides errors, but in this case I would not be able to get the results of pPath.

I am sorry, but your DLL seems to to be compatible with BASIC programs.

I attach an Excel file which contains some VBA code to invoke your DLL. Maybe you like to try it out.