Because of some of the changes and reasons for the project, you need to create a daemon for the data processing as a Windows service, and run the following command to create the success:
SC create "MyApp Service Name" binpath= "d:/mathxh/project/sockets
Ervice/trunk/myapp/win32/release/myapp.exe "start= Auto
But because my app is a non-service (non-service) executable, I failed to run it, throwing the following error:
Error 1053:the Service did not respond to the start or control request in a timely fashion
Traced back to its cause, the original need for a program, written as a service executable program to run correctly.
Of course, there are tools that let non-service programs run as Windows service, such as nssm,http://nssm.cc/
References
HTTPS://MSDN.MICROSOFT.COM/EN-US/LIBRARY/40XE80WX (v=vs.80). aspx
Http://stackoverflow.com/questions/3582108/create-windows-service-from-executable
Https://code.msdn.microsoft.com/windowsapps/CppWindowsService-cacf4948/sourcecode?fileId=21604&pathId= 2141735795
Create your own C + + program as a Windows service