Hi Buddies,
Can any one please help me to understand how Windows Service application is handled in Service manager
Please help.
Regards,
Vinu.P.K
Hi Buddies,
Can any one please help me to understand how Windows Service application is handled in Service manager
Please help.
Regards,
Vinu.P.K
Windows Service application handled in Service manager.
Yole
The Windows Service Control Manager (SCM) merely runs special executable that it has been informed about. "Special" in that they have a specific set of DLL entry-points to be informed of such things like initialization and termination and to provide status.
As you noted, the SCM is informed of service executables by placing their location, name and parameters into the registry.
Upon service registration or boot-up, the SCM simply looks for the main entry point named "ServiceMain". The executable is then responsible for communicating back to the SCM that it wants to register itself and provide initialization status (if initialization will take some time). Part of the registration process is registering a control handler function with the SCM so the SCM can communicate with the service (for things like stopping, continuing, pausing, etc.)
All of this, of course, is abstracted away in .NET so you don't have to worry about it. Essentially, in .NET you simply create a Windows Service application and respond the various events that are inherited from ServiceBase (like OnStart and OnStop). There's some good MSDN articles like Windows Services: New Base Classes in .NET Make Writing a Windows Services Easy and Introduction to Windows Service Applications that are good places to start if you want to write a Windows Service in .NET.
Was there something specific you wanted to know
gokaraju
Oh... Ritchie :)
what I mean is, how "Windows service manager" detects and executes a .net Windows services installed using Installer also, working background(where the service is running) etc..
I read that, the Service Installer object writes information to registry on installation—specifically, to a sub key under the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services key.
Can you please explain more
Regards,
Vinu.P.K
ShaktiSingh
aspx
Try this link.
A good tutorial for Windows service beginners.
http://www.codeproject.com/dotnet/simplewindowsservice.asp.
BalaVikram.
[KINGCOBRA]