ReactOS
0.4.16-dev-2522-g97cc325
precomp.h
Go to the documentation of this file.
1
/*
2
* COPYRIGHT: See COPYING in the top level directory
3
* PROJECT: ReactOS shutdown/logoff utility
4
* PURPOSE: Precompiled header
5
*/
6
7
#pragma once
8
9
/* INCLUDES ******************************************************************/
10
11
#include <stdarg.h>
12
13
#include <
windef.h
>
14
#include <
winbase.h
>
15
#include <
winreg.h
>
16
#include <
winuser.h
>
17
18
#include <
conutils.h
>
19
20
#include "
resource.h
"
21
22
/* DEFINES *******************************************************************/
23
24
#define MAX_MESSAGE_SIZE 512
25
#define MAX_MAJOR_CODE 256
26
#define MAX_MINOR_CODE 65536
27
#define MAX_TIMEOUT 315360000
28
29
/* Reason Code List */
30
typedef
struct
_REASON
31
{
32
LPWSTR
prefix
;
33
int
major
;
34
int
minor
;
35
DWORD
flag
;
36
}
REASON
, *
PREASON
;
37
38
/* Used to determine how to shutdown the system. */
39
struct
CommandLineOptions
40
{
41
BOOL
abort
;
42
BOOL
force
;
43
BOOL
logoff
;
44
BOOL
restart
;
45
BOOL
shutdown
;
46
BOOL
document_reason
;
47
BOOL
hibernate
;
48
DWORD
shutdown_delay
;
49
LPWSTR
remote_system
;
50
LPWSTR
message
;
51
DWORD
reason
;
52
BOOL
show_gui
;
53
};
54
55
extern
const
DWORD
defaultReason
;
56
57
/* PROTOTYPES *****************************************************************/
58
59
/* misc.c */
60
DWORD
ParseReasonCode
(
LPCWSTR
);
61
VOID
DisplayError
(
DWORD
dwError);
62
63
/* gui.c */
64
BOOL
ShutdownGuiMain
(
struct
CommandLineOptions
opts);
REASON
struct _REASON REASON
defaultReason
const DWORD defaultReason
Definition:
misc.c:13
PREASON
struct _REASON * PREASON
ParseReasonCode
DWORD ParseReasonCode(LPCWSTR)
Definition:
misc.c:55
DisplayError
VOID DisplayError(DWORD dwError)
Definition:
logoff.c:33
ShutdownGuiMain
BOOL ShutdownGuiMain(struct CommandLineOptions opts)
Definition:
gui.c:45
conutils.h
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
void
Definition:
nsiface.idl:2307
CommandLineOptions
Definition:
precomp.h:40
CommandLineOptions::logoff
BOOL logoff
Definition:
precomp.h:43
CommandLineOptions::remote_system
LPWSTR remote_system
Definition:
precomp.h:49
CommandLineOptions::hibernate
BOOL hibernate
Definition:
precomp.h:47
CommandLineOptions::reason
DWORD reason
Definition:
precomp.h:51
CommandLineOptions::shutdown
BOOL shutdown
Definition:
precomp.h:45
CommandLineOptions::message
LPWSTR message
Definition:
precomp.h:50
CommandLineOptions::show_gui
BOOL show_gui
Definition:
precomp.h:52
CommandLineOptions::document_reason
BOOL document_reason
Definition:
precomp.h:46
CommandLineOptions::force
BOOL force
Definition:
precomp.h:42
CommandLineOptions::restart
BOOL restart
Definition:
precomp.h:44
CommandLineOptions::shutdown_delay
DWORD shutdown_delay
Definition:
precomp.h:48
CommandLineOptions::abort
BOOL abort
Definition:
precomp.h:41
_REASON
Definition:
precomp.h:31
_REASON::major
int major
Definition:
precomp.h:33
_REASON::flag
DWORD flag
Definition:
precomp.h:35
_REASON::prefix
LPWSTR prefix
Definition:
precomp.h:32
_REASON::minor
int minor
Definition:
precomp.h:34
resource.h
winbase.h
windef.h
winreg.h
winuser.h
LPCWSTR
const WCHAR * LPCWSTR
Definition:
xmlstorage.h:185
LPWSTR
WCHAR * LPWSTR
Definition:
xmlstorage.h:184
base
applications
shutdown
precomp.h
Generated on Tue Mar 31 2026 06:16:26 for ReactOS by
1.9.6