---
title: CMSetProfileHeader
framework: Application Services
role: pseudoSymbol
platforms: []
path: applicationservices/colorsync_manager/1804882-cmsetprofileheader
---

# CMSetProfileHeader

Sets the header for the specified profile. 

## Declaration

```occ
CMError CMSetProfileHeader (
   CMProfileRef prof,
   const CMAppleProfileHeader *header
);
```

## Parameters

- `prof`: A profile reference of type [doc://com.apple.documentation/documentation/applicationservices/cmprofileref](applicationservices/cmprofileref.md) to the profile whose header is set.
- `header`: A pointer to the new header to set for the profile.

## Return Value

A `CMError` value. See [Result Codes](../colorsync_manager.md).

## Overview

You can use the `CMSetProfileHeader` function to set a header for a version 1.0 or a version 2.x profile. Before you call this function, you must set the values for the header, depending on the version of the profile. For a version 2.x profile, you use a data structure of type [CM2Header](../cm2header.md). For a version 1.0 profile, you use a data structure of type `CMHeader`. You pass the header you supply in the `CMAppleProfileHeader` union, described in [CMAppleProfileHeader](../1560290-cmappleprofileheader.md). 

## See Also

### Accessing Profiles

- [CMOpenProfile](1804853-cmopenprofile.md)
- [CMValidateProfile](1804856-cmvalidateprofile.md)
- [CMCloseProfile](1804861-cmcloseprofile.md)
- [CMUpdateProfile](1804864-cmupdateprofile.md)
- [CMCopyProfile](1804870-cmcopyprofile.md)
- [CMProfileModified](1804872-cmprofilemodified.md)
- [CMGetProfileMD5](1804876-cmgetprofilemd5.md)
- [CMGetProfileHeader](1804879-cmgetprofileheader.md)
- [CMGetProfileLocation](1804885-cmgetprofilelocation.md)
- [NCMGetProfileLocation](1804889-ncmgetprofilelocation.md)
- [CMCloneProfileRef](1804891-cmcloneprofileref.md)
- [CMGetProfileRefCount](1804894-cmgetprofilerefcount.md)
- [CMFlattenProfile](1804897-cmflattenprofile.md)
- [NCMUnflattenProfile](1804901-ncmunflattenprofile.md)
