Exemplo n.º 1
0
        /// <summary>
        /// closing the server and then the service.
        /// </summary>
        protected override void OnStop()
        {
            m_logging.Log("In onStop", MessageTypeEnum.WARNING);
            m_imageServer.ServiceIsclosing();
            // Update the service state to Stop Pending.
            ServiceStatus serviceStatus = new ServiceStatus();

            serviceStatus.dwCurrentState = ServiceState.SERVICE_STOP_PENDING;
            serviceStatus.dwWaitHint     = 100000;
            SetServiceStatus(this.ServiceHandle, ref serviceStatus);
            this.m_imageServer.Stop();
        }