How to use PWDBLib.DLL with BASIC programs?

Discussion regarding the PathAway Data Transfer Utility for Windows.
Plenz
Posts: 13
Joined: Sun Jun 10, 2007 10:36 pm

How to use PWDBLib.DLL with BASIC programs?

Postby Plenz » Mon Jun 11, 2007 12:37 am

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

User avatar
Scott
Site Admin
Posts: 1033
Joined: Mon Apr 18, 2005 8:49 pm
Location: Ontario, Canada
Contact:

Postby Scott » Mon Jun 11, 2007 8:32 pm

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.

User avatar
Scott
Site Admin
Posts: 1033
Joined: Mon Apr 18, 2005 8:49 pm
Location: Ontario, Canada
Contact:

Postby Scott » Mon Jun 11, 2007 8:34 pm

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.

Plenz
Posts: 13
Joined: Sun Jun 10, 2007 10:36 pm

Postby Plenz » Wed Jun 13, 2007 12:46 am

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

User avatar
Scott
Site Admin
Posts: 1033
Joined: Mon Apr 18, 2005 8:49 pm
Location: Ontario, Canada
Contact:

Postby Scott » Wed Jun 13, 2007 1:29 am

If you want to send me your program, I can do some debugging to determine why the data is not going through.

Plenz
Posts: 13
Joined: Sun Jun 10, 2007 10:36 pm

Postby Plenz » Wed Jun 13, 2007 8:31 am

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: http://tech.groups.yahoo.com/group/rapidq/message/31567. 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.

User avatar
Scott
Site Admin
Posts: 1033
Joined: Mon Apr 18, 2005 8:49 pm
Location: Ontario, Canada
Contact:

Postby Scott » Wed Jun 13, 2007 6:10 pm

I would just need the compiled EXE file. I can then run a debugger on the PathAway DLL to see the data coming in.

Plenz
Posts: 13
Joined: Sun Jun 10, 2007 10:36 pm

Postby Plenz » Thu Jun 14, 2007 2:25 am

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

Plenz
Posts: 13
Joined: Sun Jun 10, 2007 10:36 pm

Postby Plenz » Thu Jun 14, 2007 11:12 pm

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

User avatar
Scott
Site Admin
Posts: 1033
Joined: Mon Apr 18, 2005 8:49 pm
Location: Ontario, Canada
Contact:

Postby Scott » Wed Jun 20, 2007 9:00 pm

Ok Paul,
We will give it a try.

Plenz
Posts: 13
Joined: Sun Jun 10, 2007 10:36 pm

Postby Plenz » Tue Jun 26, 2007 12:51 am

Scott wrote:We will give it a try.

Thankyou very much. Any results?

User avatar
Scott
Site Admin
Posts: 1033
Joined: Mon Apr 18, 2005 8:49 pm
Location: Ontario, Canada
Contact:

Postby Scott » Wed Sep 05, 2007 10:18 pm

I believe this issue is resolved right?

Guest

Postby Guest » Fri Sep 07, 2007 12:59 am

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

Plenz
Posts: 13
Joined: Sun Jun 10, 2007 10:36 pm

Postby Plenz » Wed Sep 12, 2007 11:35 pm

Well, I tried something else: I asked in the newsgroup microsoft.public.de.vb 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.

Paul
Attachments
PATest1.xls
(22.5 KiB) Downloaded 128 times


Return to “PathAway Data Transfer Utility”

Who is online

Users browsing this forum: No registered users and 1 guest