CreateDeviceLinkProfile

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

BOOL WINAPI CreateDeviceLinkProfile(
  PHPROFILE pahProfiles,  DWORD nProfiles,  PDWORDpadwIntent,
  DWORD nIntents,DWORDdwFlags,
  PBYTE *pProfileData,  DWORD indexPreferredCMM );

Parameters

  • pahProfiles
    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.
  • nProfiles
    Specifies the number of profiles in the array pointed to by pahProfiles.
  • padwIntent
    Pointer to an array of DWORDS containing the intents to be used. See Rendering Intents.
  • nIntents
    The number of intents in the array pointed to by padwIntent.
  • dwFlags
    Specifies flags to used control creation of the transform. For details, see CMM Transform Creation Flags.
  • pProfileData
    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.
  • indexPreferredCMM
    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 Values

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.

Remarks

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.

Requirements

**  Windows NT/2000/XP/Vista:** Included in Windows 2000 and later.
**  Windows 95/98/Me:** Included in Windows 98 and later.
**  Header:** Declared in Icm.h.
**  Library:** Use Mscms.lib.

See Also

Basic Color Management Concepts, Functions, GlobalFree