My application installs a virtual printer driver.
On some users' systems I need to restart the printer spooler because functions like OpenPrinter return RPC_S_SERVER_UNAVAILABLE (text is "The RPC server is unavailable."), which means the spooler has stopped working.
I try to do that by calling "net start spooler" with CreateProcess:
PROCESS_INFORMATION pi = { 0 };
STARTUPINFO si = { sizeof(si) };
// later
CreateProcess(0, "net start spooler", 0, 0, 0, 0, 0, 0, &si, &pi );
On some users' systems this works, but on others it fails with exit code 2, and GetLastError returns ERROR_NO_MORE_FILES (text is "There are no more files.").
Does anyone know what ERROR_NO_MORE_FILES would mean in this case?