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. Service runs on XP and WIn2003 but not on Win2000

Service runs on XP and WIn2003 but not on Win2000

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 3 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.
  • K Offline
    K Offline
    Kri5
    wrote on last edited by
    #1

    Anyone has a hint as to why a service might start successfully on WinXP and Win2003 machines, but not on Win2000 machines?

    G 1 Reply Last reply
    0
    • K Kri5

      Anyone has a hint as to why a service might start successfully on WinXP and Win2003 machines, but not on Win2000 machines?

      G Offline
      G Offline
      Graham Bradshaw
      wrote on last edited by
      #2

      How do you define "successfully"? First thought is that you are using an API function that is only supported in XP or W2K3.

      K 1 Reply Last reply
      0
      • G Graham Bradshaw

        How do you define "successfully"? First thought is that you are using an API function that is only supported in XP or W2K3.

        K Offline
        K Offline
        Kri5
        wrote on last edited by
        #3

        Successfully as in starts up, runs, and keeps running until i decide to stop it. On Win2000 it displays that infamous message box saying that the service cannot start in a timely fashion.

        B 1 Reply Last reply
        0
        • K Kri5

          Successfully as in starts up, runs, and keeps running until i decide to stop it. On Win2000 it displays that infamous message box saying that the service cannot start in a timely fashion.

          B Offline
          B Offline
          Blake Miller
          wrote on last edited by
          #4

          My first rule of writing services - start a ssecnd thread as quickly as possible, and do all your REAL work in the second thread. Leave the primary thread to report status back to the service control handler and to respond to the service requests. You probably are doing everything in a signle thread, and on Windows 2000 something is taking longer than the 6 or 10 seconds Win2K is willing to wait before declaring your service 'stuck'.

          K 1 Reply Last reply
          0
          • B Blake Miller

            My first rule of writing services - start a ssecnd thread as quickly as possible, and do all your REAL work in the second thread. Leave the primary thread to report status back to the service control handler and to respond to the service requests. You probably are doing everything in a signle thread, and on Windows 2000 something is taking longer than the 6 or 10 seconds Win2K is willing to wait before declaring your service 'stuck'.

            K Offline
            K Offline
            Kri5
            wrote on last edited by
            #5

            Your first rule also happens to be my rule as well ;) Actually it is a service pack issue. On some Win2K's it was working ok, but on some others it wasn't. The ones on which it failed did not have SP4 installed. We're still investigating it further...thanks for stopping by and help just the same!

            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