![]() |
CMGetIndProfileElement |
||||
Header: | CMApplication.h | Carbon status: | Supported | |
Obtains the element data corresponding to a particular index from the specified profile.
CMError CMGetIndProfileElement ( CMProfileRef prof, UInt32 index, UInt32 *elementSize, void *elementData );
A profile reference of type CMProfileRef to the profile containing the element.
The index of the element whose data you want to obtain. This is a one-based element index within the range returned as the elementCount parameter of the CMCountProfileElements function.
A pointer to an element data size. On input, specify the size of the element data to copy (except when elementData is set to NULL). Specify NULL to copy the entire element data. To obtain a portion of the element data, specify the number of bytes to be copy.
On return, the size of the element data actually copied.
A pointer to memory for element data. On input, you allocate memory. On return, this buffer holds the element data.
To obtain the element size in the elementSize parameter without copying the element data to this buffer, specify NULL for this parameter.
Before you call the CMGetIndProfileElement function to obtain the element data for an element at a specific index, you first determine the size in bytes of the element data. To determine the data size, you can
Once you have determined the size of the element data, you allocate a buffer to hold as much of the data as you need. If you want all of the element data, you specify NULL in the elementSize parameter. If you want only a portion of the element data, you specify the number of bytes you want in the elementSize parameter. You supply a pointer to the data buffer in the elementData parameter. After calling CMGetIndProfileElement, the elementSize parameter contains the size in bytes of the element data actually copied.
Before calling this function, you should call the function CMCountProfileElements. It returns the profiles total element count in the elementCount parameter.
Supported in Carbon. Available in Carbon 1.0.2 and later when ColorSync 2.0 or later is present.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)