GetColorProfileFromHandle

[This is preliminary documentation and subject to change.]

Given a handle to an open color profile, the GetColorProfileFromHandle function will copy the contents of the profile into a buffer supplied by the application.

BOOL WINAPI GetColorProfileFromHandle(
  HPROFILE hProfile,
  PBYTE pBuffer,
  PDWORD pcbSize
);
 

Parameters

hProfile
Handle to an open color profile.
pBuffer
Pointer to buffer to receive raw profile data. Can be NULL. If it is, the size required for the buffer will be stored in the memory location pointed to by pcbSize. The buffer can be allocated to the appropriate size, and this function called again with pBuffer containing the address of the buffer.
pcbSize
Pointer to a DWORD that holds the size of buffer pointed at by pBuffer. On return it is filled with size of buffer that was actually used if the function succeeds. If this function is called with pBuffer set to NULL, this parameter will contain the size of the buffer required.

Return Values

If this function succeeds, the return value is TRUE. It also returns TRUE if the pBuffer parameter is NULL and the size required for the buffer is copied into pcbSize.

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

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