I am trying to install an application as a service. I have managed to install itself, it can be seen in services.msc. However, for some reason I cannot start the service, GetLastError keeps returning 1053 (ERROR_SERVICE_REQUEST_TIMEOUT The service did not respond to the start or control request in a timely fashion.).
Here is the part that tries to start the service:
Any tips and help would be appreciated.Code:if(StartService(OpenService(OpenSCManager( 0, 0, SC_MANAGER_CONNECT),"Test Service",SERVICE_ALL_ACCESS),0, NULL) != 0) printf("Started Successfully!\n"); else printf("Error->[%d]\n", GetLastError());