COM and Remoting

  • Thread starter Thread starter Nicholas Paldino [.NET/C# MVP]
  • Start date Start date
N

Nicholas Paldino [.NET/C# MVP]

Rogerio,

My initial guess is that the object is an STA object, meaning that calls
have to be marshaled correctly in the apartment it was created on. In
remoting, that most likely is not going to be the case.

In this case, I would recommend that you actually set up a thread
specifically for this component to run in. You would create it there, and
send messages to it (you should be running a message pump on an STA thread,
so you can do that).

Hope this helps.
 
Rogério Manente said:
I am having the following problem using 1.1 Framwork. I would like to know
it anyone had the same problem and if moving to 2.0 Framework solves the
problem!

I have a class A which uses a COM component (third party, so it can't be
changed). This A class comunicates with another another class, B. This is
a
bi-directional comunication (B calls a method of A which, then, calls a
method of the COM component).
Everything works fine until I the comunication between A and B is done
through remoting.

When B resides in an application server the comunication between A and B
works fine but when B calls a method of the COM component the system
hangs.
I have no idea of why this happens!

Thank you!

Rogério Manente
(e-mail address removed)

What kind of COM component is this? What are it's threading requirements
(STA/Free threaded...) and what are it's hosting requirements?. Is it
designed to run in a server context (note ActiveX components aren't!)

Willy.
 
I am having the following problem using 1.1 Framwork. I would like to know
it anyone had the same problem and if moving to 2.0 Framework solves the
problem!

I have a class A which uses a COM component (third party, so it can't be
changed). This A class comunicates with another another class, B. This is a
bi-directional comunication (B calls a method of A which, then, calls a
method of the COM component).
Everything works fine until I the comunication between A and B is done
through remoting.

When B resides in an application server the comunication between A and B
works fine but when B calls a method of the COM component the system hangs.
I have no idea of why this happens!

Thank you!

Rogério Manente
(e-mail address removed)
 
Thanks for you help Nicholas!
Just to see if I understood your sugestion right, I whould create a thread
in object A just for the COM component?
Do you know where I can find more informantion about that (a link to some
resource on the web?)

Thanks again!

Rogério Manente


Nicholas Paldino said:
Rogerio,

My initial guess is that the object is an STA object, meaning that
calls have to be marshaled correctly in the apartment it was created on.
In remoting, that most likely is not going to be the case.

In this case, I would recommend that you actually set up a thread
specifically for this component to run in. You would create it there, and
send messages to it (you should be running a message pump on an STA
thread, so you can do that).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Rogério Manente said:
I am having the following problem using 1.1 Framwork. I would like to know
it anyone had the same problem and if moving to 2.0 Framework solves the
problem!

I have a class A which uses a COM component (third party, so it can't be
changed). This A class comunicates with another another class, B. This is
a
bi-directional comunication (B calls a method of A which, then, calls a
method of the COM component).
Everything works fine until I the comunication between A and B is done
through remoting.

When B resides in an application server the comunication between A and B
works fine but when B calls a method of the COM component the system
hangs.
I have no idea of why this happens!

Thank you!

Rogério Manente
(e-mail address removed)
 
Back
Top