Thread: Multithreading
View Single Post
  #3  
Old September 18th 08, 10:50 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Multithreading

The Outlook object model should only be accessed from the main thread, never
from any other thread. If you get all the data from Outlook that you need on
the main thread and store it in non-Outlook objects then you can use those
objects in another thread. Otherwise expect crashes and hangs in Outlook.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Stuart Parker" wrote in message
...
Hi

I have an add-in that presents the user with a VB form. The form allows
the user to supply a filter for messages to move to an archive folder. I
want to provide feedback on the progress of the move process via a
progress bar. Can I safely use a backgroundworker to farm off the move
process and update the progress bar using the backgroundworker's
reportprogress method.

Basically, is moving items safe when executed from a backgroundworker ?

Cheers


Ads