Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Easy, elegant and powerful .NET


At the end of an introductory course on distributed application with .NET, a programmer made this question: "How can I use a VB 6 COM component from a remote .NET app?" Lucky me, just yesterday we were reviewing .NET Remoting (following Ingo Rammer's excellent Advanced .NET Remoting), so I proposed this solution:

  1. Create an RCW for the COM component by adding a reference to the COM object in the VS.NET project
  2. Create a .NET Remoting service that simple invokes the RCW and returns the result (3 lines)
  3. Expose the service with a small .NET Remoting server (cut & paste a few lines)
  4. Consume the service from the remote .NET client app (4 lines of code or so)

Probably obvious stuff for many of you, but what amazes me is that the full exercise was done and understood by people that last week knew nothing about .NET distributed applications. From here on, the whole class started to play with all kinds of distributed scenarios and possibilities, meanwhile I just sat enjoying the whole thing. At times like this I totally agree with fellow RD Carl Franklin when he says that .NET Rocks!

 

 

No Comments