Beispiel #1
0
 public void Dispose()
 {
     if (_axPdf != null)
     {
         COM_Object.Release(_axPdf.GetOcx());
     }
 }
Beispiel #2
0
 public void AddRecipients(ArrayList recipList)
 {
     Guard.NullArgument(recipList, "recipList");
     foreach (RecipInfo recInfo in recipList)
     {
         Recipient recipient = _item.Recipients.Add(recInfo.DisplayName + "<" + recInfo.Email + ">");
         COM_Object.Release(recipient);
     }
 }
Beispiel #3
0
        static public _com_OutlookExporer IsOutlookExplorerLoaded( )
        {
            Outlook.Application outlook   = null;
            Outlook.NameSpace   nameSpace = null;
            _com_OutlookExporer explorer  = null;

            _isFileNotFoundHappened = false;
            try
            {
                _tracer.Trace("Looking for explorer");
                OutlookGUIInit.DebugMessageBox("Looking for explorer");

                outlook = new Outlook.ApplicationClass();
                _tracer.Trace("Outlook.Application object has been initialized properly.");

                nameSpace = outlook.GetNamespace("MAPI");
                _tracer.Trace("Outlook.NameSpace object has been initialized properly? - " + (nameSpace != null).ToString());

                explorer = new _com_OutlookExporer(outlook.ActiveExplorer());
                _tracer.Trace("_com_OutlookExporer wrapper object has been initialized properly.");
                OutlookGUIInit.DebugMessageBox("Get ActiveExplorer");

                if (explorer == null)
                {
                    _tracer.Trace("Outlook explorer is not found");
                }
                else
                {
                    _tracer.Trace("Outlook explorer is found");
                }
            }
            catch (FileNotFoundException exception)
            {
                _isFileNotFoundHappened = true;
                _tracer.TraceException(exception);
            }
            catch (COMException exception)
            {
                _tracer.TraceException(exception);
            }
            catch (InvalidComObjectException exception)
            {
                _tracer.TraceException(exception);
            }
            catch (InvalidCastException exception)
            {
                _tracer.TraceException(exception);
            }
            finally
            {
                COM_Object.Release(outlook);
                COM_Object.Release(nameSpace);
            }
            return(explorer);
        }
Beispiel #4
0
 private void ShutdownPowerPoint( )
 {
     if (_powerPoint == null)
     {
         return;
     }
     try
     {
         _powerPoint.Quit( );
     }
     catch (System.Runtime.InteropServices.COMException ex)
     {
         _tracer.TraceException(ex);
     }
     catch (Exception ex)
     {
         _tracer.TraceException(ex);
     }
     COM_Object.Release(_powerPoint);
 }