1 #![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)]
2 #[cfg(feature = "Win32_Foundation")]
3 #[inline]
AbortSystemShutdownA<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>>(lpmachinename: Param0) -> super::super::Foundation::BOOL4 pub unsafe fn AbortSystemShutdownA<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>>(lpmachinename: Param0) -> super::super::Foundation::BOOL {
5 #[cfg(windows)]
6 {
7 #[link(name = "windows")]
8 extern "system" {
9 fn AbortSystemShutdownA(lpmachinename: super::super::Foundation::PSTR) -> super::super::Foundation::BOOL;
10 }
11 ::std::mem::transmute(AbortSystemShutdownA(lpmachinename.into_param().abi()))
12 }
13 #[cfg(not(windows))]
14 unimplemented!("Unsupported target OS");
15 }
16 #[cfg(feature = "Win32_Foundation")]
17 #[inline]
AbortSystemShutdownW<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(lpmachinename: Param0) -> super::super::Foundation::BOOL18 pub unsafe fn AbortSystemShutdownW<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(lpmachinename: Param0) -> super::super::Foundation::BOOL {
19 #[cfg(windows)]
20 {
21 #[link(name = "windows")]
22 extern "system" {
23 fn AbortSystemShutdownW(lpmachinename: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL;
24 }
25 ::std::mem::transmute(AbortSystemShutdownW(lpmachinename.into_param().abi()))
26 }
27 #[cfg(not(windows))]
28 unimplemented!("Unsupported target OS");
29 }
30 #[cfg(feature = "Win32_Foundation")]
31 #[inline]
CheckForHiberboot<'a, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOLEAN>>(phiberboot: *mut super::super::Foundation::BOOLEAN, bclearflag: Param1) -> u3232 pub unsafe fn CheckForHiberboot<'a, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOLEAN>>(phiberboot: *mut super::super::Foundation::BOOLEAN, bclearflag: Param1) -> u32 {
33 #[cfg(windows)]
34 {
35 #[link(name = "windows")]
36 extern "system" {
37 fn CheckForHiberboot(phiberboot: *mut super::super::Foundation::BOOLEAN, bclearflag: super::super::Foundation::BOOLEAN) -> u32;
38 }
39 ::std::mem::transmute(CheckForHiberboot(::std::mem::transmute(phiberboot), bclearflag.into_param().abi()))
40 }
41 #[cfg(not(windows))]
42 unimplemented!("Unsupported target OS");
43 }
44 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
45 #[repr(transparent)]
46 pub struct EXIT_WINDOWS_FLAGS(pub u32);
47 pub const EWX_HYBRID_SHUTDOWN: EXIT_WINDOWS_FLAGS = EXIT_WINDOWS_FLAGS(4194304u32);
48 pub const EWX_LOGOFF: EXIT_WINDOWS_FLAGS = EXIT_WINDOWS_FLAGS(0u32);
49 pub const EWX_POWEROFF: EXIT_WINDOWS_FLAGS = EXIT_WINDOWS_FLAGS(8u32);
50 pub const EWX_REBOOT: EXIT_WINDOWS_FLAGS = EXIT_WINDOWS_FLAGS(2u32);
51 pub const EWX_RESTARTAPPS: EXIT_WINDOWS_FLAGS = EXIT_WINDOWS_FLAGS(64u32);
52 pub const EWX_SHUTDOWN: EXIT_WINDOWS_FLAGS = EXIT_WINDOWS_FLAGS(1u32);
53 impl ::std::convert::From<u32> for EXIT_WINDOWS_FLAGS {
from(value: u32) -> Self54 fn from(value: u32) -> Self {
55 Self(value)
56 }
57 }
58 unsafe impl ::windows::runtime::Abi for EXIT_WINDOWS_FLAGS {
59 type Abi = Self;
60 type DefaultType = Self;
61 }
62 impl ::std::ops::BitOr for EXIT_WINDOWS_FLAGS {
63 type Output = Self;
bitor(self, rhs: Self) -> Self64 fn bitor(self, rhs: Self) -> Self {
65 Self(self.0 | rhs.0)
66 }
67 }
68 impl ::std::ops::BitAnd for EXIT_WINDOWS_FLAGS {
69 type Output = Self;
bitand(self, rhs: Self) -> Self70 fn bitand(self, rhs: Self) -> Self {
71 Self(self.0 & rhs.0)
72 }
73 }
74 impl ::std::ops::BitOrAssign for EXIT_WINDOWS_FLAGS {
bitor_assign(&mut self, rhs: Self)75 fn bitor_assign(&mut self, rhs: Self) {
76 self.0.bitor_assign(rhs.0)
77 }
78 }
79 impl ::std::ops::BitAndAssign for EXIT_WINDOWS_FLAGS {
bitand_assign(&mut self, rhs: Self)80 fn bitand_assign(&mut self, rhs: Self) {
81 self.0.bitand_assign(rhs.0)
82 }
83 }
84 impl ::std::ops::Not for EXIT_WINDOWS_FLAGS {
85 type Output = Self;
not(self) -> Self86 fn not(self) -> Self {
87 Self(self.0.not())
88 }
89 }
90 #[cfg(feature = "Win32_Foundation")]
91 #[inline]
ExitWindowsEx(uflags: EXIT_WINDOWS_FLAGS, dwreason: u32) -> super::super::Foundation::BOOL92 pub unsafe fn ExitWindowsEx(uflags: EXIT_WINDOWS_FLAGS, dwreason: u32) -> super::super::Foundation::BOOL {
93 #[cfg(windows)]
94 {
95 #[link(name = "windows")]
96 extern "system" {
97 fn ExitWindowsEx(uflags: EXIT_WINDOWS_FLAGS, dwreason: u32) -> super::super::Foundation::BOOL;
98 }
99 ::std::mem::transmute(ExitWindowsEx(::std::mem::transmute(uflags), ::std::mem::transmute(dwreason)))
100 }
101 #[cfg(not(windows))]
102 unimplemented!("Unsupported target OS");
103 }
104 #[cfg(feature = "Win32_Foundation")]
105 #[inline]
InitiateShutdownA<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>>(lpmachinename: Param0, lpmessage: Param1, dwgraceperiod: u32, dwshutdownflags: SHUTDOWN_FLAGS, dwreason: SHUTDOWN_REASON) -> u32106 pub unsafe fn InitiateShutdownA<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>>(lpmachinename: Param0, lpmessage: Param1, dwgraceperiod: u32, dwshutdownflags: SHUTDOWN_FLAGS, dwreason: SHUTDOWN_REASON) -> u32 {
107 #[cfg(windows)]
108 {
109 #[link(name = "windows")]
110 extern "system" {
111 fn InitiateShutdownA(lpmachinename: super::super::Foundation::PSTR, lpmessage: super::super::Foundation::PSTR, dwgraceperiod: u32, dwshutdownflags: SHUTDOWN_FLAGS, dwreason: SHUTDOWN_REASON) -> u32;
112 }
113 ::std::mem::transmute(InitiateShutdownA(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), ::std::mem::transmute(dwgraceperiod), ::std::mem::transmute(dwshutdownflags), ::std::mem::transmute(dwreason)))
114 }
115 #[cfg(not(windows))]
116 unimplemented!("Unsupported target OS");
117 }
118 #[cfg(feature = "Win32_Foundation")]
119 #[inline]
InitiateShutdownW<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(lpmachinename: Param0, lpmessage: Param1, dwgraceperiod: u32, dwshutdownflags: SHUTDOWN_FLAGS, dwreason: SHUTDOWN_REASON) -> u32120 pub unsafe fn InitiateShutdownW<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(lpmachinename: Param0, lpmessage: Param1, dwgraceperiod: u32, dwshutdownflags: SHUTDOWN_FLAGS, dwreason: SHUTDOWN_REASON) -> u32 {
121 #[cfg(windows)]
122 {
123 #[link(name = "windows")]
124 extern "system" {
125 fn InitiateShutdownW(lpmachinename: super::super::Foundation::PWSTR, lpmessage: super::super::Foundation::PWSTR, dwgraceperiod: u32, dwshutdownflags: SHUTDOWN_FLAGS, dwreason: SHUTDOWN_REASON) -> u32;
126 }
127 ::std::mem::transmute(InitiateShutdownW(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), ::std::mem::transmute(dwgraceperiod), ::std::mem::transmute(dwshutdownflags), ::std::mem::transmute(dwreason)))
128 }
129 #[cfg(not(windows))]
130 unimplemented!("Unsupported target OS");
131 }
132 #[cfg(feature = "Win32_Foundation")]
133 #[inline]
InitiateSystemShutdownA<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>, Param4: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>>(lpmachinename: Param0, lpmessage: Param1, dwtimeout: u32, bforceappsclosed: Param3, brebootaftershutdown: Param4) -> super::super::Foundation::BOOL134 pub unsafe fn InitiateSystemShutdownA<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>, Param4: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>>(lpmachinename: Param0, lpmessage: Param1, dwtimeout: u32, bforceappsclosed: Param3, brebootaftershutdown: Param4) -> super::super::Foundation::BOOL {
135 #[cfg(windows)]
136 {
137 #[link(name = "windows")]
138 extern "system" {
139 fn InitiateSystemShutdownA(lpmachinename: super::super::Foundation::PSTR, lpmessage: super::super::Foundation::PSTR, dwtimeout: u32, bforceappsclosed: super::super::Foundation::BOOL, brebootaftershutdown: super::super::Foundation::BOOL) -> super::super::Foundation::BOOL;
140 }
141 ::std::mem::transmute(InitiateSystemShutdownA(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), ::std::mem::transmute(dwtimeout), bforceappsclosed.into_param().abi(), brebootaftershutdown.into_param().abi()))
142 }
143 #[cfg(not(windows))]
144 unimplemented!("Unsupported target OS");
145 }
146 #[cfg(feature = "Win32_Foundation")]
147 #[inline]
InitiateSystemShutdownExA<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>, Param4: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>>( lpmachinename: Param0, lpmessage: Param1, dwtimeout: u32, bforceappsclosed: Param3, brebootaftershutdown: Param4, dwreason: SHUTDOWN_REASON, ) -> super::super::Foundation::BOOL148 pub unsafe fn InitiateSystemShutdownExA<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>, Param4: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>>(
149 lpmachinename: Param0,
150 lpmessage: Param1,
151 dwtimeout: u32,
152 bforceappsclosed: Param3,
153 brebootaftershutdown: Param4,
154 dwreason: SHUTDOWN_REASON,
155 ) -> super::super::Foundation::BOOL {
156 #[cfg(windows)]
157 {
158 #[link(name = "windows")]
159 extern "system" {
160 fn InitiateSystemShutdownExA(lpmachinename: super::super::Foundation::PSTR, lpmessage: super::super::Foundation::PSTR, dwtimeout: u32, bforceappsclosed: super::super::Foundation::BOOL, brebootaftershutdown: super::super::Foundation::BOOL, dwreason: SHUTDOWN_REASON) -> super::super::Foundation::BOOL;
161 }
162 ::std::mem::transmute(InitiateSystemShutdownExA(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), ::std::mem::transmute(dwtimeout), bforceappsclosed.into_param().abi(), brebootaftershutdown.into_param().abi(), ::std::mem::transmute(dwreason)))
163 }
164 #[cfg(not(windows))]
165 unimplemented!("Unsupported target OS");
166 }
167 #[cfg(feature = "Win32_Foundation")]
168 #[inline]
InitiateSystemShutdownExW<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>, Param4: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>>( lpmachinename: Param0, lpmessage: Param1, dwtimeout: u32, bforceappsclosed: Param3, brebootaftershutdown: Param4, dwreason: SHUTDOWN_REASON, ) -> super::super::Foundation::BOOL169 pub unsafe fn InitiateSystemShutdownExW<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>, Param4: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>>(
170 lpmachinename: Param0,
171 lpmessage: Param1,
172 dwtimeout: u32,
173 bforceappsclosed: Param3,
174 brebootaftershutdown: Param4,
175 dwreason: SHUTDOWN_REASON,
176 ) -> super::super::Foundation::BOOL {
177 #[cfg(windows)]
178 {
179 #[link(name = "windows")]
180 extern "system" {
181 fn InitiateSystemShutdownExW(lpmachinename: super::super::Foundation::PWSTR, lpmessage: super::super::Foundation::PWSTR, dwtimeout: u32, bforceappsclosed: super::super::Foundation::BOOL, brebootaftershutdown: super::super::Foundation::BOOL, dwreason: SHUTDOWN_REASON) -> super::super::Foundation::BOOL;
182 }
183 ::std::mem::transmute(InitiateSystemShutdownExW(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), ::std::mem::transmute(dwtimeout), bforceappsclosed.into_param().abi(), brebootaftershutdown.into_param().abi(), ::std::mem::transmute(dwreason)))
184 }
185 #[cfg(not(windows))]
186 unimplemented!("Unsupported target OS");
187 }
188 #[cfg(feature = "Win32_Foundation")]
189 #[inline]
InitiateSystemShutdownW<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>, Param4: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>>(lpmachinename: Param0, lpmessage: Param1, dwtimeout: u32, bforceappsclosed: Param3, brebootaftershutdown: Param4) -> super::super::Foundation::BOOL190 pub unsafe fn InitiateSystemShutdownW<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>, Param4: ::windows::runtime::IntoParam<'a, super::super::Foundation::BOOL>>(lpmachinename: Param0, lpmessage: Param1, dwtimeout: u32, bforceappsclosed: Param3, brebootaftershutdown: Param4) -> super::super::Foundation::BOOL {
191 #[cfg(windows)]
192 {
193 #[link(name = "windows")]
194 extern "system" {
195 fn InitiateSystemShutdownW(lpmachinename: super::super::Foundation::PWSTR, lpmessage: super::super::Foundation::PWSTR, dwtimeout: u32, bforceappsclosed: super::super::Foundation::BOOL, brebootaftershutdown: super::super::Foundation::BOOL) -> super::super::Foundation::BOOL;
196 }
197 ::std::mem::transmute(InitiateSystemShutdownW(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), ::std::mem::transmute(dwtimeout), bforceappsclosed.into_param().abi(), brebootaftershutdown.into_param().abi()))
198 }
199 #[cfg(not(windows))]
200 unimplemented!("Unsupported target OS");
201 }
202 #[cfg(feature = "Win32_Foundation")]
203 #[inline]
LockWorkStation() -> super::super::Foundation::BOOL204 pub unsafe fn LockWorkStation() -> super::super::Foundation::BOOL {
205 #[cfg(windows)]
206 {
207 #[link(name = "windows")]
208 extern "system" {
209 fn LockWorkStation() -> super::super::Foundation::BOOL;
210 }
211 ::std::mem::transmute(LockWorkStation())
212 }
213 #[cfg(not(windows))]
214 unimplemented!("Unsupported target OS");
215 }
216 pub const MAX_NUM_REASONS: u32 = 256u32;
217 pub const MAX_REASON_BUGID_LEN: u32 = 32u32;
218 pub const MAX_REASON_COMMENT_LEN: u32 = 512u32;
219 pub const MAX_REASON_DESC_LEN: u32 = 256u32;
220 pub const MAX_REASON_NAME_LEN: u32 = 64u32;
221 pub const POLICY_SHOWREASONUI_ALWAYS: u32 = 1u32;
222 pub const POLICY_SHOWREASONUI_NEVER: u32 = 0u32;
223 pub const POLICY_SHOWREASONUI_SERVERONLY: u32 = 3u32;
224 pub const POLICY_SHOWREASONUI_WORKSTATIONONLY: u32 = 2u32;
225 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
226 #[repr(transparent)]
227 pub struct SHUTDOWN_FLAGS(pub u32);
228 pub const SHUTDOWN_FORCE_OTHERS: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(1u32);
229 pub const SHUTDOWN_FORCE_SELF: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(2u32);
230 pub const SHUTDOWN_RESTART: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(4u32);
231 pub const SHUTDOWN_POWEROFF: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(8u32);
232 pub const SHUTDOWN_NOREBOOT: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(16u32);
233 pub const SHUTDOWN_GRACE_OVERRIDE: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(32u32);
234 pub const SHUTDOWN_INSTALL_UPDATES: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(64u32);
235 pub const SHUTDOWN_RESTARTAPPS: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(128u32);
236 pub const SHUTDOWN_SKIP_SVC_PRESHUTDOWN: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(256u32);
237 pub const SHUTDOWN_HYBRID: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(512u32);
238 pub const SHUTDOWN_RESTART_BOOTOPTIONS: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(1024u32);
239 pub const SHUTDOWN_SOFT_REBOOT: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(2048u32);
240 pub const SHUTDOWN_MOBILE_UI: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(4096u32);
241 pub const SHUTDOWN_ARSO: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(8192u32);
242 pub const SHUTDOWN_CHECK_SAFE_FOR_SERVER: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(16384u32);
243 pub const SHUTDOWN_VAIL_CONTAINER: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(32768u32);
244 pub const SHUTDOWN_SYSTEM_INITIATED: SHUTDOWN_FLAGS = SHUTDOWN_FLAGS(65536u32);
245 impl ::std::convert::From<u32> for SHUTDOWN_FLAGS {
from(value: u32) -> Self246 fn from(value: u32) -> Self {
247 Self(value)
248 }
249 }
250 unsafe impl ::windows::runtime::Abi for SHUTDOWN_FLAGS {
251 type Abi = Self;
252 type DefaultType = Self;
253 }
254 impl ::std::ops::BitOr for SHUTDOWN_FLAGS {
255 type Output = Self;
bitor(self, rhs: Self) -> Self256 fn bitor(self, rhs: Self) -> Self {
257 Self(self.0 | rhs.0)
258 }
259 }
260 impl ::std::ops::BitAnd for SHUTDOWN_FLAGS {
261 type Output = Self;
bitand(self, rhs: Self) -> Self262 fn bitand(self, rhs: Self) -> Self {
263 Self(self.0 & rhs.0)
264 }
265 }
266 impl ::std::ops::BitOrAssign for SHUTDOWN_FLAGS {
bitor_assign(&mut self, rhs: Self)267 fn bitor_assign(&mut self, rhs: Self) {
268 self.0.bitor_assign(rhs.0)
269 }
270 }
271 impl ::std::ops::BitAndAssign for SHUTDOWN_FLAGS {
bitand_assign(&mut self, rhs: Self)272 fn bitand_assign(&mut self, rhs: Self) {
273 self.0.bitand_assign(rhs.0)
274 }
275 }
276 impl ::std::ops::Not for SHUTDOWN_FLAGS {
277 type Output = Self;
not(self) -> Self278 fn not(self) -> Self {
279 Self(self.0.not())
280 }
281 }
282 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
283 #[repr(transparent)]
284 pub struct SHUTDOWN_REASON(pub u32);
285 pub const SHTDN_REASON_NONE: SHUTDOWN_REASON = SHUTDOWN_REASON(0u32);
286 pub const SHTDN_REASON_FLAG_COMMENT_REQUIRED: SHUTDOWN_REASON = SHUTDOWN_REASON(16777216u32);
287 pub const SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED: SHUTDOWN_REASON = SHUTDOWN_REASON(33554432u32);
288 pub const SHTDN_REASON_FLAG_CLEAN_UI: SHUTDOWN_REASON = SHUTDOWN_REASON(67108864u32);
289 pub const SHTDN_REASON_FLAG_DIRTY_UI: SHUTDOWN_REASON = SHUTDOWN_REASON(134217728u32);
290 pub const SHTDN_REASON_FLAG_MOBILE_UI_RESERVED: SHUTDOWN_REASON = SHUTDOWN_REASON(268435456u32);
291 pub const SHTDN_REASON_FLAG_USER_DEFINED: SHUTDOWN_REASON = SHUTDOWN_REASON(1073741824u32);
292 pub const SHTDN_REASON_FLAG_PLANNED: SHUTDOWN_REASON = SHUTDOWN_REASON(2147483648u32);
293 pub const SHTDN_REASON_MAJOR_OTHER: SHUTDOWN_REASON = SHUTDOWN_REASON(0u32);
294 pub const SHTDN_REASON_MAJOR_NONE: SHUTDOWN_REASON = SHUTDOWN_REASON(0u32);
295 pub const SHTDN_REASON_MAJOR_HARDWARE: SHUTDOWN_REASON = SHUTDOWN_REASON(65536u32);
296 pub const SHTDN_REASON_MAJOR_OPERATINGSYSTEM: SHUTDOWN_REASON = SHUTDOWN_REASON(131072u32);
297 pub const SHTDN_REASON_MAJOR_SOFTWARE: SHUTDOWN_REASON = SHUTDOWN_REASON(196608u32);
298 pub const SHTDN_REASON_MAJOR_APPLICATION: SHUTDOWN_REASON = SHUTDOWN_REASON(262144u32);
299 pub const SHTDN_REASON_MAJOR_SYSTEM: SHUTDOWN_REASON = SHUTDOWN_REASON(327680u32);
300 pub const SHTDN_REASON_MAJOR_POWER: SHUTDOWN_REASON = SHUTDOWN_REASON(393216u32);
301 pub const SHTDN_REASON_MAJOR_LEGACY_API: SHUTDOWN_REASON = SHUTDOWN_REASON(458752u32);
302 pub const SHTDN_REASON_MINOR_OTHER: SHUTDOWN_REASON = SHUTDOWN_REASON(0u32);
303 pub const SHTDN_REASON_MINOR_NONE: SHUTDOWN_REASON = SHUTDOWN_REASON(255u32);
304 pub const SHTDN_REASON_MINOR_MAINTENANCE: SHUTDOWN_REASON = SHUTDOWN_REASON(1u32);
305 pub const SHTDN_REASON_MINOR_INSTALLATION: SHUTDOWN_REASON = SHUTDOWN_REASON(2u32);
306 pub const SHTDN_REASON_MINOR_UPGRADE: SHUTDOWN_REASON = SHUTDOWN_REASON(3u32);
307 pub const SHTDN_REASON_MINOR_RECONFIG: SHUTDOWN_REASON = SHUTDOWN_REASON(4u32);
308 pub const SHTDN_REASON_MINOR_HUNG: SHUTDOWN_REASON = SHUTDOWN_REASON(5u32);
309 pub const SHTDN_REASON_MINOR_UNSTABLE: SHUTDOWN_REASON = SHUTDOWN_REASON(6u32);
310 pub const SHTDN_REASON_MINOR_DISK: SHUTDOWN_REASON = SHUTDOWN_REASON(7u32);
311 pub const SHTDN_REASON_MINOR_PROCESSOR: SHUTDOWN_REASON = SHUTDOWN_REASON(8u32);
312 pub const SHTDN_REASON_MINOR_NETWORKCARD: SHUTDOWN_REASON = SHUTDOWN_REASON(9u32);
313 pub const SHTDN_REASON_MINOR_POWER_SUPPLY: SHUTDOWN_REASON = SHUTDOWN_REASON(10u32);
314 pub const SHTDN_REASON_MINOR_CORDUNPLUGGED: SHUTDOWN_REASON = SHUTDOWN_REASON(11u32);
315 pub const SHTDN_REASON_MINOR_ENVIRONMENT: SHUTDOWN_REASON = SHUTDOWN_REASON(12u32);
316 pub const SHTDN_REASON_MINOR_HARDWARE_DRIVER: SHUTDOWN_REASON = SHUTDOWN_REASON(13u32);
317 pub const SHTDN_REASON_MINOR_OTHERDRIVER: SHUTDOWN_REASON = SHUTDOWN_REASON(14u32);
318 pub const SHTDN_REASON_MINOR_BLUESCREEN: SHUTDOWN_REASON = SHUTDOWN_REASON(15u32);
319 pub const SHTDN_REASON_MINOR_SERVICEPACK: SHUTDOWN_REASON = SHUTDOWN_REASON(16u32);
320 pub const SHTDN_REASON_MINOR_HOTFIX: SHUTDOWN_REASON = SHUTDOWN_REASON(17u32);
321 pub const SHTDN_REASON_MINOR_SECURITYFIX: SHUTDOWN_REASON = SHUTDOWN_REASON(18u32);
322 pub const SHTDN_REASON_MINOR_SECURITY: SHUTDOWN_REASON = SHUTDOWN_REASON(19u32);
323 pub const SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY: SHUTDOWN_REASON = SHUTDOWN_REASON(20u32);
324 pub const SHTDN_REASON_MINOR_WMI: SHUTDOWN_REASON = SHUTDOWN_REASON(21u32);
325 pub const SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL: SHUTDOWN_REASON = SHUTDOWN_REASON(22u32);
326 pub const SHTDN_REASON_MINOR_HOTFIX_UNINSTALL: SHUTDOWN_REASON = SHUTDOWN_REASON(23u32);
327 pub const SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL: SHUTDOWN_REASON = SHUTDOWN_REASON(24u32);
328 pub const SHTDN_REASON_MINOR_MMC: SHUTDOWN_REASON = SHUTDOWN_REASON(25u32);
329 pub const SHTDN_REASON_MINOR_SYSTEMRESTORE: SHUTDOWN_REASON = SHUTDOWN_REASON(26u32);
330 pub const SHTDN_REASON_MINOR_TERMSRV: SHUTDOWN_REASON = SHUTDOWN_REASON(32u32);
331 pub const SHTDN_REASON_MINOR_DC_PROMOTION: SHUTDOWN_REASON = SHUTDOWN_REASON(33u32);
332 pub const SHTDN_REASON_MINOR_DC_DEMOTION: SHUTDOWN_REASON = SHUTDOWN_REASON(34u32);
333 pub const SHTDN_REASON_UNKNOWN: SHUTDOWN_REASON = SHUTDOWN_REASON(255u32);
334 pub const SHTDN_REASON_LEGACY_API: SHUTDOWN_REASON = SHUTDOWN_REASON(2147942400u32);
335 pub const SHTDN_REASON_VALID_BIT_MASK: SHUTDOWN_REASON = SHUTDOWN_REASON(3238002687u32);
336 impl ::std::convert::From<u32> for SHUTDOWN_REASON {
from(value: u32) -> Self337 fn from(value: u32) -> Self {
338 Self(value)
339 }
340 }
341 unsafe impl ::windows::runtime::Abi for SHUTDOWN_REASON {
342 type Abi = Self;
343 type DefaultType = Self;
344 }
345 impl ::std::ops::BitOr for SHUTDOWN_REASON {
346 type Output = Self;
bitor(self, rhs: Self) -> Self347 fn bitor(self, rhs: Self) -> Self {
348 Self(self.0 | rhs.0)
349 }
350 }
351 impl ::std::ops::BitAnd for SHUTDOWN_REASON {
352 type Output = Self;
bitand(self, rhs: Self) -> Self353 fn bitand(self, rhs: Self) -> Self {
354 Self(self.0 & rhs.0)
355 }
356 }
357 impl ::std::ops::BitOrAssign for SHUTDOWN_REASON {
bitor_assign(&mut self, rhs: Self)358 fn bitor_assign(&mut self, rhs: Self) {
359 self.0.bitor_assign(rhs.0)
360 }
361 }
362 impl ::std::ops::BitAndAssign for SHUTDOWN_REASON {
bitand_assign(&mut self, rhs: Self)363 fn bitand_assign(&mut self, rhs: Self) {
364 self.0.bitand_assign(rhs.0)
365 }
366 }
367 impl ::std::ops::Not for SHUTDOWN_REASON {
368 type Output = Self;
not(self) -> Self369 fn not(self) -> Self {
370 Self(self.0.not())
371 }
372 }
373 pub const SHUTDOWN_TYPE_LEN: u32 = 32u32;
374 pub const SNAPSHOT_POLICY_ALWAYS: u32 = 1u32;
375 pub const SNAPSHOT_POLICY_NEVER: u32 = 0u32;
376 pub const SNAPSHOT_POLICY_UNPLANNED: u32 = 2u32;
377 #[cfg(feature = "Win32_Foundation")]
378 #[inline]
ShutdownBlockReasonCreate<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(hwnd: Param0, pwszreason: Param1) -> super::super::Foundation::BOOL379 pub unsafe fn ShutdownBlockReasonCreate<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(hwnd: Param0, pwszreason: Param1) -> super::super::Foundation::BOOL {
380 #[cfg(windows)]
381 {
382 #[link(name = "windows")]
383 extern "system" {
384 fn ShutdownBlockReasonCreate(hwnd: super::super::Foundation::HWND, pwszreason: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL;
385 }
386 ::std::mem::transmute(ShutdownBlockReasonCreate(hwnd.into_param().abi(), pwszreason.into_param().abi()))
387 }
388 #[cfg(not(windows))]
389 unimplemented!("Unsupported target OS");
390 }
391 #[cfg(feature = "Win32_Foundation")]
392 #[inline]
ShutdownBlockReasonDestroy<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0) -> super::super::Foundation::BOOL393 pub unsafe fn ShutdownBlockReasonDestroy<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0) -> super::super::Foundation::BOOL {
394 #[cfg(windows)]
395 {
396 #[link(name = "windows")]
397 extern "system" {
398 fn ShutdownBlockReasonDestroy(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL;
399 }
400 ::std::mem::transmute(ShutdownBlockReasonDestroy(hwnd.into_param().abi()))
401 }
402 #[cfg(not(windows))]
403 unimplemented!("Unsupported target OS");
404 }
405 #[cfg(feature = "Win32_Foundation")]
406 #[inline]
ShutdownBlockReasonQuery<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0, pwszbuff: super::super::Foundation::PWSTR, pcchbuff: *mut u32) -> super::super::Foundation::BOOL407 pub unsafe fn ShutdownBlockReasonQuery<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0, pwszbuff: super::super::Foundation::PWSTR, pcchbuff: *mut u32) -> super::super::Foundation::BOOL {
408 #[cfg(windows)]
409 {
410 #[link(name = "windows")]
411 extern "system" {
412 fn ShutdownBlockReasonQuery(hwnd: super::super::Foundation::HWND, pwszbuff: super::super::Foundation::PWSTR, pcchbuff: *mut u32) -> super::super::Foundation::BOOL;
413 }
414 ::std::mem::transmute(ShutdownBlockReasonQuery(hwnd.into_param().abi(), ::std::mem::transmute(pwszbuff), ::std::mem::transmute(pcchbuff)))
415 }
416 #[cfg(not(windows))]
417 unimplemented!("Unsupported target OS");
418 }
419