Share via


DisassociateColorProfileFromDevice

The DisassociateColorProfileFromDevice function disassociates a specified color profile with a specified device on a specified computer.

BOOL WINAPI DisassociateColorProfileFromDevice(
  PCTSTR pMachineName,  PCTSTR pProfileName,  PCTSTR pDeviceName);

Parameters

  • pMachineName
    Reserved. Must be NULL. This parameter is intended to point to the name of the computer on which to disassociate the specified profile and device. A NULL pointer indicates the local computer.
  • pProfileName
    Pointer to the file name of the profile to disassociate.
  • pDeviceName
    Pointer to the name of the device to disassociate.

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

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

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

DisassociateColorProfileFromDevice always removes the specified profile from the current user's per-user profile association list for the specified device. Before removing the profile from the list, DisassociateColorProfileFromDevice determines whether the user has previously expressed the desire to use a per-user profile association list for the device. If so, then DisassociateColorProfileFromDevice simply removes the specified profile from the existing per-user profile association list for the device. If not, then DisassociateColorProfileFromDevice creates a new per-user profile association list for the device by copying the system-wide association list for that device. It then removes the specified profile from the per-user list. From that point on, the current user will be using a per-user profile association list for the specified device, as if WcsSetUsePerUserProfiles had been called for pDevice with the usePerUserProfiles parameter set to TRUE.

Requirements

**  Windows Vista:** Support for WCS profiles included in Windows Vista and later.
**  Windows NT/2000/XP:** Support for ICC profiles included in Windows 2000 and later.
**  Windows 95/98/Me:** Support for ICC profiles included in Windows 98 and later.
**  Header:** Declared in Icm.h.
**  Library:** Use Mscms.lib.
**  Unicode:** Implemented as Unicode and ANSI versions on Windows 2000/XP/Vista.

See Also

Basic Color Management Concepts, Functions, AssociateColorProfileWithDevice