예제 #1
0
        /// <summary>
        /// Thread safe function for the thread DkimSignerInstalled
        /// </summary>
        private void CheckDkimSignerInstalledSafe()
        {
            try
            {
                dkimSignerInstalled = System.Version.Parse(FileVersionInfo.GetVersionInfo(DKIM_SIGNER_PATH + DKIM_SIGNER_DLL).ProductVersion);
            }
            catch (Exception)
            {
                dkimSignerInstalled = null;
            }

            if (this.txtDkimSignerInstalled.InvokeRequired)
            {
                SetDkimSignerInstalledCallback d = new SetDkimSignerInstalledCallback(SetDkimSignerInstalled);
                this.Invoke(d);
            }
            else
            {
                SetDkimSignerInstalled();
            }
        }
예제 #2
0
        /// <summary>
        /// Thread safe function for the thread DkimSignerInstalled
        /// </summary>
        private void CheckDkimSignerInstalledSafe()
        {
            Version oDkimSignerInstalled = null;
            
            // Check if DKIM Agent is in C:\Program Files\Exchange DkimSigner and get version of DLL
            try
            {
                oDkimSignerInstalled = Version.Parse(System.Diagnostics.FileVersionInfo.GetVersionInfo(Path.Combine(Constants.DKIM_SIGNER_PATH, Constants.DKIM_SIGNER_AGENT_DLL)).ProductVersion);
            }
            catch (Exception) {}

            // Check if DKIM agent have been load in Exchange
            if (oDkimSignerInstalled != null)
            {
                try
                {
                    if (!ExchangeServer.IsDkimAgentTransportInstalled())
                    {
                        oDkimSignerInstalled = null;
                    }
                }
                catch (Exception) { }
            }

            // Set the result in the textbox
            if (this.txtDkimSignerInstalled.InvokeRequired)
            {
                SetDkimSignerInstalledCallback d = new SetDkimSignerInstalledCallback(SetDkimSignerInstalled);
                this.Invoke(d, oDkimSignerInstalled);
            }
            else
            {
                this.SetDkimSignerInstalled(oDkimSignerInstalled);
            }
        }
예제 #3
0
        /// <summary>
        /// Thread safe function for the thread DkimSignerInstalled
        /// </summary>
        private void CheckDkimSignerInstalledSafe()
        {
            try
            {
                dkimSignerInstalled = System.Version.Parse(FileVersionInfo.GetVersionInfo(DKIM_SIGNER_PATH + DKIM_SIGNER_DLL).ProductVersion);
            }
            catch (Exception)
            {
               dkimSignerInstalled = null;
            }

            if (this.txtDkimSignerInstalled.InvokeRequired)
            {
                SetDkimSignerInstalledCallback d = new SetDkimSignerInstalledCallback(SetDkimSignerInstalled);
                this.Invoke(d);
            }
            else
            {
                SetDkimSignerInstalled();
            }
        }