[This is preliminary documentation and subject to change.]
The CMCreateTransform ANSI function creates a color transform that maps from an input LOGCOLORSPACE to an optional target space and then to an output device.
HCMTRANSFORM WINAPI CMCreateTransform(
LPLOGCOLORSPACEA 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 Unicode equivalent of the CMCreateTransform function is CMCreateTransformW.
Every CMM is required to export this function.
The forward transform must be already computed before calling CMCreateTransform. Future calls to the 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, CMCreateTransformW, CMTranslateColors, CMTranslateRGB, CMTranslateRGBs, CMTranslateRGBsExt