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 / Setting Component Errors


SetComponentInstanceError

Although your component usually returns error information as its function result, your component can choose to use the SetComponentInstanceError procedure to pass error information to the Component Manager. The Component Manager uses this error information to set the current error value for the appropriate connection. Applications can then retrieve this error information by calling the GetComponentInstanceError function. The documentation for your component should specify how the component indicates errors.

PROCEDURE SetComponentInstanceError 
         (aComponentInstance: ComponentInstance; theError: OSErr);
aComponentInstance
A component instance that specifes the connection for which to set the error. The Component Manager provides a component instance to your component when the connection is opened. The Component Manager also provides a component instance to your component as the first parameter in the params field of the parameters record.
theError
The new value for the current error. The Component Manager uses this value to set the current error for the connection specified by the aComponentInstance parameter.
DESCRIPTION
The SetComponentInstanceError procedure sets the error associated with the specified component instance to the value specified by the parameter theError.

SEE ALSO
For a description of the GetComponentInstanceError function, see page 6-49.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996