Thanks for the reply. That preference _could_ be zero, but since the
uniqueID variable isn't what's passed into DmFindRecordByID (the function
that crashes), it shouldn't be an issue. The only purpose of that decrement
is to guarantee that the code will think that the record index is no good,
and thus force the DmFindRecordByID call to happen with the original value
of gAppPrefs.currentRecordID, which is supposed to be okay.
To prevent the blowup, I decided to check gAppPrefs.currentRecordID to see
if it's bigger than 0xffffff (its type is ULong, four bytes). If it is,
then it's useless as a unique ID anyway, so I just set it to a value of one.
This will prevent the blowup, even though theoretically it could lead to the
wrong record being identified as the current record. Until I figure out why
the unique ID is getting corrupted, I figure this is a decent work around.
Mark Peters
> From: "Danny Epstein" <[EMAIL PROTECTED]>
> Organization: Palm
> Newsgroups: palm-dev-forum
> Date: Wed, 19 Apr 2000 10:17:39 -0700
> To: palm-dev-forum
> Subject: Re: "invalid uniqueID passed" error?
>
>
> "Mark A. Peters" <[EMAIL PROTECTED]> wrote in message
> news:8800@palm-dev-forum...
>> uniqueID = gAppPrefs.currentRecordID - 1; // force not equal
>
> Are you sure this isn't wrapping around? In other words, could
> gAppPrefs.currentRecordID be zero? You could use ^1 instead of -1...
>
> Unique IDs are only 24 bits; the remaining 8 bits are used for the
> attributes (category, private flag, etc).
> --
> Danny Epstein
> OS Engineer, Palm Inc.
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html