vetri
asked on
NT Service start fails
I have a VC++ console application (NT service enabled). It has been installed successfully as a service. When try to launch it from the control panel, I got the error "Error # 1067. The process terminated unexpectedly".
Can somebody tell me, whythis happens so ?
Thanx,
/vetri
Can somebody tell me, whythis happens so ?
Thanx,
/vetri
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What is happening is that the Services tool in the Conrtol Panel does not have a 'refresh' so the buttons represent only the operations on the service done through it (start, stop, pause...)
they become aware of it when you push a button and discover that its not the right state.
What you could do, if you MUST exit from within the process, do it calling the handler function with Stop flag in order to do it cleanly.
it will still not notify the Services user interface, but the message will be more subtle (something like 'The process is already stopped).