]>
Commit | Line | Data |
---|---|---|
353b0b11 FG |
1 | #[doc = "*Required features: `\"Win32_System_Recovery\"`, `\"Win32_Foundation\"`*"] |
2 | #[cfg(feature = "Win32_Foundation")] | |
3 | #[inline] | |
4 | pub unsafe fn ApplicationRecoveryFinished<P0>(bsuccess: P0) | |
5 | where | |
6 | P0: ::windows::core::IntoParam<super::super::Foundation::BOOL>, | |
7 | { | |
8 | ::windows::imp::link ! ( "kernel32.dll""system" fn ApplicationRecoveryFinished ( bsuccess : super::super::Foundation:: BOOL ) -> ( ) ); | |
9 | ApplicationRecoveryFinished(bsuccess.into_param().abi()) | |
10 | } | |
11 | #[doc = "*Required features: `\"Win32_System_Recovery\"`, `\"Win32_Foundation\"`*"] | |
12 | #[cfg(feature = "Win32_Foundation")] | |
13 | #[inline] | |
14 | pub unsafe fn ApplicationRecoveryInProgress() -> ::windows::core::Result<super::super::Foundation::BOOL> { | |
15 | ::windows::imp::link ! ( "kernel32.dll""system" fn ApplicationRecoveryInProgress ( pbcancelled : *mut super::super::Foundation:: BOOL ) -> :: windows::core::HRESULT ); | |
16 | let mut result__ = ::windows::core::zeroed::<super::super::Foundation::BOOL>(); | |
17 | ApplicationRecoveryInProgress(&mut result__).from_abi(result__) | |
18 | } | |
19 | #[doc = "*Required features: `\"Win32_System_Recovery\"`, `\"Win32_Foundation\"`, `\"Win32_System_WindowsProgramming\"`*"] | |
20 | #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_WindowsProgramming"))] | |
21 | #[inline] | |
22 | pub unsafe fn GetApplicationRecoveryCallback<P0>(hprocess: P0, precoverycallback: *mut super::WindowsProgramming::APPLICATION_RECOVERY_CALLBACK, ppvparameter: ::core::option::Option<*mut *mut ::core::ffi::c_void>, pdwpinginterval: ::core::option::Option<*mut u32>, pdwflags: ::core::option::Option<*mut u32>) -> ::windows::core::Result<()> | |
23 | where | |
24 | P0: ::windows::core::IntoParam<super::super::Foundation::HANDLE>, | |
25 | { | |
26 | ::windows::imp::link ! ( "kernel32.dll""system" fn GetApplicationRecoveryCallback ( hprocess : super::super::Foundation:: HANDLE , precoverycallback : *mut super::WindowsProgramming:: APPLICATION_RECOVERY_CALLBACK , ppvparameter : *mut *mut ::core::ffi::c_void , pdwpinginterval : *mut u32 , pdwflags : *mut u32 ) -> :: windows::core::HRESULT ); | |
27 | GetApplicationRecoveryCallback(hprocess.into_param().abi(), precoverycallback, ::core::mem::transmute(ppvparameter.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwpinginterval.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut()))).ok() | |
28 | } | |
29 | #[doc = "*Required features: `\"Win32_System_Recovery\"`, `\"Win32_Foundation\"`*"] | |
30 | #[cfg(feature = "Win32_Foundation")] | |
31 | #[inline] | |
32 | pub unsafe fn GetApplicationRestartSettings<P0>(hprocess: P0, pwzcommandline: ::windows::core::PWSTR, pcchsize: *mut u32, pdwflags: ::core::option::Option<*mut u32>) -> ::windows::core::Result<()> | |
33 | where | |
34 | P0: ::windows::core::IntoParam<super::super::Foundation::HANDLE>, | |
35 | { | |
36 | ::windows::imp::link ! ( "kernel32.dll""system" fn GetApplicationRestartSettings ( hprocess : super::super::Foundation:: HANDLE , pwzcommandline : :: windows::core::PWSTR , pcchsize : *mut u32 , pdwflags : *mut u32 ) -> :: windows::core::HRESULT ); | |
37 | GetApplicationRestartSettings(hprocess.into_param().abi(), ::core::mem::transmute(pwzcommandline), pcchsize, ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut()))).ok() | |
38 | } | |
39 | #[doc = "*Required features: `\"Win32_System_Recovery\"`, `\"Win32_System_WindowsProgramming\"`*"] | |
40 | #[cfg(feature = "Win32_System_WindowsProgramming")] | |
41 | #[inline] | |
42 | pub unsafe fn RegisterApplicationRecoveryCallback(precoveycallback: super::WindowsProgramming::APPLICATION_RECOVERY_CALLBACK, pvparameter: ::core::option::Option<*const ::core::ffi::c_void>, dwpinginterval: u32, dwflags: u32) -> ::windows::core::Result<()> { | |
43 | ::windows::imp::link ! ( "kernel32.dll""system" fn RegisterApplicationRecoveryCallback ( precoveycallback : super::WindowsProgramming:: APPLICATION_RECOVERY_CALLBACK , pvparameter : *const ::core::ffi::c_void , dwpinginterval : u32 , dwflags : u32 ) -> :: windows::core::HRESULT ); | |
44 | RegisterApplicationRecoveryCallback(precoveycallback, ::core::mem::transmute(pvparameter.unwrap_or(::std::ptr::null())), dwpinginterval, dwflags).ok() | |
45 | } | |
46 | #[doc = "*Required features: `\"Win32_System_Recovery\"`*"] | |
47 | #[inline] | |
48 | pub unsafe fn RegisterApplicationRestart<P0>(pwzcommandline: P0, dwflags: REGISTER_APPLICATION_RESTART_FLAGS) -> ::windows::core::Result<()> | |
49 | where | |
50 | P0: ::windows::core::IntoParam<::windows::core::PCWSTR>, | |
51 | { | |
52 | ::windows::imp::link ! ( "kernel32.dll""system" fn RegisterApplicationRestart ( pwzcommandline : :: windows::core::PCWSTR , dwflags : REGISTER_APPLICATION_RESTART_FLAGS ) -> :: windows::core::HRESULT ); | |
53 | RegisterApplicationRestart(pwzcommandline.into_param().abi(), dwflags).ok() | |
54 | } | |
55 | #[doc = "*Required features: `\"Win32_System_Recovery\"`*"] | |
56 | #[inline] | |
57 | pub unsafe fn UnregisterApplicationRecoveryCallback() -> ::windows::core::Result<()> { | |
58 | ::windows::imp::link ! ( "kernel32.dll""system" fn UnregisterApplicationRecoveryCallback ( ) -> :: windows::core::HRESULT ); | |
59 | UnregisterApplicationRecoveryCallback().ok() | |
60 | } | |
61 | #[doc = "*Required features: `\"Win32_System_Recovery\"`*"] | |
62 | #[inline] | |
63 | pub unsafe fn UnregisterApplicationRestart() -> ::windows::core::Result<()> { | |
64 | ::windows::imp::link ! ( "kernel32.dll""system" fn UnregisterApplicationRestart ( ) -> :: windows::core::HRESULT ); | |
65 | UnregisterApplicationRestart().ok() | |
66 | } | |
67 | #[doc = "*Required features: `\"Win32_System_Recovery\"`*"] | |
68 | #[repr(transparent)] | |
69 | #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] | |
70 | pub struct REGISTER_APPLICATION_RESTART_FLAGS(pub u32); | |
71 | #[doc = "*Required features: `\"Win32_System_Recovery\"`*"] | |
72 | pub const RESTART_NO_CRASH: REGISTER_APPLICATION_RESTART_FLAGS = REGISTER_APPLICATION_RESTART_FLAGS(1u32); | |
73 | #[doc = "*Required features: `\"Win32_System_Recovery\"`*"] | |
74 | pub const RESTART_NO_HANG: REGISTER_APPLICATION_RESTART_FLAGS = REGISTER_APPLICATION_RESTART_FLAGS(2u32); | |
75 | #[doc = "*Required features: `\"Win32_System_Recovery\"`*"] | |
76 | pub const RESTART_NO_PATCH: REGISTER_APPLICATION_RESTART_FLAGS = REGISTER_APPLICATION_RESTART_FLAGS(4u32); | |
77 | #[doc = "*Required features: `\"Win32_System_Recovery\"`*"] | |
78 | pub const RESTART_NO_REBOOT: REGISTER_APPLICATION_RESTART_FLAGS = REGISTER_APPLICATION_RESTART_FLAGS(8u32); | |
79 | impl ::core::marker::Copy for REGISTER_APPLICATION_RESTART_FLAGS {} | |
80 | impl ::core::clone::Clone for REGISTER_APPLICATION_RESTART_FLAGS { | |
81 | fn clone(&self) -> Self { | |
82 | *self | |
83 | } | |
84 | } | |
85 | impl ::core::default::Default for REGISTER_APPLICATION_RESTART_FLAGS { | |
86 | fn default() -> Self { | |
87 | Self(0) | |
88 | } | |
89 | } | |
90 | impl ::windows::core::TypeKind for REGISTER_APPLICATION_RESTART_FLAGS { | |
91 | type TypeKind = ::windows::core::CopyType; | |
92 | } | |
93 | impl ::core::fmt::Debug for REGISTER_APPLICATION_RESTART_FLAGS { | |
94 | fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { | |
95 | f.debug_tuple("REGISTER_APPLICATION_RESTART_FLAGS").field(&self.0).finish() | |
96 | } | |
97 | } | |
98 | impl REGISTER_APPLICATION_RESTART_FLAGS { | |
99 | pub const fn contains(&self, other: Self) -> bool { | |
100 | self.0 & other.0 == other.0 | |
101 | } | |
102 | } | |
103 | impl ::core::ops::BitOr for REGISTER_APPLICATION_RESTART_FLAGS { | |
104 | type Output = Self; | |
105 | fn bitor(self, other: Self) -> Self { | |
106 | Self(self.0 | other.0) | |
107 | } | |
108 | } | |
109 | impl ::core::ops::BitAnd for REGISTER_APPLICATION_RESTART_FLAGS { | |
110 | type Output = Self; | |
111 | fn bitand(self, other: Self) -> Self { | |
112 | Self(self.0 & other.0) | |
113 | } | |
114 | } | |
115 | impl ::core::ops::BitOrAssign for REGISTER_APPLICATION_RESTART_FLAGS { | |
116 | fn bitor_assign(&mut self, other: Self) { | |
117 | self.0.bitor_assign(other.0) | |
118 | } | |
119 | } | |
120 | impl ::core::ops::BitAndAssign for REGISTER_APPLICATION_RESTART_FLAGS { | |
121 | fn bitand_assign(&mut self, other: Self) { | |
122 | self.0.bitand_assign(other.0) | |
123 | } | |
124 | } | |
125 | impl ::core::ops::Not for REGISTER_APPLICATION_RESTART_FLAGS { | |
126 | type Output = Self; | |
127 | fn not(self) -> Self { | |
128 | Self(self.0.not()) | |
129 | } | |
130 | } | |
131 | #[cfg(feature = "implement")] | |
132 | ::core::include!("impl.rs"); |