starting and stopping services on vista
-
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; }
-
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; }
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