Share via


WcsAssociateColorProfileWithDevice

Associates a specified WCS color profile with a specified device.

BOOL WINAPI WcsAssociateColorProfileWithDevice(
  __in WCS_PROFILE_MANAGEMENT_SCOPE profileManagementScope,  // scope of the operation
  __in PCWSTR pProfileName,  // file name containing device profile
  __in PCWSTR pDeviceName    // name of device
);

Parameters

  • profileManagementScope
    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 Values

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 InstallColorProfile 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

**  Windows Vista:** Included in Windows Vista and later.
**  Header:** Declared in Icm.h.
**  Library:** Use Mscms.lib.
**  Unicode:** Implemented as Unicode and ANSI versions on Windows Vista.

See Also

Basic Color Management Concepts, Windows Color System Schemas and Algorithms, Functions, WcsDisassociateColorProfileFromDevice