471,317 Members | 1,792 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

COM and Remoting

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
ma*****@gmail.com
Dec 26 '05 #1
3 1093
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]
- mv*@spam.guard.caspershouse.com

"Rogério Manente" <ma*****@gmail.com> wrote in message
news:Oq**************@TK2MSFTNGP09.phx.gbl...
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
ma*****@gmail.com

Dec 26 '05 #2

"Rogério Manente" <ma*****@gmail.com> wrote in message
news:Oq**************@TK2MSFTNGP09.phx.gbl...
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
ma*****@gmail.com


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.

Dec 26 '05 #3
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 [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> escreveu
na mensagem news:uQ**************@TK2MSFTNGP10.phx.gbl...
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]
- mv*@spam.guard.caspershouse.com

"Rogério Manente" <ma*****@gmail.com> wrote in message
news:Oq**************@TK2MSFTNGP09.phx.gbl...
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
ma*****@gmail.com


Dec 27 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Raju Joseph | last post: by
reply views Thread by Kristian Reukauff | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.