pub unsafe extern "C-unwind" fn CFErrorCreateWithUserInfoKeysAndValues(
allocator: Option<&CFAllocator>,
domain: Option<&CFErrorDomain>,
code: CFIndex,
user_info_keys: *const *const c_void,
user_info_values: *const *const c_void,
num_user_info_values: CFIndex,
) -> Option<CFRetained<CFError>>
CFBase
and CFError
only.Expand description
Creates a new CFError without having to create an intermediate userInfo dictionary.
Parameter allocator
: The CFAllocator which should be used to allocate memory for the error. This parameter may be NULL in which case the
current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
Parameter domain
: A CFString identifying the error domain. If this reference is NULL or is otherwise not a valid CFString, the behavior is undefined.
Parameter code
: A CFIndex identifying the error code. The code is interpreted within the context of the error domain.
Parameter userInfoKeys
: An array of numUserInfoValues CFStrings used as keys in creating the userInfo dictionary. NULL is valid only if numUserInfoValues is 0.
Parameter userInfoValues
: An array of numUserInfoValues CF types used as values in creating the userInfo dictionary. NULL is valid only if numUserInfoValues is 0.
Parameter numUserInfoValues
: CFIndex representing the number of keys and values in the userInfoKeys and userInfoValues arrays.
Returns: A reference to the new CFError. numUserInfoValues CF types are gathered from each of userInfoKeys and userInfoValues to create the userInfo dictionary.