CreateDeviceLinkProfile function (icm.h)

Creates an International Color Consortium (ICC) device link profile from a set of color profiles, using the specified intents.


BOOL CreateDeviceLinkProfile(
  PHPROFILE hProfile,
  DWORD     nProfiles,
  PDWORD    padwIntent,
  DWORD     nIntents,
  DWORD     dwFlags,
  PBYTE     *pProfileData,
  DWORD     indexPreferredCMM



Pointer to an array of handles of the color profiles to be used. The function determines whether the HPROFILEs contain ICC profile information and, if so, it processes them appropriately.


Specifies the number of profiles in the array pointed to by hProfile.


Pointer to an array of DWORDS containing the intents to be used. See Rendering intents.


The number of intents in the array pointed to by padwIntent.


Specifies flags to used control creation of the transform. For details, see CMM Transform Creation Flags.


Pointer to a pointer to a buffer. If successful, this function allocates the buffer, places its address in *pProfileData, and fills it with a device link profile. If the function succeeds, the calling application must free the buffer after it is no longer needed.


Specifies the one-based index of the color profile that indicates what color management module (CMM) to use. The application developer may allow Windows to choose the CMM by setting this parameter to INDEX_DONT_CARE. See Using Color Management Modules (CMM).

Return value

If this function succeeds, the return value is a nonzero value.

If this function fails, the return value is zero. For extended error information, call GetLastError.


For HPROFILEs that contain WCS profile information, the HPROFILEs are converted into valid ICC profile handles and then these ICC profile handles are used in creating the device link profile.

The first and the last profiles in the array must be device profiles. The other profiles can be color space or abstract profiles.

Each profile's output color space must be the next profile's input color space.

The calling application must free the buffer allocated by this function and pointed to by the pProfileData parameter. The GlobalFree function should be used to free the buffer.


Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header icm.h
Library Mscms.lib
DLL Mscms.dll

See also