I'm using the ProtectOurDatabase() function ripped out
of the DrMcCoy example app to prevent my apps from being
deleted or beamed.  Works great, except on the 3.5 devices.

Both POSE (release rom) and a real IIIxe lose the application
category, so it ends up in 'Unfiled' every time the app is run.
This doesn't happen on a III device, or POSE running OS 3.1

The copy prevention or read-only bits do get set properly 
on OS 3.5, it's just the category bit that's driving me nuts!

I've single stepped through the code, nothing is failing,
and the variables all kinda make sense.  I've narrowed it 
down to the set database info call.

I've pasted in the function that I'm using, called
from my app's StartApplication() function.  Notice that
I'm not actually manipulating any of the attribute bits,
just reading and writing them back.


any ideas?

newell



void category_test()
{
   UInt16 cardNo;
   LocalID dbID;
   UInt16 attributes;
   Err e;

   if (e=SysCurAppDatabase(&cardNo, &dbID))
      alert_info(SysErrString(e, error_buffer, 200));
   else if (dbID)
   {
      if (e=DmDatabaseInfo(cardNo, dbID, 0, &attributes, 0,0,0,0,0,0,0,0,0))
         alert_info(SysErrString(e, error_buffer, 200));

      if (e=DmSetDatabaseInfo(cardNo, dbID, 0, &attributes, ,0,0,0,0,0,0,0,0))
         alert_info(SysErrString(e, error_buffer, 200));
   }
}


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to