Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 6 - Component Manager / Component Manager Reference
Routines for Components / Calling Other Components


The DelegateComponentCall function provides an efficient mechanism for passing on requests to a specified component. Your component must open a connection to the component to which the requests are to be passed. Your component must close that connection when it has finished using the services of the other component.

The DelegateComponentCall function does not accept a component identifier in place of a component instance. In addition, your component should never use the DelegateComponentCall function with open or close requests from the Component Manager--always use the OpenComponent and CloseComponent functions to manage connections with other components.
FUNCTION DelegateComponentCall 
                        (originalParams: ComponentParameters; 
                         ci: ComponentInstance): LongInt;

The component parameters record provided to your component by the Component Manager.
The component instance that is to process the request. The Component Manager provides a component instance to your component when it opens a connection to another component with the OpenComponent or OpenDefaultComponent function. You must specify a component instance; this function does not accept a component identifier.
The DelegateComponentCall function calls the component instance specified by the ci parameter, and passes it the specified component parameters record. DelegateComponentCall returns a long integer containing the component result returned by the specified component.

See "The Component Parameters Record" on page 6-52 for a description of the component parameters record. See page 6-42, page 6-44, and page 6-44, respectively, for information on the OpenDefaultComponent, OpenComponent, and CloseComponent functions.

See Listing 6-16 on page 6-34 for an example of the use of the DelegateComponentCall function.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996