![]() |
PATH![]() |
![]() ![]() |
When your application calls the
CMOpenProfile
,
CMNewProfile
,
CMCopyProfile
, or
CMNewLinkProfile
functions, it can supply the ColorSync Manager with a profile location structure of type
CMProcedureLocation
to specify a procedure that provides access to a profile. The ColorSync Manager calls your procedure when the profile is created, initialized, opened, read, updated, or closed. The profile access procedure declaration is described in
MyCMProfileAccessProc
. For sample code demonstrating procedure-based profile access, see
Accessing a Resource-Based Profile With a Procedure
.
When the ColorSync Manager calls your profile access procedure, it passes one of the following constants in the command parameter to specify an operation. Your procedure must be able to respond to each of these constants.
enum {
cmOpenReadAccess = 1, /* open profile for reading */
cmOpenWriteAccess = 2, /* open profile for writing */
cmReadAccess = 3, /* read specified bytes from profile */
cmWriteAccess = 4, /* write specifies bytes to profile */
cmCloseAccess = 5, /* close profile for read or write */
cmCreateNewAccess = 6, /* create new data stream for profile */
cmAbortWriteAccess = 7, /* cancel current write process */
cmBeginAccess = 8, /* begin procedure access */
cmEndAccess = 9 /* end procedure access */
};