WcsAssociateColorProfileWithDevice function

Associates a specified WCS color profile with a specified device.

Syntax


BOOL WINAPI WcsAssociateColorProfileWithDevice(
  _In_ WCS_PROFILE_MANAGEMENT_SCOPE profileManagementScope,
  _In_ PCWSTR                       pProfileName,
  _In_ PCWSTR                       pDeviceName
);

Parameters

profileManagementScope [in]

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 [in]

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

pDeviceName [in]

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Icm.h

Library

Mscms.lib

DLL

Mscms.dll

Unicode and ANSI names

WcsAssociateColorProfileWithDeviceW (Unicode) and WcsAssociateColorProfileWithDeviceA (ANSI)

See also

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

 

 

Show: