Share via


WcsDisassociateColorProfileFromDevice

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

BOOL WINAPI WcsDisassociateColorProfileFromDevice(
  __in WCS_PROFILE_MANAGEMENT_SCOPE profileManagementScope,    __in PCWSTR pProfileName,    __in PCWSTR pDeviceName    );

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 disassociate.
  • pDeviceName
    A pointer to the name of the device from which to disassociate the profile.

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

**  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, WcsAssociateColorProfileWithDevice