SetColorProfileElement

[This is preliminary documentation and subject to change.]

The SetColorProfileElement function sets the element data for a tagged profile element.

BOOL WINAPI SetColorProfileElement(
  HPROFILE hProfile,
  TAGTYPE tag,
  DWORD dwOffset, 
  PDWORD pcbSize,
  PVOID pBuffer
);
 

Parameters

hProfile
Specifies a handle to the profile in question.
tag
Identifies the tagged element.
dwOffset
Specifies the offset from the first byte of the tagged element data at which to start writing.
pcbSize
Pointer to a variable containing the number of bytes of data to write. On return, it contains the number of bytes actually written.
pBuffer
Pointer to a buffer containing the data to write to the tagged element in the color profile.

Return Values

If this function succeeds, the return value is TRUE.

If this function fails, the return value is FALSE. For extended error information, call GetLastError.

Remarks

If the color profile is not opened for read/write permission, this function fails.

If dwOffset exceeds the size set for the specified tagged element, this function fails.

If dwOffset + *pcbSize is greater than the size of the specified element, this function only writes as many bytes as will fit within the current size of the element.

Any existing data in the specified portion of the tagged element is overwritten when this function succeeds.

QuickInfo

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

See Also

Color Management Overview, ICM 2.0 Functions