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: Thu, 23 Aug 2007 08:04:04 -0700,    posted on: microsoft.public.dotnet.framework.interop        back       

Thread Index
  1    Davinci_Jeremie


COM Object Class Library Threading model   
Hi

I have written an object in C# and exposed it as a COM object.  This object 
is used in a native application and that application creates one or more 
threads that creates and uses its own copy of my C# COM object.  

My C# COM object has reduced my performance of my native application because 
all objects are create in a single threaded apartment.  A call to 
Thread.GetApartmentState() inside my C# COM object returns ApartmentState.STA.

Since the my C# COM object is in a class library I do not have a "Main" 
method and can not apply the MTAThreadAttribute.

So my question is how do I tell my COM Class Factory to build objects that 
are in a Multi threaded apartment  in .NET C#?  

If it's just not possible I would also like to know that as well.

Cheers,

Davinci
Date:Thu, 23 Aug 2007 08:04:04 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


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