---
title: CMGetProfileLocation
framework: Application Services
role: pseudoSymbol
platforms: []
path: applicationservices/colorsync_manager/1804885-cmgetprofilelocation
---

# CMGetProfileLocation

Obtains the location of a profile based on the specified profile reference.

## Declaration

```occ
CMError CMGetProfileLocation (
   CMProfileRef prof,
   CMProfileLocation *location
);
```

## Parameters

- `prof`: A profile reference of type [doc://com.apple.documentation/documentation/applicationservices/cmprofileref](applicationservices/cmprofileref.md). Before calling `CMGetProfileLocation`, you set the reference to specify the profile you wish to obtain the location for.
- `theProfile`: A pointer to a profile location structure of type [doc://com.apple.documentation/documentation/applicationservices/cmprofilelocation](applicationservices/cmprofilelocation.md). On return, specifies the location of the profile. Commonly, a profile is disk-file based, but it may instead be temporary, handle-based, pointer-based, or accessed through a procedure supplied by your application.

## Return Value

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

## Overview

When your application calls the `CMValidateProfile` function, the ColorSync Manager dispatches the function to the CMM specified by the `CMMType` header field of the profile whose reference you specify. The preferred CMM can support this function or not.

To open a profile and obtain a reference to it, use the function [CMOpenProfile](1804853-cmopenprofile.md). 

### Version-Notes

This function is not recommended for use in ColorSync 2.5.

Starting with ColorSync version 2.5, you should use the function [NCMGetProfileLocation](1804889-ncmgetprofilelocation.md) instead of `CMGetProfileLocation`.

As of version 2.5, if you call `CMGetProfileLocation`, it will just call `NCMGetProfileLocation` in turn, passing the profile specified by `prof`, the profile location specified by `theProfile`, and a location size value of `cmOriginalProfileLocationSize`.

## 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)
- [CMSetProfileHeader](1804882-cmsetprofileheader.md)
- [NCMGetProfileLocation](1804889-ncmgetprofilelocation.md)
- [CMCloneProfileRef](1804891-cmcloneprofileref.md)
- [CMGetProfileRefCount](1804894-cmgetprofilerefcount.md)
- [CMFlattenProfile](1804897-cmflattenprofile.md)
- [NCMUnflattenProfile](1804901-ncmunflattenprofile.md)
