Re: Can't my service running in the list of services
Quote:
Originally Posted by annalisa1976
We still call them NT services or just service applications ;) There are minor differences between 2000/NT such as [additional supported API calls: QueryServiceConfig2(...), EnumServiceStatusEx(...) and changes to behaviour of support api calls parameters]. But creating a service is still the same process [OpenSCManager(...)/CreateService(...)]
Are you still having problems?
Re: Can't my service running in the list of services
If you are still using that sample code then you simply need to pass it the -i switch to install the service as indicated before. Look at the CNTService::RegisterService(..) member function. If you are passing it the -d [debug] switch then you need to remove that, that does nothing to install your service and is just a shell that runs as a console app. You should follow the debugging techniques I posted [the link to msdn] for debugging your service app. Again windbg can be replaced with msdev as the executable for attaching to your service application. The only caveat is that you have to be aware that the SCM needs to be updated as to progress if you intended to debug service startup releated issues. Since your debugger is going to be freezing the threads in your service this can be an issue.
Re: Can't my service running in the list of services
great! This is the solution! I remove -d from program arguments and the service is visible in the list of service! :D
thank you VERY VERY VERY much, you've really helped me..
Many good things to you guy!
Bye, Annalisa