The IADMEXT::Terminate method is called by IISADMIN when it terminates, so your program can perform termination tasks, including the removal of the registration data for your DCOM class factories.
virtual HRESULT STDMETHODCALLTYPE Terminate(void);