WcsAssociateColorProfileWithDevice function (icm.h)

Associates a specified WCS color profile with a specified device.

Note

This API does not support "advanced color" profiles for HDR monitors. Use ColorProfileAddDisplayAssociation for managing advanced color profiles.

Syntax

BOOL WcsAssociateColorProfileWithDevice(
  WCS_PROFILE_MANAGEMENT_SCOPE scope,
  PCWSTR                       pProfileName,
  PCWSTR                       pDeviceName
);

Parameters

scope

A WCS_PROFILE_MANAGEMENT_SCOPE value that specifies the scope of this profile management operation, which could be system-wide or for the current user.

pProfileName

A pointer to the file name of the profile to associate.

pDeviceName

A pointer to the name of the device with which the profile is to be associated.

Return value

If this function succeeds, the return value is TRUE.

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

Remarks

The WCSAssociateColorProfileWithDevice function fails if the profile has not been installed on the computer using the InstallColorProfileW function.

If the profileManagementScope parameter is WCS_PROFILE_MANAGEMENT_SCOPE_SYSTEM_WIDE, the profile association is system-wide and applies to all users. If profileManagementScope is WCS_PROFILE_MANAGEMENT_SCOPE_CURRENT_USER, the association is only for the current user.

This function is executable in Least-Privileged User Account (LUA) context if profileManagementScope is WCS_PROFILE_MANAGEMENT_SCOPE_CURRENT_USER. Otherwise, administrative privileges are required.

Requirements

Requirement Value
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