Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Any body know error 1053 while starting service.

Any body know error 1053 while starting service.

Scheduled Pinned Locked Moved C / C++ / MFC
helpcomquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    harinath
    wrote on last edited by
    #1

    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

    H A 2 Replies Last reply
    0
    • H harinath

      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

      H Offline
      H Offline
      harinath
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • H harinath

        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

        A Offline
        A Offline
        Anders Molin
        wrote on last edited by
        #3

        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!"

        H 1 Reply Last reply
        0
        • A Anders Molin

          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!"

          H Offline
          H Offline
          harinath
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups