CMCreateTransformW

[This is preliminary documentation and subject to change.]

The CMCreateTransformW Unicode function creates a color transform that maps from an input LOGCOLORSPACE to an optional target space and then to an output device.

HCMTRANSFORM WINAPI CMCreateTransformW(
  LPLOGCOLORSPACEW lpColorSpace,       // color space pointer
  LPDEVCHARACTER lpDevCharacter,       // profile file name
  LPDEVCHARACTER lpTargetDevCharacter  // target profile file name
);
 

Parameters

lpColorSpace
Pointer to an input logical color space structure. If the lcsFilename member of the COLORSPACEW structure is nonzero, lpColorSpace is a pointer to the memory-mapped profile.
lpDevCharacter
Pointer to a memory-mapped device profile.
lpTargetDevCharacter
Pointer to a memory-mapped target profile.

Return Values

If this function succeeds, the return value is a color transform in the range 256 to 65,535. Since only the low WORD of the transform is retained, valid transforms cannot exceed this range.

If this function fails, the return value is an error code having a value less than 256. When the return value is less than 256, signaling an error, the CMM should use SetLastError to set the last error to a valid error value as defined in Winerror.h.

Remarks

The ANSI equivalent of CMCreateTransformW is CMCreateTransform.

Every CMM is required to export the CMCreateTransformW function. The forward transform must be already computed when calling this function. Future calls to translate functions (CMTranslateColors, CMTranslateRGB, CMTranslateRGBs, and CMTranslateRGBsExt) using the forward transform should not fail due to inability to construct the mapping.

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Requires Windows 98.
  Windows CE: Unsupported.
  Header: Declared in wingdi.h.
  Import Library: Use gdi32.lib.

See Also

Color Management Overview, ICM 2.0 Functions, CMCreateTransform, CMTranslateColors, CMTranslateRGB, CMTranslateRGBs, CMTranslateRGBsExt