32 &
tp.Privileges[0].Luid);
35 tp.PrivilegeCount = 1;
56#ifdef NT_INITIATE_POWERACTION_IMPLEMENTED
83#ifdef NT_INITIATE_POWERACTION_IMPLEMENTED
static DWORD EnablePrivilege(LPCWSTR lpszPrivilegeName, BOOL bEnablePrivilege)
VOID ShutDown_Reboot(VOID)
VOID ShutDown_StandBy(VOID)
VOID ShutDown_SwitchUser(VOID)
VOID ShutDown_EjectComputer(VOID)
VOID ShutDown_Hibernate(VOID)
VOID ShutDown_PowerOff(VOID)
VOID ShutDown_LogOffUser(VOID)
VOID ShutDown_Disconnect(VOID)
VOID ShutDown_LockComputer(VOID)
#define NT_SUCCESS(StatCode)
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()
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
VOID ShowWin32Error(IN DWORD dwError)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
NTSTATUS NTAPI NtShutdownSystem(IN SHUTDOWN_ACTION Action)
NTSTATUS NTAPI NtInitiatePowerAction(IN POWER_ACTION SystemAction, IN SYSTEM_POWER_STATE MinSystemState, IN ULONG Flags, IN BOOLEAN Asynchronous)
NTSTATUS NTAPI NtSetSystemPowerState(IN POWER_ACTION SystemAction, IN SYSTEM_POWER_STATE MinSystemState, IN ULONG Flags)
EXTINLINE BOOL WINAPI LockWorkStation(VOID)
DWORD WINAPI GetLastError(void)
BOOL WINAPI ExitWindowsEx(_In_ UINT, _In_ DWORD)
SHORT WINAPI GetKeyState(_In_ int)
#define TOKEN_ADJUST_PRIVILEGES
#define SE_PRIVILEGE_ENABLED