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 / Registering Components


UnregisterComponent

The UnregisterComponent function removes a component from the Component Manager's registration list. Most components are registered at startup and remain registered until the computer is shut down. However, you may want to provide some services temporarily. In that case you dispose of the component that provides the temporary service by using this function.

FUNCTION UnregisterComponent (aComponent: Component): OSErr;
aComponent
A component identifier that specifies the component to be removed. Applications that register components may obtain this identifier from the RegisterComponent or RegisterComponentResource functions.
DESCRIPTION
The UnregisterComponent function removes the component with the specified component identifier from the list of available components. The component to be removed from the registration list must not be in use by any applications or components. If there are open connections to the component, the UnregisterComponent function returns a negative result code.

RESULT CODES
noErr0No error
invalidComponentID-3000No component with this component identifier
validInstancesExist-3001This component has open connections
SEE ALSO
If you provide a component that supports the unregister request, see "Responding to the Register Request" on page 6-22 for more information.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996