UpdateICMRegKey

The UpdateICMRegKey function installs, removes, or queries registry entries that identify ICC color profiles or color-matching DLLs. The function carries out the action specified by the nCommand parameter.

BOOL UpdateICMRegKey(

DWORD dwReserved,  
DWORD CMID,  
LPTSTR lpszFileName,  
UINT nCommand  
);  

Parameters

dwReserved

Reserved; must be zero.

CMID

Profile identifier of the color-matching DLL to use with the profile.

lpszFileName

Pointer to a zero-terminated string that specifies the filename of an ICC color profile or address of a DEVMODE structure, depending on the value of nCommand.

nCommand

Action flag. This parameter can have one of the following values:

ICM_ADDPROFILE Adds the ICC profile to the ICM branch in the registry.
ICM_DELETEPROFILE Deletes the ICC profile from the ICM branch in the registry.
ICM_QUERYPROFILE Determines if the profile is in the ICM branch of the registry.
ICM_SETDEFAULTPROFILE Makes the profile first among equals.
ICM_REGISTERICMATCHER Equates a CMID to a color-matching DLL.
ICM_UNREGISTERICMATCHER Removes the reference between CMID and a color-matching DLL.
ICM_QUERYMATCH Determines if a profile exists based on the DEVMODE pointed to by lpszFileName.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

GDI uses the registry to keep track of ICC profiles installed in the system (listed in the registry). Although not required, if ICC profiles are copied to a local directory, they should be placed in the Color directory in the Windows System directory.

See Also

DEVMODE