DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 11 Jul 2007 08:15:16 -0700,    posted on: microsoft.public.dotnet.framework.interop        back       

Thread Index
  1    Tom


Office Add-ins and threads   
Hi,

Is it possible to safely run threads in a VSTO Excel 2003 Add-in?

I run my thread as a STA thread like this:

                thread = new System.Threading.Thread(TestThread);
                thread.IsBackground = true;
                thread.Name = "Test thread";
 
thread.SetApartmentState(System.Threading.ApartmentState.STA);

I started to get "DisconnectedContext was detected" warnings from the
MDA right hafter I added a class library project to my add-in
solution.

Is there some magic trick to fix this or do I have to forget about
using threads and start calling Application.DoEvents every now and
then?

Br,
Tom
Date:Wed, 11 Jul 2007 08:15:16 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us