Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
If the named process is running under another user, then OpenProcess must be called using a process token which includes SeDebugPriviledge. To set SeDebugPriviledge the caller must have elevated privileges. If cannot set SeDebugPriviledge, log a message and continue. Let caller handle a reboot request rather than returning a failure.
Tested these changes on Win 7 SP1 x64 Prof, Win 8 Prof x64, Win 7 SP1 Ultimate N German x64, Win 7 SP1 Ultimate N Korean x86, WS2008R2 SP1 Standard, WS2012R2 Korean.