CFDictionaryGetValueIfPresent |
||||
Header: | CFDictionary.h | Carbon status: | Supported | |
Retrieves the value associated with the given key.
Boolean CFDictionaryGetValueIfPresent ( CFDictionaryRef dict, const void *key, void **value );
The dictionary to be queried. If this parameter is not a valid CFDictionary, the behavior is undefined.
The key for which to find a match in the dictionary. The hash() and equal() key callbacks provided when the dictionary was created are used to compare. If the hash() key callback was NULL, the key is treated as a pointer and converted to an integer. If the equal() key callback was NULL, pointer equality (in C, ==) is used. If key, or any of the keys in the dictionary, are not understood by the equal() callback, the behavior is undefined.
A pointer to memory which should be filled with the pointer-sized value if a matching key is found. If no key match is found, the contents of the storage pointed to by this parameter are undefined. This parameter may be NULL, in which case the value from the dictionary is not returned (but the return value of this function still indicates whether or not the key-value pair was present).
TRUE, if a matching key was found, FALSE otherwise.
Supported in Carbon. Available in Carbon 1.0.2 and later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)