Docs » Autodocs » nonvolatile.library » SetNVProtection
SetNVProtection -- set the protection flags. (V40)
success = SetNVProtection(appName, itemName, mask, killRequesters);
D0 A0 A1 D2 D1
BOOL SetNVProtection(STRPTR, STRPTR, LONG, BOOL);
Sets the protection attributes for an item currently in the
Although 'mask' is LONG only the delete bit, NVEF_DELETE/NVEB_DELETE,
may be set. If any other bits are set this function will return
The strings appName and itemName may not contain the '/' or ':'
characters. It is recommended that these characters be blocked
from user input when requesting AppName and ItemName strings.
appName - NULL terminated string indicating the application name
to be matched. Maximum length is 31.
itemName - NULL terminated string indicated the item within the
application to be found. Maximum length is 31.
mask - the new protection mask. Only set the delete bit otherwise
this function WILL CRASH.
killRequesters - suppress system requesters flag. TRUE if all system
requesters are to be suppressed during this function.
FALSE if system requesters are allowed.
success - FALSE if the protection could not be change (ie the dataGetNVList(), <libraries/nonvolatile.h>
does not exist).