Confused Beginner Trying To Migrate From COM

  • Thread starter Thread starter ianLOSEatTHEaltispartnersCAPS.com
  • Start date Start date
I

ianLOSEatTHEaltispartnersCAPS.com

Hello,

First and foremost appols for what must be the n-billionth "new
programmer" post you've had but if someone could see their way clear to
helping me, or just recomending some reading I would be most grateful.

I'm trying to come forward from the age of C++ services and COM
object interfaces into the sparkling new .NET world. Could you explain
to me how I can accomplish my favourite old task of taking a service
which maintains internal variables as a result of its deliberations, and
making some of its data access methods available to other .NET
applications such as ASP webpages.

Ian

"There's no such thing as a stupid question. Only stupid people asking
them!"
 
Ian,

If you want the path of least resistance, then I would recommend that
you use COM interop. If you have a service which is accessible through COM
objects, then you should just set a reference to the COM objects that you
would use on the client side (through VS.NET, or by using the TLBIMP program
to create a Runtime Callable Wrapper which can be referenced) and then make
the same calls that you would make normally.

Assuming that you don't want to change existing service code, this is
probably the best way to currently go.

Is what I detailed the way you have it setup? Are you using DCOM, or
anything of that nature?
 
All of the existing systems are working, I'm actually trying to get
the methodology down for making a new service from scratch as my old
friend the INSERT OBJECT -> COM OBJECT has vanished and I'm not entirely
au fait with how I go about my usual trickery, being:

-Make service class.
-Create static member to get ref of current running service class
-Create COM object with methods to access that static member
-Instantiate COM object from ASP, call method to get ref to running
service class.
-Call monitoring functions on service class to find out why the server
suddenly burst into flame and is playing "O Fortuna!" repeatedly.

A description of a more elegant C# solution would, of course, be
eagerly accepted. The only values I would need to extract from the
service would be Strings, at the worst long ones of XML. So no object
serialisation or by reference concerns are needed.

Thanks for your time,

Ian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top