Share via


CreateProfileFromLogColorSpace

The CreateProfileFromLogColorSpace function converts a logical color space to a device profile.

 BOOL WINAPI CreateProfileFromLogColorSpace(
  LPLOGCOLORSPACE pLogColorSpace,   PBYTE *pBuffer);

Parameters

  • pLogColorSpace
    A pointer to a logical color space structure. See LOGCOLORSPACE for details. The lcsFilename[0] member of the structure must be set to the null character ('\0') or this function call will fail with the return value of INVALID_PARAMETER.
  • pBuffer
    A pointer to a pointer to a buffer where the device profile will be created. This function allocates the buffer and fills it with profile information if it is successful. If not, the pointer is set to NULL. The caller is responsible for freeing this buffer when it is no longer needed.

Return Values

If this function succeeds, the return value is TRUE.

If this function fails, the return value is FALSE.

If the lcsFilename[0] member if the LOGCOLORSPACE structure pointed to by pLogColorSpace is not '\0', this function returns INVALID_PARAMETER.

Remarks

This function can be used with ASCII or Unicode strings. The buffer created by this function must be freed by the caller when it is no longer needed or there will be a memory leak. The GlobalFree function should be used to free this buffer.

This function does not support Windows Color System (WCS) profiles CAMP, DMP, and GMMP.

Requirements

**  Windows NT/2000/XP/Vista:** Included in Windows 2000 and later.
**  Windows 95/98/Me:** Included in Windows 98 and later.
**  Header:** Declared in Icm.h.
**  Library:** Use Mscms.lib.
**  Unicode:** Implemented as Unicode and ANSI versions on Windows 2000/XP/Vista.

See Also

Basic Color Management Concepts, Functions, GlobalFree