none
Multi threading in Outlook 2010 RRS feed

  • Question

  •  

    Hi

    I am trying to create a plugin for Outlook 2010,

    My requirement has lots of database call and many other processes to be done in background,

    So I am trying to achieve this by multithreading,

    Please suggest what is the scope of multithreading in Outlook 2010 and how much its safe and also the best practices regarding multithreading in Outlook 2010.

    I want to use :-

    1. Background threads
    2. Timers

    Please suggest me in this regard

    Thanks in advance


    Monday, March 19, 2012 5:34 AM

Answers

  • Outlook Object Model can only be accessed on the main UI thread. No exceptions allowed.

    You should be Ok using Extended MAPi (C++ or Delphi) on a secondary thread, but OOM is off limits.


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

    Monday, March 19, 2012 6:19 AM
  • And any timers that call code that use the object model must be synched to the main thread or must be running on the main thread.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Dmitry Streblechenko _MVP_" <=?utf-8?B?RG1pdHJ5IFN0cmVibGVjaGVua28gX01WUF8=?=> wrote in message news:3462085c-b54e-4f35-80f0-907097c8f50d...

    Outlook Object Model can only be accessed on the main UI thread. No exceptions allowed.

    You should be Ok using Extended MAPi (C++ or Delphi) on a secondary thread, but OOM is off limits.


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


    Ken Slovak MVP - Outlook
    Monday, March 19, 2012 1:29 PM
    Moderator

All replies

  • Outlook Object Model can only be accessed on the main UI thread. No exceptions allowed.

    You should be Ok using Extended MAPi (C++ or Delphi) on a secondary thread, but OOM is off limits.


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

    Monday, March 19, 2012 6:19 AM
  • And any timers that call code that use the object model must be synched to the main thread or must be running on the main thread.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Dmitry Streblechenko _MVP_" <=?utf-8?B?RG1pdHJ5IFN0cmVibGVjaGVua28gX01WUF8=?=> wrote in message news:3462085c-b54e-4f35-80f0-907097c8f50d...

    Outlook Object Model can only be accessed on the main UI thread. No exceptions allowed.

    You should be Ok using Extended MAPi (C++ or Delphi) on a secondary thread, but OOM is off limits.


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


    Ken Slovak MVP - Outlook
    Monday, March 19, 2012 1:29 PM
    Moderator