|
|
|
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:
|
|
|