Important: The information in this document is obsolete and should not be used for new development.
SetComponentInstanceError
Although your component usually returns error information as its function result, your component can choose to use theSetComponentInstanceErrorprocedure 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 theGetComponentInstanceErrorfunction. 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
paramsfield 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
aComponentInstanceparameter.DESCRIPTION
TheSetComponentInstanceErrorprocedure sets the error associated with the specified component instance to the value specified by the parametertheError.SEE ALSO
For a description of theGetComponentInstanceErrorfunction, see page 6-49.