---
title: CMGetProfileHeader
framework: Application Services
role: pseudoSymbol
platforms: []
path: applicationservices/colorsync_manager/1804879-cmgetprofileheader
---

# CMGetProfileHeader

Obtains the profile header for the specified profile. 

## Declaration

```occ
CMError CMGetProfileHeader (
   CMProfileRef prof,
   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 to be copied.
- `header`: A pointer to a profile header. On input, depending on the profile version, you may allocate a ColorSync 2.x or 1.0 header. On return, contains the profile data. For information about the ColorSync 2.x profile header structure, see [doc://com.apple.documentation/documentation/applicationservices/cm2header](applicationservices/cm2header.md). For information about the ColorSync 1.0 header, see `CMHeader`.

## Return Value

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

## Overview

The `CMGetProfileHeader` function returns the header for a ColorSync 2.x or ColorSync 1.0 profile. To return the header, the function uses a union of type [CMAppleProfileHeader](../1560290-cmappleprofileheader.md), with variants for version 1.0 and 2.x headers. 

A 32-bit version value is located at the same offset in either header. For ColorSync 2.x profiles, this is the `profileVersion` field. For ColorSync 1.0 profiles, this is the `applProfileVersion` field. You can inspect the value at this offset to determine the profile version, and interpret the remaining header fields accordingly.

To copy a profile header to a profile after you modify the header’s contents, use the function [CMSetProfileHeader](1804882-cmsetprofileheader.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)
- [CMSetProfileHeader](1804882-cmsetprofileheader.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)
