[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
);
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.
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.
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.
Color Management Overview, ICM 2.0 Functions, CMCreateTransform, CMTranslateColors, CMTranslateRGB, CMTranslateRGBs, CMTranslateRGBsExt