Windows Service or not

  • Thread starter Thread starter Anony
  • Start date Start date
A

Anony

Hi All,

After trying the Windows Service sample from MSDN, I don't get what the
windows service class is better than a class handling and raising events
itself.
If using the System.ServiceProcess.ServiceBase, I can't get events in other
classes, but only in Event Log.

I'm trying to build a server class. Please advise me if I should use a
service class or not.

Thanks for any tips,
Anony
 
Hi,

The protocol used in communication between the Service Control Manager and a
Windows Service is quite complex. Its implementation therefore is not that
simple and straightforward. The ServiceBase class already implements this
protocol as well as, I suppose, several other helper functions, enabling you
to concentrate on the functionality that will be valuable for service users.

It is also unclear to me how events in other classes and Event Log entries
are related in your post. These are two very different beasts. What you are
trying to accomplish?
 
Thanks Dmitriy for the explanation.

I'm trying to biuild a class that raises lots events.
Other classes need the events to process something.

Someone gave me an idea to use the Windows Service. I found it not very
useful, but have doubt if I missed something.

Kind regard,
Anony



Dmitriy Lapshin said:
Hi,

The protocol used in communication between the Service Control Manager and a
Windows Service is quite complex. Its implementation therefore is not that
simple and straightforward. The ServiceBase class already implements this
protocol as well as, I suppose, several other helper functions, enabling you
to concentrate on the functionality that will be valuable for service users.

It is also unclear to me how events in other classes and Event Log entries
are related in your post. These are two very different beasts. What you are
trying to accomplish?

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Anony said:
Hi All,

After trying the Windows Service sample from MSDN, I don't get what the
windows service class is better than a class handling and raising events
itself.
If using the System.ServiceProcess.ServiceBase, I can't get events in other
classes, but only in Event Log.

I'm trying to build a server class. Please advise me if I should use a
service class or not.

Thanks for any tips,
Anony
 
Back
Top