> I'm currently testing a UInt32 against a
> '0' to see if it is a valid UniqueID or not. EX:  if (uniqueID). What I
need
> to know is if I am in the wrong in doing this. Will '0' ever be a valid
> UniqueID under PalmOS?

First of all, unique IDs are 24 bit values, so if the top 8 bits aren't
zero, it's invalid. If you pass such an ID to DmFindRecordByID, it'll put up
a fatal alert.

Leonardo is correct. The Data Manager will never assign an ID of zero. But
if you pass zero to DmFindRecordByID, it won't complain that it's invalid,
it just won't find any records with this ID.

> Will the ID # ever loop around the end of the UInt32's
> boundries and start at '0' again?

When the seed in the database header wraps around from 0x00FFFFFF to zero,
it skips past the zero ID, as well as a bunch more, landing at 0x00002000.
The IDs from 1 through 0x00001FFFF are reserved for default data.
--
Danny @ Palm

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to