UnregisterComponent
Removes a component from the Component Manager’s registration list.
Declaration
OSErr UnregisterComponent(Component aComponent);Parameters
- aComponent:
The component to be removed. Applications that register components may obtain this identifier from the 1516537 Registercomponent or 1516594 Registercomponentresource functions. The component must not be in use by any applications or components. You can use a component instance here, but you must coerce the data type appropriately.
Return Value
A result code. See Result Codes. If there are open connections to the component, returns a validInstancesExist error.
Discussion
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.