Any body know error 1053 while starting service.
-
Hi, I wrote an application to make an exe a service. it is a console based application(with a simple menu to create, delete, start, stop etc of service). I can see my service added to services but when i try to start that service through my program or even manually I am getting 1053 error can any body know why this error comes? please help me yaar. if you want i can give the code also. thanks in advance Harinath Reddy HOneywell Technology Solutions Lab, Bangalore, India-560076 harinath@vandemataram.com
-
Hi, I wrote an application to make an exe a service. it is a console based application(with a simple menu to create, delete, start, stop etc of service). I can see my service added to services but when i try to start that service through my program or even manually I am getting 1053 error can any body know why this error comes? please help me yaar. if you want i can give the code also. thanks in advance Harinath Reddy HOneywell Technology Solutions Lab, Bangalore, India-560076 harinath@vandemataram.com
my purpose is to start a service which will put an icon in system tray. and I already explained the problem. now i did minor modification. i added SERVICE_INTERACTIVE_PROCESS also for the 5th parameter of Create parameter.
SC_HANDLE schService; schService = CreateService( schSCManager, // SCManager database lpszServiceName, // name of service lpszDisplayName, // service name to display SERVICE_ALL_ACCESS, // desired access SERVICE_WIN32_OWN_PROCESS| SERVICE_INTERACTIVE_PROCESS, // service type SERVICE_DEMAND_START, // start type SERVICE_ERROR_NORMAL, // error control type lpszBinaryPathName, // service's binary NULL, // no load ordering group NULL, // no tag identifier NULL, // no dependencies NULL, // LocalSystem account NULL); // no password
now it seems service is starting (i can see icon on system tray but after a minute it is diappearing and i am getting the same old error (1053) same thing through program and manually also. any more ideas pls Harinath Reddy HOneywell Technology Solutions Lab, Bangalore, India-560076 harinath@vandemataram.com -
Hi, I wrote an application to make an exe a service. it is a console based application(with a simple menu to create, delete, start, stop etc of service). I can see my service added to services but when i try to start that service through my program or even manually I am getting 1053 error can any body know why this error comes? please help me yaar. if you want i can give the code also. thanks in advance Harinath Reddy HOneywell Technology Solutions Lab, Bangalore, India-560076 harinath@vandemataram.com
1053 means The service did not respond to the start or control request in a timely fashion. You have to report to the SCM that your service is up and running using the SetServiceStatus() function... If a service don't do that, the SCM think it hangs and kill it. - Anders Money talks, but all mine ever says is "Goodbye!"
-
1053 means The service did not respond to the start or control request in a timely fashion. You have to report to the SCM that your service is up and running using the SetServiceStatus() function... If a service don't do that, the SCM think it hangs and kill it. - Anders Money talks, but all mine ever says is "Goodbye!"
well, Thank you very much for your help. I understood the logic. But where should i do that? let me put the question in other way. see the following is my code for starting the service (i took it from msdn)
DWORD StartSampleService(SC_HANDLE schSCManager) { SERVICE_STATUS ssStatus; DWORD dwOldCheckPoint; DWORD dwStartTickCount; DWORD dwWaitTime; DWORD dwStatus; SC_HANDLE schService; CString cstrMessage,cstrCaption; cstrCaption="Service Message"; char ServiceName[50]; LPCTSTR lpszServiceName; cout<<"Enter the Name of the service: "; cin>>ServiceName; lpszServiceName=(LPCTSTR)ServiceName; schService = OpenService( schSCManager, // SCM database lpszServiceName, // service name Here I gave my sample service, Please change this SERVICE_ALL_ACCESS); //according to your wish.. see that the service is in not running currently. if (schService == NULL) { cstrMessage="OpenService"; // MessageBox(NULL,cstrMessage,cstrCaption,NULL); cout<<"Error code "< 10000 ) dwWaitTime = 10000; Sleep( d