Exemple #1
0
        static VirtualDesktop()
        {
            try
            {
                ComObjects.Initialize();
                ComObjects.RegisterListener();
            }
            catch (Exception ex)
            {
                InitializationException = ex;
            }

            AppDomain.CurrentDomain.ProcessExit += (sender, args) => ComObjects.Terminate();
        }
        static VirtualDesktop()
        {
            if (!IsSupported)
            {
                return;
            }

            try
            {
                ComObjects.Initialize();
            }
            catch (Exception ex)
            {
                InitializationException = ex;
                _isSupportedInternal    = false;
            }

            AppDomain.CurrentDomain.ProcessExit += (sender, args) => ComObjects.Terminate();
        }
Exemple #3
0
 static DesktopManager()
 {
     ComObjects.Initialize();
 }