Important: The information in this document is obsolete and should not be used for new development.
How Your CMM Is Called by the Component Manager
Because a CMM is a direct client of the Component Manager, it must conform to the Component Manager's interface requirements, including supporting and responding to required Component Manager calls.The code for your CMM should be contained in a resource. The Component Manager expects the entry point to this resource to be a function having this format:
pascal ComponentResult main(ComponentParameters *params, Handle storage);Whenever the Component Manager receives a request for your CMM, it calls your component's entry point and passes any parameters, along with information about the current connection, in a component parameters data structure of typeComponentParameters
. This entry point must be the first function in your CMM's code segment. The Component Manager also passes a handle to the private storage (if any) associated with the current instance of your component. Here is the component parameters data structure:
struct ComponentParameters { unsigned char flags; unsigned char paramSize; short what; long params[1]; };The first field of the component parameters data structure is reserved. The following three fields carry information your CMM needs to perform its processing. Thewhat
field contains a value that identifies the type of request. TheparamSize
field specifies the size in bytes of the parameters passed from the ColorSync-supportive calling application to your CMM. The parameters themselves are passed in theparams
field.