Difference between Service and Console Application
-
Hai, I have a small query regrading the application ie what is the difference between Service and Console Application. Regards, Chinna
Not as much as you would think. Think of it this way, a Service is a Console application except that it has different security settings and is started by the Operating System rather than a user (normally anyway). A Service should have NO user interface at all, where as a Console application could output text for the user to read. The SCM (Service Control Manager) basically tells a Service when to START, STOP, PAUSE or CONTINUE, etc.
Jonathan Wilkes Darka [Xanya.net]
-
Not as much as you would think. Think of it this way, a Service is a Console application except that it has different security settings and is started by the Operating System rather than a user (normally anyway). A Service should have NO user interface at all, where as a Console application could output text for the user to read. The SCM (Service Control Manager) basically tells a Service when to START, STOP, PAUSE or CONTINUE, etc.
Jonathan Wilkes Darka [Xanya.net]
Jonathan [Darka] wrote:
hink of it this way, a Service is a Console application except that it has different security settings and is started by the Operating System rather than a user (normally anyway).
sorry for correcting you sir.. you can make gui based service too
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you
-
Jonathan [Darka] wrote:
hink of it this way, a Service is a Console application except that it has different security settings and is started by the Operating System rather than a user (normally anyway).
sorry for correcting you sir.. you can make gui based service too
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you
ThatsAlok wrote:
sorry for correcting you sir.. you can make gui based service too
Sorry to correct you :-) I said "A Service should have NO user interface at all", i.e SHOULD have no user interface.
Jonathan Wilkes Darka [Xanya.net]
-
Jonathan [Darka] wrote:
hink of it this way, a Service is a Console application except that it has different security settings and is started by the Operating System rather than a user (normally anyway).
sorry for correcting you sir.. you can make gui based service too
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you
Services themselves typically do not have a UI. Perhaps you are thinking of the SCM or a SCP.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
Hai, I have a small query regrading the application ie what is the difference between Service and Console Application. Regards, Chinna
A service is *most of the time* a console application. But not mandatory. This does not mean necessary that the service displays an user interface, but if the project was compiled with /subsystem:console or /subsystem:windows. Other than this, a service application is registered in system as such, accepts certain control codes, and is managed by SCM (Service Control Manager). One can write a service that can interact with the desktop and even display an user interface (although not recommended, sure), not only because a service *must* be a console application, but because this kind of application is intended to be not interactive, system managed, and perform a continuous "service" - hence the name - without user interface. However, a service can create hidden windows for special purpose messages, or use functions that require a message loop. Even COM uses special purpose windows from what I know, so indirectly creating, say, CoCreateInstance, in a service does not makes a service "window free". A console application is what its name says, just an application compiled for and executed in a console window. Nothing more.
Nuclear launch detected