I launch ‘net stop spooler’ using CreateProcess from my C++ program. It fails and the exit code is 259.
Anyone know what that error code means? Also if someone can give me a link to some documentation about the possible error codes for this command and their meanings I’d much appreciate it.
259 is not an error rather its
STILL_ACTIVEwhichGetExitCodeProcessreturns if the process handle you pass it relates to a process that has not terminated (and so has no exit code).If you want to wait for it to exit before getting the exit code, call
WaitForSingleObject()on the process handle.