At 12:00am -0700 00-08-30, Palm Developer Forum digest wrote:
>Subject: appVersionID / appVersionAlternateID
>From: "Chris Percival" <[EMAIL PROTECTED]>
>Date: Tue, 29 Aug 2000 14:15:48 +0100
>X-Message-Number: 16
>
>Sorry to bring this subject up again, but is this code expected to return
>the application version number as set with constructor?
>On OS 3.2 it works but on OS 3.5 it returns what looks like the OS version
>(3.5.2).
>
> h = DmGetResource(verRsc, appVersionID);
> if (!h) h = DmGetResource(verRsc, appVersionAlternateID);
> ErrFatalDisplayIf(!h, "Unable to find version string");
> p = MemHandleLock(h);
> SetFieldText(AboutDlgVersionField, p);
> MemPtrUnlock(p);
This code should work - I'd have to say that you've got some other
problem in your app that's causing odd results. My guess is still
that you don't really have any tver resources in your app, and thus
the call to DmGetResource is "finding" the resource in the system's
PRC. See what happens when you use DmGet1Resource.
>Ken Krugler: I am unsure how to use the db ref result from
>DmSearchResource to determine which resource file
>it came from, as suggested by you in a previous post.
Compare this with the result returned by DmNextOpenResDatabase(NULL),
which will be the top-most resource database (should be your app's
PRC).
>Do people use this application version resource or do you just hardcode a
>string somewhere?
Mostly it's a matter of the Launcher (and other apps/tools) using the
tver resource as the standard method for determining the app's
version. So if you hard-code it (where?), then it won't be publicly
available.
-- Ken
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/