none
Outlook COM Timeout Problem

    Question

  • Hello !

    Hello ! Ok here is what we're experiencing.

    I have a program that is connecting to Outlook COM (the simplest way, not addin). Now consider this vcal :

    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:CopyTrans Contacts
    BEGIN:VEVENT
    SUMMARY:test-calenderier
    DESCRIPTION:
    LOCATION:
    DTSTART;VALUE=DATE:20121227
    DTEND;VALUE=DATE:20121228
    END:VEVENT
    END:VCALENDAR
    • Save it to cal.ics.
    • Make sure outlook is fully closed.
    • Double click the ics file and make sure it opens with outlook
    • An event configuration window should appear, close it. Let the main outlook window opened.
    • When we launch our program and try to connect to the COM here is what's happening :

    - The Outlook Event window is popping up again.

    - You can close it let it open what ever the CoCreateInstance call in our programm will return a CO_E_SERVER_EXEC_FAILURE.

    I guess this can happen in a various other ways and we're getting a huge number of rapports with this error so I thought I would let you know.

    Louka Outrebon


    • Edited by Loukaa Friday, December 28, 2012 4:30 PM
    Friday, December 28, 2012 4:05 PM

Answers

  • This is to be expected - the latest versions of Outlook close themselves down when the last window is closed even if there is an external reference to any of the Outlook objects. This is done on purpose as the older version of Outlook kept running without any UI (ghost instances of Outlook) if external applications forgot to release references to Outlook or exited without releasing them.

    The only workaround is to connect to Outlook only when you need it and avoid storing pointers to any Outlook objets.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Friday, December 28, 2012 6:13 PM