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, 09 Aug 2007 08:16:12 -0700,    posted on: microsoft.public.dotnet.framework.interop        back       

Thread Index
  1    unknown
          2    Johannes Passing


COM+ and WndProc in .Net   
Hello,
I have a COM+ component which i am trying to use from a .Net
application. I have a requirement to make it hang-safe, so that if any
function in COM+ would hang, the application itself would be able to
recover.

Of course the correct approach would be to eliminate all hangs in COM+
component., but nobody would give me the time or tools for that ;).

So what i am currently doing is starting a new thread, creating the COM
+ component there, calling its methods. The problem is that this
approach doesn't help, because when a COM+ method is invoked, the
WndProc method seems to lock up. I am guessing that there is some kind
of a proxy between the COM+ and managed code.

Is there a simple way to workaround that?
Could using a thread in COM+ solve that problem?

Regards,
Ignas
Date:Thu, 09 Aug 2007 08:16:12 -0700   Author:  

Re: COM+ and WndProc in .Net   
Hi Ignas,

is your COM+ component in-process (Library application) or 
out-of-process? Then what is the apartment model of the COM+ class you 
are instantiating and which apartments do your threads use (the main 
thread seems to be STA, but what about the helper thread)? As your 
problem seems to be apartment-related, this information would help.

--Johannes

igalvelis@gmail.com wrote:

> Hello,
> I have a COM+ component which i am trying to use from a .Net
> application. I have a requirement to make it hang-safe, so that if any
> function in COM+ would hang, the application itself would be able to
> recover.
> 
> Of course the correct approach would be to eliminate all hangs in COM+
> component., but nobody would give me the time or tools for that ;).
> 
> So what i am currently doing is starting a new thread, creating the COM
> + component there, calling its methods. The problem is that this
> approach doesn't help, because when a COM+ method is invoked, the
> WndProc method seems to lock up. I am guessing that there is some kind
> of a proxy between the COM+ and managed code.
> 
> Is there a simple way to workaround that?
> Could using a thread in COM+ solve that problem?
> 
> Regards,
> Ignas
> 



-- 
Johannes Passing - http://int3.de/
Date:Thu, 09 Aug 2007 18:44:45 +0200   Author:  

Google
 
Web dotnetnewsgroup.com


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