Function

CFPreferencesGetAppIntegerValue

Convenience function that directly obtains an integer preference value for the specified key.

Declaration

CFIndex CFPreferencesGetAppIntegerValue(CFStringRef key, CFStringRef applicationID, Boolean *keyExistsAndHasValidFormat);

Parameters

key

The preference key whose value you wish to obtain. The key must specify a preference whose value is of type int.

applicationID

The identifier of the application whose preferences you wish to search, typically kCFPreferencesCurrentApplication. Do not pass NULL or kCFPreferencesAnyApplication. Takes the form of a Java package name, com.foosoft.

keyExistsAndHasValidFormat

On return, indicates whether the preference value for the specified key was located and found to be of type int.

Return Value

The preference data for the specified key and application. If no value was located, 0 is returned.

See Also

Getting Preference Values

CFPreferencesCopyAppValue

Obtains a preference value for the specified key and application.

CFPreferencesCopyKeyList

Constructs and returns the list of all keys set in the specified domain.

CFPreferencesCopyMultiple

Returns a dictionary containing preference values for multiple keys.

CFPreferencesCopyValue

Returns a preference value for a given domain.

CFPreferencesGetAppBooleanValue

Convenience function that directly obtains a Boolean preference value for the specified key.