WcsDisassociateColorProfileFromDevice function (icm.h)

Disassociates a specified WCS color profile from a specified device on a computer.

Note

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

Syntax

BOOL WcsDisassociateColorProfileFromDevice(
  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 disassociate.

pDeviceName

A pointer to the name of the device from which to disassociate the profile.

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 WCS color profile should be installed. Moreover, you must use the same profileManagementScope value as when the device was associated with the profile. See WcsAssociateColorProfileWithDevice.

If profileManagementScope is WCS_PROFILE_MANAGEMENT_SCOPE_SYSTEM_WIDE, the profile disassociation is systemwide and applies to all users. If profileManagementScope is WCS_PROFILE_MANAGEMENT_SCOPE_CURRENT_USER, the disassociation is only for the current user.

If more than one color profile is associated with a device, WCS uses the last associated profile as the default. For example, if your application sequentially associates three profiles with a device, WCS uses the last profile associated as the default. If your application then calls the WcsDisassociateColorProfileFromDevice function to disassociate the third profile (which is the default in this example), WCS uses the second profile as the default.

If your application disassociates all profiles from a device, WCS uses the sRGB profile as the default.

If profileManagementScope is WCS_PROFILE_MANAGEMENT_SCOPE_CURRENT_USER, this function is executable in Least-Privileged User Account (LUA) context. 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