Export (0) Print
Expand All
Expand Minimize

AssociateColorProfileWithDevice Function

The AssociateColorProfileWithDevice function associates a specified color profile with a specified device.

Syntax

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

Parameters

pMachineName

Reserved. Must be NULL. This parameter is intended to point to the name of the machine on which to associate the specified profile and device. A NULL pointer indicates the local machine.

pProfileName

Points to the file name of the profile to associate.

pDeviceName

Points to the name of the device to associate.

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 AssociateColorProfileWithDevice function will fail if the profile has not been installed on the computer using the InstallColorProfile function.

Note that under Windows (Windows 95 or later), the PostScript device driver for printers assumes a CMYK color model. Therefore, all PostScript printers must use a CMYK color profile. Windows 2000 does not have this limitation.

If the specified device is a monitor, this function updates the default profile.

Several profiles are typically associated with printers, based on paper and ink types. There is no default. The GDI selects the best one from the associated profiles when your application creates a device context (DC).

Scanners also have no default profile. However, it is atypical to associate more than one profile with a scanner.

AssociateColorProfileWithDevice always adds the specified profile to the current user's per-user profile association list for the specified device. Before adding the profile to the list, AssociateColorProfileWithDevice determines whether the user has previously expressed the desire to use a per-user profile association list for the device. If so, then AssociateColorProfileWithDevice simply adds the specified profile to the existing per-user profile association list for the device. If not, then AssociateColorProfileWithDevice creates a new per-user profile association list for the device by copying the system-wide association list for that device. It then appends the specified profile to 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

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Icm.h

Library

Mscms.lib

DLL

Mscms.dll

Unicode and ANSI names

AssociateColorProfileWithDeviceW (Unicode) and AssociateColorProfileWithDeviceA (ANSI)

See Also

Basic Color Management Concepts
Functions
DisassociateColorProfileFromDevice

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2010

Community Additions

ADD
Show:
© 2014 Microsoft