UnregisterRTDServer() public static method

public static UnregisterRTDServer ( string progId ) : void
progId string
return void
コード例 #1
0
 public void ServerTerminate()
 {
     try
     {
         using (XlCall.Suspend())
         {
             RtdRegistration.UnregisterRTDServer(_progId);
             if (_rtdServer != null)
             {
                 _rtdServer.ServerTerminate();
                 return;
             }
             _ServerTerminate();
         }
     }
     catch (Exception e)
     {
         Logger.RtdServer.Error("Error in RTD server {0} ServerTerminate: {1}", _progId, e.ToString());
     }
 }
コード例 #2
0
        void IRtdServer.ServerTerminate()
        {
            try
            {
                // The Unregister call here just tells the reg-free loading that we are gone,
                // to ensure a fresh load with new 'fake progid' next time.
                // Also safe to call (basically a no-op) if we are not loaded via reg-free, but via real COM Server.
                RtdRegistration.UnregisterRTDServer(RegisteredProgId);

                if (_updateSync != null)
                {
                    _updateSync.DeregisterUpdateNotify(_callbackObject);
                }
                using (XlCall.Suspend())
                {
                    ServerTerminate();
                }
            }
            catch (Exception e)
            {
                Logging.LogDisplay.WriteLine("Error in RTD server {0} ServerTerminate: {1}", GetType().Name, e.ToString());
            }
        }