Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / December 2005

Tip: Looking for answers? Try searching our database.

COM and Remoting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rogério Manente - 26 Dec 2005 14:33 GMT
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
manente@gmail.com
Nicholas Paldino [.NET/C# MVP] - 26 Dec 2005 14:59 GMT
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.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

>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
[quoted text clipped - 17 lines]
> Rogério Manente
> manente@gmail.com
Rogério Manente - 27 Dec 2005 15:53 GMT
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

> Rogerio,
>
[quoted text clipped - 30 lines]
>> Rogério Manente
>> manente@gmail.com
Willy Denoyette [MVP] - 26 Dec 2005 15:25 GMT
>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
[quoted text clipped - 17 lines]
> Rogério Manente
> manente@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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.