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. Register a Serivce in Win2000

Register a Serivce in Win2000

Scheduled Pinned Locked Moved C / C++ / MFC
3 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.
  • M Offline
    M Offline
    Mr_Byte
    wrote on last edited by
    #1

    I need my program to register itself as a service I tried (RegisteSrviceProcess) but it doesn't work with Win2000 :( so I need a way to do it (way that works with Win2000) thanks in advance MR.Byte

    A 1 Reply Last reply
    0
    • M Mr_Byte

      I need my program to register itself as a service I tried (RegisteSrviceProcess) but it doesn't work with Win2000 :( so I need a way to do it (way that works with Win2000) thanks in advance MR.Byte

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

      CreateService(); - Anders Money talks, but all mine ever says is "Goodbye!"

      A 1 Reply Last reply
      0
      • A Anders Molin

        CreateService(); - Anders Money talks, but all mine ever says is "Goodbye!"

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

        A small update... Something like:

            schService = CreateService(
                schSCManager,               // SCManager database
                TEXT(SZSERVICENAME),        // name of service
                TEXT(SZSERVICEDISPLAYNAME), // name to display
                SERVICE\_ALL\_ACCESS,         // desired access
                SERVICE\_WIN32\_OWN\_PROCESS,  // service type
                SERVICE\_DEMAND\_START,       // start type
                SERVICE\_ERROR\_NORMAL,       // error control type
                szPath,                     // service's binary
                NULL,                       // no load ordering group
                NULL,                       // no tag identifier
                TEXT(SZDEPENDENCIES),       // dependencies
                NULL,                       // LocalSystem account
                NULL);                      // no password
        

        - Anders Money talks, but all mine ever says is "Goodbye!"

        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