CFPreferencesSetAppValue

Header: CFPreferences.h Carbon status: Supported

Adds, modifies, or removes a preference.

void CFPreferencesSetAppValue (
    CFStringRef key, 
    CFPropertyListRef value, 
    CFStringRef appName
);
Parameter descriptions
key

The preference key whose value you wish to set.

value

The value you wish to set for the specified key and application. Pass NULL to remove the specified key from the application’s preferences.

appName

The ID of the application whose preferences you wish to create or modify, typically kCFPreferencesCurrentApplication. Do not pass NULL or kCFPreferencesAnyApplication.

DISCUSSION

New preference values are stored in the standard application preference location, ~/Library/Preferences/. When called with kCFPreferencesCurrentApplication, modifications are performed in the preference domain “Current User, Current Application, Any Host”. If you need to create preferences in some other domain, use the low-level function CFPreferencesSetValue. Note that you must call CFPreferencesAppSynchronize in order for your changes to be saved to permanent storage.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)