[This is preliminary documentation and subject to change.]
The OpenColorProfile function creates a handle to a specified color profile. The handle can then be used in other profile management functions.
HPROFILE WINAPI OpenColorProfile(
PPROFILE pProfile,
DWORD dwDesiredAccess,
DWORD dwShareMode,
DWORD dwCreationMode
);
Constant | Meaning |
---|---|
PROFILE_READ | Opens the profile for read access. |
PROFILE_READWRITE | Opens the profile for both read and write access. |
Constant | Meaning |
---|---|
FILE_SHARE_READ | Other open operations can be performed on the profile for read access. |
FILE_SHARE_WRITE | Other open operations can be performed on the profile for write access. |
Constant | Meaning |
---|---|
CREATE_NEW | Creates a new profile. Fails if the profile already exists. |
CREATE_ALWAYS | Creates a new profile. Overwrites the profile if it exists. |
OPEN_EXISTING | Opens the profile. Fails if it does not exist |
OPEN_ALWAYS | Opens the profile if it exists. If it does not exist, creates the profile. |
TRUNCATE_EXISTING | Opens the profile, and truncates it to zero bytes. Fails if the profile doesn't exist. |
If this function succeeds, the return value is the handle of the color profile that is opened.
If this function fails, the return value is NULL. For extended error information, call GetLastError.
If the profile data is not specified using a file name, dwShareMode and dwCreationMode are ignored.
Use the CloseColorProfile function to close an object handle returned by OpenColorProfile.
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.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Color Management Overview, ICM 2.0 Functions, CloseColorProfile, PROFILE