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. Product Lifecycle
  3. Free Tools
  4. starting and stopping services on vista

starting and stopping services on vista

Scheduled Pinned Locked Moved Free Tools
2 Posts 2 Posters 2 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.
  • J Offline
    J Offline
    jkirkerx
    wrote on last edited by
    #1

    Well my code works in XP, and I'm joined to a domain contoller. Vista is alot different, just can't create the ssp (SERVICE_STATUS_PROCESS), get a errorCode 5.

    hSCManager = OpenSCManager(
    NULL,
    NULL,
    SC_MANAGER_CONNECT
    );

    if ( hSCManager == NULL ) {
        errorCode = GetLastError();
        return false;
    }
    
    T 1 Reply Last reply
    0
    • J jkirkerx

      Well my code works in XP, and I'm joined to a domain contoller. Vista is alot different, just can't create the ssp (SERVICE_STATUS_PROCESS), get a errorCode 5.

      hSCManager = OpenSCManager(
      NULL,
      NULL,
      SC_MANAGER_CONNECT
      );

      if ( hSCManager == NULL ) {
          errorCode = GetLastError();
          return false;
      }
      
      T Offline
      T Offline
      TheGreatAndPowerfulOz
      wrote on last edited by
      #2

      This is the worng forum for this question. However, Error 5 usually means access violation. My guess then is that your login credentials don't have rights to the SCManager. There is a way to escalate your priviledges, but that's beyond my skills and certainly beyond this forum.

      If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
      You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering” - Wernher von Braun

      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