Function

CFPropertyListCreateData

Returns a CFData object containing a serialized representation of a given property list in a specified format.

Declaration

CFDataRef CFPropertyListCreateData(CFAllocatorRef allocator, CFPropertyListRef propertyList, CFPropertyListFormat format, CFOptionFlags options, CFErrorRef *error);

Parameters

allocator

The allocator to use to allocate memory for the new data object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

propertyList

The property list to write out.

format

A CFPropertyListFormat constant to specify the data format. See CFPropertyListFormat for possible values.

options

This parameter is currently unused and should be set to 0.

error

If this parameter is non-NULL, if an error occurs, on return this will contain a CFError error describing the problem. Ownership follows the The Create Rule.

Return Value

A CFData object containing a serialized representation of propertyList in a the format specified by format. Ownership follows the The Create Rule.

Discussion

See Also

Exporting a Property List

CFPropertyListWrite

Write the bytes of a serialized property list out to a stream.

CFPropertyListCreateXMLData

Creates an XML representation of the specified property list.

Deprecated
CFPropertyListWriteToStream

Writes the bytes of a property list serialization out to a stream.

Deprecated