---
title: CMProfileIterateProcPtr
framework: Application Services
role: symbol
role_heading: Type Alias
platforms: [macOS 10.0+]
path: applicationservices/cmprofileiterateprocptr
---

# CMProfileIterateProcPtr

Defines a pointer to a profile iteration callback function that the ColorSync Manager calls for each found profile file as it iterates over the available profiles.

## Declaration

```occ
typedef OSErr (*CMProfileIterateProcPtr)(CMProfileIterateData *iterateData, void *refCon);
```

## Parameters

- `iterateData`: A pointer to a structure of type [doc://com.apple.documentation/documentation/applicationservices/cmprofileiteratedata](applicationservices/cmprofileiteratedata.md). When the function [doc://com.apple.documentation/documentation/applicationservices/colorsync_manager/1804904-cmiteratecolorsyncfolder](applicationservices/colorsync_manager/1804904-cmiteratecolorsyncfolder.md) calls `MyProfileIterateCallback`, as it does once for each found profile, the structure contains key information about the profile.
- `refCon`: An untyped pointer to arbitrary data your application previously passed to the function [doc://com.apple.documentation/documentation/applicationservices/colorsync_manager/1804904-cmiteratecolorsyncfolder](applicationservices/colorsync_manager/1804904-cmiteratecolorsyncfolder.md).

## Return Value

An `OSErr` value. If `MyCMProfileIterateCallback` returns an error, `CMIterateColorSyncFolder` stops iterating and returns the error value to its caller (presumably your code).

## Discussion

When your application needs information about the profiles currently available in the profiles folder, it calls the function  , which, depending on certain conditions, calls your callback routine once for each profile. See the description of `CMIterateColorSyncFolder` for information on when it calls the `MyCMProfileIterateCallback` function.

Your `MyCMProfileIterateCallback` function examines the structure pointed to by the `iterateData` parameter to obtain information about the profile it describes. The function determines whether to do anything with that profile, such as list its name in a pop-up menu of available profiles. 

## See Also

### Callbacks

- [CMBitmapCallBackProcPtr](cmbitmapcallbackprocptr.md)
- [CMConcatCallBackProcPtr](cmconcatcallbackprocptr.md)
- [CMCountImageProfilesProcPtr](colorsync_manager/cmcountimageprofilesprocptr.md)
- [CMEmbedImageProcPtr](colorsync_manager/cmembedimageprocptr.md)
- [CMFlattenProcPtr](cmflattenprocptr.md)
- [CMGetImageSpaceProcPtr](colorsync_manager/cmgetimagespaceprocptr.md)
- [CMGetIndImageProfileProcPtr](colorsync_manager/cmgetindimageprofileprocptr.md)
- [CMIterateDeviceInfoProcPtr](cmiteratedeviceinfoprocptr.md)
- [CMIterateDeviceProfileProcPtr](cmiteratedeviceprofileprocptr.md)
- [CMLinkImageProcPtr](colorsync_manager/cmlinkimageprocptr.md)
- [CMMatchImageProcPtr](colorsync_manager/cmmatchimageprocptr.md)
- [CMMIterateProcPtr](cmmiterateprocptr.md)
- [CMProofImageProcPtr](colorsync_manager/cmproofimageprocptr.md)
- [CMSetIndImageProfileProcPtr](colorsync_manager/cmsetindimageprofileprocptr.md)
- [CMUnembedImageProcPtr](colorsync_manager/cmunembedimageprocptr.md)
- [CMValidImageProcPtr](colorsync_manager/cmvalidimageprocptr.md)
- [CountImageProfilesProcPtr](colorsync_manager/countimageprofilesprocptr.md)
- [EmbedImageProcPtr](colorsync_manager/embedimageprocptr.md)
- [GetImageSpaceProcPtr](colorsync_manager/getimagespaceprocptr.md)
- [GetIndImageProfileProcPtr](colorsync_manager/getindimageprofileprocptr.md)
- [MatchImageProcPtr](colorsync_manager/matchimageprocptr.md)
- [SetIndImageProfileProcPtr](colorsync_manager/setindimageprofileprocptr.md)
- [UnembedImageProcPtr](colorsync_manager/unembedimageprocptr.md)
- [ValidateImageProcPtr](colorsync_manager/validateimageprocptr.md)
- [ValidateSpaceProcPtr](colorsync_manager/validatespaceprocptr.md)
