Quote:
Originally posted by Codeplug
Use this instead: printf("Failed, ec=%d", GetLastError());
Does the user that your process is running under have Admin rights?
Read the remarks section carefully in the OpenSCManager() reference.
gg
Heh..it turned out to be something really stupid, and the error code that you suggested helped figure it out. Turns out that earlier the program did create the service..I just didn't add a startservice function. The error that it was giving me was 1073...according to MSDN Service name already exists.