Page 1 of 1

PostPosted: Wed Nov 29, 2006 3:19 pm
by xaviersmork
Is there a way to determine the version of an application using PocketC?

PostPosted: Thu Nov 30, 2006 7:09 pm
by dewey
Can you be more specific?

PostPosted: Thu Nov 30, 2006 7:24 pm
by xaviersmork
Find the tver value of an application file. I want my program to be able to know tver of installed files.

PostPosted: Thu Nov 30, 2006 7:43 pm
by xaviersmork
Can I do it if I where to buy Architect? Is there any information about doing this?

PostPosted: Thu Nov 30, 2006 8:30 pm
by dewey
You can get an application's version by opening the application and reading resource type "tver" id "1000" as a string. PocketC doesn't allow access to resource databases, so you would need Architect or OrbForms to do this. The following code will do this:

Code: Select all
Database db;
DBRecord rec;
DBRecordStream stream;
string version;

if ("App", true)) {
  if (db.getres("tver", 1000, rec)) {
    stream.rec = rec;

PostPosted: Thu Nov 30, 2006 9:39 pm
by xaviersmork
Great, now can I take my pocketc desktop edition code and use it in architect and use the code you provided without having to rewrite everything?

PostPosted: Thu Nov 30, 2006 10:16 pm
by xaviersmork
OK I think I figured it out, at least there where no errors in my compile! Now I just need to get the full version tomorrow when I get paid so I can test it out on my PDA. Thanks.