Problems with service

Hello. I'm writing a little service.
Some information i've got from http://www.rsdn.ru/article/files/Classes/svcclass.xml

the service has been installed well, but when running
StartServiceCtrlDispatcher() returns "ERROR_FAILED_SERVICE_CONTROLLER_CONNECT" error

http://msdn.microsoft.com/en-us/library/ms686324(VS.85).aspx

how can i avoid it or why does it happen?
ok, how to run a service if i have successfully installed it like WorkService.exe -install ?
closed account (S6k9GNh0)
This error is returned if the program is being run as a console application rather than as a service. If the program will be run as a console application for debugging purposes, structure it such that service-specific code is not called when this error is returned.
wow, thanks! i can read msdn by myself)
i don't get how to avoid it?

i've downloaded a service http://www.rsdn.ru/article/files/Classes/svcclass/worksvc.zip
Topic archived. No new replies allowed.