153 tp.PrivilegeCount = 1;
158 &
tp.Privileges[0].Luid))
#define ConInitStdStreams()
void ConResPrintf(FILE *fp, UINT nID,...)
void ConResPuts(FILE *fp, UINT nID)
BOOL ShutdownGuiMain(struct CommandLineOptions opts)
DWORD ParseReasonCode(LPCWSTR code)
#define IDS_ERROR_SHUTDOWN_REBOOT
#define IDS_ERROR_MAX_COMMENT_LENGTH
#define IDS_ERROR_HIBERNATE_ENABLED
#define IDS_ERROR_HIBERNATE
#define IDS_ERROR_SHUTDOWN
#define IDS_ERROR_RESTART
#define IDS_ERROR_TIMEOUT
static DWORD EnablePrivilege(LPCWSTR lpszPrivilegeName, BOOL bEnablePrivilege)
static DWORD ParseArguments(struct CommandLineOptions *pOpts, int argc, WCHAR *argv[])
BOOL WINAPI AbortSystemShutdownW(LPCWSTR lpMachineName)
BOOL WINAPI InitiateSystemShutdownExW(LPWSTR lpMachineName, LPWSTR lpMessage, DWORD dwTimeout, BOOL bForceAppsClosed, BOOL bRebootAfterShutdown, DWORD dwReason)
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 ERROR_INVALID_PARAMETER
#define GetCurrentProcess()
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
VOID DisplayError(DWORD dwError)
BOOLEAN WINAPI IsPwrHibernateAllowed(VOID)
BOOLEAN WINAPI SetSuspendState(BOOLEAN Hibernate, BOOLEAN ForceCritical, BOOLEAN DisableWakeEvent)
DWORD WINAPI GetLastError(void)
#define ERROR_NOT_ALL_ASSIGNED
#define ERROR_INVALID_DATA
#define SE_REMOTE_SHUTDOWN_NAME
#define MAX_SHUTDOWN_TIMEOUT
BOOL WINAPI ExitWindowsEx(_In_ UINT, _In_ DWORD)
#define TOKEN_ADJUST_PRIVILEGES
#define SE_PRIVILEGE_ENABLED