Calling a method in a object running in windows service

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a windows service written using ATL having a component inside it.Now
if I want to write a C# client for that ..I wanna know whether it is possible
using Remoting or Service controller class etc.
IF I write a COM based application for client I can use CoCreateInstanceEx
and instantiate it on the remote machine and access the component inside in
the service...

But how shud I go about it in C#...........I am very new to C#...

Thanks...
 
Jasleen,

You will have to use COM Interop which provides backwards compatibility to
let you leverage existing COM components (or new ones for that matter).
There are a couple of tools that will help you control this functionality
(tlbimp, and regasm). You can find two excellent tutorials on the MSDN for
doing just this. I have posted their URLs below.

Good Luck.

------------

http://msdn.microsoft.com/library/d.../html/vcwlkcominteroppart1cclienttutorial.asp - Client

http://msdn.microsoft.com/library/d.../html/vcwlkcominteroppart2cservertutorial.asp - Server

http://www.pinvoke.net/ - Great resource for PInvoke Signatures just in
case you need it.
 
Back
Top