Go to the source code of this file.
◆ ShutdownSystem()
Shuts down the system.
- Returns
- true if everything went well, false if there was a problem while trying to shut down the system.
Definition at line 16 of file shutdown.cpp.
17{
20
22 {
24 return false;
25 }
26
27
29 {
30 StringOut(
"LookupPrivilegeValue failed\n");
31 return false;
32 }
33
34
37
39 {
40 StringOut(
"AdjustTokenPrivileges failed\n");
41 return false;
42 }
43
44
46 {
48 return false;
49 }
50
51 return true;
52}
BOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName, LPCWSTR lpPrivilegeName, PLUID lpLuid)
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
#define GetCurrentProcess()
string StringOut(const string &String, bool forcePrint=true)
BOOL WINAPI ExitWindowsEx(_In_ UINT, _In_ DWORD)
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET * Privileges
#define TOKEN_ADJUST_PRIVILEGES
#define SE_PRIVILEGE_ENABLED
Referenced by wmain().