I want to prevent a user from being able to delete a database from the
device.  I have been trying to hide the database, with no luck.
DmSetDatabaseInfo does not raise an error, but the database still shows up
in the Launcher's list of items that can be deleted.  Any comments or
suggestions would be appreciated.

Thanks,
Kirk

code snippet from test program follows:

 Err      err = 0;
 UInt16      cardNo = 0;
 LocalID     DbID;
 UInt16      attributes;

  DbID = DmFindDatabase (cardNo, DBName);
  if (DbID == 0)


   ErrFatalDisplayIf(true, "unable to find db");
   return;
  }

  // mark the database as hidden to prevent the user from accidentally
removing it
  err = DmDatabaseInfo (cardNo, DbID, 0, &attributes, 0, 0, 0, 0, 0, 0, 0,
0, 0);
    if (err != 0)
  {
   ErrFatalDisplayIf(true, "unable to get database info");
   return;
  }

  attributes = attributes | dmHdrAttrHidden;

  err = DmSetDatabaseInfo (cardNo, DbID, 0, &attributes, 0, 0, 0, 0, 0, 0,
0, 0, 0);
  if (err != 0)
  {
   ErrFatalDisplayIf(true, "unable to set database info");
   return;
  }




-- 
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