> dbErr = DmGetNextDatabaseByTypeCreator(true, &dbPt, 0, 0, false, &cardNoP,
> &dbID);
> //while: there are more dbs
> while(!dbErr)
> {
> //read database, and test if its clean
> //incomplete
> //get next db
> dbErr = DmGetNextDatabaseByTypeCreator(false, &dbPt, 0, 0, false, &cardNoP,
> &dbID);
> }
Scott, while that would work, you're thinking Windows-style here. There might
be thousands of databases, and your scanning could be quite slow. Your code
shouldn't usurp the device for such a long time.
Instead, I suggest that on the form that does the scanning, you listen to the
nilEvent and scan only a single database when this event occurs. This way
you'll give up time to the OS do to other things as well (e.g., alarms to
trigger, clocks to be updated, etc.). Remember, PalmOS is a single-tasking OS
and expects the applications running on it to be cooperative.
If you don't realize how to implement what I described above, ask me by private
e-mail; it's easy but a bit long to type here. (I'm using a rather awkward Web
interface to access this forum.)
Regards,
Vesselin
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/