]> git.proxmox.com Git - rustc.git/blame - vendor/windows/src/Windows/Win32/Networking/NetworkListManager/impl.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / Win32 / Networking / NetworkListManager / impl.rs
CommitLineData
353b0b11
FG
1#[doc = "*Required features: `\"Win32_Networking_NetworkListManager\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
2#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
3pub trait IEnumNetworkConnections_Impl: Sized + super::super::System::Com::IDispatch_Impl {
4 fn _NewEnum(&self) -> ::windows::core::Result<super::super::System::Ole::IEnumVARIANT>;
5 fn Next(&self, celt: u32, rgelt: *mut ::core::option::Option<INetworkConnection>, pceltfetched: *mut u32) -> ::windows::core::Result<()>;
6 fn Skip(&self, celt: u32) -> ::windows::core::Result<()>;
7 fn Reset(&self) -> ::windows::core::Result<()>;
8 fn Clone(&self) -> ::windows::core::Result<IEnumNetworkConnections>;
9}
10#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
11impl ::windows::core::RuntimeName for IEnumNetworkConnections {}
12#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
13impl IEnumNetworkConnections_Vtbl {
14 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetworkConnections_Impl, const OFFSET: isize>() -> IEnumNetworkConnections_Vtbl {
15 unsafe extern "system" fn _NewEnum<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetworkConnections_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppenumvar: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
16 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
17 let this = (*this).get_impl();
18 match this._NewEnum() {
19 ::core::result::Result::Ok(ok__) => {
20 ::core::ptr::write(ppenumvar, ::core::mem::transmute(ok__));
21 ::windows::core::HRESULT(0)
22 }
23 ::core::result::Result::Err(err) => err.into(),
24 }
25 }
26 unsafe extern "system" fn Next<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetworkConnections_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32, rgelt: *mut *mut ::core::ffi::c_void, pceltfetched: *mut u32) -> ::windows::core::HRESULT {
27 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
28 let this = (*this).get_impl();
29 this.Next(::core::mem::transmute_copy(&celt), ::core::mem::transmute_copy(&rgelt), ::core::mem::transmute_copy(&pceltfetched)).into()
30 }
31 unsafe extern "system" fn Skip<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetworkConnections_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32) -> ::windows::core::HRESULT {
32 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
33 let this = (*this).get_impl();
34 this.Skip(::core::mem::transmute_copy(&celt)).into()
35 }
36 unsafe extern "system" fn Reset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetworkConnections_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
37 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
38 let this = (*this).get_impl();
39 this.Reset().into()
40 }
41 unsafe extern "system" fn Clone<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetworkConnections_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppenumnetwork: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
42 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
43 let this = (*this).get_impl();
44 match this.Clone() {
45 ::core::result::Result::Ok(ok__) => {
46 ::core::ptr::write(ppenumnetwork, ::core::mem::transmute(ok__));
47 ::windows::core::HRESULT(0)
48 }
49 ::core::result::Result::Err(err) => err.into(),
50 }
51 }
52 Self {
53 base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
54 _NewEnum: _NewEnum::<Identity, Impl, OFFSET>,
55 Next: Next::<Identity, Impl, OFFSET>,
56 Skip: Skip::<Identity, Impl, OFFSET>,
57 Reset: Reset::<Identity, Impl, OFFSET>,
58 Clone: Clone::<Identity, Impl, OFFSET>,
59 }
60 }
61 pub fn matches(iid: &windows::core::GUID) -> bool {
62 iid == &<IEnumNetworkConnections as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
63 }
64}
65#[doc = "*Required features: `\"Win32_Networking_NetworkListManager\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
66#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
67pub trait IEnumNetworks_Impl: Sized + super::super::System::Com::IDispatch_Impl {
68 fn _NewEnum(&self) -> ::windows::core::Result<super::super::System::Ole::IEnumVARIANT>;
69 fn Next(&self, celt: u32, rgelt: *mut ::core::option::Option<INetwork>, pceltfetched: *mut u32) -> ::windows::core::Result<()>;
70 fn Skip(&self, celt: u32) -> ::windows::core::Result<()>;
71 fn Reset(&self) -> ::windows::core::Result<()>;
72 fn Clone(&self) -> ::windows::core::Result<IEnumNetworks>;
73}
74#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
75impl ::windows::core::RuntimeName for IEnumNetworks {}
76#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
77impl IEnumNetworks_Vtbl {
78 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetworks_Impl, const OFFSET: isize>() -> IEnumNetworks_Vtbl {
79 unsafe extern "system" fn _NewEnum<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetworks_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppenumvar: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
80 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
81 let this = (*this).get_impl();
82 match this._NewEnum() {
83 ::core::result::Result::Ok(ok__) => {
84 ::core::ptr::write(ppenumvar, ::core::mem::transmute(ok__));
85 ::windows::core::HRESULT(0)
86 }
87 ::core::result::Result::Err(err) => err.into(),
88 }
89 }
90 unsafe extern "system" fn Next<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetworks_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32, rgelt: *mut *mut ::core::ffi::c_void, pceltfetched: *mut u32) -> ::windows::core::HRESULT {
91 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
92 let this = (*this).get_impl();
93 this.Next(::core::mem::transmute_copy(&celt), ::core::mem::transmute_copy(&rgelt), ::core::mem::transmute_copy(&pceltfetched)).into()
94 }
95 unsafe extern "system" fn Skip<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetworks_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32) -> ::windows::core::HRESULT {
96 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
97 let this = (*this).get_impl();
98 this.Skip(::core::mem::transmute_copy(&celt)).into()
99 }
100 unsafe extern "system" fn Reset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetworks_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
101 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
102 let this = (*this).get_impl();
103 this.Reset().into()
104 }
105 unsafe extern "system" fn Clone<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetworks_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppenumnetwork: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
106 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
107 let this = (*this).get_impl();
108 match this.Clone() {
109 ::core::result::Result::Ok(ok__) => {
110 ::core::ptr::write(ppenumnetwork, ::core::mem::transmute(ok__));
111 ::windows::core::HRESULT(0)
112 }
113 ::core::result::Result::Err(err) => err.into(),
114 }
115 }
116 Self {
117 base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
118 _NewEnum: _NewEnum::<Identity, Impl, OFFSET>,
119 Next: Next::<Identity, Impl, OFFSET>,
120 Skip: Skip::<Identity, Impl, OFFSET>,
121 Reset: Reset::<Identity, Impl, OFFSET>,
122 Clone: Clone::<Identity, Impl, OFFSET>,
123 }
124 }
125 pub fn matches(iid: &windows::core::GUID) -> bool {
126 iid == &<IEnumNetworks as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
127 }
128}
129#[doc = "*Required features: `\"Win32_Networking_NetworkListManager\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
130#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
131pub trait INetwork_Impl: Sized + super::super::System::Com::IDispatch_Impl {
132 fn GetName(&self) -> ::windows::core::Result<::windows::core::BSTR>;
133 fn SetName(&self, sznetworknewname: &::windows::core::BSTR) -> ::windows::core::Result<()>;
134 fn GetDescription(&self) -> ::windows::core::Result<::windows::core::BSTR>;
135 fn SetDescription(&self, szdescription: &::windows::core::BSTR) -> ::windows::core::Result<()>;
136 fn GetNetworkId(&self) -> ::windows::core::Result<::windows::core::GUID>;
137 fn GetDomainType(&self) -> ::windows::core::Result<NLM_DOMAIN_TYPE>;
138 fn GetNetworkConnections(&self) -> ::windows::core::Result<IEnumNetworkConnections>;
139 fn GetTimeCreatedAndConnected(&self, pdwlowdatetimecreated: *mut u32, pdwhighdatetimecreated: *mut u32, pdwlowdatetimeconnected: *mut u32, pdwhighdatetimeconnected: *mut u32) -> ::windows::core::Result<()>;
140 fn IsConnectedToInternet(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
141 fn IsConnected(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
142 fn GetConnectivity(&self) -> ::windows::core::Result<NLM_CONNECTIVITY>;
143 fn GetCategory(&self) -> ::windows::core::Result<NLM_NETWORK_CATEGORY>;
144 fn SetCategory(&self, newcategory: NLM_NETWORK_CATEGORY) -> ::windows::core::Result<()>;
145}
146#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
147impl ::windows::core::RuntimeName for INetwork {}
148#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
149impl INetwork_Vtbl {
150 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>() -> INetwork_Vtbl {
151 unsafe extern "system" fn GetName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, psznetworkname: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
152 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
153 let this = (*this).get_impl();
154 match this.GetName() {
155 ::core::result::Result::Ok(ok__) => {
156 ::core::ptr::write(psznetworkname, ::core::mem::transmute(ok__));
157 ::windows::core::HRESULT(0)
158 }
159 ::core::result::Result::Err(err) => err.into(),
160 }
161 }
162 unsafe extern "system" fn SetName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, sznetworknewname: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
163 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
164 let this = (*this).get_impl();
165 this.SetName(::core::mem::transmute(&sznetworknewname)).into()
166 }
167 unsafe extern "system" fn GetDescription<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pszdescription: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
168 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
169 let this = (*this).get_impl();
170 match this.GetDescription() {
171 ::core::result::Result::Ok(ok__) => {
172 ::core::ptr::write(pszdescription, ::core::mem::transmute(ok__));
173 ::windows::core::HRESULT(0)
174 }
175 ::core::result::Result::Err(err) => err.into(),
176 }
177 }
178 unsafe extern "system" fn SetDescription<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, szdescription: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
179 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
180 let this = (*this).get_impl();
181 this.SetDescription(::core::mem::transmute(&szdescription)).into()
182 }
183 unsafe extern "system" fn GetNetworkId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pgdguidnetworkid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
184 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
185 let this = (*this).get_impl();
186 match this.GetNetworkId() {
187 ::core::result::Result::Ok(ok__) => {
188 ::core::ptr::write(pgdguidnetworkid, ::core::mem::transmute(ok__));
189 ::windows::core::HRESULT(0)
190 }
191 ::core::result::Result::Err(err) => err.into(),
192 }
193 }
194 unsafe extern "system" fn GetDomainType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pnetworktype: *mut NLM_DOMAIN_TYPE) -> ::windows::core::HRESULT {
195 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
196 let this = (*this).get_impl();
197 match this.GetDomainType() {
198 ::core::result::Result::Ok(ok__) => {
199 ::core::ptr::write(pnetworktype, ::core::mem::transmute(ok__));
200 ::windows::core::HRESULT(0)
201 }
202 ::core::result::Result::Err(err) => err.into(),
203 }
204 }
205 unsafe extern "system" fn GetNetworkConnections<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppenumnetworkconnection: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
206 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
207 let this = (*this).get_impl();
208 match this.GetNetworkConnections() {
209 ::core::result::Result::Ok(ok__) => {
210 ::core::ptr::write(ppenumnetworkconnection, ::core::mem::transmute(ok__));
211 ::windows::core::HRESULT(0)
212 }
213 ::core::result::Result::Err(err) => err.into(),
214 }
215 }
216 unsafe extern "system" fn GetTimeCreatedAndConnected<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwlowdatetimecreated: *mut u32, pdwhighdatetimecreated: *mut u32, pdwlowdatetimeconnected: *mut u32, pdwhighdatetimeconnected: *mut u32) -> ::windows::core::HRESULT {
217 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
218 let this = (*this).get_impl();
219 this.GetTimeCreatedAndConnected(::core::mem::transmute_copy(&pdwlowdatetimecreated), ::core::mem::transmute_copy(&pdwhighdatetimecreated), ::core::mem::transmute_copy(&pdwlowdatetimeconnected), ::core::mem::transmute_copy(&pdwhighdatetimeconnected)).into()
220 }
221 unsafe extern "system" fn IsConnectedToInternet<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbisconnected: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
222 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
223 let this = (*this).get_impl();
224 match this.IsConnectedToInternet() {
225 ::core::result::Result::Ok(ok__) => {
226 ::core::ptr::write(pbisconnected, ::core::mem::transmute(ok__));
227 ::windows::core::HRESULT(0)
228 }
229 ::core::result::Result::Err(err) => err.into(),
230 }
231 }
232 unsafe extern "system" fn IsConnected<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbisconnected: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
233 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
234 let this = (*this).get_impl();
235 match this.IsConnected() {
236 ::core::result::Result::Ok(ok__) => {
237 ::core::ptr::write(pbisconnected, ::core::mem::transmute(ok__));
238 ::windows::core::HRESULT(0)
239 }
240 ::core::result::Result::Err(err) => err.into(),
241 }
242 }
243 unsafe extern "system" fn GetConnectivity<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pconnectivity: *mut NLM_CONNECTIVITY) -> ::windows::core::HRESULT {
244 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
245 let this = (*this).get_impl();
246 match this.GetConnectivity() {
247 ::core::result::Result::Ok(ok__) => {
248 ::core::ptr::write(pconnectivity, ::core::mem::transmute(ok__));
249 ::windows::core::HRESULT(0)
250 }
251 ::core::result::Result::Err(err) => err.into(),
252 }
253 }
254 unsafe extern "system" fn GetCategory<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcategory: *mut NLM_NETWORK_CATEGORY) -> ::windows::core::HRESULT {
255 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
256 let this = (*this).get_impl();
257 match this.GetCategory() {
258 ::core::result::Result::Ok(ok__) => {
259 ::core::ptr::write(pcategory, ::core::mem::transmute(ok__));
260 ::windows::core::HRESULT(0)
261 }
262 ::core::result::Result::Err(err) => err.into(),
263 }
264 }
265 unsafe extern "system" fn SetCategory<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetwork_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, newcategory: NLM_NETWORK_CATEGORY) -> ::windows::core::HRESULT {
266 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
267 let this = (*this).get_impl();
268 this.SetCategory(::core::mem::transmute_copy(&newcategory)).into()
269 }
270 Self {
271 base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
272 GetName: GetName::<Identity, Impl, OFFSET>,
273 SetName: SetName::<Identity, Impl, OFFSET>,
274 GetDescription: GetDescription::<Identity, Impl, OFFSET>,
275 SetDescription: SetDescription::<Identity, Impl, OFFSET>,
276 GetNetworkId: GetNetworkId::<Identity, Impl, OFFSET>,
277 GetDomainType: GetDomainType::<Identity, Impl, OFFSET>,
278 GetNetworkConnections: GetNetworkConnections::<Identity, Impl, OFFSET>,
279 GetTimeCreatedAndConnected: GetTimeCreatedAndConnected::<Identity, Impl, OFFSET>,
280 IsConnectedToInternet: IsConnectedToInternet::<Identity, Impl, OFFSET>,
281 IsConnected: IsConnected::<Identity, Impl, OFFSET>,
282 GetConnectivity: GetConnectivity::<Identity, Impl, OFFSET>,
283 GetCategory: GetCategory::<Identity, Impl, OFFSET>,
284 SetCategory: SetCategory::<Identity, Impl, OFFSET>,
285 }
286 }
287 pub fn matches(iid: &windows::core::GUID) -> bool {
288 iid == &<INetwork as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
289 }
290}
291#[doc = "*Required features: `\"Win32_Networking_NetworkListManager\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
292#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
293pub trait INetworkConnection_Impl: Sized + super::super::System::Com::IDispatch_Impl {
294 fn GetNetwork(&self) -> ::windows::core::Result<INetwork>;
295 fn IsConnectedToInternet(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
296 fn IsConnected(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
297 fn GetConnectivity(&self) -> ::windows::core::Result<NLM_CONNECTIVITY>;
298 fn GetConnectionId(&self) -> ::windows::core::Result<::windows::core::GUID>;
299 fn GetAdapterId(&self) -> ::windows::core::Result<::windows::core::GUID>;
300 fn GetDomainType(&self) -> ::windows::core::Result<NLM_DOMAIN_TYPE>;
301}
302#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
303impl ::windows::core::RuntimeName for INetworkConnection {}
304#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
305impl INetworkConnection_Vtbl {
306 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnection_Impl, const OFFSET: isize>() -> INetworkConnection_Vtbl {
307 unsafe extern "system" fn GetNetwork<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppnetwork: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
308 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
309 let this = (*this).get_impl();
310 match this.GetNetwork() {
311 ::core::result::Result::Ok(ok__) => {
312 ::core::ptr::write(ppnetwork, ::core::mem::transmute(ok__));
313 ::windows::core::HRESULT(0)
314 }
315 ::core::result::Result::Err(err) => err.into(),
316 }
317 }
318 unsafe extern "system" fn IsConnectedToInternet<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbisconnected: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
319 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
320 let this = (*this).get_impl();
321 match this.IsConnectedToInternet() {
322 ::core::result::Result::Ok(ok__) => {
323 ::core::ptr::write(pbisconnected, ::core::mem::transmute(ok__));
324 ::windows::core::HRESULT(0)
325 }
326 ::core::result::Result::Err(err) => err.into(),
327 }
328 }
329 unsafe extern "system" fn IsConnected<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbisconnected: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
330 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
331 let this = (*this).get_impl();
332 match this.IsConnected() {
333 ::core::result::Result::Ok(ok__) => {
334 ::core::ptr::write(pbisconnected, ::core::mem::transmute(ok__));
335 ::windows::core::HRESULT(0)
336 }
337 ::core::result::Result::Err(err) => err.into(),
338 }
339 }
340 unsafe extern "system" fn GetConnectivity<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pconnectivity: *mut NLM_CONNECTIVITY) -> ::windows::core::HRESULT {
341 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
342 let this = (*this).get_impl();
343 match this.GetConnectivity() {
344 ::core::result::Result::Ok(ok__) => {
345 ::core::ptr::write(pconnectivity, ::core::mem::transmute(ok__));
346 ::windows::core::HRESULT(0)
347 }
348 ::core::result::Result::Err(err) => err.into(),
349 }
350 }
351 unsafe extern "system" fn GetConnectionId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pgdconnectionid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
352 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
353 let this = (*this).get_impl();
354 match this.GetConnectionId() {
355 ::core::result::Result::Ok(ok__) => {
356 ::core::ptr::write(pgdconnectionid, ::core::mem::transmute(ok__));
357 ::windows::core::HRESULT(0)
358 }
359 ::core::result::Result::Err(err) => err.into(),
360 }
361 }
362 unsafe extern "system" fn GetAdapterId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pgdadapterid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
363 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
364 let this = (*this).get_impl();
365 match this.GetAdapterId() {
366 ::core::result::Result::Ok(ok__) => {
367 ::core::ptr::write(pgdadapterid, ::core::mem::transmute(ok__));
368 ::windows::core::HRESULT(0)
369 }
370 ::core::result::Result::Err(err) => err.into(),
371 }
372 }
373 unsafe extern "system" fn GetDomainType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdomaintype: *mut NLM_DOMAIN_TYPE) -> ::windows::core::HRESULT {
374 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
375 let this = (*this).get_impl();
376 match this.GetDomainType() {
377 ::core::result::Result::Ok(ok__) => {
378 ::core::ptr::write(pdomaintype, ::core::mem::transmute(ok__));
379 ::windows::core::HRESULT(0)
380 }
381 ::core::result::Result::Err(err) => err.into(),
382 }
383 }
384 Self {
385 base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
386 GetNetwork: GetNetwork::<Identity, Impl, OFFSET>,
387 IsConnectedToInternet: IsConnectedToInternet::<Identity, Impl, OFFSET>,
388 IsConnected: IsConnected::<Identity, Impl, OFFSET>,
389 GetConnectivity: GetConnectivity::<Identity, Impl, OFFSET>,
390 GetConnectionId: GetConnectionId::<Identity, Impl, OFFSET>,
391 GetAdapterId: GetAdapterId::<Identity, Impl, OFFSET>,
392 GetDomainType: GetDomainType::<Identity, Impl, OFFSET>,
393 }
394 }
395 pub fn matches(iid: &windows::core::GUID) -> bool {
396 iid == &<INetworkConnection as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
397 }
398}
399#[doc = "*Required features: `\"Win32_Networking_NetworkListManager\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
400#[cfg(feature = "Win32_Foundation")]
401pub trait INetworkConnectionCost_Impl: Sized {
402 fn GetCost(&self) -> ::windows::core::Result<u32>;
403 fn GetDataPlanStatus(&self, pdataplanstatus: *mut NLM_DATAPLAN_STATUS) -> ::windows::core::Result<()>;
404}
405#[cfg(feature = "Win32_Foundation")]
406impl ::windows::core::RuntimeName for INetworkConnectionCost {}
407#[cfg(feature = "Win32_Foundation")]
408impl INetworkConnectionCost_Vtbl {
409 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnectionCost_Impl, const OFFSET: isize>() -> INetworkConnectionCost_Vtbl {
410 unsafe extern "system" fn GetCost<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnectionCost_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcost: *mut u32) -> ::windows::core::HRESULT {
411 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
412 let this = (*this).get_impl();
413 match this.GetCost() {
414 ::core::result::Result::Ok(ok__) => {
415 ::core::ptr::write(pcost, ::core::mem::transmute(ok__));
416 ::windows::core::HRESULT(0)
417 }
418 ::core::result::Result::Err(err) => err.into(),
419 }
420 }
421 unsafe extern "system" fn GetDataPlanStatus<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnectionCost_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdataplanstatus: *mut NLM_DATAPLAN_STATUS) -> ::windows::core::HRESULT {
422 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
423 let this = (*this).get_impl();
424 this.GetDataPlanStatus(::core::mem::transmute_copy(&pdataplanstatus)).into()
425 }
426 Self {
427 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
428 GetCost: GetCost::<Identity, Impl, OFFSET>,
429 GetDataPlanStatus: GetDataPlanStatus::<Identity, Impl, OFFSET>,
430 }
431 }
432 pub fn matches(iid: &windows::core::GUID) -> bool {
433 iid == &<INetworkConnectionCost as ::windows::core::ComInterface>::IID
434 }
435}
436#[doc = "*Required features: `\"Win32_Networking_NetworkListManager\"`, `\"implement\"`*"]
437pub trait INetworkConnectionCostEvents_Impl: Sized {
438 fn ConnectionCostChanged(&self, connectionid: &::windows::core::GUID, newcost: u32) -> ::windows::core::Result<()>;
439 fn ConnectionDataPlanStatusChanged(&self, connectionid: &::windows::core::GUID) -> ::windows::core::Result<()>;
440}
441impl ::windows::core::RuntimeName for INetworkConnectionCostEvents {}
442impl INetworkConnectionCostEvents_Vtbl {
443 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnectionCostEvents_Impl, const OFFSET: isize>() -> INetworkConnectionCostEvents_Vtbl {
444 unsafe extern "system" fn ConnectionCostChanged<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnectionCostEvents_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, connectionid: ::windows::core::GUID, newcost: u32) -> ::windows::core::HRESULT {
445 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
446 let this = (*this).get_impl();
447 this.ConnectionCostChanged(::core::mem::transmute(&connectionid), ::core::mem::transmute_copy(&newcost)).into()
448 }
449 unsafe extern "system" fn ConnectionDataPlanStatusChanged<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnectionCostEvents_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, connectionid: ::windows::core::GUID) -> ::windows::core::HRESULT {
450 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
451 let this = (*this).get_impl();
452 this.ConnectionDataPlanStatusChanged(::core::mem::transmute(&connectionid)).into()
453 }
454 Self {
455 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
456 ConnectionCostChanged: ConnectionCostChanged::<Identity, Impl, OFFSET>,
457 ConnectionDataPlanStatusChanged: ConnectionDataPlanStatusChanged::<Identity, Impl, OFFSET>,
458 }
459 }
460 pub fn matches(iid: &windows::core::GUID) -> bool {
461 iid == &<INetworkConnectionCostEvents as ::windows::core::ComInterface>::IID
462 }
463}
464#[doc = "*Required features: `\"Win32_Networking_NetworkListManager\"`, `\"implement\"`*"]
465pub trait INetworkConnectionEvents_Impl: Sized {
466 fn NetworkConnectionConnectivityChanged(&self, connectionid: &::windows::core::GUID, newconnectivity: NLM_CONNECTIVITY) -> ::windows::core::Result<()>;
467 fn NetworkConnectionPropertyChanged(&self, connectionid: &::windows::core::GUID, flags: NLM_CONNECTION_PROPERTY_CHANGE) -> ::windows::core::Result<()>;
468}
469impl ::windows::core::RuntimeName for INetworkConnectionEvents {}
470impl INetworkConnectionEvents_Vtbl {
471 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnectionEvents_Impl, const OFFSET: isize>() -> INetworkConnectionEvents_Vtbl {
472 unsafe extern "system" fn NetworkConnectionConnectivityChanged<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnectionEvents_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, connectionid: ::windows::core::GUID, newconnectivity: NLM_CONNECTIVITY) -> ::windows::core::HRESULT {
473 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
474 let this = (*this).get_impl();
475 this.NetworkConnectionConnectivityChanged(::core::mem::transmute(&connectionid), ::core::mem::transmute_copy(&newconnectivity)).into()
476 }
477 unsafe extern "system" fn NetworkConnectionPropertyChanged<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkConnectionEvents_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, connectionid: ::windows::core::GUID, flags: NLM_CONNECTION_PROPERTY_CHANGE) -> ::windows::core::HRESULT {
478 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
479 let this = (*this).get_impl();
480 this.NetworkConnectionPropertyChanged(::core::mem::transmute(&connectionid), ::core::mem::transmute_copy(&flags)).into()
481 }
482 Self {
483 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
484 NetworkConnectionConnectivityChanged: NetworkConnectionConnectivityChanged::<Identity, Impl, OFFSET>,
485 NetworkConnectionPropertyChanged: NetworkConnectionPropertyChanged::<Identity, Impl, OFFSET>,
486 }
487 }
488 pub fn matches(iid: &windows::core::GUID) -> bool {
489 iid == &<INetworkConnectionEvents as ::windows::core::ComInterface>::IID
490 }
491}
492#[doc = "*Required features: `\"Win32_Networking_NetworkListManager\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
493#[cfg(feature = "Win32_Foundation")]
494pub trait INetworkCostManager_Impl: Sized {
495 fn GetCost(&self, pcost: *mut u32, pdestipaddr: *const NLM_SOCKADDR) -> ::windows::core::Result<()>;
496 fn GetDataPlanStatus(&self, pdataplanstatus: *mut NLM_DATAPLAN_STATUS, pdestipaddr: *const NLM_SOCKADDR) -> ::windows::core::Result<()>;
497 fn SetDestinationAddresses(&self, length: u32, pdestipaddrlist: *const NLM_SOCKADDR, bappend: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
498}
499#[cfg(feature = "Win32_Foundation")]
500impl ::windows::core::RuntimeName for INetworkCostManager {}
501#[cfg(feature = "Win32_Foundation")]
502impl INetworkCostManager_Vtbl {
503 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkCostManager_Impl, const OFFSET: isize>() -> INetworkCostManager_Vtbl {
504 unsafe extern "system" fn GetCost<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkCostManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcost: *mut u32, pdestipaddr: *const NLM_SOCKADDR) -> ::windows::core::HRESULT {
505 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
506 let this = (*this).get_impl();
507 this.GetCost(::core::mem::transmute_copy(&pcost), ::core::mem::transmute_copy(&pdestipaddr)).into()
508 }
509 unsafe extern "system" fn GetDataPlanStatus<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkCostManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdataplanstatus: *mut NLM_DATAPLAN_STATUS, pdestipaddr: *const NLM_SOCKADDR) -> ::windows::core::HRESULT {
510 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
511 let this = (*this).get_impl();
512 this.GetDataPlanStatus(::core::mem::transmute_copy(&pdataplanstatus), ::core::mem::transmute_copy(&pdestipaddr)).into()
513 }
514 unsafe extern "system" fn SetDestinationAddresses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkCostManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, length: u32, pdestipaddrlist: *const NLM_SOCKADDR, bappend: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
515 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
516 let this = (*this).get_impl();
517 this.SetDestinationAddresses(::core::mem::transmute_copy(&length), ::core::mem::transmute_copy(&pdestipaddrlist), ::core::mem::transmute_copy(&bappend)).into()
518 }
519 Self {
520 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
521 GetCost: GetCost::<Identity, Impl, OFFSET>,
522 GetDataPlanStatus: GetDataPlanStatus::<Identity, Impl, OFFSET>,
523 SetDestinationAddresses: SetDestinationAddresses::<Identity, Impl, OFFSET>,
524 }
525 }
526 pub fn matches(iid: &windows::core::GUID) -> bool {
527 iid == &<INetworkCostManager as ::windows::core::ComInterface>::IID
528 }
529}
530#[doc = "*Required features: `\"Win32_Networking_NetworkListManager\"`, `\"implement\"`*"]
531pub trait INetworkCostManagerEvents_Impl: Sized {
532 fn CostChanged(&self, newcost: u32, pdestaddr: *const NLM_SOCKADDR) -> ::windows::core::Result<()>;
533 fn DataPlanStatusChanged(&self, pdestaddr: *const NLM_SOCKADDR) -> ::windows::core::Result<()>;
534}
535impl ::windows::core::RuntimeName for INetworkCostManagerEvents {}
536impl INetworkCostManagerEvents_Vtbl {
537 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkCostManagerEvents_Impl, const OFFSET: isize>() -> INetworkCostManagerEvents_Vtbl {
538 unsafe extern "system" fn CostChanged<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkCostManagerEvents_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, newcost: u32, pdestaddr: *const NLM_SOCKADDR) -> ::windows::core::HRESULT {
539 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
540 let this = (*this).get_impl();
541 this.CostChanged(::core::mem::transmute_copy(&newcost), ::core::mem::transmute_copy(&pdestaddr)).into()
542 }
543 unsafe extern "system" fn DataPlanStatusChanged<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkCostManagerEvents_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdestaddr: *const NLM_SOCKADDR) -> ::windows::core::HRESULT {
544 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
545 let this = (*this).get_impl();
546 this.DataPlanStatusChanged(::core::mem::transmute_copy(&pdestaddr)).into()
547 }
548 Self {
549 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
550 CostChanged: CostChanged::<Identity, Impl, OFFSET>,
551 DataPlanStatusChanged: DataPlanStatusChanged::<Identity, Impl, OFFSET>,
552 }
553 }
554 pub fn matches(iid: &windows::core::GUID) -> bool {
555 iid == &<INetworkCostManagerEvents as ::windows::core::ComInterface>::IID
556 }
557}
558#[doc = "*Required features: `\"Win32_Networking_NetworkListManager\"`, `\"implement\"`*"]
559pub trait INetworkEvents_Impl: Sized {
560 fn NetworkAdded(&self, networkid: &::windows::core::GUID) -> ::windows::core::Result<()>;
561 fn NetworkDeleted(&self, networkid: &::windows::core::GUID) -> ::windows::core::Result<()>;
562 fn NetworkConnectivityChanged(&self, networkid: &::windows::core::GUID, newconnectivity: NLM_CONNECTIVITY) -> ::windows::core::Result<()>;
563 fn NetworkPropertyChanged(&self, networkid: &::windows::core::GUID, flags: NLM_NETWORK_PROPERTY_CHANGE) -> ::windows::core::Result<()>;
564}
565impl ::windows::core::RuntimeName for INetworkEvents {}
566impl INetworkEvents_Vtbl {
567 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkEvents_Impl, const OFFSET: isize>() -> INetworkEvents_Vtbl {
568 unsafe extern "system" fn NetworkAdded<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkEvents_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, networkid: ::windows::core::GUID) -> ::windows::core::HRESULT {
569 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
570 let this = (*this).get_impl();
571 this.NetworkAdded(::core::mem::transmute(&networkid)).into()
572 }
573 unsafe extern "system" fn NetworkDeleted<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkEvents_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, networkid: ::windows::core::GUID) -> ::windows::core::HRESULT {
574 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
575 let this = (*this).get_impl();
576 this.NetworkDeleted(::core::mem::transmute(&networkid)).into()
577 }
578 unsafe extern "system" fn NetworkConnectivityChanged<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkEvents_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, networkid: ::windows::core::GUID, newconnectivity: NLM_CONNECTIVITY) -> ::windows::core::HRESULT {
579 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
580 let this = (*this).get_impl();
581 this.NetworkConnectivityChanged(::core::mem::transmute(&networkid), ::core::mem::transmute_copy(&newconnectivity)).into()
582 }
583 unsafe extern "system" fn NetworkPropertyChanged<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkEvents_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, networkid: ::windows::core::GUID, flags: NLM_NETWORK_PROPERTY_CHANGE) -> ::windows::core::HRESULT {
584 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
585 let this = (*this).get_impl();
586 this.NetworkPropertyChanged(::core::mem::transmute(&networkid), ::core::mem::transmute_copy(&flags)).into()
587 }
588 Self {
589 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
590 NetworkAdded: NetworkAdded::<Identity, Impl, OFFSET>,
591 NetworkDeleted: NetworkDeleted::<Identity, Impl, OFFSET>,
592 NetworkConnectivityChanged: NetworkConnectivityChanged::<Identity, Impl, OFFSET>,
593 NetworkPropertyChanged: NetworkPropertyChanged::<Identity, Impl, OFFSET>,
594 }
595 }
596 pub fn matches(iid: &windows::core::GUID) -> bool {
597 iid == &<INetworkEvents as ::windows::core::ComInterface>::IID
598 }
599}
600#[doc = "*Required features: `\"Win32_Networking_NetworkListManager\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
601#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
602pub trait INetworkListManager_Impl: Sized + super::super::System::Com::IDispatch_Impl {
603 fn GetNetworks(&self, flags: NLM_ENUM_NETWORK) -> ::windows::core::Result<IEnumNetworks>;
604 fn GetNetwork(&self, gdnetworkid: &::windows::core::GUID) -> ::windows::core::Result<INetwork>;
605 fn GetNetworkConnections(&self) -> ::windows::core::Result<IEnumNetworkConnections>;
606 fn GetNetworkConnection(&self, gdnetworkconnectionid: &::windows::core::GUID) -> ::windows::core::Result<INetworkConnection>;
607 fn IsConnectedToInternet(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
608 fn IsConnected(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
609 fn GetConnectivity(&self) -> ::windows::core::Result<NLM_CONNECTIVITY>;
610 fn SetSimulatedProfileInfo(&self, psimulatedinfo: *const NLM_SIMULATED_PROFILE_INFO) -> ::windows::core::Result<()>;
611 fn ClearSimulatedProfileInfo(&self) -> ::windows::core::Result<()>;
612}
613#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
614impl ::windows::core::RuntimeName for INetworkListManager {}
615#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
616impl INetworkListManager_Vtbl {
617 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkListManager_Impl, const OFFSET: isize>() -> INetworkListManager_Vtbl {
618 unsafe extern "system" fn GetNetworks<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkListManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, flags: NLM_ENUM_NETWORK, ppenumnetwork: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
619 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
620 let this = (*this).get_impl();
621 match this.GetNetworks(::core::mem::transmute_copy(&flags)) {
622 ::core::result::Result::Ok(ok__) => {
623 ::core::ptr::write(ppenumnetwork, ::core::mem::transmute(ok__));
624 ::windows::core::HRESULT(0)
625 }
626 ::core::result::Result::Err(err) => err.into(),
627 }
628 }
629 unsafe extern "system" fn GetNetwork<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkListManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, gdnetworkid: ::windows::core::GUID, ppnetwork: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
630 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
631 let this = (*this).get_impl();
632 match this.GetNetwork(::core::mem::transmute(&gdnetworkid)) {
633 ::core::result::Result::Ok(ok__) => {
634 ::core::ptr::write(ppnetwork, ::core::mem::transmute(ok__));
635 ::windows::core::HRESULT(0)
636 }
637 ::core::result::Result::Err(err) => err.into(),
638 }
639 }
640 unsafe extern "system" fn GetNetworkConnections<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkListManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppenum: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
641 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
642 let this = (*this).get_impl();
643 match this.GetNetworkConnections() {
644 ::core::result::Result::Ok(ok__) => {
645 ::core::ptr::write(ppenum, ::core::mem::transmute(ok__));
646 ::windows::core::HRESULT(0)
647 }
648 ::core::result::Result::Err(err) => err.into(),
649 }
650 }
651 unsafe extern "system" fn GetNetworkConnection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkListManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, gdnetworkconnectionid: ::windows::core::GUID, ppnetworkconnection: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
652 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
653 let this = (*this).get_impl();
654 match this.GetNetworkConnection(::core::mem::transmute(&gdnetworkconnectionid)) {
655 ::core::result::Result::Ok(ok__) => {
656 ::core::ptr::write(ppnetworkconnection, ::core::mem::transmute(ok__));
657 ::windows::core::HRESULT(0)
658 }
659 ::core::result::Result::Err(err) => err.into(),
660 }
661 }
662 unsafe extern "system" fn IsConnectedToInternet<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkListManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbisconnected: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
663 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
664 let this = (*this).get_impl();
665 match this.IsConnectedToInternet() {
666 ::core::result::Result::Ok(ok__) => {
667 ::core::ptr::write(pbisconnected, ::core::mem::transmute(ok__));
668 ::windows::core::HRESULT(0)
669 }
670 ::core::result::Result::Err(err) => err.into(),
671 }
672 }
673 unsafe extern "system" fn IsConnected<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkListManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbisconnected: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
674 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
675 let this = (*this).get_impl();
676 match this.IsConnected() {
677 ::core::result::Result::Ok(ok__) => {
678 ::core::ptr::write(pbisconnected, ::core::mem::transmute(ok__));
679 ::windows::core::HRESULT(0)
680 }
681 ::core::result::Result::Err(err) => err.into(),
682 }
683 }
684 unsafe extern "system" fn GetConnectivity<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkListManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pconnectivity: *mut NLM_CONNECTIVITY) -> ::windows::core::HRESULT {
685 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
686 let this = (*this).get_impl();
687 match this.GetConnectivity() {
688 ::core::result::Result::Ok(ok__) => {
689 ::core::ptr::write(pconnectivity, ::core::mem::transmute(ok__));
690 ::windows::core::HRESULT(0)
691 }
692 ::core::result::Result::Err(err) => err.into(),
693 }
694 }
695 unsafe extern "system" fn SetSimulatedProfileInfo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkListManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, psimulatedinfo: *const NLM_SIMULATED_PROFILE_INFO) -> ::windows::core::HRESULT {
696 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
697 let this = (*this).get_impl();
698 this.SetSimulatedProfileInfo(::core::mem::transmute_copy(&psimulatedinfo)).into()
699 }
700 unsafe extern "system" fn ClearSimulatedProfileInfo<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkListManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
701 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
702 let this = (*this).get_impl();
703 this.ClearSimulatedProfileInfo().into()
704 }
705 Self {
706 base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
707 GetNetworks: GetNetworks::<Identity, Impl, OFFSET>,
708 GetNetwork: GetNetwork::<Identity, Impl, OFFSET>,
709 GetNetworkConnections: GetNetworkConnections::<Identity, Impl, OFFSET>,
710 GetNetworkConnection: GetNetworkConnection::<Identity, Impl, OFFSET>,
711 IsConnectedToInternet: IsConnectedToInternet::<Identity, Impl, OFFSET>,
712 IsConnected: IsConnected::<Identity, Impl, OFFSET>,
713 GetConnectivity: GetConnectivity::<Identity, Impl, OFFSET>,
714 SetSimulatedProfileInfo: SetSimulatedProfileInfo::<Identity, Impl, OFFSET>,
715 ClearSimulatedProfileInfo: ClearSimulatedProfileInfo::<Identity, Impl, OFFSET>,
716 }
717 }
718 pub fn matches(iid: &windows::core::GUID) -> bool {
719 iid == &<INetworkListManager as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
720 }
721}
722#[doc = "*Required features: `\"Win32_Networking_NetworkListManager\"`, `\"implement\"`*"]
723pub trait INetworkListManagerEvents_Impl: Sized {
724 fn ConnectivityChanged(&self, newconnectivity: NLM_CONNECTIVITY) -> ::windows::core::Result<()>;
725}
726impl ::windows::core::RuntimeName for INetworkListManagerEvents {}
727impl INetworkListManagerEvents_Vtbl {
728 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkListManagerEvents_Impl, const OFFSET: isize>() -> INetworkListManagerEvents_Vtbl {
729 unsafe extern "system" fn ConnectivityChanged<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetworkListManagerEvents_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, newconnectivity: NLM_CONNECTIVITY) -> ::windows::core::HRESULT {
730 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
731 let this = (*this).get_impl();
732 this.ConnectivityChanged(::core::mem::transmute_copy(&newconnectivity)).into()
733 }
734 Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), ConnectivityChanged: ConnectivityChanged::<Identity, Impl, OFFSET> }
735 }
736 pub fn matches(iid: &windows::core::GUID) -> bool {
737 iid == &<INetworkListManagerEvents as ::windows::core::ComInterface>::IID
738 }
739}