1 #![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)]
2 pub const CCH_RM_MAX_APP_NAME: u32 = 255u32;
3 pub const CCH_RM_MAX_SVC_NAME: u32 = 63u32;
4 pub const CCH_RM_SESSION_KEY: u32 = 32u32;
5 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
6 #[repr(transparent)]
7 pub struct RM_APP_STATUS(pub i32);
8 pub const RmStatusUnknown: RM_APP_STATUS = RM_APP_STATUS(0i32);
9 pub const RmStatusRunning: RM_APP_STATUS = RM_APP_STATUS(1i32);
10 pub const RmStatusStopped: RM_APP_STATUS = RM_APP_STATUS(2i32);
11 pub const RmStatusStoppedOther: RM_APP_STATUS = RM_APP_STATUS(4i32);
12 pub const RmStatusRestarted: RM_APP_STATUS = RM_APP_STATUS(8i32);
13 pub const RmStatusErrorOnStop: RM_APP_STATUS = RM_APP_STATUS(16i32);
14 pub const RmStatusErrorOnRestart: RM_APP_STATUS = RM_APP_STATUS(32i32);
15 pub const RmStatusShutdownMasked: RM_APP_STATUS = RM_APP_STATUS(64i32);
16 pub const RmStatusRestartMasked: RM_APP_STATUS = RM_APP_STATUS(128i32);
17 impl ::std::convert::From<i32> for RM_APP_STATUS {
from(value: i32) -> Self18     fn from(value: i32) -> Self {
19         Self(value)
20     }
21 }
22 unsafe impl ::windows::runtime::Abi for RM_APP_STATUS {
23     type Abi = Self;
24     type DefaultType = Self;
25 }
26 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
27 #[repr(transparent)]
28 pub struct RM_APP_TYPE(pub i32);
29 pub const RmUnknownApp: RM_APP_TYPE = RM_APP_TYPE(0i32);
30 pub const RmMainWindow: RM_APP_TYPE = RM_APP_TYPE(1i32);
31 pub const RmOtherWindow: RM_APP_TYPE = RM_APP_TYPE(2i32);
32 pub const RmService: RM_APP_TYPE = RM_APP_TYPE(3i32);
33 pub const RmExplorer: RM_APP_TYPE = RM_APP_TYPE(4i32);
34 pub const RmConsole: RM_APP_TYPE = RM_APP_TYPE(5i32);
35 pub const RmCritical: RM_APP_TYPE = RM_APP_TYPE(1000i32);
36 impl ::std::convert::From<i32> for RM_APP_TYPE {
from(value: i32) -> Self37     fn from(value: i32) -> Self {
38         Self(value)
39     }
40 }
41 unsafe impl ::windows::runtime::Abi for RM_APP_TYPE {
42     type Abi = Self;
43     type DefaultType = Self;
44 }
45 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
46 #[repr(transparent)]
47 pub struct RM_FILTER_ACTION(pub i32);
48 pub const RmInvalidFilterAction: RM_FILTER_ACTION = RM_FILTER_ACTION(0i32);
49 pub const RmNoRestart: RM_FILTER_ACTION = RM_FILTER_ACTION(1i32);
50 pub const RmNoShutdown: RM_FILTER_ACTION = RM_FILTER_ACTION(2i32);
51 impl ::std::convert::From<i32> for RM_FILTER_ACTION {
from(value: i32) -> Self52     fn from(value: i32) -> Self {
53         Self(value)
54     }
55 }
56 unsafe impl ::windows::runtime::Abi for RM_FILTER_ACTION {
57     type Abi = Self;
58     type DefaultType = Self;
59 }
60 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
61 #[repr(C)]
62 #[cfg(feature = "Win32_Foundation")]
63 pub struct RM_FILTER_INFO {
64     pub FilterAction: RM_FILTER_ACTION,
65     pub FilterTrigger: RM_FILTER_TRIGGER,
66     pub cbNextOffset: u32,
67     pub Anonymous: RM_FILTER_INFO_0,
68 }
69 #[cfg(feature = "Win32_Foundation")]
70 impl RM_FILTER_INFO {}
71 #[cfg(feature = "Win32_Foundation")]
72 impl ::std::default::Default for RM_FILTER_INFO {
default() -> Self73     fn default() -> Self {
74         unsafe { ::std::mem::zeroed() }
75     }
76 }
77 #[cfg(feature = "Win32_Foundation")]
78 impl ::std::cmp::PartialEq for RM_FILTER_INFO {
eq(&self, _other: &Self) -> bool79     fn eq(&self, _other: &Self) -> bool {
80         unimplemented!()
81     }
82 }
83 #[cfg(feature = "Win32_Foundation")]
84 impl ::std::cmp::Eq for RM_FILTER_INFO {}
85 #[cfg(feature = "Win32_Foundation")]
86 unsafe impl ::windows::runtime::Abi for RM_FILTER_INFO {
87     type Abi = Self;
88     type DefaultType = Self;
89 }
90 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
91 #[repr(C)]
92 #[cfg(feature = "Win32_Foundation")]
93 pub union RM_FILTER_INFO_0 {
94     pub strFilename: super::super::Foundation::PWSTR,
95     pub Process: RM_UNIQUE_PROCESS,
96     pub strServiceShortName: super::super::Foundation::PWSTR,
97 }
98 #[cfg(feature = "Win32_Foundation")]
99 impl RM_FILTER_INFO_0 {}
100 #[cfg(feature = "Win32_Foundation")]
101 impl ::std::default::Default for RM_FILTER_INFO_0 {
default() -> Self102     fn default() -> Self {
103         unsafe { ::std::mem::zeroed() }
104     }
105 }
106 #[cfg(feature = "Win32_Foundation")]
107 impl ::std::cmp::PartialEq for RM_FILTER_INFO_0 {
eq(&self, _other: &Self) -> bool108     fn eq(&self, _other: &Self) -> bool {
109         unimplemented!()
110     }
111 }
112 #[cfg(feature = "Win32_Foundation")]
113 impl ::std::cmp::Eq for RM_FILTER_INFO_0 {}
114 #[cfg(feature = "Win32_Foundation")]
115 unsafe impl ::windows::runtime::Abi for RM_FILTER_INFO_0 {
116     type Abi = Self;
117     type DefaultType = Self;
118 }
119 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
120 #[repr(transparent)]
121 pub struct RM_FILTER_TRIGGER(pub i32);
122 pub const RmFilterTriggerInvalid: RM_FILTER_TRIGGER = RM_FILTER_TRIGGER(0i32);
123 pub const RmFilterTriggerFile: RM_FILTER_TRIGGER = RM_FILTER_TRIGGER(1i32);
124 pub const RmFilterTriggerProcess: RM_FILTER_TRIGGER = RM_FILTER_TRIGGER(2i32);
125 pub const RmFilterTriggerService: RM_FILTER_TRIGGER = RM_FILTER_TRIGGER(3i32);
126 impl ::std::convert::From<i32> for RM_FILTER_TRIGGER {
from(value: i32) -> Self127     fn from(value: i32) -> Self {
128         Self(value)
129     }
130 }
131 unsafe impl ::windows::runtime::Abi for RM_FILTER_TRIGGER {
132     type Abi = Self;
133     type DefaultType = Self;
134 }
135 pub const RM_INVALID_PROCESS: i32 = -1i32;
136 pub const RM_INVALID_TS_SESSION: i32 = -1i32;
137 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
138 #[repr(C)]
139 #[cfg(feature = "Win32_Foundation")]
140 pub struct RM_PROCESS_INFO {
141     pub Process: RM_UNIQUE_PROCESS,
142     pub strAppName: [u16; 256],
143     pub strServiceShortName: [u16; 64],
144     pub ApplicationType: RM_APP_TYPE,
145     pub AppStatus: u32,
146     pub TSSessionId: u32,
147     pub bRestartable: super::super::Foundation::BOOL,
148 }
149 #[cfg(feature = "Win32_Foundation")]
150 impl RM_PROCESS_INFO {}
151 #[cfg(feature = "Win32_Foundation")]
152 impl ::std::default::Default for RM_PROCESS_INFO {
default() -> Self153     fn default() -> Self {
154         unsafe { ::std::mem::zeroed() }
155     }
156 }
157 #[cfg(feature = "Win32_Foundation")]
158 impl ::std::fmt::Debug for RM_PROCESS_INFO {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result159     fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
160         fmt.debug_struct("RM_PROCESS_INFO")
161             .field("Process", &self.Process)
162             .field("strAppName", &self.strAppName)
163             .field("strServiceShortName", &self.strServiceShortName)
164             .field("ApplicationType", &self.ApplicationType)
165             .field("AppStatus", &self.AppStatus)
166             .field("TSSessionId", &self.TSSessionId)
167             .field("bRestartable", &self.bRestartable)
168             .finish()
169     }
170 }
171 #[cfg(feature = "Win32_Foundation")]
172 impl ::std::cmp::PartialEq for RM_PROCESS_INFO {
eq(&self, other: &Self) -> bool173     fn eq(&self, other: &Self) -> bool {
174         self.Process == other.Process && self.strAppName == other.strAppName && self.strServiceShortName == other.strServiceShortName && self.ApplicationType == other.ApplicationType && self.AppStatus == other.AppStatus && self.TSSessionId == other.TSSessionId && self.bRestartable == other.bRestartable
175     }
176 }
177 #[cfg(feature = "Win32_Foundation")]
178 impl ::std::cmp::Eq for RM_PROCESS_INFO {}
179 #[cfg(feature = "Win32_Foundation")]
180 unsafe impl ::windows::runtime::Abi for RM_PROCESS_INFO {
181     type Abi = Self;
182     type DefaultType = Self;
183 }
184 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
185 #[repr(transparent)]
186 pub struct RM_REBOOT_REASON(pub i32);
187 pub const RmRebootReasonNone: RM_REBOOT_REASON = RM_REBOOT_REASON(0i32);
188 pub const RmRebootReasonPermissionDenied: RM_REBOOT_REASON = RM_REBOOT_REASON(1i32);
189 pub const RmRebootReasonSessionMismatch: RM_REBOOT_REASON = RM_REBOOT_REASON(2i32);
190 pub const RmRebootReasonCriticalProcess: RM_REBOOT_REASON = RM_REBOOT_REASON(4i32);
191 pub const RmRebootReasonCriticalService: RM_REBOOT_REASON = RM_REBOOT_REASON(8i32);
192 pub const RmRebootReasonDetectedSelf: RM_REBOOT_REASON = RM_REBOOT_REASON(16i32);
193 impl ::std::convert::From<i32> for RM_REBOOT_REASON {
from(value: i32) -> Self194     fn from(value: i32) -> Self {
195         Self(value)
196     }
197 }
198 unsafe impl ::windows::runtime::Abi for RM_REBOOT_REASON {
199     type Abi = Self;
200     type DefaultType = Self;
201 }
202 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
203 #[repr(transparent)]
204 pub struct RM_SHUTDOWN_TYPE(pub i32);
205 pub const RmForceShutdown: RM_SHUTDOWN_TYPE = RM_SHUTDOWN_TYPE(1i32);
206 pub const RmShutdownOnlyRegistered: RM_SHUTDOWN_TYPE = RM_SHUTDOWN_TYPE(16i32);
207 impl ::std::convert::From<i32> for RM_SHUTDOWN_TYPE {
from(value: i32) -> Self208     fn from(value: i32) -> Self {
209         Self(value)
210     }
211 }
212 unsafe impl ::windows::runtime::Abi for RM_SHUTDOWN_TYPE {
213     type Abi = Self;
214     type DefaultType = Self;
215 }
216 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
217 #[repr(C)]
218 #[cfg(feature = "Win32_Foundation")]
219 pub struct RM_UNIQUE_PROCESS {
220     pub dwProcessId: u32,
221     pub ProcessStartTime: super::super::Foundation::FILETIME,
222 }
223 #[cfg(feature = "Win32_Foundation")]
224 impl RM_UNIQUE_PROCESS {}
225 #[cfg(feature = "Win32_Foundation")]
226 impl ::std::default::Default for RM_UNIQUE_PROCESS {
default() -> Self227     fn default() -> Self {
228         unsafe { ::std::mem::zeroed() }
229     }
230 }
231 #[cfg(feature = "Win32_Foundation")]
232 impl ::std::fmt::Debug for RM_UNIQUE_PROCESS {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result233     fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
234         fmt.debug_struct("RM_UNIQUE_PROCESS").field("dwProcessId", &self.dwProcessId).field("ProcessStartTime", &self.ProcessStartTime).finish()
235     }
236 }
237 #[cfg(feature = "Win32_Foundation")]
238 impl ::std::cmp::PartialEq for RM_UNIQUE_PROCESS {
eq(&self, other: &Self) -> bool239     fn eq(&self, other: &Self) -> bool {
240         self.dwProcessId == other.dwProcessId && self.ProcessStartTime == other.ProcessStartTime
241     }
242 }
243 #[cfg(feature = "Win32_Foundation")]
244 impl ::std::cmp::Eq for RM_UNIQUE_PROCESS {}
245 #[cfg(feature = "Win32_Foundation")]
246 unsafe impl ::windows::runtime::Abi for RM_UNIQUE_PROCESS {
247     type Abi = Self;
248     type DefaultType = Self;
249 }
250 pub type RM_WRITE_STATUS_CALLBACK = unsafe extern "system" fn(npercentcomplete: u32);
251 #[cfg(feature = "Win32_Foundation")]
252 #[inline]
RmAddFilter<'a, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(dwsessionhandle: u32, strmodulename: Param1, pprocess: *const RM_UNIQUE_PROCESS, strserviceshortname: Param3, filteraction: RM_FILTER_ACTION) -> u32253 pub unsafe fn RmAddFilter<'a, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(dwsessionhandle: u32, strmodulename: Param1, pprocess: *const RM_UNIQUE_PROCESS, strserviceshortname: Param3, filteraction: RM_FILTER_ACTION) -> u32 {
254     #[cfg(windows)]
255     {
256         #[link(name = "windows")]
257         extern "system" {
258             fn RmAddFilter(dwsessionhandle: u32, strmodulename: super::super::Foundation::PWSTR, pprocess: *const RM_UNIQUE_PROCESS, strserviceshortname: super::super::Foundation::PWSTR, filteraction: RM_FILTER_ACTION) -> u32;
259         }
260         ::std::mem::transmute(RmAddFilter(::std::mem::transmute(dwsessionhandle), strmodulename.into_param().abi(), ::std::mem::transmute(pprocess), strserviceshortname.into_param().abi(), ::std::mem::transmute(filteraction)))
261     }
262     #[cfg(not(windows))]
263     unimplemented!("Unsupported target OS");
264 }
265 #[inline]
RmCancelCurrentTask(dwsessionhandle: u32) -> u32266 pub unsafe fn RmCancelCurrentTask(dwsessionhandle: u32) -> u32 {
267     #[cfg(windows)]
268     {
269         #[link(name = "windows")]
270         extern "system" {
271             fn RmCancelCurrentTask(dwsessionhandle: u32) -> u32;
272         }
273         ::std::mem::transmute(RmCancelCurrentTask(::std::mem::transmute(dwsessionhandle)))
274     }
275     #[cfg(not(windows))]
276     unimplemented!("Unsupported target OS");
277 }
278 #[inline]
RmEndSession(dwsessionhandle: u32) -> u32279 pub unsafe fn RmEndSession(dwsessionhandle: u32) -> u32 {
280     #[cfg(windows)]
281     {
282         #[link(name = "windows")]
283         extern "system" {
284             fn RmEndSession(dwsessionhandle: u32) -> u32;
285         }
286         ::std::mem::transmute(RmEndSession(::std::mem::transmute(dwsessionhandle)))
287     }
288     #[cfg(not(windows))]
289     unimplemented!("Unsupported target OS");
290 }
291 #[inline]
RmGetFilterList(dwsessionhandle: u32, pbfilterbuf: *mut u8, cbfilterbuf: u32, cbfilterbufneeded: *mut u32) -> u32292 pub unsafe fn RmGetFilterList(dwsessionhandle: u32, pbfilterbuf: *mut u8, cbfilterbuf: u32, cbfilterbufneeded: *mut u32) -> u32 {
293     #[cfg(windows)]
294     {
295         #[link(name = "windows")]
296         extern "system" {
297             fn RmGetFilterList(dwsessionhandle: u32, pbfilterbuf: *mut u8, cbfilterbuf: u32, cbfilterbufneeded: *mut u32) -> u32;
298         }
299         ::std::mem::transmute(RmGetFilterList(::std::mem::transmute(dwsessionhandle), ::std::mem::transmute(pbfilterbuf), ::std::mem::transmute(cbfilterbuf), ::std::mem::transmute(cbfilterbufneeded)))
300     }
301     #[cfg(not(windows))]
302     unimplemented!("Unsupported target OS");
303 }
304 #[cfg(feature = "Win32_Foundation")]
305 #[inline]
RmGetList(dwsessionhandle: u32, pnprocinfoneeded: *mut u32, pnprocinfo: *mut u32, rgaffectedapps: *mut RM_PROCESS_INFO, lpdwrebootreasons: *mut u32) -> u32306 pub unsafe fn RmGetList(dwsessionhandle: u32, pnprocinfoneeded: *mut u32, pnprocinfo: *mut u32, rgaffectedapps: *mut RM_PROCESS_INFO, lpdwrebootreasons: *mut u32) -> u32 {
307     #[cfg(windows)]
308     {
309         #[link(name = "windows")]
310         extern "system" {
311             fn RmGetList(dwsessionhandle: u32, pnprocinfoneeded: *mut u32, pnprocinfo: *mut u32, rgaffectedapps: *mut RM_PROCESS_INFO, lpdwrebootreasons: *mut u32) -> u32;
312         }
313         ::std::mem::transmute(RmGetList(::std::mem::transmute(dwsessionhandle), ::std::mem::transmute(pnprocinfoneeded), ::std::mem::transmute(pnprocinfo), ::std::mem::transmute(rgaffectedapps), ::std::mem::transmute(lpdwrebootreasons)))
314     }
315     #[cfg(not(windows))]
316     unimplemented!("Unsupported target OS");
317 }
318 #[cfg(feature = "Win32_Foundation")]
319 #[inline]
RmJoinSession<'a, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(psessionhandle: *mut u32, strsessionkey: Param1) -> u32320 pub unsafe fn RmJoinSession<'a, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(psessionhandle: *mut u32, strsessionkey: Param1) -> u32 {
321     #[cfg(windows)]
322     {
323         #[link(name = "windows")]
324         extern "system" {
325             fn RmJoinSession(psessionhandle: *mut u32, strsessionkey: super::super::Foundation::PWSTR) -> u32;
326         }
327         ::std::mem::transmute(RmJoinSession(::std::mem::transmute(psessionhandle), strsessionkey.into_param().abi()))
328     }
329     #[cfg(not(windows))]
330     unimplemented!("Unsupported target OS");
331 }
332 #[cfg(feature = "Win32_Foundation")]
333 #[inline]
RmRegisterResources(dwsessionhandle: u32, nfiles: u32, rgsfilenames: *const super::super::Foundation::PWSTR, napplications: u32, rgapplications: *const RM_UNIQUE_PROCESS, nservices: u32, rgsservicenames: *const super::super::Foundation::PWSTR) -> u32334 pub unsafe fn RmRegisterResources(dwsessionhandle: u32, nfiles: u32, rgsfilenames: *const super::super::Foundation::PWSTR, napplications: u32, rgapplications: *const RM_UNIQUE_PROCESS, nservices: u32, rgsservicenames: *const super::super::Foundation::PWSTR) -> u32 {
335     #[cfg(windows)]
336     {
337         #[link(name = "windows")]
338         extern "system" {
339             fn RmRegisterResources(dwsessionhandle: u32, nfiles: u32, rgsfilenames: *const super::super::Foundation::PWSTR, napplications: u32, rgapplications: *const RM_UNIQUE_PROCESS, nservices: u32, rgsservicenames: *const super::super::Foundation::PWSTR) -> u32;
340         }
341         ::std::mem::transmute(RmRegisterResources(::std::mem::transmute(dwsessionhandle), ::std::mem::transmute(nfiles), ::std::mem::transmute(rgsfilenames), ::std::mem::transmute(napplications), ::std::mem::transmute(rgapplications), ::std::mem::transmute(nservices), ::std::mem::transmute(rgsservicenames)))
342     }
343     #[cfg(not(windows))]
344     unimplemented!("Unsupported target OS");
345 }
346 #[cfg(feature = "Win32_Foundation")]
347 #[inline]
RmRemoveFilter<'a, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(dwsessionhandle: u32, strmodulename: Param1, pprocess: *const RM_UNIQUE_PROCESS, strserviceshortname: Param3) -> u32348 pub unsafe fn RmRemoveFilter<'a, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(dwsessionhandle: u32, strmodulename: Param1, pprocess: *const RM_UNIQUE_PROCESS, strserviceshortname: Param3) -> u32 {
349     #[cfg(windows)]
350     {
351         #[link(name = "windows")]
352         extern "system" {
353             fn RmRemoveFilter(dwsessionhandle: u32, strmodulename: super::super::Foundation::PWSTR, pprocess: *const RM_UNIQUE_PROCESS, strserviceshortname: super::super::Foundation::PWSTR) -> u32;
354         }
355         ::std::mem::transmute(RmRemoveFilter(::std::mem::transmute(dwsessionhandle), strmodulename.into_param().abi(), ::std::mem::transmute(pprocess), strserviceshortname.into_param().abi()))
356     }
357     #[cfg(not(windows))]
358     unimplemented!("Unsupported target OS");
359 }
360 #[inline]
RmRestart(dwsessionhandle: u32, dwrestartflags: u32, fnstatus: ::std::option::Option<RM_WRITE_STATUS_CALLBACK>) -> u32361 pub unsafe fn RmRestart(dwsessionhandle: u32, dwrestartflags: u32, fnstatus: ::std::option::Option<RM_WRITE_STATUS_CALLBACK>) -> u32 {
362     #[cfg(windows)]
363     {
364         #[link(name = "windows")]
365         extern "system" {
366             fn RmRestart(dwsessionhandle: u32, dwrestartflags: u32, fnstatus: ::windows::runtime::RawPtr) -> u32;
367         }
368         ::std::mem::transmute(RmRestart(::std::mem::transmute(dwsessionhandle), ::std::mem::transmute(dwrestartflags), ::std::mem::transmute(fnstatus)))
369     }
370     #[cfg(not(windows))]
371     unimplemented!("Unsupported target OS");
372 }
373 #[inline]
RmShutdown(dwsessionhandle: u32, lactionflags: u32, fnstatus: ::std::option::Option<RM_WRITE_STATUS_CALLBACK>) -> u32374 pub unsafe fn RmShutdown(dwsessionhandle: u32, lactionflags: u32, fnstatus: ::std::option::Option<RM_WRITE_STATUS_CALLBACK>) -> u32 {
375     #[cfg(windows)]
376     {
377         #[link(name = "windows")]
378         extern "system" {
379             fn RmShutdown(dwsessionhandle: u32, lactionflags: u32, fnstatus: ::windows::runtime::RawPtr) -> u32;
380         }
381         ::std::mem::transmute(RmShutdown(::std::mem::transmute(dwsessionhandle), ::std::mem::transmute(lactionflags), ::std::mem::transmute(fnstatus)))
382     }
383     #[cfg(not(windows))]
384     unimplemented!("Unsupported target OS");
385 }
386 #[cfg(feature = "Win32_Foundation")]
387 #[inline]
RmStartSession(psessionhandle: *mut u32, dwsessionflags: u32, strsessionkey: super::super::Foundation::PWSTR) -> u32388 pub unsafe fn RmStartSession(psessionhandle: *mut u32, dwsessionflags: u32, strsessionkey: super::super::Foundation::PWSTR) -> u32 {
389     #[cfg(windows)]
390     {
391         #[link(name = "windows")]
392         extern "system" {
393             fn RmStartSession(psessionhandle: *mut u32, dwsessionflags: u32, strsessionkey: super::super::Foundation::PWSTR) -> u32;
394         }
395         ::std::mem::transmute(RmStartSession(::std::mem::transmute(psessionhandle), ::std::mem::transmute(dwsessionflags), ::std::mem::transmute(strsessionkey)))
396     }
397     #[cfg(not(windows))]
398     unimplemented!("Unsupported target OS");
399 }
400