Important: The information in this document is obsolete and should not be used for new development.
UnregisterComponent
TheUnregisterComponent
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
orRegisterComponentResource
functions.DESCRIPTION
TheUnregisterComponent
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, theUnregisterComponent
function returns a negative result code.RESULT CODES
noErr 0 No error invalidComponentID -3000 No component with this component identifier validInstancesExist -3001 This 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.