1 #![allow(non_snake_case, non_camel_case_types, non_upper_case_globals, clashing_extern_declarations, clippy::all)] 2 #[link(name = "windows")] 3 extern "system" { RtlFirstEntrySList(listhead: *const SLIST_HEADER) -> *mut SLIST_ENTRY4 pub fn RtlFirstEntrySList(listhead: *const SLIST_HEADER) -> *mut SLIST_ENTRY; RtlInitializeSListHead(listhead: *mut SLIST_HEADER)5 pub fn RtlInitializeSListHead(listhead: *mut SLIST_HEADER); RtlInterlockedFlushSList(listhead: *mut SLIST_HEADER) -> *mut SLIST_ENTRY6 pub fn RtlInterlockedFlushSList(listhead: *mut SLIST_HEADER) -> *mut SLIST_ENTRY; RtlInterlockedPopEntrySList(listhead: *mut SLIST_HEADER) -> *mut SLIST_ENTRY7 pub fn RtlInterlockedPopEntrySList(listhead: *mut SLIST_HEADER) -> *mut SLIST_ENTRY; RtlInterlockedPushEntrySList(listhead: *mut SLIST_HEADER, listentry: *mut SLIST_ENTRY) -> *mut SLIST_ENTRY8 pub fn RtlInterlockedPushEntrySList(listhead: *mut SLIST_HEADER, listentry: *mut SLIST_ENTRY) -> *mut SLIST_ENTRY; RtlInterlockedPushListSListEx(listhead: *mut SLIST_HEADER, list: *mut SLIST_ENTRY, listend: *mut SLIST_ENTRY, count: u32) -> *mut SLIST_ENTRY9 pub fn RtlInterlockedPushListSListEx(listhead: *mut SLIST_HEADER, list: *mut SLIST_ENTRY, listend: *mut SLIST_ENTRY, count: u32) -> *mut SLIST_ENTRY; RtlQueryDepthSList(listhead: *const SLIST_HEADER) -> u1610 pub fn RtlQueryDepthSList(listhead: *const SLIST_HEADER) -> u16; 11 } 12 pub type COMPARTMENT_ID = i32; 13 pub const UNSPECIFIED_COMPARTMENT_ID: COMPARTMENT_ID = 0i32; 14 pub const DEFAULT_COMPARTMENT_ID: COMPARTMENT_ID = 1i32; 15 #[repr(C)] 16 #[cfg(feature = "Win32_Foundation")] 17 pub struct CSTRING { 18 pub Length: u16, 19 pub MaximumLength: u16, 20 pub Buffer: super::super::Foundation::PSTR, 21 } 22 #[cfg(feature = "Win32_Foundation")] 23 impl ::core::marker::Copy for CSTRING {} 24 #[cfg(feature = "Win32_Foundation")] 25 impl ::core::clone::Clone for CSTRING { clone(&self) -> Self26 fn clone(&self) -> Self { 27 *self 28 } 29 } 30 pub type EVENT_TYPE = i32; 31 pub const NotificationEvent: EVENT_TYPE = 0i32; 32 pub const SynchronizationEvent: EVENT_TYPE = 1i32; 33 pub type EXCEPTION_DISPOSITION = i32; 34 pub const ExceptionContinueExecution: EXCEPTION_DISPOSITION = 0i32; 35 pub const ExceptionContinueSearch: EXCEPTION_DISPOSITION = 1i32; 36 pub const ExceptionNestedException: EXCEPTION_DISPOSITION = 2i32; 37 pub const ExceptionCollidedUnwind: EXCEPTION_DISPOSITION = 3i32; 38 #[repr(C)] 39 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] 40 pub struct EXCEPTION_REGISTRATION_RECORD { 41 pub Next: *mut EXCEPTION_REGISTRATION_RECORD, 42 pub Handler: EXCEPTION_ROUTINE, 43 } 44 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] 45 impl ::core::marker::Copy for EXCEPTION_REGISTRATION_RECORD {} 46 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] 47 impl ::core::clone::Clone for EXCEPTION_REGISTRATION_RECORD { clone(&self) -> Self48 fn clone(&self) -> Self { 49 *self 50 } 51 } 52 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] 53 pub type EXCEPTION_ROUTINE = unsafe extern "system" fn(exceptionrecord: *mut super::Diagnostics::Debug::EXCEPTION_RECORD, establisherframe: *const ::core::ffi::c_void, contextrecord: *mut super::Diagnostics::Debug::CONTEXT, dispatchercontext: *const ::core::ffi::c_void) -> EXCEPTION_DISPOSITION; 54 #[repr(C)] 55 #[cfg(any(target_arch = "x86_64", target_arch = "aarch64",))] 56 pub struct FLOATING_SAVE_AREA { 57 pub ControlWord: u32, 58 pub StatusWord: u32, 59 pub TagWord: u32, 60 pub ErrorOffset: u32, 61 pub ErrorSelector: u32, 62 pub DataOffset: u32, 63 pub DataSelector: u32, 64 pub RegisterArea: [u8; 80], 65 pub Cr0NpxState: u32, 66 } 67 #[cfg(any(target_arch = "x86_64", target_arch = "aarch64",))] 68 impl ::core::marker::Copy for FLOATING_SAVE_AREA {} 69 #[cfg(any(target_arch = "x86_64", target_arch = "aarch64",))] 70 impl ::core::clone::Clone for FLOATING_SAVE_AREA { clone(&self) -> Self71 fn clone(&self) -> Self { 72 *self 73 } 74 } 75 #[repr(C)] 76 #[cfg(any(target_arch = "x86",))] 77 pub struct FLOATING_SAVE_AREA { 78 pub ControlWord: u32, 79 pub StatusWord: u32, 80 pub TagWord: u32, 81 pub ErrorOffset: u32, 82 pub ErrorSelector: u32, 83 pub DataOffset: u32, 84 pub DataSelector: u32, 85 pub RegisterArea: [u8; 80], 86 pub Spare0: u32, 87 } 88 #[cfg(any(target_arch = "x86",))] 89 impl ::core::marker::Copy for FLOATING_SAVE_AREA {} 90 #[cfg(any(target_arch = "x86",))] 91 impl ::core::clone::Clone for FLOATING_SAVE_AREA { clone(&self) -> Self92 fn clone(&self) -> Self { 93 *self 94 } 95 } 96 #[repr(C)] 97 pub struct LIST_ENTRY { 98 pub Flink: *mut LIST_ENTRY, 99 pub Blink: *mut LIST_ENTRY, 100 } 101 impl ::core::marker::Copy for LIST_ENTRY {} 102 impl ::core::clone::Clone for LIST_ENTRY { clone(&self) -> Self103 fn clone(&self) -> Self { 104 *self 105 } 106 } 107 #[repr(C)] 108 pub struct LIST_ENTRY32 { 109 pub Flink: u32, 110 pub Blink: u32, 111 } 112 impl ::core::marker::Copy for LIST_ENTRY32 {} 113 impl ::core::clone::Clone for LIST_ENTRY32 { clone(&self) -> Self114 fn clone(&self) -> Self { 115 *self 116 } 117 } 118 #[repr(C)] 119 pub struct LIST_ENTRY64 { 120 pub Flink: u64, 121 pub Blink: u64, 122 } 123 impl ::core::marker::Copy for LIST_ENTRY64 {} 124 impl ::core::clone::Clone for LIST_ENTRY64 { clone(&self) -> Self125 fn clone(&self) -> Self { 126 *self 127 } 128 } 129 pub const MAXUCHAR: u32 = 255u32; 130 pub const MAXULONG: u32 = 4294967295u32; 131 pub const MAXUSHORT: u32 = 65535u32; 132 pub type NT_PRODUCT_TYPE = i32; 133 pub const NtProductWinNt: NT_PRODUCT_TYPE = 1i32; 134 pub const NtProductLanManNt: NT_PRODUCT_TYPE = 2i32; 135 pub const NtProductServer: NT_PRODUCT_TYPE = 3i32; 136 #[repr(C)] 137 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] 138 pub struct NT_TIB { 139 pub ExceptionList: *mut EXCEPTION_REGISTRATION_RECORD, 140 pub StackBase: *mut ::core::ffi::c_void, 141 pub StackLimit: *mut ::core::ffi::c_void, 142 pub SubSystemTib: *mut ::core::ffi::c_void, 143 pub Anonymous: NT_TIB_0, 144 pub ArbitraryUserPointer: *mut ::core::ffi::c_void, 145 pub Self_: *mut NT_TIB, 146 } 147 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] 148 impl ::core::marker::Copy for NT_TIB {} 149 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] 150 impl ::core::clone::Clone for NT_TIB { clone(&self) -> Self151 fn clone(&self) -> Self { 152 *self 153 } 154 } 155 #[repr(C)] 156 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] 157 pub union NT_TIB_0 { 158 pub FiberData: *mut ::core::ffi::c_void, 159 pub Version: u32, 160 } 161 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] 162 impl ::core::marker::Copy for NT_TIB_0 {} 163 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] 164 impl ::core::clone::Clone for NT_TIB_0 { clone(&self) -> Self165 fn clone(&self) -> Self { 166 *self 167 } 168 } 169 pub const NULL64: u32 = 0u32; 170 #[repr(C)] 171 pub struct OBJECTID { 172 pub Lineage: ::windows_sys::core::GUID, 173 pub Uniquifier: u32, 174 } 175 impl ::core::marker::Copy for OBJECTID {} 176 impl ::core::clone::Clone for OBJECTID { clone(&self) -> Self177 fn clone(&self) -> Self { 178 *self 179 } 180 } 181 #[repr(C)] 182 pub struct OBJECT_ATTRIBUTES32 { 183 pub Length: u32, 184 pub RootDirectory: u32, 185 pub ObjectName: u32, 186 pub Attributes: u32, 187 pub SecurityDescriptor: u32, 188 pub SecurityQualityOfService: u32, 189 } 190 impl ::core::marker::Copy for OBJECT_ATTRIBUTES32 {} 191 impl ::core::clone::Clone for OBJECT_ATTRIBUTES32 { clone(&self) -> Self192 fn clone(&self) -> Self { 193 *self 194 } 195 } 196 #[repr(C)] 197 pub struct OBJECT_ATTRIBUTES64 { 198 pub Length: u32, 199 pub RootDirectory: u64, 200 pub ObjectName: u64, 201 pub Attributes: u32, 202 pub SecurityDescriptor: u64, 203 pub SecurityQualityOfService: u64, 204 } 205 impl ::core::marker::Copy for OBJECT_ATTRIBUTES64 {} 206 impl ::core::clone::Clone for OBJECT_ATTRIBUTES64 { clone(&self) -> Self207 fn clone(&self) -> Self { 208 *self 209 } 210 } 211 pub const OBJ_CASE_INSENSITIVE: i32 = 64i32; 212 pub const OBJ_DONT_REPARSE: i32 = 4096i32; 213 pub const OBJ_EXCLUSIVE: i32 = 32i32; 214 pub const OBJ_FORCE_ACCESS_CHECK: i32 = 1024i32; 215 pub const OBJ_HANDLE_TAGBITS: i32 = 3i32; 216 pub const OBJ_IGNORE_IMPERSONATED_DEVICEMAP: i32 = 2048i32; 217 pub const OBJ_INHERIT: i32 = 2i32; 218 pub const OBJ_KERNEL_HANDLE: i32 = 512i32; 219 pub const OBJ_OPENIF: i32 = 128i32; 220 pub const OBJ_OPENLINK: i32 = 256i32; 221 pub const OBJ_PERMANENT: i32 = 16i32; 222 pub const OBJ_VALID_ATTRIBUTES: i32 = 8178i32; 223 #[repr(C)] 224 pub struct PROCESSOR_NUMBER { 225 pub Group: u16, 226 pub Number: u8, 227 pub Reserved: u8, 228 } 229 impl ::core::marker::Copy for PROCESSOR_NUMBER {} 230 impl ::core::clone::Clone for PROCESSOR_NUMBER { clone(&self) -> Self231 fn clone(&self) -> Self { 232 *self 233 } 234 } 235 #[repr(C)] 236 pub struct QUAD { 237 pub Anonymous: QUAD_0, 238 } 239 impl ::core::marker::Copy for QUAD {} 240 impl ::core::clone::Clone for QUAD { clone(&self) -> Self241 fn clone(&self) -> Self { 242 *self 243 } 244 } 245 #[repr(C)] 246 pub union QUAD_0 { 247 pub UseThisFieldToCopy: i64, 248 pub DoNotUseThisField: f64, 249 } 250 impl ::core::marker::Copy for QUAD_0 {} 251 impl ::core::clone::Clone for QUAD_0 { clone(&self) -> Self252 fn clone(&self) -> Self { 253 *self 254 } 255 } 256 #[repr(C)] 257 pub struct RTL_BALANCED_NODE { 258 pub Anonymous1: RTL_BALANCED_NODE_0, 259 pub Anonymous2: RTL_BALANCED_NODE_1, 260 } 261 impl ::core::marker::Copy for RTL_BALANCED_NODE {} 262 impl ::core::clone::Clone for RTL_BALANCED_NODE { clone(&self) -> Self263 fn clone(&self) -> Self { 264 *self 265 } 266 } 267 #[repr(C)] 268 pub union RTL_BALANCED_NODE_0 { 269 pub Children: [*mut RTL_BALANCED_NODE; 2], 270 pub Anonymous: RTL_BALANCED_NODE_0_0, 271 } 272 impl ::core::marker::Copy for RTL_BALANCED_NODE_0 {} 273 impl ::core::clone::Clone for RTL_BALANCED_NODE_0 { clone(&self) -> Self274 fn clone(&self) -> Self { 275 *self 276 } 277 } 278 #[repr(C)] 279 pub struct RTL_BALANCED_NODE_0_0 { 280 pub Left: *mut RTL_BALANCED_NODE, 281 pub Right: *mut RTL_BALANCED_NODE, 282 } 283 impl ::core::marker::Copy for RTL_BALANCED_NODE_0_0 {} 284 impl ::core::clone::Clone for RTL_BALANCED_NODE_0_0 { clone(&self) -> Self285 fn clone(&self) -> Self { 286 *self 287 } 288 } 289 #[repr(C)] 290 pub union RTL_BALANCED_NODE_1 { 291 pub _bitfield: u8, 292 pub ParentValue: usize, 293 } 294 impl ::core::marker::Copy for RTL_BALANCED_NODE_1 {} 295 impl ::core::clone::Clone for RTL_BALANCED_NODE_1 { clone(&self) -> Self296 fn clone(&self) -> Self { 297 *self 298 } 299 } 300 pub const RTL_BALANCED_NODE_RESERVED_PARENT_MASK: u32 = 3u32; 301 #[repr(C)] 302 pub struct SINGLE_LIST_ENTRY { 303 pub Next: *mut SINGLE_LIST_ENTRY, 304 } 305 impl ::core::marker::Copy for SINGLE_LIST_ENTRY {} 306 impl ::core::clone::Clone for SINGLE_LIST_ENTRY { clone(&self) -> Self307 fn clone(&self) -> Self { 308 *self 309 } 310 } 311 #[repr(C)] 312 pub struct SINGLE_LIST_ENTRY32 { 313 pub Next: u32, 314 } 315 impl ::core::marker::Copy for SINGLE_LIST_ENTRY32 {} 316 impl ::core::clone::Clone for SINGLE_LIST_ENTRY32 { clone(&self) -> Self317 fn clone(&self) -> Self { 318 *self 319 } 320 } 321 #[repr(C)] 322 pub struct SLIST_ENTRY { 323 pub Next: *mut SLIST_ENTRY, 324 } 325 impl ::core::marker::Copy for SLIST_ENTRY {} 326 impl ::core::clone::Clone for SLIST_ENTRY { clone(&self) -> Self327 fn clone(&self) -> Self { 328 *self 329 } 330 } 331 #[repr(C)] 332 #[cfg(any(target_arch = "aarch64",))] 333 pub union SLIST_HEADER { 334 pub Anonymous: SLIST_HEADER_0, 335 pub HeaderArm64: SLIST_HEADER_1, 336 } 337 #[cfg(any(target_arch = "aarch64",))] 338 impl ::core::marker::Copy for SLIST_HEADER {} 339 #[cfg(any(target_arch = "aarch64",))] 340 impl ::core::clone::Clone for SLIST_HEADER { clone(&self) -> Self341 fn clone(&self) -> Self { 342 *self 343 } 344 } 345 #[repr(C)] 346 #[cfg(any(target_arch = "aarch64",))] 347 pub struct SLIST_HEADER_0 { 348 pub Alignment: u64, 349 pub Region: u64, 350 } 351 #[cfg(any(target_arch = "aarch64",))] 352 impl ::core::marker::Copy for SLIST_HEADER_0 {} 353 #[cfg(any(target_arch = "aarch64",))] 354 impl ::core::clone::Clone for SLIST_HEADER_0 { clone(&self) -> Self355 fn clone(&self) -> Self { 356 *self 357 } 358 } 359 #[repr(C)] 360 #[cfg(any(target_arch = "aarch64",))] 361 pub struct SLIST_HEADER_1 { 362 pub _bitfield1: u64, 363 pub _bitfield2: u64, 364 } 365 #[cfg(any(target_arch = "aarch64",))] 366 impl ::core::marker::Copy for SLIST_HEADER_1 {} 367 #[cfg(any(target_arch = "aarch64",))] 368 impl ::core::clone::Clone for SLIST_HEADER_1 { clone(&self) -> Self369 fn clone(&self) -> Self { 370 *self 371 } 372 } 373 #[repr(C)] 374 #[cfg(any(target_arch = "x86_64",))] 375 pub union SLIST_HEADER { 376 pub Anonymous: SLIST_HEADER_0, 377 pub HeaderX64: SLIST_HEADER_1, 378 } 379 #[cfg(any(target_arch = "x86_64",))] 380 impl ::core::marker::Copy for SLIST_HEADER {} 381 #[cfg(any(target_arch = "x86_64",))] 382 impl ::core::clone::Clone for SLIST_HEADER { clone(&self) -> Self383 fn clone(&self) -> Self { 384 *self 385 } 386 } 387 #[repr(C)] 388 #[cfg(any(target_arch = "x86_64",))] 389 pub struct SLIST_HEADER_0 { 390 pub Alignment: u64, 391 pub Region: u64, 392 } 393 #[cfg(any(target_arch = "x86_64",))] 394 impl ::core::marker::Copy for SLIST_HEADER_0 {} 395 #[cfg(any(target_arch = "x86_64",))] 396 impl ::core::clone::Clone for SLIST_HEADER_0 { clone(&self) -> Self397 fn clone(&self) -> Self { 398 *self 399 } 400 } 401 #[repr(C)] 402 #[cfg(any(target_arch = "x86_64",))] 403 pub struct SLIST_HEADER_1 { 404 pub _bitfield1: u64, 405 pub _bitfield2: u64, 406 } 407 #[cfg(any(target_arch = "x86_64",))] 408 impl ::core::marker::Copy for SLIST_HEADER_1 {} 409 #[cfg(any(target_arch = "x86_64",))] 410 impl ::core::clone::Clone for SLIST_HEADER_1 { clone(&self) -> Self411 fn clone(&self) -> Self { 412 *self 413 } 414 } 415 #[repr(C)] 416 #[cfg(any(target_arch = "x86",))] 417 pub union SLIST_HEADER { 418 pub Alignment: u64, 419 pub Anonymous: SLIST_HEADER_0, 420 } 421 #[cfg(any(target_arch = "x86",))] 422 impl ::core::marker::Copy for SLIST_HEADER {} 423 #[cfg(any(target_arch = "x86",))] 424 impl ::core::clone::Clone for SLIST_HEADER { clone(&self) -> Self425 fn clone(&self) -> Self { 426 *self 427 } 428 } 429 #[repr(C)] 430 #[cfg(any(target_arch = "x86",))] 431 pub struct SLIST_HEADER_0 { 432 pub Next: SINGLE_LIST_ENTRY, 433 pub Depth: u16, 434 pub CpuId: u16, 435 } 436 #[cfg(any(target_arch = "x86",))] 437 impl ::core::marker::Copy for SLIST_HEADER_0 {} 438 #[cfg(any(target_arch = "x86",))] 439 impl ::core::clone::Clone for SLIST_HEADER_0 { clone(&self) -> Self440 fn clone(&self) -> Self { 441 *self 442 } 443 } 444 #[repr(C)] 445 #[cfg(feature = "Win32_Foundation")] 446 pub struct STRING { 447 pub Length: u16, 448 pub MaximumLength: u16, 449 pub Buffer: super::super::Foundation::PSTR, 450 } 451 #[cfg(feature = "Win32_Foundation")] 452 impl ::core::marker::Copy for STRING {} 453 #[cfg(feature = "Win32_Foundation")] 454 impl ::core::clone::Clone for STRING { clone(&self) -> Self455 fn clone(&self) -> Self { 456 *self 457 } 458 } 459 #[repr(C)] 460 pub struct STRING32 { 461 pub Length: u16, 462 pub MaximumLength: u16, 463 pub Buffer: u32, 464 } 465 impl ::core::marker::Copy for STRING32 {} 466 impl ::core::clone::Clone for STRING32 { clone(&self) -> Self467 fn clone(&self) -> Self { 468 *self 469 } 470 } 471 #[repr(C)] 472 pub struct STRING64 { 473 pub Length: u16, 474 pub MaximumLength: u16, 475 pub Buffer: u64, 476 } 477 impl ::core::marker::Copy for STRING64 {} 478 impl ::core::clone::Clone for STRING64 { clone(&self) -> Self479 fn clone(&self) -> Self { 480 *self 481 } 482 } 483 pub type SUITE_TYPE = i32; 484 pub const SmallBusiness: SUITE_TYPE = 0i32; 485 pub const Enterprise: SUITE_TYPE = 1i32; 486 pub const BackOffice: SUITE_TYPE = 2i32; 487 pub const CommunicationServer: SUITE_TYPE = 3i32; 488 pub const TerminalServer: SUITE_TYPE = 4i32; 489 pub const SmallBusinessRestricted: SUITE_TYPE = 5i32; 490 pub const EmbeddedNT: SUITE_TYPE = 6i32; 491 pub const DataCenter: SUITE_TYPE = 7i32; 492 pub const SingleUserTS: SUITE_TYPE = 8i32; 493 pub const Personal: SUITE_TYPE = 9i32; 494 pub const Blade: SUITE_TYPE = 10i32; 495 pub const EmbeddedRestricted: SUITE_TYPE = 11i32; 496 pub const SecurityAppliance: SUITE_TYPE = 12i32; 497 pub const StorageServer: SUITE_TYPE = 13i32; 498 pub const ComputeServer: SUITE_TYPE = 14i32; 499 pub const WHServer: SUITE_TYPE = 15i32; 500 pub const PhoneNT: SUITE_TYPE = 16i32; 501 pub const MultiUserTS: SUITE_TYPE = 17i32; 502 pub const MaxSuiteType: SUITE_TYPE = 18i32; 503 pub type TIMER_TYPE = i32; 504 pub const NotificationTimer: TIMER_TYPE = 0i32; 505 pub const SynchronizationTimer: TIMER_TYPE = 1i32; 506 pub type WAIT_TYPE = i32; 507 pub const WaitAll: WAIT_TYPE = 0i32; 508 pub const WaitAny: WAIT_TYPE = 1i32; 509 pub const WaitNotification: WAIT_TYPE = 2i32; 510 pub const WaitDequeue: WAIT_TYPE = 3i32; 511 pub const WaitDpc: WAIT_TYPE = 4i32; 512 #[repr(C)] 513 pub struct WNF_STATE_NAME { 514 pub Data: [u32; 2], 515 } 516 impl ::core::marker::Copy for WNF_STATE_NAME {} 517 impl ::core::clone::Clone for WNF_STATE_NAME { clone(&self) -> Self518 fn clone(&self) -> Self { 519 *self 520 } 521 } 522