CFDataCreate

Header: CFData.h Carbon status: Supported

Creates an immutable CFData object from a program-supplied byte buffer.

CFDataRef CFDataCreate (
    CFAllocatorRef allocator, 
    const UInt8 *bytes, 
    CFIndex length
);
Parameter descriptions
allocator

Pass a reference to an allocator object or pass NULL to request the current default allocator.

bytes

Pass a pointer to a byte buffer that contains the raw data to be copied into the CFData object.

length

Pass an integer specifying the number of bytes in the buffer.

function result

A reference to an immutable CFData object or NULL if there was a problem creating the object.

DISCUSSION

The CFDataCreate function creates an immutable CFData object from a client-supplied byte buffer. You must supply a count of the bytes in the buffer. This function always copies the bytes in the provided buffer into internal storage.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)