So it is the system prefs (as presented in the "Prefs" application) that you want to lock, not the preferences of your own application?
Setting a system database like "Saved Preferences" or "Unsaved Preferences" to read-only is a dangerous thing to do -it would probably cause the system to crash. Even if you were successful in doing this, it would prevent every application on the device from changing its own prefs. I can think of only one way programmatically to prevent changes to system prefs while still allowing users to use "Prefs" to see the prefs settings: use SysGetTrapAddress/SysSetTrapAddress (pre-OS 5 only) to patch PrefSetPreference (and others, depending on what OS versions you need to support) so you can detect an attempt to change a system pref and do something else instead. Use the beefed-up notification manager for this on OS 5. This assumes that the prefs app uses this API call rather than a lower-level call. Mark Peters "apple k" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > yes, u r right. The saved/unsaved preference DBstore > in RAM and initially we wish to set the DB as > read-only as attempting to write to DB can be done. > However, it's fail to do so as i mentioned. By the > way, how to disable the control on the prefs form? You > mean we can change the prc to replace every palm's > prefs form? There is prefs form's code available for > us to do the modication? pls advise. Thank you very > much! > > > > --- "Mark A. Peters" <[EMAIL PROTECTED]> wrote: > > Are you sure you want to prevent a user from > > changing the prefs of every > > application rather just your application? If it is > > just yours, then once > > your app decides it is time to prevent further > > changes to its own prefs, why > > not just disable the controls on your prefs form (or > > something similar)? I > > can imagine this sort of thing being done if the > > handheld is being managed > > by a central admin server, but it seems odd if it > > isn't. > > > > Also, the prefs databases ("Saved Preferences" and > > "Unsaved Preferences") > > are not in ROM, they are in normal storage memory. > > > > Mark Peters > > > > "apple k" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > > > > Hi, > > > > > > Is there any way to lock the preference database > > > programmatically? i know we can set the preference > > > through a program but we would not like to change > > the > > > preference setting anymore via individual palm? I > > have > > > tried to use the DmSetDatabaseInfo to set a > > readyOnly > > > attribute of the preference database. However, > > it's > > > fail to do so. As i understand that the preference > > > database resides in ROM and DmSetDatabaseInfo used > > to > > > set info of DB in RAM. I was wondering we have any > > > ways to do it? Pls advise. > > > > > > __________________________________________________ > > > Do you Yahoo!? > > > Yahoo! Platinum - Watch CBS' NCAA March Madness, > > live on your desktop! > > > http://platinum.yahoo.com > > > > > > > > > > > > > > -- > > For information on using the Palm Developer Forums, > > or to unsubscribe, please see > http://www.palmos.com/dev/support/forums/ > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! > http://platinum.yahoo.com > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
