示例#1
0
        public static bool ShowAnalyzerInstalled()
        {
            ShowAnalyzerLib.ShowAnalyzer sa = null;

            try
            {
                sa = new ShowAnalyzer();
                string reg = sa.GetRegistrationInfo();
                // TODO check for unregistered use - fail

                // Release the COM object and clean up otherwise it hangs later
                Marshal.FinalReleaseComObject(sa);
                sa = null;
                return(true);
            }
            catch
            {
                // Release the COM object
                if (sa != null)
                {
                    Marshal.FinalReleaseComObject(sa);
                    sa = null;
                }

                return(false);
            }
        }
示例#2
0
        public static bool ShowAnalyzerInstalled()
        {
            ShowAnalyzerLib.ShowAnalyzer sa = null;

            try
            {
                sa = new ShowAnalyzer();
                string reg = sa.GetRegistrationInfo();
                // TODO check for unregistered use - fail
                
                // Release the COM object and clean up otherwise it hangs later
                Marshal.FinalReleaseComObject(sa);
                sa = null;
                return true;
            }
            catch
            {
                // Release the COM object
                if (sa != null)
                {
                    Marshal.FinalReleaseComObject(sa);
                    sa = null;
                }

                return false;
            }
        }