1 #![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)]
2 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
3 #[repr(transparent)]
4 pub struct ENTERPRISE_DATA_POLICIES(pub u32);
5 pub const ENTERPRISE_POLICY_NONE: ENTERPRISE_DATA_POLICIES = ENTERPRISE_DATA_POLICIES(0u32);
6 pub const ENTERPRISE_POLICY_ALLOWED: ENTERPRISE_DATA_POLICIES = ENTERPRISE_DATA_POLICIES(1u32);
7 pub const ENTERPRISE_POLICY_ENLIGHTENED: ENTERPRISE_DATA_POLICIES = ENTERPRISE_DATA_POLICIES(2u32);
8 pub const ENTERPRISE_POLICY_EXEMPT: ENTERPRISE_DATA_POLICIES = ENTERPRISE_DATA_POLICIES(4u32);
9 impl ::std::convert::From<u32> for ENTERPRISE_DATA_POLICIES {
from(value: u32) -> Self10 fn from(value: u32) -> Self {
11 Self(value)
12 }
13 }
14 unsafe impl ::windows::runtime::Abi for ENTERPRISE_DATA_POLICIES {
15 type Abi = Self;
16 type DefaultType = Self;
17 }
18 impl ::std::ops::BitOr for ENTERPRISE_DATA_POLICIES {
19 type Output = Self;
bitor(self, rhs: Self) -> Self20 fn bitor(self, rhs: Self) -> Self {
21 Self(self.0 | rhs.0)
22 }
23 }
24 impl ::std::ops::BitAnd for ENTERPRISE_DATA_POLICIES {
25 type Output = Self;
bitand(self, rhs: Self) -> Self26 fn bitand(self, rhs: Self) -> Self {
27 Self(self.0 & rhs.0)
28 }
29 }
30 impl ::std::ops::BitOrAssign for ENTERPRISE_DATA_POLICIES {
bitor_assign(&mut self, rhs: Self)31 fn bitor_assign(&mut self, rhs: Self) {
32 self.0.bitor_assign(rhs.0)
33 }
34 }
35 impl ::std::ops::BitAndAssign for ENTERPRISE_DATA_POLICIES {
bitand_assign(&mut self, rhs: Self)36 fn bitand_assign(&mut self, rhs: Self) {
37 self.0.bitand_assign(rhs.0)
38 }
39 }
40 impl ::std::ops::Not for ENTERPRISE_DATA_POLICIES {
41 type Output = Self;
not(self) -> Self42 fn not(self) -> Self {
43 Self(self.0.not())
44 }
45 }
46 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
47 #[repr(C)]
48 pub struct FILE_UNPROTECT_OPTIONS {
49 pub audit: bool,
50 }
51 impl FILE_UNPROTECT_OPTIONS {}
52 impl ::std::default::Default for FILE_UNPROTECT_OPTIONS {
default() -> Self53 fn default() -> Self {
54 unsafe { ::std::mem::zeroed() }
55 }
56 }
57 impl ::std::fmt::Debug for FILE_UNPROTECT_OPTIONS {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result58 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
59 fmt.debug_struct("FILE_UNPROTECT_OPTIONS").field("audit", &self.audit).finish()
60 }
61 }
62 impl ::std::cmp::PartialEq for FILE_UNPROTECT_OPTIONS {
eq(&self, other: &Self) -> bool63 fn eq(&self, other: &Self) -> bool {
64 self.audit == other.audit
65 }
66 }
67 impl ::std::cmp::Eq for FILE_UNPROTECT_OPTIONS {}
68 unsafe impl ::windows::runtime::Abi for FILE_UNPROTECT_OPTIONS {
69 type Abi = Self;
70 type DefaultType = Self;
71 }
72 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
73 #[repr(C)]
74 #[cfg(feature = "Win32_Foundation")]
75 pub struct HTHREAD_NETWORK_CONTEXT {
76 pub ThreadId: u32,
77 pub ThreadContext: super::super::Foundation::HANDLE,
78 }
79 #[cfg(feature = "Win32_Foundation")]
80 impl HTHREAD_NETWORK_CONTEXT {}
81 #[cfg(feature = "Win32_Foundation")]
82 impl ::std::default::Default for HTHREAD_NETWORK_CONTEXT {
default() -> Self83 fn default() -> Self {
84 unsafe { ::std::mem::zeroed() }
85 }
86 }
87 #[cfg(feature = "Win32_Foundation")]
88 impl ::std::fmt::Debug for HTHREAD_NETWORK_CONTEXT {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result89 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
90 fmt.debug_struct("HTHREAD_NETWORK_CONTEXT").field("ThreadId", &self.ThreadId).field("ThreadContext", &self.ThreadContext).finish()
91 }
92 }
93 #[cfg(feature = "Win32_Foundation")]
94 impl ::std::cmp::PartialEq for HTHREAD_NETWORK_CONTEXT {
eq(&self, other: &Self) -> bool95 fn eq(&self, other: &Self) -> bool {
96 self.ThreadId == other.ThreadId && self.ThreadContext == other.ThreadContext
97 }
98 }
99 #[cfg(feature = "Win32_Foundation")]
100 impl ::std::cmp::Eq for HTHREAD_NETWORK_CONTEXT {}
101 #[cfg(feature = "Win32_Foundation")]
102 unsafe impl ::windows::runtime::Abi for HTHREAD_NETWORK_CONTEXT {
103 type Abi = Self;
104 type DefaultType = Self;
105 }
106 #[repr(transparent)]
107 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)]
108 pub struct IProtectionPolicyManagerInterop(::windows::runtime::IUnknown);
109 impl IProtectionPolicyManagerInterop {
110 #[cfg(feature = "Win32_Foundation")]
RequestAccessForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>(&self, appwindow: Param0, sourceidentity: Param1, targetidentity: Param2) -> ::windows::runtime::Result<T>111 pub unsafe fn RequestAccessForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>(&self, appwindow: Param0, sourceidentity: Param1, targetidentity: Param2) -> ::windows::runtime::Result<T> {
112 let mut result__ = ::std::option::Option::None;
113 (::windows::runtime::Interface::vtable(self).6)(::std::mem::transmute_copy(self), appwindow.into_param().abi(), sourceidentity.into_param().abi(), targetidentity.into_param().abi(), &<T as ::windows::runtime::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
114 }
115 #[cfg(feature = "Win32_Foundation")]
GetForWindow<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, T: ::windows::runtime::Interface>(&self, appwindow: Param0) -> ::windows::runtime::Result<T>116 pub unsafe fn GetForWindow<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, T: ::windows::runtime::Interface>(&self, appwindow: Param0) -> ::windows::runtime::Result<T> {
117 let mut result__ = ::std::option::Option::None;
118 (::windows::runtime::Interface::vtable(self).7)(::std::mem::transmute_copy(self), appwindow.into_param().abi(), &<T as ::windows::runtime::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
119 }
120 }
121 unsafe impl ::windows::runtime::Interface for IProtectionPolicyManagerInterop {
122 type Vtable = IProtectionPolicyManagerInterop_abi;
123 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1179804957, 49662, 19361, [159, 10, 192, 245, 101, 150, 247, 33]);
124 }
125 impl ::std::convert::From<IProtectionPolicyManagerInterop> for ::windows::runtime::IUnknown {
from(value: IProtectionPolicyManagerInterop) -> Self126 fn from(value: IProtectionPolicyManagerInterop) -> Self {
127 unsafe { ::std::mem::transmute(value) }
128 }
129 }
130 impl ::std::convert::From<&IProtectionPolicyManagerInterop> for ::windows::runtime::IUnknown {
from(value: &IProtectionPolicyManagerInterop) -> Self131 fn from(value: &IProtectionPolicyManagerInterop) -> Self {
132 ::std::convert::From::from(::std::clone::Clone::clone(value))
133 }
134 }
135 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IProtectionPolicyManagerInterop {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>136 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
137 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self))
138 }
139 }
140 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IProtectionPolicyManagerInterop {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>141 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
142 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self)))
143 }
144 }
145 #[repr(C)]
146 #[doc(hidden)]
147 pub struct IProtectionPolicyManagerInterop_abi(
148 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
149 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
150 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
151 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT,
152 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
153 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT,
154 #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, appwindow: super::super::Foundation::HWND, sourceidentity: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, targetidentity: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, riid: *const ::windows::runtime::GUID, asyncoperation: *mut *mut ::std::ffi::c_void) -> ::windows::runtime::HRESULT,
155 #[cfg(not(feature = "Win32_Foundation"))] usize,
156 #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, appwindow: super::super::Foundation::HWND, riid: *const ::windows::runtime::GUID, result: *mut *mut ::std::ffi::c_void) -> ::windows::runtime::HRESULT,
157 #[cfg(not(feature = "Win32_Foundation"))] usize,
158 );
159 #[repr(transparent)]
160 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)]
161 pub struct IProtectionPolicyManagerInterop2(::windows::runtime::IUnknown);
162 impl IProtectionPolicyManagerInterop2 {
163 #[cfg(feature = "Win32_Foundation")]
RequestAccessForAppWithWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>(&self, appwindow: Param0, sourceidentity: Param1, apppackagefamilyname: Param2) -> ::windows::runtime::Result<T>164 pub unsafe fn RequestAccessForAppWithWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>(&self, appwindow: Param0, sourceidentity: Param1, apppackagefamilyname: Param2) -> ::windows::runtime::Result<T> {
165 let mut result__ = ::std::option::Option::None;
166 (::windows::runtime::Interface::vtable(self).6)(::std::mem::transmute_copy(self), appwindow.into_param().abi(), sourceidentity.into_param().abi(), apppackagefamilyname.into_param().abi(), &<T as ::windows::runtime::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
167 }
168 #[cfg(feature = "Win32_Foundation")]
RequestAccessWithAuditingInfoForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, T: ::windows::runtime::Interface>( &self, appwindow: Param0, sourceidentity: Param1, targetidentity: Param2, auditinfounk: Param3, ) -> ::windows::runtime::Result<T>169 pub unsafe fn RequestAccessWithAuditingInfoForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, T: ::windows::runtime::Interface>(
170 &self,
171 appwindow: Param0,
172 sourceidentity: Param1,
173 targetidentity: Param2,
174 auditinfounk: Param3,
175 ) -> ::windows::runtime::Result<T> {
176 let mut result__ = ::std::option::Option::None;
177 (::windows::runtime::Interface::vtable(self).7)(::std::mem::transmute_copy(self), appwindow.into_param().abi(), sourceidentity.into_param().abi(), targetidentity.into_param().abi(), auditinfounk.into_param().abi(), &<T as ::windows::runtime::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
178 }
179 #[cfg(feature = "Win32_Foundation")]
RequestAccessWithMessageForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param4: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>( &self, appwindow: Param0, sourceidentity: Param1, targetidentity: Param2, auditinfounk: Param3, messagefromapp: Param4, ) -> ::windows::runtime::Result<T>180 pub unsafe fn RequestAccessWithMessageForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param4: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>(
181 &self,
182 appwindow: Param0,
183 sourceidentity: Param1,
184 targetidentity: Param2,
185 auditinfounk: Param3,
186 messagefromapp: Param4,
187 ) -> ::windows::runtime::Result<T> {
188 let mut result__ = ::std::option::Option::None;
189 (::windows::runtime::Interface::vtable(self).8)(::std::mem::transmute_copy(self), appwindow.into_param().abi(), sourceidentity.into_param().abi(), targetidentity.into_param().abi(), auditinfounk.into_param().abi(), messagefromapp.into_param().abi(), &<T as ::windows::runtime::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
190 }
191 #[cfg(feature = "Win32_Foundation")]
RequestAccessForAppWithAuditingInfoForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, T: ::windows::runtime::Interface>( &self, appwindow: Param0, sourceidentity: Param1, apppackagefamilyname: Param2, auditinfounk: Param3, ) -> ::windows::runtime::Result<T>192 pub unsafe fn RequestAccessForAppWithAuditingInfoForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, T: ::windows::runtime::Interface>(
193 &self,
194 appwindow: Param0,
195 sourceidentity: Param1,
196 apppackagefamilyname: Param2,
197 auditinfounk: Param3,
198 ) -> ::windows::runtime::Result<T> {
199 let mut result__ = ::std::option::Option::None;
200 (::windows::runtime::Interface::vtable(self).9)(::std::mem::transmute_copy(self), appwindow.into_param().abi(), sourceidentity.into_param().abi(), apppackagefamilyname.into_param().abi(), auditinfounk.into_param().abi(), &<T as ::windows::runtime::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
201 }
202 #[cfg(feature = "Win32_Foundation")]
RequestAccessForAppWithMessageForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param4: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>( &self, appwindow: Param0, sourceidentity: Param1, apppackagefamilyname: Param2, auditinfounk: Param3, messagefromapp: Param4, ) -> ::windows::runtime::Result<T>203 pub unsafe fn RequestAccessForAppWithMessageForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param4: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>(
204 &self,
205 appwindow: Param0,
206 sourceidentity: Param1,
207 apppackagefamilyname: Param2,
208 auditinfounk: Param3,
209 messagefromapp: Param4,
210 ) -> ::windows::runtime::Result<T> {
211 let mut result__ = ::std::option::Option::None;
212 (::windows::runtime::Interface::vtable(self).10)(::std::mem::transmute_copy(self), appwindow.into_param().abi(), sourceidentity.into_param().abi(), apppackagefamilyname.into_param().abi(), auditinfounk.into_param().abi(), messagefromapp.into_param().abi(), &<T as ::windows::runtime::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
213 }
214 }
215 unsafe impl ::windows::runtime::Interface for IProtectionPolicyManagerInterop2 {
216 type Vtable = IProtectionPolicyManagerInterop2_abi;
217 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(360512484, 42893, 16726, [179, 132, 97, 253, 172, 65, 230, 134]);
218 }
219 impl ::std::convert::From<IProtectionPolicyManagerInterop2> for ::windows::runtime::IUnknown {
from(value: IProtectionPolicyManagerInterop2) -> Self220 fn from(value: IProtectionPolicyManagerInterop2) -> Self {
221 unsafe { ::std::mem::transmute(value) }
222 }
223 }
224 impl ::std::convert::From<&IProtectionPolicyManagerInterop2> for ::windows::runtime::IUnknown {
from(value: &IProtectionPolicyManagerInterop2) -> Self225 fn from(value: &IProtectionPolicyManagerInterop2) -> Self {
226 ::std::convert::From::from(::std::clone::Clone::clone(value))
227 }
228 }
229 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IProtectionPolicyManagerInterop2 {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>230 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
231 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self))
232 }
233 }
234 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IProtectionPolicyManagerInterop2 {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>235 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
236 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self)))
237 }
238 }
239 #[repr(C)]
240 #[doc(hidden)]
241 pub struct IProtectionPolicyManagerInterop2_abi(
242 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
243 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
244 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
245 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT,
246 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
247 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT,
248 #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, appwindow: super::super::Foundation::HWND, sourceidentity: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, apppackagefamilyname: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, riid: *const ::windows::runtime::GUID, asyncoperation: *mut *mut ::std::ffi::c_void) -> ::windows::runtime::HRESULT,
249 #[cfg(not(feature = "Win32_Foundation"))] usize,
250 #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, appwindow: super::super::Foundation::HWND, sourceidentity: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, targetidentity: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, auditinfounk: ::windows::runtime::RawPtr, riid: *const ::windows::runtime::GUID, asyncoperation: *mut *mut ::std::ffi::c_void) -> ::windows::runtime::HRESULT,
251 #[cfg(not(feature = "Win32_Foundation"))] usize,
252 #[cfg(feature = "Win32_Foundation")]
253 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, appwindow: super::super::Foundation::HWND, sourceidentity: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, targetidentity: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, auditinfounk: ::windows::runtime::RawPtr, messagefromapp: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, riid: *const ::windows::runtime::GUID, asyncoperation: *mut *mut ::std::ffi::c_void) -> ::windows::runtime::HRESULT,
254 #[cfg(not(feature = "Win32_Foundation"))] usize,
255 #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, appwindow: super::super::Foundation::HWND, sourceidentity: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, apppackagefamilyname: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, auditinfounk: ::windows::runtime::RawPtr, riid: *const ::windows::runtime::GUID, asyncoperation: *mut *mut ::std::ffi::c_void) -> ::windows::runtime::HRESULT,
256 #[cfg(not(feature = "Win32_Foundation"))] usize,
257 #[cfg(feature = "Win32_Foundation")]
258 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, appwindow: super::super::Foundation::HWND, sourceidentity: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, apppackagefamilyname: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, auditinfounk: ::windows::runtime::RawPtr, messagefromapp: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, riid: *const ::windows::runtime::GUID, asyncoperation: *mut *mut ::std::ffi::c_void) -> ::windows::runtime::HRESULT,
259 #[cfg(not(feature = "Win32_Foundation"))] usize,
260 );
261 #[repr(transparent)]
262 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)]
263 pub struct IProtectionPolicyManagerInterop3(::windows::runtime::IUnknown);
264 impl IProtectionPolicyManagerInterop3 {
265 #[cfg(feature = "Win32_Foundation")]
RequestAccessWithBehaviorForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param4: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>( &self, appwindow: Param0, sourceidentity: Param1, targetidentity: Param2, auditinfounk: Param3, messagefromapp: Param4, behavior: u32, ) -> ::windows::runtime::Result<T>266 pub unsafe fn RequestAccessWithBehaviorForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param4: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>(
267 &self,
268 appwindow: Param0,
269 sourceidentity: Param1,
270 targetidentity: Param2,
271 auditinfounk: Param3,
272 messagefromapp: Param4,
273 behavior: u32,
274 ) -> ::windows::runtime::Result<T> {
275 let mut result__ = ::std::option::Option::None;
276 (::windows::runtime::Interface::vtable(self).6)(
277 ::std::mem::transmute_copy(self),
278 appwindow.into_param().abi(),
279 sourceidentity.into_param().abi(),
280 targetidentity.into_param().abi(),
281 auditinfounk.into_param().abi(),
282 messagefromapp.into_param().abi(),
283 ::std::mem::transmute(behavior),
284 &<T as ::windows::runtime::Interface>::IID,
285 &mut result__ as *mut _ as *mut _,
286 )
287 .and_some(result__)
288 }
289 #[cfg(feature = "Win32_Foundation")]
RequestAccessForAppWithBehaviorForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param4: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>( &self, appwindow: Param0, sourceidentity: Param1, apppackagefamilyname: Param2, auditinfounk: Param3, messagefromapp: Param4, behavior: u32, ) -> ::windows::runtime::Result<T>290 pub unsafe fn RequestAccessForAppWithBehaviorForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param4: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>(
291 &self,
292 appwindow: Param0,
293 sourceidentity: Param1,
294 apppackagefamilyname: Param2,
295 auditinfounk: Param3,
296 messagefromapp: Param4,
297 behavior: u32,
298 ) -> ::windows::runtime::Result<T> {
299 let mut result__ = ::std::option::Option::None;
300 (::windows::runtime::Interface::vtable(self).7)(
301 ::std::mem::transmute_copy(self),
302 appwindow.into_param().abi(),
303 sourceidentity.into_param().abi(),
304 apppackagefamilyname.into_param().abi(),
305 auditinfounk.into_param().abi(),
306 messagefromapp.into_param().abi(),
307 ::std::mem::transmute(behavior),
308 &<T as ::windows::runtime::Interface>::IID,
309 &mut result__ as *mut _ as *mut _,
310 )
311 .and_some(result__)
312 }
313 #[cfg(feature = "Win32_Foundation")]
RequestAccessToFilesForAppForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, T: ::windows::runtime::Interface>( &self, appwindow: Param0, sourceitemlistunk: Param1, apppackagefamilyname: Param2, auditinfounk: Param3, ) -> ::windows::runtime::Result<T>314 pub unsafe fn RequestAccessToFilesForAppForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, T: ::windows::runtime::Interface>(
315 &self,
316 appwindow: Param0,
317 sourceitemlistunk: Param1,
318 apppackagefamilyname: Param2,
319 auditinfounk: Param3,
320 ) -> ::windows::runtime::Result<T> {
321 let mut result__ = ::std::option::Option::None;
322 (::windows::runtime::Interface::vtable(self).8)(::std::mem::transmute_copy(self), appwindow.into_param().abi(), sourceitemlistunk.into_param().abi(), apppackagefamilyname.into_param().abi(), auditinfounk.into_param().abi(), &<T as ::windows::runtime::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
323 }
324 #[cfg(feature = "Win32_Foundation")]
RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param4: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>( &self, appwindow: Param0, sourceitemlistunk: Param1, apppackagefamilyname: Param2, auditinfounk: Param3, messagefromapp: Param4, behavior: u32, ) -> ::windows::runtime::Result<T>325 pub unsafe fn RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param2: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param4: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>(
326 &self,
327 appwindow: Param0,
328 sourceitemlistunk: Param1,
329 apppackagefamilyname: Param2,
330 auditinfounk: Param3,
331 messagefromapp: Param4,
332 behavior: u32,
333 ) -> ::windows::runtime::Result<T> {
334 let mut result__ = ::std::option::Option::None;
335 (::windows::runtime::Interface::vtable(self).9)(
336 ::std::mem::transmute_copy(self),
337 appwindow.into_param().abi(),
338 sourceitemlistunk.into_param().abi(),
339 apppackagefamilyname.into_param().abi(),
340 auditinfounk.into_param().abi(),
341 messagefromapp.into_param().abi(),
342 ::std::mem::transmute(behavior),
343 &<T as ::windows::runtime::Interface>::IID,
344 &mut result__ as *mut _ as *mut _,
345 )
346 .and_some(result__)
347 }
348 #[cfg(feature = "Win32_Foundation")]
RequestAccessToFilesForProcessForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, T: ::windows::runtime::Interface>(&self, appwindow: Param0, sourceitemlistunk: Param1, processid: u32, auditinfounk: Param3) -> ::windows::runtime::Result<T>349 pub unsafe fn RequestAccessToFilesForProcessForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, T: ::windows::runtime::Interface>(&self, appwindow: Param0, sourceitemlistunk: Param1, processid: u32, auditinfounk: Param3) -> ::windows::runtime::Result<T> {
350 let mut result__ = ::std::option::Option::None;
351 (::windows::runtime::Interface::vtable(self).10)(::std::mem::transmute_copy(self), appwindow.into_param().abi(), sourceitemlistunk.into_param().abi(), ::std::mem::transmute(processid), auditinfounk.into_param().abi(), &<T as ::windows::runtime::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
352 }
353 #[cfg(feature = "Win32_Foundation")]
RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param4: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>( &self, appwindow: Param0, sourceitemlistunk: Param1, processid: u32, auditinfounk: Param3, messagefromapp: Param4, behavior: u32, ) -> ::windows::runtime::Result<T>354 pub unsafe fn RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param3: ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown>, Param4: ::windows::runtime::IntoParam<'a, ::windows::runtime::HSTRING>, T: ::windows::runtime::Interface>(
355 &self,
356 appwindow: Param0,
357 sourceitemlistunk: Param1,
358 processid: u32,
359 auditinfounk: Param3,
360 messagefromapp: Param4,
361 behavior: u32,
362 ) -> ::windows::runtime::Result<T> {
363 let mut result__ = ::std::option::Option::None;
364 (::windows::runtime::Interface::vtable(self).11)(
365 ::std::mem::transmute_copy(self),
366 appwindow.into_param().abi(),
367 sourceitemlistunk.into_param().abi(),
368 ::std::mem::transmute(processid),
369 auditinfounk.into_param().abi(),
370 messagefromapp.into_param().abi(),
371 ::std::mem::transmute(behavior),
372 &<T as ::windows::runtime::Interface>::IID,
373 &mut result__ as *mut _ as *mut _,
374 )
375 .and_some(result__)
376 }
377 }
378 unsafe impl ::windows::runtime::Interface for IProtectionPolicyManagerInterop3 {
379 type Vtable = IProtectionPolicyManagerInterop3_abi;
380 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(3250600243, 45976, 19859, [176, 253, 41, 114, 173, 248, 2, 194]);
381 }
382 impl ::std::convert::From<IProtectionPolicyManagerInterop3> for ::windows::runtime::IUnknown {
from(value: IProtectionPolicyManagerInterop3) -> Self383 fn from(value: IProtectionPolicyManagerInterop3) -> Self {
384 unsafe { ::std::mem::transmute(value) }
385 }
386 }
387 impl ::std::convert::From<&IProtectionPolicyManagerInterop3> for ::windows::runtime::IUnknown {
from(value: &IProtectionPolicyManagerInterop3) -> Self388 fn from(value: &IProtectionPolicyManagerInterop3) -> Self {
389 ::std::convert::From::from(::std::clone::Clone::clone(value))
390 }
391 }
392 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IProtectionPolicyManagerInterop3 {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>393 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
394 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self))
395 }
396 }
397 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IProtectionPolicyManagerInterop3 {
into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>398 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
399 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self)))
400 }
401 }
402 #[repr(C)]
403 #[doc(hidden)]
404 pub struct IProtectionPolicyManagerInterop3_abi(
405 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
406 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
407 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
408 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT,
409 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
410 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT,
411 #[cfg(feature = "Win32_Foundation")]
412 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, appwindow: super::super::Foundation::HWND, sourceidentity: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, targetidentity: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, auditinfounk: ::windows::runtime::RawPtr, messagefromapp: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, behavior: u32, riid: *const ::windows::runtime::GUID, asyncoperation: *mut *mut ::std::ffi::c_void) -> ::windows::runtime::HRESULT,
413 #[cfg(not(feature = "Win32_Foundation"))] usize,
414 #[cfg(feature = "Win32_Foundation")]
415 pub unsafe extern "system" fn(
416 this: ::windows::runtime::RawPtr,
417 appwindow: super::super::Foundation::HWND,
418 sourceidentity: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>,
419 apppackagefamilyname: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>,
420 auditinfounk: ::windows::runtime::RawPtr,
421 messagefromapp: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>,
422 behavior: u32,
423 riid: *const ::windows::runtime::GUID,
424 asyncoperation: *mut *mut ::std::ffi::c_void,
425 ) -> ::windows::runtime::HRESULT,
426 #[cfg(not(feature = "Win32_Foundation"))] usize,
427 #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, appwindow: super::super::Foundation::HWND, sourceitemlistunk: ::windows::runtime::RawPtr, apppackagefamilyname: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, auditinfounk: ::windows::runtime::RawPtr, riid: *const ::windows::runtime::GUID, asyncoperation: *mut *mut ::std::ffi::c_void) -> ::windows::runtime::HRESULT,
428 #[cfg(not(feature = "Win32_Foundation"))] usize,
429 #[cfg(feature = "Win32_Foundation")]
430 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, appwindow: super::super::Foundation::HWND, sourceitemlistunk: ::windows::runtime::RawPtr, apppackagefamilyname: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, auditinfounk: ::windows::runtime::RawPtr, messagefromapp: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, behavior: u32, riid: *const ::windows::runtime::GUID, asyncoperation: *mut *mut ::std::ffi::c_void) -> ::windows::runtime::HRESULT,
431 #[cfg(not(feature = "Win32_Foundation"))] usize,
432 #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, appwindow: super::super::Foundation::HWND, sourceitemlistunk: ::windows::runtime::RawPtr, processid: u32, auditinfounk: ::windows::runtime::RawPtr, riid: *const ::windows::runtime::GUID, asyncoperation: *mut *mut ::std::ffi::c_void) -> ::windows::runtime::HRESULT,
433 #[cfg(not(feature = "Win32_Foundation"))] usize,
434 #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, appwindow: super::super::Foundation::HWND, sourceitemlistunk: ::windows::runtime::RawPtr, processid: u32, auditinfounk: ::windows::runtime::RawPtr, messagefromapp: ::std::mem::ManuallyDrop<::windows::runtime::HSTRING>, behavior: u32, riid: *const ::windows::runtime::GUID, asyncoperation: *mut *mut ::std::ffi::c_void) -> ::windows::runtime::HRESULT,
435 #[cfg(not(feature = "Win32_Foundation"))] usize,
436 );
437 #[cfg(feature = "Win32_Foundation")]
438 #[inline]
ProtectFileToEnterpriseIdentity<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(fileorfolderpath: Param0, identity: Param1) -> ::windows::runtime::Result<()>439 pub unsafe fn ProtectFileToEnterpriseIdentity<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(fileorfolderpath: Param0, identity: Param1) -> ::windows::runtime::Result<()> {
440 #[cfg(windows)]
441 {
442 #[link(name = "windows")]
443 extern "system" {
444 fn ProtectFileToEnterpriseIdentity(fileorfolderpath: super::super::Foundation::PWSTR, identity: super::super::Foundation::PWSTR) -> ::windows::runtime::HRESULT;
445 }
446 ProtectFileToEnterpriseIdentity(fileorfolderpath.into_param().abi(), identity.into_param().abi()).ok()
447 }
448 #[cfg(not(windows))]
449 unimplemented!("Unsupported target OS");
450 }
451 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
452 #[repr(transparent)]
453 pub struct SRPHOSTING_TYPE(pub i32);
454 pub const SRPHOSTING_TYPE_NONE: SRPHOSTING_TYPE = SRPHOSTING_TYPE(0i32);
455 pub const SRPHOSTING_TYPE_WINHTTP: SRPHOSTING_TYPE = SRPHOSTING_TYPE(1i32);
456 pub const SRPHOSTING_TYPE_WININET: SRPHOSTING_TYPE = SRPHOSTING_TYPE(2i32);
457 impl ::std::convert::From<i32> for SRPHOSTING_TYPE {
from(value: i32) -> Self458 fn from(value: i32) -> Self {
459 Self(value)
460 }
461 }
462 unsafe impl ::windows::runtime::Abi for SRPHOSTING_TYPE {
463 type Abi = Self;
464 type DefaultType = Self;
465 }
466 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
467 #[repr(transparent)]
468 pub struct SRPHOSTING_VERSION(pub i32);
469 pub const SRPHOSTING_VERSION1: SRPHOSTING_VERSION = SRPHOSTING_VERSION(1i32);
470 impl ::std::convert::From<i32> for SRPHOSTING_VERSION {
from(value: i32) -> Self471 fn from(value: i32) -> Self {
472 Self(value)
473 }
474 }
475 unsafe impl ::windows::runtime::Abi for SRPHOSTING_VERSION {
476 type Abi = Self;
477 type DefaultType = Self;
478 }
479 #[cfg(feature = "Win32_Foundation")]
480 #[inline]
SrpCloseThreadNetworkContext(threadnetworkcontext: *mut HTHREAD_NETWORK_CONTEXT) -> ::windows::runtime::Result<()>481 pub unsafe fn SrpCloseThreadNetworkContext(threadnetworkcontext: *mut HTHREAD_NETWORK_CONTEXT) -> ::windows::runtime::Result<()> {
482 #[cfg(windows)]
483 {
484 #[link(name = "windows")]
485 extern "system" {
486 fn SrpCloseThreadNetworkContext(threadnetworkcontext: *mut HTHREAD_NETWORK_CONTEXT) -> ::windows::runtime::HRESULT;
487 }
488 SrpCloseThreadNetworkContext(::std::mem::transmute(threadnetworkcontext)).ok()
489 }
490 #[cfg(not(windows))]
491 unimplemented!("Unsupported target OS");
492 }
493 #[cfg(feature = "Win32_Foundation")]
494 #[inline]
SrpCreateThreadNetworkContext<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(enterpriseid: Param0) -> ::windows::runtime::Result<HTHREAD_NETWORK_CONTEXT>495 pub unsafe fn SrpCreateThreadNetworkContext<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(enterpriseid: Param0) -> ::windows::runtime::Result<HTHREAD_NETWORK_CONTEXT> {
496 #[cfg(windows)]
497 {
498 #[link(name = "windows")]
499 extern "system" {
500 fn SrpCreateThreadNetworkContext(enterpriseid: super::super::Foundation::PWSTR, threadnetworkcontext: *mut HTHREAD_NETWORK_CONTEXT) -> ::windows::runtime::HRESULT;
501 }
502 let mut result__: <HTHREAD_NETWORK_CONTEXT as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed();
503 SrpCreateThreadNetworkContext(enterpriseid.into_param().abi(), &mut result__).from_abi::<HTHREAD_NETWORK_CONTEXT>(result__)
504 }
505 #[cfg(not(windows))]
506 unimplemented!("Unsupported target OS");
507 }
508 #[inline]
SrpDisablePermissiveModeFileEncryption() -> ::windows::runtime::Result<()>509 pub unsafe fn SrpDisablePermissiveModeFileEncryption() -> ::windows::runtime::Result<()> {
510 #[cfg(windows)]
511 {
512 #[link(name = "windows")]
513 extern "system" {
514 fn SrpDisablePermissiveModeFileEncryption() -> ::windows::runtime::HRESULT;
515 }
516 SrpDisablePermissiveModeFileEncryption().ok()
517 }
518 #[cfg(not(windows))]
519 unimplemented!("Unsupported target OS");
520 }
521 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_Packaging_Appx"))]
522 #[inline]
SrpDoesPolicyAllowAppExecution(packageid: *const super::super::Storage::Packaging::Appx::PACKAGE_ID) -> ::windows::runtime::Result<super::super::Foundation::BOOL>523 pub unsafe fn SrpDoesPolicyAllowAppExecution(packageid: *const super::super::Storage::Packaging::Appx::PACKAGE_ID) -> ::windows::runtime::Result<super::super::Foundation::BOOL> {
524 #[cfg(windows)]
525 {
526 #[link(name = "windows")]
527 extern "system" {
528 fn SrpDoesPolicyAllowAppExecution(packageid: *const super::super::Storage::Packaging::Appx::PACKAGE_ID, isallowed: *mut super::super::Foundation::BOOL) -> ::windows::runtime::HRESULT;
529 }
530 let mut result__: <super::super::Foundation::BOOL as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed();
531 SrpDoesPolicyAllowAppExecution(::std::mem::transmute(packageid), &mut result__).from_abi::<super::super::Foundation::BOOL>(result__)
532 }
533 #[cfg(not(windows))]
534 unimplemented!("Unsupported target OS");
535 }
536 #[cfg(feature = "Win32_Foundation")]
537 #[inline]
SrpEnablePermissiveModeFileEncryption<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(enterpriseid: Param0) -> ::windows::runtime::Result<()>538 pub unsafe fn SrpEnablePermissiveModeFileEncryption<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(enterpriseid: Param0) -> ::windows::runtime::Result<()> {
539 #[cfg(windows)]
540 {
541 #[link(name = "windows")]
542 extern "system" {
543 fn SrpEnablePermissiveModeFileEncryption(enterpriseid: super::super::Foundation::PWSTR) -> ::windows::runtime::HRESULT;
544 }
545 SrpEnablePermissiveModeFileEncryption(enterpriseid.into_param().abi()).ok()
546 }
547 #[cfg(not(windows))]
548 unimplemented!("Unsupported target OS");
549 }
550 #[cfg(feature = "Win32_Foundation")]
551 #[inline]
SrpGetEnterpriseIds<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HANDLE>>(tokenhandle: Param0, numberofbytes: *mut u32, enterpriseids: *mut super::super::Foundation::PWSTR, enterpriseidcount: *mut u32) -> ::windows::runtime::Result<()>552 pub unsafe fn SrpGetEnterpriseIds<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HANDLE>>(tokenhandle: Param0, numberofbytes: *mut u32, enterpriseids: *mut super::super::Foundation::PWSTR, enterpriseidcount: *mut u32) -> ::windows::runtime::Result<()> {
553 #[cfg(windows)]
554 {
555 #[link(name = "windows")]
556 extern "system" {
557 fn SrpGetEnterpriseIds(tokenhandle: super::super::Foundation::HANDLE, numberofbytes: *mut u32, enterpriseids: *mut super::super::Foundation::PWSTR, enterpriseidcount: *mut u32) -> ::windows::runtime::HRESULT;
558 }
559 SrpGetEnterpriseIds(tokenhandle.into_param().abi(), ::std::mem::transmute(numberofbytes), ::std::mem::transmute(enterpriseids), ::std::mem::transmute(enterpriseidcount)).ok()
560 }
561 #[cfg(not(windows))]
562 unimplemented!("Unsupported target OS");
563 }
564 #[cfg(feature = "Win32_Foundation")]
565 #[inline]
SrpGetEnterprisePolicy<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HANDLE>>(tokenhandle: Param0) -> ::windows::runtime::Result<ENTERPRISE_DATA_POLICIES>566 pub unsafe fn SrpGetEnterprisePolicy<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HANDLE>>(tokenhandle: Param0) -> ::windows::runtime::Result<ENTERPRISE_DATA_POLICIES> {
567 #[cfg(windows)]
568 {
569 #[link(name = "windows")]
570 extern "system" {
571 fn SrpGetEnterprisePolicy(tokenhandle: super::super::Foundation::HANDLE, policyflags: *mut ENTERPRISE_DATA_POLICIES) -> ::windows::runtime::HRESULT;
572 }
573 let mut result__: <ENTERPRISE_DATA_POLICIES as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed();
574 SrpGetEnterprisePolicy(tokenhandle.into_param().abi(), &mut result__).from_abi::<ENTERPRISE_DATA_POLICIES>(result__)
575 }
576 #[cfg(not(windows))]
577 unimplemented!("Unsupported target OS");
578 }
579 #[inline]
SrpHostingInitialize(version: SRPHOSTING_VERSION, r#type: SRPHOSTING_TYPE, pvdata: *const ::std::ffi::c_void, cbdata: u32) -> ::windows::runtime::Result<()>580 pub unsafe fn SrpHostingInitialize(version: SRPHOSTING_VERSION, r#type: SRPHOSTING_TYPE, pvdata: *const ::std::ffi::c_void, cbdata: u32) -> ::windows::runtime::Result<()> {
581 #[cfg(windows)]
582 {
583 #[link(name = "windows")]
584 extern "system" {
585 fn SrpHostingInitialize(version: SRPHOSTING_VERSION, r#type: SRPHOSTING_TYPE, pvdata: *const ::std::ffi::c_void, cbdata: u32) -> ::windows::runtime::HRESULT;
586 }
587 SrpHostingInitialize(::std::mem::transmute(version), ::std::mem::transmute(r#type), ::std::mem::transmute(pvdata), ::std::mem::transmute(cbdata)).ok()
588 }
589 #[cfg(not(windows))]
590 unimplemented!("Unsupported target OS");
591 }
592 #[inline]
SrpHostingTerminate(r#type: SRPHOSTING_TYPE)593 pub unsafe fn SrpHostingTerminate(r#type: SRPHOSTING_TYPE) {
594 #[cfg(windows)]
595 {
596 #[link(name = "windows")]
597 extern "system" {
598 fn SrpHostingTerminate(r#type: SRPHOSTING_TYPE);
599 }
600 ::std::mem::transmute(SrpHostingTerminate(::std::mem::transmute(r#type)))
601 }
602 #[cfg(not(windows))]
603 unimplemented!("Unsupported target OS");
604 }
605 #[cfg(feature = "Win32_Foundation")]
606 #[inline]
SrpIsTokenService<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HANDLE>>(tokenhandle: Param0, istokenservice: *mut u8) -> ::windows::runtime::Result<()>607 pub unsafe fn SrpIsTokenService<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HANDLE>>(tokenhandle: Param0, istokenservice: *mut u8) -> ::windows::runtime::Result<()> {
608 #[cfg(windows)]
609 {
610 #[link(name = "windows")]
611 extern "system" {
612 fn SrpIsTokenService(tokenhandle: super::super::Foundation::HANDLE, istokenservice: *mut u8) -> super::super::Foundation::NTSTATUS;
613 }
614 SrpIsTokenService(tokenhandle.into_param().abi(), ::std::mem::transmute(istokenservice)).ok()
615 }
616 #[cfg(not(windows))]
617 unimplemented!("Unsupported target OS");
618 }
619 #[cfg(feature = "Win32_Foundation")]
620 #[inline]
SrpSetTokenEnterpriseId<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(tokenhandle: Param0, enterpriseid: Param1) -> ::windows::runtime::Result<()>621 pub unsafe fn SrpSetTokenEnterpriseId<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(tokenhandle: Param0, enterpriseid: Param1) -> ::windows::runtime::Result<()> {
622 #[cfg(windows)]
623 {
624 #[link(name = "windows")]
625 extern "system" {
626 fn SrpSetTokenEnterpriseId(tokenhandle: super::super::Foundation::HANDLE, enterpriseid: super::super::Foundation::PWSTR) -> ::windows::runtime::HRESULT;
627 }
628 SrpSetTokenEnterpriseId(tokenhandle.into_param().abi(), enterpriseid.into_param().abi()).ok()
629 }
630 #[cfg(not(windows))]
631 unimplemented!("Unsupported target OS");
632 }
633 #[cfg(feature = "Win32_Foundation")]
634 #[inline]
UnprotectFile<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(fileorfolderpath: Param0, options: *const FILE_UNPROTECT_OPTIONS) -> ::windows::runtime::Result<()>635 pub unsafe fn UnprotectFile<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::Foundation::PWSTR>>(fileorfolderpath: Param0, options: *const FILE_UNPROTECT_OPTIONS) -> ::windows::runtime::Result<()> {
636 #[cfg(windows)]
637 {
638 #[link(name = "windows")]
639 extern "system" {
640 fn UnprotectFile(fileorfolderpath: super::super::Foundation::PWSTR, options: *const FILE_UNPROTECT_OPTIONS) -> ::windows::runtime::HRESULT;
641 }
642 UnprotectFile(fileorfolderpath.into_param().abi(), ::std::mem::transmute(options)).ok()
643 }
644 #[cfg(not(windows))]
645 unimplemented!("Unsupported target OS");
646 }
647