diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..fac678a9 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +rustflags = ["-C", "target-feature=+crt-static"] diff --git a/.github/actions/winget-install/action.yml b/.github/actions/winget-install/action.yaml similarity index 100% rename from .github/actions/winget-install/action.yml rename to .github/actions/winget-install/action.yaml diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 160de361..719f8898 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -1,7 +1,7 @@ version: 2 updates: - package-ecosystem: "cargo" - directory: "/" + directories: ["**/*"] schedule: interval: "weekly" day: "wednesday" @@ -9,6 +9,8 @@ updates: time: "06:00" commit-message: prefix: "chore" + reviewers: + - "microsoft/windows-drivers-rs" labels: - "type:dependabot" - "type:dependencies-cargo" @@ -22,6 +24,8 @@ updates: time: "06:00" commit-message: prefix: "chore" + reviewers: + - "microsoft/windows-drivers-rs" labels: - "type:dependabot" - "type:dependencies-github-actions" diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 484406a2..6d0bd8d4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -78,5 +78,11 @@ jobs: with: tool: cargo-make - - name: Build and Package Sample Drivers - run: cargo make default +${{ matrix.rust_toolchain }} --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} + - name: Run Cargo Make (package-driver-flow) in Workspace + run: cargo make package-driver-flow +${{ matrix.rust_toolchain }} --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --workspace + + - name: Build Examples (via Cargo Make) + run: cargo make --cwd ./examples build +${{ matrix.rust_toolchain }} --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} + + - name: Package Examples (via Cargo Make) + run: cargo make --cwd ./examples package-driver-flow +${{ matrix.rust_toolchain }} --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} diff --git a/.github/workflows/github-dependency-review.yaml b/.github/workflows/github-dependency-review.yaml index 15d600bc..51590aa9 100644 --- a/.github/workflows/github-dependency-review.yaml +++ b/.github/workflows/github-dependency-review.yaml @@ -19,11 +19,17 @@ jobs: - name: Dependency Review uses: actions/dependency-review-action@v4 with: - # AND combinations are currently bugged and must be listed separately: https://github.com/actions/dependency-review-action/issues/263 - # OR combinations are currently bugged and must be listed separately: https://github.com/actions/dependency-review-action/issues/670 - allow-licenses: MIT, Apache-2.0, BSD-3-Clause, ISC, Unicode-DFS-2016, (MIT OR Apache-2.0) AND Unicode-DFS-2016, Unlicense OR MIT - # anstyle is licensed as (MIT OR Apache-2.0), but the Github api fails to detect it: https://github.com/rust-cli/anstyle/tree/main/crates/anstyle - allow-dependencies-licenses: 'pkg:cargo/anstyle@1.0.4' + allow-licenses: >- + MIT, + Apache-2.0, + BSD-3-Clause, + ISC, + Unicode-DFS-2016 + # anstyle@1.0.4 is licensed as (MIT OR Apache-2.0), but the Github api fails to detect it: https://github.com/rust-cli/anstyle/tree/main/crates/anstyle + # AND combinations are currently bugged (https://github.com/actions/dependency-review-action/issues/263): + # * rustc-hash@1.1.0 License: Apache-2.0 AND MIT + # * unicode-ident@1.0.12 License: (MIT OR Apache-2.0) AND Unicode-DFS-2016 + allow-dependencies-licenses: 'pkg:cargo/anstyle@1.0.4, pkg:cargo/rustc-hash@1.1.0, pkg:cargo/unicode-ident@1.0.12' comment-summary-in-pr: on-failure # Explicit refs required for merge_group and push triggers: # https://github.com/actions/dependency-review-action/issues/456 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index fed0c2b9..6bef9782 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -77,44 +77,21 @@ jobs: if: matrix.rust_toolchain == 'nightly' run: cargo +${{ matrix.rust_toolchain }} clippy --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --all-targets --features nightly -- -D warnings - udeps: + unused_deps: name: Detect Unused Cargo Dependencies runs-on: windows-latest - strategy: - matrix: - wdk: - - Microsoft.WindowsWDK.10.0.22621 # NI WDK steps: - name: Checkout Repository uses: actions/checkout@v4 - - name: Install Winget - uses: ./.github/actions/winget-install - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Install WDK (${{ matrix.wdk }}) - run: | - if ((Get-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals).Id -eq '${{ matrix.wdk }}') { - Write-Host "${{ matrix.wdk }} is already installed. Attempting to update..." - Update-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force - } else { - Write-Host "Installing ${{ matrix.wdk }}..." - Install-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force - } - - - name: Install Rust Toolchain (Nightly) - # Cargo udeps only supports running on nightly due to reliance on unstable dep-info feature: https://github.com/est31/cargo-udeps/issues/113, https://github.com/est31/cargo-udeps/issues/136 - uses: dtolnay/rust-toolchain@nightly + - name: Install Rust Toolchain + uses: dtolnay/rust-toolchain@stable - - name: Install Cargo Udeps + - name: Install Cargo Machete uses: taiki-e/install-action@v2 with: - tool: cargo-udeps@0.1.48 - - - name: Run Cargo Udeps - run: cargo +nightly udeps --locked --all-targets + tool: cargo-machete - - name: Run Cargo Udeps (--features nightly) - run: cargo +nightly udeps --locked --all-targets --features nightly + - name: Run Cargo Machete + run: cargo machete --skip-target-dir diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6a1fab22..2f63b1e1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -70,7 +70,7 @@ jobs: - name: Install Cargo Expand uses: taiki-e/install-action@v2 with: - tool: cargo-expand@1.0.80 + tool: cargo-expand@1.0.85 - name: Run Cargo Test run: cargo +${{ matrix.rust_toolchain }} test --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} diff --git a/.vscode/settings.json b/.vscode/settings.json index 31acbb00..5ab42a1c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,8 @@ "+nightly" ], "rust-analyzer.rustfmt.rangeFormatting.enable": true, - "evenBetterToml.formatter.crlf": true + "evenBetterToml.formatter.crlf": true, + "files.associations": { + "input.h": "c" + } } \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a8eb0812..afaa715f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -87,9 +87,9 @@ That's it! Thank you for your contribution! The following tools should be installed as a part of the `windows-drivers-rs` developer workflow: -* `cargo-expand`: `cargo install --locked cargo-expand --version 1.0.80` +* `cargo-expand`: `cargo install --locked cargo-expand --version 1.0.85` * `cargo-audit`: `cargo install --locked cargo-audit` -* `cargo-udeps`: `cargo install --locked cargo-udeps` +* `cargo-machete`: `cargo install --locked cargo-machete` * `taplo-cli`: `cargo install --locked taplo-cli` **Note on arm64:** ARM64 support for ring is [not released yet](https://github.com/briansmith/ring/issues/1167), so TLS features must be disabled until arm64 is officially supported by ring (probably in 0.17.0 release) @@ -142,8 +142,7 @@ To maintain the quality of code, tests and tools are required to pass before con **_Dependency Analysis:_** * Scan for security advisories in dependent crates: `cargo audit --deny warnings` -* Scan for unused dependencies: `cargo +nightly udeps --locked --all-targets` - * `cargo udeps` requires `nightly` to function +* Scan for unused dependencies: `cargo machete --skip-target-dir` **_Rust Documentation Build Test_** diff --git a/Cargo.lock b/Cargo.lock index cf871132..8ade2491 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,56 +4,57 @@ version = 3 [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" dependencies = [ "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", "windows-sys", @@ -61,18 +62,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" - -[[package]] -name = "basic-toml" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" -dependencies = [ - "serde", -] +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "bindgen" @@ -83,7 +75,7 @@ dependencies = [ "bitflags", "cexpr", "clang-sys", - "itertools", + "itertools 0.12.1", "lazy_static", "lazycell", "log", @@ -99,24 +91,24 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "camino" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" dependencies = [ "serde", ] [[package]] name = "cargo-platform" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ "serde", ] @@ -135,6 +127,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cc" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052" + [[package]] name = "cexpr" version = "0.6.0" @@ -152,9 +150,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clang-sys" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -163,9 +161,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" dependencies = [ "clap_builder", "clap_derive", @@ -183,9 +181,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" dependencies = [ "anstream", "anstyle", @@ -195,9 +193,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" dependencies = [ "heck", "proc-macro2", @@ -207,15 +205,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "diff" @@ -225,48 +223,26 @@ checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys", ] -[[package]] -name = "fs4" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21dabded2e32cd57ded879041205c60a4a4c4bab47bd0fd2fa8b01f30849f02b" -dependencies = [ - "rustix", - "windows-sys", -] - [[package]] name = "glob" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - [[package]] name = "heck" version = "0.5.0" @@ -283,14 +259,10 @@ dependencies = [ ] [[package]] -name = "indexmap" -version = "2.2.6" +name = "is_terminal_polyfill" +version = "1.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" -dependencies = [ - "equivalent", - "hashbrown", -] +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" [[package]] name = "itertools" @@ -301,17 +273,26 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ "spin", ] @@ -324,15 +305,15 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libloading" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" dependencies = [ "cfg-if", "windows-targets", @@ -340,31 +321,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "macrotest" -version = "1.0.12" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c373046e96714b07b66d572e8b43e48d67cad110fd3f5bf2e000e58751864d2d" -dependencies = [ - "basic-toml", - "diff", - "glob", - "prettyplease", - "serde", - "serde_derive", - "serde_json", - "syn", -] +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matchers" @@ -377,9 +342,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "minimal-lexical" @@ -419,29 +384,17 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "owo-colors" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" - [[package]] name = "paste" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pathdiff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" - [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pretty_assertions" @@ -455,9 +408,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", "syn", @@ -465,32 +418,32 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -504,13 +457,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.4", ] [[package]] @@ -521,9 +474,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rustc-hash" @@ -533,9 +486,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags", "errno", @@ -546,59 +499,39 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" - -[[package]] -name = "sample-kmdf-driver" -version = "0.1.0" -dependencies = [ - "static_assertions", - "thiserror", - "wdk", - "wdk-alloc", - "wdk-build", - "wdk-macros", - "wdk-panic", - "wdk-sys", -] - -[[package]] -name = "scratch" -version = "1.0.7" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "semver" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.196" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", @@ -607,24 +540,15 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", "serde", ] -[[package]] -name = "serde_spanned" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" -dependencies = [ - "serde", -] - [[package]] name = "sharded-slab" version = "0.1.7" @@ -642,21 +566,15 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "static_assertions" -version = "1.1.0" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "strsim" @@ -666,38 +584,29 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.58" +version = "2.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", @@ -706,48 +615,14 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", ] -[[package]] -name = "toml" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - [[package]] name = "tracing" version = "0.1.40" @@ -755,9 +630,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "tracing-core" version = "0.1.32" @@ -797,21 +684,6 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "trybuild" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad7eb6319ebadebca3dacf1f85a93bc54b73dd81b9036795f73de7ddfe27d5a" -dependencies = [ - "glob", - "once_cell", - "serde", - "serde_derive", - "serde_json", - "termcolor", - "toml", -] - [[package]] name = "unicode-ident" version = "1.0.12" @@ -820,9 +692,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "valuable" @@ -834,6 +706,8 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" name = "wdk" version = "0.2.0" dependencies = [ + "tracing", + "tracing-subscriber", "wdk-build", "wdk-sys", ] @@ -842,6 +716,9 @@ dependencies = [ name = "wdk-alloc" version = "0.2.0" dependencies = [ + "tracing", + "tracing-subscriber", + "wdk-build", "wdk-sys", ] @@ -849,14 +726,19 @@ dependencies = [ name = "wdk-build" version = "0.2.0" dependencies = [ + "anyhow", "bindgen", + "camino", "cargo_metadata", "clap", "clap-cargo", + "lazy_static", + "paste", "rustversion", "serde", "serde_json", "thiserror", + "tracing", "windows", ] @@ -864,22 +746,11 @@ dependencies = [ name = "wdk-macros" version = "0.2.0" dependencies = [ - "cargo_metadata", - "fs4", - "itertools", - "lazy_static", - "macrotest", - "owo-colors", - "paste", - "pathdiff", + "itertools 0.13.0", "pretty_assertions", "proc-macro2", "quote", - "rustversion", - "scratch", "syn", - "trybuild", - "wdk-sys", ] [[package]] @@ -892,9 +763,13 @@ version = "0.2.0" dependencies = [ "anyhow", "bindgen", + "cargo_metadata", + "cc", "lazy_static", "rustversion", + "serde_json", "thiserror", + "tracing", "tracing-subscriber", "wdk-build", "wdk-macros", @@ -928,15 +803,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -945,9 +811,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.56.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ "windows-core", "windows-targets", @@ -955,21 +821,22 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.56.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ "windows-implement", "windows-interface", "windows-result", + "windows-strings", "windows-targets", ] [[package]] name = "windows-implement" -version = "0.56.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", @@ -978,9 +845,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.56.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", @@ -989,13 +856,23 @@ dependencies = [ [[package]] name = "windows-result" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ "windows-targets", ] +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + [[package]] name = "windows-sys" version = "0.52.0" @@ -1007,9 +884,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -1023,60 +900,51 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" - -[[package]] -name = "winnow" -version = "0.6.7" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b9415ee827af173ebb3f15f9083df5a122eb93572ec28741fb153356ea2578" -dependencies = [ - "memchr", -] +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "yansi" diff --git a/Cargo.toml b/Cargo.toml index f8f3674a..2ba2a93a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,22 @@ [workspace] members = ["crates/*"] +# Examples and tests must be excluded from the workspace since only one WDK configuration per build graph is supported. +exclude = [ + # Each example and test must be explicitly listed since glob is not currently supported for workspace.exclude: https://github.com/rust-lang/cargo/issues/6009 + "examples/sample-kmdf-driver", + "examples/sample-umdf-driver", + "examples/sample-wdm-driver", + "tests/config-kmdf", + "tests/config-umdf", + "tests/config-wdm", + "tests/wdk-macros-tests", +] resolver = "2" [profile.dev] -panic = "abort" lto = true [profile.release] -panic = "abort" lto = true [workspace.package] @@ -17,15 +26,54 @@ readme = "README.md" license = "MIT OR Apache-2.0" [workspace.dependencies] +# Workspace Crates wdk = { path = "crates/wdk", version = "0.2.0" } wdk-alloc = { path = "crates/wdk-alloc", version = "0.2.0" } wdk-build = { path = "crates/wdk-build", version = "0.2.0" } wdk-macros = { path = "crates/wdk-macros", version = "0.2.0" } wdk-panic = { path = "crates/wdk-panic", version = "0.2.0" } wdk-sys = { path = "crates/wdk-sys", version = "0.2.0" } + +# External Crates +anyhow = "1.0.86" bindgen = "0.69.4" -serde = { version = "1.0", features = ["derive"] } +camino = "1.1.7" +cargo_metadata = "0.18.1" +cc = "1.1.0" +clap = "4.5.9" +clap-cargo = "0.14.0" +itertools = "0.13.0" +lazy_static = "1.5.0" +paste = "1.0.15" +pretty_assertions = "1.4.0" +proc-macro2 = "1.0.86" +quote = "1.0.36" +rustversion = "1.0.17" +serde = "1.0" serde_json = "1.0" +syn = "2.0.70" +thiserror = "1.0.62" +tracing = "0.1.40" +tracing-subscriber = "0.3.18" +windows = "0.58.0" + +# The following workspace.metadata.wdk sections can be uncommented to configure the workspace for a specific WDK configuration (ex. for rust-analyzer to resolve things for a specific configuration) + +# Uncomment the section below for KMDF +# [workspace.metadata.wdk.driver-model] +# driver-type = "KMDF" +# kmdf-version-major = 1 +# target-kmdf-version-minor = 33 + +# Uncomment the section below for UMDF +# [workspace.metadata.wdk.driver-model] +# driver-type = "UMDF" +# umdf-version-major = 2 +# target-umdf-version-minor = 33 + +# Uncomment the section below for WDM +# [workspace.metadata.wdk.driver-model] +# driver-type = "WDM" # Until https://github.com/rust-lang/cargo/issues/12208 is resolved, each package in the workspace needs to explictly # add the following block to its Cargo manifest in order to enable these global lint configurations: diff --git a/Makefile.toml b/Makefile.toml index a749b193..7e9c56e5 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -1,7 +1,7 @@ extend = "./crates/wdk-build/rust-driver-makefile.toml" [config] -min_version = "0.37.11" +min_version = "0.37.13" additional_profiles = ["all-default-tasks"] [env] @@ -52,14 +52,15 @@ assert ${success} "Failed to delete tests directory" install_crate = { crate_name = "cargo-expand", binary = "cargo", test_arg = [ "expand", "--version", -], version = "1.0.80" } +], version = "1.0.85" } [tasks.audit] args = ["audit", "--deny", "warnings"] [tasks.unused-dependencies] -toolchain = "nightly" -args = ["udeps", "--all-targets"] +workspace = false +condition = { env_true = ["CARGO_MAKE_CRATE_HAS_DEPENDENCIES"] } +args = ["machete", "--skip-target-dir"] [tasks.nightly-test-flow] extend = "test-flow" diff --git a/README.md b/README.md index 61d7e249..700830c0 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,14 @@ Note: This project is still in early stages of development and is not yet recomm This project was built with support of WDM, KMDF, and UMDF drivers in mind, as well as Win32 Services. This includes support for all versions of WDF included in WDK 22H2 and newer. Currently, the crates available on [`crates.io`](https://crates.io) only support KMDF v1.33, but bindings can be generated for everything else by cloning `windows-drivers-rs` and modifying the config specified in [`build.rs` of `wdk-sys`](./crates/wdk-sys/build.rs). Crates.io support for other WDK configurations is planned in the near future. +## Repo Layout + +* [crates](./crates): Contains all the main crates that are a part of the Cargo workspace. +* [examples](./examples): Contains workspace-level examples. These examples consist of different types of minimal Windows drivers (ie. WDM, KMDF, UMDF). +* [tests](./tests): Contains workspace-level tests, inlcuding tests for metadata-based wdk configuration in packages and workspaces. + +**Note:**: Since the workspace level examples and tests use different WDK configurations, and WDR only supports one WDK configuration per workspace, the workspace-level examples and tests folder are excluded from the [repository root's Cargo manifest](./Cargo.toml). + ## Getting Started ### Build Requirements @@ -40,7 +48,7 @@ The crates in this repository are available from [`crates.io`](https://crates.io cargo new --lib ``` -2. Add dependencies on `windows-drivers-rs` crates: +1. Add dependencies on `windows-drivers-rs` crates: ```pwsh cd @@ -48,47 +56,48 @@ The crates in this repository are available from [`crates.io`](https://crates.io cargo add wdk wdk-sys wdk-alloc wdk-panic ``` -3. Set the crate type to `cdylib` by adding the following snippet to `Cargo.toml`: +1. Set the crate type to `cdylib` by adding the following snippet to `Cargo.toml`: ```toml [lib] crate-type = ["cdylib"] ``` -4. Mark the crate as a driver with a wdk metadata section. This lets the cargo-make tasks know that the package is a driver and that the driver packaging steps need to run. +1. Add a wdk metadata section and configure the wdk for your use case. This also lets the cargo-make tasks know that the package is a driver and that the driver packaging steps need to run. + UMDF Example: ```toml - [package.metadata.wdk] + [package.metadata.wdk.driver-model] + driver-type = "UMDF" + umdf-version-major = 1 + target-umdf-version-minor = 33 ``` -5. Set crate panic strategy to `abort` in `Cargo.toml`: +1. **For Kernel Mode crates** (ex. `KMDF` drivers, `WDM` drivers): Set crate panic strategy to `abort` in `Cargo.toml`: ```toml [profile.dev] panic = "abort" - lto = true # optional setting to enable Link Time Optimizations [profile.release] panic = "abort" - lto = true # optional setting to enable Link Time Optimizations ``` -6. Create a `build.rs` and add the following snippet: +1. Create a `build.rs` and add the following snippet: ```rust fn main() -> Result<(), wdk_build::ConfigError> { - wdk_build::Config::from_env_auto()?.configure_binary_build()?; - Ok(()) + wdk_build::configure_binary_build() } ``` -7. Mark your driver crate as `no_std` in `lib.rs`: +1. **For Kernel Mode crates** (ex. `KMDF` drivers, `WDM` drivers): Mark your driver crate as `no_std` in `lib.rs`: ```rust #![no_std] ``` -8. Add a panic handler in `lib.rs`: +1. **For Kernel Mode crates** (ex. `KMDF` drivers, `WDM` drivers): Add a panic handler in `lib.rs`: ```rust #[cfg(not(test))] @@ -96,20 +105,20 @@ The crates in this repository are available from [`crates.io`](https://crates.io ``` -9. Optional: Add a global allocator in `lib.rs`: +1. **For Kernel Mode crates** (ex. `KMDF` drivers, `WDM` drivers): Add an optional global allocator in `lib.rs`: ```rust #[cfg(not(test))] - use wdk_alloc::WDKAllocator; + use wdk_alloc::WdkAllocator; #[cfg(not(test))] #[global_allocator] - static GLOBAL_ALLOCATOR: WDKAllocator = WDKAllocator; + static GLOBAL_ALLOCATOR: WdkAllocator = WdkAllocator; ``` - This is only required if you want to be able to use the [`alloc` modules](https://doc.rust-lang.org/alloc/) in the rust standard library. You are also free to use your own implementations of global allocators. + This is only required if you want to be able to use the [`alloc` modules](https://doc.rust-lang.org/alloc/) in the rust standard library. -10. Add a DriverEntry in `lib.rs`: +1. Add a DriverEntry in `lib.rs`: ```rust use wdk_sys::{ @@ -120,20 +129,19 @@ The crates in this repository are available from [`crates.io`](https://crates.io #[export_name = "DriverEntry"] // WDF expects a symbol with the name DriverEntry pub unsafe extern "system" fn driver_entry( - driver: &mut DRIVER_OBJECT, + driver: PDRIVER_OBJECT, registry_path: PCUNICODE_STRING, ) -> NTSTATUS { 0 } ``` -11. Add a `Makefile.toml`: + Note: In Kernel Mode crates, you can use `driver: &mut DRIVER_OBJECT` instead of `driver: PDRIVER_OBJECT`. + +1. Add a `Makefile.toml`: ```toml extend = "target/rust-driver-makefile.toml" - [env] - CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true - [config] load_script = ''' #!@rust @@ -147,9 +155,16 @@ The crates in this repository are available from [`crates.io`](https://crates.io ''' ``` -12. Add an inx file that matches the name of your `cdylib` crate. +1. Add an inx file that matches the name of your `cdylib` crate. -13. Build the driver: +1. Enable static crt linkage. One approach is to add this to your `.cargo/config.toml`: + + ```toml + [build] + rustflags = ["-C", "target-feature=+crt-static"] + ``` + +1. Build the driver: ```pwsh cargo make @@ -157,6 +172,8 @@ The crates in this repository are available from [`crates.io`](https://crates.io A signed driver package, including a `WDRLocalTestCert.cer` file, will be generated at `target//package`. If a specific target architecture was specified, the driver package will be generated at `target///package` +Minimal examples of `WDM`, `KMDF`, and `UMDF` drivers can be found in the [examples directory](./examples). + ## Cargo Make [`cargo-make`](https://github.com/sagiegurari/cargo-make) is used to facilitate builds using `windows-drivers-rs`, including for executing post-build driver packaging steps. diff --git a/crates/sample-kmdf-driver/Cargo.toml b/crates/sample-kmdf-driver/Cargo.toml deleted file mode 100644 index f3ad3670..00000000 --- a/crates/sample-kmdf-driver/Cargo.toml +++ /dev/null @@ -1,37 +0,0 @@ -[package] -edition.workspace = true -name = "sample-kmdf-driver" -version = "0.1.0" -description = "A sample KMDF driver to demonstate KMDF drivers in RUST" -repository.workspace = true -readme.workspace = true -license.workspace = true -keywords = ["windows", "driver", "sample", "example", "wdf"] -categories = ["hardware-support"] -publish = false - -[package.metadata.wdk] - -[lib] -crate-type = ["cdylib"] -# Tests from root driver crates must be excluded since there's no way to prevent linker args from being passed to their unit tests: https://github.com/rust-lang/cargo/issues/12663 -test = false - -[dependencies] -wdk.workspace = true -wdk-alloc.workspace = true -wdk-macros.workspace = true -wdk-panic.workspace = true -wdk-sys.workspace = true -static_assertions = "1.1.0" -thiserror = "1.0.59" - -[build-dependencies] -wdk-build.workspace = true - -[features] -default = [] -nightly = ["wdk-macros/nightly", "wdk/nightly", "wdk-sys/nightly"] - -[lints] -workspace = true diff --git a/crates/sample-kmdf-driver/Makefile.toml b/crates/sample-kmdf-driver/Makefile.toml deleted file mode 100644 index f91ac160..00000000 --- a/crates/sample-kmdf-driver/Makefile.toml +++ /dev/null @@ -1,4 +0,0 @@ -extend = [ - { path = "../wdk-build/rust-driver-makefile.toml" }, - { path = "../wdk-build/rust-driver-sample-makefile.toml" }, -] diff --git a/crates/sample-kmdf-driver/build.rs b/crates/sample-kmdf-driver/build.rs deleted file mode 100644 index ae538bcf..00000000 --- a/crates/sample-kmdf-driver/build.rs +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation -// License: MIT OR Apache-2.0 - -//! Build script for the `sample-kmdf-driver` crate. - -fn main() -> Result<(), wdk_build::ConfigError> { - wdk_build::Config::from_env_auto()?.configure_binary_build() -} diff --git a/crates/wdk-alloc/Cargo.toml b/crates/wdk-alloc/Cargo.toml index be916ed2..35172a28 100644 --- a/crates/wdk-alloc/Cargo.toml +++ b/crates/wdk-alloc/Cargo.toml @@ -9,6 +9,11 @@ license.workspace = true keywords = ["allocator", "wdk", "windows"] categories = ["memory-management", "no-std", "hardware-support"] +[build-dependencies] +tracing.workspace = true +tracing-subscriber = { workspace = true, features = ["env-filter"] } +wdk-build.workspace = true + [dependencies] wdk-sys.workspace = true diff --git a/crates/wdk-alloc/build.rs b/crates/wdk-alloc/build.rs new file mode 100644 index 00000000..e6dbaa7c --- /dev/null +++ b/crates/wdk-alloc/build.rs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! Build script for the `wdk-alloc` crate. +//! +//! Based on the [`wdk_build::Config`] parsed from the build tree, this build +//! script will provide the `wdk_alloc` crate with `cfg` settings to +//! conditionally compile code. + +fn main() -> Result<(), wdk_build::ConfigError> { + tracing_subscriber::fmt().pretty().init(); + + wdk_build::configure_wdk_library_build() +} diff --git a/crates/wdk-alloc/src/lib.rs b/crates/wdk-alloc/src/lib.rs index f1ea185f..1a8b7282 100644 --- a/crates/wdk-alloc/src/lib.rs +++ b/crates/wdk-alloc/src/lib.rs @@ -6,60 +6,73 @@ //! //! # Example //! ```rust, no_run -//! #[cfg(not(test))] -//! use wdk_alloc::WDKAllocator; +//! #[cfg(all( +//! any(driver_model__driver_type = "WDM", driver_model__driver_type = "KMDF"), +//! not(test) +//! ))] +//! use wdk_alloc::WdkAllocator; //! -//! #[cfg(not(test))] +//! #[cfg(all( +//! any(driver_model__driver_type = "WDM", driver_model__driver_type = "KMDF"), +//! not(test) +//! ))] //! #[global_allocator] -//! static GLOBAL_ALLOCATOR: WDKAllocator = WDKAllocator; +//! static GLOBAL_ALLOCATOR: WdkAllocator = WdkAllocator; //! ``` #![no_std] -use core::alloc::{GlobalAlloc, Layout}; +#[cfg(any(driver_model__driver_type = "WDM", driver_model__driver_type = "KMDF"))] +pub use kernel_mode::*; -use wdk_sys::{ - ntddk::{ExAllocatePool2, ExFreePool}, - POOL_FLAG_NON_PAGED, - SIZE_T, - ULONG, -}; +#[cfg(any(driver_model__driver_type = "WDM", driver_model__driver_type = "KMDF"))] +mod kernel_mode { -/// Allocator implementation to use with `#[global_allocator]` to allow use of -/// [`core::alloc`]. -/// -/// # Safety -/// This allocator is only safe to use for allocations happening at `IRQL` <= -/// `DISPATCH_LEVEL` -pub struct WDKAllocator; + use core::alloc::{GlobalAlloc, Layout}; -// The value of memory tags are stored in little-endian order, so it is -// convenient to reverse the order for readability in tooling (ie. Windbg) -const RUST_TAG: ULONG = u32::from_ne_bytes(*b"rust"); + use wdk_sys::{ + ntddk::{ExAllocatePool2, ExFreePool}, + POOL_FLAG_NON_PAGED, + SIZE_T, + ULONG, + }; -// SAFETY: This is safe because the WDK allocator: -// 1. can never unwind since it can never panic -// 2. has implementations of alloc and dealloc that maintain layout -// constraints (FIXME: Alignment of the layout is currenty not -// supported) -unsafe impl GlobalAlloc for WDKAllocator { - unsafe fn alloc(&self, layout: Layout) -> *mut u8 { - let ptr = - // SAFETY: `ExAllocatePool2` is safe to call from any `IRQL` <= `DISPATCH_LEVEL` since its allocating from `POOL_FLAG_NON_PAGED` - unsafe { - ExAllocatePool2(POOL_FLAG_NON_PAGED, layout.size() as SIZE_T, RUST_TAG) - }; - if ptr.is_null() { - return core::ptr::null_mut(); + /// Allocator implementation to use with `#[global_allocator]` to allow use + /// of [`core::alloc`]. + /// + /// # Safety + /// This allocator is only safe to use for allocations happening at `IRQL` + /// <= `DISPATCH_LEVEL` + pub struct WdkAllocator; + + // The value of memory tags are stored in little-endian order, so it is + // convenient to reverse the order for readability in tooling (ie. Windbg) + const RUST_TAG: ULONG = u32::from_ne_bytes(*b"rust"); + + // SAFETY: This is safe because the Wdk allocator: + // 1. can never unwind since it can never panic + // 2. has implementations of alloc and dealloc that maintain layout + // constraints (FIXME: Alignment of the layout is currenty not + // supported) + unsafe impl GlobalAlloc for WdkAllocator { + unsafe fn alloc(&self, layout: Layout) -> *mut u8 { + let ptr = + // SAFETY: `ExAllocatePool2` is safe to call from any `IRQL` <= `DISPATCH_LEVEL` since its allocating from `POOL_FLAG_NON_PAGED` + unsafe { + ExAllocatePool2(POOL_FLAG_NON_PAGED, layout.size() as SIZE_T, RUST_TAG) + }; + if ptr.is_null() { + return core::ptr::null_mut(); + } + ptr.cast() } - ptr.cast() - } - unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) { - // SAFETY: `ExFreePool` is safe to call from any `IRQL` <= `DISPATCH_LEVEL` - // since its freeing memory allocated from `POOL_FLAG_NON_PAGED` in `alloc` - unsafe { - ExFreePool(ptr.cast()); + unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) { + // SAFETY: `ExFreePool` is safe to call from any `IRQL` <= `DISPATCH_LEVEL` + // since its freeing memory allocated from `POOL_FLAG_NON_PAGED` in `alloc` + unsafe { + ExFreePool(ptr.cast()); + } } } } diff --git a/crates/wdk-build/Cargo.toml b/crates/wdk-build/Cargo.toml index 9f77a645..c50d0867 100644 --- a/crates/wdk-build/Cargo.toml +++ b/crates/wdk-build/Cargo.toml @@ -9,24 +9,29 @@ license.workspace = true keywords = ["wdk", "windows", "build-dependencies"] categories = ["development-tools::build-utils", "development-tools::ffi"] +[build-dependencies] +rustversion.workspace = true + [dependencies] +anyhow.workspace = true bindgen.workspace = true -serde.workspace = true +camino.workspace = true +cargo_metadata.workspace = true +clap = { workspace = true, features = ["derive"] } +clap-cargo.workspace = true +lazy_static.workspace = true +paste.workspace = true +serde = { workspace = true, features = ["derive"] } serde_json.workspace = true -clap = { version = "4.5.4", features = ["derive"] } -clap-cargo = "0.14.0" -thiserror = "1.0.59" -windows = { version = "0.56.0", features = [ +thiserror.workspace = true +tracing.workspace = true +windows = { workspace = true, features = [ "Win32_Foundation", "Win32_System_Registry", ] } -cargo_metadata = "0.18.1" - -[build-dependencies] -rustversion = "1.0.15" [dev-dependencies] -windows = { version = "0.56.0", features = ["Win32_UI_Shell"] } +windows = { workspace = true, features = ["Win32_UI_Shell"] } # Cannot inherit workspace lints since overriding them is not supported yet: https://github.com/rust-lang/cargo/issues/13157 # [lints] diff --git a/crates/wdk-build/build.rs b/crates/wdk-build/build.rs index 3515cf8f..be148c28 100644 --- a/crates/wdk-build/build.rs +++ b/crates/wdk-build/build.rs @@ -1,7 +1,10 @@ // Copyright (c) Microsoft Corporation // License: MIT OR Apache-2.0 -//! Build script for the `wdk-build` crate. +//! Build script for the `wdk-build` crate +//! +//! This provides a `nightly_feature` to the `wdk-build` crate, so that it can +//! conditionally enable nightly features. fn main() { println!("cargo::rustc-check-cfg=cfg(nightly_toolchain)"); diff --git a/crates/wdk-build/rust-driver-makefile.toml b/crates/wdk-build/rust-driver-makefile.toml index d383f584..2a5b2f5b 100644 --- a/crates/wdk-build/rust-driver-makefile.toml +++ b/crates/wdk-build/rust-driver-makefile.toml @@ -1,8 +1,7 @@ -# This file can be leveraged to build downstream drivers. See examples at https://github.com/microsoft/Windows-rust-drivers-samples +# This file is leveraged to build downstream drivers. See examples at https://github.com/microsoft/Windows-rust-drivers-samples -# FIXME: this flow is based on the signing process of a KMDF PNP driver. There should be different flows available for different types of drivers as outlined in https://learn.microsoft.com/en-us/windows-hardware/drivers/install/test-signing-driver-packages [config] -min_version = "0.37.8" +min_version = "0.37.13" init_task = "wdk-build-init" reduce_output = false @@ -14,6 +13,11 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true # This is set to "" here to match the default behavior of Cargo. CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = { unset = true } +# rust-script condition_script's return `Err` to signal that the task should not be run. Hide Err backtraces by default to keep output cleaner. +RUST_LIB_BACKTRACE = 0 + +WDK_BUILD_BASE_INFVERIF_FLAGS = "/v" + [plugins.impl.rust-env-update] script = ''' assert ${task.has_script} "script is required for rust-env-update plugin" @@ -28,9 +32,8 @@ taskjson = json_parse ${task.as_json} out = exec --fail-on-error cargo install ${taskjson.install_crate.crate_name} --version ${taskjson.install_crate.min_version} assert_eq ${out.code} 0 "[tasks.${task.name}]'s install_crate failed with exit code: ${out.code}\nstdout:\n${out.stdout}\nstderr:\n${out.stderr}" -# Execute rust-script -taskjson = json_parse ${task.as_json} -filepath = set "${CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY}/cargo-make-script/${task.name}/main.rs" +# Enable rust-env-update's rust-script cache (Note: when developing locally on WDR itself, rust-script.exe --clear-cache can be used to force a rebuild of the script's wdk-build dependency) +filepath = set "${CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY}/cargo-make-script/${task.name}/rust-env-update.rs" # If a file already exists, only overwrite it if the script has changed (so that rust-script caching can be leveraged) if is_file ${filepath} old_hash = digest --algo sha256 --file ${filepath} @@ -41,28 +44,115 @@ if is_file ${filepath} else writefile ${filepath} ${taskjson.script} end + +# Append cli args to task args +task_args = array_join ${task.args} " " cli_args = array_join ${flow.cli.args} " " -# rust-script will try to consume --help, so help must be passed via TRIGGER_HELP env var in order to provide clap help output -trigger_help = get_env TRIGGER_HELP -if not is_empty ${trigger_help} - cli_args = concat ${cli_args} " --help" +combined_args = concat ${cli_args} " " ${task_args} +combined_args = trim ${combined_args} + +# Execute rust-script +out = exec --fail-on-error rust-script --base-path ${taskjson.env.CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY} ${CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY}/cargo-make-script/${task.name}/rust-env-update.rs %{combined_args} +assert_eq ${out.code} 0 "[tasks.${task.name}]'s script failed with exit code: ${out.code}\nstdout:\n${out.stdout}\nstderr:\n${out.stderr}\nThe temporary rust-script file is located at ${CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY}/cargo-make-script/${task.name}/rust-env-update.rs" + +if contains ${combined_args} "--help" + println ${out.stdout} + + # If help was triggered, exit with code 1 to prevent the rest of the makefile from running + exit 1 end -out = exec --fail-on-error rust-script --base-path ${taskjson.env.CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY} ${CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY}/cargo-make-script/${task.name}/main.rs %{cli_args} -assert_eq ${out.code} 0 "[tasks.${task.name}]'s script failed with exit code: ${out.code}\nstdout:\n${out.stdout}\nstderr:\n${out.stderr}\nThe temporary rust-script file is located at ${CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY}/cargo-make-script/${task.name}/main.rs" # Set cargo-make env vars based on output of rust-script script_output = trim ${out.stdout} if not is_empty ${script_output} script_output_array = split ${script_output} \n - stdout_first_line = array_get ${script_output_array} 0 - assert_eq ${stdout_first_line} "FORWARDING ARGS TO CARGO-MAKE:" "[tasks.${task.name}]'s script output did not begin with \"FORWARDING ARGS TO CARGO-MAKE:\". Was `--help` passed as one of the arguments?\nstdout:\n${out.stdout}\nstderr:\n${out.stderr}\nThe temporary rust-script file is located at ${CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY}/cargo-make-script/${task.name}/main.rs" - array_remove ${script_output_array} 0 + + # Search the stdout output of the script, with the following behaviours for each line: + # 1. If the line is between the "FORWARDING ARGS TO CARGO-MAKE:" start delimited and the "END OF FORWARDING ARGS TO CARGO-MAKE" end delimiter, update the cargo-make process' environment variables based on the key-value pairs in the line. + # 2. If the line is not between the start and end delimiters, print the line normally. + looking_for_start_delimiter = set true for line in ${script_output_array} - parts = split ${line} = - key = array_get ${parts} 0 - value = array_get ${parts} 1 - set_env ${key} ${value} + if ${looking_for_start_delimiter} + if eq ${line} "FORWARDING ARGS TO CARGO-MAKE:" + looking_for_start_delimiter = set false + else + # Any output not surrounded by the start and end delimiter lines should be printed normally + println ${line} + end + else + if eq ${line} "END OF FORWARDING ARGS TO CARGO-MAKE" + looking_for_start_delimiter = set true + else + # Set cargo-make env_var based on line output + parts = split ${line} = + key = array_get ${parts} 0 + value = array_get ${parts} 1 + set_env ${key} ${value} + end + end end + assert ${looking_for_start_delimiter} "A matching \"END OF FORWARDING ARGS TO CARGO-MAKE\" for a \"FORWARDING ARGS TO CARGO-MAKE:\" was not found in script output." +end +''' + +# This plugin replaces the embedded `CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY` in the rust-script doc comment with its evaluated value. See https://github.com/sagiegurari/cargo-make/issues/1081 for more context. +[plugins.impl.rust-condition-script-cargo_make_current_task_initial_makefile_directory-substitution] +script = ''' +# Parse task json into variables +taskjson = json_parse ${task.as_json} + +# Convert backslashes to forward slashes +rust-driver-toolchain-path = replace ${taskjson.env.CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY} "\\" "/" + +# Replace the ${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY} variable in the condition_script with the rust-driver-toolchain-path +taskjson.condition_script = replace ${taskjson.condition_script} "\${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY}" "${rust-driver-toolchain-path}" + +# Unset the private flag since it breaks cm_plugin_run_custom_task: https://github.com/sagiegurari/cargo-make/issues/1084 +unset taskjson.private + +# Reencode variables into json +taskjson = json_encode taskjson + +# Run the invoking task, with the modified condition_script +cm_plugin_run_custom_task ${taskjson} +''' + +# This plugin adds support for cargo-make's emulated workspace feature to work on emulated workspace members which are Cargo workspaces themselves. +# Since Cargo workspaces are not detected in cargo-make emulated workspace members, the task is rerun in a forked subprocess with the CARGO_MAKE_CRATE_CURRENT_WORKSPACE_MEMBER env var unset to allow cargo-make's workspace detection to run. +# +# This plugin also includes functionality from `rust-condition-script-cargo_make_current_task_initial_makefile_directory-substitution` since `https://github.com/sagiegurari/cargo-make/pull/1132` has not merged yet. +[plugins.impl.nested-cargo-workspace-in-cargo-make-emulated-workspace-support] +script = ''' +# If current flow is executing in a Cargo workspace, which is a member of a cargo-make emulated workspace +if ${CARGO_MAKE_WORKSPACE_EMULATION} and ${CARGO_MAKE_CRATE_IS_WORKSPACE} + + # Re-run the task in a forked subprocess, allowing cargo-make to run in a workspace context (i.e. running on each of the members of the Cargo workspace) + echo Executing \"${task.name}\" Task in a forked subprocess to run on Cargo workspace: ${CARGO_MAKE_CRATE_CURRENT_WORKSPACE_MEMBER} + + # Unset the CARGO_MAKE_CRATE_CURRENT_WORKSPACE_MEMBER env var to allow cargo-make's workspace detection to run + unset_env CARGO_MAKE_CRATE_CURRENT_WORKSPACE_MEMBER + + cm_plugin_run_custom_task "{\"run_task\":{\"name\":\"${task.name}\",\"fork\":true}}" +else + # FIXME: modifying the taskjson here is not needed after upstream fix is merged: https://github.com/sagiegurari/cargo-make/pull/1132 + + # Parse task json into variables + taskjson = json_parse ${task.as_json} + + # Convert backslashes to forward slashes + rust-driver-toolchain-path = replace ${taskjson.env.CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY} "\\" "/" + + # Replace the ${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY} variable in the condition_script with the rust-driver-toolchain-path + taskjson.condition_script = replace ${taskjson.condition_script} "\${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY}" "${rust-driver-toolchain-path}" + + # Unset the private flag since it breaks cm_plugin_run_custom_task: https://github.com/sagiegurari/cargo-make/issues/1084 + unset taskjson.private + + # Reencode variables into json + taskjson = json_encode taskjson + + # Run the invoking task, with the modified condition_script + cm_plugin_run_custom_task ${taskjson} end ''' @@ -78,9 +168,46 @@ script = ''' //! ``` #![allow(unused_doc_comments)] -wdk_build::cargo_make::validate_and_forward_args(); -wdk_build::cargo_make::setup_path()?; -wdk_build::cargo_make::setup_wdk_version()?; +let cli_env_vars = wdk_build::cargo_make::validate_command_line_args(); +let path_env_vars = wdk_build::cargo_make::setup_path()?; +let wdk_version_env_vars = wdk_build::cargo_make::setup_wdk_version()?; + +wdk_build::cargo_make::forward_printed_env_vars( + cli_env_vars.into_iter().chain(path_env_vars).chain(wdk_version_env_vars), +); +''' + +[tasks.setup-wdk-config-env-vars] +# This exists as a seperate task outside of `wdk-build-init` so that any wdk-metadata-detection errors can be a hard error, without failing every task flow that executes on non-driver crates in the workspace. +private = true +install_crate = { crate_name = "rust-script", min_version = "0.30.0" } +plugin = "rust-env-update" +script_runner = "@rust" +script_runner_args = [ + "--base-path", + "${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY}", +] +script = ''' +//! ```cargo +//! [dependencies] +//! wdk-build = { path = ".", version = "0.2.0" } +//! ``` +#![allow(unused_doc_comments)] + +let serialized_wdk_metadata_map = wdk_build::metadata::to_map_with_prefix::>( + "WDK_BUILD_METADATA", + &wdk_build::metadata::Wdk::try_from(&wdk_build::cargo_make::get_cargo_metadata()?)?, +)?; + +for (key, value) in &serialized_wdk_metadata_map { + std::env::set_var(key, value); +} + +wdk_build::cargo_make::forward_printed_env_vars( + serialized_wdk_metadata_map + .into_iter() + .map(|(key, _)| (key)), +); ''' [tasks.copy-inx-to-output] @@ -127,15 +254,36 @@ std::fs::copy(&source_file, &destination_file).expect(&format!( )); ''' -[tasks.generate-sys-file] +[tasks.generate-driver-binary-file] private = true -dependencies = ["build"] -script_runner = "@rust" +dependencies = ["setup-wdk-config-env-vars", "build"] +plugin = "rust-condition-script-cargo_make_current_task_initial_makefile_directory-substitution" +condition_script = ''' +#!@rust + +//! ```cargo +//! [dependencies] +//! wdk-build = { path = "${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY}", version = "0.2.0" } +//! ``` +#![allow(unused_doc_comments)] + +wdk_build::cargo_make::condition_script(|| { + let driver_type = std::env::var("WDK_BUILD_METADATA-DRIVER_MODEL-DRIVER_TYPE") + .expect("WDK_BUILD_METADATA-DRIVER_MODEL-DRIVER_TYPE should be set by setup-wdk-config-env-vars cargo-make task"); + + match driver_type.as_str() { + "WDM" | "KMDF" => Ok(()), + _ => Err("Non-Kernel Mode Driver detected. Skipping generate-driver-binary-file task."), + } +})? +''' script_runner_args = [ "--base-path", "${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY}", ] script = ''' +#!@rust + //! ```cargo //! [dependencies] //! wdk-build = { path = ".", version = "0.2.0" } @@ -161,7 +309,8 @@ std::fs::copy(&source_file, &destination_file).expect(&format!( [tasks.stampinf] private = true -dependencies = ["copy-inx-to-output"] +dependencies = ["setup-wdk-config-env-vars", "copy-inx-to-output"] +env = { "WDK_BUILD_STAMPINF_WDF_FLAGS" = { source = "${WDK_BUILD_METADATA-DRIVER_MODEL-DRIVER_TYPE}", default_value = "", mapping = { "KMDF" = "-k ${WDK_BUILD_METADATA-DRIVER_MODEL-KMDF_VERSION_MAJOR}.${WDK_BUILD_METADATA-DRIVER_MODEL-TARGET_KMDF_VERSION_MINOR}", "UMDF" = "-u ${WDK_BUILD_METADATA-DRIVER_MODEL-UMDF_VERSION_MAJOR}.${WDK_BUILD_METADATA-DRIVER_MODEL-TARGET_UMDF_VERSION_MINOR}.0" } }, "WDK_BUILD_STAMPINF_ARCH" = { source = "${CARGO_MAKE_CRATE_TARGET_TRIPLE}", default_value = "UNKNOWN", mapping = { "x86_64-pc-windows-msvc" = "amd64", "aarch64-pc-windows-msvc" = "arm64" } } } command = "stampinf" args = [ "-f", @@ -169,29 +318,30 @@ args = [ "-d", "*", "-a", - "amd64", + "${WDK_BUILD_STAMPINF_ARCH}", "-c", "${CARGO_MAKE_CRATE_FS_NAME}.cat", "-v", "*", - "-k", - "1.33", + "@@split(WDK_BUILD_STAMPINF_WDF_FLAGS, ,remove-empty)", ] [tasks.infverif] private = true -dependencies = ["stampinf"] +dependencies = ["setup-wdk-config-env-vars", "stampinf"] +# TODO: This should be if WDK <= GE && DRIVER_MODEL == UMDF +env = { "WDK_BUILD_BASE_INFVERIF_FLAGS" = { source = "${WDK_BUILD_METADATA-DRIVER_MODEL-DRIVER_TYPE}", default_value = "${WDK_BUILD_BASE_INFVERIF_FLAGS} /w", mapping = { "UMDF" = "${WDK_BUILD_BASE_INFVERIF_FLAGS} /u" } } } command = "infverif" args = [ - "/v", - "/w", - "@@split(WDK_BUILD_ADDITIONAL_INFVERIF_FLAGS, )", + "@@split(WDK_BUILD_BASE_INFVERIF_FLAGS, ,remove-empty)", + "@@split(WDK_BUILD_ADDITIONAL_INFVERIF_FLAGS, ,remove-empty)", "${WDK_BUILD_OUTPUT_DIRECTORY}/${CARGO_MAKE_CRATE_FS_NAME}.inf", ] -[tasks.copy-sys-to-package] +[tasks.copy-driver-binary-to-package] private = true -dependencies = ["generate-sys-file"] +dependencies = ["setup-wdk-config-env-vars", "generate-driver-binary-file"] +env = { "WDK_BUILD_DRIVER_EXTENSION" = { source = "${WDK_BUILD_METADATA-DRIVER_MODEL-DRIVER_TYPE}", default_value = "UNKNOWN_EXTENSION", mapping = { "WDM" = "sys", "KMDF" = "sys", "UMDF" = "dll" } } } script_runner = "@rust" script_runner_args = [ "--base-path", @@ -204,9 +354,10 @@ script = ''' //! ``` #![allow(unused_doc_comments)] +let driver_binary_extension = std::env::var("WDK_BUILD_DRIVER_EXTENSION").expect("WDK_BUILD_DRIVER_EXTENSION should be set by cargo-make"); wdk_build::cargo_make::copy_to_driver_package_folder( wdk_build::cargo_make::get_wdk_build_output_directory().join(format!( - "{}.sys", + "{}.{driver_binary_extension}", wdk_build::cargo_make::get_current_package_name() )), )? @@ -283,11 +434,12 @@ wdk_build::cargo_make::copy_to_driver_package_folder( [tasks.inf2cat] private = true -dependencies = ["copy-sys-to-package", "copy-inf-to-package"] +dependencies = ["copy-driver-binary-to-package", "copy-inf-to-package"] +env = { "WDK_BUILD_INF2CAT_OS" = { source = "${CARGO_MAKE_CRATE_TARGET_TRIPLE}", default_value = "UNKNOWN", mapping = { "x86_64-pc-windows-msvc" = "10_x64", "aarch64-pc-windows-msvc" = "Server10_arm64" } } } command = "inf2cat" args = [ "/driver:${WDK_BUILD_OUTPUT_DIRECTORY}/${CARGO_MAKE_CRATE_FS_NAME}_package", - "/os:10_NI_X64,10_VB_X64", # TODO: this should be a parameter + "/os:${WDK_BUILD_INF2CAT_OS}", "/uselocaltime", ] @@ -314,9 +466,9 @@ args = [ "-eku", "1.3.6.1.5.5.7.3.3", "-ss", - "WDRTestCertStore", # TODO: this should be a parameter + "WDRTestCertStore", # FIXME: this should be a parameter "-n", - "CN=WDRLocalTestCert", # TODO: this should be a parameter + "CN=WDRLocalTestCert", # FIXME: this should be a parameter "${WDK_BUILD_OUTPUT_DIRECTORY}/WDRLocalTestCert.cer", ] @@ -348,9 +500,9 @@ args = [ "sign", "/v", "/s", - "WDRTestCertStore", # TODO: this should be a parameter + "WDRTestCertStore", # FIXME: this should be a parameter "/n", - "WDRLocalTestCert", # TODO: this should be a parameter + "WDRLocalTestCert", # FIXME: this should be a parameter "/t", "http://timestamp.digicert.com", "/fd", @@ -358,15 +510,15 @@ args = [ "${WDK_BUILD_SIGNTOOL_SIGN_INPUT_FILE}", ] -[tasks.sign-sys] +[tasks.sign-driver-binary] private = true -dependencies = ["copy-sys-to-package"] -env = { "WDK_BUILD_SIGNTOOL_SIGN_INPUT_FILE" = "${WDK_BUILD_OUTPUT_DIRECTORY}/${CARGO_MAKE_CRATE_FS_NAME}_package/${CARGO_MAKE_CRATE_FS_NAME}.sys" } +dependencies = ["setup-wdk-config-env-vars", "copy-driver-binary-to-package"] +env = { "WDK_BUILD_SIGNTOOL_SIGN_INPUT_FILE" = "${WDK_BUILD_OUTPUT_DIRECTORY}/${CARGO_MAKE_CRATE_FS_NAME}_package/${CARGO_MAKE_CRATE_FS_NAME}.${WDK_BUILD_DRIVER_EXTENSION}" } run_task = "signtool-sign" [tasks.sign-cat] private = true -dependencies = ["inf2cat", "sign-sys"] +dependencies = ["inf2cat", "sign-driver-binary"] env = { "WDK_BUILD_SIGNTOOL_SIGN_INPUT_FILE" = "${WDK_BUILD_OUTPUT_DIRECTORY}/${CARGO_MAKE_CRATE_FS_NAME}_package/${CARGO_MAKE_CRATE_FS_NAME}.cat" } run_task = "signtool-sign" @@ -376,10 +528,10 @@ condition = { env_true = ["WDK_BUILD_ENABLE_SIGNTOOL_VERIFY"] } command = "signtool" args = ["verify", "/v", "/pa", "${WDK_BUILD_SIGNTOOL_VERIFY_INPUT_FILE}"] -[tasks.verify-signature-sys] +[tasks.verify-signature-driver-binary] private = true -dependencies = ["sign-sys"] -env = { "WDK_BUILD_SIGNTOOL_VERIFY_INPUT_FILE" = "${WDK_BUILD_OUTPUT_DIRECTORY}/${CARGO_MAKE_CRATE_FS_NAME}_package/${CARGO_MAKE_CRATE_FS_NAME}.sys" } +dependencies = ["setup-wdk-config-env-vars", "sign-driver-binary"] +env = { "WDK_BUILD_SIGNTOOL_VERIFY_INPUT_FILE" = "${WDK_BUILD_OUTPUT_DIRECTORY}/${CARGO_MAKE_CRATE_FS_NAME}_package/${CARGO_MAKE_CRATE_FS_NAME}.${WDK_BUILD_DRIVER_EXTENSION}" } run_task = "signtool-verify" [tasks.verify-signature-cat] @@ -391,64 +543,44 @@ run_task = "signtool-verify" [tasks.package-driver] private = true dependencies = [ - "copy-sys-to-package", + "copy-driver-binary-to-package", "copy-pdb-to-package", "copy-inf-to-package", "copy-map-to-package", "copy-certificate-to-package", - "sign-sys", - "verify-signature-sys", + "sign-driver-binary", + "verify-signature-driver-binary", "sign-cat", "verify-signature-cat", "infverif", ] [tasks.package-driver-flow] -# Only run flow if the current package is marked as a driver +# Note: Dependencies are always run, regardless of the condition_script result. This allows `cargo make` in mixed driver/non-driver workspaces +dependencies = ["build"] +# Only run package-driver flow if the current package is marked as a driver +plugin = "nested-cargo-workspace-in-cargo-make-emulated-workspace-support" condition_script = ''' -#!@duckscript - -# Execute Cargo Metadata to get Package information -out = exec --fail-on-error cargo metadata --no-deps --format-version 1 --manifest-path ${CARGO_MAKE_WORKING_DIRECTORY}/Cargo.toml -assert_eq ${out.code} 0 "cargo metadata failed with exit code: ${out.code}\nstdout:\n${out.stdout}\nstderr:\n${out.stderr}" - -manifest_metadata = json_parse --collection ${out.stdout} -packages = map_get ${manifest_metadata} packages -contains_wdk_metadata = set false - -for package in ${packages} - package_name = map_get ${package} name - - # Find metadata for the current package - if eq ${package_name} ${CARGO_MAKE_CRATE_NAME} - package_metadata = map_get ${package} metadata - - # Check if the package contains a metadata section - if is_map ${package_metadata} - - # Check if the package contains a package.metadata.wdk section - contains_wdk_metadata = map_contains_key ${package_metadata} wdk - end - end -end +#!@rust -release --recursive ${manifest_metadata} +//! ```cargo +//! [dependencies] +//! wdk-build = { path = "${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY}", version = "0.2.0" } +//! anyhow = "1" +//! ``` +#![allow(unused_doc_comments)] -# Run driver package-driver task if the package contains a package.metadata.wdk section -if ${contains_wdk_metadata} - echo Building and packaging driver: ${CARGO_MAKE_CRATE_NAME}... - exit 0 -else - echo ${CARGO_MAKE_CRATE_NAME} does not contain a package.metadata.wdk section in its manifest. Skipping package-driver task. - exit 1 -end +fn main() -> anyhow::Result<()> { + wdk_build::cargo_make::package_driver_flow_condition_script() +} ''' run_task = "package-driver" [tasks.help] +extend = "wdk-build-init" +private = false workspace = false -env = { "TRIGGER_HELP" = "1" } -run_task = "wdk-build-init" +args = ["--help"] [tasks.default] alias = "package-driver-flow" diff --git a/crates/wdk-build/rust-driver-sample-makefile.toml b/crates/wdk-build/rust-driver-sample-makefile.toml index 8b5cf74c..5c3b6d56 100644 --- a/crates/wdk-build/rust-driver-sample-makefile.toml +++ b/crates/wdk-build/rust-driver-sample-makefile.toml @@ -2,29 +2,6 @@ # Using this file requires extending both the standard makefile and this makefile in order, as follows: # extend = [ { path = "target/rust-driver-makefile.toml" }, { path = "target/rust-driver-sample-makefile.toml" } ] -# This plugin replaces the embedded `CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY` in the rust-script doc comment with its evaluated value. See https://github.com/sagiegurari/cargo-make/issues/1081 for more context. -[plugins.impl.rust-condition-script-cargo_make_current_task_initial_makefile_directory-substitution] -script = ''' -# Parse task json into variables -taskjson = json_parse ${task.as_json} - -# Convert backslashes to forward slashes -rust-driver-toolchain-path = replace ${taskjson.env.CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY} "\\" "/" - -# Replace the ${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY} variable in the condition_script with the rust-driver-toolchain-path -taskjson.condition_script = replace ${taskjson.condition_script} "\${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY}" "${rust-driver-toolchain-path}" - -# Unset the private flag since it breaks cm_plugin_run_custom_task -unset taskjson.private - -# Reencode variables into json -taskjson = json_encode taskjson - -# Run the invoking task, with the modified condition_script -cm_plugin_run_custom_task ${taskjson} -''' - - [tasks.wdk-samples-setup] private = true install_crate = { crate_name = "rust-script", min_version = "0.30.0" } @@ -36,12 +13,17 @@ script = ''' //! wdk-build = { path = ".", version = "0.2.0" } //! ``` #![allow(unused_doc_comments)] + let env_string = std::env::var_os(wdk_build::cargo_make::WDK_VERSION_ENV_VAR) .map_or_else( || panic!("Couldn't read WDK build version that should have been set in init"), |os_env_string| os_env_string.to_string_lossy().into_owned(), ); -wdk_build::cargo_make::setup_infverif_for_samples(&env_string)?; +let samples_infverif_env_vars = wdk_build::cargo_make::setup_infverif_for_samples(&env_string)?; + +wdk_build::cargo_make::forward_printed_env_vars( + samples_infverif_env_vars, +); ''' [tasks.infverif] diff --git a/crates/wdk-build/src/bindgen.rs b/crates/wdk-build/src/bindgen.rs index 48a5d615..415eaccf 100644 --- a/crates/wdk-build/src/bindgen.rs +++ b/crates/wdk-build/src/bindgen.rs @@ -1,9 +1,14 @@ // Copyright (c) Microsoft Corporation // License: MIT OR Apache-2.0 -use bindgen::Builder; +use std::borrow::Borrow; -use crate::{CPUArchitecture, Config, ConfigError, DriverConfig}; +use bindgen::{ + callbacks::{ItemInfo, ItemKind, ParseCallbacks}, + Builder, +}; + +use crate::{Config, ConfigError}; /// An extension trait that provides a way to create a [`bindgen::Builder`] /// configured for generating bindings to the wdk @@ -15,7 +20,15 @@ pub trait BuilderExt { /// /// Implementation may return `wdk_build::ConfigError` if it fails to create /// a builder - fn wdk_default(c_header_files: Vec<&str>, config: &Config) -> Result; + fn wdk_default( + c_header_files: Vec<&str>, + config: impl Borrow, + ) -> Result; +} + +#[derive(Debug)] +struct WdkCallbacks { + wdf_function_table_symbol_name: Option, } impl BuilderExt for Builder { @@ -26,7 +39,12 @@ impl BuilderExt for Builder { /// /// Will return `wdk_build::ConfigError` if any of the resolved include or /// library paths do not exist - fn wdk_default(c_header_files: Vec<&str>, config: &Config) -> Result { + fn wdk_default( + c_header_files: Vec<&str>, + config: impl Borrow, + ) -> Result { + let config = config.borrow(); + let mut builder = Self::default(); for c_header in c_header_files { @@ -51,89 +69,63 @@ impl BuilderExt for Builder { ) })) .clang_args( - match config.cpu_architecture { - // Definitions sourced from `Program Files\Windows - // Kits\10\build\10.0.22621.0\WindowsDriver.x64.props` - CPUArchitecture::AMD64 => { - vec!["_WIN64", "_AMD64_", "AMD64"] - } - // Definitions sourced from `Program Files\Windows - // Kits\10\build\10.0.22621.0\WindowsDriver.arm64.props` - CPUArchitecture::ARM64 => { - vec!["_ARM64_", "ARM64", "_USE_DECLSPECS_FOR_SAL=1", "STD_CALL"] - } - } - .iter() - .map(|preprocessor_definition| format!("--define-macro={preprocessor_definition}")), - ) - .clang_args( - match config.driver_config { - // FIXME: Add support for KMDF_MINIMUM_VERSION_REQUIRED and - // UMDF_MINIMUM_VERSION_REQUIRED - DriverConfig::WDM() => { - vec![] - } - DriverConfig::KMDF(kmdf_config) => { - vec![ - format!("KMDF_VERSION_MAJOR={}", kmdf_config.kmdf_version_major), - format!("KMDF_VERSION_MINOR={}", kmdf_config.kmdf_version_minor), - ] - } - DriverConfig::UMDF(umdf_config) => { - let mut umdf_definitions = vec![ - format!("UMDF_VERSION_MAJOR={}", umdf_config.umdf_version_major), - format!("UMDF_VERSION_MINOR={}", umdf_config.umdf_version_minor), - ]; - - if umdf_config.umdf_version_major >= 2 { - umdf_definitions.push("UMDF_USING_NTSTATUS".to_string()); - umdf_definitions.push("_UNICODE".to_string()); - umdf_definitions.push("UNICODE".to_string()); - } - - umdf_definitions - } - } - .iter() - .map(|preprocessor_definition| format!("--define-macro={preprocessor_definition}")), + config + .get_preprocessor_definitions_iter() + .map(|(key, value)| { + format!( + "--define-macro={key}{}", + value.map(|v| format!("={v}")).unwrap_or_default() + ) + }) + .chain(Config::wdk_bindgen_compiler_flags()), ) - // Windows SDK & DDK have non-portable paths (ex. #include "DriverSpecs.h" but the file - // is actually driverspecs.h) - .clang_arg("--warn-=no-nonportable-include-path") - // Windows SDK & DDK use pshpack and poppack headers to change packing - .clang_arg("--warn-=no-pragma-pack") - .clang_arg("--warn-=no-ignored-attributes") - .clang_arg("--warn-=no-ignored-pragma-intrinsic") - .clang_arg("--warn-=no-visibility") - .clang_arg("--warn-=no-microsoft-anon-tag") - .clang_arg("--warn-=no-microsoft-enum-forward-reference") - // Don't warn for deprecated declarations. deprecated items are already blocklisted - // below and if there are any non-blocklisted function definitions, it will throw a - // -WDeprecated warning - .clang_arg("--warn-=no-deprecated-declarations") - // Windows SDK & DDK contain unnecessary token pasting (ex. &##_variable: `&` and - // `_variable` are separate tokens already, and don't need `##` to concatenate them) - .clang_arg("--warn-=no-invalid-token-paste") - .clang_arg("-fms-extensions") .blocklist_item("ExAllocatePoolWithTag") // Deprecated .blocklist_item("ExAllocatePoolWithQuotaTag") // Deprecated .blocklist_item("ExAllocatePoolWithTagPriority") // Deprecated - // FIXME: Types containing 32-bit pointers (via __ptr32) are not generated properly and cause bindgen layout tests to fail: https://github.com/rust-lang/rust-bindgen/issues/2636 - .blocklist_item(".*EXTENDED_CREATE_INFORMATION_32") // FIXME: bitfield generated with non-1byte alignment in _MCG_CAP .blocklist_item(".*MCG_CAP(?:__bindgen.*)?") .blocklist_item(".*WHEA_XPF_MCA_SECTION") .blocklist_item(".*WHEA_ARM_BUS_ERROR(?:__bindgen.*)?") .blocklist_item(".*WHEA_ARM_PROCESSOR_ERROR") .blocklist_item(".*WHEA_ARM_CACHE_ERROR") + // FIXME: arrays with more than 32 entries currently fail to generate a `Default`` impl: https://github.com/rust-lang/rust-bindgen/issues/2803 + .no_default(".*tagMONITORINFOEXA") .must_use_type("NTSTATUS") .must_use_type("HRESULT") // Defaults enums to generate as a set of constants contained in a module (default value // is EnumVariation::Consts which generates enums as global constants) .default_enum_style(bindgen::EnumVariation::ModuleConsts) .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) + .parse_callbacks(Box::new(WdkCallbacks::new(config))) .formatter(bindgen::Formatter::Prettyplease); Ok(builder) } } + +impl ParseCallbacks for WdkCallbacks { + fn generated_name_override(&self, item_info: ItemInfo) -> Option { + // Override the generated name for the WDF function table symbol, since bindgen is unable to currently translate the #define automatically: https://github.com/rust-lang/rust-bindgen/issues/2544 + if let Some(wdf_function_table_symbol_name) = &self.wdf_function_table_symbol_name { + if let ItemInfo { + name: item_name, + kind: ItemKind::Var, + .. + } = item_info + { + if item_name == wdf_function_table_symbol_name { + return Some("WdfFunctions".to_string()); + } + } + } + None + } +} + +impl WdkCallbacks { + fn new(config: &Config) -> Self { + Self { + wdf_function_table_symbol_name: config.compute_wdffunctions_symbol_name(), + } + } +} diff --git a/crates/wdk-build/src/cargo_make.rs b/crates/wdk-build/src/cargo_make.rs index cd27282f..6ce78e09 100644 --- a/crates/wdk-build/src/cargo_make.rs +++ b/crates/wdk-build/src/cargo_make.rs @@ -1,6 +1,9 @@ // Copyright (c) Microsoft Corporation // License: MIT OR Apache-2.0 +//! Utilities for `cargo-make` tasks used to package binaries dependent on the +//! `WDK`. +//! //! This module provides functions used in the rust scripts in //! `rust-driver-makefile.toml`. This includes argument parsing functionality //! used by `rust-driver-makefile.toml` to validate and forward arguments common @@ -8,15 +11,21 @@ //! provide a CLI very close to cargo's own, but only exposes the arguments //! supported by `rust-driver-makefile.toml`. -use std::path::{Path, PathBuf}; +use std::{ + env, + panic::UnwindSafe, + path::{Path, PathBuf}, +}; -use cargo_metadata::{camino::Utf8Path, MetadataCommand}; +use anyhow::Context; +use cargo_metadata::{camino::Utf8Path, Metadata, MetadataCommand}; use clap::{Args, Parser}; use crate::{ + metadata, utils::{detect_wdk_content_root, get_latest_windows_sdk_version, PathExt}, - CPUArchitecture, ConfigError, + CpuArchitecture, }; /// The filename of the main makefile for Rust Windows drivers. @@ -31,6 +40,7 @@ pub const WDK_VERSION_ENV_VAR: &str = "WDK_BUILD_DETECTED_VERSION"; /// The first WDK version with the new `InfVerif` behavior. const MINIMUM_SAMPLES_FLAG_WDK_VERSION: i32 = 25798; const WDK_INF_ADDITIONAL_FLAGS_ENV_VAR: &str = "WDK_BUILD_ADDITIONAL_INFVERIF_FLAGS"; +const WDK_BUILD_OUTPUT_DIRECTORY_ENV_VAR: &str = "WDK_BUILD_OUTPUT_DIRECTORY"; /// The name of the environment variable that cargo-make uses during `cargo /// build` and `cargo test` commands @@ -38,19 +48,21 @@ const CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR: &str = "CARGO_MAKE_CARGO_BUILD_ const CARGO_MAKE_PROFILE_ENV_VAR: &str = "CARGO_MAKE_PROFILE"; const CARGO_MAKE_CARGO_PROFILE_ENV_VAR: &str = "CARGO_MAKE_CARGO_PROFILE"; +const CARGO_MAKE_CRATE_TARGET_TRIPLE_ENV_VAR: &str = "CARGO_MAKE_CRATE_TARGET_TRIPLE"; const CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY_ENV_VAR: &str = "CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY"; const CARGO_MAKE_RUST_DEFAULT_TOOLCHAIN_ENV_VAR: &str = "CARGO_MAKE_RUST_DEFAULT_TOOLCHAIN"; +const CARGO_MAKE_CRATE_NAME_ENV_VAR: &str = "CARGO_MAKE_CRATE_NAME"; const CARGO_MAKE_CRATE_FS_NAME_ENV_VAR: &str = "CARGO_MAKE_CRATE_FS_NAME"; const CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY_ENV_VAR: &str = "CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY"; -const WDK_BUILD_OUTPUT_DIRECTORY_ENV_VAR: &str = "WDK_BUILD_OUTPUT_DIRECTORY"; +const CARGO_MAKE_CURRENT_TASK_NAME_ENV_VAR: &str = "CARGO_MAKE_CURRENT_TASK_NAME"; /// `clap` uses an exit code of 2 for usage errors: const CLAP_USAGE_EXIT_CODE: i32 = 2; -trait ParseCargoArg { - fn parse_cargo_arg(&self); +trait ParseCargoArgs { + fn parse_cargo_args(&self); } #[derive(Parser, Debug)] @@ -108,7 +120,7 @@ struct CompilationOptions { )] jobs: Option, - // TODO: support building multiple targets at once + // FIXME: support building multiple targets at once #[arg(long, value_name = "TRIPLE", help = "Build for a target triple")] target: Option, @@ -135,39 +147,67 @@ struct ManifestOptions { offline: bool, } -impl ParseCargoArg for BaseOptions { - fn parse_cargo_arg(&self) { - if self.quiet && self.verbose > 0 { +impl ParseCargoArgs for CommandLineInterface { + fn parse_cargo_args(&self) { + let Self { + base, + workspace, + features, + compilation_options, + manifest_options, + } = self; + + base.parse_cargo_args(); + workspace.parse_cargo_args(); + features.parse_cargo_args(); + compilation_options.parse_cargo_args(); + manifest_options.parse_cargo_args(); + } +} + +impl ParseCargoArgs for BaseOptions { + fn parse_cargo_args(&self) { + let Self { quiet, verbose } = self; + + if *quiet && *verbose > 0 { eprintln!("Cannot specify both --quiet and --verbose"); std::process::exit(CLAP_USAGE_EXIT_CODE); } - if self.quiet { + if *quiet { append_to_space_delimited_env_var(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, "--quiet"); } - if self.verbose > 0 { + if *verbose > 0 { append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, - format!("-{}", "v".repeat(self.verbose.into())).as_str(), + format!("-{}", "v".repeat((*verbose).into())).as_str(), ); } } } -impl ParseCargoArg for clap_cargo::Workspace { - fn parse_cargo_arg(&self) { - if !self.package.is_empty() { +impl ParseCargoArgs for clap_cargo::Workspace { + fn parse_cargo_args(&self) { + let Self { + package, + workspace, + all, + exclude, + .. + } = self; + + if !package.is_empty() { append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, - self.package + package .iter() .fold( String::with_capacity({ const MINIMUM_PACKAGE_SPEC_LENGTH: usize = 1; const MINIMUM_PACKAGE_ARG_LENGTH: usize = "--package ".len() + MINIMUM_PACKAGE_SPEC_LENGTH + " ".len(); - self.package.len() * MINIMUM_PACKAGE_ARG_LENGTH + package.len() * MINIMUM_PACKAGE_ARG_LENGTH }), |mut package_args, package_spec| { package_args.push_str("--package "); @@ -180,29 +220,29 @@ impl ParseCargoArg for clap_cargo::Workspace { ); } - if self.workspace { + if *workspace { append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, "--workspace", ); } - if !self.exclude.is_empty() { - if !self.workspace { + if !exclude.is_empty() { + if !*workspace { eprintln!("--exclude can only be used together with --workspace"); std::process::exit(CLAP_USAGE_EXIT_CODE); } append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, - self.exclude + exclude .iter() .fold( String::with_capacity({ const MINIMUM_PACKAGE_SPEC_LENGTH: usize = 1; const MINIMUM_EXCLUDE_ARG_LENGTH: usize = "--exclude ".len() + MINIMUM_PACKAGE_SPEC_LENGTH + " ".len(); - self.package.len() * MINIMUM_EXCLUDE_ARG_LENGTH + package.len() * MINIMUM_EXCLUDE_ARG_LENGTH }), |mut exclude_args, package_spec| { exclude_args.push_str("--exclude "); @@ -215,39 +255,45 @@ impl ParseCargoArg for clap_cargo::Workspace { ); } - if self.all { + if *all { append_to_space_delimited_env_var(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, "--all"); } } } -impl ParseCargoArg for clap_cargo::Features { - fn parse_cargo_arg(&self) { - if self.all_features { +impl ParseCargoArgs for clap_cargo::Features { + fn parse_cargo_args(&self) { + let Self { + all_features, + no_default_features, + features, + .. + } = self; + if *all_features { append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, "--all-features", ); } - if self.no_default_features { + if *no_default_features { append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, "--no-default-features", ); } - if !self.features.is_empty() { + if !features.is_empty() { append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, - self.features + features .iter() .fold( String::with_capacity({ const MINIMUM_FEATURE_NAME_LENGTH: usize = 1; const MINIMUM_FEATURE_ARG_LENGTH: usize = "--features ".len() + MINIMUM_FEATURE_NAME_LENGTH + " ".len(); - self.features.len() * MINIMUM_FEATURE_ARG_LENGTH + features.len() * MINIMUM_FEATURE_ARG_LENGTH }), |mut feature_args: String, feature| { feature_args.push_str("--features "); @@ -262,19 +308,26 @@ impl ParseCargoArg for clap_cargo::Features { } } -impl ParseCargoArg for CompilationOptions { - fn parse_cargo_arg(&self) { - if self.release && self.profile.is_some() { +impl ParseCargoArgs for CompilationOptions { + fn parse_cargo_args(&self) { + let Self { + release, + profile, + jobs, + target, + timings, + } = self; + if *release && profile.is_some() { eprintln!("the `--release` flag should not be specified with the `--profile` flag"); std::process::exit(CLAP_USAGE_EXIT_CODE); } - let cargo_make_cargo_profile = match std::env::var(CARGO_MAKE_PROFILE_ENV_VAR) - .unwrap_or_else(|_| panic!("{CARGO_MAKE_PROFILE_ENV_VAR} should be set by cargo-make.")) + let cargo_make_cargo_profile = match env::var(CARGO_MAKE_PROFILE_ENV_VAR) + .unwrap_or_else(|_| panic!("{CARGO_MAKE_PROFILE_ENV_VAR} should be set by cargo-make")) .as_str() { "release" => { // cargo-make release profile sets the `--profile release` flag - if let Some(profile) = &self.profile { + if let Some(profile) = &profile { if profile != "release" { eprintln!( "Specifying `--profile release` for cargo-make conflicts with the \ @@ -292,48 +345,49 @@ impl ParseCargoArg for CompilationOptions { } _ => { // All other cargo-make profiles do not set a specific cargo profile. Cargo - // profiles set by --release, --profile , or -p (after the - // cargo-make task name) are forwarded to cargo commands - if self.release { + // profiles set by --release, --profile , or -p (after + // the cargo-make task name) are forwarded to cargo + // commands + if *release { append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, "--release", ); "release".to_string() - } else if let Some(profile) = &self.profile { + } else if let Some(profile) = &profile { append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, format!("--profile {profile}").as_str(), ); profile.into() } else { - std::env::var(CARGO_MAKE_CARGO_PROFILE_ENV_VAR).unwrap_or_else(|_| { - panic!("{CARGO_MAKE_CARGO_PROFILE_ENV_VAR} should be set by cargo-make.") + env::var(CARGO_MAKE_CARGO_PROFILE_ENV_VAR).unwrap_or_else(|_| { + panic!("{CARGO_MAKE_CARGO_PROFILE_ENV_VAR} should be set by cargo-make") }) } } }; - println!("{CARGO_MAKE_CARGO_PROFILE_ENV_VAR}={cargo_make_cargo_profile}"); + env::set_var(CARGO_MAKE_CARGO_PROFILE_ENV_VAR, &cargo_make_cargo_profile); - if let Some(jobs) = &self.jobs { + if let Some(jobs) = &jobs { append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, format!("--jobs {jobs}").as_str(), ); } - if let Some(target) = &self.target { - println!("CARGO_MAKE_CRATE_TARGET_TRIPLE={target}"); + if let Some(target) = &target { + env::set_var(CARGO_MAKE_CRATE_TARGET_TRIPLE_ENV_VAR, target); append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, format!("--target {target}").as_str(), ); } - configure_wdf_build_output_dir(&self.target, &cargo_make_cargo_profile); + configure_wdf_build_output_dir(target, &cargo_make_cargo_profile); - if let Some(timings_option) = &self.timings { + if let Some(timings_option) = &timings { timings_option.as_ref().map_or_else( || { append_to_space_delimited_env_var( @@ -352,23 +406,29 @@ impl ParseCargoArg for CompilationOptions { } } -impl ParseCargoArg for ManifestOptions { - fn parse_cargo_arg(&self) { - if self.frozen { +impl ParseCargoArgs for ManifestOptions { + fn parse_cargo_args(&self) { + let Self { + frozen, + locked, + offline, + } = self; + + if *frozen { append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, "--frozen", ); } - if self.locked { + if *locked { append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, "--locked", ); } - if self.offline { + if *offline { append_to_space_delimited_env_var( CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, "--offline", @@ -378,17 +438,20 @@ impl ParseCargoArg for ManifestOptions { } /// Parses the command line arguments, validates that they are supported by -/// `rust-driver-makefile.toml`, and forwards them to `cargo-make` by printing -/// them to stdout. +/// `rust-driver-makefile.toml`, and then returns a list of environment variable +/// names that were updated. These environment variable names should be passed +/// to [`forward_printed_env_vars`] to forward values to +/// cargo-make. /// /// # Panics /// /// This function will panic if there's an internal error (i.e. bug) in its /// argument processing. -pub fn validate_and_forward_args() { +#[must_use] +pub fn validate_command_line_args() -> impl IntoIterator { const TOOLCHAIN_ARG_POSITION: usize = 1; - let mut env_args = std::env::args_os().collect::>(); + let mut env_args = env::args_os().collect::>(); // + is a special argument that can't currently be handled by clap parsing: https://github.com/clap-rs/clap/issues/2468 let toolchain_arg = if env_args @@ -407,60 +470,57 @@ pub fn validate_and_forward_args() { None }; - let command_line_interface: CommandLineInterface = - CommandLineInterface::parse_from(env_args.iter()); - // This print signifies the start of the forwarding and signals to the - // `rust-env-update` plugin that it should forward args. This is also used to - // signal that the auto-generated help from `clap` was not executed. - println!("FORWARDING ARGS TO CARGO-MAKE:"); - if let Some(toolchain) = toolchain_arg { - println!("{CARGO_MAKE_RUST_DEFAULT_TOOLCHAIN_ENV_VAR}={toolchain}"); + env::set_var(CARGO_MAKE_RUST_DEFAULT_TOOLCHAIN_ENV_VAR, toolchain); } - command_line_interface.base.parse_cargo_arg(); - command_line_interface.workspace.parse_cargo_arg(); - command_line_interface.features.parse_cargo_arg(); - command_line_interface.compilation_options.parse_cargo_arg(); - command_line_interface.manifest_options.parse_cargo_arg(); + CommandLineInterface::parse_from(env_args.iter()).parse_cargo_args(); - forward_env_var_to_cargo_make(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR); - forward_env_var_to_cargo_make(WDK_BUILD_OUTPUT_DIRECTORY_ENV_VAR); + [ + CARGO_MAKE_CARGO_BUILD_TEST_FLAGS_ENV_VAR, + CARGO_MAKE_CARGO_PROFILE_ENV_VAR, + CARGO_MAKE_CRATE_TARGET_TRIPLE_ENV_VAR, + CARGO_MAKE_RUST_DEFAULT_TOOLCHAIN_ENV_VAR, + WDK_BUILD_OUTPUT_DIRECTORY_ENV_VAR, + ] + .into_iter() + .filter(|env_var_name| env::var_os(env_var_name).is_some()) + .map(std::string::ToString::to_string) } /// Prepends the path variable with the necessary paths to access WDK tools /// /// # Errors /// -/// This function returns a [`ConfigError::WDKContentRootDetectionError`] if the +/// This function returns a [`ConfigError::WdkContentRootDetectionError`] if the /// WDK content root directory could not be found. /// /// # Panics /// /// This function will panic if the CPU architecture cannot be determined from -/// `std::env::consts::ARCH` or if the PATH variable contains non-UTF8 +/// [`env::consts::ARCH`] or if the PATH variable contains non-UTF8 /// characters. -pub fn setup_path() -> Result<(), ConfigError> { +pub fn setup_path() -> Result, ConfigError> { let Some(wdk_content_root) = detect_wdk_content_root() else { - return Err(ConfigError::WDKContentRootDetectionError); + return Err(ConfigError::WdkContentRootDetectionError); }; let version = get_latest_windows_sdk_version(&wdk_content_root.join("Lib"))?; - let host_arch = CPUArchitecture::try_from_cargo_str(std::env::consts::ARCH) - .expect("The rust standard library should always set std::env::consts::ARCH"); + let host_arch = CpuArchitecture::try_from_cargo_str(env::consts::ARCH) + .expect("The rust standard library should always set env::consts::ARCH"); let wdk_bin_root = wdk_content_root .join(format!("bin/{version}")) .canonicalize()? .strip_extended_length_path_prefix()?; let host_windows_sdk_ver_bin_path = match host_arch { - CPUArchitecture::AMD64 => wdk_bin_root + CpuArchitecture::Amd64 => wdk_bin_root .join(host_arch.as_windows_str()) .canonicalize()? .strip_extended_length_path_prefix()? .to_str() .expect("x64 host_windows_sdk_ver_bin_path should only contain valid UTF8") .to_string(), - CPUArchitecture::ARM64 => wdk_bin_root + CpuArchitecture::Arm64 => wdk_bin_root .join(host_arch.as_windows_str()) .canonicalize()? .strip_extended_length_path_prefix()? @@ -499,8 +559,39 @@ pub fn setup_path() -> Result<(), ConfigError> { .expect("arch_specific_wdk_tool_root should only contain valid UTF8"), ); - forward_env_var_to_cargo_make(PATH_ENV_VAR); - Ok(()) + Ok([PATH_ENV_VAR].map(std::string::ToString::to_string)) +} + +/// Forwards the specified environment variables in this process to the parent +/// cargo-make. This is facilitated by printing to `stdout`, and having the +/// `rust-env-update` plugin parse the printed output. +/// +/// # Panics +/// +/// Panics if any of the `env_vars` do not exist or contain a non-UTF8 value. +pub fn forward_printed_env_vars(env_vars: impl IntoIterator>) { + // This print signifies the start of the forwarding and signals to the + // `rust-env-update` plugin that it should forward args + println!("FORWARDING ARGS TO CARGO-MAKE:"); + + for env_var_name in env_vars { + let env_var_name = env_var_name.as_ref(); + + // Since this executes in a child process to cargo-make, we need to forward the + // values we want to change to duckscript, in order to get it to modify the + // parent process (ie. cargo-make) + println!( + "{env_var_name}={}", + env::var(env_var_name).unwrap_or_else(|_| panic!( + "{env_var_name} should be the name of an environment variable that is set and \ + contains a valid UTF-8 value" + )) + ); + } + + // This print signifies the end of the forwarding and signals to the + // `rust-env-update` plugin that it should stop forwarding args + println!("END OF FORWARDING ARGS TO CARGO-MAKE"); } /// Adds the WDK version to the environment in the full string form of @@ -508,33 +599,33 @@ pub fn setup_path() -> Result<(), ConfigError> { /// /// # Errors /// -/// This function returns a [`ConfigError::WDKContentRootDetectionError`] if the +/// This function returns a [`ConfigError::WdkContentRootDetectionError`] if the /// WDK content root directory could not be found, or if the WDK version is /// ill-formed. -pub fn setup_wdk_version() -> Result { +pub fn setup_wdk_version() -> Result, ConfigError> { let Some(wdk_content_root) = detect_wdk_content_root() else { - return Err(ConfigError::WDKContentRootDetectionError); + return Err(ConfigError::WdkContentRootDetectionError); }; - let version = get_latest_windows_sdk_version(&wdk_content_root.join("Lib"))?; + let detected_sdk_version = get_latest_windows_sdk_version(&wdk_content_root.join("Lib"))?; if let Ok(existing_version) = std::env::var(WDK_VERSION_ENV_VAR) { - if version == existing_version { + if detected_sdk_version == existing_version { // Skip updating. This can happen in certain recursive // cargo-make cases. - return Ok(version); + return Ok([WDK_VERSION_ENV_VAR].map(std::string::ToString::to_string)); } // We have a bad version string set somehow. Return an error. - return Err(ConfigError::WDKContentRootDetectionError); + return Err(ConfigError::WdkContentRootDetectionError); } - println!("FORWARDING ARGS TO CARGO-MAKE:"); - if !crate::utils::validate_wdk_version_format(&version) { - return Err(ConfigError::WDKVersionStringFormatError { version }); + if !crate::utils::validate_wdk_version_format(&detected_sdk_version) { + return Err(ConfigError::WdkVersionStringFormatError { + version: detected_sdk_version, + }); } - append_to_space_delimited_env_var(WDK_VERSION_ENV_VAR, &version); - forward_env_var_to_cargo_make(WDK_VERSION_ENV_VAR); - Ok(version) + env::set_var(WDK_VERSION_ENV_VAR, detected_sdk_version); + Ok([WDK_VERSION_ENV_VAR].map(std::string::ToString::to_string)) } /// Sets the `WDK_INFVERIF_SAMPLE_FLAG` environment variable to contain the @@ -542,7 +633,7 @@ pub fn setup_wdk_version() -> Result { /// /// # Errors /// -/// This function returns a [`ConfigError::WDKContentRootDetectionError`] if +/// This function returns a [`ConfigError::WdkContentRootDetectionError`] if /// an invalid WDK version is provided. /// /// # Panics @@ -552,12 +643,9 @@ pub fn setup_wdk_version() -> Result { /// is an i32. pub fn setup_infverif_for_samples + ToString + ?Sized>( version: &S, -) -> Result<(), ConfigError> { +) -> Result, ConfigError> { let validated_version_string = crate::utils::get_wdk_version_number(version)?; - // This print signifies the start of the forwarding and signals to the - // `rust-env-update` plugin that it should forward args. This is also used to - // signal that the auto-generated help from `clap` was not executed. - println!("FORWARDING ARGS TO CARGO-MAKE:"); + // Safe to unwrap as we called .parse::().is_ok() in our call to // validate_wdk_version_format above. let version = validated_version_string @@ -569,8 +657,8 @@ pub fn setup_infverif_for_samples + ToString + ?Sized>( "/msft" }; append_to_space_delimited_env_var(WDK_INF_ADDITIONAL_FLAGS_ENV_VAR, sample_flag); - forward_env_var_to_cargo_make(WDK_INF_ADDITIONAL_FLAGS_ENV_VAR); - Ok(()) + + Ok([WDK_INF_ADDITIONAL_FLAGS_ENV_VAR].map(std::string::ToString::to_string)) } /// Returns the path to the WDK build output directory for the current @@ -583,7 +671,7 @@ pub fn setup_infverif_for_samples + ToString + ?Sized>( #[must_use] pub fn get_wdk_build_output_directory() -> PathBuf { PathBuf::from( - std::env::var("WDK_BUILD_OUTPUT_DIRECTORY") + env::var("WDK_BUILD_OUTPUT_DIRECTORY") .expect("WDK_BUILD_OUTPUT_DIRECTORY should have been set by the wdk-build-init task"), ) } @@ -596,7 +684,7 @@ pub fn get_wdk_build_output_directory() -> PathBuf { /// variable is not set #[must_use] pub fn get_current_package_name() -> String { - std::env::var(CARGO_MAKE_CRATE_FS_NAME_ENV_VAR).unwrap_or_else(|_| { + env::var(CARGO_MAKE_CRATE_FS_NAME_ENV_VAR).unwrap_or_else(|_| { panic!( "{} should be set by cargo-make", &CARGO_MAKE_CRATE_FS_NAME_ENV_VAR @@ -618,7 +706,7 @@ pub fn get_current_package_name() -> String { pub fn copy_to_driver_package_folder>(path_to_copy: P) -> Result<(), ConfigError> { let path_to_copy = path_to_copy.as_ref(); - let package_folder_path = + let package_folder_path: PathBuf = get_wdk_build_output_directory().join(format!("{}_package", get_current_package_name())); if !package_folder_path.exists() { std::fs::create_dir(&package_folder_path)?; @@ -644,7 +732,7 @@ pub fn copy_to_driver_package_folder>(path_to_copy: P) -> Result< /// This function returns: /// - [`ConfigError::CargoMetadataError`] if there is an error executing or /// parsing `cargo_metadata` -/// - [`ConfigError::MultipleWDKBuildCratesDetected`] if there are multiple +/// - [`ConfigError::MultipleWdkBuildCratesDetected`] if there are multiple /// versions of the WDK build crate detected /// - [`ConfigError::IoError`] if there is an error creating or updating the /// symlink to `rust-driver-makefile.toml` @@ -667,7 +755,7 @@ pub fn load_rust_driver_makefile() -> Result<(), ConfigError> { /// This function returns: /// - [`ConfigError::CargoMetadataError`] if there is an error executing or /// parsing `cargo_metadata` -/// - [`ConfigError::MultipleWDKBuildCratesDetected`] if there are multiple +/// - [`ConfigError::MultipleWdkBuildCratesDetected`] if there are multiple /// versions of the WDK build crate detected /// - [`ConfigError::IoError`] if there is an error creating or updating the /// symlink to `rust-driver-sample-makefile.toml` @@ -690,7 +778,7 @@ pub fn load_rust_driver_sample_makefile() -> Result<(), ConfigError> { /// This function returns: /// - [`ConfigError::CargoMetadataError`] if there is an error executing or /// parsing `cargo_metadata` -/// - [`ConfigError::MultipleWDKBuildCratesDetected`] if there are multiple +/// - [`ConfigError::MultipleWdkBuildCratesDetected`] if there are multiple /// versions of the WDK build crate detected /// - [`ConfigError::IoError`] if there is an error creating or updating the /// symlink to the makefile. @@ -710,7 +798,7 @@ fn load_wdk_build_makefile + AsRef + AsRef>( .filter(|package| package.name == "wdk-build") .collect::>(); if wdk_build_package_matches.len() != 1 { - return Err(ConfigError::MultipleWDKBuildCratesDetected { + return Err(ConfigError::MultipleWdkBuildCratesDetected { package_ids: wdk_build_package_matches .iter() .map(|package_info| package_info.id.clone()) @@ -725,8 +813,8 @@ fn load_wdk_build_makefile + AsRef + AsRef>( .join(&makefile_name); let cargo_make_workspace_working_directory = - std::env::var(CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY_ENV_VAR).unwrap_or_else(|_| { - panic!("{CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY_ENV_VAR} should be set by cargo-make.") + env::var(CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY_ENV_VAR).unwrap_or_else(|_| { + panic!("{CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY_ENV_VAR} should be set by cargo-make") }); let destination_path = Path::new(&cargo_make_workspace_working_directory) @@ -754,16 +842,155 @@ fn load_wdk_build_makefile + AsRef + AsRef>( Ok(()) } +/// Get [`cargo_metadata::Metadata`] based off of manifest in +/// `CARGO_MAKE_WORKING_DIRECTORY` +/// +/// # Errors +/// +/// This function will return a [`cargo_metadata::Error`] if `cargo_metadata` +/// fails +/// +/// # Panics +/// +/// This function will panic if executed outside of a `cargo-make` task +pub fn get_cargo_metadata() -> cargo_metadata::Result { + let manifest_path = { + let mut p: PathBuf = std::path::PathBuf::from( + std::env::var("CARGO_MAKE_WORKING_DIRECTORY") + .expect("CARGO_MAKE_WORKING_DIRECTORY should be set by cargo-make"), + ); + p.push("Cargo.toml"); + p + }; + + cargo_metadata::MetadataCommand::new() + .manifest_path(manifest_path) + .exec() +} + +/// Execute a `FnOnce` closure, and handle its contents in a way compatible with +/// `cargo-make`'s `condition_script`: +/// 1. If the closure panics, the panic is caught and it returns an `Ok(())`. +/// This ensures that panics encountered in `condition_script_closure` will +/// not default to skipping the task. +/// 2. If the closure executes without panicking, forward the result to +/// `cargo-make`. `Ok` types will result in the task being run, and `Err` +/// types will print the `Err` contents and then skip the task. +/// +/// If you want your task to be skipped, return an `Err` from +/// `condition_script_closure`. If you want the task to execute, return an +/// `Ok(())` from `condition_script_closure` +/// +/// # Errors +/// +/// This function returns an error whenever `condition_script_closure` returns +/// an error +/// +/// # Panics +/// +/// Panics if `CARGO_MAKE_CURRENT_TASK_NAME` is not set in the environment +pub fn condition_script(condition_script_closure: F) -> anyhow::Result<(), E> +where + F: FnOnce() -> anyhow::Result<(), E> + UnwindSafe, +{ + std::panic::catch_unwind(condition_script_closure).unwrap_or_else(|_| { + // Note: Any panic messages has already been printed by this point + + let cargo_make_task_name = env::var(CARGO_MAKE_CURRENT_TASK_NAME_ENV_VAR) + .expect("CARGO_MAKE_CURRENT_TASK_NAME should be set by cargo-make"); + + eprintln!( + r#"`condition_script` for "{cargo_make_task_name}" task panicked while executing. \ + Defaulting to running "{cargo_make_task_name}" task."# + ); + Ok(()) + }) +} + +/// `cargo-make` condition script for `package-driver-flow` task in +/// [`rust-driver-makefile.toml`](../rust-driver-makefile.toml) +/// +/// # Errors +/// +/// This function returns an error whenever it determines that the +/// `package-driver-flow` `cargo-make` task should be skipped (i.e. when the +/// current package isn't a cdylib depending on the WDK, or when no valid WDK +/// configurations are detected) +/// +/// # Panics +/// +/// Panics if `CARGO_MAKE_CRATE_NAME` is not set in the environment +pub fn package_driver_flow_condition_script() -> anyhow::Result<()> { + condition_script(|| { + // Get the current package name via `CARGO_MAKE_CRATE_NAME_ENV_VAR` instead of + // `CARGO_MAKE_CRATE_FS_NAME_ENV_VAR`, since `cargo_metadata` output uses the + // non-preprocessed name (ie. - instead of _) + let current_package_name = env::var(CARGO_MAKE_CRATE_NAME_ENV_VAR).unwrap_or_else(|_| { + panic!( + "{} should be set by cargo-make", + &CARGO_MAKE_CRATE_NAME_ENV_VAR + ) + }); + let cargo_metadata = get_cargo_metadata()?; + + // Skip task if the current crate is not a driver (i.e. a cdylib with a + // `package.metadata.wdk` section) + let current_package = cargo_metadata + .packages + .iter() + .find(|package| package.name == current_package_name) + .expect("The current package should be present in the cargo metadata output"); + if current_package.metadata["wdk"].is_null() { + return Err::<(), anyhow::Error>( + metadata::TryFromCargoMetadataError::NoWdkConfigurationsDetected.into(), + ) + .with_context(|| { + "Skipping package-driver-flow cargo-make task because the current crate does not \ + have a package.metadata.wdk section" + }); + } + if !current_package + .targets + .iter() + .any(|target| target.kind.iter().any(|kind| kind == "cdylib")) + { + return Err::<(), anyhow::Error>( + metadata::TryFromCargoMetadataError::NoWdkConfigurationsDetected.into(), + ) + .with_context(|| { + "Skipping package-driver-flow cargo-make task because the current crate does not \ + contain a cdylib target" + }); + } + + match metadata::Wdk::try_from(&cargo_metadata) { + Err(e @ metadata::TryFromCargoMetadataError::NoWdkConfigurationsDetected) => { + // Skip task only if no WDK configurations are detected + Err::<(), anyhow::Error>(e.into()).with_context(|| { + "Skipping package-driver-flow cargo-make task because the current crate is not \ + a driver" + }) + } + + Ok(_) => Ok(()), + + Err(unexpected_error) => { + eprintln!("Unexpected error: {unexpected_error:#?}"); + // Do not silently skip task if unexpected error in parsing WDK Metadata occurs + Ok(()) + } + } + }) +} + fn configure_wdf_build_output_dir(target_arg: &Option, cargo_make_cargo_profile: &str) { - let cargo_make_crate_custom_triple_target_directory = std::env::var( - CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY_ENV_VAR, - ) - .unwrap_or_else(|_| { - panic!( - "{CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY_ENV_VAR} should be set by \ - cargo-make." - ) - }); + let cargo_make_crate_custom_triple_target_directory = + env::var(CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY_ENV_VAR).unwrap_or_else(|_| { + panic!( + "{CARGO_MAKE_CRATE_CUSTOM_TRIPLE_TARGET_DIRECTORY_ENV_VAR} should be set by \ + cargo-make." + ) + }); let wdk_build_output_directory = { let mut output_dir = cargo_make_crate_custom_triple_target_directory; @@ -787,7 +1014,7 @@ fn configure_wdf_build_output_dir(target_arg: &Option, cargo_make_cargo_ output_dir }; - std::env::set_var( + env::set_var( WDK_BUILD_OUTPUT_DIRECTORY_ENV_VAR, wdk_build_output_directory, ); @@ -801,10 +1028,10 @@ where let env_var_name: &str = env_var_name.as_ref(); let string_to_append: &str = string_to_append.as_ref(); - let mut env_var_value: String = std::env::var(env_var_name).unwrap_or_default(); + let mut env_var_value: String = env::var(env_var_name).unwrap_or_default(); env_var_value.push(' '); env_var_value.push_str(string_to_append); - std::env::set_var(env_var_name, env_var_value.trim()); + env::set_var(env_var_name, env_var_value.trim()); } fn prepend_to_semicolon_delimited_env_var(env_var_name: S, string_to_prepend: T) @@ -817,24 +1044,8 @@ where let mut env_var_value = string_to_prepend.to_string(); env_var_value.push(';'); - env_var_value.push_str(std::env::var(env_var_name).unwrap_or_default().as_str()); - std::env::set_var(env_var_name, env_var_value); -} - -fn forward_env_var_to_cargo_make>(env_var_name: S) { - let env_var_name = env_var_name.as_ref(); - - // Since this executes in a child process to cargo-make, we need to forward the - // values we want to change to duckscript, in order to get it to modify the - // parent process (ie. cargo-make) - if let Some(env_var_value) = std::env::var_os(env_var_name) { - println!( - "{env_var_name}={}", - env_var_value - .to_str() - .expect("env var value should be valid UTF-8") - ); - } + env_var_value.push_str(env::var(env_var_name).unwrap_or_default().as_str()); + env::set_var(env_var_name, env_var_value); } #[cfg(test)] diff --git a/crates/wdk-build/src/lib.rs b/crates/wdk-build/src/lib.rs index cb55083e..64b1a136 100644 --- a/crates/wdk-build/src/lib.rs +++ b/crates/wdk-build/src/lib.rs @@ -12,16 +12,20 @@ #![cfg_attr(nightly_toolchain, feature(assert_matches))] -mod bindgen; +pub use bindgen::BuilderExt; +use metadata::TryFromCargoMetadataError; + +pub mod cargo_make; +pub mod metadata; /// Module for utility code related to the cargo-make experience for building /// drivers. pub mod utils; -pub mod cargo_make; +mod bindgen; use std::{env, path::PathBuf}; -pub use bindgen::BuilderExt; +use cargo_metadata::MetadataCommand; use serde::{Deserialize, Serialize}; use thiserror::Error; use utils::PathExt; @@ -31,60 +35,86 @@ use utils::PathExt; pub struct Config { /// Path to root of WDK. Corresponds with `WDKContentRoot` environment /// variable in eWDK - pub wdk_content_root: PathBuf, + wdk_content_root: PathBuf, + /// CPU architecture to target + cpu_architecture: CpuArchitecture, /// Build configuration of driver pub driver_config: DriverConfig, - /// CPU architecture to target - pub cpu_architecture: CPUArchitecture, } /// The driver type with its associated configuration parameters -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)] +#[serde( + tag = "DRIVER_TYPE", + deny_unknown_fields, + rename_all = "UPPERCASE", + from = "DeserializableDriverConfig" +)] pub enum DriverConfig { /// Windows Driver Model - WDM(), + Wdm, /// Kernel Mode Driver Framework - KMDF(KMDFConfig), + Kmdf(KmdfConfig), /// User Mode Driver Framework - UMDF(UMDFConfig), + Umdf(UmdfConfig), } -/// Driver model type -#[derive(Debug, Clone, Copy)] -pub enum DriverType { - /// Windows Driver Model - WDM, - /// Kernel Mode Driver Framework - KMDF, - /// User Mode Driver Framework - UMDF, +/// Private enum identical to [`DriverConfig`] but with different tag name to +/// deserialize from. +/// +/// [`serde_derive`] doesn't support different tag names for serialization vs. +/// deserialization, and also doesn't support aliases for tag names, so the +/// `from` attribute is used in conjunction with this type to facilitate a +/// different tag name for deserialization. +/// +/// Relevant Github Issues: +/// * +/// * +#[derive(Debug, Clone, Deserialize, PartialEq, Eq, Hash)] +#[serde(tag = "driver-type", deny_unknown_fields, rename_all = "UPPERCASE")] +enum DeserializableDriverConfig { + Wdm, + Kmdf(KmdfConfig), + Umdf(UmdfConfig), } /// The CPU architecture that's configured to be compiled for #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] -pub enum CPUArchitecture { +pub enum CpuArchitecture { /// AMD64 CPU architecture. Also known as x64 or x86-64. - AMD64, + Amd64, /// ARM64 CPU architecture. Also known as aarch64. - ARM64, + Arm64, } /// The configuration parameters for KMDF drivers -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] -pub struct KMDFConfig { +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)] +#[serde( + deny_unknown_fields, + rename_all(serialize = "SCREAMING_SNAKE_CASE", deserialize = "kebab-case") +)] +pub struct KmdfConfig { /// Major KMDF Version pub kmdf_version_major: u8, - /// Minor KMDF Version - pub kmdf_version_minor: u8, + /// Minor KMDF Version (Target Version) + pub target_kmdf_version_minor: u8, + /// Minor KMDF Version (Minimum Required) + pub minimum_kmdf_version_minor: Option, } /// The configuration parameters for UMDF drivers -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] -pub struct UMDFConfig { +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)] +#[serde( + deny_unknown_fields, + rename_all(serialize = "SCREAMING_SNAKE_CASE", deserialize = "kebab-case") +)] +pub struct UmdfConfig { /// Major UMDF Version pub umdf_version_major: u8, - /// Minor UMDF Version - pub umdf_version_minor: u8, + /// Minor UMDF Version (Target Version) + pub target_umdf_version_minor: u8, + /// Minor UMDF Version (Minimum Required) + pub minimum_umdf_version_minor: Option, } /// Errors that could result from configuring a build via [`wdk-build`] @@ -106,25 +136,22 @@ pub enum ConfigError { #[error(transparent)] StripExtendedPathPrefixError(#[from] utils::StripExtendedPathPrefixError), - /// Error returned when a [`Config`] fails to be parsed from the environment - #[error(transparent)] - ConfigFromEnvError(#[from] ConfigFromEnvError), - - /// Error returned when a [`Config`] fails to be exported to the environment + /// Error returned when a [`metadata::Wdk`] fails to be parsed from a Cargo + /// Manifest #[error(transparent)] - ExportError(#[from] ExportError), + TryFromCargoMetadataError(#[from] metadata::TryFromCargoMetadataError), /// Error returned when a [`Config`] fails to be serialized #[error( "WDKContentRoot should be able to be detected. Ensure that the WDK is installed, or that \ the environment setup scripts in the eWDK have been run." )] - WDKContentRootDetectionError, + WdkContentRootDetectionError, /// Error returned when the WDK version string does not match the expected /// format #[error("The WDK version string provided ({version}) was not in a valid format.")] - WDKVersionStringFormatError { + WdkVersionStringFormatError { /// The incorrect WDK version string. version: String, }, @@ -139,63 +166,23 @@ pub enum ConfigError { "multiple versions of the wdk-build package are detected, but only one version is \ allowed: {package_ids:#?}" )] - MultipleWDKBuildCratesDetected { + MultipleWdkBuildCratesDetected { /// package ids of the wdk-build crates detected package_ids: Vec, }, -} -/// Errors that could result from parsing a configuration from a [`wdk-build`] -/// build environment -#[derive(Debug, Error)] -pub enum ConfigFromEnvError { - /// Error returned when an expected environment variable is not found - #[error(transparent)] - EnvError(#[from] std::env::VarError), - - /// Error returned when [`serde_json`] fails to deserialize the [`Config`] - #[error(transparent)] - DeserializeError(#[from] serde_json::Error), - - /// Error returned when the config from one WDK dependency does not match - /// the config from another + /// Error returned when the c runtime is not configured to be statically + /// linked #[error( - "config from {config_1_source} does not match config from {config_2_source}:\nconfig_1: \ - {config_1:?}\nconfig_2: {config_2:?}" + "the C runtime is not properly configured to be statically linked. This is required for building \ + WDK drivers. The recommended solution is to add the following snippiet to a `.config.toml` file: See https://doc.rust-lang.org/reference/linkage.html#static-and-dynamic-c-runtimes for more ways to enable static crt linkage." )] - ConfigMismatch { - /// Config from the first dependency - config_1: Box, - /// DEP_ environment variable name indicating the source of the first - /// dependency - config_1_source: String, - /// Config from the second dependency - config_2: Box, - /// DEP_ environment variable name indicating the source of the second - /// dependency - config_2_source: String, - }, - - /// Error returned when no WDK configs exported from dependencies could be - /// found - #[error("no WDK configs exported from dependencies could be found")] - ConfigNotFound, -} + StaticCrtNotEnabled, -/// Errors that could result from exporting a [`wdk-build`] build configuration -#[derive(Debug, Error)] -pub enum ExportError { - /// Error returned when the crate being compiled does not have a `links` - /// value in its Cargo.toml - #[error( - "Missing `links` value in crate's config.toml. Metadata is unable to propagate to \ - dependencies without a `links` value" - )] - MissingLinksValue(#[from] std::env::VarError), - - /// Error returned when [`serde_json`] fails to serialize the [`Config`] + /// Error returned when [`metadata::ser::Serializer`] fails to serialize the + /// [`metadata::Wdk`] #[error(transparent)] - SerializeError(#[from] serde_json::Error), + SerdeError(#[from] metadata::Error), } impl Default for Config { @@ -206,97 +193,122 @@ impl Default for Config { "WDKContentRoot should be able to be detected. Ensure that the WDK is installed, \ or that the environment setup scripts in the eWDK have been run.", ), - driver_config: DriverConfig::WDM(), + driver_config: DriverConfig::Wdm, cpu_architecture: utils::detect_cpu_architecture_in_build_script(), } } } impl Config { - const CARGO_CONFIG_KEY: &'static str = "wdk_config"; - - /// Creates a new [`Config`] with default values + /// Create a new [`Config`] with default values #[must_use] pub fn new() -> Self { Self::default() } - /// Creates a [`Config`] from a config exported from a dependency. The - /// dependency must have exported a [`Config`] via - /// [`Config::export_config`], and the dependency must have set a `links` - /// value in its Cargo manifiest to export the - /// `DEP__WDK_CONFIG` to downstream crates + /// Create a [`Config`] from parsing the top-level Cargo manifest into a + /// [`metadata::Wdk`], and using it to populate the [`Config`]. It also + /// emits `cargo::rerun-if-changed` directives for any files that are + /// used to create the [`Config`]. /// /// # Errors /// - /// This function will return an error if the provided `links_value` does - /// not correspond with a links value specified in the Cargo - /// manifest of one of the dependencies of the crate who's build script - /// invoked this function. - pub fn from_env + std::fmt::Display>( - links_value: S, - ) -> Result { - Ok(serde_json::from_str::( - std::env::var(format!( - "DEP_{links_value}_{}", - Self::CARGO_CONFIG_KEY.to_ascii_uppercase() - ))? - .as_str(), - )?) - } - - /// Creates a [`Config`] from a config exported from [`wdk`](https://docs.rs/wdk/latest/wdk/) or - /// [`wdk_sys`](https://docs.rs/wdk-sys/latest/wdk_sys/) crates. + /// This function will return an error if: + /// * the execution of `cargo metadata` fails + /// * the parsing of [`metadata::Wdk`] from any of the Cargo manifests fail + /// * multiple conflicting [`metadata::Wdk`] configurations are detected + /// * no [`metadata::Wdk`] configurations are detected /// - /// # Errors + /// # Panics /// - /// This function will return an error if: - /// * an exported config from a dependency on [`wdk`](https://docs.rs/wdk/latest/wdk/) - /// and/or [`wdk_sys`](https://docs.rs/wdk-sys/latest/wdk_sys/) cannot - /// be found - /// * there is a config mismatch between [`wdk`](https://docs.rs/wdk/latest/wdk/) - /// and [`wdk_sys`](https://docs.rs/wdk-sys/latest/wdk_sys/) - pub fn from_env_auto() -> Result { - let wdk_sys_crate_dep_key = - format!("DEP_WDK_{}", Self::CARGO_CONFIG_KEY.to_ascii_uppercase()); - let wdk_crate_dep_key = format!( - "DEP_WDK-SYS_{}", - Self::CARGO_CONFIG_KEY.to_ascii_uppercase() - ); + /// Panics if the resolved top-level Cargo manifest path is not valid UTF-8 + pub fn from_env_auto() -> Result { + let top_level_manifest = find_top_level_cargo_manifest(); + let cargo_metadata = MetadataCommand::new() + .manifest_path(&top_level_manifest) + .exec()?; + let wdk_metadata = metadata::Wdk::try_from(&cargo_metadata)?; + + // Force rebuilds if any of the manifest files change (ex. if wdk metadata + // section is modified) + for manifest_path in metadata::iter_manifest_paths(cargo_metadata) + .into_iter() + .chain(std::iter::once( + top_level_manifest + .try_into() + .expect("Path to Cargo manifests should always be valid UTF8"), + )) + { + println!("cargo:rerun-if-changed={manifest_path}"); + } - let wdk_sys_crate_config_serialized = std::env::var(&wdk_sys_crate_dep_key); - let wdk_crate_config_serialized = std::env::var(&wdk_crate_dep_key); - - if let (Ok(wdk_sys_crate_config_serialized), Ok(wdk_crate_config_serialized)) = ( - wdk_sys_crate_config_serialized.clone(), - wdk_crate_config_serialized.clone(), - ) { - let wdk_sys_crate_config = - serde_json::from_str::(&wdk_sys_crate_config_serialized)?; - let wdk_crate_config = serde_json::from_str::(&wdk_crate_config_serialized)?; - - if wdk_sys_crate_config == wdk_crate_config { - Ok(wdk_sys_crate_config) - } else { - Err(ConfigFromEnvError::ConfigMismatch { - config_1: Box::from(wdk_sys_crate_config), - config_1_source: wdk_sys_crate_dep_key, - config_2: Box::from(wdk_crate_config), - config_2_source: wdk_crate_dep_key, - }) - } - } else if let Ok(wdk_sys_crate_config_serialized) = wdk_sys_crate_config_serialized { - Ok(serde_json::from_str::( - &wdk_sys_crate_config_serialized, - )?) - } else if let Ok(wdk_crate_config_serialized) = wdk_crate_config_serialized { - Ok(serde_json::from_str::(&wdk_crate_config_serialized)?) - } else { - Err(ConfigFromEnvError::ConfigNotFound) + Ok(Self { + driver_config: wdk_metadata.driver_model, + ..Default::default() + }) + } + + fn emit_check_cfg_settings() { + for (cfg_key, allowed_values) in EXPORTED_CFG_SETTINGS.iter() { + let allowed_cfg_value_string = + allowed_values.iter().fold(String::new(), |mut acc, value| { + const OPENING_QUOTE: char = '"'; + const CLOSING_QUOTE_AND_COMMA: &str = r#"","#; + + acc.reserve( + value.len() + OPENING_QUOTE.len_utf8() + CLOSING_QUOTE_AND_COMMA.len(), + ); + acc.push(OPENING_QUOTE); + acc.push_str(value); + acc.push_str(CLOSING_QUOTE_AND_COMMA); + acc + }); + + let cfg_key = { + // Replace `metadata::ser::KEY_NAME_SEPARATOR` with `__` so that `cfg_key` is a + // valid rust identifier name + let mut k = cfg_key.replace(metadata::ser::KEY_NAME_SEPARATOR, "__"); + // convention is that cfg keys are lowercase + k.make_ascii_lowercase(); + k + }; + + // Emit allowed cfg values + println!("cargo::rustc-check-cfg=cfg({cfg_key}, values({allowed_cfg_value_string}))"); + } + } + + /// Expose `cfg` settings based on this [`Config`] to enable conditional + /// compilation. This emits specially formatted prints to Cargo based on + /// this [`Config`]. + fn emit_cfg_settings(&self) -> Result<(), ConfigError> { + Self::emit_check_cfg_settings(); + + let serialized_wdk_metadata_map = + metadata::to_map::>(&metadata::Wdk { + driver_model: self.driver_config.clone(), + })?; + + for cfg_key in EXPORTED_CFG_SETTINGS.iter().map(|(key, _)| *key) { + let cfg_value = &serialized_wdk_metadata_map[cfg_key]; + + let cfg_key = { + // Replace `metadata::ser::KEY_NAME_SEPARATOR` with `__` so that `cfg_key` is a + // valid rust identifier name + let mut k = cfg_key.replace(metadata::ser::KEY_NAME_SEPARATOR, "__"); + // convention is that cfg keys are lowercase + k.make_ascii_lowercase(); + k + }; + + // Emit cfg + println!(r#"cargo::rustc-cfg={cfg_key}="{cfg_value}""#); } + + Ok(()) } - /// Returns header include paths required to build and link based off of the + /// Return header include paths required to build and link based off of the /// configuration of `Config` /// /// # Errors @@ -304,6 +316,7 @@ impl Config { /// This function will return an error if any of the required paths do not /// exist. pub fn get_include_paths(&self) -> Result, ConfigError> { + // FIXME: consider deprecating in favor of iter let mut include_paths = vec![]; let include_directory = self.wdk_content_root.join("Include"); @@ -327,8 +340,8 @@ impl Config { ); let km_or_um_include_path = windows_sdk_include_path.join(match self.driver_config { - DriverConfig::WDM() | DriverConfig::KMDF(_) => "km", - DriverConfig::UMDF(_) => "um", + DriverConfig::Wdm | DriverConfig::Kmdf(_) => "km", + DriverConfig::Umdf(_) => "um", }); if !km_or_um_include_path.is_dir() { return Err(ConfigError::DirectoryNotFound { @@ -355,11 +368,11 @@ impl Config { // Add other driver type-specific include paths match &self.driver_config { - DriverConfig::WDM() => {} - DriverConfig::KMDF(kmdf_config) => { + DriverConfig::Wdm => {} + DriverConfig::Kmdf(kmdf_config) => { let kmdf_include_path = include_directory.join(format!( "wdf/kmdf/{}.{}", - kmdf_config.kmdf_version_major, kmdf_config.kmdf_version_minor + kmdf_config.kmdf_version_major, kmdf_config.target_kmdf_version_minor )); if !kmdf_include_path.is_dir() { return Err(ConfigError::DirectoryNotFound { @@ -372,10 +385,10 @@ impl Config { .strip_extended_length_path_prefix()?, ); } - DriverConfig::UMDF(umdf_config) => { + DriverConfig::Umdf(umdf_config) => { let umdf_include_path = include_directory.join(format!( "wdf/umdf/{}.{}", - umdf_config.umdf_version_major, umdf_config.umdf_version_minor + umdf_config.umdf_version_major, umdf_config.target_umdf_version_minor )); if !umdf_include_path.is_dir() { return Err(ConfigError::DirectoryNotFound { @@ -393,8 +406,10 @@ impl Config { Ok(include_paths) } - /// Returns library include paths required to build and link based off of - /// the configuration of `Config` + /// Return library include paths required to build and link based off of + /// the configuration of [`Config`]. + /// + /// For UMDF drivers, this assumes a "Windows-Driver" Target Platform. /// /// # Errors /// @@ -413,10 +428,10 @@ impl Config { library_directory .join(sdk_version) .join(match self.driver_config { - DriverConfig::WDM() | DriverConfig::KMDF(_) => { + DriverConfig::Wdm | DriverConfig::Kmdf(_) => { format!("km/{}", self.cpu_architecture.as_windows_str(),) } - DriverConfig::UMDF(_) => { + DriverConfig::Umdf(_) => { format!("um/{}", self.cpu_architecture.as_windows_str(),) } }); @@ -433,13 +448,13 @@ impl Config { // Add other driver type-specific library paths match &self.driver_config { - DriverConfig::WDM() => (), - DriverConfig::KMDF(kmdf_config) => { + DriverConfig::Wdm => (), + DriverConfig::Kmdf(kmdf_config) => { let kmdf_library_path = library_directory.join(format!( "wdf/kmdf/{}/{}.{}", self.cpu_architecture.as_windows_str(), kmdf_config.kmdf_version_major, - kmdf_config.kmdf_version_minor + kmdf_config.target_kmdf_version_minor )); if !kmdf_library_path.is_dir() { return Err(ConfigError::DirectoryNotFound { @@ -452,12 +467,12 @@ impl Config { .strip_extended_length_path_prefix()?, ); } - DriverConfig::UMDF(umdf_config) => { + DriverConfig::Umdf(umdf_config) => { let umdf_library_path = library_directory.join(format!( "wdf/umdf/{}/{}.{}", self.cpu_architecture.as_windows_str(), umdf_config.umdf_version_major, - umdf_config.umdf_version_minor + umdf_config.target_umdf_version_minor, )); if !umdf_library_path.is_dir() { return Err(ConfigError::DirectoryNotFound { @@ -472,82 +487,169 @@ impl Config { } } + // Reverse order of library paths so that paths pushed later into the vec take + // precedence + library_paths.reverse(); Ok(library_paths) } - /// Configures a Cargo build of a library that directly depends on the - /// WDK (i.e. not transitively via wdk-sys). This emits specially - /// formatted prints to Cargo based on this [`Config`]. - /// - /// This includes header include paths, linker search paths, library link - /// directives, and WDK-specific configuration definitions. This must be - /// called from a Cargo build script of the library. - /// - /// # Errors - /// - /// This function will return an error if any of the required paths do not - /// exist. - /// - /// # Panics - /// - /// Panics if the invoked from outside a Cargo build environment - pub fn configure_library_build(&self) -> Result<(), ConfigError> { - let library_paths = self.get_library_paths()?; - - // Emit linker search paths - for path in library_paths { - println!("cargo::rustc-link-search={}", path.display()); - } - - match &self.driver_config { - DriverConfig::WDM() => { - // Emit WDM-specific libraries to link to - println!("cargo::rustc-link-lib=BufferOverflowFastFailK"); - println!("cargo::rustc-link-lib=ntoskrnl"); - println!("cargo::rustc-link-lib=hal"); - println!("cargo::rustc-link-lib=wmilib"); + /// Return an iterator of strings that represent compiler definitions + /// derived from the `Config` + pub fn get_preprocessor_definitions_iter( + &self, + ) -> impl Iterator)> { + // _WIN32_WINNT=$(WIN32_WINNT_VERSION); + // WINVER=$(WINVER_VERSION); + // WINNT=1; + // NTDDI_VERSION=$(NTDDI_VERSION); + + // Definition sourced from: Program Files\Windows + // Kits\10\build\10.0.26040.0\WindowsDriver.Shared.Props + // vec![ //from driver.os.props //D:\EWDK\rsprerelease\content\Program + // Files\Windows Kits\10\build\10.0.26040.0\WindowsDriver.OS.Props + // ("_WIN32_WINNT", Some()),CURRENT_WIN32_WINNT_VERSION + // ("WINVER", Some()), = CURRENT_WIN32_WINNT_VERSION + // ("WINNT", Some(1)),1 + // ("NTDDI_VERSION", Some()),CURRENT_NTDDI_VERSION + // ] + // .into_iter() + // .map(|(key, value)| (key.to_string(), value.map(|v| v.to_string()))) + match self.cpu_architecture { + // Definitions sourced from `Program Files\Windows + // Kits\10\build\10.0.22621.0\WindowsDriver.x64.props` + CpuArchitecture::Amd64 => { + vec![("_WIN64", None), ("_AMD64_", None), ("AMD64", None)] } - DriverConfig::KMDF(_) => { - // Emit KMDF-specific libraries to link to - println!("cargo::rustc-link-lib=BufferOverflowFastFailK"); - println!("cargo::rustc-link-lib=ntoskrnl"); - println!("cargo::rustc-link-lib=hal"); - println!("cargo::rustc-link-lib=wmilib"); - println!("cargo::rustc-link-lib=WdfLdr"); - println!("cargo::rustc-link-lib=WdfDriverEntry"); + // Definitions sourced from `Program Files\Windows + // Kits\10\build\10.0.22621.0\WindowsDriver.arm64.props` + CpuArchitecture::Arm64 => { + vec![ + ("_ARM64_", None), + ("ARM64", None), + ("_USE_DECLSPECS_FOR_SAL", Some(1)), + ("STD_CALL", None), + ] } - DriverConfig::UMDF(umdf_config) => { - // Emit UMDF-specific libraries to link to - match env::var("PROFILE") - .expect( - "Cargo should have set a valid PROFILE environment variable at build time", - ) - .as_str() - { - "release" => { - println!("cargo::rustc-link-lib=ucrt"); + } + .into_iter() + .map(|(key, value)| (key.to_string(), value.map(|v| v.to_string()))) + .chain( + match self.driver_config { + DriverConfig::Wdm => { + vec![] + } + DriverConfig::Kmdf(kmdf_config) => { + let mut kmdf_definitions = vec![ + ("KMDF_VERSION_MAJOR", Some(kmdf_config.kmdf_version_major)), + ( + "KMDF_VERSION_MINOR", + Some(kmdf_config.target_kmdf_version_minor), + ), + ]; + + if let Some(minimum_minor_version) = kmdf_config.minimum_kmdf_version_minor { + kmdf_definitions + .push(("KMDF_MINIMUM_VERSION_REQUIRED", Some(minimum_minor_version))); } - "debug" => { - println!("cargo::rustc-link-lib=ucrtd"); + kmdf_definitions + } + DriverConfig::Umdf(umdf_config) => { + let mut umdf_definitions = vec![ + ("UMDF_VERSION_MAJOR", Some(umdf_config.umdf_version_major)), + ( + "UMDF_VERSION_MINOR", + Some(umdf_config.target_umdf_version_minor), + ), + // Definition sourced from: Program Files\Windows + // Kits\10\build\10.0.26040.0\Windows.UserMode.props + ("_ATL_NO_WIN_SUPPORT", None), + // Definition sourced from: Program Files\Windows + // Kits\10\build\10.0.26040.0\WindowsDriver.Shared.Props + ("WIN32_LEAN_AND_MEAN", Some(1)), + ]; + + if let Some(minimum_minor_version) = umdf_config.minimum_umdf_version_minor { + umdf_definitions + .push(("UMDF_MINIMUM_VERSION_REQUIRED", Some(minimum_minor_version))); } - _ => { - unreachable!(r#"Cargo should always set a value of "release" or "debug""#); + + if umdf_config.umdf_version_major >= 2 { + umdf_definitions.push(("UMDF_USING_NTSTATUS", None)); + umdf_definitions.push(("_UNICODE", None)); + umdf_definitions.push(("UNICODE", None)); } - } - if umdf_config.umdf_version_major >= 2 { - println!("cargo::rustc-link-lib=WdfDriverStubUm"); - println!("cargo::rustc-link-lib=ntdll"); + umdf_definitions } + } + .into_iter() + .map(|(key, value)| (key.to_string(), value.map(|v| v.to_string()))), + ) + } + + /// Return an iterator of strings that represent compiler flags (i.e. + /// warnings, settings, etc.) used by bindgen to parse WDK headers + pub fn wdk_bindgen_compiler_flags() -> impl Iterator { + vec![ + // Enable Microsoft C/C++ extensions and compatibility options (https://clang.llvm.org/docs/UsersManual.html#microsoft-extensions) + "-fms-compatibility", + "-fms-extensions", + "-fdelayed-template-parsing", + // Windows SDK & DDK have non-portable paths (ex. #include "DriverSpecs.h" but the + // file is actually driverspecs.h) + "--warn-=no-nonportable-include-path", + // Windows SDK & DDK use pshpack and poppack headers to change packing + "--warn-=no-pragma-pack", + "--warn-=no-ignored-attributes", + "--warn-=no-ignored-pragma-intrinsic", + "--warn-=no-visibility", + "--warn-=no-microsoft-anon-tag", + "--warn-=no-microsoft-enum-forward-reference", + // Don't warn for deprecated declarations. Deprecated items should be explicitly + // blocklisted (i.e. by the bindgen invocation). Any non-blocklisted function + // definitions will trigger a -WDeprecated warning + "--warn-=no-deprecated-declarations", + // Windows SDK & DDK contain unnecessary token pasting (ex. &##_variable: `&` and + // `_variable` are separate tokens already, and don't need `##` to concatenate + // them) + "--warn-=no-invalid-token-paste", + ] + .into_iter() + .map(std::string::ToString::to_string) + } + + /// Configure a Cargo build of a library that depends on the WDK. This + /// emits specially formatted prints to Cargo based on this [`Config`]. + /// + /// # Errors + /// + /// This function will return an error if the [`Config`] fails to be + /// serialized + pub fn configure_library_build(&self) -> Result<(), ConfigError> { + self.emit_cfg_settings() + } - println!("cargo::rustc-link-lib=mincore"); + /// Compute the name of the `WdfFunctions` symbol used for WDF function + /// dispatching based off of the [`Config`]. Returns `None` if the driver + /// model is [`DriverConfig::Wdm`] + #[must_use] + pub fn compute_wdffunctions_symbol_name(&self) -> Option { + let (wdf_major_version, wdf_minor_version) = match self.driver_config { + DriverConfig::Kmdf(config) => { + (config.kmdf_version_major, config.target_kmdf_version_minor) } - } + DriverConfig::Umdf(config) => { + (config.umdf_version_major, config.target_umdf_version_minor) + } + DriverConfig::Wdm => return None, + }; - Ok(()) + Some(format!( + "WdfFunctions_{wdf_major_version:02}0{wdf_minor_version:02}" + )) } - /// Configures a Cargo build of a binary that depends on the WDK. This + /// Configure a Cargo build of a binary that depends on the WDK. This /// emits specially formatted prints to Cargo based on this [`Config`]. /// /// This consists mainly of linker setting configuration. This must be @@ -555,35 +657,33 @@ impl Config { /// /// # Errors /// - /// This function will return an error if any of the required paths do not - /// exist. + /// This function will return an error if: + /// * any of the required WDK paths do not exist + /// * the C runtime is not configured to be statically linked /// /// # Panics /// - /// Panics if the invoked from outside a Cargo build environmen + /// Panics if the invoked from outside a Cargo build environment pub fn configure_binary_build(&self) -> Result<(), ConfigError> { - self.configure_library_build()?; - - // Linker arguments derived from Microsoft.Link.Common.props in Ni(22H2) WDK - println!("cargo::rustc-cdylib-link-arg=/NXCOMPAT"); - println!("cargo::rustc-cdylib-link-arg=/DYNAMICBASE"); - - // Always generate Map file with Exports - println!("cargo::rustc-cdylib-link-arg=/MAP"); - println!("cargo::rustc-cdylib-link-arg=/MAPINFO:EXPORTS"); - - // Force Linker Optimizations - println!("cargo::rustc-cdylib-link-arg=/OPT:REF,ICF"); + if !Self::is_crt_static_linked() { + return Err(ConfigError::StaticCrtNotEnabled); + } - // Enable "Forced Integrity Checking" to prevent non-signed binaries from - // loading - println!("cargo::rustc-cdylib-link-arg=/INTEGRITYCHECK"); + let library_paths: Vec = self.get_library_paths()?; - // Disable Manifest File Generation - println!("cargo::rustc-cdylib-link-arg=/MANIFEST:NO"); + // Emit linker search paths + for path in library_paths { + println!("cargo::rustc-link-search={}", path.display()); + } match &self.driver_config { - DriverConfig::WDM() => { + DriverConfig::Wdm => { + // Emit WDM-specific libraries to link to + println!("cargo::rustc-link-lib=static=BufferOverflowFastFailK"); + println!("cargo::rustc-link-lib=static=ntoskrnl"); + println!("cargo::rustc-link-lib=static=hal"); + println!("cargo::rustc-link-lib=static=wmilib"); + // Linker arguments derived from WindowsDriver.KernelMode.props in Ni(22H2) WDK println!("cargo::rustc-cdylib-link-arg=/DRIVER"); println!("cargo::rustc-cdylib-link-arg=/NODEFAULTLIB"); @@ -594,7 +694,15 @@ impl Config { // WDK println!("cargo::rustc-cdylib-link-arg=/ENTRY:DriverEntry"); } - DriverConfig::KMDF(_) => { + DriverConfig::Kmdf(_) => { + // Emit KMDF-specific libraries to link to + println!("cargo::rustc-link-lib=static=BufferOverflowFastFailK"); + println!("cargo::rustc-link-lib=static=ntoskrnl"); + println!("cargo::rustc-link-lib=static=hal"); + println!("cargo::rustc-link-lib=static=wmilib"); + println!("cargo::rustc-link-lib=static=WdfLdr"); + println!("cargo::rustc-link-lib=static=WdfDriverEntry"); + // Linker arguments derived from WindowsDriver.KernelMode.props in Ni(22H2) WDK println!("cargo::rustc-cdylib-link-arg=/DRIVER"); println!("cargo::rustc-cdylib-link-arg=/NODEFAULTLIB"); @@ -605,102 +713,118 @@ impl Config { // Ni(22H2) WDK println!("cargo::rustc-cdylib-link-arg=/ENTRY:FxDriverEntry"); } - DriverConfig::UMDF(_) => { + DriverConfig::Umdf(umdf_config) => { + // Emit UMDF-specific libraries to link to + if umdf_config.umdf_version_major >= 2 { + println!("cargo::rustc-link-lib=static=WdfDriverStubUm"); + println!("cargo::rustc-link-lib=static=ntdll"); + } + + println!("cargo::rustc-cdylib-link-arg=/NODEFAULTLIB:kernel32.lib"); + println!("cargo::rustc-cdylib-link-arg=/NODEFAULTLIB:user32.lib"); + println!("cargo::rustc-link-lib=static=OneCoreUAP"); + // Linker arguments derived from WindowsDriver.UserMode.props in Ni(22H2) WDK println!("cargo::rustc-cdylib-link-arg=/SUBSYSTEM:WINDOWS"); } } - Ok(()) + // Emit linker arguments common to all configs + { + // Linker arguments derived from Microsoft.Link.Common.props in Ni(22H2) WDK + println!("cargo::rustc-cdylib-link-arg=/NXCOMPAT"); + println!("cargo::rustc-cdylib-link-arg=/DYNAMICBASE"); + + // Always generate Map file with Exports + println!("cargo::rustc-cdylib-link-arg=/MAP"); + println!("cargo::rustc-cdylib-link-arg=/MAPINFO:EXPORTS"); + + // Force Linker Optimizations + println!("cargo::rustc-cdylib-link-arg=/OPT:REF,ICF"); + + // Enable "Forced Integrity Checking" to prevent non-signed binaries from + // loading + println!("cargo::rustc-cdylib-link-arg=/INTEGRITYCHECK"); + + // Disable Manifest File Generation + println!("cargo::rustc-cdylib-link-arg=/MANIFEST:NO"); + } + + self.emit_cfg_settings() } - /// Serializes this [`Config`] and exports it via the Cargo - /// `DEP__WDK_CONFIG` environment variable. - /// - /// # Errors - /// - /// This function will return an error if the crate does not have a `links` - /// field in its Cargo manifest or if it fails to serialize the config. - /// - /// # Panics - /// - /// Panics if this [`Config`] fails to serialize. - pub fn export_config(&self) -> Result<(), ExportError> { - if let Err(var_error) = std::env::var("CARGO_MANIFEST_LINKS") { - return Err(ExportError::MissingLinksValue(var_error)); + fn is_crt_static_linked() -> bool { + const STATICALLY_LINKED_C_RUNTIME_FEATURE_NAME: &str = "crt-static"; + + let enabled_cpu_target_features = env::var("CARGO_CFG_TARGET_FEATURE") + .expect("CARGO_CFG_TARGET_FEATURE should be set by Cargo"); + + enabled_cpu_target_features.contains(STATICALLY_LINKED_C_RUNTIME_FEATURE_NAME) + } +} + +impl From for DriverConfig { + fn from(config: DeserializableDriverConfig) -> Self { + match config { + DeserializableDriverConfig::Wdm => Self::Wdm, + DeserializableDriverConfig::Kmdf(kmdf_config) => Self::Kmdf(kmdf_config), + DeserializableDriverConfig::Umdf(umdf_config) => Self::Umdf(umdf_config), } - println!( - "cargo::metadata={}={}", - Self::CARGO_CONFIG_KEY, - serde_json::to_string(self)? - ); - Ok(()) } } -impl Default for KMDFConfig { +impl Default for KmdfConfig { #[must_use] fn default() -> Self { // FIXME: determine default values from TargetVersion and _NT_TARGET_VERSION Self { kmdf_version_major: 1, - kmdf_version_minor: 33, + target_kmdf_version_minor: 33, + minimum_kmdf_version_minor: None, } } } -impl KMDFConfig { - /// Creates a new [`KMDFConfig`] with default values +impl KmdfConfig { + /// Creates a new [`KmdfConfig`] with default values #[must_use] pub fn new() -> Self { Self::default() } } -impl Default for UMDFConfig { +impl Default for UmdfConfig { #[must_use] fn default() -> Self { // FIXME: determine default values from TargetVersion and _NT_TARGET_VERSION Self { umdf_version_major: 2, - umdf_version_minor: 33, + target_umdf_version_minor: 33, + minimum_umdf_version_minor: None, } } } -impl UMDFConfig { - /// Creates a new [`UMDFConfig`] with default values +impl UmdfConfig { + /// Creates a new [`UmdfConfig`] with default values #[must_use] pub fn new() -> Self { Self::default() } } -impl CPUArchitecture { - /// Converts [`CPUArchitecture`] to the string corresponding to what the +impl CpuArchitecture { + /// Converts [`CpuArchitecture`] to the string corresponding to what the /// architecture is typically referred to in Windows #[must_use] pub const fn as_windows_str(&self) -> &str { match self { - Self::AMD64 => "x64", - Self::ARM64 => "ARM64", + Self::Amd64 => "x64", + Self::Arm64 => "ARM64", } } - /// Converts [`CPUArchitecture`] to the string corresponding to what the - /// architecture is typically referred to in Windows - #[deprecated( - since = "0.2.0", - note = "CPUArchitecture.to_windows_str() was mis-named when originally created, since the \ - conversion from CPUArchitecture to str is free. Use \ - CPUArchitecture.as_windows_str instead." - )] - #[must_use] - pub const fn to_windows_str(&self) -> &str { - self.as_windows_str() - } - - /// Converts from a cargo-provided [`std::str`] to a [`CPUArchitecture`]. + /// Converts from a cargo-provided [`std::str`] to a [`CpuArchitecture`]. /// /// # #[must_use] @@ -708,13 +832,150 @@ impl CPUArchitecture { // Specifically not using the [`std::convert::TryFrom`] trait to be more // explicit in function name, since only arch strings from cargo are handled. match cargo_str.as_ref() { - "x86_64" => Some(Self::AMD64), - "aarch64" => Some(Self::ARM64), + "x86_64" => Some(Self::Amd64), + "aarch64" => Some(Self::Arm64), _ => None, } } } +/// Find the path of the toplevel Cargo manifest of the currently executing +/// Cargo subcommand. This should resolve to either: +/// 1. the `Cargo.toml` of the package where the Cargo subcommand (build, check, +/// etc.) was run +/// 2. the `Cargo.toml` provided to the `--manifest-path` argument to the Cargo +/// subcommand +/// 3. the `Cargo.toml` of the workspace that contains the package pointed to by +/// 1 or 2 +/// +/// The returned path should be a manifest in the same directory of the +/// lockfile. This does not support invocations that use non-default target +/// directories (ex. via `--target-dir`). This function only works when called +/// from a `build.rs` file +/// +/// # Panics +/// +/// Panics if a `Cargo.lock` file cannot be found in any of the ancestors of +/// `OUT_DIR` or if this function was called outside of a `build.rs` file +#[must_use] +pub fn find_top_level_cargo_manifest() -> PathBuf { + let out_dir = + PathBuf::from(std::env::var("OUT_DIR").expect( + "Cargo should have set the OUT_DIR environment variable when executing build.rs", + )); + + out_dir + .ancestors() + .find(|path| path.join("Cargo.lock").exists()) + .expect("a Cargo.lock file should exist in the same directory as the top-level Cargo.toml") + .join("Cargo.toml") +} + +/// Configure a Cargo build of a library that depends on the WDK. +/// +/// This emits specially formatted prints to Cargo based on the [`Config`] +/// derived from `metadata.wdk` sections of `Cargo.toml`s. +/// +/// Cargo build graphs that have no valid WDK configurations will emit a +/// warning, but will still return [`Ok`]. This allows libraries +/// designed for multiple configurations to sucessfully compile when built in +/// isolation. +/// +/// # Errors +/// +/// This function will return an error if the [`Config`] fails to be +/// serialized +pub fn configure_wdk_library_build() -> Result<(), ConfigError> { + match Config::from_env_auto() { + Ok(config) => { + config.configure_library_build()?; + Ok(()) + } + Err(ConfigError::TryFromCargoMetadataError( + TryFromCargoMetadataError::NoWdkConfigurationsDetected, + )) => { + // No WDK configurations will be detected if the crate is not being used in a + // driver. Since this is usually the case when libraries are being built + // standalone, this scenario is treated as a warning. + tracing::warn!("No WDK configurations detected."); + // check_cfg must be emitted even if no WDK configurations are detected, so that + // cfg options are still checked + Config::emit_check_cfg_settings(); + Ok(()) + } + + Err(error) => Err(error), + } +} + +/// Configure a Cargo build of a library that depends on the WDK, then execute a +/// function or closure with the [`Config`] derived from `metadata.wdk` sections +/// of `Cargo.toml`s. +/// +/// This emits specially formatted prints to Cargo based on the [`Config`] +/// derived from `metadata.wdk` sections of `Cargo.toml`s. +/// +/// Cargo build graphs that have no valid WDK configurations will emit a +/// warning, but will still return [`Ok`]. This allows libraries +/// designed for multiple configurations to sucessfully compile when built in +/// isolation. +/// +/// # Errors +/// +/// This function will return an error if the [`Config`] fails to be +/// serialized +pub fn configure_wdk_library_build_and_then(mut f: F) -> Result<(), E> +where + F: FnMut(Config) -> Result<(), E>, + E: std::convert::From, +{ + match Config::from_env_auto() { + Ok(config) => { + config.configure_library_build()?; + Ok(f(config)?) + } + Err(ConfigError::TryFromCargoMetadataError( + TryFromCargoMetadataError::NoWdkConfigurationsDetected, + )) => { + // No WDK configurations will be detected if the crate is not being used in a + // driver. Since this is usually the case when libraries are being built + // standalone, this scenario is treated as a warning. + tracing::warn!("No WDK configurations detected."); + // check_cfg must be emitted even if no WDK configurations are detected, so that + // cfg options are still checked + Config::emit_check_cfg_settings(); + Ok(()) + } + + Err(error) => Err(error.into()), + } +} + +/// Configure a Cargo build of a binary that depends on the WDK using a +/// [`Config`] derived from `metadata.wdk` sections of `Cargo.toml`s. +/// +/// # Errors +/// +/// This function will return an error if: +/// * any of the required WDK paths do not exist +/// * the C runtime is not configured to be statically linked +/// +/// # Panics +/// +/// Panics if the invoked from outside a Cargo build environment +pub fn configure_wdk_binary_build() -> Result<(), ConfigError> { + Config::from_env_auto()?.configure_binary_build() +} + +// This currently only exports the driver type, but may export more metadata in +// the future. `EXPORTED_CFG_SETTINGS` is a mapping of cfg key to allowed cfg +// values +lazy_static::lazy_static! { + // FIXME: replace lazy_static with std::Lazy once available: https://github.com/rust-lang/rust/issues/109736 + static ref EXPORTED_CFG_SETTINGS: Vec<(&'static str, Vec<&'static str>)> = + vec![("DRIVER_MODEL-DRIVER_TYPE", vec!["WDM", "KMDF", "UMDF"])]; +} + #[cfg(test)] mod tests { #[cfg(nightly_toolchain)] @@ -735,7 +996,7 @@ mod tests { /// # Panics /// /// Panics if called with duplicate environment variable keys. - fn with_env(env_vars_key_value_pairs: &[(K, V)], f: F) -> R + pub fn with_env(env_vars_key_value_pairs: &[(K, V)], f: F) -> R where K: AsRef + std::cmp::Eq + std::hash::Hash, V: AsRef, @@ -782,46 +1043,48 @@ mod tests { let config = with_env(&[("CARGO_CFG_TARGET_ARCH", "x86_64")], Config::new); #[cfg(nightly_toolchain)] - assert_matches!(config.driver_config, DriverConfig::WDM()); - assert_eq!(config.cpu_architecture, CPUArchitecture::AMD64); + assert_matches!(config.driver_config, DriverConfig::Wdm); + assert_eq!(config.cpu_architecture, CpuArchitecture::Amd64); } #[test] fn wdm_config() { let config = with_env(&[("CARGO_CFG_TARGET_ARCH", "x86_64")], || Config { - driver_config: DriverConfig::WDM(), + driver_config: DriverConfig::Wdm, ..Config::default() }); #[cfg(nightly_toolchain)] - assert_matches!(config.driver_config, DriverConfig::WDM()); - assert_eq!(config.cpu_architecture, CPUArchitecture::AMD64); + assert_matches!(config.driver_config, DriverConfig::Wdm); + assert_eq!(config.cpu_architecture, CpuArchitecture::Amd64); } #[test] fn default_kmdf_config() { let config = with_env(&[("CARGO_CFG_TARGET_ARCH", "x86_64")], || Config { - driver_config: DriverConfig::KMDF(KMDFConfig::new()), + driver_config: DriverConfig::Kmdf(KmdfConfig::new()), ..Config::default() }); #[cfg(nightly_toolchain)] assert_matches!( config.driver_config, - DriverConfig::KMDF(KMDFConfig { + DriverConfig::Kmdf(KmdfConfig { kmdf_version_major: 1, - kmdf_version_minor: 33 + target_kmdf_version_minor: 33, + minimum_kmdf_version_minor: None }) ); - assert_eq!(config.cpu_architecture, CPUArchitecture::AMD64); + assert_eq!(config.cpu_architecture, CpuArchitecture::Amd64); } #[test] fn kmdf_config() { let config = with_env(&[("CARGO_CFG_TARGET_ARCH", "x86_64")], || Config { - driver_config: DriverConfig::KMDF(KMDFConfig { + driver_config: DriverConfig::Kmdf(KmdfConfig { kmdf_version_major: 1, - kmdf_version_minor: 15, + target_kmdf_version_minor: 15, + minimum_kmdf_version_minor: None, }), ..Config::default() }); @@ -829,38 +1092,41 @@ mod tests { #[cfg(nightly_toolchain)] assert_matches!( config.driver_config, - DriverConfig::KMDF(KMDFConfig { + DriverConfig::Kmdf(KmdfConfig { kmdf_version_major: 1, - kmdf_version_minor: 15 + target_kmdf_version_minor: 15, + minimum_kmdf_version_minor: None }) ); - assert_eq!(config.cpu_architecture, CPUArchitecture::AMD64); + assert_eq!(config.cpu_architecture, CpuArchitecture::Amd64); } #[test] fn default_umdf_config() { let config = with_env(&[("CARGO_CFG_TARGET_ARCH", "x86_64")], || Config { - driver_config: DriverConfig::UMDF(UMDFConfig::new()), + driver_config: DriverConfig::Umdf(UmdfConfig::new()), ..Config::default() }); #[cfg(nightly_toolchain)] assert_matches!( config.driver_config, - DriverConfig::UMDF(UMDFConfig { + DriverConfig::Umdf(UmdfConfig { umdf_version_major: 2, - umdf_version_minor: 33 + target_umdf_version_minor: 33, + minimum_umdf_version_minor: None }) ); - assert_eq!(config.cpu_architecture, CPUArchitecture::AMD64); + assert_eq!(config.cpu_architecture, CpuArchitecture::Amd64); } #[test] fn umdf_config() { let config = with_env(&[("CARGO_CFG_TARGET_ARCH", "aarch64")], || Config { - driver_config: DriverConfig::UMDF(UMDFConfig { + driver_config: DriverConfig::Umdf(UmdfConfig { umdf_version_major: 2, - umdf_version_minor: 15, + target_umdf_version_minor: 15, + minimum_umdf_version_minor: None, }), ..Config::default() }); @@ -868,24 +1134,74 @@ mod tests { #[cfg(nightly_toolchain)] assert_matches!( config.driver_config, - DriverConfig::UMDF(UMDFConfig { + DriverConfig::Umdf(UmdfConfig { umdf_version_major: 2, - umdf_version_minor: 15 + target_umdf_version_minor: 15, + minimum_umdf_version_minor: None }) ); - assert_eq!(config.cpu_architecture, CPUArchitecture::ARM64); + assert_eq!(config.cpu_architecture, CpuArchitecture::Arm64); } #[test] fn test_try_from_cargo_str() { assert_eq!( - CPUArchitecture::try_from_cargo_str("x86_64"), - Some(CPUArchitecture::AMD64) + CpuArchitecture::try_from_cargo_str("x86_64"), + Some(CpuArchitecture::Amd64) ); assert_eq!( - CPUArchitecture::try_from_cargo_str("aarch64"), - Some(CPUArchitecture::ARM64) + CpuArchitecture::try_from_cargo_str("aarch64"), + Some(CpuArchitecture::Arm64) ); - assert_eq!(CPUArchitecture::try_from_cargo_str("arm"), None); + assert_eq!(CpuArchitecture::try_from_cargo_str("arm"), None); + } + + mod compute_wdffunctions_symbol_name { + use super::*; + use crate::{KmdfConfig, UmdfConfig}; + + #[test] + fn kmdf() { + let config = with_env(&[("CARGO_CFG_TARGET_ARCH", "x86_64")], || Config { + driver_config: DriverConfig::Kmdf(KmdfConfig { + kmdf_version_major: 1, + target_kmdf_version_minor: 15, + minimum_kmdf_version_minor: None, + }), + ..Default::default() + }); + + let result = config.compute_wdffunctions_symbol_name(); + + assert_eq!(result, Some("WdfFunctions_01015".to_string())); + } + + #[test] + fn umdf() { + let config = with_env(&[("CARGO_CFG_TARGET_ARCH", "aarch64")], || Config { + driver_config: DriverConfig::Umdf(UmdfConfig { + umdf_version_major: 2, + target_umdf_version_minor: 33, + minimum_umdf_version_minor: None, + }), + ..Default::default() + }); + + let result = config.compute_wdffunctions_symbol_name(); + + assert_eq!(result, Some("WdfFunctions_02033".to_string())); + } + + #[test] + fn wdm() { + let config = with_env(&[("CARGO_CFG_TARGET_ARCH", "x86_64")], || Config { + driver_config: DriverConfig::Wdm, + ..Default::default() + }); + + let result = config.compute_wdffunctions_symbol_name(); + + assert_eq!(result, None); + } } } diff --git a/crates/wdk-build/src/metadata/error.rs b/crates/wdk-build/src/metadata/error.rs new file mode 100644 index 00000000..9ee11ba1 --- /dev/null +++ b/crates/wdk-build/src/metadata/error.rs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +use serde::ser::{self}; +use thiserror::Error; + +/// A specialized [`Result`] type for [`metadata`](crate::metadata) +/// serialization and deserialization operations. +pub type Result = std::result::Result; + +/// This type represents all possible errors that can occur when serializing +/// or deserializing [`metadata::Wdk`](crate::metadata::Wdk). +#[derive(Debug, Error)] +pub enum Error { + /// catch-all error emitted during serialization, when a more specific + /// error type is not available. This type of error is commonly + /// generated from [`serde`]'s `derive` feature's generated `Serialize` + /// impls. + #[error("custom serialization error: {message}")] + CustomSerialization { + /// Message describing the error + message: String, + }, + + /// error emitted when an empty key name is encountered during + /// serialization. Serialization of values always requires a non-empty + /// key name + #[error("empty key name encountered during serialization of value: {value_being_serialized}")] + EmptySerializationKeyName { + /// Value being serialized + value_being_serialized: String, + }, + + /// error emitted when duplicate key names are found during + /// serialization. Serializing into a + /// [`metadata::Map`](crate::metadata::Map) requires unique key names + #[error( + "duplicate keys found during serialization:\nkey: {key}\nvalue 1: {value_1}\nvalue 2: \ + {value_2}" + )] + DuplicateSerializationKeys { + /// Key name + key: String, + /// One of the conflicting values + value_1: String, + /// One of the conflicting values + value_2: String, + }, +} + +impl ser::Error for Error { + fn custom(msg: T) -> Self { + Self::CustomSerialization { + message: msg.to_string(), + } + } +} diff --git a/crates/wdk-build/src/metadata/map.rs b/crates/wdk-build/src/metadata/map.rs new file mode 100644 index 00000000..492b3ae3 --- /dev/null +++ b/crates/wdk-build/src/metadata/map.rs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +use std::{ + collections::{btree_map, hash_map, BTreeMap, HashMap}, + hash::{BuildHasher, Hash}, +}; + +/// Trait for map-like type that is returned by +/// [`metadata::to_map`](crate::metadata::to_map) +/// and [`metadata::to_map_with_prefix`](crate::metadata::to_map_with_prefix). +pub trait Map: Default { + /// Creates a new, empty map + #[must_use] + fn new() -> Self { + Self::default() + } + + /// Inserts a new key-value pair into the map, or calls a function/closure + /// if the key already exists. + /// + /// The function/closure is called with the existing key, the existing + /// value, and the new value it tried to insert. The closure can decide + /// whether the function will return an `Err` or if it will still return a + /// `Ok` despite not inserting the value. + /// + /// # Errors + /// This function returns an error if the key already exists and `f` returns + /// an `Err` value + fn insert_or_else(&mut self, key: K, value: V, f: F) -> Result<(), E> + where + F: FnMut(&K, &V, V) -> Result<(), E>; +} + +impl Map for HashMap { + fn insert_or_else(&mut self, key: K, value: V, mut f: F) -> Result<(), E> + where + F: FnMut(&K, &V, V) -> Result<(), E>, + { + match self.entry(key) { + hash_map::Entry::Occupied(entry) => f(entry.key(), entry.get(), value), + hash_map::Entry::Vacant(entry) => { + entry.insert(value); + Ok(()) + } + } + } +} + +impl Map for BTreeMap { + fn insert_or_else(&mut self, key: K, value: V, mut f: F) -> Result<(), E> + where + F: FnMut(&K, &V, V) -> Result<(), E>, + { + match self.entry(key) { + btree_map::Entry::Occupied(entry) => f(entry.key(), entry.get(), value), + btree_map::Entry::Vacant(entry) => { + entry.insert(value); + Ok(()) + } + } + } +} diff --git a/crates/wdk-build/src/metadata/mod.rs b/crates/wdk-build/src/metadata/mod.rs new file mode 100644 index 00000000..d6d766a6 --- /dev/null +++ b/crates/wdk-build/src/metadata/mod.rs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! Parsing and serializing metadata about WDK projects +//! +//! This module provides a [`Wdk`] struct that represents the cargo metadata +//! specified in the `metadata.wdk` section any `Cargo.toml`. This corresponds +//! with the settings in the `Driver Settings` property pages for WDK projects +//! in Visual Studio. This module also also provides [`serde`]-compatible +//! serialization and deserialization for the metadata. + +pub use error::{Error, Result}; +pub use map::Map; +pub use ser::{to_map, to_map_with_prefix, Serializer}; + +pub(crate) mod ser; + +mod error; +mod map; + +use std::collections::HashSet; + +use camino::Utf8PathBuf; +use cargo_metadata::Metadata; +use serde::{Deserialize, Serialize}; +use thiserror::Error; + +use crate::DriverConfig; + +/// Metadata specified in the `metadata.wdk` section of the `Cargo.toml` +/// of a crate that depends on the WDK, or in a cargo workspace. This +/// corresponds with the settings in the `Driver Settings` property pages for +/// WDK projects in Visual Studio +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)] +#[serde( + deny_unknown_fields, + rename_all(serialize = "SCREAMING_SNAKE_CASE", deserialize = "kebab-case") +)] +pub struct Wdk { + /// Metadata corresponding to the `Driver Model` property page in the WDK + pub driver_model: DriverConfig, +} + +/// Errors that could result from trying to construct a +/// [`metadata::Wdk`](crate::metadata::Wdk) from information parsed by `cargo +/// metadata` +#[derive(Debug, Error)] +pub enum TryFromCargoMetadataError { + /// Error returned when no WDK configuration metadata is detected in the + /// dependency graph + #[error( + "no WDK configuration metadata is detected in the dependency graph. This could happen \ + when building WDR itself, or building library crates that depend on the WDK but defer \ + WDK configuration to their consumers" + )] + NoWdkConfigurationsDetected, + + /// Error returned when multiple configurations of the WDK are detected + /// across the dependency graph + #[error( + "multiple configurations of the WDK are detected across the dependency graph, but only \ + one configuration is allowed: {wdk_metadata_configurations:#?}" + )] + MultipleWdkConfigurationsDetected { + /// [`HashSet`] of unique [`metadata::Wdk`](crate::metadata::Wdk) + /// derived from detected WDK metadata + wdk_metadata_configurations: HashSet, + }, + + /// Error returned when [`crate::metadata::Wdk`] fails to be deserialized + /// from [`cargo_metadata::Metadata`] output + #[error("failed to deserialize metadata::Wdk from {metadata_source}")] + WdkMetadataDeserialization { + /// `String` that describes what part of + /// `cargo_metadata::Metadata` was used as the source for + /// deserialization + metadata_source: String, + /// [`serde_json::Error`] that caused the deserialization to fail + #[source] + error_source: serde_json::Error, + }, +} + +impl TryFrom<&Metadata> for Wdk { + type Error = TryFromCargoMetadataError; + + fn try_from(metadata: &Metadata) -> std::result::Result { + let wdk_metadata_configurations = { + // Parse WDK metadata from workspace and all packages + let mut configs = parse_packages_wdk_metadata(&metadata.packages)?; + if let Some(workspace_metadata) = + parse_workspace_wdk_metadata(&metadata.workspace_metadata)? + { + configs.insert(workspace_metadata); + } + configs + }; + + // Ensure that only one configuration of WDK is allowed per dependency graph + match wdk_metadata_configurations.len() { + 1 => Ok(wdk_metadata_configurations.into_iter().next().expect( + "wdk_metadata_configurations should have exactly one element because of the \ + .len() check above", + )), + + 0 => Err(TryFromCargoMetadataError::NoWdkConfigurationsDetected), + + _ => Err( + TryFromCargoMetadataError::MultipleWdkConfigurationsDetected { + wdk_metadata_configurations, + }, + ), + } + } +} + +fn parse_packages_wdk_metadata( + packages: &[cargo_metadata::Package], +) -> std::result::Result, TryFromCargoMetadataError> { + let wdk_metadata_configurations = packages + .iter() + .filter_map(|package| match &package.metadata["wdk"] { + serde_json::Value::Null => None, + // When wdk section is empty, treat it as if it wasn't there. This is to allow for using + // empty wdk metadata sections to mark the package as a driver (ex. for detection in + // `package_driver_flow_condition_script`) + serde_json::Value::Object(map) if map.is_empty() => None, + wdk_metadata => Some(Wdk::deserialize(wdk_metadata).map_err(|err| { + TryFromCargoMetadataError::WdkMetadataDeserialization { + metadata_source: format!( + "{} for {} package", + stringify!(package.metadata["wdk"]), + package.name + ), + error_source: err, + } + })), + }) + .collect::, _>>()?; + Ok(wdk_metadata_configurations) +} + +fn parse_workspace_wdk_metadata( + workspace_metadata: &serde_json::Value, +) -> std::result::Result, TryFromCargoMetadataError> { + Ok(match &workspace_metadata["wdk"] { + serde_json::Value::Null => None, + wdk_metadata => Some(Wdk::deserialize(wdk_metadata).map_err(|err| { + TryFromCargoMetadataError::WdkMetadataDeserialization { + metadata_source: stringify!(workspace_metadata["wdk"]).to_string(), + error_source: err, + } + })?), + }) +} + +pub(crate) fn iter_manifest_paths(metadata: Metadata) -> impl IntoIterator { + let mut cargo_manifest_paths = HashSet::new(); + + // Add all package manifest paths + for package in metadata.packages { + cargo_manifest_paths.insert(package.manifest_path); + } + + // Add workspace manifest path + let workspace_manifest_path: Utf8PathBuf = { + let mut path = metadata.workspace_root; + path.push("Cargo.toml"); + path + }; + cargo_manifest_paths.insert(workspace_manifest_path); + + cargo_manifest_paths +} diff --git a/crates/wdk-build/src/metadata/ser.rs b/crates/wdk-build/src/metadata/ser.rs new file mode 100644 index 00000000..7367ca6a --- /dev/null +++ b/crates/wdk-build/src/metadata/ser.rs @@ -0,0 +1,746 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +use serde::{ + ser::{self, Impossible}, + Serialize, +}; + +use super::{ + error::{Error, Result}, + map::Map, +}; + +/// delimiter used to separate the names of the different nodes encoded into a +/// key name. Since `-` is not valid in Rust identifiers, it is used +/// as a separator between different node names. +pub const KEY_NAME_SEPARATOR: char = '-'; + +/// Serialize a value into a [`Map`] where the keys represent a +/// `KEY_NAME_SEPARATOR`-seperated list of field names. +/// +/// # Errors +/// +/// This function will return an error if the type being serialized: +/// * results in duplicate key names +/// * results in an empty key name +/// * otherwise fails to be parsed and correctly serialized into a [`Map`] +/// +/// # Example +/// ```rust +/// use std::collections::BTreeMap; +/// +/// use wdk_build::{ +/// metadata::{self, to_map}, +/// DriverConfig, +/// KmdfConfig, +/// }; +/// +/// let wdk_metadata = metadata::Wdk { +/// driver_model: DriverConfig::Kmdf(KmdfConfig { +/// kmdf_version_major: 1, +/// target_kmdf_version_minor: 23, +/// minimum_kmdf_version_minor: None, +/// }), +/// }; +/// +/// let output = to_map::>(&wdk_metadata).unwrap(); +/// +/// assert_eq!(output["DRIVER_MODEL-DRIVER_TYPE"], "KMDF"); +/// assert_eq!(output["DRIVER_MODEL-KMDF_VERSION_MAJOR"], "1"); +/// assert_eq!(output["DRIVER_MODEL-TARGET_KMDF_VERSION_MINOR"], "23"); +/// +/// // `None` values are not serialized +/// assert_eq!(output.get("DRIVER_MODEL-MINIMUM_KMDF_VERSION_MINOR"), None); +/// ``` +pub fn to_map(value: &impl Serialize) -> Result +where + M: Map, +{ + let mut serialization_buffer: Vec<(String, String)> = Vec::new(); + value.serialize(&mut Serializer::new(&mut serialization_buffer))?; + convert_serialized_output_to_map(serialization_buffer) +} + +/// Serialize a value into a [`Map`] where the keys represent a +/// `KEY_NAME_SEPARATOR`-seperated list of field names prepended with a +/// prefix. +/// +/// # Errors +/// +/// This function will return an error if the type being serialized: +/// * results in duplicate key names +/// * results in an empty key name +/// * otherwise fails to be parsed and correctly serialized into a [`Map`] +/// +/// # Example +/// ```rust +/// use std::collections::BTreeMap; +/// +/// use wdk_build::{ +/// metadata::{self, to_map_with_prefix}, +/// DriverConfig, +/// KmdfConfig, +/// }; +/// +/// let wdk_metadata = metadata::Wdk { +/// driver_model: DriverConfig::Kmdf(KmdfConfig { +/// kmdf_version_major: 1, +/// target_kmdf_version_minor: 33, +/// minimum_kmdf_version_minor: Some(31), +/// }), +/// }; +/// +/// let output = to_map_with_prefix::>("WDK_BUILD_METADATA", &wdk_metadata).unwrap(); +/// +/// assert_eq!( +/// output["WDK_BUILD_METADATA-DRIVER_MODEL-DRIVER_TYPE"], +/// "KMDF" +/// ); +/// assert_eq!( +/// output["WDK_BUILD_METADATA-DRIVER_MODEL-KMDF_VERSION_MAJOR"], +/// "1" +/// ); +/// assert_eq!( +/// output["WDK_BUILD_METADATA-DRIVER_MODEL-TARGET_KMDF_VERSION_MINOR"], +/// "33" +/// ); +/// assert_eq!( +/// output["WDK_BUILD_METADATA-DRIVER_MODEL-MINIMUM_KMDF_VERSION_MINOR"], +/// "31" +/// ); +/// ``` +pub fn to_map_with_prefix(prefix: impl Into, value: &impl Serialize) -> Result +where + M: Map, +{ + let mut serialization_buffer: Vec<(String, String)> = Vec::new(); + value.serialize(&mut Serializer::with_prefix( + prefix.into(), + &mut serialization_buffer, + ))?; + convert_serialized_output_to_map(serialization_buffer) +} + +fn convert_serialized_output_to_map(serialization_buffer: Vec<(String, String)>) -> Result +where + M: Map, +{ + let mut output_map = M::new(); + for (key, value) in serialization_buffer { + output_map.insert_or_else(key, value, |key, existing_value, new_value| { + Err(Error::DuplicateSerializationKeys { + key: key.clone(), + value_1: existing_value.clone(), + value_2: new_value, + }) + })?; + } + + Ok(output_map) +} + +/// [`serde`] serializer that serializes values into a [`Vec`] of key-value +/// pairs. +/// +/// This serializer is useful when you want to have more granular control of the +/// output of the serializer. Most usecases should already be covered by the +/// [`to_map`] and [`to_map_with_prefix`] functions. +pub struct Serializer<'a> { + root_key_name: Option, + dst: &'a mut Vec<(String, String)>, +} + +impl<'a> ser::Serializer for &'a mut Serializer<'a> { + type Error = Error; + type Ok = (); + type SerializeMap = Impossible; + type SerializeSeq = Impossible; + type SerializeStruct = Self; + type SerializeStructVariant = Impossible; + type SerializeTuple = Impossible; + type SerializeTupleStruct = Impossible; + type SerializeTupleVariant = Impossible; + + unsupported_serde_serialize_method! { + // simple types + bytes newtype_struct newtype_variant unit_struct unit_variant + // complex types (returns SerializeXYZ types) + map seq struct_variant tuple tuple_struct tuple_variant + } + + fn serialize_str(self, value: &str) -> Result { + self.dst.push(( + self.root_key_name + .clone() + .ok_or_else(|| Error::EmptySerializationKeyName { + value_being_serialized: value.to_string(), + })?, + value.to_string(), + )); + Ok(()) + } + + fn serialize_bool(self, value: bool) -> Result { + self.dst.push(( + self.root_key_name + .clone() + .ok_or_else(|| Error::EmptySerializationKeyName { + value_being_serialized: value.to_string(), + })?, + value.to_string(), + )); + Ok(()) + } + + fn serialize_char(self, value: char) -> Result { + self.dst.push(( + self.root_key_name + .clone() + .ok_or_else(|| Error::EmptySerializationKeyName { + value_being_serialized: value.to_string(), + })?, + value.to_string(), + )); + Ok(()) + } + + fn serialize_i8(self, value: i8) -> Result { + self.dst.push(( + self.root_key_name + .clone() + .ok_or_else(|| Error::EmptySerializationKeyName { + value_being_serialized: value.to_string(), + })?, + value.to_string(), + )); + Ok(()) + } + + fn serialize_i16(self, value: i16) -> Result { + self.dst.push(( + self.root_key_name + .clone() + .ok_or_else(|| Error::EmptySerializationKeyName { + value_being_serialized: value.to_string(), + })?, + value.to_string(), + )); + Ok(()) + } + + fn serialize_i32(self, value: i32) -> Result { + self.dst.push(( + self.root_key_name + .clone() + .ok_or_else(|| Error::EmptySerializationKeyName { + value_being_serialized: value.to_string(), + })?, + value.to_string(), + )); + Ok(()) + } + + fn serialize_i64(self, value: i64) -> Result { + self.dst.push(( + self.root_key_name + .clone() + .ok_or_else(|| Error::EmptySerializationKeyName { + value_being_serialized: value.to_string(), + })?, + value.to_string(), + )); + Ok(()) + } + + fn serialize_f32(self, value: f32) -> Result { + self.dst.push(( + self.root_key_name + .clone() + .ok_or_else(|| Error::EmptySerializationKeyName { + value_being_serialized: value.to_string(), + })?, + value.to_string(), + )); + Ok(()) + } + + fn serialize_f64(self, value: f64) -> Result { + self.dst.push(( + self.root_key_name + .clone() + .ok_or_else(|| Error::EmptySerializationKeyName { + value_being_serialized: value.to_string(), + })?, + value.to_string(), + )); + Ok(()) + } + + fn serialize_none(self) -> Result { + self.serialize_unit() + } + + fn serialize_some(self, value: &T) -> Result + where + T: ?Sized + Serialize, + { + value.serialize(self) + } + + fn serialize_unit(self) -> Result { + Ok(()) + } + + fn serialize_u8(self, value: u8) -> Result { + self.dst.push(( + self.root_key_name + .clone() + .ok_or_else(|| Error::EmptySerializationKeyName { + value_being_serialized: value.to_string(), + })?, + value.to_string(), + )); + Ok(()) + } + + fn serialize_u16(self, value: u16) -> Result { + self.dst.push(( + self.root_key_name + .clone() + .ok_or_else(|| Error::EmptySerializationKeyName { + value_being_serialized: value.to_string(), + })?, + value.to_string(), + )); + Ok(()) + } + + fn serialize_u32(self, value: u32) -> Result { + self.dst.push(( + self.root_key_name + .clone() + .ok_or_else(|| Error::EmptySerializationKeyName { + value_being_serialized: value.to_string(), + })?, + value.to_string(), + )); + Ok(()) + } + + fn serialize_u64(self, value: u64) -> Result { + self.dst.push(( + self.root_key_name + .clone() + .ok_or_else(|| Error::EmptySerializationKeyName { + value_being_serialized: value.to_string(), + })?, + value.to_string(), + )); + Ok(()) + } + + fn serialize_struct(self, _name: &'static str, _len: usize) -> Result { + Ok(self) + } +} + +impl<'a> ser::SerializeStruct for &'a mut Serializer<'a> { + type Error = Error; + type Ok = (); + + fn serialize_field(&mut self, key: &'static str, value: &T) -> Result + where + T: ?Sized + Serialize, + { + value.serialize(&mut Serializer::with_prefix( + self.root_key_name.as_ref().map_or_else( + || key.to_string(), + |root_key_name| format!("{root_key_name}{KEY_NAME_SEPARATOR}{key}"), + ), + self.dst, + ))?; + Ok(()) + } + + fn end(self) -> Result { + Ok(()) + } +} + +impl<'a> Serializer<'a> { + /// Create a new instance of the `Serializer` struct + pub fn new(dst: &'a mut Vec<(String, String)>) -> Self { + Self { + root_key_name: None, + dst, + } + } + + /// Create a new instance of the `Serializer` struct with a prefix used as + /// the root for all keys + pub fn with_prefix(prefix: String, dst: &'a mut Vec<(String, String)>) -> Self { + Self { + root_key_name: Some(prefix), + dst, + } + } +} + +#[doc(hidden)] +/// Helper macro when implementing the `Serializer` part of a new data +/// format for Serde. +/// +/// Generates [`serde::ser::Serializer`] trait methods for serde data model +/// types that aren't supported by this serializer. This generates a +/// method that calls [`unimplemented!`]. +macro_rules! unsupported_serde_serialize_method { + ($($method_type:ident)*) => { + $(unsupported_serde_serialize_method_helper! {$method_type})* + }; +} +#[doc(hidden)] +pub(crate) use unsupported_serde_serialize_method; + +#[doc(hidden)] +macro_rules! unsupported_serde_serialize_method_helper { + // methods for simple types (returns Ok) + (bytes) => { + unsupported_serde_serialize_method_definition! { + serialize_bytes(_v: &[u8]) -> std::result::Result< + ::Ok, + ::Error, + > + } + }; + (newtype_struct) => { + unsupported_serde_serialize_method_definition! { + serialize_newtype_struct(_name: &'static str, _value: &T) -> std::result::Result< + ::Ok, + ::Error, + > + } + }; + (newtype_variant) => { + unsupported_serde_serialize_method_definition! { + serialize_newtype_variant(_name: &'static str, _variant_index: u32, _variant: &'static str, _value: &T) -> std::result::Result< + ::Ok, + ::Error, + > + } + }; + (none) => { + unsupported_serde_serialize_method_definition! { + serialize_none() -> std::result::Result< + ::Ok, + ::Error, + > + } + }; + (some) => { + unsupported_serde_serialize_method_definition! { + serialize_some(_value: &T) -> std::result::Result< + ::Ok, + ::Error, + > + } + }; + (str) => { + unsupported_serde_serialize_method_definition! { + serialize_str(_v: &str) -> std::result::Result< + ::Ok, + ::Error, + > + } + }; + (unit) => { + unsupported_serde_serialize_method_definition! { + serialize_unit() -> std::result::Result< + ::Ok, + ::Error, + > + } + }; + (unit_struct) => { + unsupported_serde_serialize_method_definition! { + serialize_unit_struct(_name: &'static str) -> std::result::Result< + ::Ok, + ::Error, + > + } + }; + (unit_variant) => { + unsupported_serde_serialize_method_definition! { + serialize_unit_variant(_name: &'static str, _variant_index: u32, _variant: &'static str) -> std::result::Result< + ::Ok, + ::Error, + > + } + }; + // methods for complex types (returns SerializeXYZ types) + (map) => { + unsupported_serde_serialize_method_definition! { + serialize_map(_len: Option) -> std::result::Result< + ::SerializeMap, + ::Error, + > + } + }; + (struct) => { + unsupported_serde_serialize_method_definition! { + serialize_struct(_name: &'static str, _len: usize) -> std::result::Result< + ::SerializeStruct, + ::Error, + > + } + }; + (struct_variant) => { + unsupported_serde_serialize_method_definition! { + serialize_struct_variant(_name: &'static str, _variant_index: u32, _variant: &'static str, _len: usize) -> std::result::Result< + ::SerializeStructVariant, + ::Error, + > + } + }; + (seq) => { + unsupported_serde_serialize_method_definition! { + serialize_seq(_len: Option) -> std::result::Result< + ::SerializeSeq, + ::Error, + > + } + }; + (tuple) => { + unsupported_serde_serialize_method_definition! { + serialize_tuple(_len: usize) -> std::result::Result< + ::SerializeTuple, + ::Error, + > + } + }; + (tuple_struct) => { + unsupported_serde_serialize_method_definition! { + serialize_tuple_struct(_name: &'static str, _len: usize) -> std::result::Result< + ::SerializeTupleStruct, + ::Error, + > + } + }; + (tuple_variant) => { + unsupported_serde_serialize_method_definition! { + serialize_tuple_variant(_name: &'static str, _variant_index: u32, _variant: &'static str, _len: usize) -> std::result::Result< + ::SerializeTupleVariant, + ::Error, + > + } + }; + // every other method has no extra arguments and is for simple types + ($method_type:ident) => { + paste::paste! { + unsupported_serde_serialize_method_definition! { + [](_v: $method_type) -> std::result::Result< + ::Ok, + ::Error, + > + } + } + }; +} +#[doc(hidden)] +pub(crate) use unsupported_serde_serialize_method_helper; + +#[doc(hidden)] +macro_rules! unsupported_serde_serialize_method_definition { + // methods with generic argument + ($func:ident <$generic_arg:ident> ($($arg:ident : $ty:ty),*) -> std::result::Result<$ok:ty, $err:ty$(,)?>) => { + #[inline] + fn $func <$generic_arg> (self, $($arg: $ty,)*) -> std::result::Result<$ok, $err> + where + $generic_arg: ?Sized + Serialize { + unimplemented!( + "{} is not implemented for {} since it is currently not needed to serialize the metadata::Wdk struct", + stringify!($func), + std::any::type_name::(), + ) + } + }; + // methods without generic argument + ($func:ident ($($arg:ident : $ty:ty),*) -> std::result::Result<$ok:ty, $err:ty$(,)?>) => { + #[inline] + fn $func (self, $($arg: $ty,)*) -> std::result::Result<$ok, $err> { + unimplemented!( + "{} is not implemented for {} since it is currently not needed to serialize the metadata::Wdk struct", + stringify!($func), + std::any::type_name::(), + ) + } + }; +} +#[doc(hidden)] +pub(crate) use unsupported_serde_serialize_method_definition; + +#[cfg(test)] +mod tests { + use std::{ + collections::{BTreeMap, HashMap}, + vec, + }; + + use super::*; + use crate::{metadata, DriverConfig, KmdfConfig, UmdfConfig}; + + #[test] + fn test_kmdf() { + let wdk_metadata = metadata::Wdk { + driver_model: DriverConfig::Kmdf(KmdfConfig { + kmdf_version_major: 1, + target_kmdf_version_minor: 23, + minimum_kmdf_version_minor: Some(21), + }), + }; + + let output = to_map::>(&wdk_metadata).unwrap(); + + assert_eq!(output["DRIVER_MODEL-DRIVER_TYPE"], "KMDF"); + assert_eq!(output["DRIVER_MODEL-KMDF_VERSION_MAJOR"], "1"); + assert_eq!(output["DRIVER_MODEL-TARGET_KMDF_VERSION_MINOR"], "23"); + assert_eq!(output["DRIVER_MODEL-MINIMUM_KMDF_VERSION_MINOR"], "21"); + } + + #[test] + fn test_kmdf_no_minimum() { + let wdk_metadata = metadata::Wdk { + driver_model: DriverConfig::Kmdf(KmdfConfig { + kmdf_version_major: 1, + target_kmdf_version_minor: 23, + minimum_kmdf_version_minor: None, + }), + }; + + let output = to_map::>(&wdk_metadata).unwrap(); + + assert_eq!(output["DRIVER_MODEL-DRIVER_TYPE"], "KMDF"); + assert_eq!(output["DRIVER_MODEL-KMDF_VERSION_MAJOR"], "1"); + assert_eq!(output["DRIVER_MODEL-TARGET_KMDF_VERSION_MINOR"], "23"); + + // `None` values are not serialized + assert_eq!(output.get("DRIVER_MODEL-MINIMUM_KMDF_VERSION_MINOR"), None); + } + + #[test] + fn test_kmdf_with_prefix() { + let wdk_metadata = metadata::Wdk { + driver_model: DriverConfig::Kmdf(KmdfConfig { + kmdf_version_major: 1, + target_kmdf_version_minor: 33, + minimum_kmdf_version_minor: Some(31), + }), + }; + + let output = + to_map_with_prefix::>("WDK_BUILD_METADATA", &wdk_metadata).unwrap(); + + assert_eq!( + output["WDK_BUILD_METADATA-DRIVER_MODEL-DRIVER_TYPE"], + "KMDF" + ); + assert_eq!( + output["WDK_BUILD_METADATA-DRIVER_MODEL-KMDF_VERSION_MAJOR"], + "1" + ); + assert_eq!( + output["WDK_BUILD_METADATA-DRIVER_MODEL-TARGET_KMDF_VERSION_MINOR"], + "33" + ); + assert_eq!( + output["WDK_BUILD_METADATA-DRIVER_MODEL-MINIMUM_KMDF_VERSION_MINOR"], + "31" + ); + } + + #[test] + fn test_kmdf_with_hashmap() { + let wdk_metadata = metadata::Wdk { + driver_model: DriverConfig::Kmdf(KmdfConfig { + kmdf_version_major: 1, + target_kmdf_version_minor: 33, + minimum_kmdf_version_minor: Some(31), + }), + }; + + let output = to_map::>(&wdk_metadata).unwrap(); + + assert_eq!(output["DRIVER_MODEL-DRIVER_TYPE"], "KMDF"); + assert_eq!(output["DRIVER_MODEL-KMDF_VERSION_MAJOR"], "1"); + assert_eq!(output["DRIVER_MODEL-TARGET_KMDF_VERSION_MINOR"], "33"); + assert_eq!(output["DRIVER_MODEL-MINIMUM_KMDF_VERSION_MINOR"], "31"); + } + + #[test] + fn test_umdf() { + let wdk_metadata = metadata::Wdk { + driver_model: DriverConfig::Umdf(UmdfConfig { + umdf_version_major: 1, + target_umdf_version_minor: 23, + minimum_umdf_version_minor: Some(21), + }), + }; + + let output = to_map::>(&wdk_metadata).unwrap(); + + assert_eq!(output["DRIVER_MODEL-DRIVER_TYPE"], "UMDF"); + assert_eq!(output["DRIVER_MODEL-UMDF_VERSION_MAJOR"], "1"); + assert_eq!(output["DRIVER_MODEL-TARGET_UMDF_VERSION_MINOR"], "23"); + assert_eq!(output["DRIVER_MODEL-MINIMUM_UMDF_VERSION_MINOR"], "21"); + } + + #[test] + fn test_umdf_no_minimum() { + let wdk_metadata = metadata::Wdk { + driver_model: DriverConfig::Umdf(UmdfConfig { + umdf_version_major: 1, + target_umdf_version_minor: 23, + minimum_umdf_version_minor: None, + }), + }; + + let output = to_map::>(&wdk_metadata).unwrap(); + + assert_eq!(output["DRIVER_MODEL-DRIVER_TYPE"], "UMDF"); + assert_eq!(output["DRIVER_MODEL-UMDF_VERSION_MAJOR"], "1"); + assert_eq!(output["DRIVER_MODEL-TARGET_UMDF_VERSION_MINOR"], "23"); + + // `None` values are not serialized + assert_eq!(output.get("DRIVER_MODEL-MINIMUM_UMDF_VERSION_MINOR"), None); + } + + #[test] + fn test_wdm() { + let wdk_metadata = metadata::Wdk { + driver_model: DriverConfig::Wdm, + }; + + let output = to_map::>(&wdk_metadata).unwrap(); + + assert_eq!(output["DRIVER_MODEL-DRIVER_TYPE"], "WDM"); + } + + #[test] + fn test_conflicting_keys_in_convert_serialized_output_to_map() { + let input = vec![("KEY_NAME", "VALUE_1"), ("KEY_NAME", "VALUE_2")] + .into_iter() + .map(|(k, v)| (k.to_string(), v.to_string())) + .collect(); + + let err = convert_serialized_output_to_map::>(input).unwrap_err(); + + assert!(matches!( + err, + Error::DuplicateSerializationKeys { + key, + value_1, + value_2, + } if key == "KEY_NAME" && value_1 == "VALUE_1" && value_2 == "VALUE_2" + )); + } +} diff --git a/crates/wdk-build/src/utils.rs b/crates/wdk-build/src/utils.rs index e2acbf97..c75cd7a0 100644 --- a/crates/wdk-build/src/utils.rs +++ b/crates/wdk-build/src/utils.rs @@ -21,7 +21,7 @@ use windows::{ }, }; -use crate::{CPUArchitecture, ConfigError}; +use crate::{ConfigError, CpuArchitecture}; /// Errors that may occur when stripping the extended path prefix from a path #[derive(Debug, Error, PartialEq, Eq)] @@ -162,100 +162,6 @@ pub fn detect_wdk_content_root() -> Option { None } -/// Read a string value from a registry key -/// -/// # Arguments -/// -/// * `key_handle` - a [`windows::Win32::System::Registry::HKEY`] to the base -/// key -/// * `sub_key` - a [`windows::core::PCSTR`] that is the path of a registry key -/// relative to the `key_handle` argument -/// * `value` - a [`windows::core::PCSTR`] that is the name of the string -/// registry value to read -/// -/// # Panics -/// -/// Panics if read value isn't valid UTF-8 or if the opened regkey could not be -/// closed -fn read_registry_key_string_value( - key_handle: HKEY, - sub_key: PCSTR, - value: PCSTR, -) -> Option { - let mut opened_key_handle = HKEY::default(); - let mut len = 0; - if - // SAFETY: `&mut opened_key_handle` is coerced to a &raw mut, so the address passed as the - // argument is always valid. `&mut opened_key_handle` is coerced to a pointer of the correct - // type. - unsafe { RegOpenKeyExA(key_handle, sub_key, 0, KEY_READ, &mut opened_key_handle) }.is_ok() { - if - // SAFETY: `opened_key_handle` is valid key opened with the `KEY_QUERY_VALUE` access right - // (included in `KEY_READ`). `&mut len` is coerced to a &raw mut, so the address passed as - // the argument is always valid. `&mut len` is coerced to a pointer of the correct - // type. - unsafe { - RegGetValueA( - opened_key_handle, - None, - value, - RRF_RT_REG_SZ, - None, - None, - Some(&mut len), - ) - } - .is_ok() - { - let mut buffer = vec![0u8; len as usize]; - if - // SAFETY: `opened_key_handle` is valid key opened with the `KEY_QUERY_VALUE` access - // right (included in `KEY_READ`). `&mut buffer` is coerced to a &raw mut, - // so the address passed as the argument is always valid. `&mut buffer` is - // coerced to a pointer of the correct type. `&mut len` is coerced to a &raw - // mut, so the address passed as the argument is always valid. `&mut len` is - // coerced to a pointer of the correct type. - unsafe { - RegGetValueA( - opened_key_handle, - None, - value, - RRF_RT_REG_SZ, - None, - Some(buffer.as_mut_ptr().cast()), - Some(&mut len), - ) - } - .is_ok() - { - // SAFETY: `opened_key_handle` is valid opened key that was opened by - // `RegOpenKeyExA` - unsafe { RegCloseKey(opened_key_handle) } - .ok() - .expect("opened_key_handle should be successfully closed"); - return Some( - CStr::from_bytes_with_nul(&buffer[..len as usize]) - .expect( - "RegGetValueA should always return a null terminated string. The read \ - string (REG_SZ) from the registry should not contain any interior \ - nulls.", - ) - .to_str() - .expect("Registry value should be parseable as UTF8") - .to_string(), - ); - } - } - - // SAFETY: `opened_key_handle` is valid opened key that was opened by - // `RegOpenKeyExA` - unsafe { RegCloseKey(opened_key_handle) } - .ok() - .expect("opened_key_handle should be successfully closed"); - } - None -} - /// Searches a directory and determines the latest windows SDK version in that /// directory /// @@ -301,13 +207,13 @@ pub fn get_latest_windows_sdk_version(path_to_search: &Path) -> Result CPUArchitecture { +pub fn detect_cpu_architecture_in_build_script() -> CpuArchitecture { let target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").expect( "Cargo should have set the CARGO_CFG_TARGET_ARCH environment variable when executing \ build.rs", ); - CPUArchitecture::try_from_cargo_str(&target_arch).unwrap_or_else(|| { + CpuArchitecture::try_from_cargo_str(&target_arch).unwrap_or_else(|| { panic!("The target architecture, {target_arch}, is currently not supported.") }) } @@ -343,7 +249,7 @@ pub fn validate_wdk_version_format>(version_string: S) -> bool { /// /// # Errors /// -/// This function returns a [`ConfigError::WDKVersionStringFormatError`] if the +/// This function returns a [`ConfigError::WdkVersionStringFormatError`] if the /// version string provided is ill-formed. /// /// # Panics @@ -355,7 +261,7 @@ pub fn get_wdk_version_number + ToString + ?Sized>( version_string: &S, ) -> Result { if !validate_wdk_version_format(version_string) { - return Err(ConfigError::WDKVersionStringFormatError { + return Err(ConfigError::WdkVersionStringFormatError { version: version_string.to_string(), }); } @@ -368,67 +274,173 @@ pub fn get_wdk_version_number + ToString + ?Sized>( Ok((*version_substring).to_string()) } +/// Read a string value from a registry key +/// +/// # Arguments +/// +/// * `key_handle` - a [`windows::Win32::System::Registry::HKEY`] to the base +/// key +/// * `sub_key` - a [`windows::core::PCSTR`] that is the path of a registry key +/// relative to the `key_handle` argument +/// * `value` - a [`windows::core::PCSTR`] that is the name of the string +/// registry value to read +/// +/// # Panics +/// +/// Panics if read value isn't valid UTF-8 or if the opened regkey could not be +/// closed +fn read_registry_key_string_value( + key_handle: HKEY, + sub_key: PCSTR, + value: PCSTR, +) -> Option { + let mut opened_key_handle = HKEY::default(); + let mut len = 0; + if + // SAFETY: `&mut opened_key_handle` is coerced to a &raw mut, so the address passed as the + // argument is always valid. `&mut opened_key_handle` is coerced to a pointer of the correct + // type. + unsafe { RegOpenKeyExA(key_handle, sub_key, 0, KEY_READ, &mut opened_key_handle) }.is_ok() { + if + // SAFETY: `opened_key_handle` is valid key opened with the `KEY_QUERY_VALUE` access right + // (included in `KEY_READ`). `&mut len` is coerced to a &raw mut, so the address passed as + // the argument is always valid. `&mut len` is coerced to a pointer of the correct + // type. + unsafe { + RegGetValueA( + opened_key_handle, + None, + value, + RRF_RT_REG_SZ, + None, + None, + Some(&mut len), + ) + } + .is_ok() + { + let mut buffer = vec![0u8; len as usize]; + if + // SAFETY: `opened_key_handle` is valid key opened with the `KEY_QUERY_VALUE` access + // right (included in `KEY_READ`). `&mut buffer` is coerced to a &raw mut, + // so the address passed as the argument is always valid. `&mut buffer` is + // coerced to a pointer of the correct type. `&mut len` is coerced to a &raw + // mut, so the address passed as the argument is always valid. `&mut len` is + // coerced to a pointer of the correct type. + unsafe { + RegGetValueA( + opened_key_handle, + None, + value, + RRF_RT_REG_SZ, + None, + Some(buffer.as_mut_ptr().cast()), + Some(&mut len), + ) + } + .is_ok() + { + // SAFETY: `opened_key_handle` is valid opened key that was opened by + // `RegOpenKeyExA` + unsafe { RegCloseKey(opened_key_handle) } + .ok() + .expect("opened_key_handle should be successfully closed"); + return Some( + CStr::from_bytes_with_nul(&buffer[..len as usize]) + .expect( + "RegGetValueA should always return a null terminated string. The read \ + string (REG_SZ) from the registry should not contain any interior \ + nulls.", + ) + .to_str() + .expect("Registry value should be parseable as UTF8") + .to_string(), + ); + } + } + + // SAFETY: `opened_key_handle` is valid opened key that was opened by + // `RegOpenKeyExA` + unsafe { RegCloseKey(opened_key_handle) } + .ok() + .expect("opened_key_handle should be successfully closed"); + } + None +} + #[cfg(test)] mod tests { - use windows::Win32::UI::Shell::{FOLDERID_ProgramFiles, SHGetKnownFolderPath, KF_FLAG_DEFAULT}; - use super::*; - #[test] - fn strip_prefix_successfully() -> Result<(), StripExtendedPathPrefixError> { - assert_eq!( - PathBuf::from(r"\\?\C:\Program Files") - .strip_extended_length_path_prefix()? - .to_str(), - Some(r"C:\Program Files") - ); - Ok(()) - } + mod strip_extended_length_path_prefix { + use super::*; - #[test] - fn empty_path() { - assert_eq!( - PathBuf::from("").strip_extended_length_path_prefix(), - Err(StripExtendedPathPrefixError::EmptyPath) - ); - } + #[test] + fn strip_prefix_successfully() -> Result<(), StripExtendedPathPrefixError> { + assert_eq!( + PathBuf::from(r"\\?\C:\Program Files") + .strip_extended_length_path_prefix()? + .to_str(), + Some(r"C:\Program Files") + ); + Ok(()) + } - #[test] - fn path_too_short() { - assert_eq!( - PathBuf::from(r"C:\").strip_extended_length_path_prefix(), - Err(StripExtendedPathPrefixError::NoExtendedPathPrefix) - ); - } + #[test] + fn empty_path() { + assert_eq!( + PathBuf::from("").strip_extended_length_path_prefix(), + Err(StripExtendedPathPrefixError::EmptyPath) + ); + } - #[test] - fn no_prefix_to_strip() { - assert_eq!( - PathBuf::from(r"C:\Program Files").strip_extended_length_path_prefix(), - Err(StripExtendedPathPrefixError::NoExtendedPathPrefix) - ); + #[test] + fn path_too_short() { + assert_eq!( + PathBuf::from(r"C:\").strip_extended_length_path_prefix(), + Err(StripExtendedPathPrefixError::NoExtendedPathPrefix) + ); + } + + #[test] + fn no_prefix_to_strip() { + assert_eq!( + PathBuf::from(r"C:\Program Files").strip_extended_length_path_prefix(), + Err(StripExtendedPathPrefixError::NoExtendedPathPrefix) + ); + } } - #[test] - fn read_reg_key_programfilesdir() { - let program_files_dir = - // SAFETY: FOLDERID_ProgramFiles is a constant from the windows crate, so the pointer (resulting from its reference being coerced) is always valid to be dereferenced - unsafe { SHGetKnownFolderPath(&FOLDERID_ProgramFiles, KF_FLAG_DEFAULT, None) } - .expect("Program Files Folder should always resolve via SHGetKnownFolderPath."); + mod read_registry_key_string_value { + use windows::Win32::UI::Shell::{ + FOLDERID_ProgramFiles, + SHGetKnownFolderPath, + KF_FLAG_DEFAULT, + }; - assert_eq!( - read_registry_key_string_value( - HKEY_LOCAL_MACHINE, - s!(r"SOFTWARE\Microsoft\Windows\CurrentVersion"), - s!("ProgramFilesDir") - ), - Some( - // SAFETY: program_files_dir pointer stays valid for reads up until and including - // its terminating null - unsafe { program_files_dir.to_string() } - .expect("Path resolved from FOLDERID_ProgramFiles should be valid UTF16.") - ) - ); + use super::*; + + #[test] + fn read_reg_key_programfilesdir() { + let program_files_dir = + // SAFETY: FOLDERID_ProgramFiles is a constant from the windows crate, so the pointer (resulting from its reference being coerced) is always valid to be dereferenced + unsafe { SHGetKnownFolderPath(&FOLDERID_ProgramFiles, KF_FLAG_DEFAULT, None) } + .expect("Program Files Folder should always resolve via SHGetKnownFolderPath."); + + assert_eq!( + read_registry_key_string_value( + HKEY_LOCAL_MACHINE, + s!(r"SOFTWARE\Microsoft\Windows\CurrentVersion"), + s!("ProgramFilesDir") + ), + Some( + // SAFETY: program_files_dir pointer stays valid for reads up until and + // including its terminating null + unsafe { program_files_dir.to_string() } + .expect("Path resolved from FOLDERID_ProgramFiles should be valid UTF16.") + ) + ); + } } #[test] diff --git a/crates/wdk-macros/Cargo.toml b/crates/wdk-macros/Cargo.toml index 8a35f854..7825d740 100644 --- a/crates/wdk-macros/Cargo.toml +++ b/crates/wdk-macros/Cargo.toml @@ -1,9 +1,8 @@ -# Avoid using workspace package metadata due to: https://github.com/eupn/macrotest/issues/95 or https://github.com/eupn/macrotest/issues/94 [package] edition = "2021" name = "wdk-macros" -version = "0.2.0" -description = "A collection of macros that help make it easier to interact with wdk-sys's direct bindings" +version = "0.2.0" # This version should stay in sync with the wdk-sys version +description = "A collection of macros that help make it easier to interact with wdk-sys's direct bindings. This should not be directly consumed, and should be instead consumed via the wdk-sys crate." repository.workspace = true readme.workspace = true license.workspace = true @@ -19,31 +18,14 @@ categories = [ proc-macro = true [dependencies] -cargo_metadata = "0.18.1" -itertools = "0.12.1" -proc-macro2 = "1.0.82" -quote = "1.0.35" -scratch = "1.0" -syn = { version = "2.0.58", features = ["full"] } +itertools.workspace = true +proc-macro2.workspace = true +quote.workspace = true +syn = { workspace = true, features = ["full", "extra-traits"] } [dev-dependencies] -wdk-sys.workspace = true -fs4 = { version = "0.8.2", features = ["sync"] } -pathdiff = "0.2.0" -lazy_static = "1.4.0" -macrotest = "1.0.12" -owo-colors = "4.0.0" -paste = "1.0.15" -pretty_assertions = "1.4.0" -rustversion = "1.0.15" -syn = { version = "2.0.58", features = ["extra-traits"] } -trybuild = "1.0.91" - -[package.metadata.cargo-udeps.ignore] -development = [ - # macrotest and trybuild use dev-dependencies in when compiling their respective tests - "wdk-sys", -] +pretty_assertions.workspace = true +syn.workspace = true [features] default = [] diff --git a/crates/wdk-macros/src/lib.rs b/crates/wdk-macros/src/lib.rs index 6ad1600a..ddc899a7 100644 --- a/crates/wdk-macros/src/lib.rs +++ b/crates/wdk-macros/src/lib.rs @@ -4,13 +4,8 @@ //! A collection of macros that help make it easier to interact with //! [`wdk-sys`]'s direct bindings to the Windows Driver Kit (WDK). -use std::{ - io::{BufReader, Read}, - path::PathBuf, - process::{Command, Stdio}, -}; +use std::path::PathBuf; -use cargo_metadata::{Message, MetadataCommand, PackageId}; use itertools::Itertools; use proc_macro::TokenStream; use proc_macro2::{Span, TokenStream as TokenStream2}; @@ -32,6 +27,7 @@ use syn::{ Ident, Item, ItemType, + LitStr, Path, PathArguments, PathSegment, @@ -43,49 +39,14 @@ use syn::{ Type, TypeBareFn, TypePath, - TypePtr, }; -/// A procedural macro that allows WDF functions to be called by name. -/// -/// This function parses the name of the WDF function, finds it function pointer -/// from the WDF function table, and then calls it with the arguments passed to -/// it -/// -/// # Safety -/// Function arguments must abide by any rules outlined in the WDF -/// documentation. This macro does not perform any validation of the arguments -/// passed to it., beyond type validation. -/// -/// # Examples -/// -/// ```rust, no_run -/// use wdk_sys::*; +/// A procedural macro that allows WDF functions to be called by name. This +/// macro is only intended to be used in the `wdk-sys` crate. Users wanting to +/// call WDF functions should use the macro in `wdk-sys`. /// -/// #[export_name = "DriverEntry"] -/// pub extern "system" fn driver_entry( -/// driver: &mut DRIVER_OBJECT, -/// registry_path: PCUNICODE_STRING, -/// ) -> NTSTATUS { -/// let mut driver_config = WDF_DRIVER_CONFIG { -/// Size: core::mem::size_of::() as ULONG, -/// ..WDF_DRIVER_CONFIG::default() -/// }; -/// let driver_handle_output = WDF_NO_HANDLE as *mut WDFDRIVER; -/// -/// unsafe { -/// wdk_macros::call_unsafe_wdf_function_binding!( -/// WdfDriverCreate, -/// driver as PDRIVER_OBJECT, -/// registry_path, -/// WDF_NO_OBJECT_ATTRIBUTES, -/// &mut driver_config, -/// driver_handle_output, -/// ) -/// } -/// } -/// ``` -#[allow(clippy::unnecessary_safety_doc)] +/// This macro differs from the one in [`wdk-sys`] in that it must pass in the +/// generated types from `wdk-sys` as an arggument to the macro. #[proc_macro] pub fn call_unsafe_wdf_function_binding(input_tokens: TokenStream) -> TokenStream { call_unsafe_wdf_function_binding_impl(TokenStream2::from(input_tokens)).into() @@ -101,6 +62,8 @@ trait StringExt { /// `call_unsafe_wdf_function_binding` macro #[derive(Debug, PartialEq)] struct Inputs { + /// Path to file where generated type information resides. + types_path: LitStr, /// The name of the WDF function to call. This matches the name of the /// function in C/C++. wdf_function_identifier: Ident, @@ -170,11 +133,15 @@ impl StringExt for String { impl Parse for Inputs { fn parse(input: ParseStream) -> Result { + let types_path = input.parse::()?; + + input.parse::()?; let c_wdf_function_identifier = input.parse::()?; // Support WDF apis with no arguments if input.is_empty() { return Ok(Self { + types_path, wdf_function_identifier: c_wdf_function_identifier, wdf_function_arguments: Punctuated::new(), }); @@ -184,6 +151,7 @@ impl Parse for Inputs { let wdf_function_arguments = input.parse_terminated(Expr::parse, Token![,])?; Ok(Self { + types_path, wdf_function_identifier: c_wdf_function_identifier, wdf_function_arguments, }) @@ -202,8 +170,10 @@ impl Inputs { wdf_function_identifier = self.wdf_function_identifier, span = self.wdf_function_identifier.span() ); + + let types_ast = parse_types_ast(&self.types_path)?; let (parameters, return_type) = - generate_parameters_and_return_type(&function_pointer_type)?; + generate_parameters_and_return_type(&types_ast, &function_pointer_type)?; let parameter_identifiers = parameters .iter() .cloned() @@ -311,8 +281,11 @@ impl IntermediateOutputASTFragments { quote! { { + use wdk_sys::*; + #conditional_must_use_attribute #[inline(always)] + #[allow(non_snake_case)] #inline_wdf_fn_signature { #(#inline_wdf_fn_body_statments)* } @@ -339,9 +312,49 @@ fn call_unsafe_wdf_function_binding_impl(input_tokens: TokenStream2) -> TokenStr .assemble_final_output() } +fn parse_types_ast(path: &LitStr) -> Result { + let types_path = PathBuf::from(path.value()); + let types_path = match types_path.canonicalize() { + Ok(types_path) => types_path, + Err(err) => { + return Err(Error::new( + path.span(), + format!( + "Failed to canonicalize types_path ({}): {err}", + types_path.display() + ), + )); + } + }; + + let types_file_contents = match std::fs::read_to_string(&types_path) { + Ok(contents) => contents, + Err(err) => { + return Err(Error::new( + path.span(), + format!( + "Failed to read wdk-sys types information from {}: {err}", + types_path.display(), + ), + )); + } + }; + + match parse_file(&types_file_contents) { + Ok(wdk_sys_types_rs_abstract_syntax_tree) => Ok(wdk_sys_types_rs_abstract_syntax_tree), + Err(err) => Err(Error::new( + path.span(), + format!( + "Failed to parse wdk-sys types information from {} into AST: {err}", + types_path.display(), + ), + )), + } +} + /// Generate the function parameters and return type corresponding to the -/// function signature of the `function_pointer_type` type alias in the AST for -/// types.rs +/// function signature of the `function_pointer_type` type alias found in +/// bindgen-generated types information /// /// # Examples /// @@ -358,168 +371,15 @@ fn call_unsafe_wdf_function_binding_impl(input_tokens: TokenStream2) -> TokenStr /// /// and return type as the [`ReturnType`] representation of `wdk_sys::NTSTATUS` fn generate_parameters_and_return_type( + types_ast: &File, function_pointer_type: &Ident, ) -> Result<(Punctuated, ReturnType)> { - let types_rs_ast = get_type_rs_ast()?; - let type_alias_definition = find_type_alias_definition(&types_rs_ast, function_pointer_type)?; + let type_alias_definition = find_type_alias_definition(types_ast, function_pointer_type)?; let fn_pointer_definition = extract_fn_pointer_definition(type_alias_definition, function_pointer_type.span())?; parse_fn_pointer_definition(fn_pointer_definition, function_pointer_type.span()) } -/// Finds the `types.rs` file generated by `wdk-sys` and parses it into an AST -fn get_type_rs_ast() -> Result { - let types_rs_path = find_wdk_sys_out_dir()?.join("types.rs"); - let types_rs_contents = match std::fs::read_to_string(&types_rs_path) { - Ok(contents) => contents, - Err(err) => { - return Err(Error::new( - Span::call_site(), - format!( - "Failed to read wdk-sys types.rs at {}: {}", - types_rs_path.display(), - err - ), - )); - } - }; - - match parse_file(&types_rs_contents) { - Ok(wdk_sys_types_rs_abstract_syntax_tree) => Ok(wdk_sys_types_rs_abstract_syntax_tree), - Err(err) => Err(Error::new( - Span::call_site(), - format!( - "Failed to parse wdk-sys types.rs into AST at {}: {}", - types_rs_path.display(), - err - ), - )), - } -} - -/// Find the `OUT_DIR` of wdk-sys crate by running `cargo check` with -/// `--message-format=json` and parsing its output using [`cargo_metadata`] -fn find_wdk_sys_out_dir() -> Result { - let scratch_path = scratch::path(env!("CARGO_PKG_NAME")); - let mut cargo_check_process_handle = match Command::new("cargo") - .args([ - "check", - "--message-format=json", - "--package", - "wdk-sys", - // must have a seperate target directory to prevent deadlock from cargo holding a - // file lock on build output directory since this proc_macro causes - // cargo build to invoke cargo check - "--target-dir", - scratch_path - .as_os_str() - .to_str() - .expect("scratch::path should be valid UTF-8"), - ]) - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) - .spawn() - { - Ok(process) => process, - Err(err) => { - return Err(Error::new( - Span::call_site(), - format!("Failed to start cargo check process successfully: {err}"), - )); - } - }; - - let wdk_sys_pkg_id = find_wdk_sys_pkg_id()?; - let wdk_sys_out_dir = cargo_metadata::Message::parse_stream(BufReader::new( - cargo_check_process_handle - .stdout - .take() - .expect("cargo check process should have valid stdout handle"), - )) - .filter_map(|message| { - if let Ok(Message::BuildScriptExecuted(build_script_message)) = message { - if build_script_message.package_id == wdk_sys_pkg_id { - return Some(build_script_message.out_dir); - } - } - None - }) - .collect::>(); - let wdk_sys_out_dir = match wdk_sys_out_dir.len() { - 1 => &wdk_sys_out_dir[0], - _ => { - return Err(Error::new( - Span::call_site(), - format!( - "Expected exactly one instance of wdk-sys in dependency graph when running \ - `cargo check`, found {}", - wdk_sys_out_dir.len() - ), - )); - } - }; - match cargo_check_process_handle.wait() { - Ok(exit_status) => { - if !exit_status.success() { - let mut stderr_output = String::new(); - BufReader::new( - cargo_check_process_handle - .stderr - .take() - .expect("cargo check process should have valid stderr handle"), - ) - .read_to_string(&mut stderr_output) - .expect("cargo check process' stderr should be valid UTF-8"); - return Err(Error::new( - Span::call_site(), - format!( - "cargo check failed to execute to get OUT_DIR for wdk-sys: \ - \n{stderr_output}" - ), - )); - } - } - Err(err) => { - return Err(Error::new( - Span::call_site(), - format!("cargo check process handle should sucessfully be waited on: {err}"), - )); - } - } - - Ok(wdk_sys_out_dir.to_owned().into()) -} - -/// find wdk-sys `package_id`. WDR places a limitation that only one instance of -/// wdk-sys is allowed in the dependency graph -fn find_wdk_sys_pkg_id() -> Result { - let cargo_metadata_packages_list = match MetadataCommand::new().exec() { - Ok(metadata) => metadata.packages, - Err(err) => { - return Err(Error::new( - Span::call_site(), - format!("cargo metadata failed to run successfully: {err}"), - )); - } - }; - let wdk_sys_package_matches = cargo_metadata_packages_list - .iter() - .filter(|package| package.name == "wdk-sys") - .collect::>(); - - if wdk_sys_package_matches.len() != 1 { - return Err(Error::new( - Span::call_site(), - format!( - "Expected exactly one instance of wdk-sys in dependency graph when running `cargo \ - metadata`, found {}", - wdk_sys_package_matches.len() - ), - )); - } - Ok(wdk_sys_package_matches[0].id.clone()) -} - /// Find type alias declaration and definition that matches the Ident of /// `function_pointer_type` in `syn::File` AST /// @@ -541,10 +401,10 @@ fn find_wdk_sys_pkg_id() -> Result { /// >; /// ``` fn find_type_alias_definition<'a>( - file_ast: &'a File, + types_ast: &'a File, function_pointer_type: &Ident, ) -> Result<&'a ItemType> { - file_ast + types_ast .items .iter() .find_map(|item| { @@ -646,7 +506,7 @@ fn parse_fn_pointer_definition( ) -> Result<(Punctuated, ReturnType)> { let bare_fn_type = extract_bare_fn_type(fn_pointer_typepath, error_span)?; let fn_parameters = compute_fn_parameters(bare_fn_type, error_span)?; - let return_type = compute_return_type(bare_fn_type, error_span)?; + let return_type = compute_return_type(bare_fn_type); Ok((fn_parameters, return_type)) } @@ -728,8 +588,7 @@ fn extract_bare_fn_type(fn_pointer_typepath: &TypePath, error_span: Span) -> Res Ok(bare_fn_type) } -/// Compute the function parameters based on the function definition. Prepends -/// `wdk_sys::` to the parameter types +/// Compute the function parameters based on the function definition /// /// # Examples /// @@ -795,66 +654,13 @@ fn compute_fn_parameters( )); } - // discard the PWDF_DRIVER_GLOBALS parameter and prepend wdk_sys to the rest of - // the parameters - let parameters = bare_fn_type - .inputs - .iter() - .skip(1) - .cloned() - .map(|mut bare_fn_arg| { - let parameter_type_path_segments: &mut Punctuated = - match &mut bare_fn_arg.ty { - Type::Path(TypePath { - path: - Path { - ref mut segments, .. - }, - .. - }) => segments, - - Type::Ptr(TypePtr { elem: ty, .. }) => { - let Type::Path(TypePath { - path: - Path { - ref mut segments, .. - }, - .. - }) = **ty - else { - return Err(Error::new( - error_span, - format!( - "Failed to parse PathSegments out of TypePtr function \ - parameter:\n{bare_fn_arg:#?}" - ), - )); - }; - segments - } - - _ => { - return Err(Error::new( - error_span, - format!( - "Unexpected Type encountered when parsing function \ - parameter:\n{bare_fn_arg:#?}", - ), - )); - } - }; - - parameter_type_path_segments - .insert(0, syn::PathSegment::from(format_ident!("wdk_sys"))); - Ok(bare_fn_arg) - }) - .collect::>()?; - - Ok(parameters) + Ok( + // discard the PWDF_DRIVER_GLOBALS parameter + bare_fn_type.inputs.iter().skip(1).cloned().collect(), + ) } -/// Compute the return type based on the function defintion. Prepends the return -/// type with `wdk_sys::` +/// Compute the return type based on the function defintion /// /// # Examples /// @@ -872,42 +678,8 @@ fn compute_fn_parameters( /// ``` /// /// would return the [`ReturnType`] representation of `wdk_sys::NTSTATUS` -fn compute_return_type(bare_fn_type: &syn::TypeBareFn, error_span: Span) -> Result { - let return_type = match &bare_fn_type.output { - ReturnType::Default => ReturnType::Default, - ReturnType::Type(right_arrow_token, ty) => ReturnType::Type( - *right_arrow_token, - Box::new(Type::Path(TypePath { - qself: None, - path: Path { - leading_colon: None, - segments: { - // prepend wdk_sys to existing TypePath - let Type::Path(TypePath { - path: Path { ref segments, .. }, - .. - }) = **ty - else { - return Err(Error::new( - error_span, - format!("Failed to parse ReturnType TypePath:\n{ty:#?}"), - )); - }; - let mut segments = segments.clone(); - segments.insert( - 0, - PathSegment { - ident: format_ident!("wdk_sys"), - arguments: PathArguments::None, - }, - ); - segments - }, - }, - })), - ), - }; - Ok(return_type) +fn compute_return_type(bare_fn_type: &syn::TypeBareFn) -> ReturnType { + bare_fn_type.output.clone() } /// Generate the `#[must_use]` attribute if the return type is not `()` @@ -1018,8 +790,9 @@ mod tests { #[test] fn valid_input() { - let input_tokens = quote! { WdfDriverCreate, driver, registry_path, WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output }; + let input_tokens = quote! { "/path/to/generated/types/file.rs", WdfDriverCreate, driver, registry_path, WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output }; let expected = Inputs { + types_path: parse_quote! { "/path/to/generated/types/file.rs" }, wdf_function_identifier: format_ident!("WdfDriverCreate"), wdf_function_arguments: parse_quote! { driver, @@ -1035,8 +808,9 @@ mod tests { #[test] fn valid_input_with_trailing_comma() { - let input_tokens = quote! { WdfDriverCreate, driver, registry_path, WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output, }; + let input_tokens = quote! { "/path/to/generated/types/file.rs" , WdfDriverCreate, driver, registry_path, WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output, }; let expected = Inputs { + types_path: parse_quote! { "/path/to/generated/types/file.rs" }, wdf_function_identifier: format_ident!("WdfDriverCreate"), wdf_function_arguments: parse_quote! { driver, @@ -1052,8 +826,10 @@ mod tests { #[test] fn wdf_function_with_no_arguments() { - let input_tokens = quote! { WdfVerifierDbgBreakPoint }; + let input_tokens = + quote! { "/path/to/generated/types/file.rs", WdfVerifierDbgBreakPoint }; let expected = Inputs { + types_path: parse_quote! { "/path/to/generated/types/file.rs" }, wdf_function_identifier: format_ident!("WdfVerifierDbgBreakPoint"), wdf_function_arguments: Punctuated::new(), }; @@ -1063,8 +839,10 @@ mod tests { #[test] fn wdf_function_with_no_arguments_and_trailing_comma() { - let input_tokens = quote! { WdfVerifierDbgBreakPoint, }; + let input_tokens = + quote! { "/path/to/generated/types/file.rs", WdfVerifierDbgBreakPoint, }; let expected = Inputs { + types_path: parse_quote! { "/path/to/generated/types/file.rs" }, wdf_function_identifier: format_ident!("WdfVerifierDbgBreakPoint"), wdf_function_arguments: Punctuated::new(), }; @@ -1074,7 +852,7 @@ mod tests { #[test] fn invalid_ident() { - let input_tokens = quote! { 123InvalidIdent, driver, registry_path, WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output, }; + let input_tokens = quote! { "/path/to/generated/types/file.rs", 23InvalidIdent, driver, registry_path, WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output, }; let expected = Error::new(Span::call_site(), "expected identifier"); pretty_assert_eq!( @@ -1090,6 +868,7 @@ mod tests { #[test] fn valid_input() { let inputs = Inputs { + types_path: parse_quote! { "tests/unit-tests-input/generated-types.rs" }, wdf_function_identifier: format_ident!("WdfDriverCreate"), wdf_function_arguments: parse_quote! { driver, @@ -1103,11 +882,11 @@ mod tests { function_pointer_type: format_ident!("PFN_WDFDRIVERCREATE"), function_table_index: format_ident!("WdfDriverCreateTableIndex"), parameters: parse_quote! { - DriverObject: wdk_sys::PDRIVER_OBJECT, - RegistryPath: wdk_sys::PCUNICODE_STRING, - DriverAttributes: wdk_sys::PWDF_OBJECT_ATTRIBUTES, - DriverConfig: wdk_sys::PWDF_DRIVER_CONFIG, - Driver: *mut wdk_sys::WDFDRIVER + DriverObject: PDRIVER_OBJECT, + RegistryPath: PCUNICODE_STRING, + DriverAttributes: PWDF_OBJECT_ATTRIBUTES, + DriverConfig: PWDF_DRIVER_CONFIG, + Driver: *mut WDFDRIVER }, parameter_identifiers: parse_quote! { DriverObject, @@ -1116,7 +895,7 @@ mod tests { DriverConfig, Driver }, - return_type: parse_quote! { -> wdk_sys::NTSTATUS }, + return_type: parse_quote! { -> NTSTATUS }, arguments: parse_quote! { driver, registry_path, @@ -1133,6 +912,7 @@ mod tests { #[test] fn valid_input_with_no_arguments() { let inputs = Inputs { + types_path: parse_quote! { "tests/unit-tests-input/generated-types.rs" }, wdf_function_identifier: format_ident!("WdfVerifierDbgBreakPoint"), wdf_function_arguments: Punctuated::new(), }; @@ -1156,16 +936,23 @@ mod tests { #[test] fn valid_input() { + // This is a snippet of a bindgen-generated file containing types information + // used by tests for [`wdk_macros::call_unsafe_wdf_function_binding!`] + let types_ast = parse_quote! { + pub type PFN_WDFIOQUEUEPURGESYNCHRONOUSLY = ::core::option::Option< + unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Queue: WDFQUEUE), + >; + }; let function_pointer_type = format_ident!("PFN_WDFIOQUEUEPURGESYNCHRONOUSLY"); let expected = ( parse_quote! { - Queue: wdk_sys::WDFQUEUE + Queue: WDFQUEUE }, ReturnType::Default, ); pretty_assert_eq!( - generate_parameters_and_return_type(&function_pointer_type).unwrap(), + generate_parameters_and_return_type(&types_ast, &function_pointer_type).unwrap(), expected ); } @@ -1176,8 +963,9 @@ mod tests { #[test] fn valid_input() { - // This is just a snippet of a generated types.rs file - let types_rs_ast = parse_quote! { + // This is a snippet of a bindgen-generated file containing types information + // used by tests for [`wdk_macros::call_unsafe_wdf_function_binding!`] + let types_ast = parse_quote! { pub type WDF_DRIVER_GLOBALS = _WDF_DRIVER_GLOBALS; pub type PWDF_DRIVER_GLOBALS = *mut _WDF_DRIVER_GLOBALS; pub mod _WDFFUNCENUM { @@ -1208,7 +996,7 @@ mod tests { }; pretty_assert_eq!( - find_type_alias_definition(&types_rs_ast, &function_pointer_type).unwrap(), + find_type_alias_definition(&types_ast, &function_pointer_type).unwrap(), &expected ); } @@ -1284,15 +1072,15 @@ mod tests { }; let expected = ( parse_quote! { - DriverObject: wdk_sys::PDRIVER_OBJECT, - RegistryPath: wdk_sys::PCUNICODE_STRING, - DriverAttributes: wdk_sys::PWDF_OBJECT_ATTRIBUTES, - DriverConfig: wdk_sys::PWDF_DRIVER_CONFIG, - Driver: *mut wdk_sys::WDFDRIVER + DriverObject: PDRIVER_OBJECT, + RegistryPath: PCUNICODE_STRING, + DriverAttributes: PWDF_OBJECT_ATTRIBUTES, + DriverConfig: PWDF_DRIVER_CONFIG, + Driver: *mut WDFDRIVER }, ReturnType::Type( Token![->](Span::call_site()), - Box::new(Type::Path(parse_quote! { wdk_sys::NTSTATUS })), + Box::new(Type::Path(parse_quote! { NTSTATUS })), ), ); @@ -1370,11 +1158,11 @@ mod tests { ) -> NTSTATUS }; let expected = parse_quote! { - DriverObject: wdk_sys::PDRIVER_OBJECT, - RegistryPath: wdk_sys::PCUNICODE_STRING, - DriverAttributes: wdk_sys::PWDF_OBJECT_ATTRIBUTES, - DriverConfig: wdk_sys::PWDF_DRIVER_CONFIG, - Driver: *mut wdk_sys::WDFDRIVER + DriverObject: PDRIVER_OBJECT, + RegistryPath: PCUNICODE_STRING, + DriverAttributes: PWDF_OBJECT_ATTRIBUTES, + DriverConfig: PWDF_DRIVER_CONFIG, + Driver: *mut WDFDRIVER }; pretty_assert_eq!( @@ -1416,13 +1204,10 @@ mod tests { }; let expected = ReturnType::Type( Token![->](Span::call_site()), - Box::new(Type::Path(parse_quote! { wdk_sys::NTSTATUS })), + Box::new(Type::Path(parse_quote! { NTSTATUS })), ); - pretty_assert_eq!( - compute_return_type(&bare_fn_type, Span::call_site()).unwrap(), - expected - ); + pretty_assert_eq!(compute_return_type(&bare_fn_type), expected); } #[test] @@ -1436,10 +1221,7 @@ mod tests { }; let expected = ReturnType::Default; - pretty_assert_eq!( - compute_return_type(&bare_fn_type, Span::call_site()).unwrap(), - expected - ); + pretty_assert_eq!(compute_return_type(&bare_fn_type), expected); } } diff --git a/crates/wdk-macros/tests/inputs/macrotest/wdf_device_create.rs b/crates/wdk-macros/tests/inputs/macrotest/wdf_device_create.rs deleted file mode 100644 index a112d726..00000000 --- a/crates/wdk-macros/tests/inputs/macrotest/wdf_device_create.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation -// License: MIT OR Apache-2.0 -#![no_main] -#![deny(warnings)] - -use wdk_sys::*; - -extern "C" fn evt_driver_device_add( - _driver: WDFDRIVER, - mut device_init: *mut WDFDEVICE_INIT, -) -> NTSTATUS { - let mut device_handle_output: WDFDEVICE = WDF_NO_HANDLE.cast(); - - unsafe { - wdk_macros::call_unsafe_wdf_function_binding!( - WdfDeviceCreate, - &mut device_init, - WDF_NO_OBJECT_ATTRIBUTES, - &mut device_handle_output, - ) - } -} diff --git a/crates/wdk-macros/tests/inputs/macrotest/wdf_driver_create.rs b/crates/wdk-macros/tests/inputs/macrotest/wdf_driver_create.rs deleted file mode 100644 index 5ad59f6e..00000000 --- a/crates/wdk-macros/tests/inputs/macrotest/wdf_driver_create.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation -// License: MIT OR Apache-2.0 -#![no_main] -#![deny(warnings)] - -use wdk_sys::*; - -#[export_name = "DriverEntry"]// WDF expects a symbol with the name DriverEntry -pub extern "system" fn driver_entry( - driver: &mut DRIVER_OBJECT, - registry_path: PCUNICODE_STRING, -) -> NTSTATUS { - let mut driver_config = WDF_DRIVER_CONFIG { - Size: core::mem::size_of::() as ULONG, - ..WDF_DRIVER_CONFIG::default() - }; - let driver_handle_output = WDF_NO_HANDLE as *mut WDFDRIVER; - - unsafe { - wdk_macros::call_unsafe_wdf_function_binding!( - WdfDriverCreate, - driver as PDRIVER_OBJECT, - registry_path, - WDF_NO_OBJECT_ATTRIBUTES, - &mut driver_config, - driver_handle_output, - ) - } -} diff --git a/crates/wdk-macros/tests/inputs/macrotest/wdf_verifier_dbg_break_point.rs b/crates/wdk-macros/tests/inputs/macrotest/wdf_verifier_dbg_break_point.rs deleted file mode 100644 index fbf7b580..00000000 --- a/crates/wdk-macros/tests/inputs/macrotest/wdf_verifier_dbg_break_point.rs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation -// License: MIT OR Apache-2.0 -#![no_main] -#![deny(warnings)] - -#[allow(unused_imports)] // used by code generated by call_unsafe_wdf_function_binding -use wdk_sys::*; - -fn foo() { - unsafe { wdk_macros::call_unsafe_wdf_function_binding!(WdfVerifierDbgBreakPoint) } -} diff --git a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_api_that_does_not_exist.stderr b/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_api_that_does_not_exist.stderr deleted file mode 100644 index 4759c378..00000000 --- a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_api_that_does_not_exist.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: Failed to find type alias definition for PFN_WDFAPITHATDOESNOTEXIST - --> tests/outputs/beta/trybuild/wdf_api_that_does_not_exist.rs - | - | WdfApiThatDoesNotExist, - | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.stderr b/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.stderr deleted file mode 100644 index 6bcf0ec5..00000000 --- a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error[E0061]: this function takes 5 arguments but 4 arguments were supplied - --> tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.rs - | - | / wdk_macros::call_unsafe_wdf_function_binding!( - | | WdfDriverCreate, - | | driver as PDRIVER_OBJECT, - | | registry_path, -... | - | | &mut driver_config, - | | ------------------ an argument of type `*mut _WDF_OBJECT_ATTRIBUTES` is missing - | | driver_handle_output, - | | ) - | |_________^ - | -note: function defined here - --> tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.rs - | - | / wdk_macros::call_unsafe_wdf_function_binding!( - | | WdfDriverCreate, - | | driver as PDRIVER_OBJECT, - | | registry_path, -... | - | | driver_handle_output, - | | ) - | |_________^ - | |_________| - | |_________| - | |_________| - | |_________| - | - = note: this error originates in the macro `wdk_macros::call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) -help: provide the argument - | -28 | )(driver as PDRIVER_OBJECT, registry_path, /* *mut _WDF_OBJECT_ATTRIBUTES */, &mut driver_config, driver_handle_output) - | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.stderr b/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.stderr deleted file mode 100644 index b275f134..00000000 --- a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.stderr +++ /dev/null @@ -1,37 +0,0 @@ -error[E0308]: arguments to this function are incorrect - --> tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.rs - | - | / wdk_macros::call_unsafe_wdf_function_binding!( - | | WdfDriverCreate, - | | driver as PDRIVER_OBJECT, - | | registry_path, - | | // The order of the next two arguments is swapped! - | | &mut driver_config, - | | ------------------ expected `*mut _WDF_OBJECT_ATTRIBUTES`, found `&mut _WDF_DRIVER_CONFIG` - | | WDF_NO_OBJECT_ATTRIBUTES, - | | ------------------------ expected `*mut _WDF_DRIVER_CONFIG`, found `*mut _WDF_OBJECT_ATTRIBUTES` - | | driver_handle_output, - | | ) - | |_________^ - | -note: function defined here - --> tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.rs - | - | / wdk_macros::call_unsafe_wdf_function_binding!( - | | WdfDriverCreate, - | | driver as PDRIVER_OBJECT, - | | registry_path, -... | - | | driver_handle_output, - | | ) - | |_________^ - | |_________| - | |_________| - | |_________| - | |_________| - | - = note: this error originates in the macro `wdk_macros::call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) -help: swap these arguments - | -28 | )(driver as PDRIVER_OBJECT, registry_path, WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output) - | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_api_that_does_not_exist.stderr b/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_api_that_does_not_exist.stderr deleted file mode 100644 index 54e0d700..00000000 --- a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_api_that_does_not_exist.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: Failed to find type alias definition for PFN_WDFAPITHATDOESNOTEXIST - --> tests/outputs/nightly/trybuild/wdf_api_that_does_not_exist.rs - | - | WdfApiThatDoesNotExist, - | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.stderr b/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.stderr deleted file mode 100644 index a394afdb..00000000 --- a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error[E0061]: this function takes 5 arguments but 4 arguments were supplied - --> tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.rs - | - | / wdk_macros::call_unsafe_wdf_function_binding!( - | | WdfDriverCreate, - | | driver as PDRIVER_OBJECT, - | | registry_path, -... | - | | &mut driver_config, - | | ------------------ an argument of type `*mut _WDF_OBJECT_ATTRIBUTES` is missing - | | driver_handle_output, - | | ) - | |_________^ - | -note: function defined here - --> tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.rs - | - | / wdk_macros::call_unsafe_wdf_function_binding!( - | | WdfDriverCreate, - | | driver as PDRIVER_OBJECT, - | | registry_path, -... | - | | driver_handle_output, - | | ) - | |_________^ - | |_________| - | |_________| - | |_________| - | |_________| - | - = note: this error originates in the macro `wdk_macros::call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) -help: provide the argument - | -28 | )(driver as PDRIVER_OBJECT, registry_path, /* *mut _WDF_OBJECT_ATTRIBUTES */, &mut driver_config, driver_handle_output) - | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.stderr b/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.stderr deleted file mode 100644 index 61c1bd51..00000000 --- a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.stderr +++ /dev/null @@ -1,37 +0,0 @@ -error[E0308]: arguments to this function are incorrect - --> tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.rs - | - | / wdk_macros::call_unsafe_wdf_function_binding!( - | | WdfDriverCreate, - | | driver as PDRIVER_OBJECT, - | | registry_path, - | | // The order of the next two arguments is swapped! - | | &mut driver_config, - | | ------------------ expected `*mut _WDF_OBJECT_ATTRIBUTES`, found `&mut _WDF_DRIVER_CONFIG` - | | WDF_NO_OBJECT_ATTRIBUTES, - | | ------------------------ expected `*mut _WDF_DRIVER_CONFIG`, found `*mut _WDF_OBJECT_ATTRIBUTES` - | | driver_handle_output, - | | ) - | |_________^ - | -note: function defined here - --> tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.rs - | - | / wdk_macros::call_unsafe_wdf_function_binding!( - | | WdfDriverCreate, - | | driver as PDRIVER_OBJECT, - | | registry_path, -... | - | | driver_handle_output, - | | ) - | |_________^ - | |_________| - | |_________| - | |_________| - | |_________| - | - = note: this error originates in the macro `wdk_macros::call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) -help: swap these arguments - | -28 | )(driver as PDRIVER_OBJECT, registry_path, WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output) - | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_api_that_does_not_exist.stderr b/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_api_that_does_not_exist.stderr deleted file mode 100644 index 9afb4cb6..00000000 --- a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_api_that_does_not_exist.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: Failed to find type alias definition for PFN_WDFAPITHATDOESNOTEXIST - --> tests/outputs/stable/trybuild/wdf_api_that_does_not_exist.rs - | - | WdfApiThatDoesNotExist, - | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.stderr b/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.stderr deleted file mode 100644 index 64d2d63b..00000000 --- a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error[E0061]: this function takes 5 arguments but 4 arguments were supplied - --> tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.rs - | - | / wdk_macros::call_unsafe_wdf_function_binding!( - | | WdfDriverCreate, - | | driver as PDRIVER_OBJECT, - | | registry_path, -... | - | | &mut driver_config, - | | ------------------ an argument of type `*mut _WDF_OBJECT_ATTRIBUTES` is missing - | | driver_handle_output, - | | ) - | |_________^ - | -note: function defined here - --> tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.rs - | - | / wdk_macros::call_unsafe_wdf_function_binding!( - | | WdfDriverCreate, - | | driver as PDRIVER_OBJECT, - | | registry_path, -... | - | | driver_handle_output, - | | ) - | |_________^ - | |_________| - | |_________| - | |_________| - | |_________| - | - = note: this error originates in the macro `wdk_macros::call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) -help: provide the argument - | -28 | )(driver as PDRIVER_OBJECT, registry_path, /* *mut _WDF_OBJECT_ATTRIBUTES */, &mut driver_config, driver_handle_output) - | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.stderr b/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.stderr deleted file mode 100644 index 88b06386..00000000 --- a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.stderr +++ /dev/null @@ -1,37 +0,0 @@ -error[E0308]: arguments to this function are incorrect - --> tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.rs - | - | / wdk_macros::call_unsafe_wdf_function_binding!( - | | WdfDriverCreate, - | | driver as PDRIVER_OBJECT, - | | registry_path, - | | // The order of the next two arguments is swapped! - | | &mut driver_config, - | | ------------------ expected `*mut _WDF_OBJECT_ATTRIBUTES`, found `&mut _WDF_DRIVER_CONFIG` - | | WDF_NO_OBJECT_ATTRIBUTES, - | | ------------------------ expected `*mut _WDF_DRIVER_CONFIG`, found `*mut _WDF_OBJECT_ATTRIBUTES` - | | driver_handle_output, - | | ) - | |_________^ - | -note: function defined here - --> tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.rs - | - | / wdk_macros::call_unsafe_wdf_function_binding!( - | | WdfDriverCreate, - | | driver as PDRIVER_OBJECT, - | | registry_path, -... | - | | driver_handle_output, - | | ) - | |_________^ - | |_________| - | |_________| - | |_________| - | |_________| - | - = note: this error originates in the macro `wdk_macros::call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) -help: swap these arguments - | -28 | )(driver as PDRIVER_OBJECT, registry_path, WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output) - | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/crates/wdk-macros/tests/unit-tests-input/generated-types.rs b/crates/wdk-macros/tests/unit-tests-input/generated-types.rs new file mode 100644 index 00000000..308f7c9c --- /dev/null +++ b/crates/wdk-macros/tests/unit-tests-input/generated-types.rs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! Snippet of a bindgen-generated file containing types information used by tests for [`wdk_macros::call_unsafe_wdf_function_binding!`] + +pub type PFN_WDFDRIVERCREATE = ::core::option::Option< + unsafe extern "C" fn( + DriverGlobals: PWDF_DRIVER_GLOBALS, + DriverObject: PDRIVER_OBJECT, + RegistryPath: PCUNICODE_STRING, + DriverAttributes: PWDF_OBJECT_ATTRIBUTES, + DriverConfig: PWDF_DRIVER_CONFIG, + Driver: *mut WDFDRIVER, + ) -> NTSTATUS, +>; + +pub type PFN_WDFVERIFIERDBGBREAKPOINT = ::core::option::Option< + unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS), +>; diff --git a/crates/wdk-sys/Cargo.toml b/crates/wdk-sys/Cargo.toml index 75010f8c..d911eace 100644 --- a/crates/wdk-sys/Cargo.toml +++ b/crates/wdk-sys/Cargo.toml @@ -1,7 +1,7 @@ [package] edition.workspace = true name = "wdk-sys" -version = "0.2.0" +version = "0.2.0" # This version should stay in sync with the wdk-macros version # Since the WDK links against many different dlls (that vary based off configuration), this crate sets the system library name to be "wdk". This name is only used by downstream build.rs scripts to consume metadata links = "wdk" description = "Direct bindings to APIs available in the Windows Development Kit (WDK)" @@ -17,16 +17,21 @@ categories = [ ] [build-dependencies] +anyhow.workspace = true bindgen.workspace = true +cargo_metadata.workspace = true +cc.workspace = true +lazy_static.workspace = true +serde_json.workspace = true +thiserror.workspace = true +tracing.workspace = true +tracing-subscriber = { workspace = true, features = ["env-filter"] } wdk-build.workspace = true -thiserror = "1.0.59" -tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } -anyhow = "1.0.82" [dependencies] +lazy_static = { workspace = true, features = ["spin_no_std"] } +rustversion.workspace = true wdk-macros.workspace = true -lazy_static = { version = "1.4.0", features = ["spin_no_std"] } -rustversion = "1.0.15" [features] default = [] @@ -67,3 +72,6 @@ missing_crate_level_docs = "warn" private_intra_doc_links = "warn" redundant_explicit_links = "warn" unescaped_backticks = "warn" + +[package.metadata.cargo-machete] +ignored = ["lazy_static"] # lazy_static is used in code generated by build.rs diff --git a/crates/wdk-sys/build.rs b/crates/wdk-sys/build.rs index 3721bf27..f0b37dd7 100644 --- a/crates/wdk-sys/build.rs +++ b/crates/wdk-sys/build.rs @@ -2,88 +2,158 @@ // License: MIT OR Apache-2.0 //! Build script for the `wdk-sys` crate. +//! +//! This parses the WDK configuration from metadata provided in the build tree, +//! and generates the relevant bindings to WDK APIs. use std::{ env, + io::Write, path::{Path, PathBuf}, - sync::Arc, - thread::{self, JoinHandle}, + thread, }; +use anyhow::Context; use bindgen::CodegenConfig; -use tracing_subscriber::{filter::LevelFilter, EnvFilter}; -use wdk_build::{BuilderExt, Config, ConfigError, DriverConfig, KMDFConfig}; - -// FIXME: feature gate the WDF version -// FIXME: check that the features are exclusive -// const KMDF_VERSIONS: &'static [&'static str] = &[ -// "1.9", "1.11", "1.13", "1.15", "1.17", "1.19", "1.21", "1.23", "1.25", -// "1.27", "1.31", "1.33", ]; -// const UMDF_VERSIONS: &'static [&'static str] = &[ -// "2.0", "2.15", "2.17", "2.19", "2.21", "2.23", "2.25", "2.27", "2.31", -// "2.33", ]; +use lazy_static::lazy_static; +use tracing::{info, info_span, Span}; +use tracing_subscriber::{ + filter::{LevelFilter, ParseError}, + EnvFilter, +}; +use wdk_build::{ + configure_wdk_library_build_and_then, + BuilderExt, + Config, + ConfigError, + DriverConfig, + KmdfConfig, + UmdfConfig, +}; -fn generate_constants(out_path: &Path, config: &Config) -> Result<(), ConfigError> { - Ok( - bindgen::Builder::wdk_default(vec!["src/ntddk-input.h", "src/wdf-input.h"], config)? - .with_codegen_config(CodegenConfig::VARS) - .generate() - .expect("Bindings should succeed to generate") - .write_to_file(out_path.join("constants.rs"))?, - ) -} +const NUM_WDF_FUNCTIONS_PLACEHOLDER: &str = + ""; +const WDF_FUNCTION_COUNT_DECLARATION_PLACEHOLDER: &str = + ""; +const OUT_DIR_PLACEHOLDER: &str = + ""; +const WDFFUNCTIONS_SYMBOL_NAME_PLACEHOLDER: &str = + ""; -fn generate_types(out_path: &Path, config: &Config) -> Result<(), ConfigError> { - Ok( - bindgen::Builder::wdk_default(vec!["src/ntddk-input.h", "src/wdf-input.h"], config)? - .with_codegen_config(CodegenConfig::TYPES) - .generate() - .expect("Bindings should succeed to generate") - .write_to_file(out_path.join("types.rs"))?, - ) -} +const WDF_FUNCTION_COUNT_DECLARATION_EXTERNAL_SYMBOL: &str = " + // SAFETY: `crate::WdfFunctionCount` is generated as a mutable static, but is not supposed \ + to be ever mutated by WDF. + let wdf_function_count = unsafe { crate::WdfFunctionCount } as usize;"; +const WDF_FUNCTION_COUNT_DECLARATION_TABLE_INDEX: &str = " + let wdf_function_count = crate::_WDFFUNCENUM::WdfFunctionTableNumEntries as usize;"; -fn generate_ntddk(out_path: &Path, config: &Config) -> Result<(), ConfigError> { - Ok( - bindgen::Builder::wdk_default(vec!["src/ntddk-input.h"], config)? - .with_codegen_config((CodegenConfig::TYPES | CodegenConfig::VARS).complement()) - .generate() - .expect("Bindings should succeed to generate") - .write_to_file(out_path.join("ntddk.rs"))?, - ) -} +// FIXME: replace lazy_static with std::Lazy once available: https://github.com/rust-lang/rust/issues/109736 +lazy_static! { + static ref WDF_FUNCTION_TABLE_TEMPLATE: String = format!( + r#" +// FIXME: replace lazy_static with std::Lazy once available: https://github.com/rust-lang/rust/issues/109736 +#[cfg(any(driver_model__driver_type = "KMDF", driver_model__driver_type = "UMDF"))] +lazy_static::lazy_static! {{ + #[allow(missing_docs)] + pub static ref WDF_FUNCTION_TABLE: &'static [crate::WDFFUNC] = {{ + // SAFETY: `WdfFunctions` is generated as a mutable static, but is not supposed to be ever mutated by WDF. + let wdf_function_table = unsafe {{ crate::WdfFunctions }}; +{WDF_FUNCTION_COUNT_DECLARATION_PLACEHOLDER} -fn generate_wdf(out_path: &Path, config: &Config) -> Result<(), ConfigError> { - // As of NI WDK, this may generate an empty file due to no non-type and non-var - // items in the wdf headers(i.e. functions are all inlined). This step is - // intentionally left here in case older WDKs have non-inlined functions or new - // WDKs may introduce non-inlined functions. - Ok( - bindgen::Builder::wdk_default(vec!["src/wdf-input.h"], config)? - .with_codegen_config((CodegenConfig::TYPES | CodegenConfig::VARS).complement()) - .allowlist_file("(?i).*wdf.*") // Only generate for files that are prefixed with (case-insensitive) wdf (ie. - // /some/path/WdfSomeHeader.h), to prevent duplication of code in ntddk.rs - .generate() - .expect("Bindings should succeed to generate") - .write_to_file(out_path.join("wdf.rs"))?, - ) + // SAFETY: This is safe because: + // 1. `WdfFunctions` is valid for reads for `{NUM_WDF_FUNCTIONS_PLACEHOLDER}` * `core::mem::size_of::()` + // bytes, and is guaranteed to be aligned and it must be properly aligned. + // 2. `WdfFunctions` points to `{NUM_WDF_FUNCTIONS_PLACEHOLDER}` consecutive properly initialized values of + // type `WDFFUNC`. + // 3. WDF does not mutate the memory referenced by the returned slice for for its entire `'static' lifetime. + // 4. The total size, `{NUM_WDF_FUNCTIONS_PLACEHOLDER}` * `core::mem::size_of::()`, of the slice must be no + // larger than `isize::MAX`. This is proven by the below `debug_assert!`. + unsafe {{ + debug_assert!(isize::try_from(wdf_function_count * core::mem::size_of::()).is_ok()); + core::slice::from_raw_parts(wdf_function_table, wdf_function_count) + }} + }}; +}}"# + ); + static ref CALL_UNSAFE_WDF_BINDING_TEMPLATE: String = format!( + r#" +/// A procedural macro that allows WDF functions to be called by name. +/// +/// This function parses the name of the WDF function, finds it function +/// pointer from the WDF function table, and then calls it with the +/// arguments passed to it +/// +/// # Safety +/// Function arguments must abide by any rules outlined in the WDF +/// documentation. This macro does not perform any validation of the +/// arguments passed to it., beyond type validation. +/// +/// # Examples +/// +/// ```rust, no_run +/// use wdk_sys::*; +/// +/// pub unsafe extern "system" fn driver_entry( +/// driver: &mut DRIVER_OBJECT, +/// registry_path: PCUNICODE_STRING, +/// ) -> NTSTATUS {{ +/// +/// let mut driver_config = WDF_DRIVER_CONFIG {{ +/// Size: core::mem::size_of::() as ULONG, +/// ..WDF_DRIVER_CONFIG::default() +/// }}; +/// let driver_handle_output = WDF_NO_HANDLE as *mut WDFDRIVER; +/// +/// unsafe {{ +/// call_unsafe_wdf_function_binding!( +/// WdfDriverCreate, +/// driver as PDRIVER_OBJECT, +/// registry_path, +/// WDF_NO_OBJECT_ATTRIBUTES, +/// &mut driver_config, +/// driver_handle_output, +/// ) +/// }} +/// }} +/// ``` +#[macro_export] +macro_rules! call_unsafe_wdf_function_binding {{ + ( $($tt:tt)* ) => {{ + $crate::__proc_macros::call_unsafe_wdf_function_binding! ( + r"{OUT_DIR_PLACEHOLDER}", + $($tt)* + ) + }} +}}"# + ); + static ref TEST_STUBS_TEMPLATE: String = format!( + r#" +use crate::WDFFUNC; + +/// Stubbed version of the symbol that [`WdfFunctions`] links to so that test targets will compile +#[no_mangle] +pub static mut {WDFFUNCTIONS_SYMBOL_NAME_PLACEHOLDER}: *const WDFFUNC = core::ptr::null(); +"#, + ); } type GenerateFn = fn(&Path, &Config) -> Result<(), ConfigError>; -const GENERATE_FUNCTIONS: [GenerateFn; 4] = [ - generate_constants, - generate_types, - generate_ntddk, - generate_wdf, +const BINDGEN_FILE_GENERATORS_TUPLES: &[(&str, GenerateFn)] = &[ + ("constants.rs", generate_constants), + ("types.rs", generate_types), + ("base.rs", generate_base), + ("wdf.rs", generate_wdf), ]; -fn main() -> anyhow::Result<()> { +fn initialize_tracing() -> Result<(), ParseError> { let tracing_filter = EnvFilter::default() - // Show errors and warnings by default - .add_directive(LevelFilter::WARN.into()) + // Show up to INFO level by default + .add_directive(LevelFilter::INFO.into()) // Silence various warnings originating from bindgen that are not currently actionable - // FIXME: this currently sets the minimum log level to error for the listed modules. It should actually be turning off logging (level=off) for specific warnings in these modules, but a bug in the tracing crate's filtering is preventing this from working as expected. See https://github.com/tokio-rs/tracing/issues/2843. + // FIXME: this currently sets the minimum log level to error for the listed modules. It + // should actually be turning off logging (level=off) for specific warnings in these + // modules, but a bug in the tracing crate's filtering is preventing this from working as expected. See https://github.com/tokio-rs/tracing/issues/2843. .add_directive("bindgen::codegen::helpers[{message}]=error".parse()?) .add_directive("bindgen::codegen::struct_layout[{message}]=error".parse()?) .add_directive("bindgen::ir::comp[{message}]=error".parse()?) @@ -124,49 +194,269 @@ fn main() -> anyhow::Result<()> { tracing_subscriber::fmt() .pretty() .with_env_filter(tracing_filter) + .with_span_events(tracing_subscriber::fmt::format::FmtSpan::CLOSE) .init(); - let config = Config { - // FIXME: this should be based off of Cargo feature version - driver_config: DriverConfig::KMDF(KMDFConfig::new()), - ..Config::default() + Ok(()) +} + +fn generate_constants(out_path: &Path, config: &Config) -> Result<(), ConfigError> { + info!("Generating bindings to WDK: constants.rs"); + + Ok(bindgen::Builder::wdk_default(vec!["src/input.h"], config)? + .with_codegen_config(CodegenConfig::VARS) + .generate() + .expect("Bindings should succeed to generate") + .write_to_file(out_path.join("constants.rs"))?) +} + +fn generate_types(out_path: &Path, config: &Config) -> Result<(), ConfigError> { + info!("Generating bindings to WDK: types.rs"); + + Ok(bindgen::Builder::wdk_default(vec!["src/input.h"], config)? + .with_codegen_config(CodegenConfig::TYPES) + .generate() + .expect("Bindings should succeed to generate") + .write_to_file(out_path.join("types.rs"))?) +} + +fn generate_base(out_path: &Path, config: &Config) -> Result<(), ConfigError> { + let outfile_name = match &config.driver_config { + DriverConfig::Wdm | DriverConfig::Kmdf(_) => "ntddk.rs", + DriverConfig::Umdf(_) => "windows.rs", }; + info!("Generating bindings to WDK: {outfile_name}.rs"); - let out_paths = vec![ - // FIXME: gate the generations of the generated_bindings folder behind a feature flag that - // is disabled in crates.io builds (modifying source is illegal when distributing - // crates) + Ok(bindgen::Builder::wdk_default(vec!["src/input.h"], config)? + .with_codegen_config((CodegenConfig::TYPES | CodegenConfig::VARS).complement()) + .generate() + .expect("Bindings should succeed to generate") + .write_to_file(out_path.join(outfile_name))?) +} - // Generate a copy of the bindings to the generated_bindings so that its easier to see - // diffs in the output due to bindgen settings changes - PathBuf::from("./generated_bindings/"), - // This is the actual bindings that get consumed via !include in this library's modules - PathBuf::from( - env::var("OUT_DIR").expect("OUT_DIR should be exist in Cargo build environment"), - ), - ]; - - let mut handles = Vec::>>::new(); - let config_arc = Arc::new(config); - - for out_path in out_paths { - let path_arc = Arc::new(out_path); - for generate_function in GENERATE_FUNCTIONS { - let temp_path = path_arc.clone(); - let temp_config = config_arc.clone(); - let handle: JoinHandle> = thread::spawn(move || { - generate_function(&temp_path, &temp_config)?; - Ok(()) - }); - handles.push(handle); - } +fn generate_wdf(out_path: &Path, config: &Config) -> Result<(), ConfigError> { + if let DriverConfig::Kmdf(_) | DriverConfig::Umdf(_) = &config.driver_config { + info!("Generating bindings to WDK: wdf.rs"); + + // As of NI WDK, this may generate an empty file due to no non-type and non-var + // items in the wdf headers(i.e. functions are all inlined). This step is + // intentionally left here in case older/newer WDKs have non-inlined functions + // or new WDKs may introduce non-inlined functions. + Ok(bindgen::Builder::wdk_default(vec!["src/input.h"], config)? + .with_codegen_config((CodegenConfig::TYPES | CodegenConfig::VARS).complement()) + // Only generate for files that are prefixed with (case-insensitive) wdf (ie. + // /some/path/WdfSomeHeader.h), to prevent duplication of code in ntddk.rs + .allowlist_file("(?i).*wdf.*") + .generate() + .expect("Bindings should succeed to generate") + .write_to_file(out_path.join("wdf.rs"))?) + } else { + info!( + "Skipping wdf.rs generation since driver_config is {:#?}", + config.driver_config + ); + Ok(()) } +} + +/// Generates a `wdf_function_table.rs` file in `OUT_DIR` which contains the +/// definition of `WDF_FUNCTION_TABLE`. This is required to be generated here +/// since the size of the table is derived from either a global symbol +/// (`WDF_FUNCTION_COUNT`) that newer WDF versions expose, or an enum that older +/// versions use. +fn generate_wdf_function_table(out_path: &Path, config: &Config) -> std::io::Result<()> { + const MINIMUM_MINOR_VERSION_TO_GENERATE_WDF_FUNCTION_COUNT: u8 = 25; - for handle in handles { - if let Err(e) = handle.join().unwrap() { - return Err(e.into()); + let generated_file_path = out_path.join("wdf_function_table.rs"); + let mut generated_file = std::fs::File::create(generated_file_path)?; + + let is_wdf_function_count_generated = match *config { + Config { + driver_config: + DriverConfig::Kmdf(KmdfConfig { + kmdf_version_major, + target_kmdf_version_minor, + .. + }), + .. + } => { + kmdf_version_major >= 1 + && target_kmdf_version_minor >= MINIMUM_MINOR_VERSION_TO_GENERATE_WDF_FUNCTION_COUNT } - } - Ok(config_arc.export_config()?) + Config { + driver_config: + DriverConfig::Umdf(UmdfConfig { + umdf_version_major, + target_umdf_version_minor, + .. + }), + .. + } => { + umdf_version_major >= 2 + && target_umdf_version_minor >= MINIMUM_MINOR_VERSION_TO_GENERATE_WDF_FUNCTION_COUNT + } + + _ => { + unreachable!( + "generate_wdf_function_table is only called with WDF driver configurations" + ) + } + }; + + let wdf_function_table_code_snippet = if is_wdf_function_count_generated { + WDF_FUNCTION_TABLE_TEMPLATE + .replace(NUM_WDF_FUNCTIONS_PLACEHOLDER, "crate::WdfFunctionCount") + .replace( + WDF_FUNCTION_COUNT_DECLARATION_PLACEHOLDER, + WDF_FUNCTION_COUNT_DECLARATION_EXTERNAL_SYMBOL, + ) + } else { + WDF_FUNCTION_TABLE_TEMPLATE + .replace( + NUM_WDF_FUNCTIONS_PLACEHOLDER, + "crate::_WDFFUNCENUM::WdfFunctionTableNumEntries", + ) + .replace( + WDF_FUNCTION_COUNT_DECLARATION_PLACEHOLDER, + WDF_FUNCTION_COUNT_DECLARATION_TABLE_INDEX, + ) + }; + + generated_file.write_all(wdf_function_table_code_snippet.as_bytes())?; + Ok(()) +} + +/// Generates a `macros.rs` file in `OUT_DIR` which contains a +/// `call_unsafe_wdf_function_binding!` macro that redirects to the +/// `wdk_macros::call_unsafe_wdf_function_binding` `proc_macro` . This is +/// required in order to add an additional argument with the path to the file +/// containing generated types. There is currently no other way to pass +/// `OUT_DIR` of `wdk-sys` to the `proc_macro`. +fn generate_call_unsafe_wdf_function_binding_macro(out_path: &Path) -> std::io::Result<()> { + let generated_file_path = out_path.join("call_unsafe_wdf_function_binding.rs"); + let mut generated_file = std::fs::File::create(generated_file_path)?; + generated_file.write_all( + CALL_UNSAFE_WDF_BINDING_TEMPLATE + .replace( + OUT_DIR_PLACEHOLDER, + out_path.join("types.rs").to_str().expect( + "path to file with generated type information should successfully convert to \ + a str", + ), + ) + .as_bytes(), + )?; + Ok(()) +} + +/// Generates a `test_stubs.rs` file in `OUT_DIR` which contains stubs required +/// for tests to compile. This should only generate the stubs whose names are +/// dependent on the WDK configuration, and would otherwise be impossible to +/// just include in `src/test_stubs.rs` directly. +fn generate_test_stubs(out_path: &Path, config: &Config) -> std::io::Result<()> { + let stubs_file_path = out_path.join("test_stubs.rs"); + let mut stubs_file = std::fs::File::create(stubs_file_path)?; + stubs_file.write_all( + TEST_STUBS_TEMPLATE + .replace( + WDFFUNCTIONS_SYMBOL_NAME_PLACEHOLDER, + &config.compute_wdffunctions_symbol_name().expect( + "KMDF and UMDF configs should always have a computable WdfFunctions symbol \ + name", + ), + ) + .as_bytes(), + )?; + Ok(()) +} + +fn main() -> anyhow::Result<()> { + initialize_tracing()?; + + configure_wdk_library_build_and_then(|config| { + let out_path = PathBuf::from( + env::var("OUT_DIR").expect("OUT_DIR should be exist in Cargo build environment"), + ); + + thread::scope(|thread_scope| { + let mut thread_join_handles = Vec::new(); + + info_span!("bindgen generation").in_scope(|| { + let out_path = &out_path; + let config = &config; + + for (file_name, generate_function) in BINDGEN_FILE_GENERATORS_TUPLES { + let current_span = Span::current(); + + thread_join_handles.push( + thread::Builder::new() + .name(format!("bindgen {file_name} generator")) + .spawn_scoped(thread_scope, move || { + // Parent span must be manually set since spans do not persist across thread boundaries: https://github.com/tokio-rs/tracing/issues/1391 + info_span!(parent: current_span, "worker thread", generated_file_name = file_name).in_scope(|| generate_function(out_path, config)) + }) + .expect("Scoped Thread should spawn successfully"), + ); + } + }); + + if let DriverConfig::Kmdf(_) | DriverConfig::Umdf(_) = config.driver_config { + let current_span = Span::current(); + // Compile a c library to expose symbols that are not exposed because of + // __declspec(selectany) + thread_join_handles.push( + thread::Builder::new() + .name("wdf.c cc compilation".to_string()) + .spawn_scoped(thread_scope, || { + // Parent span must be manually set since spans do not persist across thread boundaries: https://github.com/tokio-rs/tracing/issues/1391 + info_span!(parent: current_span, "cc").in_scope(|| { + info!("Compiling wdf.c"); + let mut cc_builder = cc::Build::new(); + for (key, value) in config.get_preprocessor_definitions_iter() { + cc_builder.define(&key, value.as_deref()); + } + + cc_builder + .includes(config.get_include_paths()?) + .file("src/wdf.c") + .compile("wdf"); + Ok::<(), ConfigError>(()) + }) + }) + .expect("Scoped Thread should spawn successfully"), + ); + + info_span!("wdf_function_table.rs generation").in_scope(|| { + generate_wdf_function_table(&out_path, &config)?; + Ok::<(), std::io::Error>(()) + })?; + + info_span!("call_unsafe_wdf_function_binding.rs generation").in_scope(|| { + generate_call_unsafe_wdf_function_binding_macro(&out_path)?; + Ok::<(), std::io::Error>(()) + })?; + + info_span!("test_stubs.rs generation").in_scope(|| { + generate_test_stubs(&out_path, &config)?; + Ok::<(), std::io::Error>(()) + })?; + } + + for join_handle in thread_join_handles { + let thread_name = join_handle.thread().name().unwrap_or("UNNAMED").to_string(); + join_handle + .join() + .expect("Thread should complete without panicking") + .with_context(|| { + format!(r#""{thread_name}" thread failed to exit successfully"#) + })?; + } + Ok::<(), anyhow::Error>(()) + })?; + + Ok::<(), anyhow::Error>(()) + })?; + + Ok(()) } diff --git a/crates/wdk-sys/generated_bindings/README.md b/crates/wdk-sys/generated_bindings/README.md deleted file mode 100644 index 8a72531a..00000000 --- a/crates/wdk-sys/generated_bindings/README.md +++ /dev/null @@ -1 +0,0 @@ -This files in this folder are generated via bindgen but are not actually used by anything. Their purpose is to be able to more easily track diffs in the generated bindings when changes are made to the settings provided to bindgen. The actual bindings used are generated in the target folder on build. diff --git a/crates/wdk-sys/generated_bindings/constants.rs b/crates/wdk-sys/generated_bindings/constants.rs deleted file mode 100644 index c2d471d0..00000000 --- a/crates/wdk-sys/generated_bindings/constants.rs +++ /dev/null @@ -1,6336 +0,0 @@ -/* automatically generated by rust-bindgen 0.69.4 */ - -pub const _STRSAFE_USE_SECURE_CRT: u32 = 0; -pub const _SAL_VERSION: u32 = 20; -pub const __SAL_H_VERSION: u32 = 180000000; -pub const _USE_DECLSPECS_FOR_SAL: u32 = 0; -pub const _USE_ATTRIBUTES_FOR_SAL: u32 = 0; -pub const __SAL_H_FULL_VER: u32 = 140050727; -pub const __SPECSTRINGS_STRICT_LEVEL: u32 = 1; -pub const __drv_typeConst: u32 = 0; -pub const __drv_typeCond: u32 = 1; -pub const __drv_typeBitset: u32 = 2; -pub const __drv_typeExpr: u32 = 3; -pub const _CRT_PACKING: u32 = 8; -pub const __STDC_SECURE_LIB__: u32 = 200411; -pub const __GOT_SECURE_LIB__: u32 = 200411; -pub const __STDC_WANT_SECURE_LIB__: u32 = 1; -pub const _SECURECRT_FILL_BUFFER_PATTERN: u32 = 254; -pub const _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES: u32 = 0; -pub const _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT: u32 = 0; -pub const _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES: u32 = 1; -pub const _ARGMAX: u32 = 100; -pub const EXCEPTION_EXECUTE_HANDLER: u32 = 1; -pub const EXCEPTION_CONTINUE_SEARCH: u32 = 0; -pub const EXCEPTION_CONTINUE_EXECUTION: i32 = -1; -pub const _UPPER: u32 = 1; -pub const _LOWER: u32 = 2; -pub const _DIGIT: u32 = 4; -pub const _SPACE: u32 = 8; -pub const _PUNCT: u32 = 16; -pub const _CONTROL: u32 = 32; -pub const _BLANK: u32 = 64; -pub const _HEX: u32 = 128; -pub const _LEADBYTE: u32 = 32768; -pub const _ALPHA: u32 = 259; -pub const WINAPI_FAMILY_PC_APP: u32 = 2; -pub const WINAPI_FAMILY_PHONE_APP: u32 = 3; -pub const WINAPI_FAMILY_SYSTEM: u32 = 4; -pub const WINAPI_FAMILY_SERVER: u32 = 5; -pub const WINAPI_FAMILY_GAMES: u32 = 6; -pub const WINAPI_FAMILY_DESKTOP_APP: u32 = 100; -pub const WINAPI_FAMILY_APP: u32 = 2; -pub const WINAPI_FAMILY: u32 = 100; -pub const ANYSIZE_ARRAY: u32 = 1; -pub const DISPATCH_LEVEL: u32 = 2; -pub const APC_LEVEL: u32 = 1; -pub const PASSIVE_LEVEL: u32 = 0; -pub const HIGH_LEVEL: u32 = 15; -pub const MEMORY_ALLOCATION_ALIGNMENT: u32 = 16; -pub const X86_CACHE_ALIGNMENT_SIZE: u32 = 64; -pub const ARM_CACHE_ALIGNMENT_SIZE: u32 = 128; -pub const SYSTEM_CACHE_ALIGNMENT_SIZE: u32 = 64; -pub const PRAGMA_DEPRECATED_DDK: u32 = 0; -pub const STRICT: u32 = 1; -pub const ALL_PROCESSOR_GROUPS: u32 = 65535; -pub const MAXIMUM_PROC_PER_GROUP: u32 = 64; -pub const MAXIMUM_PROCESSORS: u32 = 64; -pub const OBJ_HANDLE_TAGBITS: u32 = 3; -pub const APPLICATION_ERROR_MASK: u32 = 536870912; -pub const ERROR_SEVERITY_SUCCESS: u32 = 0; -pub const ERROR_SEVERITY_INFORMATIONAL: u32 = 1073741824; -pub const ERROR_SEVERITY_WARNING: u32 = 2147483648; -pub const ERROR_SEVERITY_ERROR: u32 = 3221225472; -pub const MAXLONGLONG: u64 = 9223372036854775807; -pub const RTL_BALANCED_NODE_RESERVED_PARENT_MASK: u32 = 3; -pub const OBJ_INHERIT: u32 = 2; -pub const OBJ_PERMANENT: u32 = 16; -pub const OBJ_EXCLUSIVE: u32 = 32; -pub const OBJ_CASE_INSENSITIVE: u32 = 64; -pub const OBJ_OPENIF: u32 = 128; -pub const OBJ_OPENLINK: u32 = 256; -pub const OBJ_KERNEL_HANDLE: u32 = 512; -pub const OBJ_FORCE_ACCESS_CHECK: u32 = 1024; -pub const OBJ_IGNORE_IMPERSONATED_DEVICEMAP: u32 = 2048; -pub const OBJ_DONT_REPARSE: u32 = 4096; -pub const OBJ_VALID_ATTRIBUTES: u32 = 8178; -pub const FALSE: u32 = 0; -pub const TRUE: u32 = 1; -pub const _NLSCMPERROR: u32 = 2147483647; -pub const MINCHAR: u32 = 128; -pub const MAXCHAR: u32 = 127; -pub const MINSHORT: u32 = 32768; -pub const MAXSHORT: u32 = 32767; -pub const MINLONG: u32 = 2147483648; -pub const MAXLONG: u32 = 2147483647; -pub const MAXUCHAR: u32 = 255; -pub const MAXUSHORT: u32 = 65535; -pub const MAXULONG: u32 = 4294967295; -pub const ENCLAVE_SHORT_ID_LENGTH: u32 = 16; -pub const ENCLAVE_LONG_ID_LENGTH: u32 = 32; -pub const VER_SERVER_NT: u32 = 2147483648; -pub const VER_WORKSTATION_NT: u32 = 1073741824; -pub const VER_SUITE_SMALLBUSINESS: u32 = 1; -pub const VER_SUITE_ENTERPRISE: u32 = 2; -pub const VER_SUITE_BACKOFFICE: u32 = 4; -pub const VER_SUITE_COMMUNICATIONS: u32 = 8; -pub const VER_SUITE_TERMINAL: u32 = 16; -pub const VER_SUITE_SMALLBUSINESS_RESTRICTED: u32 = 32; -pub const VER_SUITE_EMBEDDEDNT: u32 = 64; -pub const VER_SUITE_DATACENTER: u32 = 128; -pub const VER_SUITE_SINGLEUSERTS: u32 = 256; -pub const VER_SUITE_PERSONAL: u32 = 512; -pub const VER_SUITE_BLADE: u32 = 1024; -pub const VER_SUITE_EMBEDDED_RESTRICTED: u32 = 2048; -pub const VER_SUITE_SECURITY_APPLIANCE: u32 = 4096; -pub const VER_SUITE_STORAGE_SERVER: u32 = 8192; -pub const VER_SUITE_COMPUTE_SERVER: u32 = 16384; -pub const VER_SUITE_WH_SERVER: u32 = 32768; -pub const VER_SUITE_MULTIUSERTS: u32 = 131072; -pub const PRODUCT_UNDEFINED: u32 = 0; -pub const PRODUCT_ULTIMATE: u32 = 1; -pub const PRODUCT_HOME_BASIC: u32 = 2; -pub const PRODUCT_HOME_PREMIUM: u32 = 3; -pub const PRODUCT_ENTERPRISE: u32 = 4; -pub const PRODUCT_HOME_BASIC_N: u32 = 5; -pub const PRODUCT_BUSINESS: u32 = 6; -pub const PRODUCT_STANDARD_SERVER: u32 = 7; -pub const PRODUCT_DATACENTER_SERVER: u32 = 8; -pub const PRODUCT_SMALLBUSINESS_SERVER: u32 = 9; -pub const PRODUCT_ENTERPRISE_SERVER: u32 = 10; -pub const PRODUCT_STARTER: u32 = 11; -pub const PRODUCT_DATACENTER_SERVER_CORE: u32 = 12; -pub const PRODUCT_STANDARD_SERVER_CORE: u32 = 13; -pub const PRODUCT_ENTERPRISE_SERVER_CORE: u32 = 14; -pub const PRODUCT_ENTERPRISE_SERVER_IA64: u32 = 15; -pub const PRODUCT_BUSINESS_N: u32 = 16; -pub const PRODUCT_WEB_SERVER: u32 = 17; -pub const PRODUCT_CLUSTER_SERVER: u32 = 18; -pub const PRODUCT_HOME_SERVER: u32 = 19; -pub const PRODUCT_STORAGE_EXPRESS_SERVER: u32 = 20; -pub const PRODUCT_STORAGE_STANDARD_SERVER: u32 = 21; -pub const PRODUCT_STORAGE_WORKGROUP_SERVER: u32 = 22; -pub const PRODUCT_STORAGE_ENTERPRISE_SERVER: u32 = 23; -pub const PRODUCT_SERVER_FOR_SMALLBUSINESS: u32 = 24; -pub const PRODUCT_SMALLBUSINESS_SERVER_PREMIUM: u32 = 25; -pub const PRODUCT_HOME_PREMIUM_N: u32 = 26; -pub const PRODUCT_ENTERPRISE_N: u32 = 27; -pub const PRODUCT_ULTIMATE_N: u32 = 28; -pub const PRODUCT_WEB_SERVER_CORE: u32 = 29; -pub const PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT: u32 = 30; -pub const PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY: u32 = 31; -pub const PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING: u32 = 32; -pub const PRODUCT_SERVER_FOUNDATION: u32 = 33; -pub const PRODUCT_HOME_PREMIUM_SERVER: u32 = 34; -pub const PRODUCT_SERVER_FOR_SMALLBUSINESS_V: u32 = 35; -pub const PRODUCT_STANDARD_SERVER_V: u32 = 36; -pub const PRODUCT_DATACENTER_SERVER_V: u32 = 37; -pub const PRODUCT_ENTERPRISE_SERVER_V: u32 = 38; -pub const PRODUCT_DATACENTER_SERVER_CORE_V: u32 = 39; -pub const PRODUCT_STANDARD_SERVER_CORE_V: u32 = 40; -pub const PRODUCT_ENTERPRISE_SERVER_CORE_V: u32 = 41; -pub const PRODUCT_HYPERV: u32 = 42; -pub const PRODUCT_STORAGE_EXPRESS_SERVER_CORE: u32 = 43; -pub const PRODUCT_STORAGE_STANDARD_SERVER_CORE: u32 = 44; -pub const PRODUCT_STORAGE_WORKGROUP_SERVER_CORE: u32 = 45; -pub const PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE: u32 = 46; -pub const PRODUCT_STARTER_N: u32 = 47; -pub const PRODUCT_PROFESSIONAL: u32 = 48; -pub const PRODUCT_PROFESSIONAL_N: u32 = 49; -pub const PRODUCT_SB_SOLUTION_SERVER: u32 = 50; -pub const PRODUCT_SERVER_FOR_SB_SOLUTIONS: u32 = 51; -pub const PRODUCT_STANDARD_SERVER_SOLUTIONS: u32 = 52; -pub const PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE: u32 = 53; -pub const PRODUCT_SB_SOLUTION_SERVER_EM: u32 = 54; -pub const PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM: u32 = 55; -pub const PRODUCT_SOLUTION_EMBEDDEDSERVER: u32 = 56; -pub const PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE: u32 = 57; -pub const PRODUCT_PROFESSIONAL_EMBEDDED: u32 = 58; -pub const PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT: u32 = 59; -pub const PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL: u32 = 60; -pub const PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC: u32 = 61; -pub const PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC: u32 = 62; -pub const PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE: u32 = 63; -pub const PRODUCT_CLUSTER_SERVER_V: u32 = 64; -pub const PRODUCT_EMBEDDED: u32 = 65; -pub const PRODUCT_STARTER_E: u32 = 66; -pub const PRODUCT_HOME_BASIC_E: u32 = 67; -pub const PRODUCT_HOME_PREMIUM_E: u32 = 68; -pub const PRODUCT_PROFESSIONAL_E: u32 = 69; -pub const PRODUCT_ENTERPRISE_E: u32 = 70; -pub const PRODUCT_ULTIMATE_E: u32 = 71; -pub const PRODUCT_ENTERPRISE_EVALUATION: u32 = 72; -pub const PRODUCT_MULTIPOINT_STANDARD_SERVER: u32 = 76; -pub const PRODUCT_MULTIPOINT_PREMIUM_SERVER: u32 = 77; -pub const PRODUCT_STANDARD_EVALUATION_SERVER: u32 = 79; -pub const PRODUCT_DATACENTER_EVALUATION_SERVER: u32 = 80; -pub const PRODUCT_ENTERPRISE_N_EVALUATION: u32 = 84; -pub const PRODUCT_EMBEDDED_AUTOMOTIVE: u32 = 85; -pub const PRODUCT_EMBEDDED_INDUSTRY_A: u32 = 86; -pub const PRODUCT_THINPC: u32 = 87; -pub const PRODUCT_EMBEDDED_A: u32 = 88; -pub const PRODUCT_EMBEDDED_INDUSTRY: u32 = 89; -pub const PRODUCT_EMBEDDED_E: u32 = 90; -pub const PRODUCT_EMBEDDED_INDUSTRY_E: u32 = 91; -pub const PRODUCT_EMBEDDED_INDUSTRY_A_E: u32 = 92; -pub const PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER: u32 = 95; -pub const PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER: u32 = 96; -pub const PRODUCT_CORE_ARM: u32 = 97; -pub const PRODUCT_CORE_N: u32 = 98; -pub const PRODUCT_CORE_COUNTRYSPECIFIC: u32 = 99; -pub const PRODUCT_CORE_SINGLELANGUAGE: u32 = 100; -pub const PRODUCT_CORE: u32 = 101; -pub const PRODUCT_PROFESSIONAL_WMC: u32 = 103; -pub const PRODUCT_EMBEDDED_INDUSTRY_EVAL: u32 = 105; -pub const PRODUCT_EMBEDDED_INDUSTRY_E_EVAL: u32 = 106; -pub const PRODUCT_EMBEDDED_EVAL: u32 = 107; -pub const PRODUCT_EMBEDDED_E_EVAL: u32 = 108; -pub const PRODUCT_NANO_SERVER: u32 = 109; -pub const PRODUCT_CLOUD_STORAGE_SERVER: u32 = 110; -pub const PRODUCT_CORE_CONNECTED: u32 = 111; -pub const PRODUCT_PROFESSIONAL_STUDENT: u32 = 112; -pub const PRODUCT_CORE_CONNECTED_N: u32 = 113; -pub const PRODUCT_PROFESSIONAL_STUDENT_N: u32 = 114; -pub const PRODUCT_CORE_CONNECTED_SINGLELANGUAGE: u32 = 115; -pub const PRODUCT_CORE_CONNECTED_COUNTRYSPECIFIC: u32 = 116; -pub const PRODUCT_CONNECTED_CAR: u32 = 117; -pub const PRODUCT_INDUSTRY_HANDHELD: u32 = 118; -pub const PRODUCT_PPI_PRO: u32 = 119; -pub const PRODUCT_ARM64_SERVER: u32 = 120; -pub const PRODUCT_EDUCATION: u32 = 121; -pub const PRODUCT_EDUCATION_N: u32 = 122; -pub const PRODUCT_IOTUAP: u32 = 123; -pub const PRODUCT_CLOUD_HOST_INFRASTRUCTURE_SERVER: u32 = 124; -pub const PRODUCT_ENTERPRISE_S: u32 = 125; -pub const PRODUCT_ENTERPRISE_S_N: u32 = 126; -pub const PRODUCT_PROFESSIONAL_S: u32 = 127; -pub const PRODUCT_PROFESSIONAL_S_N: u32 = 128; -pub const PRODUCT_ENTERPRISE_S_EVALUATION: u32 = 129; -pub const PRODUCT_ENTERPRISE_S_N_EVALUATION: u32 = 130; -pub const PRODUCT_HOLOGRAPHIC: u32 = 135; -pub const PRODUCT_HOLOGRAPHIC_BUSINESS: u32 = 136; -pub const PRODUCT_PRO_SINGLE_LANGUAGE: u32 = 138; -pub const PRODUCT_PRO_CHINA: u32 = 139; -pub const PRODUCT_ENTERPRISE_SUBSCRIPTION: u32 = 140; -pub const PRODUCT_ENTERPRISE_SUBSCRIPTION_N: u32 = 141; -pub const PRODUCT_DATACENTER_NANO_SERVER: u32 = 143; -pub const PRODUCT_STANDARD_NANO_SERVER: u32 = 144; -pub const PRODUCT_DATACENTER_A_SERVER_CORE: u32 = 145; -pub const PRODUCT_STANDARD_A_SERVER_CORE: u32 = 146; -pub const PRODUCT_DATACENTER_WS_SERVER_CORE: u32 = 147; -pub const PRODUCT_STANDARD_WS_SERVER_CORE: u32 = 148; -pub const PRODUCT_UTILITY_VM: u32 = 149; -pub const PRODUCT_DATACENTER_EVALUATION_SERVER_CORE: u32 = 159; -pub const PRODUCT_STANDARD_EVALUATION_SERVER_CORE: u32 = 160; -pub const PRODUCT_PRO_WORKSTATION: u32 = 161; -pub const PRODUCT_PRO_WORKSTATION_N: u32 = 162; -pub const PRODUCT_PRO_FOR_EDUCATION: u32 = 164; -pub const PRODUCT_PRO_FOR_EDUCATION_N: u32 = 165; -pub const PRODUCT_AZURE_SERVER_CORE: u32 = 168; -pub const PRODUCT_AZURE_NANO_SERVER: u32 = 169; -pub const PRODUCT_ENTERPRISEG: u32 = 171; -pub const PRODUCT_ENTERPRISEGN: u32 = 172; -pub const PRODUCT_SERVERRDSH: u32 = 175; -pub const PRODUCT_CLOUD: u32 = 178; -pub const PRODUCT_CLOUDN: u32 = 179; -pub const PRODUCT_HUBOS: u32 = 180; -pub const PRODUCT_ONECOREUPDATEOS: u32 = 182; -pub const PRODUCT_CLOUDE: u32 = 183; -pub const PRODUCT_IOTOS: u32 = 185; -pub const PRODUCT_CLOUDEN: u32 = 186; -pub const PRODUCT_IOTEDGEOS: u32 = 187; -pub const PRODUCT_IOTENTERPRISE: u32 = 188; -pub const PRODUCT_LITE: u32 = 189; -pub const PRODUCT_IOTENTERPRISES: u32 = 191; -pub const PRODUCT_XBOX_SYSTEMOS: u32 = 192; -pub const PRODUCT_XBOX_GAMEOS: u32 = 194; -pub const PRODUCT_XBOX_ERAOS: u32 = 195; -pub const PRODUCT_XBOX_DURANGOHOSTOS: u32 = 196; -pub const PRODUCT_XBOX_SCARLETTHOSTOS: u32 = 197; -pub const PRODUCT_XBOX_KEYSTONE: u32 = 198; -pub const PRODUCT_AZURE_SERVER_CLOUDHOST: u32 = 199; -pub const PRODUCT_AZURE_SERVER_CLOUDMOS: u32 = 200; -pub const PRODUCT_CLOUDEDITIONN: u32 = 202; -pub const PRODUCT_CLOUDEDITION: u32 = 203; -pub const PRODUCT_AZURESTACKHCI_SERVER_CORE: u32 = 406; -pub const PRODUCT_DATACENTER_SERVER_AZURE_EDITION: u32 = 407; -pub const PRODUCT_DATACENTER_SERVER_CORE_AZURE_EDITION: u32 = 408; -pub const PRODUCT_UNLICENSED: u32 = 2882382797; -pub const _WIN32_WINNT_NT4: u32 = 1024; -pub const _WIN32_WINNT_WIN2K: u32 = 1280; -pub const _WIN32_WINNT_WINXP: u32 = 1281; -pub const _WIN32_WINNT_WS03: u32 = 1282; -pub const _WIN32_WINNT_WIN6: u32 = 1536; -pub const _WIN32_WINNT_VISTA: u32 = 1536; -pub const _WIN32_WINNT_WS08: u32 = 1536; -pub const _WIN32_WINNT_LONGHORN: u32 = 1536; -pub const _WIN32_WINNT_WIN7: u32 = 1537; -pub const _WIN32_WINNT_WIN8: u32 = 1538; -pub const _WIN32_WINNT_WINBLUE: u32 = 1539; -pub const _WIN32_WINNT_WINTHRESHOLD: u32 = 2560; -pub const _WIN32_WINNT_WIN10: u32 = 2560; -pub const _WIN32_IE_IE20: u32 = 512; -pub const _WIN32_IE_IE30: u32 = 768; -pub const _WIN32_IE_IE302: u32 = 770; -pub const _WIN32_IE_IE40: u32 = 1024; -pub const _WIN32_IE_IE401: u32 = 1025; -pub const _WIN32_IE_IE50: u32 = 1280; -pub const _WIN32_IE_IE501: u32 = 1281; -pub const _WIN32_IE_IE55: u32 = 1360; -pub const _WIN32_IE_IE60: u32 = 1536; -pub const _WIN32_IE_IE60SP1: u32 = 1537; -pub const _WIN32_IE_IE60SP2: u32 = 1539; -pub const _WIN32_IE_IE70: u32 = 1792; -pub const _WIN32_IE_IE80: u32 = 2048; -pub const _WIN32_IE_IE90: u32 = 2304; -pub const _WIN32_IE_IE100: u32 = 2560; -pub const _WIN32_IE_IE110: u32 = 2560; -pub const _WIN32_IE_NT4: u32 = 512; -pub const _WIN32_IE_NT4SP1: u32 = 512; -pub const _WIN32_IE_NT4SP2: u32 = 512; -pub const _WIN32_IE_NT4SP3: u32 = 770; -pub const _WIN32_IE_NT4SP4: u32 = 1025; -pub const _WIN32_IE_NT4SP5: u32 = 1025; -pub const _WIN32_IE_NT4SP6: u32 = 1280; -pub const _WIN32_IE_WIN98: u32 = 1025; -pub const _WIN32_IE_WIN98SE: u32 = 1280; -pub const _WIN32_IE_WINME: u32 = 1360; -pub const _WIN32_IE_WIN2K: u32 = 1281; -pub const _WIN32_IE_WIN2KSP1: u32 = 1281; -pub const _WIN32_IE_WIN2KSP2: u32 = 1281; -pub const _WIN32_IE_WIN2KSP3: u32 = 1281; -pub const _WIN32_IE_WIN2KSP4: u32 = 1281; -pub const _WIN32_IE_XP: u32 = 1536; -pub const _WIN32_IE_XPSP1: u32 = 1537; -pub const _WIN32_IE_XPSP2: u32 = 1539; -pub const _WIN32_IE_WS03: u32 = 1538; -pub const _WIN32_IE_WS03SP1: u32 = 1539; -pub const _WIN32_IE_WIN6: u32 = 1792; -pub const _WIN32_IE_LONGHORN: u32 = 1792; -pub const _WIN32_IE_WIN7: u32 = 2048; -pub const _WIN32_IE_WIN8: u32 = 2560; -pub const _WIN32_IE_WINBLUE: u32 = 2560; -pub const _WIN32_IE_WINTHRESHOLD: u32 = 2560; -pub const _WIN32_IE_WIN10: u32 = 2560; -pub const NTDDI_WIN4: u32 = 67108864; -pub const NTDDI_WIN2K: u32 = 83886080; -pub const NTDDI_WIN2KSP1: u32 = 83886336; -pub const NTDDI_WIN2KSP2: u32 = 83886592; -pub const NTDDI_WIN2KSP3: u32 = 83886848; -pub const NTDDI_WIN2KSP4: u32 = 83887104; -pub const NTDDI_WINXP: u32 = 83951616; -pub const NTDDI_WINXPSP1: u32 = 83951872; -pub const NTDDI_WINXPSP2: u32 = 83952128; -pub const NTDDI_WINXPSP3: u32 = 83952384; -pub const NTDDI_WINXPSP4: u32 = 83952640; -pub const NTDDI_WS03: u32 = 84017152; -pub const NTDDI_WS03SP1: u32 = 84017408; -pub const NTDDI_WS03SP2: u32 = 84017664; -pub const NTDDI_WS03SP3: u32 = 84017920; -pub const NTDDI_WS03SP4: u32 = 84018176; -pub const NTDDI_WIN6: u32 = 100663296; -pub const NTDDI_WIN6SP1: u32 = 100663552; -pub const NTDDI_WIN6SP2: u32 = 100663808; -pub const NTDDI_WIN6SP3: u32 = 100664064; -pub const NTDDI_WIN6SP4: u32 = 100664320; -pub const NTDDI_VISTA: u32 = 100663296; -pub const NTDDI_VISTASP1: u32 = 100663552; -pub const NTDDI_VISTASP2: u32 = 100663808; -pub const NTDDI_VISTASP3: u32 = 100664064; -pub const NTDDI_VISTASP4: u32 = 100664320; -pub const NTDDI_LONGHORN: u32 = 100663296; -pub const NTDDI_WS08: u32 = 100663552; -pub const NTDDI_WS08SP2: u32 = 100663808; -pub const NTDDI_WS08SP3: u32 = 100664064; -pub const NTDDI_WS08SP4: u32 = 100664320; -pub const NTDDI_WIN7: u32 = 100728832; -pub const NTDDI_WIN8: u32 = 100794368; -pub const NTDDI_WINBLUE: u32 = 100859904; -pub const NTDDI_WINTHRESHOLD: u32 = 167772160; -pub const NTDDI_WIN10: u32 = 167772160; -pub const NTDDI_WIN10_TH2: u32 = 167772161; -pub const NTDDI_WIN10_RS1: u32 = 167772162; -pub const NTDDI_WIN10_RS2: u32 = 167772163; -pub const NTDDI_WIN10_RS3: u32 = 167772164; -pub const NTDDI_WIN10_RS4: u32 = 167772165; -pub const NTDDI_WIN10_RS5: u32 = 167772166; -pub const NTDDI_WIN10_19H1: u32 = 167772167; -pub const NTDDI_WIN10_VB: u32 = 167772168; -pub const NTDDI_WIN10_MN: u32 = 167772169; -pub const NTDDI_WIN10_FE: u32 = 167772170; -pub const NTDDI_WIN10_CO: u32 = 167772171; -pub const NTDDI_WIN10_NI: u32 = 167772172; -pub const WDK_NTDDI_VERSION: u32 = 167772172; -pub const OSVERSION_MASK: u32 = 4294901760; -pub const SPVERSION_MASK: u32 = 65280; -pub const SUBVERSION_MASK: u32 = 255; -pub const _WIN32_WINNT: u32 = 2560; -pub const NTDDI_VERSION: u32 = 167772172; -pub const WINVER: u32 = 2560; -pub const _WIN32_IE: u32 = 2560; -pub const LANG_NEUTRAL: u32 = 0; -pub const LANG_INVARIANT: u32 = 127; -pub const LANG_AFRIKAANS: u32 = 54; -pub const LANG_ALBANIAN: u32 = 28; -pub const LANG_ALSATIAN: u32 = 132; -pub const LANG_AMHARIC: u32 = 94; -pub const LANG_ARABIC: u32 = 1; -pub const LANG_ARMENIAN: u32 = 43; -pub const LANG_ASSAMESE: u32 = 77; -pub const LANG_AZERI: u32 = 44; -pub const LANG_AZERBAIJANI: u32 = 44; -pub const LANG_BANGLA: u32 = 69; -pub const LANG_BASHKIR: u32 = 109; -pub const LANG_BASQUE: u32 = 45; -pub const LANG_BELARUSIAN: u32 = 35; -pub const LANG_BENGALI: u32 = 69; -pub const LANG_BRETON: u32 = 126; -pub const LANG_BOSNIAN: u32 = 26; -pub const LANG_BOSNIAN_NEUTRAL: u32 = 30746; -pub const LANG_BULGARIAN: u32 = 2; -pub const LANG_CATALAN: u32 = 3; -pub const LANG_CENTRAL_KURDISH: u32 = 146; -pub const LANG_CHEROKEE: u32 = 92; -pub const LANG_CHINESE: u32 = 4; -pub const LANG_CHINESE_SIMPLIFIED: u32 = 4; -pub const LANG_CHINESE_TRADITIONAL: u32 = 31748; -pub const LANG_CORSICAN: u32 = 131; -pub const LANG_CROATIAN: u32 = 26; -pub const LANG_CZECH: u32 = 5; -pub const LANG_DANISH: u32 = 6; -pub const LANG_DARI: u32 = 140; -pub const LANG_DIVEHI: u32 = 101; -pub const LANG_DUTCH: u32 = 19; -pub const LANG_ENGLISH: u32 = 9; -pub const LANG_ESTONIAN: u32 = 37; -pub const LANG_FAEROESE: u32 = 56; -pub const LANG_FARSI: u32 = 41; -pub const LANG_FILIPINO: u32 = 100; -pub const LANG_FINNISH: u32 = 11; -pub const LANG_FRENCH: u32 = 12; -pub const LANG_FRISIAN: u32 = 98; -pub const LANG_FULAH: u32 = 103; -pub const LANG_GALICIAN: u32 = 86; -pub const LANG_GEORGIAN: u32 = 55; -pub const LANG_GERMAN: u32 = 7; -pub const LANG_GREEK: u32 = 8; -pub const LANG_GREENLANDIC: u32 = 111; -pub const LANG_GUJARATI: u32 = 71; -pub const LANG_HAUSA: u32 = 104; -pub const LANG_HAWAIIAN: u32 = 117; -pub const LANG_HEBREW: u32 = 13; -pub const LANG_HINDI: u32 = 57; -pub const LANG_HUNGARIAN: u32 = 14; -pub const LANG_ICELANDIC: u32 = 15; -pub const LANG_IGBO: u32 = 112; -pub const LANG_INDONESIAN: u32 = 33; -pub const LANG_INUKTITUT: u32 = 93; -pub const LANG_IRISH: u32 = 60; -pub const LANG_ITALIAN: u32 = 16; -pub const LANG_JAPANESE: u32 = 17; -pub const LANG_KANNADA: u32 = 75; -pub const LANG_KASHMIRI: u32 = 96; -pub const LANG_KAZAK: u32 = 63; -pub const LANG_KHMER: u32 = 83; -pub const LANG_KICHE: u32 = 134; -pub const LANG_KINYARWANDA: u32 = 135; -pub const LANG_KONKANI: u32 = 87; -pub const LANG_KOREAN: u32 = 18; -pub const LANG_KYRGYZ: u32 = 64; -pub const LANG_LAO: u32 = 84; -pub const LANG_LATVIAN: u32 = 38; -pub const LANG_LITHUANIAN: u32 = 39; -pub const LANG_LOWER_SORBIAN: u32 = 46; -pub const LANG_LUXEMBOURGISH: u32 = 110; -pub const LANG_MACEDONIAN: u32 = 47; -pub const LANG_MALAY: u32 = 62; -pub const LANG_MALAYALAM: u32 = 76; -pub const LANG_MALTESE: u32 = 58; -pub const LANG_MANIPURI: u32 = 88; -pub const LANG_MAORI: u32 = 129; -pub const LANG_MAPUDUNGUN: u32 = 122; -pub const LANG_MARATHI: u32 = 78; -pub const LANG_MOHAWK: u32 = 124; -pub const LANG_MONGOLIAN: u32 = 80; -pub const LANG_NEPALI: u32 = 97; -pub const LANG_NORWEGIAN: u32 = 20; -pub const LANG_OCCITAN: u32 = 130; -pub const LANG_ODIA: u32 = 72; -pub const LANG_ORIYA: u32 = 72; -pub const LANG_PASHTO: u32 = 99; -pub const LANG_PERSIAN: u32 = 41; -pub const LANG_POLISH: u32 = 21; -pub const LANG_PORTUGUESE: u32 = 22; -pub const LANG_PULAR: u32 = 103; -pub const LANG_PUNJABI: u32 = 70; -pub const LANG_QUECHUA: u32 = 107; -pub const LANG_ROMANIAN: u32 = 24; -pub const LANG_ROMANSH: u32 = 23; -pub const LANG_RUSSIAN: u32 = 25; -pub const LANG_SAKHA: u32 = 133; -pub const LANG_SAMI: u32 = 59; -pub const LANG_SANSKRIT: u32 = 79; -pub const LANG_SCOTTISH_GAELIC: u32 = 145; -pub const LANG_SERBIAN: u32 = 26; -pub const LANG_SERBIAN_NEUTRAL: u32 = 31770; -pub const LANG_SINDHI: u32 = 89; -pub const LANG_SINHALESE: u32 = 91; -pub const LANG_SLOVAK: u32 = 27; -pub const LANG_SLOVENIAN: u32 = 36; -pub const LANG_SOTHO: u32 = 108; -pub const LANG_SPANISH: u32 = 10; -pub const LANG_SWAHILI: u32 = 65; -pub const LANG_SWEDISH: u32 = 29; -pub const LANG_SYRIAC: u32 = 90; -pub const LANG_TAJIK: u32 = 40; -pub const LANG_TAMAZIGHT: u32 = 95; -pub const LANG_TAMIL: u32 = 73; -pub const LANG_TATAR: u32 = 68; -pub const LANG_TELUGU: u32 = 74; -pub const LANG_THAI: u32 = 30; -pub const LANG_TIBETAN: u32 = 81; -pub const LANG_TIGRIGNA: u32 = 115; -pub const LANG_TIGRINYA: u32 = 115; -pub const LANG_TSWANA: u32 = 50; -pub const LANG_TURKISH: u32 = 31; -pub const LANG_TURKMEN: u32 = 66; -pub const LANG_UIGHUR: u32 = 128; -pub const LANG_UKRAINIAN: u32 = 34; -pub const LANG_UPPER_SORBIAN: u32 = 46; -pub const LANG_URDU: u32 = 32; -pub const LANG_UZBEK: u32 = 67; -pub const LANG_VALENCIAN: u32 = 3; -pub const LANG_VIETNAMESE: u32 = 42; -pub const LANG_WELSH: u32 = 82; -pub const LANG_WOLOF: u32 = 136; -pub const LANG_XHOSA: u32 = 52; -pub const LANG_YAKUT: u32 = 133; -pub const LANG_YI: u32 = 120; -pub const LANG_YORUBA: u32 = 106; -pub const LANG_ZULU: u32 = 53; -pub const SUBLANG_NEUTRAL: u32 = 0; -pub const SUBLANG_DEFAULT: u32 = 1; -pub const SUBLANG_SYS_DEFAULT: u32 = 2; -pub const SUBLANG_CUSTOM_DEFAULT: u32 = 3; -pub const SUBLANG_CUSTOM_UNSPECIFIED: u32 = 4; -pub const SUBLANG_UI_CUSTOM_DEFAULT: u32 = 5; -pub const SUBLANG_AFRIKAANS_SOUTH_AFRICA: u32 = 1; -pub const SUBLANG_ALBANIAN_ALBANIA: u32 = 1; -pub const SUBLANG_ALSATIAN_FRANCE: u32 = 1; -pub const SUBLANG_AMHARIC_ETHIOPIA: u32 = 1; -pub const SUBLANG_ARABIC_SAUDI_ARABIA: u32 = 1; -pub const SUBLANG_ARABIC_IRAQ: u32 = 2; -pub const SUBLANG_ARABIC_EGYPT: u32 = 3; -pub const SUBLANG_ARABIC_LIBYA: u32 = 4; -pub const SUBLANG_ARABIC_ALGERIA: u32 = 5; -pub const SUBLANG_ARABIC_MOROCCO: u32 = 6; -pub const SUBLANG_ARABIC_TUNISIA: u32 = 7; -pub const SUBLANG_ARABIC_OMAN: u32 = 8; -pub const SUBLANG_ARABIC_YEMEN: u32 = 9; -pub const SUBLANG_ARABIC_SYRIA: u32 = 10; -pub const SUBLANG_ARABIC_JORDAN: u32 = 11; -pub const SUBLANG_ARABIC_LEBANON: u32 = 12; -pub const SUBLANG_ARABIC_KUWAIT: u32 = 13; -pub const SUBLANG_ARABIC_UAE: u32 = 14; -pub const SUBLANG_ARABIC_BAHRAIN: u32 = 15; -pub const SUBLANG_ARABIC_QATAR: u32 = 16; -pub const SUBLANG_ARMENIAN_ARMENIA: u32 = 1; -pub const SUBLANG_ASSAMESE_INDIA: u32 = 1; -pub const SUBLANG_AZERI_LATIN: u32 = 1; -pub const SUBLANG_AZERI_CYRILLIC: u32 = 2; -pub const SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN: u32 = 1; -pub const SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC: u32 = 2; -pub const SUBLANG_BANGLA_INDIA: u32 = 1; -pub const SUBLANG_BANGLA_BANGLADESH: u32 = 2; -pub const SUBLANG_BASHKIR_RUSSIA: u32 = 1; -pub const SUBLANG_BASQUE_BASQUE: u32 = 1; -pub const SUBLANG_BELARUSIAN_BELARUS: u32 = 1; -pub const SUBLANG_BENGALI_INDIA: u32 = 1; -pub const SUBLANG_BENGALI_BANGLADESH: u32 = 2; -pub const SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN: u32 = 5; -pub const SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC: u32 = 8; -pub const SUBLANG_BRETON_FRANCE: u32 = 1; -pub const SUBLANG_BULGARIAN_BULGARIA: u32 = 1; -pub const SUBLANG_CATALAN_CATALAN: u32 = 1; -pub const SUBLANG_CENTRAL_KURDISH_IRAQ: u32 = 1; -pub const SUBLANG_CHEROKEE_CHEROKEE: u32 = 1; -pub const SUBLANG_CHINESE_TRADITIONAL: u32 = 1; -pub const SUBLANG_CHINESE_SIMPLIFIED: u32 = 2; -pub const SUBLANG_CHINESE_HONGKONG: u32 = 3; -pub const SUBLANG_CHINESE_SINGAPORE: u32 = 4; -pub const SUBLANG_CHINESE_MACAU: u32 = 5; -pub const SUBLANG_CORSICAN_FRANCE: u32 = 1; -pub const SUBLANG_CZECH_CZECH_REPUBLIC: u32 = 1; -pub const SUBLANG_CROATIAN_CROATIA: u32 = 1; -pub const SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN: u32 = 4; -pub const SUBLANG_DANISH_DENMARK: u32 = 1; -pub const SUBLANG_DARI_AFGHANISTAN: u32 = 1; -pub const SUBLANG_DIVEHI_MALDIVES: u32 = 1; -pub const SUBLANG_DUTCH: u32 = 1; -pub const SUBLANG_DUTCH_BELGIAN: u32 = 2; -pub const SUBLANG_ENGLISH_US: u32 = 1; -pub const SUBLANG_ENGLISH_UK: u32 = 2; -pub const SUBLANG_ENGLISH_AUS: u32 = 3; -pub const SUBLANG_ENGLISH_CAN: u32 = 4; -pub const SUBLANG_ENGLISH_NZ: u32 = 5; -pub const SUBLANG_ENGLISH_EIRE: u32 = 6; -pub const SUBLANG_ENGLISH_SOUTH_AFRICA: u32 = 7; -pub const SUBLANG_ENGLISH_JAMAICA: u32 = 8; -pub const SUBLANG_ENGLISH_CARIBBEAN: u32 = 9; -pub const SUBLANG_ENGLISH_BELIZE: u32 = 10; -pub const SUBLANG_ENGLISH_TRINIDAD: u32 = 11; -pub const SUBLANG_ENGLISH_ZIMBABWE: u32 = 12; -pub const SUBLANG_ENGLISH_PHILIPPINES: u32 = 13; -pub const SUBLANG_ENGLISH_INDIA: u32 = 16; -pub const SUBLANG_ENGLISH_MALAYSIA: u32 = 17; -pub const SUBLANG_ENGLISH_SINGAPORE: u32 = 18; -pub const SUBLANG_ESTONIAN_ESTONIA: u32 = 1; -pub const SUBLANG_FAEROESE_FAROE_ISLANDS: u32 = 1; -pub const SUBLANG_FILIPINO_PHILIPPINES: u32 = 1; -pub const SUBLANG_FINNISH_FINLAND: u32 = 1; -pub const SUBLANG_FRENCH: u32 = 1; -pub const SUBLANG_FRENCH_BELGIAN: u32 = 2; -pub const SUBLANG_FRENCH_CANADIAN: u32 = 3; -pub const SUBLANG_FRENCH_SWISS: u32 = 4; -pub const SUBLANG_FRENCH_LUXEMBOURG: u32 = 5; -pub const SUBLANG_FRENCH_MONACO: u32 = 6; -pub const SUBLANG_FRISIAN_NETHERLANDS: u32 = 1; -pub const SUBLANG_FULAH_SENEGAL: u32 = 2; -pub const SUBLANG_GALICIAN_GALICIAN: u32 = 1; -pub const SUBLANG_GEORGIAN_GEORGIA: u32 = 1; -pub const SUBLANG_GERMAN: u32 = 1; -pub const SUBLANG_GERMAN_SWISS: u32 = 2; -pub const SUBLANG_GERMAN_AUSTRIAN: u32 = 3; -pub const SUBLANG_GERMAN_LUXEMBOURG: u32 = 4; -pub const SUBLANG_GERMAN_LIECHTENSTEIN: u32 = 5; -pub const SUBLANG_GREEK_GREECE: u32 = 1; -pub const SUBLANG_GREENLANDIC_GREENLAND: u32 = 1; -pub const SUBLANG_GUJARATI_INDIA: u32 = 1; -pub const SUBLANG_HAUSA_NIGERIA_LATIN: u32 = 1; -pub const SUBLANG_HAWAIIAN_US: u32 = 1; -pub const SUBLANG_HEBREW_ISRAEL: u32 = 1; -pub const SUBLANG_HINDI_INDIA: u32 = 1; -pub const SUBLANG_HUNGARIAN_HUNGARY: u32 = 1; -pub const SUBLANG_ICELANDIC_ICELAND: u32 = 1; -pub const SUBLANG_IGBO_NIGERIA: u32 = 1; -pub const SUBLANG_INDONESIAN_INDONESIA: u32 = 1; -pub const SUBLANG_INUKTITUT_CANADA: u32 = 1; -pub const SUBLANG_INUKTITUT_CANADA_LATIN: u32 = 2; -pub const SUBLANG_IRISH_IRELAND: u32 = 2; -pub const SUBLANG_ITALIAN: u32 = 1; -pub const SUBLANG_ITALIAN_SWISS: u32 = 2; -pub const SUBLANG_JAPANESE_JAPAN: u32 = 1; -pub const SUBLANG_KANNADA_INDIA: u32 = 1; -pub const SUBLANG_KASHMIRI_SASIA: u32 = 2; -pub const SUBLANG_KASHMIRI_INDIA: u32 = 2; -pub const SUBLANG_KAZAK_KAZAKHSTAN: u32 = 1; -pub const SUBLANG_KHMER_CAMBODIA: u32 = 1; -pub const SUBLANG_KICHE_GUATEMALA: u32 = 1; -pub const SUBLANG_KINYARWANDA_RWANDA: u32 = 1; -pub const SUBLANG_KONKANI_INDIA: u32 = 1; -pub const SUBLANG_KOREAN: u32 = 1; -pub const SUBLANG_KYRGYZ_KYRGYZSTAN: u32 = 1; -pub const SUBLANG_LAO_LAO: u32 = 1; -pub const SUBLANG_LATVIAN_LATVIA: u32 = 1; -pub const SUBLANG_LITHUANIAN: u32 = 1; -pub const SUBLANG_LOWER_SORBIAN_GERMANY: u32 = 2; -pub const SUBLANG_LUXEMBOURGISH_LUXEMBOURG: u32 = 1; -pub const SUBLANG_MACEDONIAN_MACEDONIA: u32 = 1; -pub const SUBLANG_MALAY_MALAYSIA: u32 = 1; -pub const SUBLANG_MALAY_BRUNEI_DARUSSALAM: u32 = 2; -pub const SUBLANG_MALAYALAM_INDIA: u32 = 1; -pub const SUBLANG_MALTESE_MALTA: u32 = 1; -pub const SUBLANG_MAORI_NEW_ZEALAND: u32 = 1; -pub const SUBLANG_MAPUDUNGUN_CHILE: u32 = 1; -pub const SUBLANG_MARATHI_INDIA: u32 = 1; -pub const SUBLANG_MOHAWK_MOHAWK: u32 = 1; -pub const SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA: u32 = 1; -pub const SUBLANG_MONGOLIAN_PRC: u32 = 2; -pub const SUBLANG_NEPALI_INDIA: u32 = 2; -pub const SUBLANG_NEPALI_NEPAL: u32 = 1; -pub const SUBLANG_NORWEGIAN_BOKMAL: u32 = 1; -pub const SUBLANG_NORWEGIAN_NYNORSK: u32 = 2; -pub const SUBLANG_OCCITAN_FRANCE: u32 = 1; -pub const SUBLANG_ODIA_INDIA: u32 = 1; -pub const SUBLANG_ORIYA_INDIA: u32 = 1; -pub const SUBLANG_PASHTO_AFGHANISTAN: u32 = 1; -pub const SUBLANG_PERSIAN_IRAN: u32 = 1; -pub const SUBLANG_POLISH_POLAND: u32 = 1; -pub const SUBLANG_PORTUGUESE: u32 = 2; -pub const SUBLANG_PORTUGUESE_BRAZILIAN: u32 = 1; -pub const SUBLANG_PULAR_SENEGAL: u32 = 2; -pub const SUBLANG_PUNJABI_INDIA: u32 = 1; -pub const SUBLANG_PUNJABI_PAKISTAN: u32 = 2; -pub const SUBLANG_QUECHUA_BOLIVIA: u32 = 1; -pub const SUBLANG_QUECHUA_ECUADOR: u32 = 2; -pub const SUBLANG_QUECHUA_PERU: u32 = 3; -pub const SUBLANG_ROMANIAN_ROMANIA: u32 = 1; -pub const SUBLANG_ROMANSH_SWITZERLAND: u32 = 1; -pub const SUBLANG_RUSSIAN_RUSSIA: u32 = 1; -pub const SUBLANG_SAKHA_RUSSIA: u32 = 1; -pub const SUBLANG_SAMI_NORTHERN_NORWAY: u32 = 1; -pub const SUBLANG_SAMI_NORTHERN_SWEDEN: u32 = 2; -pub const SUBLANG_SAMI_NORTHERN_FINLAND: u32 = 3; -pub const SUBLANG_SAMI_LULE_NORWAY: u32 = 4; -pub const SUBLANG_SAMI_LULE_SWEDEN: u32 = 5; -pub const SUBLANG_SAMI_SOUTHERN_NORWAY: u32 = 6; -pub const SUBLANG_SAMI_SOUTHERN_SWEDEN: u32 = 7; -pub const SUBLANG_SAMI_SKOLT_FINLAND: u32 = 8; -pub const SUBLANG_SAMI_INARI_FINLAND: u32 = 9; -pub const SUBLANG_SANSKRIT_INDIA: u32 = 1; -pub const SUBLANG_SCOTTISH_GAELIC: u32 = 1; -pub const SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN: u32 = 6; -pub const SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC: u32 = 7; -pub const SUBLANG_SERBIAN_MONTENEGRO_LATIN: u32 = 11; -pub const SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC: u32 = 12; -pub const SUBLANG_SERBIAN_SERBIA_LATIN: u32 = 9; -pub const SUBLANG_SERBIAN_SERBIA_CYRILLIC: u32 = 10; -pub const SUBLANG_SERBIAN_CROATIA: u32 = 1; -pub const SUBLANG_SERBIAN_LATIN: u32 = 2; -pub const SUBLANG_SERBIAN_CYRILLIC: u32 = 3; -pub const SUBLANG_SINDHI_INDIA: u32 = 1; -pub const SUBLANG_SINDHI_PAKISTAN: u32 = 2; -pub const SUBLANG_SINDHI_AFGHANISTAN: u32 = 2; -pub const SUBLANG_SINHALESE_SRI_LANKA: u32 = 1; -pub const SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA: u32 = 1; -pub const SUBLANG_SLOVAK_SLOVAKIA: u32 = 1; -pub const SUBLANG_SLOVENIAN_SLOVENIA: u32 = 1; -pub const SUBLANG_SPANISH: u32 = 1; -pub const SUBLANG_SPANISH_MEXICAN: u32 = 2; -pub const SUBLANG_SPANISH_MODERN: u32 = 3; -pub const SUBLANG_SPANISH_GUATEMALA: u32 = 4; -pub const SUBLANG_SPANISH_COSTA_RICA: u32 = 5; -pub const SUBLANG_SPANISH_PANAMA: u32 = 6; -pub const SUBLANG_SPANISH_DOMINICAN_REPUBLIC: u32 = 7; -pub const SUBLANG_SPANISH_VENEZUELA: u32 = 8; -pub const SUBLANG_SPANISH_COLOMBIA: u32 = 9; -pub const SUBLANG_SPANISH_PERU: u32 = 10; -pub const SUBLANG_SPANISH_ARGENTINA: u32 = 11; -pub const SUBLANG_SPANISH_ECUADOR: u32 = 12; -pub const SUBLANG_SPANISH_CHILE: u32 = 13; -pub const SUBLANG_SPANISH_URUGUAY: u32 = 14; -pub const SUBLANG_SPANISH_PARAGUAY: u32 = 15; -pub const SUBLANG_SPANISH_BOLIVIA: u32 = 16; -pub const SUBLANG_SPANISH_EL_SALVADOR: u32 = 17; -pub const SUBLANG_SPANISH_HONDURAS: u32 = 18; -pub const SUBLANG_SPANISH_NICARAGUA: u32 = 19; -pub const SUBLANG_SPANISH_PUERTO_RICO: u32 = 20; -pub const SUBLANG_SPANISH_US: u32 = 21; -pub const SUBLANG_SWAHILI_KENYA: u32 = 1; -pub const SUBLANG_SWEDISH: u32 = 1; -pub const SUBLANG_SWEDISH_FINLAND: u32 = 2; -pub const SUBLANG_SYRIAC_SYRIA: u32 = 1; -pub const SUBLANG_TAJIK_TAJIKISTAN: u32 = 1; -pub const SUBLANG_TAMAZIGHT_ALGERIA_LATIN: u32 = 2; -pub const SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH: u32 = 4; -pub const SUBLANG_TAMIL_INDIA: u32 = 1; -pub const SUBLANG_TAMIL_SRI_LANKA: u32 = 2; -pub const SUBLANG_TATAR_RUSSIA: u32 = 1; -pub const SUBLANG_TELUGU_INDIA: u32 = 1; -pub const SUBLANG_THAI_THAILAND: u32 = 1; -pub const SUBLANG_TIBETAN_PRC: u32 = 1; -pub const SUBLANG_TIGRIGNA_ERITREA: u32 = 2; -pub const SUBLANG_TIGRINYA_ERITREA: u32 = 2; -pub const SUBLANG_TIGRINYA_ETHIOPIA: u32 = 1; -pub const SUBLANG_TSWANA_BOTSWANA: u32 = 2; -pub const SUBLANG_TSWANA_SOUTH_AFRICA: u32 = 1; -pub const SUBLANG_TURKISH_TURKEY: u32 = 1; -pub const SUBLANG_TURKMEN_TURKMENISTAN: u32 = 1; -pub const SUBLANG_UIGHUR_PRC: u32 = 1; -pub const SUBLANG_UKRAINIAN_UKRAINE: u32 = 1; -pub const SUBLANG_UPPER_SORBIAN_GERMANY: u32 = 1; -pub const SUBLANG_URDU_PAKISTAN: u32 = 1; -pub const SUBLANG_URDU_INDIA: u32 = 2; -pub const SUBLANG_UZBEK_LATIN: u32 = 1; -pub const SUBLANG_UZBEK_CYRILLIC: u32 = 2; -pub const SUBLANG_VALENCIAN_VALENCIA: u32 = 2; -pub const SUBLANG_VIETNAMESE_VIETNAM: u32 = 1; -pub const SUBLANG_WELSH_UNITED_KINGDOM: u32 = 1; -pub const SUBLANG_WOLOF_SENEGAL: u32 = 1; -pub const SUBLANG_XHOSA_SOUTH_AFRICA: u32 = 1; -pub const SUBLANG_YAKUT_RUSSIA: u32 = 1; -pub const SUBLANG_YI_PRC: u32 = 1; -pub const SUBLANG_YORUBA_NIGERIA: u32 = 1; -pub const SUBLANG_ZULU_SOUTH_AFRICA: u32 = 1; -pub const SORT_DEFAULT: u32 = 0; -pub const SORT_INVARIANT_MATH: u32 = 1; -pub const SORT_JAPANESE_XJIS: u32 = 0; -pub const SORT_JAPANESE_UNICODE: u32 = 1; -pub const SORT_JAPANESE_RADICALSTROKE: u32 = 4; -pub const SORT_CHINESE_BIG5: u32 = 0; -pub const SORT_CHINESE_PRCP: u32 = 0; -pub const SORT_CHINESE_UNICODE: u32 = 1; -pub const SORT_CHINESE_PRC: u32 = 2; -pub const SORT_CHINESE_BOPOMOFO: u32 = 3; -pub const SORT_CHINESE_RADICALSTROKE: u32 = 4; -pub const SORT_KOREAN_KSC: u32 = 0; -pub const SORT_KOREAN_UNICODE: u32 = 1; -pub const SORT_GERMAN_PHONE_BOOK: u32 = 1; -pub const SORT_HUNGARIAN_DEFAULT: u32 = 0; -pub const SORT_HUNGARIAN_TECHNICAL: u32 = 1; -pub const SORT_GEORGIAN_TRADITIONAL: u32 = 0; -pub const SORT_GEORGIAN_MODERN: u32 = 1; -pub const NLS_VALID_LOCALE_MASK: u32 = 1048575; -pub const LOCALE_NAME_MAX_LENGTH: u32 = 85; -pub const LOCALE_TRANSIENT_KEYBOARD1: u32 = 8192; -pub const LOCALE_TRANSIENT_KEYBOARD2: u32 = 9216; -pub const LOCALE_TRANSIENT_KEYBOARD3: u32 = 10240; -pub const LOCALE_TRANSIENT_KEYBOARD4: u32 = 11264; -pub const FACILITY_DEBUGGER: u32 = 1; -pub const FACILITY_RPC_RUNTIME: u32 = 2; -pub const FACILITY_RPC_STUBS: u32 = 3; -pub const FACILITY_IO_ERROR_CODE: u32 = 4; -pub const FACILITY_CODCLASS_ERROR_CODE: u32 = 6; -pub const FACILITY_NTWIN32: u32 = 7; -pub const FACILITY_NTCERT: u32 = 8; -pub const FACILITY_NTSSPI: u32 = 9; -pub const FACILITY_TERMINAL_SERVER: u32 = 10; -pub const FACILTIY_MUI_ERROR_CODE: u32 = 11; -pub const FACILITY_USB_ERROR_CODE: u32 = 16; -pub const FACILITY_HID_ERROR_CODE: u32 = 17; -pub const FACILITY_FIREWIRE_ERROR_CODE: u32 = 18; -pub const FACILITY_CLUSTER_ERROR_CODE: u32 = 19; -pub const FACILITY_ACPI_ERROR_CODE: u32 = 20; -pub const FACILITY_SXS_ERROR_CODE: u32 = 21; -pub const FACILITY_TRANSACTION: u32 = 25; -pub const FACILITY_COMMONLOG: u32 = 26; -pub const FACILITY_VIDEO: u32 = 27; -pub const FACILITY_FILTER_MANAGER: u32 = 28; -pub const FACILITY_MONITOR: u32 = 29; -pub const FACILITY_GRAPHICS_KERNEL: u32 = 30; -pub const FACILITY_DRIVER_FRAMEWORK: u32 = 32; -pub const FACILITY_FVE_ERROR_CODE: u32 = 33; -pub const FACILITY_FWP_ERROR_CODE: u32 = 34; -pub const FACILITY_NDIS_ERROR_CODE: u32 = 35; -pub const FACILITY_QUIC_ERROR_CODE: u32 = 36; -pub const FACILITY_TPM: u32 = 41; -pub const FACILITY_RTPM: u32 = 42; -pub const FACILITY_HYPERVISOR: u32 = 53; -pub const FACILITY_IPSEC: u32 = 54; -pub const FACILITY_VIRTUALIZATION: u32 = 55; -pub const FACILITY_VOLMGR: u32 = 56; -pub const FACILITY_BCD_ERROR_CODE: u32 = 57; -pub const FACILITY_WIN32K_NTUSER: u32 = 62; -pub const FACILITY_WIN32K_NTGDI: u32 = 63; -pub const FACILITY_RESUME_KEY_FILTER: u32 = 64; -pub const FACILITY_RDBSS: u32 = 65; -pub const FACILITY_BTH_ATT: u32 = 66; -pub const FACILITY_SECUREBOOT: u32 = 67; -pub const FACILITY_AUDIO_KERNEL: u32 = 68; -pub const FACILITY_VSM: u32 = 69; -pub const FACILITY_NT_IORING: u32 = 70; -pub const FACILITY_VOLSNAP: u32 = 80; -pub const FACILITY_SDBUS: u32 = 81; -pub const FACILITY_SHARED_VHDX: u32 = 92; -pub const FACILITY_SMB: u32 = 93; -pub const FACILITY_XVS: u32 = 94; -pub const FACILITY_INTERIX: u32 = 153; -pub const FACILITY_SPACES: u32 = 231; -pub const FACILITY_SECURITY_CORE: u32 = 232; -pub const FACILITY_SYSTEM_INTEGRITY: u32 = 233; -pub const FACILITY_LICENSING: u32 = 234; -pub const FACILITY_PLATFORM_MANIFEST: u32 = 235; -pub const FACILITY_APP_EXEC: u32 = 236; -pub const FACILITY_MAXIMUM_VALUE: u32 = 237; -pub const STATUS_SEVERITY_SUCCESS: u32 = 0; -pub const STATUS_SEVERITY_INFORMATIONAL: u32 = 1; -pub const STATUS_SEVERITY_WARNING: u32 = 2; -pub const STATUS_SEVERITY_ERROR: u32 = 3; -pub const BUGCHECK_CONTEXT_MODIFIER: u32 = 2147483648; -pub const FACILITY_MCA_ERROR_CODE: u32 = 5; -pub const MCA_EXTREG_V2MAX: u32 = 24; -pub const LOW_LEVEL: u32 = 0; -pub const CMCI_LEVEL: u32 = 5; -pub const CLOCK_LEVEL: u32 = 13; -pub const IPI_LEVEL: u32 = 14; -pub const DRS_LEVEL: u32 = 14; -pub const POWER_LEVEL: u32 = 14; -pub const PROFILE_LEVEL: u32 = 15; -pub const LOW_PRIORITY: u32 = 0; -pub const LOW_REALTIME_PRIORITY: u32 = 16; -pub const HIGH_PRIORITY: u32 = 31; -pub const MAXIMUM_PRIORITY: u32 = 32; -pub const MAXIMUM_WAIT_OBJECTS: u32 = 64; -pub const MAXIMUM_SUSPEND_COUNT: u32 = 127; -pub const LOCK_QUEUE_WAIT: u32 = 1; -pub const LOCK_QUEUE_WAIT_BIT: u32 = 0; -pub const LOCK_QUEUE_OWNER: u32 = 2; -pub const LOCK_QUEUE_OWNER_BIT: u32 = 1; -pub const LOCK_QUEUE_HALTED: u32 = 4; -pub const LOCK_QUEUE_HALTED_BIT: u32 = 2; -pub const LOCK_QUEUE_VALID_FLAGS: u32 = 7; -pub const LockQueueUnusedSpare0: u32 = 0; -pub const LockQueueUnusedSpare1: u32 = 1; -pub const LockQueueUnusedSpare2: u32 = 2; -pub const LockQueueUnusedSpare3: u32 = 3; -pub const LockQueueVacbLock: u32 = 4; -pub const LockQueueMasterLock: u32 = 5; -pub const LockQueueNonPagedPoolLock: u32 = 6; -pub const LockQueueIoCancelLock: u32 = 7; -pub const LockQueueUnusedSpare8: u32 = 8; -pub const LockQueueIoVpbLock: u32 = 9; -pub const LockQueueIoDatabaseLock: u32 = 10; -pub const LockQueueIoCompletionLock: u32 = 11; -pub const LockQueueNtfsStructLock: u32 = 12; -pub const LockQueueAfdWorkQueueLock: u32 = 13; -pub const LockQueueBcbLock: u32 = 14; -pub const LockQueueUnusedSpare15: u32 = 15; -pub const LockQueueUnusedSpare16: u32 = 16; -pub const LockQueueMaximumLock: u32 = 17; -pub const DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK_SIGNATURE: u32 = 2931740382; -pub const DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK_REVISION_1: u32 = 1; -pub const _MM_HINT_T0: u32 = 1; -pub const _MM_HINT_T1: u32 = 2; -pub const _MM_HINT_T2: u32 = 3; -pub const _MM_HINT_NTA: u32 = 0; -pub const PF_TEMPORAL_LEVEL_1: u32 = 1; -pub const PF_TEMPORAL_LEVEL_2: u32 = 2; -pub const PF_TEMPORAL_LEVEL_3: u32 = 3; -pub const PF_NON_TEMPORAL_LEVEL_ALL: u32 = 0; -pub const DELETE: u32 = 65536; -pub const READ_CONTROL: u32 = 131072; -pub const WRITE_DAC: u32 = 262144; -pub const WRITE_OWNER: u32 = 524288; -pub const SYNCHRONIZE: u32 = 1048576; -pub const STANDARD_RIGHTS_REQUIRED: u32 = 983040; -pub const STANDARD_RIGHTS_READ: u32 = 131072; -pub const STANDARD_RIGHTS_WRITE: u32 = 131072; -pub const STANDARD_RIGHTS_EXECUTE: u32 = 131072; -pub const STANDARD_RIGHTS_ALL: u32 = 2031616; -pub const SPECIFIC_RIGHTS_ALL: u32 = 65535; -pub const ACCESS_SYSTEM_SECURITY: u32 = 16777216; -pub const MAXIMUM_ALLOWED: u32 = 33554432; -pub const GENERIC_READ: u32 = 2147483648; -pub const GENERIC_WRITE: u32 = 1073741824; -pub const GENERIC_EXECUTE: u32 = 536870912; -pub const GENERIC_ALL: u32 = 268435456; -pub const ACL_REVISION: u32 = 2; -pub const ACL_REVISION_DS: u32 = 4; -pub const ACL_REVISION1: u32 = 1; -pub const ACL_REVISION2: u32 = 2; -pub const ACL_REVISION3: u32 = 3; -pub const ACL_REVISION4: u32 = 4; -pub const MAX_ACL_REVISION: u32 = 4; -pub const SECURITY_DESCRIPTOR_REVISION: u32 = 1; -pub const SECURITY_DESCRIPTOR_REVISION1: u32 = 1; -pub const SE_PRIVILEGE_ENABLED_BY_DEFAULT: u32 = 1; -pub const SE_PRIVILEGE_ENABLED: u32 = 2; -pub const SE_PRIVILEGE_REMOVED: u32 = 4; -pub const SE_PRIVILEGE_USED_FOR_ACCESS: u32 = 2147483648; -pub const SE_PRIVILEGE_VALID_ATTRIBUTES: u32 = 2147483655; -pub const PRIVILEGE_SET_ALL_NECESSARY: u32 = 1; -pub const SE_MIN_WELL_KNOWN_PRIVILEGE: u32 = 2; -pub const SE_CREATE_TOKEN_PRIVILEGE: u32 = 2; -pub const SE_ASSIGNPRIMARYTOKEN_PRIVILEGE: u32 = 3; -pub const SE_LOCK_MEMORY_PRIVILEGE: u32 = 4; -pub const SE_INCREASE_QUOTA_PRIVILEGE: u32 = 5; -pub const SE_MACHINE_ACCOUNT_PRIVILEGE: u32 = 6; -pub const SE_TCB_PRIVILEGE: u32 = 7; -pub const SE_SECURITY_PRIVILEGE: u32 = 8; -pub const SE_TAKE_OWNERSHIP_PRIVILEGE: u32 = 9; -pub const SE_LOAD_DRIVER_PRIVILEGE: u32 = 10; -pub const SE_SYSTEM_PROFILE_PRIVILEGE: u32 = 11; -pub const SE_SYSTEMTIME_PRIVILEGE: u32 = 12; -pub const SE_PROF_SINGLE_PROCESS_PRIVILEGE: u32 = 13; -pub const SE_INC_BASE_PRIORITY_PRIVILEGE: u32 = 14; -pub const SE_CREATE_PAGEFILE_PRIVILEGE: u32 = 15; -pub const SE_CREATE_PERMANENT_PRIVILEGE: u32 = 16; -pub const SE_BACKUP_PRIVILEGE: u32 = 17; -pub const SE_RESTORE_PRIVILEGE: u32 = 18; -pub const SE_SHUTDOWN_PRIVILEGE: u32 = 19; -pub const SE_DEBUG_PRIVILEGE: u32 = 20; -pub const SE_AUDIT_PRIVILEGE: u32 = 21; -pub const SE_SYSTEM_ENVIRONMENT_PRIVILEGE: u32 = 22; -pub const SE_CHANGE_NOTIFY_PRIVILEGE: u32 = 23; -pub const SE_REMOTE_SHUTDOWN_PRIVILEGE: u32 = 24; -pub const SE_UNDOCK_PRIVILEGE: u32 = 25; -pub const SE_SYNC_AGENT_PRIVILEGE: u32 = 26; -pub const SE_ENABLE_DELEGATION_PRIVILEGE: u32 = 27; -pub const SE_MANAGE_VOLUME_PRIVILEGE: u32 = 28; -pub const SE_IMPERSONATE_PRIVILEGE: u32 = 29; -pub const SE_CREATE_GLOBAL_PRIVILEGE: u32 = 30; -pub const SE_TRUSTED_CREDMAN_ACCESS_PRIVILEGE: u32 = 31; -pub const SE_RELABEL_PRIVILEGE: u32 = 32; -pub const SE_INC_WORKING_SET_PRIVILEGE: u32 = 33; -pub const SE_TIME_ZONE_PRIVILEGE: u32 = 34; -pub const SE_CREATE_SYMBOLIC_LINK_PRIVILEGE: u32 = 35; -pub const SE_DELEGATE_SESSION_USER_IMPERSONATE_PRIVILEGE: u32 = 36; -pub const SE_MAX_WELL_KNOWN_PRIVILEGE: u32 = 36; -pub const SECURITY_DYNAMIC_TRACKING: u32 = 1; -pub const SECURITY_STATIC_TRACKING: u32 = 0; -pub const OWNER_SECURITY_INFORMATION: u32 = 1; -pub const GROUP_SECURITY_INFORMATION: u32 = 2; -pub const DACL_SECURITY_INFORMATION: u32 = 4; -pub const SACL_SECURITY_INFORMATION: u32 = 8; -pub const LABEL_SECURITY_INFORMATION: u32 = 16; -pub const ATTRIBUTE_SECURITY_INFORMATION: u32 = 32; -pub const SCOPE_SECURITY_INFORMATION: u32 = 64; -pub const PROCESS_TRUST_LABEL_SECURITY_INFORMATION: u32 = 128; -pub const ACCESS_FILTER_SECURITY_INFORMATION: u32 = 256; -pub const BACKUP_SECURITY_INFORMATION: u32 = 65536; -pub const PROTECTED_DACL_SECURITY_INFORMATION: u32 = 2147483648; -pub const PROTECTED_SACL_SECURITY_INFORMATION: u32 = 1073741824; -pub const UNPROTECTED_DACL_SECURITY_INFORMATION: u32 = 536870912; -pub const UNPROTECTED_SACL_SECURITY_INFORMATION: u32 = 268435456; -pub const SE_ADT_OBJECT_ONLY: u32 = 1; -pub const SE_MAX_AUDIT_PARAMETERS: u32 = 32; -pub const SE_MAX_GENERIC_AUDIT_PARAMETERS: u32 = 28; -pub const SE_ADT_PARAMETERS_SELF_RELATIVE: u32 = 1; -pub const SE_ADT_PARAMETERS_SEND_TO_LSA: u32 = 2; -pub const SE_ADT_PARAMETER_EXTENSIBLE_AUDIT: u32 = 4; -pub const SE_ADT_PARAMETER_GENERIC_AUDIT: u32 = 8; -pub const SE_ADT_PARAMETER_WRITE_SYNCHRONOUS: u32 = 16; -pub const FILE_DEVICE_BEEP: u32 = 1; -pub const FILE_DEVICE_CD_ROM: u32 = 2; -pub const FILE_DEVICE_CD_ROM_FILE_SYSTEM: u32 = 3; -pub const FILE_DEVICE_CONTROLLER: u32 = 4; -pub const FILE_DEVICE_DATALINK: u32 = 5; -pub const FILE_DEVICE_DFS: u32 = 6; -pub const FILE_DEVICE_DISK: u32 = 7; -pub const FILE_DEVICE_DISK_FILE_SYSTEM: u32 = 8; -pub const FILE_DEVICE_FILE_SYSTEM: u32 = 9; -pub const FILE_DEVICE_INPORT_PORT: u32 = 10; -pub const FILE_DEVICE_KEYBOARD: u32 = 11; -pub const FILE_DEVICE_MAILSLOT: u32 = 12; -pub const FILE_DEVICE_MIDI_IN: u32 = 13; -pub const FILE_DEVICE_MIDI_OUT: u32 = 14; -pub const FILE_DEVICE_MOUSE: u32 = 15; -pub const FILE_DEVICE_MULTI_UNC_PROVIDER: u32 = 16; -pub const FILE_DEVICE_NAMED_PIPE: u32 = 17; -pub const FILE_DEVICE_NETWORK: u32 = 18; -pub const FILE_DEVICE_NETWORK_BROWSER: u32 = 19; -pub const FILE_DEVICE_NETWORK_FILE_SYSTEM: u32 = 20; -pub const FILE_DEVICE_NULL: u32 = 21; -pub const FILE_DEVICE_PARALLEL_PORT: u32 = 22; -pub const FILE_DEVICE_PHYSICAL_NETCARD: u32 = 23; -pub const FILE_DEVICE_PRINTER: u32 = 24; -pub const FILE_DEVICE_SCANNER: u32 = 25; -pub const FILE_DEVICE_SERIAL_MOUSE_PORT: u32 = 26; -pub const FILE_DEVICE_SERIAL_PORT: u32 = 27; -pub const FILE_DEVICE_SCREEN: u32 = 28; -pub const FILE_DEVICE_SOUND: u32 = 29; -pub const FILE_DEVICE_STREAMS: u32 = 30; -pub const FILE_DEVICE_TAPE: u32 = 31; -pub const FILE_DEVICE_TAPE_FILE_SYSTEM: u32 = 32; -pub const FILE_DEVICE_TRANSPORT: u32 = 33; -pub const FILE_DEVICE_UNKNOWN: u32 = 34; -pub const FILE_DEVICE_VIDEO: u32 = 35; -pub const FILE_DEVICE_VIRTUAL_DISK: u32 = 36; -pub const FILE_DEVICE_WAVE_IN: u32 = 37; -pub const FILE_DEVICE_WAVE_OUT: u32 = 38; -pub const FILE_DEVICE_8042_PORT: u32 = 39; -pub const FILE_DEVICE_NETWORK_REDIRECTOR: u32 = 40; -pub const FILE_DEVICE_BATTERY: u32 = 41; -pub const FILE_DEVICE_BUS_EXTENDER: u32 = 42; -pub const FILE_DEVICE_MODEM: u32 = 43; -pub const FILE_DEVICE_VDM: u32 = 44; -pub const FILE_DEVICE_MASS_STORAGE: u32 = 45; -pub const FILE_DEVICE_SMB: u32 = 46; -pub const FILE_DEVICE_KS: u32 = 47; -pub const FILE_DEVICE_CHANGER: u32 = 48; -pub const FILE_DEVICE_SMARTCARD: u32 = 49; -pub const FILE_DEVICE_ACPI: u32 = 50; -pub const FILE_DEVICE_DVD: u32 = 51; -pub const FILE_DEVICE_FULLSCREEN_VIDEO: u32 = 52; -pub const FILE_DEVICE_DFS_FILE_SYSTEM: u32 = 53; -pub const FILE_DEVICE_DFS_VOLUME: u32 = 54; -pub const FILE_DEVICE_SERENUM: u32 = 55; -pub const FILE_DEVICE_TERMSRV: u32 = 56; -pub const FILE_DEVICE_KSEC: u32 = 57; -pub const FILE_DEVICE_FIPS: u32 = 58; -pub const FILE_DEVICE_INFINIBAND: u32 = 59; -pub const FILE_DEVICE_VMBUS: u32 = 62; -pub const FILE_DEVICE_CRYPT_PROVIDER: u32 = 63; -pub const FILE_DEVICE_WPD: u32 = 64; -pub const FILE_DEVICE_BLUETOOTH: u32 = 65; -pub const FILE_DEVICE_MT_COMPOSITE: u32 = 66; -pub const FILE_DEVICE_MT_TRANSPORT: u32 = 67; -pub const FILE_DEVICE_BIOMETRIC: u32 = 68; -pub const FILE_DEVICE_PMI: u32 = 69; -pub const FILE_DEVICE_EHSTOR: u32 = 70; -pub const FILE_DEVICE_DEVAPI: u32 = 71; -pub const FILE_DEVICE_GPIO: u32 = 72; -pub const FILE_DEVICE_USBEX: u32 = 73; -pub const FILE_DEVICE_CONSOLE: u32 = 80; -pub const FILE_DEVICE_NFP: u32 = 81; -pub const FILE_DEVICE_SYSENV: u32 = 82; -pub const FILE_DEVICE_VIRTUAL_BLOCK: u32 = 83; -pub const FILE_DEVICE_POINT_OF_SERVICE: u32 = 84; -pub const FILE_DEVICE_STORAGE_REPLICATION: u32 = 85; -pub const FILE_DEVICE_TRUST_ENV: u32 = 86; -pub const FILE_DEVICE_UCM: u32 = 87; -pub const FILE_DEVICE_UCMTCPCI: u32 = 88; -pub const FILE_DEVICE_PERSISTENT_MEMORY: u32 = 89; -pub const FILE_DEVICE_NVDIMM: u32 = 90; -pub const FILE_DEVICE_HOLOGRAPHIC: u32 = 91; -pub const FILE_DEVICE_SDFXHCI: u32 = 92; -pub const FILE_DEVICE_UCMUCSI: u32 = 93; -pub const FILE_DEVICE_PRM: u32 = 94; -pub const FILE_DEVICE_EVENT_COLLECTOR: u32 = 95; -pub const FILE_DEVICE_USB4: u32 = 96; -pub const FILE_DEVICE_SOUNDWIRE: u32 = 97; -pub const METHOD_BUFFERED: u32 = 0; -pub const METHOD_IN_DIRECT: u32 = 1; -pub const METHOD_OUT_DIRECT: u32 = 2; -pub const METHOD_NEITHER: u32 = 3; -pub const METHOD_DIRECT_TO_HARDWARE: u32 = 1; -pub const METHOD_DIRECT_FROM_HARDWARE: u32 = 2; -pub const FILE_ANY_ACCESS: u32 = 0; -pub const FILE_SPECIAL_ACCESS: u32 = 0; -pub const FILE_READ_ACCESS: u32 = 1; -pub const FILE_WRITE_ACCESS: u32 = 2; -pub const FILE_READ_DATA: u32 = 1; -pub const FILE_LIST_DIRECTORY: u32 = 1; -pub const FILE_WRITE_DATA: u32 = 2; -pub const FILE_ADD_FILE: u32 = 2; -pub const FILE_APPEND_DATA: u32 = 4; -pub const FILE_ADD_SUBDIRECTORY: u32 = 4; -pub const FILE_CREATE_PIPE_INSTANCE: u32 = 4; -pub const FILE_READ_EA: u32 = 8; -pub const FILE_WRITE_EA: u32 = 16; -pub const FILE_EXECUTE: u32 = 32; -pub const FILE_TRAVERSE: u32 = 32; -pub const FILE_DELETE_CHILD: u32 = 64; -pub const FILE_READ_ATTRIBUTES: u32 = 128; -pub const FILE_WRITE_ATTRIBUTES: u32 = 256; -pub const FILE_ALL_ACCESS: u32 = 2032127; -pub const FILE_GENERIC_READ: u32 = 1179785; -pub const FILE_GENERIC_WRITE: u32 = 1179926; -pub const FILE_GENERIC_EXECUTE: u32 = 1179808; -pub const FILE_SHARE_READ: u32 = 1; -pub const FILE_SHARE_WRITE: u32 = 2; -pub const FILE_SHARE_DELETE: u32 = 4; -pub const FILE_SHARE_VALID_FLAGS: u32 = 7; -pub const FILE_ATTRIBUTE_READONLY: u32 = 1; -pub const FILE_ATTRIBUTE_HIDDEN: u32 = 2; -pub const FILE_ATTRIBUTE_SYSTEM: u32 = 4; -pub const FILE_ATTRIBUTE_DIRECTORY: u32 = 16; -pub const FILE_ATTRIBUTE_ARCHIVE: u32 = 32; -pub const FILE_ATTRIBUTE_DEVICE: u32 = 64; -pub const FILE_ATTRIBUTE_NORMAL: u32 = 128; -pub const FILE_ATTRIBUTE_TEMPORARY: u32 = 256; -pub const FILE_ATTRIBUTE_SPARSE_FILE: u32 = 512; -pub const FILE_ATTRIBUTE_REPARSE_POINT: u32 = 1024; -pub const FILE_ATTRIBUTE_COMPRESSED: u32 = 2048; -pub const FILE_ATTRIBUTE_OFFLINE: u32 = 4096; -pub const FILE_ATTRIBUTE_NOT_CONTENT_INDEXED: u32 = 8192; -pub const FILE_ATTRIBUTE_ENCRYPTED: u32 = 16384; -pub const FILE_ATTRIBUTE_INTEGRITY_STREAM: u32 = 32768; -pub const FILE_ATTRIBUTE_VIRTUAL: u32 = 65536; -pub const FILE_ATTRIBUTE_NO_SCRUB_DATA: u32 = 131072; -pub const FILE_ATTRIBUTE_EA: u32 = 262144; -pub const FILE_ATTRIBUTE_PINNED: u32 = 524288; -pub const FILE_ATTRIBUTE_UNPINNED: u32 = 1048576; -pub const FILE_ATTRIBUTE_RECALL_ON_OPEN: u32 = 262144; -pub const FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS: u32 = 4194304; -pub const TREE_CONNECT_ATTRIBUTE_PRIVACY: u32 = 16384; -pub const TREE_CONNECT_ATTRIBUTE_INTEGRITY: u32 = 32768; -pub const TREE_CONNECT_ATTRIBUTE_GLOBAL: u32 = 4; -pub const TREE_CONNECT_ATTRIBUTE_PINNED: u32 = 2; -pub const FILE_ATTRIBUTE_STRICTLY_SEQUENTIAL: u32 = 536870912; -pub const FILE_ATTRIBUTE_VALID_FLAGS: u32 = 5963703; -pub const FILE_ATTRIBUTE_VALID_SET_FLAGS: u32 = 1716647; -pub const FILE_ATTRIBUTE_VALID_KERNEL_SET_FLAGS: u32 = 5910951; -pub const FILE_SUPERSEDE: u32 = 0; -pub const FILE_OPEN: u32 = 1; -pub const FILE_CREATE: u32 = 2; -pub const FILE_OPEN_IF: u32 = 3; -pub const FILE_OVERWRITE: u32 = 4; -pub const FILE_OVERWRITE_IF: u32 = 5; -pub const FILE_MAXIMUM_DISPOSITION: u32 = 5; -pub const FILE_DIRECTORY_FILE: u32 = 1; -pub const FILE_WRITE_THROUGH: u32 = 2; -pub const FILE_SEQUENTIAL_ONLY: u32 = 4; -pub const FILE_NO_INTERMEDIATE_BUFFERING: u32 = 8; -pub const FILE_SYNCHRONOUS_IO_ALERT: u32 = 16; -pub const FILE_SYNCHRONOUS_IO_NONALERT: u32 = 32; -pub const FILE_NON_DIRECTORY_FILE: u32 = 64; -pub const FILE_CREATE_TREE_CONNECTION: u32 = 128; -pub const FILE_COMPLETE_IF_OPLOCKED: u32 = 256; -pub const FILE_NO_EA_KNOWLEDGE: u32 = 512; -pub const FILE_OPEN_REMOTE_INSTANCE: u32 = 1024; -pub const FILE_RANDOM_ACCESS: u32 = 2048; -pub const FILE_DELETE_ON_CLOSE: u32 = 4096; -pub const FILE_OPEN_BY_FILE_ID: u32 = 8192; -pub const FILE_OPEN_FOR_BACKUP_INTENT: u32 = 16384; -pub const FILE_NO_COMPRESSION: u32 = 32768; -pub const FILE_OPEN_REQUIRING_OPLOCK: u32 = 65536; -pub const FILE_DISALLOW_EXCLUSIVE: u32 = 131072; -pub const FILE_SESSION_AWARE: u32 = 262144; -pub const FILE_RESERVE_OPFILTER: u32 = 1048576; -pub const FILE_OPEN_REPARSE_POINT: u32 = 2097152; -pub const FILE_OPEN_NO_RECALL: u32 = 4194304; -pub const FILE_OPEN_FOR_FREE_SPACE_QUERY: u32 = 8388608; -pub const TREE_CONNECT_NO_CLIENT_BUFFERING: u32 = 8; -pub const TREE_CONNECT_WRITE_THROUGH: u32 = 2; -pub const FILE_VALID_OPTION_FLAGS: u32 = 16777215; -pub const FILE_VALID_PIPE_OPTION_FLAGS: u32 = 50; -pub const FILE_VALID_MAILSLOT_OPTION_FLAGS: u32 = 50; -pub const FILE_VALID_SET_FLAGS: u32 = 54; -pub const FILE_CONTAINS_EXTENDED_CREATE_INFORMATION: u32 = 268435456; -pub const FILE_VALID_EXTENDED_OPTION_FLAGS: u32 = 268435456; -pub const EX_CREATE_FLAG_FILE_SOURCE_OPEN_FOR_COPY: u32 = 1; -pub const EX_CREATE_FLAG_FILE_DEST_OPEN_FOR_COPY: u32 = 2; -pub const FILE_SUPERSEDED: u32 = 0; -pub const FILE_OPENED: u32 = 1; -pub const FILE_CREATED: u32 = 2; -pub const FILE_OVERWRITTEN: u32 = 3; -pub const FILE_EXISTS: u32 = 4; -pub const FILE_DOES_NOT_EXIST: u32 = 5; -pub const FILE_QUERY_RESTART_SCAN: u32 = 1; -pub const FILE_QUERY_RETURN_SINGLE_ENTRY: u32 = 2; -pub const FILE_QUERY_INDEX_SPECIFIED: u32 = 4; -pub const FILE_QUERY_RETURN_ON_DISK_ENTRIES_ONLY: u32 = 8; -pub const FILE_QUERY_NO_CURSOR_UPDATE: u32 = 16; -pub const FILE_WRITE_TO_END_OF_FILE: u32 = 4294967295; -pub const FILE_USE_FILE_POINTER_POSITION: u32 = 4294967294; -pub const FILE_BYTE_ALIGNMENT: u32 = 0; -pub const FILE_WORD_ALIGNMENT: u32 = 1; -pub const FILE_LONG_ALIGNMENT: u32 = 3; -pub const FILE_QUAD_ALIGNMENT: u32 = 7; -pub const FILE_OCTA_ALIGNMENT: u32 = 15; -pub const FILE_32_BYTE_ALIGNMENT: u32 = 31; -pub const FILE_64_BYTE_ALIGNMENT: u32 = 63; -pub const FILE_128_BYTE_ALIGNMENT: u32 = 127; -pub const FILE_256_BYTE_ALIGNMENT: u32 = 255; -pub const FILE_512_BYTE_ALIGNMENT: u32 = 511; -pub const MAXIMUM_FILENAME_LENGTH: u32 = 256; -pub const FILE_REMOVABLE_MEDIA: u32 = 1; -pub const FILE_READ_ONLY_DEVICE: u32 = 2; -pub const FILE_FLOPPY_DISKETTE: u32 = 4; -pub const FILE_WRITE_ONCE_MEDIA: u32 = 8; -pub const FILE_REMOTE_DEVICE: u32 = 16; -pub const FILE_DEVICE_IS_MOUNTED: u32 = 32; -pub const FILE_VIRTUAL_VOLUME: u32 = 64; -pub const FILE_AUTOGENERATED_DEVICE_NAME: u32 = 128; -pub const FILE_DEVICE_SECURE_OPEN: u32 = 256; -pub const FILE_CHARACTERISTIC_PNP_DEVICE: u32 = 2048; -pub const FILE_CHARACTERISTIC_TS_DEVICE: u32 = 4096; -pub const FILE_CHARACTERISTIC_WEBDAV_DEVICE: u32 = 8192; -pub const FILE_CHARACTERISTIC_CSV: u32 = 65536; -pub const FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL: u32 = 131072; -pub const FILE_PORTABLE_DEVICE: u32 = 262144; -pub const FILE_REMOTE_DEVICE_VSMB: u32 = 524288; -pub const FILE_DEVICE_REQUIRE_SECURITY_CHECK: u32 = 1048576; -pub const IO_SESSION_STATE_ALL_EVENTS: u32 = 4294967295; -pub const IO_SESSION_STATE_CREATION_EVENT: u32 = 1; -pub const IO_SESSION_STATE_TERMINATION_EVENT: u32 = 2; -pub const IO_SESSION_STATE_CONNECT_EVENT: u32 = 4; -pub const IO_SESSION_STATE_DISCONNECT_EVENT: u32 = 8; -pub const IO_SESSION_STATE_LOGON_EVENT: u32 = 16; -pub const IO_SESSION_STATE_LOGOFF_EVENT: u32 = 32; -pub const IO_SESSION_STATE_VALID_EVENT_MASK: u32 = 63; -pub const IO_SESSION_MAX_PAYLOAD_SIZE: u32 = 256; -pub const FILE_SKIP_COMPLETION_PORT_ON_SUCCESS: u32 = 1; -pub const FILE_SKIP_SET_EVENT_ON_HANDLE: u32 = 2; -pub const FILE_SKIP_SET_USER_EVENT_ON_FAST_IO: u32 = 4; -pub const FLUSH_FLAGS_FILE_DATA_ONLY: u32 = 1; -pub const FLUSH_FLAGS_NO_SYNC: u32 = 2; -pub const FLUSH_FLAGS_FILE_DATA_SYNC_ONLY: u32 = 4; -pub const ERROR_LOG_LIMIT_SIZE: u32 = 240; -pub const PORT_MAXIMUM_MESSAGE_LENGTH: u32 = 512; -pub const KEY_QUERY_VALUE: u32 = 1; -pub const KEY_SET_VALUE: u32 = 2; -pub const KEY_CREATE_SUB_KEY: u32 = 4; -pub const KEY_ENUMERATE_SUB_KEYS: u32 = 8; -pub const KEY_NOTIFY: u32 = 16; -pub const KEY_CREATE_LINK: u32 = 32; -pub const KEY_WOW64_32KEY: u32 = 512; -pub const KEY_WOW64_64KEY: u32 = 256; -pub const KEY_WOW64_RES: u32 = 768; -pub const KEY_READ: u32 = 131097; -pub const KEY_WRITE: u32 = 131078; -pub const KEY_EXECUTE: u32 = 131097; -pub const KEY_ALL_ACCESS: u32 = 983103; -pub const REG_OPTION_RESERVED: u32 = 0; -pub const REG_OPTION_NON_VOLATILE: u32 = 0; -pub const REG_OPTION_VOLATILE: u32 = 1; -pub const REG_OPTION_CREATE_LINK: u32 = 2; -pub const REG_OPTION_BACKUP_RESTORE: u32 = 4; -pub const REG_OPTION_OPEN_LINK: u32 = 8; -pub const REG_OPTION_DONT_VIRTUALIZE: u32 = 16; -pub const REG_LEGAL_OPTION: u32 = 31; -pub const REG_OPEN_LEGAL_OPTION: u32 = 28; -pub const REG_CREATED_NEW_KEY: u32 = 1; -pub const REG_OPENED_EXISTING_KEY: u32 = 2; -pub const REG_STANDARD_FORMAT: u32 = 1; -pub const REG_LATEST_FORMAT: u32 = 2; -pub const REG_NO_COMPRESSION: u32 = 4; -pub const REG_WHOLE_HIVE_VOLATILE: u32 = 1; -pub const REG_REFRESH_HIVE: u32 = 2; -pub const REG_NO_LAZY_FLUSH: u32 = 4; -pub const REG_FORCE_RESTORE: u32 = 8; -pub const REG_APP_HIVE: u32 = 16; -pub const REG_PROCESS_PRIVATE: u32 = 32; -pub const REG_START_JOURNAL: u32 = 64; -pub const REG_HIVE_EXACT_FILE_GROWTH: u32 = 128; -pub const REG_HIVE_NO_RM: u32 = 256; -pub const REG_HIVE_SINGLE_LOG: u32 = 512; -pub const REG_BOOT_HIVE: u32 = 1024; -pub const REG_LOAD_HIVE_OPEN_HANDLE: u32 = 2048; -pub const REG_FLUSH_HIVE_FILE_GROWTH: u32 = 4096; -pub const REG_OPEN_READ_ONLY: u32 = 8192; -pub const REG_IMMUTABLE: u32 = 16384; -pub const REG_NO_IMPERSONATION_FALLBACK: u32 = 32768; -pub const REG_APP_HIVE_OPEN_READ_ONLY: u32 = 8192; -pub const REG_FORCE_UNLOAD: u32 = 1; -pub const REG_UNLOAD_LEGAL_FLAGS: u32 = 1; -pub const REG_NOTIFY_CHANGE_NAME: u32 = 1; -pub const REG_NOTIFY_CHANGE_ATTRIBUTES: u32 = 2; -pub const REG_NOTIFY_CHANGE_LAST_SET: u32 = 4; -pub const REG_NOTIFY_CHANGE_SECURITY: u32 = 8; -pub const REG_NOTIFY_THREAD_AGNOSTIC: u32 = 268435456; -pub const REG_LEGAL_CHANGE_FILTER: u32 = 268435471; -pub const OBJECT_TYPE_CREATE: u32 = 1; -pub const OBJECT_TYPE_ALL_ACCESS: u32 = 983041; -pub const DIRECTORY_QUERY: u32 = 1; -pub const DIRECTORY_TRAVERSE: u32 = 2; -pub const DIRECTORY_CREATE_OBJECT: u32 = 4; -pub const DIRECTORY_CREATE_SUBDIRECTORY: u32 = 8; -pub const DIRECTORY_ALL_ACCESS: u32 = 983055; -pub const SYMBOLIC_LINK_QUERY: u32 = 1; -pub const SYMBOLIC_LINK_SET: u32 = 2; -pub const SYMBOLIC_LINK_ALL_ACCESS: u32 = 983041; -pub const SYMBOLIC_LINK_ALL_ACCESS_EX: u32 = 1048575; -pub const DUPLICATE_CLOSE_SOURCE: u32 = 1; -pub const DUPLICATE_SAME_ACCESS: u32 = 2; -pub const DUPLICATE_SAME_ATTRIBUTES: u32 = 4; -pub const SECTION_QUERY: u32 = 1; -pub const SECTION_MAP_WRITE: u32 = 2; -pub const SECTION_MAP_READ: u32 = 4; -pub const SECTION_MAP_EXECUTE: u32 = 8; -pub const SECTION_EXTEND_SIZE: u32 = 16; -pub const SECTION_MAP_EXECUTE_EXPLICIT: u32 = 32; -pub const SECTION_ALL_ACCESS: u32 = 983071; -pub const SESSION_QUERY_ACCESS: u32 = 1; -pub const SESSION_MODIFY_ACCESS: u32 = 2; -pub const SESSION_ALL_ACCESS: u32 = 983043; -pub const SEGMENT_ALL_ACCESS: u32 = 983071; -pub const PAGE_NOACCESS: u32 = 1; -pub const PAGE_READONLY: u32 = 2; -pub const PAGE_READWRITE: u32 = 4; -pub const PAGE_WRITECOPY: u32 = 8; -pub const PAGE_EXECUTE: u32 = 16; -pub const PAGE_EXECUTE_READ: u32 = 32; -pub const PAGE_EXECUTE_READWRITE: u32 = 64; -pub const PAGE_EXECUTE_WRITECOPY: u32 = 128; -pub const PAGE_GUARD: u32 = 256; -pub const PAGE_NOCACHE: u32 = 512; -pub const PAGE_WRITECOMBINE: u32 = 1024; -pub const PAGE_GRAPHICS_NOACCESS: u32 = 2048; -pub const PAGE_GRAPHICS_READONLY: u32 = 4096; -pub const PAGE_GRAPHICS_READWRITE: u32 = 8192; -pub const PAGE_GRAPHICS_EXECUTE: u32 = 16384; -pub const PAGE_GRAPHICS_EXECUTE_READ: u32 = 32768; -pub const PAGE_GRAPHICS_EXECUTE_READWRITE: u32 = 65536; -pub const PAGE_GRAPHICS_COHERENT: u32 = 131072; -pub const PAGE_GRAPHICS_NOCACHE: u32 = 262144; -pub const PAGE_ENCLAVE_THREAD_CONTROL: u32 = 2147483648; -pub const PAGE_REVERT_TO_FILE_MAP: u32 = 2147483648; -pub const PAGE_TARGETS_NO_UPDATE: u32 = 1073741824; -pub const PAGE_TARGETS_INVALID: u32 = 1073741824; -pub const PAGE_ENCLAVE_UNVALIDATED: u32 = 536870912; -pub const PAGE_ENCLAVE_NO_CHANGE: u32 = 536870912; -pub const PAGE_ENCLAVE_MASK: u32 = 268435456; -pub const PAGE_ENCLAVE_DECOMMIT: u32 = 268435456; -pub const PAGE_ENCLAVE_SS_FIRST: u32 = 268435457; -pub const PAGE_ENCLAVE_SS_REST: u32 = 268435458; -pub const MEM_COMMIT: u32 = 4096; -pub const MEM_RESERVE: u32 = 8192; -pub const MEM_RESET: u32 = 524288; -pub const MEM_TOP_DOWN: u32 = 1048576; -pub const MEM_RESET_UNDO: u32 = 16777216; -pub const MEM_LARGE_PAGES: u32 = 536870912; -pub const MEM_4MB_PAGES: u32 = 2147483648; -pub const MEM_DECOMMIT: u32 = 16384; -pub const MEM_RELEASE: u32 = 32768; -pub const MEM_FREE: u32 = 65536; -pub const MEM_EXTENDED_PARAMETER_GRAPHICS: u32 = 1; -pub const MEM_EXTENDED_PARAMETER_NONPAGED: u32 = 2; -pub const MEM_EXTENDED_PARAMETER_ZERO_PAGES_OPTIONAL: u32 = 4; -pub const MEM_EXTENDED_PARAMETER_NONPAGED_LARGE: u32 = 8; -pub const MEM_EXTENDED_PARAMETER_NONPAGED_HUGE: u32 = 16; -pub const MEM_EXTENDED_PARAMETER_SOFT_FAULT_PAGES: u32 = 32; -pub const MEM_EXTENDED_PARAMETER_EC_CODE: u32 = 64; -pub const MEM_EXTENDED_PARAMETER_IMAGE_NO_HPAT: u32 = 128; -pub const MEM_EXTENDED_PARAMETER_TYPE_BITS: u32 = 8; -pub const SEC_HUGE_PAGES: u32 = 131072; -pub const SEC_64K_PAGES: u32 = 524288; -pub const SEC_FILE: u32 = 8388608; -pub const SEC_IMAGE: u32 = 16777216; -pub const SEC_RESERVE: u32 = 67108864; -pub const SEC_COMMIT: u32 = 134217728; -pub const SEC_NOCACHE: u32 = 268435456; -pub const SEC_LARGE_PAGES: u32 = 2147483648; -pub const SEC_IMAGE_NO_EXECUTE: u32 = 285212672; -pub const MEM_PRIVATE: u32 = 131072; -pub const MEM_MAPPED: u32 = 262144; -pub const PROCESS_DUP_HANDLE: u32 = 64; -pub const PROCESS_ALL_ACCESS: u32 = 2097151; -pub const THREAD_TERMINATE: u32 = 1; -pub const THREAD_SUSPEND_RESUME: u32 = 2; -pub const THREAD_ALERT: u32 = 4; -pub const THREAD_GET_CONTEXT: u32 = 8; -pub const THREAD_SET_CONTEXT: u32 = 16; -pub const THREAD_SET_INFORMATION: u32 = 32; -pub const THREAD_SET_LIMITED_INFORMATION: u32 = 1024; -pub const THREAD_QUERY_LIMITED_INFORMATION: u32 = 2048; -pub const THREAD_RESUME: u32 = 4096; -pub const THREAD_ALL_ACCESS: u32 = 2097151; -pub const MEMORY_PARTITION_QUERY_ACCESS: u32 = 1; -pub const MEMORY_PARTITION_MODIFY_ACCESS: u32 = 2; -pub const MEMORY_PARTITION_ALL_ACCESS: u32 = 2031619; -pub const POWERBUTTON_ACTION_INDEX_NOTHING: u32 = 0; -pub const POWERBUTTON_ACTION_INDEX_SLEEP: u32 = 1; -pub const POWERBUTTON_ACTION_INDEX_HIBERNATE: u32 = 2; -pub const POWERBUTTON_ACTION_INDEX_SHUTDOWN: u32 = 3; -pub const POWERBUTTON_ACTION_INDEX_TURN_OFF_THE_DISPLAY: u32 = 4; -pub const POWERBUTTON_ACTION_VALUE_NOTHING: u32 = 0; -pub const POWERBUTTON_ACTION_VALUE_SLEEP: u32 = 2; -pub const POWERBUTTON_ACTION_VALUE_HIBERNATE: u32 = 3; -pub const POWERBUTTON_ACTION_VALUE_SHUTDOWN: u32 = 6; -pub const POWERBUTTON_ACTION_VALUE_TURN_OFF_THE_DISPLAY: u32 = 8; -pub const PERFSTATE_POLICY_CHANGE_IDEAL: u32 = 0; -pub const PERFSTATE_POLICY_CHANGE_SINGLE: u32 = 1; -pub const PERFSTATE_POLICY_CHANGE_ROCKET: u32 = 2; -pub const PERFSTATE_POLICY_CHANGE_IDEAL_AGGRESSIVE: u32 = 3; -pub const PERFSTATE_POLICY_CHANGE_DECREASE_MAX: u32 = 2; -pub const PERFSTATE_POLICY_CHANGE_INCREASE_MAX: u32 = 3; -pub const PROCESSOR_THROTTLE_DISABLED: u32 = 0; -pub const PROCESSOR_THROTTLE_ENABLED: u32 = 1; -pub const PROCESSOR_THROTTLE_AUTOMATIC: u32 = 2; -pub const PROCESSOR_PERF_BOOST_POLICY_DISABLED: u32 = 0; -pub const PROCESSOR_PERF_BOOST_POLICY_MAX: u32 = 100; -pub const PROCESSOR_PERF_BOOST_MODE_DISABLED: u32 = 0; -pub const PROCESSOR_PERF_BOOST_MODE_ENABLED: u32 = 1; -pub const PROCESSOR_PERF_BOOST_MODE_AGGRESSIVE: u32 = 2; -pub const PROCESSOR_PERF_BOOST_MODE_EFFICIENT_ENABLED: u32 = 3; -pub const PROCESSOR_PERF_BOOST_MODE_EFFICIENT_AGGRESSIVE: u32 = 4; -pub const PROCESSOR_PERF_BOOST_MODE_AGGRESSIVE_AT_GUARANTEED: u32 = 5; -pub const PROCESSOR_PERF_BOOST_MODE_EFFICIENT_AGGRESSIVE_AT_GUARANTEED: u32 = 6; -pub const PROCESSOR_PERF_BOOST_MODE_MAX: u32 = 6; -pub const PROCESSOR_PERF_AUTONOMOUS_MODE_DISABLED: u32 = 0; -pub const PROCESSOR_PERF_AUTONOMOUS_MODE_ENABLED: u32 = 1; -pub const PROCESSOR_PERF_PERFORMANCE_PREFERENCE: u32 = 255; -pub const PROCESSOR_PERF_ENERGY_PREFERENCE: u32 = 0; -pub const PROCESSOR_PERF_MINIMUM_ACTIVITY_WINDOW: u32 = 0; -pub const PROCESSOR_PERF_MAXIMUM_ACTIVITY_WINDOW: u32 = 1270000000; -pub const PROCESSOR_DUTY_CYCLING_DISABLED: u32 = 0; -pub const PROCESSOR_DUTY_CYCLING_ENABLED: u32 = 1; -pub const CORE_PARKING_POLICY_CHANGE_IDEAL: u32 = 0; -pub const CORE_PARKING_POLICY_CHANGE_SINGLE: u32 = 1; -pub const CORE_PARKING_POLICY_CHANGE_ROCKET: u32 = 2; -pub const CORE_PARKING_POLICY_CHANGE_MULTISTEP: u32 = 3; -pub const CORE_PARKING_POLICY_CHANGE_MAX: u32 = 3; -pub const PARKING_TOPOLOGY_POLICY_DISABLED: u32 = 0; -pub const PARKING_TOPOLOGY_POLICY_ROUNDROBIN: u32 = 1; -pub const PARKING_TOPOLOGY_POLICY_SEQUENTIAL: u32 = 2; -pub const SMT_UNPARKING_POLICY_CORE: u32 = 0; -pub const SMT_UNPARKING_POLICY_CORE_PER_THREAD: u32 = 1; -pub const SMT_UNPARKING_POLICY_LP_ROUNDROBIN: u32 = 2; -pub const SMT_UNPARKING_POLICY_LP_SEQUENTIAL: u32 = 3; -pub const POWER_DEVICE_IDLE_POLICY_PERFORMANCE: u32 = 0; -pub const POWER_DEVICE_IDLE_POLICY_CONSERVATIVE: u32 = 1; -pub const POWER_CONNECTIVITY_IN_STANDBY_DISABLED: u32 = 0; -pub const POWER_CONNECTIVITY_IN_STANDBY_ENABLED: u32 = 1; -pub const POWER_CONNECTIVITY_IN_STANDBY_SYSTEM_MANAGED: u32 = 2; -pub const POWER_DISCONNECTED_STANDBY_MODE_NORMAL: u32 = 0; -pub const POWER_DISCONNECTED_STANDBY_MODE_AGGRESSIVE: u32 = 1; -pub const POWER_SYSTEM_MAXIMUM: u32 = 7; -pub const DIAGNOSTIC_REASON_VERSION: u32 = 0; -pub const DIAGNOSTIC_REASON_SIMPLE_STRING: u32 = 1; -pub const DIAGNOSTIC_REASON_DETAILED_STRING: u32 = 2; -pub const DIAGNOSTIC_REASON_NOT_SPECIFIED: u32 = 2147483648; -pub const DIAGNOSTIC_REASON_INVALID_FLAGS: i64 = -2147483656; -pub const POWER_REQUEST_CONTEXT_VERSION: u32 = 0; -pub const POWER_REQUEST_CONTEXT_SIMPLE_STRING: u32 = 1; -pub const POWER_REQUEST_CONTEXT_DETAILED_STRING: u32 = 2; -pub const PDCAP_D0_SUPPORTED: u32 = 1; -pub const PDCAP_D1_SUPPORTED: u32 = 2; -pub const PDCAP_D2_SUPPORTED: u32 = 4; -pub const PDCAP_D3_SUPPORTED: u32 = 8; -pub const PDCAP_WAKE_FROM_D0_SUPPORTED: u32 = 16; -pub const PDCAP_WAKE_FROM_D1_SUPPORTED: u32 = 32; -pub const PDCAP_WAKE_FROM_D2_SUPPORTED: u32 = 64; -pub const PDCAP_WAKE_FROM_D3_SUPPORTED: u32 = 128; -pub const PDCAP_WARM_EJECT_SUPPORTED: u32 = 256; -pub const POWER_SETTING_VALUE_VERSION: u32 = 1; -pub const POWER_PLATFORM_ROLE_V1: u32 = 1; -pub const POWER_PLATFORM_ROLE_V2: u32 = 2; -pub const POWER_PLATFORM_ROLE_VERSION: u32 = 2; -pub const REG_NONE: u32 = 0; -pub const REG_SZ: u32 = 1; -pub const REG_EXPAND_SZ: u32 = 2; -pub const REG_BINARY: u32 = 3; -pub const REG_DWORD: u32 = 4; -pub const REG_DWORD_LITTLE_ENDIAN: u32 = 4; -pub const REG_DWORD_BIG_ENDIAN: u32 = 5; -pub const REG_LINK: u32 = 6; -pub const REG_MULTI_SZ: u32 = 7; -pub const REG_RESOURCE_LIST: u32 = 8; -pub const REG_FULL_RESOURCE_DESCRIPTOR: u32 = 9; -pub const REG_RESOURCE_REQUIREMENTS_LIST: u32 = 10; -pub const REG_QWORD: u32 = 11; -pub const REG_QWORD_LITTLE_ENDIAN: u32 = 11; -pub const SERVICE_KERNEL_DRIVER: u32 = 1; -pub const SERVICE_FILE_SYSTEM_DRIVER: u32 = 2; -pub const SERVICE_ADAPTER: u32 = 4; -pub const SERVICE_RECOGNIZER_DRIVER: u32 = 8; -pub const SERVICE_DRIVER: u32 = 11; -pub const SERVICE_WIN32_OWN_PROCESS: u32 = 16; -pub const SERVICE_WIN32_SHARE_PROCESS: u32 = 32; -pub const SERVICE_WIN32: u32 = 48; -pub const SERVICE_USER_SERVICE: u32 = 64; -pub const SERVICE_USERSERVICE_INSTANCE: u32 = 128; -pub const SERVICE_USER_SHARE_PROCESS: u32 = 96; -pub const SERVICE_USER_OWN_PROCESS: u32 = 80; -pub const SERVICE_INTERACTIVE_PROCESS: u32 = 256; -pub const SERVICE_PKG_SERVICE: u32 = 512; -pub const SERVICE_TYPE_ALL: u32 = 1023; -pub const SERVICE_BOOT_START: u32 = 0; -pub const SERVICE_SYSTEM_START: u32 = 1; -pub const SERVICE_AUTO_START: u32 = 2; -pub const SERVICE_DEMAND_START: u32 = 3; -pub const SERVICE_DISABLED: u32 = 4; -pub const SERVICE_ERROR_IGNORE: u32 = 0; -pub const SERVICE_ERROR_NORMAL: u32 = 1; -pub const SERVICE_ERROR_SEVERE: u32 = 2; -pub const SERVICE_ERROR_CRITICAL: u32 = 3; -pub const CM_SERVICE_NETWORK_BOOT_LOAD: u32 = 1; -pub const CM_SERVICE_VIRTUAL_DISK_BOOT_LOAD: u32 = 2; -pub const CM_SERVICE_USB_DISK_BOOT_LOAD: u32 = 4; -pub const CM_SERVICE_SD_DISK_BOOT_LOAD: u32 = 8; -pub const CM_SERVICE_USB3_DISK_BOOT_LOAD: u32 = 16; -pub const CM_SERVICE_MEASURED_BOOT_LOAD: u32 = 32; -pub const CM_SERVICE_VERIFIER_BOOT_LOAD: u32 = 64; -pub const CM_SERVICE_WINPE_BOOT_LOAD: u32 = 128; -pub const CM_SERVICE_RAM_DISK_BOOT_LOAD: u32 = 256; -pub const CM_SERVICE_VALID_PROMOTION_MASK: u32 = 511; -pub const CmResourceTypeNull: u32 = 0; -pub const CmResourceTypePort: u32 = 1; -pub const CmResourceTypeInterrupt: u32 = 2; -pub const CmResourceTypeMemory: u32 = 3; -pub const CmResourceTypeDma: u32 = 4; -pub const CmResourceTypeDeviceSpecific: u32 = 5; -pub const CmResourceTypeBusNumber: u32 = 6; -pub const CmResourceTypeMemoryLarge: u32 = 7; -pub const CmResourceTypeNonArbitrated: u32 = 128; -pub const CmResourceTypeConfigData: u32 = 128; -pub const CmResourceTypeDevicePrivate: u32 = 129; -pub const CmResourceTypePcCardConfig: u32 = 130; -pub const CmResourceTypeMfCardConfig: u32 = 131; -pub const CmResourceTypeConnection: u32 = 132; -pub const CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE: u32 = 0; -pub const CM_RESOURCE_INTERRUPT_LATCHED: u32 = 1; -pub const CM_RESOURCE_INTERRUPT_MESSAGE: u32 = 2; -pub const CM_RESOURCE_INTERRUPT_POLICY_INCLUDED: u32 = 4; -pub const CM_RESOURCE_INTERRUPT_SECONDARY_INTERRUPT: u32 = 16; -pub const CM_RESOURCE_INTERRUPT_WAKE_HINT: u32 = 32; -pub const CM_RESOURCE_INTERRUPT_LEVEL_LATCHED_BITS: u32 = 1; -pub const CM_RESOURCE_MEMORY_READ_WRITE: u32 = 0; -pub const CM_RESOURCE_MEMORY_READ_ONLY: u32 = 1; -pub const CM_RESOURCE_MEMORY_WRITE_ONLY: u32 = 2; -pub const CM_RESOURCE_MEMORY_WRITEABILITY_MASK: u32 = 3; -pub const CM_RESOURCE_MEMORY_PREFETCHABLE: u32 = 4; -pub const CM_RESOURCE_MEMORY_COMBINEDWRITE: u32 = 8; -pub const CM_RESOURCE_MEMORY_24: u32 = 16; -pub const CM_RESOURCE_MEMORY_CACHEABLE: u32 = 32; -pub const CM_RESOURCE_MEMORY_WINDOW_DECODE: u32 = 64; -pub const CM_RESOURCE_MEMORY_BAR: u32 = 128; -pub const CM_RESOURCE_MEMORY_COMPAT_FOR_INACCESSIBLE_RANGE: u32 = 256; -pub const CM_RESOURCE_MEMORY_LARGE: u32 = 3584; -pub const CM_RESOURCE_MEMORY_LARGE_40: u32 = 512; -pub const CM_RESOURCE_MEMORY_LARGE_48: u32 = 1024; -pub const CM_RESOURCE_MEMORY_LARGE_64: u32 = 2048; -pub const CM_RESOURCE_MEMORY_LARGE_40_MAXLEN: u64 = 1099511627520; -pub const CM_RESOURCE_MEMORY_LARGE_48_MAXLEN: u64 = 281474976645120; -pub const CM_RESOURCE_MEMORY_LARGE_64_MAXLEN: i64 = -4294967296; -pub const CM_RESOURCE_PORT_MEMORY: u32 = 0; -pub const CM_RESOURCE_PORT_IO: u32 = 1; -pub const CM_RESOURCE_PORT_10_BIT_DECODE: u32 = 4; -pub const CM_RESOURCE_PORT_12_BIT_DECODE: u32 = 8; -pub const CM_RESOURCE_PORT_16_BIT_DECODE: u32 = 16; -pub const CM_RESOURCE_PORT_POSITIVE_DECODE: u32 = 32; -pub const CM_RESOURCE_PORT_PASSIVE_DECODE: u32 = 64; -pub const CM_RESOURCE_PORT_WINDOW_DECODE: u32 = 128; -pub const CM_RESOURCE_PORT_BAR: u32 = 256; -pub const CM_RESOURCE_DMA_8: u32 = 0; -pub const CM_RESOURCE_DMA_16: u32 = 1; -pub const CM_RESOURCE_DMA_32: u32 = 2; -pub const CM_RESOURCE_DMA_8_AND_16: u32 = 4; -pub const CM_RESOURCE_DMA_BUS_MASTER: u32 = 8; -pub const CM_RESOURCE_DMA_TYPE_A: u32 = 16; -pub const CM_RESOURCE_DMA_TYPE_B: u32 = 32; -pub const CM_RESOURCE_DMA_TYPE_F: u32 = 64; -pub const CM_RESOURCE_DMA_V3: u32 = 128; -pub const DMAV3_TRANFER_WIDTH_8: u32 = 0; -pub const DMAV3_TRANFER_WIDTH_16: u32 = 1; -pub const DMAV3_TRANFER_WIDTH_32: u32 = 2; -pub const DMAV3_TRANFER_WIDTH_64: u32 = 3; -pub const DMAV3_TRANFER_WIDTH_128: u32 = 4; -pub const DMAV3_TRANFER_WIDTH_256: u32 = 5; -pub const CM_RESOURCE_CONNECTION_CLASS_GPIO: u32 = 1; -pub const CM_RESOURCE_CONNECTION_CLASS_SERIAL: u32 = 2; -pub const CM_RESOURCE_CONNECTION_CLASS_FUNCTION_CONFIG: u32 = 3; -pub const CM_RESOURCE_CONNECTION_TYPE_GPIO_IO: u32 = 2; -pub const CM_RESOURCE_CONNECTION_TYPE_SERIAL_I2C: u32 = 1; -pub const CM_RESOURCE_CONNECTION_TYPE_SERIAL_SPI: u32 = 2; -pub const CM_RESOURCE_CONNECTION_TYPE_SERIAL_UART: u32 = 3; -pub const CM_RESOURCE_CONNECTION_TYPE_FUNCTION_CONFIG: u32 = 1; -pub const EISA_FUNCTION_ENABLED: u32 = 128; -pub const EISA_FREE_FORM_DATA: u32 = 64; -pub const EISA_HAS_PORT_INIT_ENTRY: u32 = 32; -pub const EISA_HAS_PORT_RANGE: u32 = 16; -pub const EISA_HAS_DMA_ENTRY: u32 = 8; -pub const EISA_HAS_IRQ_ENTRY: u32 = 4; -pub const EISA_HAS_MEMORY_ENTRY: u32 = 2; -pub const EISA_HAS_TYPE_ENTRY: u32 = 1; -pub const EISA_HAS_INFORMATION: u32 = 31; -pub const EISA_MORE_ENTRIES: u32 = 128; -pub const EISA_SYSTEM_MEMORY: u32 = 0; -pub const EISA_MEMORY_TYPE_RAM: u32 = 1; -pub const EISA_INVALID_SLOT: u32 = 128; -pub const EISA_INVALID_FUNCTION: u32 = 129; -pub const EISA_INVALID_CONFIGURATION: u32 = 130; -pub const EISA_EMPTY_SLOT: u32 = 131; -pub const EISA_INVALID_BIOS_CALL: u32 = 134; -pub const IO_RESOURCE_PREFERRED: u32 = 1; -pub const IO_RESOURCE_DEFAULT: u32 = 2; -pub const IO_RESOURCE_ALTERNATIVE: u32 = 8; -pub const FAST_FAIL_LEGACY_GS_VIOLATION: u32 = 0; -pub const FAST_FAIL_VTGUARD_CHECK_FAILURE: u32 = 1; -pub const FAST_FAIL_STACK_COOKIE_CHECK_FAILURE: u32 = 2; -pub const FAST_FAIL_CORRUPT_LIST_ENTRY: u32 = 3; -pub const FAST_FAIL_INCORRECT_STACK: u32 = 4; -pub const FAST_FAIL_INVALID_ARG: u32 = 5; -pub const FAST_FAIL_GS_COOKIE_INIT: u32 = 6; -pub const FAST_FAIL_FATAL_APP_EXIT: u32 = 7; -pub const FAST_FAIL_RANGE_CHECK_FAILURE: u32 = 8; -pub const FAST_FAIL_UNSAFE_REGISTRY_ACCESS: u32 = 9; -pub const FAST_FAIL_GUARD_ICALL_CHECK_FAILURE: u32 = 10; -pub const FAST_FAIL_GUARD_WRITE_CHECK_FAILURE: u32 = 11; -pub const FAST_FAIL_INVALID_FIBER_SWITCH: u32 = 12; -pub const FAST_FAIL_INVALID_SET_OF_CONTEXT: u32 = 13; -pub const FAST_FAIL_INVALID_REFERENCE_COUNT: u32 = 14; -pub const FAST_FAIL_INVALID_JUMP_BUFFER: u32 = 18; -pub const FAST_FAIL_MRDATA_MODIFIED: u32 = 19; -pub const FAST_FAIL_CERTIFICATION_FAILURE: u32 = 20; -pub const FAST_FAIL_INVALID_EXCEPTION_CHAIN: u32 = 21; -pub const FAST_FAIL_CRYPTO_LIBRARY: u32 = 22; -pub const FAST_FAIL_INVALID_CALL_IN_DLL_CALLOUT: u32 = 23; -pub const FAST_FAIL_INVALID_IMAGE_BASE: u32 = 24; -pub const FAST_FAIL_DLOAD_PROTECTION_FAILURE: u32 = 25; -pub const FAST_FAIL_UNSAFE_EXTENSION_CALL: u32 = 26; -pub const FAST_FAIL_DEPRECATED_SERVICE_INVOKED: u32 = 27; -pub const FAST_FAIL_INVALID_BUFFER_ACCESS: u32 = 28; -pub const FAST_FAIL_INVALID_BALANCED_TREE: u32 = 29; -pub const FAST_FAIL_INVALID_NEXT_THREAD: u32 = 30; -pub const FAST_FAIL_GUARD_ICALL_CHECK_SUPPRESSED: u32 = 31; -pub const FAST_FAIL_APCS_DISABLED: u32 = 32; -pub const FAST_FAIL_INVALID_IDLE_STATE: u32 = 33; -pub const FAST_FAIL_MRDATA_PROTECTION_FAILURE: u32 = 34; -pub const FAST_FAIL_UNEXPECTED_HEAP_EXCEPTION: u32 = 35; -pub const FAST_FAIL_INVALID_LOCK_STATE: u32 = 36; -pub const FAST_FAIL_GUARD_JUMPTABLE: u32 = 37; -pub const FAST_FAIL_INVALID_LONGJUMP_TARGET: u32 = 38; -pub const FAST_FAIL_INVALID_DISPATCH_CONTEXT: u32 = 39; -pub const FAST_FAIL_INVALID_THREAD: u32 = 40; -pub const FAST_FAIL_INVALID_SYSCALL_NUMBER: u32 = 41; -pub const FAST_FAIL_INVALID_FILE_OPERATION: u32 = 42; -pub const FAST_FAIL_LPAC_ACCESS_DENIED: u32 = 43; -pub const FAST_FAIL_GUARD_SS_FAILURE: u32 = 44; -pub const FAST_FAIL_LOADER_CONTINUITY_FAILURE: u32 = 45; -pub const FAST_FAIL_GUARD_EXPORT_SUPPRESSION_FAILURE: u32 = 46; -pub const FAST_FAIL_INVALID_CONTROL_STACK: u32 = 47; -pub const FAST_FAIL_SET_CONTEXT_DENIED: u32 = 48; -pub const FAST_FAIL_INVALID_IAT: u32 = 49; -pub const FAST_FAIL_HEAP_METADATA_CORRUPTION: u32 = 50; -pub const FAST_FAIL_PAYLOAD_RESTRICTION_VIOLATION: u32 = 51; -pub const FAST_FAIL_LOW_LABEL_ACCESS_DENIED: u32 = 52; -pub const FAST_FAIL_ENCLAVE_CALL_FAILURE: u32 = 53; -pub const FAST_FAIL_UNHANDLED_LSS_EXCEPTON: u32 = 54; -pub const FAST_FAIL_ADMINLESS_ACCESS_DENIED: u32 = 55; -pub const FAST_FAIL_UNEXPECTED_CALL: u32 = 56; -pub const FAST_FAIL_CONTROL_INVALID_RETURN_ADDRESS: u32 = 57; -pub const FAST_FAIL_UNEXPECTED_HOST_BEHAVIOR: u32 = 58; -pub const FAST_FAIL_FLAGS_CORRUPTION: u32 = 59; -pub const FAST_FAIL_VEH_CORRUPTION: u32 = 60; -pub const FAST_FAIL_ETW_CORRUPTION: u32 = 61; -pub const FAST_FAIL_RIO_ABORT: u32 = 62; -pub const FAST_FAIL_INVALID_PFN: u32 = 63; -pub const FAST_FAIL_GUARD_ICALL_CHECK_FAILURE_XFG: u32 = 64; -pub const FAST_FAIL_CAST_GUARD: u32 = 65; -pub const FAST_FAIL_HOST_VISIBILITY_CHANGE: u32 = 66; -pub const FAST_FAIL_KERNEL_CET_SHADOW_STACK_ASSIST: u32 = 67; -pub const FAST_FAIL_PATCH_CALLBACK_FAILED: u32 = 68; -pub const FAST_FAIL_NTDLL_PATCH_FAILED: u32 = 69; -pub const FAST_FAIL_INVALID_FLS_DATA: u32 = 70; -pub const FAST_FAIL_INVALID_FAST_FAIL_CODE: u32 = 4294967295; -pub const RTL_QUERY_REGISTRY_SUBKEY: u32 = 1; -pub const RTL_QUERY_REGISTRY_TOPKEY: u32 = 2; -pub const RTL_QUERY_REGISTRY_REQUIRED: u32 = 4; -pub const RTL_QUERY_REGISTRY_NOVALUE: u32 = 8; -pub const RTL_QUERY_REGISTRY_NOEXPAND: u32 = 16; -pub const RTL_QUERY_REGISTRY_DIRECT: u32 = 32; -pub const RTL_QUERY_REGISTRY_DELETE: u32 = 64; -pub const RTL_QUERY_REGISTRY_NOSTRING: u32 = 128; -pub const RTL_QUERY_REGISTRY_TYPECHECK: u32 = 256; -pub const RTL_QUERY_REGISTRY_TYPECHECK_SHIFT: u32 = 24; -pub const RTL_QUERY_REGISTRY_TYPECHECK_MASK: u32 = 4278190080; -pub const RTL_REGISTRY_ABSOLUTE: u32 = 0; -pub const RTL_REGISTRY_SERVICES: u32 = 1; -pub const RTL_REGISTRY_CONTROL: u32 = 2; -pub const RTL_REGISTRY_WINDOWS_NT: u32 = 3; -pub const RTL_REGISTRY_DEVICEMAP: u32 = 4; -pub const RTL_REGISTRY_USER: u32 = 5; -pub const RTL_REGISTRY_MAXIMUM: u32 = 6; -pub const RTL_REGISTRY_HANDLE: u32 = 1073741824; -pub const RTL_REGISTRY_OPTIONAL: u32 = 2147483648; -pub const HASH_STRING_ALGORITHM_DEFAULT: u32 = 0; -pub const HASH_STRING_ALGORITHM_X65599: u32 = 1; -pub const HASH_STRING_ALGORITHM_INVALID: u32 = 4294967295; -pub const RTL_GUID_STRING_SIZE: u32 = 38; -pub const DBG_STATUS_CONTROL_C: u32 = 1; -pub const DBG_STATUS_SYSRQ: u32 = 2; -pub const DBG_STATUS_BUGCHECK_FIRST: u32 = 3; -pub const DBG_STATUS_BUGCHECK_SECOND: u32 = 4; -pub const DBG_STATUS_FATAL: u32 = 5; -pub const DBG_STATUS_DEBUG_CONTROL: u32 = 6; -pub const DBG_STATUS_WORKER: u32 = 7; -pub const LOWBYTE_MASK: u32 = 255; -pub const SHORT_LEAST_SIGNIFICANT_BIT: u32 = 0; -pub const SHORT_MOST_SIGNIFICANT_BIT: u32 = 1; -pub const LONG_LEAST_SIGNIFICANT_BIT: u32 = 0; -pub const LONG_3RD_MOST_SIGNIFICANT_BIT: u32 = 1; -pub const LONG_2ND_MOST_SIGNIFICANT_BIT: u32 = 2; -pub const LONG_MOST_SIGNIFICANT_BIT: u32 = 3; -pub const SEF_DACL_AUTO_INHERIT: u32 = 1; -pub const SEF_SACL_AUTO_INHERIT: u32 = 2; -pub const SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT: u32 = 4; -pub const SEF_AVOID_PRIVILEGE_CHECK: u32 = 8; -pub const SEF_AVOID_OWNER_CHECK: u32 = 16; -pub const SEF_DEFAULT_OWNER_FROM_PARENT: u32 = 32; -pub const SEF_DEFAULT_GROUP_FROM_PARENT: u32 = 64; -pub const SEF_MACL_NO_WRITE_UP: u32 = 256; -pub const SEF_MACL_NO_READ_UP: u32 = 512; -pub const SEF_MACL_NO_EXECUTE_UP: u32 = 1024; -pub const SEF_AI_USE_EXTRA_PARAMS: u32 = 2048; -pub const SEF_AVOID_OWNER_RESTRICTION: u32 = 4096; -pub const SEF_FORCE_USER_MODE: u32 = 8192; -pub const SEF_NORMALIZE_OUTPUT_DESCRIPTOR: u32 = 16384; -pub const SEF_MACL_VALID_FLAGS: u32 = 1792; -pub const VER_EQUAL: u32 = 1; -pub const VER_GREATER: u32 = 2; -pub const VER_GREATER_EQUAL: u32 = 3; -pub const VER_LESS: u32 = 4; -pub const VER_LESS_EQUAL: u32 = 5; -pub const VER_AND: u32 = 6; -pub const VER_OR: u32 = 7; -pub const VER_CONDITION_MASK: u32 = 7; -pub const VER_NUM_BITS_PER_CONDITION_MASK: u32 = 3; -pub const VER_MINORVERSION: u32 = 1; -pub const VER_MAJORVERSION: u32 = 2; -pub const VER_BUILDNUMBER: u32 = 4; -pub const VER_PLATFORMID: u32 = 8; -pub const VER_SERVICEPACKMINOR: u32 = 16; -pub const VER_SERVICEPACKMAJOR: u32 = 32; -pub const VER_SUITENAME: u32 = 64; -pub const VER_PRODUCT_TYPE: u32 = 128; -pub const VER_NT_WORKSTATION: u32 = 1; -pub const VER_NT_DOMAIN_CONTROLLER: u32 = 2; -pub const VER_NT_SERVER: u32 = 3; -pub const VER_PLATFORM_WIN32s: u32 = 0; -pub const VER_PLATFORM_WIN32_WINDOWS: u32 = 1; -pub const VER_PLATFORM_WIN32_NT: u32 = 2; -pub const DPFLTR_ERROR_LEVEL: u32 = 0; -pub const DPFLTR_WARNING_LEVEL: u32 = 1; -pub const DPFLTR_TRACE_LEVEL: u32 = 2; -pub const DPFLTR_INFO_LEVEL: u32 = 3; -pub const DPFLTR_MASK: u32 = 2147483648; -pub const VRL_PREDEFINED_CLASS_BEGIN: u32 = 1; -pub const VRL_CUSTOM_CLASS_BEGIN: u32 = 256; -pub const VRL_CLASS_CONSISTENCY: u32 = 1; -pub const VRL_ENABLE_KERNEL_BREAKS: u32 = 2147483648; -pub const CTMF_INCLUDE_APPCONTAINER: u32 = 1; -pub const CTMF_INCLUDE_LPAC: u32 = 2; -pub const CTMF_VALID_FLAGS: u32 = 3; -pub const IMAGE_POLICY_METADATA_VERSION: u32 = 1; -#[allow(unsafe_code)] -pub const IMAGE_POLICY_SECTION_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b".tPolicy\0") -}; -pub const TRANSACTION_MANAGER_VOLATILE: u32 = 1; -pub const TRANSACTION_MANAGER_COMMIT_DEFAULT: u32 = 0; -pub const TRANSACTION_MANAGER_COMMIT_SYSTEM_VOLUME: u32 = 2; -pub const TRANSACTION_MANAGER_COMMIT_SYSTEM_HIVES: u32 = 4; -pub const TRANSACTION_MANAGER_COMMIT_LOWEST: u32 = 8; -pub const TRANSACTION_MANAGER_CORRUPT_FOR_RECOVERY: u32 = 16; -pub const TRANSACTION_MANAGER_CORRUPT_FOR_PROGRESS: u32 = 32; -pub const TRANSACTION_MANAGER_MAXIMUM_OPTION: u32 = 63; -pub const TRANSACTION_DO_NOT_PROMOTE: u32 = 1; -pub const TRANSACTION_MAXIMUM_OPTION: u32 = 1; -pub const RESOURCE_MANAGER_VOLATILE: u32 = 1; -pub const RESOURCE_MANAGER_COMMUNICATION: u32 = 2; -pub const RESOURCE_MANAGER_MAXIMUM_OPTION: u32 = 3; -pub const CRM_PROTOCOL_EXPLICIT_MARSHAL_ONLY: u32 = 1; -pub const CRM_PROTOCOL_DYNAMIC_MARSHAL_INFO: u32 = 2; -pub const CRM_PROTOCOL_MAXIMUM_OPTION: u32 = 3; -pub const ENLISTMENT_SUPERIOR: u32 = 1; -pub const ENLISTMENT_MAXIMUM_OPTION: u32 = 1; -pub const TRANSACTION_NOTIFY_MASK: u32 = 1073741823; -pub const TRANSACTION_NOTIFY_PREPREPARE: u32 = 1; -pub const TRANSACTION_NOTIFY_PREPARE: u32 = 2; -pub const TRANSACTION_NOTIFY_COMMIT: u32 = 4; -pub const TRANSACTION_NOTIFY_ROLLBACK: u32 = 8; -pub const TRANSACTION_NOTIFY_PREPREPARE_COMPLETE: u32 = 16; -pub const TRANSACTION_NOTIFY_PREPARE_COMPLETE: u32 = 32; -pub const TRANSACTION_NOTIFY_COMMIT_COMPLETE: u32 = 64; -pub const TRANSACTION_NOTIFY_ROLLBACK_COMPLETE: u32 = 128; -pub const TRANSACTION_NOTIFY_RECOVER: u32 = 256; -pub const TRANSACTION_NOTIFY_SINGLE_PHASE_COMMIT: u32 = 512; -pub const TRANSACTION_NOTIFY_DELEGATE_COMMIT: u32 = 1024; -pub const TRANSACTION_NOTIFY_RECOVER_QUERY: u32 = 2048; -pub const TRANSACTION_NOTIFY_ENLIST_PREPREPARE: u32 = 4096; -pub const TRANSACTION_NOTIFY_LAST_RECOVER: u32 = 8192; -pub const TRANSACTION_NOTIFY_INDOUBT: u32 = 16384; -pub const TRANSACTION_NOTIFY_PROPAGATE_PULL: u32 = 32768; -pub const TRANSACTION_NOTIFY_PROPAGATE_PUSH: u32 = 65536; -pub const TRANSACTION_NOTIFY_MARSHAL: u32 = 131072; -pub const TRANSACTION_NOTIFY_ENLIST_MASK: u32 = 262144; -pub const TRANSACTION_NOTIFY_RM_DISCONNECTED: u32 = 16777216; -pub const TRANSACTION_NOTIFY_TM_ONLINE: u32 = 33554432; -pub const TRANSACTION_NOTIFY_COMMIT_REQUEST: u32 = 67108864; -pub const TRANSACTION_NOTIFY_PROMOTE: u32 = 134217728; -pub const TRANSACTION_NOTIFY_PROMOTE_NEW: u32 = 268435456; -pub const TRANSACTION_NOTIFY_REQUEST_OUTCOME: u32 = 536870912; -pub const TRANSACTION_NOTIFY_COMMIT_FINALIZE: u32 = 1073741824; -#[allow(unsafe_code)] -pub const TRANSACTIONMANAGER_OBJECT_PATH: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"\\TransactionManager\\\0") -}; -#[allow(unsafe_code)] -pub const TRANSACTION_OBJECT_PATH: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"\\Transaction\\\0") -}; -#[allow(unsafe_code)] -pub const ENLISTMENT_OBJECT_PATH: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"\\Enlistment\\\0") -}; -#[allow(unsafe_code)] -pub const RESOURCE_MANAGER_OBJECT_PATH: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"\\ResourceManager\\\0") -}; -pub const TRANSACTION_NOTIFICATION_TM_ONLINE_FLAG_IS_CLUSTERED: u32 = 1; -pub const KTM_MARSHAL_BLOB_VERSION_MAJOR: u32 = 1; -pub const KTM_MARSHAL_BLOB_VERSION_MINOR: u32 = 1; -pub const MAX_TRANSACTION_DESCRIPTION_LENGTH: u32 = 64; -pub const MAX_RESOURCEMANAGER_DESCRIPTION_LENGTH: u32 = 64; -pub const TRANSACTIONMANAGER_QUERY_INFORMATION: u32 = 1; -pub const TRANSACTIONMANAGER_SET_INFORMATION: u32 = 2; -pub const TRANSACTIONMANAGER_RECOVER: u32 = 4; -pub const TRANSACTIONMANAGER_RENAME: u32 = 8; -pub const TRANSACTIONMANAGER_CREATE_RM: u32 = 16; -pub const TRANSACTIONMANAGER_BIND_TRANSACTION: u32 = 32; -pub const TRANSACTIONMANAGER_GENERIC_READ: u32 = 131073; -pub const TRANSACTIONMANAGER_GENERIC_WRITE: u32 = 131102; -pub const TRANSACTIONMANAGER_GENERIC_EXECUTE: u32 = 131072; -pub const TRANSACTIONMANAGER_ALL_ACCESS: u32 = 983103; -pub const TRANSACTION_QUERY_INFORMATION: u32 = 1; -pub const TRANSACTION_SET_INFORMATION: u32 = 2; -pub const TRANSACTION_ENLIST: u32 = 4; -pub const TRANSACTION_COMMIT: u32 = 8; -pub const TRANSACTION_ROLLBACK: u32 = 16; -pub const TRANSACTION_PROPAGATE: u32 = 32; -pub const TRANSACTION_RIGHT_RESERVED1: u32 = 64; -pub const TRANSACTION_GENERIC_READ: u32 = 1179649; -pub const TRANSACTION_GENERIC_WRITE: u32 = 1179710; -pub const TRANSACTION_GENERIC_EXECUTE: u32 = 1179672; -pub const TRANSACTION_ALL_ACCESS: u32 = 2031679; -pub const TRANSACTION_RESOURCE_MANAGER_RIGHTS: u32 = 1179703; -pub const RESOURCEMANAGER_QUERY_INFORMATION: u32 = 1; -pub const RESOURCEMANAGER_SET_INFORMATION: u32 = 2; -pub const RESOURCEMANAGER_RECOVER: u32 = 4; -pub const RESOURCEMANAGER_ENLIST: u32 = 8; -pub const RESOURCEMANAGER_GET_NOTIFICATION: u32 = 16; -pub const RESOURCEMANAGER_REGISTER_PROTOCOL: u32 = 32; -pub const RESOURCEMANAGER_COMPLETE_PROPAGATION: u32 = 64; -pub const RESOURCEMANAGER_GENERIC_READ: u32 = 1179649; -pub const RESOURCEMANAGER_GENERIC_WRITE: u32 = 1179774; -pub const RESOURCEMANAGER_GENERIC_EXECUTE: u32 = 1179740; -pub const RESOURCEMANAGER_ALL_ACCESS: u32 = 2031743; -pub const ENLISTMENT_QUERY_INFORMATION: u32 = 1; -pub const ENLISTMENT_SET_INFORMATION: u32 = 2; -pub const ENLISTMENT_RECOVER: u32 = 4; -pub const ENLISTMENT_SUBORDINATE_RIGHTS: u32 = 8; -pub const ENLISTMENT_SUPERIOR_RIGHTS: u32 = 16; -pub const ENLISTMENT_GENERIC_READ: u32 = 131073; -pub const ENLISTMENT_GENERIC_WRITE: u32 = 131102; -pub const ENLISTMENT_GENERIC_EXECUTE: u32 = 131100; -pub const ENLISTMENT_ALL_ACCESS: u32 = 983071; -pub const POOL_TAGGING: u32 = 1; -pub const DPC_NORMAL: u32 = 0; -pub const DPC_THREADED: u32 = 1; -pub const PAGE_SIZE: u32 = 4096; -pub const PAGE_SHIFT: u32 = 12; -pub const MDL_MAPPED_TO_SYSTEM_VA: u32 = 1; -pub const MDL_PAGES_LOCKED: u32 = 2; -pub const MDL_SOURCE_IS_NONPAGED_POOL: u32 = 4; -pub const MDL_ALLOCATED_FIXED_SIZE: u32 = 8; -pub const MDL_PARTIAL: u32 = 16; -pub const MDL_PARTIAL_HAS_BEEN_MAPPED: u32 = 32; -pub const MDL_IO_PAGE_READ: u32 = 64; -pub const MDL_WRITE_OPERATION: u32 = 128; -pub const MDL_LOCKED_PAGE_TABLES: u32 = 256; -pub const MDL_PARENT_MAPPED_SYSTEM_VA: u32 = 256; -pub const MDL_FREE_EXTRA_PTES: u32 = 512; -pub const MDL_DESCRIBES_AWE: u32 = 1024; -pub const MDL_IO_SPACE: u32 = 2048; -pub const MDL_NETWORK_HEADER: u32 = 4096; -pub const MDL_MAPPING_CAN_FAIL: u32 = 8192; -pub const MDL_PAGE_CONTENTS_INVARIANT: u32 = 16384; -pub const MDL_ALLOCATED_MUST_SUCCEED: u32 = 16384; -pub const MDL_INTERNAL: u32 = 32768; -pub const TIMER_TOLERABLE_DELAY_BITS: u32 = 6; -pub const TIMER_EXPIRED_INDEX_BITS: u32 = 6; -pub const TIMER_PROCESSOR_INDEX_BITS: u32 = 5; -pub const FLUSH_MULTIPLE_MAXIMUM: u32 = 19; -pub const ALLOC_PRAGMA: u32 = 1; -pub const ALLOC_DATA_PRAGMA: u32 = 1; -pub const EVENT_QUERY_STATE: u32 = 1; -pub const EVENT_MODIFY_STATE: u32 = 2; -pub const EVENT_ALL_ACCESS: u32 = 2031619; -pub const SEMAPHORE_QUERY_STATE: u32 = 1; -pub const SEMAPHORE_MODIFY_STATE: u32 = 2; -pub const SEMAPHORE_ALL_ACCESS: u32 = 2031619; -pub const LTP_PC_SMT: u32 = 1; -pub const CACHE_FULLY_ASSOCIATIVE: u32 = 255; -pub const SYSTEM_CPU_SET_INFORMATION_PARKED: u32 = 1; -pub const SYSTEM_CPU_SET_INFORMATION_ALLOCATED: u32 = 2; -pub const SYSTEM_CPU_SET_INFORMATION_ALLOCATED_TO_TARGET_PROCESS: u32 = 4; -pub const SYSTEM_CPU_SET_INFORMATION_REALTIME: u32 = 8; -pub const PF_FLOATING_POINT_PRECISION_ERRATA: u32 = 0; -pub const PF_FLOATING_POINT_EMULATED: u32 = 1; -pub const PF_COMPARE_EXCHANGE_DOUBLE: u32 = 2; -pub const PF_MMX_INSTRUCTIONS_AVAILABLE: u32 = 3; -pub const PF_PPC_MOVEMEM_64BIT_OK: u32 = 4; -pub const PF_ALPHA_BYTE_INSTRUCTIONS: u32 = 5; -pub const PF_XMMI_INSTRUCTIONS_AVAILABLE: u32 = 6; -pub const PF_3DNOW_INSTRUCTIONS_AVAILABLE: u32 = 7; -pub const PF_RDTSC_INSTRUCTION_AVAILABLE: u32 = 8; -pub const PF_PAE_ENABLED: u32 = 9; -pub const PF_XMMI64_INSTRUCTIONS_AVAILABLE: u32 = 10; -pub const PF_SSE_DAZ_MODE_AVAILABLE: u32 = 11; -pub const PF_NX_ENABLED: u32 = 12; -pub const PF_SSE3_INSTRUCTIONS_AVAILABLE: u32 = 13; -pub const PF_COMPARE_EXCHANGE128: u32 = 14; -pub const PF_COMPARE64_EXCHANGE128: u32 = 15; -pub const PF_CHANNELS_ENABLED: u32 = 16; -pub const PF_XSAVE_ENABLED: u32 = 17; -pub const PF_ARM_VFP_32_REGISTERS_AVAILABLE: u32 = 18; -pub const PF_ARM_NEON_INSTRUCTIONS_AVAILABLE: u32 = 19; -pub const PF_SECOND_LEVEL_ADDRESS_TRANSLATION: u32 = 20; -pub const PF_VIRT_FIRMWARE_ENABLED: u32 = 21; -pub const PF_RDWRFSGSBASE_AVAILABLE: u32 = 22; -pub const PF_FASTFAIL_AVAILABLE: u32 = 23; -pub const PF_ARM_DIVIDE_INSTRUCTION_AVAILABLE: u32 = 24; -pub const PF_ARM_64BIT_LOADSTORE_ATOMIC: u32 = 25; -pub const PF_ARM_EXTERNAL_CACHE_AVAILABLE: u32 = 26; -pub const PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE: u32 = 27; -pub const PF_RDRAND_INSTRUCTION_AVAILABLE: u32 = 28; -pub const PF_ARM_V8_INSTRUCTIONS_AVAILABLE: u32 = 29; -pub const PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE: u32 = 30; -pub const PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE: u32 = 31; -pub const PF_RDTSCP_INSTRUCTION_AVAILABLE: u32 = 32; -pub const PF_RDPID_INSTRUCTION_AVAILABLE: u32 = 33; -pub const PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE: u32 = 34; -pub const PF_MONITORX_INSTRUCTION_AVAILABLE: u32 = 35; -pub const PF_SSSE3_INSTRUCTIONS_AVAILABLE: u32 = 36; -pub const PF_SSE4_1_INSTRUCTIONS_AVAILABLE: u32 = 37; -pub const PF_SSE4_2_INSTRUCTIONS_AVAILABLE: u32 = 38; -pub const PF_AVX_INSTRUCTIONS_AVAILABLE: u32 = 39; -pub const PF_AVX2_INSTRUCTIONS_AVAILABLE: u32 = 40; -pub const PF_AVX512F_INSTRUCTIONS_AVAILABLE: u32 = 41; -pub const PF_ERMS_AVAILABLE: u32 = 42; -pub const PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE: u32 = 43; -pub const PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE: u32 = 44; -pub const PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE: u32 = 45; -pub const IsNEC_98: u32 = 0; -pub const IsNotNEC_98: u32 = 1; -pub const PROCESSOR_FEATURE_MAX: u32 = 64; -pub const EXCEPTION_NONCONTINUABLE: u32 = 1; -pub const EXCEPTION_UNWINDING: u32 = 2; -pub const EXCEPTION_EXIT_UNWIND: u32 = 4; -pub const EXCEPTION_STACK_INVALID: u32 = 8; -pub const EXCEPTION_NESTED_CALL: u32 = 16; -pub const EXCEPTION_TARGET_UNWIND: u32 = 32; -pub const EXCEPTION_COLLIDED_UNWIND: u32 = 64; -pub const EXCEPTION_SOFTWARE_ORIGINATE: u32 = 128; -pub const EXCEPTION_UNWIND: u32 = 102; -pub const EXCEPTION_MAXIMUM_PARAMETERS: u32 = 15; -pub const THREAD_WAIT_OBJECTS: u32 = 3; -pub const SINGLE_GROUP_LEGACY_API: u32 = 1; -pub const KB_SECONDARY_DATA_FLAG_ADDITIONAL_DATA: u32 = 1; -pub const KB_SECONDARY_DATA_FLAG_NO_DEVICE_ACCESS: u32 = 2; -pub const KB_ADD_PAGES_FLAG_VIRTUAL_ADDRESS: u32 = 1; -pub const KB_ADD_PAGES_FLAG_PHYSICAL_ADDRESS: u32 = 2; -pub const KB_ADD_PAGES_FLAG_ADDITIONAL_RANGES_EXIST: u32 = 2147483648; -pub const KB_REMOVE_PAGES_FLAG_VIRTUAL_ADDRESS: u32 = 1; -pub const KB_REMOVE_PAGES_FLAG_PHYSICAL_ADDRESS: u32 = 2; -pub const KB_REMOVE_PAGES_FLAG_ADDITIONAL_RANGES_EXIST: u32 = 2147483648; -pub const KE_MAX_TRIAGE_DUMP_DATA_MEMORY_SIZE: u32 = 33554432; -pub const KB_TRIAGE_DUMP_DATA_FLAG_BUGCHECK_ACTIVE: u32 = 1; -pub const EXCEPTION_DIVIDED_BY_ZERO: u32 = 0; -pub const EXCEPTION_DEBUG: u32 = 1; -pub const EXCEPTION_NMI: u32 = 2; -pub const EXCEPTION_INT3: u32 = 3; -pub const EXCEPTION_BOUND_CHECK: u32 = 5; -pub const EXCEPTION_INVALID_OPCODE: u32 = 6; -pub const EXCEPTION_NPX_NOT_AVAILABLE: u32 = 7; -pub const EXCEPTION_DOUBLE_FAULT: u32 = 8; -pub const EXCEPTION_NPX_OVERRUN: u32 = 9; -pub const EXCEPTION_INVALID_TSS: u32 = 10; -pub const EXCEPTION_SEGMENT_NOT_PRESENT: u32 = 11; -pub const EXCEPTION_STACK_FAULT: u32 = 12; -pub const EXCEPTION_GP_FAULT: u32 = 13; -pub const EXCEPTION_RESERVED_TRAP: u32 = 15; -pub const EXCEPTION_NPX_ERROR: u32 = 16; -pub const EXCEPTION_ALIGNMENT_CHECK: u32 = 17; -pub const EXCEPTION_CP_FAULT: u32 = 21; -pub const EXCEPTION_SE_FAULT: u32 = 23; -pub const EXCEPTION_VIRTUALIZATION_FAULT: u32 = 32; -pub const KE_PROCESSOR_CHANGE_ADD_EXISTING: u32 = 1; -pub const INVALID_PROCESSOR_INDEX: u32 = 4294967295; -pub const POOL_COLD_ALLOCATION: u32 = 256; -pub const POOL_NX_ALLOCATION: u32 = 512; -pub const POOL_ZERO_ALLOCATION: u32 = 1024; -pub const POOL_QUOTA_FAIL_INSTEAD_OF_RAISE: u32 = 8; -pub const POOL_RAISE_IF_ALLOCATION_FAILURE: u32 = 16; -pub const POOL_EXTENDED_PARAMETER_TYPE_BITS: u32 = 8; -pub const POOL_EXTENDED_PARAMETER_REQUIRED_FIELD_BITS: u32 = 1; -pub const POOL_EXTENDED_PARAMETER_RESERVED_BITS: u32 = 55; -pub const SECURE_POOL_FLAGS_NONE: u32 = 0; -pub const SECURE_POOL_FLAGS_FREEABLE: u32 = 1; -pub const SECURE_POOL_FLAGS_MODIFIABLE: u32 = 2; -pub const POOL_CREATE_FLG_SECURE_POOL: u32 = 1; -pub const POOL_CREATE_FLG_USE_GLOBAL_POOL: u32 = 2; -pub const POOL_CREATE_FLG_VALID_FLAGS: u32 = 3; -pub const POOL_CREATE_PARAMS_VERSION: u32 = 1; -pub const FM_LOCK_BIT: u32 = 1; -pub const FM_LOCK_BIT_V: u32 = 0; -pub const EX_LOOKASIDE_LIST_EX_FLAGS_RAISE_ON_FAIL: u32 = 1; -pub const EX_LOOKASIDE_LIST_EX_FLAGS_FAIL_NO_RAISE: u32 = 2; -pub const EX_MAXIMUM_LOOKASIDE_DEPTH_BASE: u32 = 256; -pub const EX_MAXIMUM_LOOKASIDE_DEPTH_LIMIT: u32 = 1024; -pub const ResourceNeverExclusive: u32 = 16; -pub const ResourceReleaseByOtherThread: u32 = 32; -pub const ResourceOwnedExclusive: u32 = 128; -pub const RESOURCE_HASH_TABLE_SIZE: u32 = 64; -pub const FLAG_OWNER_POINTER_IS_THREAD: u32 = 1; -pub const EX_RUNDOWN_ACTIVE: u32 = 1; -pub const EX_RUNDOWN_COUNT_SHIFT: u32 = 1; -pub const EX_RUNDOWN_COUNT_INC: u32 = 2; -pub const EX_TIMER_HIGH_RESOLUTION: u32 = 4; -pub const EX_TIMER_NO_WAKE: u32 = 8; -pub const EX_TIMER_NOTIFICATION: u32 = 2147483648; -pub const EX_CARR_ALLOCATE_PAGED_POOL: u32 = 0; -pub const EX_CARR_ALLOCATE_NONPAGED_POOL: u32 = 1; -pub const EX_CARR_DISABLE_EXPANSION: u32 = 2; -pub const EX_CARR_VALID_FLAGS: u32 = 3; -pub const EX_DEFAULT_PUSH_LOCK_FLAGS: u32 = 0; -pub const ATS_DEVICE_SVM_OPTOUT: u32 = 1; -pub const EVENT_INCREMENT: u32 = 1; -pub const IO_NO_INCREMENT: u32 = 0; -pub const IO_CD_ROM_INCREMENT: u32 = 1; -pub const IO_DISK_INCREMENT: u32 = 1; -pub const IO_KEYBOARD_INCREMENT: u32 = 6; -pub const IO_MAILSLOT_INCREMENT: u32 = 2; -pub const IO_MOUSE_INCREMENT: u32 = 6; -pub const IO_NAMED_PIPE_INCREMENT: u32 = 2; -pub const IO_NETWORK_INCREMENT: u32 = 2; -pub const IO_PARALLEL_INCREMENT: u32 = 1; -pub const IO_SERIAL_INCREMENT: u32 = 2; -pub const IO_SOUND_INCREMENT: u32 = 8; -pub const IO_VIDEO_INCREMENT: u32 = 1; -pub const SEMAPHORE_INCREMENT: u32 = 1; -pub const MM_MAXIMUM_DISK_IO_SIZE: u32 = 65536; -pub const MM_PERMANENT_ADDRESS_IS_IO_SPACE: u32 = 1; -pub const MM_DUMP_MAP_CACHED: u32 = 1; -pub const MM_DUMP_MAP_INVALIDATE: u32 = 2; -pub const MdlMappingNoWrite: u32 = 2147483648; -pub const MdlMappingNoExecute: u32 = 1073741824; -pub const MdlMappingWithGuardPtes: u32 = 536870912; -pub const MM_MAPPING_ADDRESS_DIVISIBLE: u32 = 1; -pub const MM_DONT_ZERO_ALLOCATION: u32 = 1; -pub const MM_ALLOCATE_FROM_LOCAL_NODE_ONLY: u32 = 2; -pub const MM_ALLOCATE_FULLY_REQUIRED: u32 = 4; -pub const MM_ALLOCATE_NO_WAIT: u32 = 8; -pub const MM_ALLOCATE_PREFER_CONTIGUOUS: u32 = 16; -pub const MM_ALLOCATE_REQUIRE_CONTIGUOUS_CHUNKS: u32 = 32; -pub const MM_ALLOCATE_FAST_LARGE_PAGES: u32 = 64; -pub const MM_ALLOCATE_TRIM_IF_NECESSARY: u32 = 128; -pub const MM_ALLOCATE_AND_HOT_REMOVE: u32 = 256; -pub const MM_FREE_MDL_PAGES_ZERO: u32 = 1; -pub const MM_ANY_NODE_OK: u32 = 2147483648; -pub const MM_ALLOCATE_CONTIGUOUS_MEMORY_FAST_ONLY: u32 = 1; -pub const MM_PROTECT_DRIVER_SECTION_ALLOW_UNLOAD: u32 = 1; -pub const MM_PROTECT_DRIVER_SECTION_VALID_FLAGS: u32 = 1; -pub const INITIAL_PRIVILEGE_COUNT: u32 = 3; -pub const IO_TYPE_ADAPTER: u32 = 1; -pub const IO_TYPE_CONTROLLER: u32 = 2; -pub const IO_TYPE_DEVICE: u32 = 3; -pub const IO_TYPE_DRIVER: u32 = 4; -pub const IO_TYPE_FILE: u32 = 5; -pub const IO_TYPE_IRP: u32 = 6; -pub const IO_TYPE_MASTER_ADAPTER: u32 = 7; -pub const IO_TYPE_OPEN_PACKET: u32 = 8; -pub const IO_TYPE_TIMER: u32 = 9; -pub const IO_TYPE_VPB: u32 = 10; -pub const IO_TYPE_ERROR_LOG: u32 = 11; -pub const IO_TYPE_ERROR_MESSAGE: u32 = 12; -pub const IO_TYPE_DEVICE_OBJECT_EXTENSION: u32 = 13; -pub const IO_TYPE_IORING: u32 = 14; -pub const IRP_MJ_CREATE: u32 = 0; -pub const IRP_MJ_CREATE_NAMED_PIPE: u32 = 1; -pub const IRP_MJ_CLOSE: u32 = 2; -pub const IRP_MJ_READ: u32 = 3; -pub const IRP_MJ_WRITE: u32 = 4; -pub const IRP_MJ_QUERY_INFORMATION: u32 = 5; -pub const IRP_MJ_SET_INFORMATION: u32 = 6; -pub const IRP_MJ_QUERY_EA: u32 = 7; -pub const IRP_MJ_SET_EA: u32 = 8; -pub const IRP_MJ_FLUSH_BUFFERS: u32 = 9; -pub const IRP_MJ_QUERY_VOLUME_INFORMATION: u32 = 10; -pub const IRP_MJ_SET_VOLUME_INFORMATION: u32 = 11; -pub const IRP_MJ_DIRECTORY_CONTROL: u32 = 12; -pub const IRP_MJ_FILE_SYSTEM_CONTROL: u32 = 13; -pub const IRP_MJ_DEVICE_CONTROL: u32 = 14; -pub const IRP_MJ_INTERNAL_DEVICE_CONTROL: u32 = 15; -pub const IRP_MJ_SHUTDOWN: u32 = 16; -pub const IRP_MJ_LOCK_CONTROL: u32 = 17; -pub const IRP_MJ_CLEANUP: u32 = 18; -pub const IRP_MJ_CREATE_MAILSLOT: u32 = 19; -pub const IRP_MJ_QUERY_SECURITY: u32 = 20; -pub const IRP_MJ_SET_SECURITY: u32 = 21; -pub const IRP_MJ_POWER: u32 = 22; -pub const IRP_MJ_SYSTEM_CONTROL: u32 = 23; -pub const IRP_MJ_DEVICE_CHANGE: u32 = 24; -pub const IRP_MJ_QUERY_QUOTA: u32 = 25; -pub const IRP_MJ_SET_QUOTA: u32 = 26; -pub const IRP_MJ_PNP: u32 = 27; -pub const IRP_MJ_PNP_POWER: u32 = 27; -pub const IRP_MJ_MAXIMUM_FUNCTION: u32 = 27; -pub const IRP_MJ_SCSI: u32 = 15; -pub const IRP_MN_SCSI_CLASS: u32 = 1; -pub const IRP_MN_START_DEVICE: u32 = 0; -pub const IRP_MN_QUERY_REMOVE_DEVICE: u32 = 1; -pub const IRP_MN_REMOVE_DEVICE: u32 = 2; -pub const IRP_MN_CANCEL_REMOVE_DEVICE: u32 = 3; -pub const IRP_MN_STOP_DEVICE: u32 = 4; -pub const IRP_MN_QUERY_STOP_DEVICE: u32 = 5; -pub const IRP_MN_CANCEL_STOP_DEVICE: u32 = 6; -pub const IRP_MN_QUERY_DEVICE_RELATIONS: u32 = 7; -pub const IRP_MN_QUERY_INTERFACE: u32 = 8; -pub const IRP_MN_QUERY_CAPABILITIES: u32 = 9; -pub const IRP_MN_QUERY_RESOURCES: u32 = 10; -pub const IRP_MN_QUERY_RESOURCE_REQUIREMENTS: u32 = 11; -pub const IRP_MN_QUERY_DEVICE_TEXT: u32 = 12; -pub const IRP_MN_FILTER_RESOURCE_REQUIREMENTS: u32 = 13; -pub const IRP_MN_READ_CONFIG: u32 = 15; -pub const IRP_MN_WRITE_CONFIG: u32 = 16; -pub const IRP_MN_EJECT: u32 = 17; -pub const IRP_MN_SET_LOCK: u32 = 18; -pub const IRP_MN_QUERY_ID: u32 = 19; -pub const IRP_MN_QUERY_PNP_DEVICE_STATE: u32 = 20; -pub const IRP_MN_QUERY_BUS_INFORMATION: u32 = 21; -pub const IRP_MN_DEVICE_USAGE_NOTIFICATION: u32 = 22; -pub const IRP_MN_SURPRISE_REMOVAL: u32 = 23; -pub const IRP_MN_DEVICE_ENUMERATED: u32 = 25; -pub const IRP_MN_WAIT_WAKE: u32 = 0; -pub const IRP_MN_POWER_SEQUENCE: u32 = 1; -pub const IRP_MN_SET_POWER: u32 = 2; -pub const IRP_MN_QUERY_POWER: u32 = 3; -pub const IRP_MN_QUERY_ALL_DATA: u32 = 0; -pub const IRP_MN_QUERY_SINGLE_INSTANCE: u32 = 1; -pub const IRP_MN_CHANGE_SINGLE_INSTANCE: u32 = 2; -pub const IRP_MN_CHANGE_SINGLE_ITEM: u32 = 3; -pub const IRP_MN_ENABLE_EVENTS: u32 = 4; -pub const IRP_MN_DISABLE_EVENTS: u32 = 5; -pub const IRP_MN_ENABLE_COLLECTION: u32 = 6; -pub const IRP_MN_DISABLE_COLLECTION: u32 = 7; -pub const IRP_MN_REGINFO: u32 = 8; -pub const IRP_MN_EXECUTE_METHOD: u32 = 9; -pub const IRP_MN_REGINFO_EX: u32 = 11; -pub const IO_FORCE_ACCESS_CHECK: u32 = 1; -pub const IO_NO_PARAMETER_CHECKING: u32 = 256; -pub const IO_REPARSE: u32 = 0; -pub const IO_REMOUNT: u32 = 1; -pub const IO_REPARSE_GLOBAL: u32 = 2; -pub const VPB_MOUNTED: u32 = 1; -pub const VPB_LOCKED: u32 = 2; -pub const VPB_PERSISTENT: u32 = 4; -pub const VPB_REMOVE_PENDING: u32 = 8; -pub const VPB_RAW_MOUNT: u32 = 16; -pub const VPB_DIRECT_WRITES_ALLOWED: u32 = 32; -pub const VPB_FLAGS_BYPASSIO_BLOCKED: u32 = 64; -pub const VPB_DISMOUNTING: u32 = 128; -pub const DO_VERIFY_VOLUME: u32 = 2; -pub const DO_BUFFERED_IO: u32 = 4; -pub const DO_EXCLUSIVE: u32 = 8; -pub const DO_DIRECT_IO: u32 = 16; -pub const DO_MAP_IO_BUFFER: u32 = 32; -pub const DO_DEVICE_INITIALIZING: u32 = 128; -pub const DO_SHUTDOWN_REGISTERED: u32 = 2048; -pub const DO_BUS_ENUMERATED_DEVICE: u32 = 4096; -pub const DO_POWER_PAGABLE: u32 = 8192; -pub const DO_POWER_INRUSH: u32 = 16384; -pub const DO_DEVICE_TO_BE_RESET: u32 = 67108864; -pub const DO_DAX_VOLUME: u32 = 268435456; -pub const DRVO_UNLOAD_INVOKED: u32 = 1; -pub const DRVO_LEGACY_DRIVER: u32 = 2; -pub const DRVO_BUILTIN_DRIVER: u32 = 4; -pub const FO_FILE_OPEN: u32 = 1; -pub const FO_SYNCHRONOUS_IO: u32 = 2; -pub const FO_ALERTABLE_IO: u32 = 4; -pub const FO_NO_INTERMEDIATE_BUFFERING: u32 = 8; -pub const FO_WRITE_THROUGH: u32 = 16; -pub const FO_SEQUENTIAL_ONLY: u32 = 32; -pub const FO_CACHE_SUPPORTED: u32 = 64; -pub const FO_NAMED_PIPE: u32 = 128; -pub const FO_STREAM_FILE: u32 = 256; -pub const FO_MAILSLOT: u32 = 512; -pub const FO_GENERATE_AUDIT_ON_CLOSE: u32 = 1024; -pub const FO_QUEUE_IRP_TO_THREAD: u32 = 1024; -pub const FO_DIRECT_DEVICE_OPEN: u32 = 2048; -pub const FO_FILE_MODIFIED: u32 = 4096; -pub const FO_FILE_SIZE_CHANGED: u32 = 8192; -pub const FO_CLEANUP_COMPLETE: u32 = 16384; -pub const FO_TEMPORARY_FILE: u32 = 32768; -pub const FO_DELETE_ON_CLOSE: u32 = 65536; -pub const FO_OPENED_CASE_SENSITIVE: u32 = 131072; -pub const FO_HANDLE_CREATED: u32 = 262144; -pub const FO_FILE_FAST_IO_READ: u32 = 524288; -pub const FO_RANDOM_ACCESS: u32 = 1048576; -pub const FO_FILE_OPEN_CANCELLED: u32 = 2097152; -pub const FO_VOLUME_OPEN: u32 = 4194304; -pub const FO_BYPASS_IO_ENABLED: u32 = 8388608; -pub const FO_REMOTE_ORIGIN: u32 = 16777216; -pub const FO_DISALLOW_EXCLUSIVE: u32 = 33554432; -pub const FO_SKIP_COMPLETION_PORT: u32 = 33554432; -pub const FO_SKIP_SET_EVENT: u32 = 67108864; -pub const FO_SKIP_SET_FAST_IO: u32 = 134217728; -pub const FO_INDIRECT_WAIT_OBJECT: u32 = 268435456; -pub const FO_SECTION_MINSTORE_TREATMENT: u32 = 536870912; -pub const FO_FLAGS_VALID_ONLY_DURING_CREATE: u32 = 33554432; -pub const IRP_NOCACHE: u32 = 1; -pub const IRP_PAGING_IO: u32 = 2; -pub const IRP_MOUNT_COMPLETION: u32 = 2; -pub const IRP_SYNCHRONOUS_API: u32 = 4; -pub const IRP_ASSOCIATED_IRP: u32 = 8; -pub const IRP_BUFFERED_IO: u32 = 16; -pub const IRP_DEALLOCATE_BUFFER: u32 = 32; -pub const IRP_INPUT_OPERATION: u32 = 64; -pub const IRP_SYNCHRONOUS_PAGING_IO: u32 = 64; -pub const IRP_CREATE_OPERATION: u32 = 128; -pub const IRP_READ_OPERATION: u32 = 256; -pub const IRP_WRITE_OPERATION: u32 = 512; -pub const IRP_CLOSE_OPERATION: u32 = 1024; -pub const IRP_DEFER_IO_COMPLETION: u32 = 2048; -pub const IRP_OB_QUERY_NAME: u32 = 4096; -pub const IRP_HOLD_DEVICE_QUEUE: u32 = 8192; -pub const IRP_UM_DRIVER_INITIATED_IO: u32 = 4194304; -pub const IRP_QUOTA_CHARGED: u32 = 1; -pub const IRP_ALLOCATED_MUST_SUCCEED: u32 = 2; -pub const IRP_ALLOCATED_FIXED_SIZE: u32 = 4; -pub const IRP_LOOKASIDE_ALLOCATION: u32 = 8; -pub const SL_PENDING_RETURNED: u32 = 1; -pub const SL_ERROR_RETURNED: u32 = 2; -pub const SL_INVOKE_ON_CANCEL: u32 = 32; -pub const SL_INVOKE_ON_SUCCESS: u32 = 64; -pub const SL_INVOKE_ON_ERROR: u32 = 128; -pub const SL_FORCE_ACCESS_CHECK: u32 = 1; -pub const SL_OPEN_PAGING_FILE: u32 = 2; -pub const SL_OPEN_TARGET_DIRECTORY: u32 = 4; -pub const SL_STOP_ON_SYMLINK: u32 = 8; -pub const SL_IGNORE_READONLY_ATTRIBUTE: u32 = 64; -pub const SL_CASE_SENSITIVE: u32 = 128; -pub const SL_KEY_SPECIFIED: u32 = 1; -pub const SL_OVERRIDE_VERIFY_VOLUME: u32 = 2; -pub const SL_WRITE_THROUGH: u32 = 4; -pub const SL_FT_SEQUENTIAL_WRITE: u32 = 8; -pub const SL_FORCE_DIRECT_WRITE: u32 = 16; -pub const SL_REALTIME_STREAM: u32 = 32; -pub const SL_PERSISTENT_MEMORY_FIXED_MAPPING: u32 = 32; -pub const SL_BYPASS_IO: u32 = 64; -pub const SL_FORCE_ASYNCHRONOUS: u32 = 1; -pub const SL_READ_ACCESS_GRANTED: u32 = 1; -pub const SL_WRITE_ACCESS_GRANTED: u32 = 4; -pub const SL_FAIL_IMMEDIATELY: u32 = 1; -pub const SL_EXCLUSIVE_LOCK: u32 = 2; -pub const SL_RESTART_SCAN: u32 = 1; -pub const SL_RETURN_SINGLE_ENTRY: u32 = 2; -pub const SL_INDEX_SPECIFIED: u32 = 4; -pub const SL_RETURN_ON_DISK_ENTRIES_ONLY: u32 = 8; -pub const SL_NO_CURSOR_UPDATE: u32 = 16; -pub const SL_QUERY_DIRECTORY_MASK: u32 = 27; -pub const SL_WATCH_TREE: u32 = 1; -pub const SL_ALLOW_RAW_MOUNT: u32 = 1; -pub const SL_BYPASS_ACCESS_CHECK: u32 = 1; -pub const SL_INFO_FORCE_ACCESS_CHECK: u32 = 1; -pub const SL_INFO_IGNORE_READONLY_ATTRIBUTE: u32 = 64; -pub const PNP_DEVICE_DISABLED: u32 = 1; -pub const PNP_DEVICE_DONT_DISPLAY_IN_UI: u32 = 2; -pub const PNP_DEVICE_FAILED: u32 = 4; -pub const PNP_DEVICE_REMOVED: u32 = 8; -pub const PNP_DEVICE_RESOURCE_REQUIREMENTS_CHANGED: u32 = 16; -pub const PNP_DEVICE_NOT_DISABLEABLE: u32 = 32; -pub const PNP_DEVICE_DISCONNECTED: u32 = 64; -pub const PNP_DEVICE_RESOURCE_UPDATED: u32 = 128; -pub const PNP_DEVICE_ASSIGNED_TO_GUEST: u32 = 256; -pub const IO_SHARE_ACCESS_NO_WRITE_PERMISSION: u32 = 2147483648; -pub const IO_SHARE_ACCESS_NON_PRIMARY_STREAM: u32 = 128; -pub const IO_CHECK_SHARE_ACCESS_UPDATE_SHARE_ACCESS: u32 = 1; -pub const IO_CHECK_SHARE_ACCESS_DONT_UPDATE_FILE_OBJECT: u32 = 2; -pub const IO_CHECK_SHARE_ACCESS_DONT_CHECK_READ: u32 = 4; -pub const IO_CHECK_SHARE_ACCESS_DONT_CHECK_WRITE: u32 = 8; -pub const IO_CHECK_SHARE_ACCESS_DONT_CHECK_DELETE: u32 = 16; -pub const IO_CHECK_SHARE_ACCESS_FORCE_CHECK: u32 = 32; -pub const IO_CHECK_SHARE_ACCESS_FORCE_USING_SCB: u32 = 64; -pub const CONNECT_FULLY_SPECIFIED: u32 = 1; -pub const CONNECT_LINE_BASED: u32 = 2; -pub const CONNECT_MESSAGE_BASED: u32 = 3; -pub const CONNECT_FULLY_SPECIFIED_GROUP: u32 = 4; -pub const CONNECT_MESSAGE_BASED_PASSIVE: u32 = 5; -pub const CONNECT_CURRENT_VERSION: u32 = 5; -pub const WDM_MAJORVERSION: u32 = 6; -pub const WDM_MINORVERSION: u32 = 0; -pub const WMIREG_ACTION_REGISTER: u32 = 1; -pub const WMIREG_ACTION_DEREGISTER: u32 = 2; -pub const WMIREG_ACTION_REREGISTER: u32 = 3; -pub const WMIREG_ACTION_UPDATE_GUIDS: u32 = 4; -pub const WMIREG_ACTION_BLOCK_IRPS: u32 = 5; -pub const WMIREGISTER: u32 = 0; -pub const WMIUPDATE: u32 = 1; -pub const IO_TYPE_CSQ_IRP_CONTEXT: u32 = 1; -pub const IO_TYPE_CSQ: u32 = 2; -pub const IO_TYPE_CSQ_EX: u32 = 3; -pub const IO_ATTRIBUTION_INFO_V1: u32 = 1; -pub const IO_SET_IRP_IO_ATTRIBUTION_FROM_THREAD: u32 = 1; -pub const IO_SET_IRP_IO_ATTRIBUTION_FROM_PROCESS: u32 = 2; -pub const IO_SET_IRP_IO_ATTRIBUTION_FLAGS_MASK: u32 = 3; -pub const EVENT_MIN_LEVEL: u32 = 0; -pub const EVENT_MAX_LEVEL: u32 = 255; -pub const EVENT_ACTIVITY_CTRL_GET_ID: u32 = 1; -pub const EVENT_ACTIVITY_CTRL_SET_ID: u32 = 2; -pub const EVENT_ACTIVITY_CTRL_CREATE_ID: u32 = 3; -pub const EVENT_ACTIVITY_CTRL_GET_SET_ID: u32 = 4; -pub const EVENT_ACTIVITY_CTRL_CREATE_SET_ID: u32 = 5; -pub const MAX_EVENT_DATA_DESCRIPTORS: u32 = 128; -pub const MAX_EVENT_FILTER_DATA_SIZE: u32 = 1024; -pub const MAX_EVENT_FILTER_PAYLOAD_SIZE: u32 = 4096; -pub const MAX_EVENT_FILTER_EVENT_NAME_SIZE: u32 = 4096; -pub const MAX_EVENT_FILTERS_COUNT: u32 = 13; -pub const MAX_EVENT_FILTER_PID_COUNT: u32 = 8; -pub const MAX_EVENT_FILTER_EVENT_ID_COUNT: u32 = 64; -pub const EVENT_FILTER_TYPE_NONE: u32 = 0; -pub const EVENT_FILTER_TYPE_SCHEMATIZED: u32 = 2147483648; -pub const EVENT_FILTER_TYPE_SYSTEM_FLAGS: u32 = 2147483649; -pub const EVENT_FILTER_TYPE_TRACEHANDLE: u32 = 2147483650; -pub const EVENT_FILTER_TYPE_PID: u32 = 2147483652; -pub const EVENT_FILTER_TYPE_EXECUTABLE_NAME: u32 = 2147483656; -pub const EVENT_FILTER_TYPE_PACKAGE_ID: u32 = 2147483664; -pub const EVENT_FILTER_TYPE_PACKAGE_APP_ID: u32 = 2147483680; -pub const EVENT_FILTER_TYPE_PAYLOAD: u32 = 2147483904; -pub const EVENT_FILTER_TYPE_EVENT_ID: u32 = 2147484160; -pub const EVENT_FILTER_TYPE_EVENT_NAME: u32 = 2147484672; -pub const EVENT_FILTER_TYPE_STACKWALK: u32 = 2147487744; -pub const EVENT_FILTER_TYPE_STACKWALK_NAME: u32 = 2147491840; -pub const EVENT_FILTER_TYPE_STACKWALK_LEVEL_KW: u32 = 2147500032; -pub const EVENT_FILTER_TYPE_CONTAINER: u32 = 2147516416; -pub const EVENT_DATA_DESCRIPTOR_TYPE_NONE: u32 = 0; -pub const EVENT_DATA_DESCRIPTOR_TYPE_EVENT_METADATA: u32 = 1; -pub const EVENT_DATA_DESCRIPTOR_TYPE_PROVIDER_METADATA: u32 = 2; -pub const EVENT_DATA_DESCRIPTOR_TYPE_TIMESTAMP_OVERRIDE: u32 = 3; -pub const EVENT_WRITE_FLAG_NO_FAULTING: u32 = 1; -pub const EVENT_WRITE_FLAG_INPRIVATE: u32 = 2; -pub const __string_type: u32 = 0; -pub const __guid_type: u32 = 0; -pub const __multiString_type: u32 = 0; -pub const PCI_SECURITY_INTERFACE_VERSION: u32 = 1; -pub const PCI_SECURITY_INTERFACE_VERSION2: u32 = 2; -pub const PCI_SECURITY_FULLY_SUPPORTED: u32 = 1; -pub const PCI_SECURITY_ENHANCED: u32 = 2; -pub const PCI_SECURITY_GUEST_ASSIGNED: u32 = 1; -pub const PCI_SECURITY_DIRECT_TRANSLATED_P2P: u32 = 4; -pub const PCI_SECURITY_SRIOV_DIRECT_TRANSLATED_P2P: u32 = 262144; -pub const PCI_ATS_INTERFACE_VERSION: u32 = 1; -pub const PNP_EXTENDED_ADDRESS_INTERFACE_VERSION: u32 = 1; -pub const D3COLD_SUPPORT_INTERFACE_VERSION: u32 = 1; -pub const PCI_PTM_TIME_SOURCE_AUX: u32 = 4294967295; -pub const NPEM_CONTROL_INTERFACE_VERSION1: u32 = 1; -pub const NPEM_CONTROL_INTERFACE_VERSION2: u32 = 2; -pub const NPEM_CONTROL_INTERFACE_CURRENT_VERSION: u32 = 2; -pub const PLUGPLAY_REGKEY_DEVICE: u32 = 1; -pub const PLUGPLAY_REGKEY_DRIVER: u32 = 2; -pub const PLUGPLAY_REGKEY_CURRENT_HWPROFILE: u32 = 4; -pub const DEVICE_INTERFACE_INCLUDE_NONACTIVE: u32 = 1; -pub const PNPNOTIFY_DEVICE_INTERFACE_INCLUDE_EXISTING_INTERFACES: u32 = 1; -pub const KERNEL_SOFT_RESTART_NOTIFICATION_VERSION: u32 = 1; -pub const DEVPROP_TYPEMOD_ARRAY: u32 = 4096; -pub const DEVPROP_TYPEMOD_LIST: u32 = 8192; -pub const DEVPROP_TYPE_EMPTY: u32 = 0; -pub const DEVPROP_TYPE_NULL: u32 = 1; -pub const DEVPROP_TYPE_SBYTE: u32 = 2; -pub const DEVPROP_TYPE_BYTE: u32 = 3; -pub const DEVPROP_TYPE_INT16: u32 = 4; -pub const DEVPROP_TYPE_UINT16: u32 = 5; -pub const DEVPROP_TYPE_INT32: u32 = 6; -pub const DEVPROP_TYPE_UINT32: u32 = 7; -pub const DEVPROP_TYPE_INT64: u32 = 8; -pub const DEVPROP_TYPE_UINT64: u32 = 9; -pub const DEVPROP_TYPE_FLOAT: u32 = 10; -pub const DEVPROP_TYPE_DOUBLE: u32 = 11; -pub const DEVPROP_TYPE_DECIMAL: u32 = 12; -pub const DEVPROP_TYPE_GUID: u32 = 13; -pub const DEVPROP_TYPE_CURRENCY: u32 = 14; -pub const DEVPROP_TYPE_DATE: u32 = 15; -pub const DEVPROP_TYPE_FILETIME: u32 = 16; -pub const DEVPROP_TYPE_BOOLEAN: u32 = 17; -pub const DEVPROP_TYPE_STRING: u32 = 18; -pub const DEVPROP_TYPE_STRING_LIST: u32 = 8210; -pub const DEVPROP_TYPE_SECURITY_DESCRIPTOR: u32 = 19; -pub const DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING: u32 = 20; -pub const DEVPROP_TYPE_DEVPROPKEY: u32 = 21; -pub const DEVPROP_TYPE_DEVPROPTYPE: u32 = 22; -pub const DEVPROP_TYPE_BINARY: u32 = 4099; -pub const DEVPROP_TYPE_ERROR: u32 = 23; -pub const DEVPROP_TYPE_NTSTATUS: u32 = 24; -pub const DEVPROP_TYPE_STRING_INDIRECT: u32 = 25; -pub const MAX_DEVPROP_TYPE: u32 = 25; -pub const MAX_DEVPROP_TYPEMOD: u32 = 8192; -pub const DEVPROP_MASK_TYPE: u32 = 4095; -pub const DEVPROP_MASK_TYPEMOD: u32 = 61440; -pub const DEVPROPID_FIRST_USABLE: u32 = 2; -pub const PLUGPLAY_PROPERTY_PERSISTENT: u32 = 1; -pub const PNP_REPLACE_NO_MAP: u64 = 9223372036854775807; -pub const PNP_REPLACE_PARAMETERS_VERSION: u32 = 2; -pub const PNP_REPLACE_DRIVER_INTERFACE_VERSION: u32 = 1; -pub const PNP_REPLACE_MEMORY_SUPPORTED: u32 = 1; -pub const PNP_REPLACE_PROCESSOR_SUPPORTED: u32 = 2; -pub const PNP_REPLACE_HARDWARE_MEMORY_MIRRORING: u32 = 4; -pub const PNP_REPLACE_HARDWARE_PAGE_COPY: u32 = 8; -pub const PNP_REPLACE_HARDWARE_QUIESCE: u32 = 16; -pub const DEVICE_RESET_INTERFACE_VERSION_1: u32 = 1; -pub const DEVICE_RESET_INTERFACE_VERSION_2: u32 = 2; -pub const DEVICE_RESET_INTERFACE_VERSION_3: u32 = 3; -pub const DEVICE_RESET_INTERFACE_VERSION: u32 = 1; -pub const SECURE_DRIVER_INTERFACE_VERSION: u32 = 1; -pub const SDEV_IDENTIFIER_INTERFACE_VERSION: u32 = 1; -pub const DEVICE_DESCRIPTION_VERSION: u32 = 0; -pub const DEVICE_DESCRIPTION_VERSION1: u32 = 1; -pub const DEVICE_DESCRIPTION_VERSION2: u32 = 2; -pub const DEVICE_DESCRIPTION_VERSION3: u32 = 3; -pub const DMA_ADAPTER_INFO_VERSION1: u32 = 1; -pub const DMA_ADAPTER_INFO_VERSION_CRASHDUMP: u32 = 4294967295; -pub const ADAPTER_INFO_SYNCHRONOUS_CALLBACK: u32 = 1; -pub const ADAPTER_INFO_API_BYPASS: u32 = 2; -pub const DMA_TRANSFER_INFO_VERSION1: u32 = 1; -pub const DMA_TRANSFER_INFO_VERSION2: u32 = 2; -pub const DMA_TRANSFER_CONTEXT_VERSION1: u32 = 1; -pub const DMA_TRANSFER_CONTEXT_SIZE_V1: u32 = 128; -pub const DMA_SYNCHRONOUS_CALLBACK: u32 = 1; -pub const DMA_ZERO_BUFFERS: u32 = 2; -pub const DMA_FAIL_ON_BOUNCE: u32 = 4; -pub const HAL_MASK_UNMASK_FLAGS_NONE: u32 = 0; -pub const HAL_MASK_UNMASK_FLAGS_SERVICING_DEFERRED: u32 = 1; -pub const HAL_MASK_UNMASK_FLAGS_SERVICING_COMPLETE: u32 = 2; -pub const HAL_DMA_ADAPTER_VERSION_1: u32 = 1; -pub const DOMAIN_COMMON_BUFFER_LARGE_PAGE: u32 = 1; -pub const IOMMU_ACCESS_NONE: u32 = 0; -pub const IOMMU_ACCESS_READ: u32 = 1; -pub const IOMMU_ACCESS_WRITE: u32 = 2; -pub const DMA_IOMMU_INTERFACE_VERSION_1: u32 = 1; -pub const DMA_IOMMU_INTERFACE_VERSION: u32 = 1; -pub const DMA_IOMMU_INTERFACE_EX_VERSION_1: u32 = 1; -pub const DMA_IOMMU_INTERFACE_EX_VERSION_2: u32 = 2; -pub const DMA_IOMMU_INTERFACE_EX_VERSION_MIN: u32 = 1; -pub const DMA_IOMMU_INTERFACE_EX_VERSION_3: u32 = 3; -pub const DMA_IOMMU_INTERFACE_EX_VERSION_MAX: u32 = 3; -pub const DMA_IOMMU_INTERFACE_EX_VERSION: u32 = 3; -pub const PO_MEM_PRESERVE: u32 = 1; -pub const PO_MEM_CLONE: u32 = 2; -pub const PO_MEM_CL_OR_NCHK: u32 = 4; -pub const PO_MEM_DISCARD: u32 = 32768; -pub const PO_MEM_PAGE_ADDRESS: u32 = 16384; -pub const PO_MEM_BOOT_PHASE: u32 = 65536; -pub const PO_CB_SYSTEM_POWER_POLICY: u32 = 0; -pub const PO_CB_AC_STATUS: u32 = 1; -pub const PO_CB_BUTTON_COLLISION: u32 = 2; -pub const PO_CB_SYSTEM_STATE_LOCK: u32 = 3; -pub const PO_CB_LID_SWITCH_STATE: u32 = 4; -pub const PO_CB_PROCESSOR_POWER_POLICY: u32 = 5; -pub const PO_FX_VERSION_V1: u32 = 1; -pub const PO_FX_VERSION_V2: u32 = 2; -pub const PO_FX_VERSION_V3: u32 = 3; -pub const PO_FX_VERSION: u32 = 1; -pub const PO_FX_COMPONENT_FLAG_F0_ON_DX: u32 = 1; -pub const PO_FX_COMPONENT_FLAG_NO_DEBOUNCE: u32 = 2; -pub const PO_FX_DEVICE_FLAG_RESERVED_1: u32 = 1; -pub const PO_FX_DEVICE_FLAG_DFX_DIRECT_CHILDREN_OPTIONAL: u32 = 2; -pub const PO_FX_DEVICE_FLAG_DFX_POWER_CHILDREN_OPTIONAL: u32 = 4; -pub const PO_FX_DEVICE_FLAG_DFX_CHILDREN_OPTIONAL: u32 = 6; -pub const PO_FX_DEVICE_FLAG_DISABLE_FAST_RESUME: u32 = 8; -pub const PO_FX_DEVICE_FLAG_ENABLE_FAST_RESUME: u32 = 16; -pub const PO_FX_DEVICE_FLAG_NO_FAULT_CALLBACKS: u32 = 32; -pub const PO_FX_DIRECTED_FX_DEFAULT_IDLE_TIMEOUT: u32 = 0; -pub const PO_FX_DIRECTED_FX_MAX_IDLE_TIMEOUT: u32 = 600; -pub const PO_FX_UNKNOWN_POWER: u32 = 4294967295; -pub const PO_FX_UNKNOWN_TIME: i32 = -1; -pub const PO_FX_FLAG_BLOCKING: u32 = 1; -pub const PO_FX_FLAG_ASYNC_ONLY: u32 = 2; -pub const PO_FX_FLAG_PERF_PEP_OPTIONAL: u32 = 1; -pub const PO_FX_FLAG_PERF_QUERY_ON_F0: u32 = 2; -pub const PO_FX_FLAG_PERF_QUERY_ON_ALL_IDLE_STATES: u32 = 4; -pub const OB_FLT_REGISTRATION_VERSION_0100: u32 = 256; -pub const OB_FLT_REGISTRATION_VERSION: u32 = 256; -pub const OB_OPERATION_HANDLE_CREATE: u32 = 1; -pub const OB_OPERATION_HANDLE_DUPLICATE: u32 = 2; -pub const PCI_TYPE0_ADDRESSES: u32 = 6; -pub const PCI_TYPE1_ADDRESSES: u32 = 2; -pub const PCI_TYPE2_ADDRESSES: u32 = 5; -pub const PCI_EXTENDED_CONFIG_LENGTH: u32 = 4096; -pub const PCI_MAX_DEVICES: u32 = 32; -pub const PCI_MAX_FUNCTION: u32 = 8; -pub const PCI_MAX_BRIDGE_NUMBER: u32 = 255; -pub const PCI_MAX_SEGMENT_NUMBER: u32 = 65535; -pub const PCI_INVALID_VENDORID: u32 = 65535; -pub const PCI_MULTIFUNCTION: u32 = 128; -pub const PCI_DEVICE_TYPE: u32 = 0; -pub const PCI_BRIDGE_TYPE: u32 = 1; -pub const PCI_CARDBUS_BRIDGE_TYPE: u32 = 2; -pub const PCI_ENABLE_IO_SPACE: u32 = 1; -pub const PCI_ENABLE_MEMORY_SPACE: u32 = 2; -pub const PCI_ENABLE_BUS_MASTER: u32 = 4; -pub const PCI_ENABLE_SPECIAL_CYCLES: u32 = 8; -pub const PCI_ENABLE_WRITE_AND_INVALIDATE: u32 = 16; -pub const PCI_ENABLE_VGA_COMPATIBLE_PALETTE: u32 = 32; -pub const PCI_ENABLE_PARITY: u32 = 64; -pub const PCI_ENABLE_WAIT_CYCLE: u32 = 128; -pub const PCI_ENABLE_SERR: u32 = 256; -pub const PCI_ENABLE_FAST_BACK_TO_BACK: u32 = 512; -pub const PCI_DISABLE_LEVEL_INTERRUPT: u32 = 1024; -pub const PCI_STATUS_IMMEDIATE_READINESS: u32 = 1; -pub const PCI_STATUS_INTERRUPT_PENDING: u32 = 8; -pub const PCI_STATUS_CAPABILITIES_LIST: u32 = 16; -pub const PCI_STATUS_66MHZ_CAPABLE: u32 = 32; -pub const PCI_STATUS_UDF_SUPPORTED: u32 = 64; -pub const PCI_STATUS_FAST_BACK_TO_BACK: u32 = 128; -pub const PCI_STATUS_DATA_PARITY_DETECTED: u32 = 256; -pub const PCI_STATUS_DEVSEL: u32 = 1536; -pub const PCI_STATUS_SIGNALED_TARGET_ABORT: u32 = 2048; -pub const PCI_STATUS_RECEIVED_TARGET_ABORT: u32 = 4096; -pub const PCI_STATUS_RECEIVED_MASTER_ABORT: u32 = 8192; -pub const PCI_STATUS_SIGNALED_SYSTEM_ERROR: u32 = 16384; -pub const PCI_STATUS_DETECTED_PARITY_ERROR: u32 = 32768; -pub const PCI_WHICHSPACE_CONFIG: u32 = 0; -pub const PCI_WHICHSPACE_ROM: u32 = 1382638416; -pub const PCI_CAPABILITY_ID_POWER_MANAGEMENT: u32 = 1; -pub const PCI_CAPABILITY_ID_AGP: u32 = 2; -pub const PCI_CAPABILITY_ID_VPD: u32 = 3; -pub const PCI_CAPABILITY_ID_SLOT_ID: u32 = 4; -pub const PCI_CAPABILITY_ID_MSI: u32 = 5; -pub const PCI_CAPABILITY_ID_CPCI_HOTSWAP: u32 = 6; -pub const PCI_CAPABILITY_ID_PCIX: u32 = 7; -pub const PCI_CAPABILITY_ID_HYPERTRANSPORT: u32 = 8; -pub const PCI_CAPABILITY_ID_VENDOR_SPECIFIC: u32 = 9; -pub const PCI_CAPABILITY_ID_DEBUG_PORT: u32 = 10; -pub const PCI_CAPABILITY_ID_CPCI_RES_CTRL: u32 = 11; -pub const PCI_CAPABILITY_ID_SHPC: u32 = 12; -pub const PCI_CAPABILITY_ID_P2P_SSID: u32 = 13; -pub const PCI_CAPABILITY_ID_AGP_TARGET: u32 = 14; -pub const PCI_CAPABILITY_ID_SECURE: u32 = 15; -pub const PCI_CAPABILITY_ID_PCI_EXPRESS: u32 = 16; -pub const PCI_CAPABILITY_ID_MSIX: u32 = 17; -pub const PCI_CAPABILITY_ID_SATA_CONFIG: u32 = 18; -pub const PCI_CAPABILITY_ID_ADVANCED_FEATURES: u32 = 19; -pub const PCI_CAPABILITY_ID_FPB: u32 = 21; -pub const PCI_EXPRESS_ADVANCED_ERROR_REPORTING_CAP_ID: u32 = 1; -pub const PCI_EXPRESS_VIRTUAL_CHANNEL_CAP_ID: u32 = 2; -pub const PCI_EXPRESS_DEVICE_SERIAL_NUMBER_CAP_ID: u32 = 3; -pub const PCI_EXPRESS_POWER_BUDGETING_CAP_ID: u32 = 4; -pub const PCI_EXPRESS_RC_LINK_DECLARATION_CAP_ID: u32 = 5; -pub const PCI_EXPRESS_RC_INTERNAL_LINK_CONTROL_CAP_ID: u32 = 6; -pub const PCI_EXPRESS_RC_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAP_ID: u32 = 7; -pub const PCI_EXPRESS_MFVC_CAP_ID: u32 = 8; -pub const PCI_EXPRESS_VC_AND_MFVC_CAP_ID: u32 = 9; -pub const PCI_EXPRESS_RCRB_HEADER_CAP_ID: u32 = 10; -pub const PCI_EXPRESS_VENDOR_SPECIFIC_CAP_ID: u32 = 11; -pub const PCI_EXPRESS_CONFIGURATION_ACCESS_CORRELATION_CAP_ID: u32 = 12; -pub const PCI_EXPRESS_ACCESS_CONTROL_SERVICES_CAP_ID: u32 = 13; -pub const PCI_EXPRESS_ARI_CAP_ID: u32 = 14; -pub const PCI_EXPRESS_ATS_CAP_ID: u32 = 15; -pub const PCI_EXPRESS_SINGLE_ROOT_IO_VIRTUALIZATION_CAP_ID: u32 = 16; -pub const PCI_EXPRESS_MULTI_ROOT_IO_VIRTUALIZATION_CAP_ID: u32 = 17; -pub const PCI_EXPRESS_MULTICAST_CAP_ID: u32 = 18; -pub const PCI_EXPRESS_PAGE_REQUEST_CAP_ID: u32 = 19; -pub const PCI_EXPRESS_RESERVED_FOR_AMD_CAP_ID: u32 = 20; -pub const PCI_EXPRESS_RESIZABLE_BAR_CAP_ID: u32 = 21; -pub const PCI_EXPRESS_DPA_CAP_ID: u32 = 22; -pub const PCI_EXPRESS_TPH_REQUESTER_CAP_ID: u32 = 23; -pub const PCI_EXPRESS_LTR_CAP_ID: u32 = 24; -pub const PCI_EXPRESS_SECONDARY_PCI_EXPRESS_CAP_ID: u32 = 25; -pub const PCI_EXPRESS_PMUX_CAP_ID: u32 = 26; -pub const PCI_EXPRESS_PASID_CAP_ID: u32 = 27; -pub const PCI_EXPRESS_LN_REQUESTER_CAP_ID: u32 = 28; -pub const PCI_EXPRESS_DPC_CAP_ID: u32 = 29; -pub const PCI_EXPRESS_L1_PM_SS_CAP_ID: u32 = 30; -pub const PCI_EXPRESS_PTM_CAP_ID: u32 = 31; -pub const PCI_EXPRESS_MPCIE_CAP_ID: u32 = 32; -pub const PCI_EXPRESS_FRS_QUEUEING_CAP_ID: u32 = 33; -pub const PCI_EXPRESS_READINESS_TIME_REPORTING_CAP_ID: u32 = 34; -pub const PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAP_ID: u32 = 35; -pub const PCI_EXPRESS_NPEM_CAP_ID: u32 = 41; -pub const ROOT_CMD_ENABLE_CORRECTABLE_ERROR_REPORTING: u32 = 1; -pub const ROOT_CMD_ENABLE_NONFATAL_ERROR_REPORTING: u32 = 2; -pub const ROOT_CMD_ENABLE_FATAL_ERROR_REPORTING: u32 = 4; -pub const ROOT_CMD_ERROR_REPORTING_ENABLE_MASK: u32 = 7; -pub const PCI_ACS_ALLOWED: u32 = 0; -pub const PCI_ACS_BLOCKED: u32 = 1; -pub const PCI_ACS_REDIRECTED: u32 = 2; -pub const PCI_CLASS_PRE_20: u32 = 0; -pub const PCI_CLASS_MASS_STORAGE_CTLR: u32 = 1; -pub const PCI_CLASS_NETWORK_CTLR: u32 = 2; -pub const PCI_CLASS_DISPLAY_CTLR: u32 = 3; -pub const PCI_CLASS_MULTIMEDIA_DEV: u32 = 4; -pub const PCI_CLASS_MEMORY_CTLR: u32 = 5; -pub const PCI_CLASS_BRIDGE_DEV: u32 = 6; -pub const PCI_CLASS_SIMPLE_COMMS_CTLR: u32 = 7; -pub const PCI_CLASS_BASE_SYSTEM_DEV: u32 = 8; -pub const PCI_CLASS_INPUT_DEV: u32 = 9; -pub const PCI_CLASS_DOCKING_STATION: u32 = 10; -pub const PCI_CLASS_PROCESSOR: u32 = 11; -pub const PCI_CLASS_SERIAL_BUS_CTLR: u32 = 12; -pub const PCI_CLASS_WIRELESS_CTLR: u32 = 13; -pub const PCI_CLASS_INTELLIGENT_IO_CTLR: u32 = 14; -pub const PCI_CLASS_SATELLITE_COMMS_CTLR: u32 = 15; -pub const PCI_CLASS_ENCRYPTION_DECRYPTION: u32 = 16; -pub const PCI_CLASS_DATA_ACQ_SIGNAL_PROC: u32 = 17; -pub const PCI_CLASS_NOT_DEFINED: u32 = 255; -pub const PCI_SUBCLASS_PRE_20_NON_VGA: u32 = 0; -pub const PCI_SUBCLASS_PRE_20_VGA: u32 = 1; -pub const PCI_SUBCLASS_MSC_SCSI_BUS_CTLR: u32 = 0; -pub const PCI_SUBCLASS_MSC_IDE_CTLR: u32 = 1; -pub const PCI_SUBCLASS_MSC_FLOPPY_CTLR: u32 = 2; -pub const PCI_SUBCLASS_MSC_IPI_CTLR: u32 = 3; -pub const PCI_SUBCLASS_MSC_RAID_CTLR: u32 = 4; -pub const PCI_SUBCLASS_MSC_AHCI_CTLR: u32 = 6; -pub const PCI_SUBCLASS_MSC_NVM_CTLR: u32 = 8; -pub const PCI_SUBCLASS_MSC_OTHER: u32 = 128; -pub const PCI_PROGRAMMING_INTERFACE_MSC_NVM_EXPRESS: u32 = 2; -pub const PCI_SUBCLASS_NET_ETHERNET_CTLR: u32 = 0; -pub const PCI_SUBCLASS_NET_TOKEN_RING_CTLR: u32 = 1; -pub const PCI_SUBCLASS_NET_FDDI_CTLR: u32 = 2; -pub const PCI_SUBCLASS_NET_ATM_CTLR: u32 = 3; -pub const PCI_SUBCLASS_NET_ISDN_CTLR: u32 = 4; -pub const PCI_SUBCLASS_NET_OTHER: u32 = 128; -pub const PCI_SUBCLASS_VID_VGA_CTLR: u32 = 0; -pub const PCI_SUBCLASS_VID_XGA_CTLR: u32 = 1; -pub const PCI_SUBLCASS_VID_3D_CTLR: u32 = 2; -pub const PCI_SUBCLASS_VID_OTHER: u32 = 128; -pub const PCI_SUBCLASS_MM_VIDEO_DEV: u32 = 0; -pub const PCI_SUBCLASS_MM_AUDIO_DEV: u32 = 1; -pub const PCI_SUBCLASS_MM_TELEPHONY_DEV: u32 = 2; -pub const PCI_SUBCLASS_MM_OTHER: u32 = 128; -pub const PCI_SUBCLASS_MEM_RAM: u32 = 0; -pub const PCI_SUBCLASS_MEM_FLASH: u32 = 1; -pub const PCI_SUBCLASS_MEM_OTHER: u32 = 128; -pub const PCI_SUBCLASS_BR_HOST: u32 = 0; -pub const PCI_SUBCLASS_BR_ISA: u32 = 1; -pub const PCI_SUBCLASS_BR_EISA: u32 = 2; -pub const PCI_SUBCLASS_BR_MCA: u32 = 3; -pub const PCI_SUBCLASS_BR_PCI_TO_PCI: u32 = 4; -pub const PCI_SUBCLASS_BR_PCMCIA: u32 = 5; -pub const PCI_SUBCLASS_BR_NUBUS: u32 = 6; -pub const PCI_SUBCLASS_BR_CARDBUS: u32 = 7; -pub const PCI_SUBCLASS_BR_RACEWAY: u32 = 8; -pub const PCI_SUBCLASS_BR_OTHER: u32 = 128; -pub const PCI_SUBCLASS_COM_SERIAL: u32 = 0; -pub const PCI_SUBCLASS_COM_PARALLEL: u32 = 1; -pub const PCI_SUBCLASS_COM_MULTIPORT: u32 = 2; -pub const PCI_SUBCLASS_COM_MODEM: u32 = 3; -pub const PCI_SUBCLASS_COM_OTHER: u32 = 128; -pub const PCI_SUBCLASS_SYS_INTERRUPT_CTLR: u32 = 0; -pub const PCI_SUBCLASS_SYS_DMA_CTLR: u32 = 1; -pub const PCI_SUBCLASS_SYS_SYSTEM_TIMER: u32 = 2; -pub const PCI_SUBCLASS_SYS_REAL_TIME_CLOCK: u32 = 3; -pub const PCI_SUBCLASS_SYS_GEN_HOTPLUG_CTLR: u32 = 4; -pub const PCI_SUBCLASS_SYS_SDIO_CTRL: u32 = 5; -pub const PCI_SUBCLASS_SYS_RCEC: u32 = 7; -pub const PCI_SUBCLASS_SYS_OTHER: u32 = 128; -pub const PCI_SUBCLASS_INP_KEYBOARD: u32 = 0; -pub const PCI_SUBCLASS_INP_DIGITIZER: u32 = 1; -pub const PCI_SUBCLASS_INP_MOUSE: u32 = 2; -pub const PCI_SUBCLASS_INP_SCANNER: u32 = 3; -pub const PCI_SUBCLASS_INP_GAMEPORT: u32 = 4; -pub const PCI_SUBCLASS_INP_OTHER: u32 = 128; -pub const PCI_SUBCLASS_DOC_GENERIC: u32 = 0; -pub const PCI_SUBCLASS_DOC_OTHER: u32 = 128; -pub const PCI_SUBCLASS_PROC_386: u32 = 0; -pub const PCI_SUBCLASS_PROC_486: u32 = 1; -pub const PCI_SUBCLASS_PROC_PENTIUM: u32 = 2; -pub const PCI_SUBCLASS_PROC_ALPHA: u32 = 16; -pub const PCI_SUBCLASS_PROC_POWERPC: u32 = 32; -pub const PCI_SUBCLASS_PROC_COPROCESSOR: u32 = 64; -pub const PCI_SUBCLASS_SB_IEEE1394: u32 = 0; -pub const PCI_SUBCLASS_SB_ACCESS: u32 = 1; -pub const PCI_SUBCLASS_SB_SSA: u32 = 2; -pub const PCI_SUBCLASS_SB_USB: u32 = 3; -pub const PCI_SUBCLASS_SB_FIBRE_CHANNEL: u32 = 4; -pub const PCI_SUBCLASS_SB_SMBUS: u32 = 5; -pub const PCI_SUBCLASS_SB_THUNDERBOLT: u32 = 10; -pub const PCI_SUBCLASS_WIRELESS_IRDA: u32 = 0; -pub const PCI_SUBCLASS_WIRELESS_CON_IR: u32 = 1; -pub const PCI_SUBCLASS_WIRELESS_RF: u32 = 16; -pub const PCI_SUBCLASS_WIRELESS_OTHER: u32 = 128; -pub const PCI_SUBCLASS_INTIO_I2O: u32 = 0; -pub const PCI_SUBCLASS_SAT_TV: u32 = 1; -pub const PCI_SUBCLASS_SAT_AUDIO: u32 = 2; -pub const PCI_SUBCLASS_SAT_VOICE: u32 = 3; -pub const PCI_SUBCLASS_SAT_DATA: u32 = 4; -pub const PCI_SUBCLASS_CRYPTO_NET_COMP: u32 = 0; -pub const PCI_SUBCLASS_CRYPTO_ENTERTAINMENT: u32 = 16; -pub const PCI_SUBCLASS_CRYPTO_OTHER: u32 = 128; -pub const PCI_SUBCLASS_DASP_DPIO: u32 = 0; -pub const PCI_SUBCLASS_DASP_OTHER: u32 = 128; -pub const PCI_ADDRESS_IO_SPACE: u32 = 1; -pub const PCI_ADDRESS_MEMORY_TYPE_MASK: u32 = 6; -pub const PCI_ADDRESS_MEMORY_PREFETCHABLE: u32 = 8; -pub const PCI_ADDRESS_IO_ADDRESS_MASK: u32 = 4294967292; -pub const PCI_ADDRESS_MEMORY_ADDRESS_MASK: u32 = 4294967280; -pub const PCI_ADDRESS_ROM_ADDRESS_MASK: u32 = 4294965248; -pub const PCI_TYPE_32BIT: u32 = 0; -pub const PCI_TYPE_20BIT: u32 = 2; -pub const PCI_TYPE_64BIT: u32 = 4; -pub const PCI_ROMADDRESS_ENABLED: u32 = 1; -pub const PCI_DEVICE_PRESENT_INTERFACE_VERSION: u32 = 1; -pub const PCI_USE_SUBSYSTEM_IDS: u32 = 1; -pub const PCI_USE_REVISION: u32 = 2; -pub const PCI_USE_VENDEV_IDS: u32 = 4; -pub const PCI_USE_CLASS_SUBCLASS: u32 = 8; -pub const PCI_USE_PROGIF: u32 = 16; -pub const PCI_USE_LOCAL_BUS: u32 = 32; -pub const PCI_USE_LOCAL_DEVICE: u32 = 64; -pub const PCI_EXPRESS_LINK_QUIESCENT_INTERFACE_VERSION: u32 = 1; -pub const PCI_EXPRESS_ROOT_PORT_INTERFACE_VERSION: u32 = 1; -pub const PCI_MSIX_TABLE_CONFIG_INTERFACE_VERSION: u32 = 1; -pub const FILE_ATTRIBUTE_DEDICATED: u32 = 256; -#[allow(unsafe_code)] -pub const EA_CONTAINER_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"ContainerName\0") -}; -#[allow(unsafe_code)] -pub const EA_CONTAINER_SIZE: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"ContainerSize\0") -}; -#[allow(unsafe_code)] -pub const CLFS_BASELOG_EXTENSION: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b".blf\0") -}; -pub const CLFS_FLAG_NO_FLAGS: u32 = 0; -pub const CLFS_FLAG_FORCE_APPEND: u32 = 1; -pub const CLFS_FLAG_FORCE_FLUSH: u32 = 2; -pub const CLFS_FLAG_USE_RESERVATION: u32 = 4; -pub const CLFS_FLAG_REENTRANT_FILE_SYSTEM: u32 = 8; -pub const CLFS_FLAG_NON_REENTRANT_FILTER: u32 = 16; -pub const CLFS_FLAG_REENTRANT_FILTER: u32 = 32; -pub const CLFS_FLAG_IGNORE_SHARE_ACCESS: u32 = 64; -pub const CLFS_FLAG_READ_IN_PROGRESS: u32 = 128; -pub const CLFS_FLAG_MINIFILTER_LEVEL: u32 = 256; -pub const CLFS_FLAG_HIDDEN_SYSTEM_LOG: u32 = 512; -pub const CLFS_MARSHALLING_FLAG_NONE: u32 = 0; -pub const CLFS_MARSHALLING_FLAG_DISABLE_BUFF_INIT: u32 = 1; -pub const CLFS_FLAG_FILTER_INTERMEDIATE_LEVEL: u32 = 16; -pub const CLFS_FLAG_FILTER_TOP_LEVEL: u32 = 32; -pub const ClfsNullRecord: u32 = 0; -pub const ClfsDataRecord: u32 = 1; -pub const ClfsRestartRecord: u32 = 2; -pub const ClfsClientRecord: u32 = 3; -#[allow(unsafe_code)] -pub const CLFS_CONTAINER_STREAM_PREFIX: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"%BLF%:\0") -}; -#[allow(unsafe_code)] -pub const CLFS_CONTAINER_RELATIVE_PREFIX: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"%BLF%\\\0") -}; -pub const ClsContainerInitializing: u32 = 1; -pub const ClsContainerInactive: u32 = 2; -pub const ClsContainerActive: u32 = 4; -pub const ClsContainerActivePendingDelete: u32 = 8; -pub const ClsContainerPendingArchive: u32 = 16; -pub const ClsContainerPendingArchiveAndDelete: u32 = 32; -pub const ClfsContainerInitializing: u32 = 1; -pub const ClfsContainerInactive: u32 = 2; -pub const ClfsContainerActive: u32 = 4; -pub const ClfsContainerActivePendingDelete: u32 = 8; -pub const ClfsContainerPendingArchive: u32 = 16; -pub const ClfsContainerPendingArchiveAndDelete: u32 = 32; -pub const CLFS_MAX_CONTAINER_INFO: u32 = 256; -pub const CLFS_SCAN_INIT: u32 = 1; -pub const CLFS_SCAN_FORWARD: u32 = 2; -pub const CLFS_SCAN_BACKWARD: u32 = 4; -pub const CLFS_SCAN_CLOSE: u32 = 8; -pub const CLFS_SCAN_INITIALIZED: u32 = 16; -pub const CLFS_SCAN_BUFFERED: u32 = 32; -pub const CLFS_MGMT_POLICY_VERSION: u32 = 1; -pub const LOG_POLICY_OVERWRITE: u32 = 1; -pub const LOG_POLICY_PERSIST: u32 = 2; -pub const CLFS_MGMT_CLIENT_REGISTRATION_VERSION: u32 = 1; -pub const PCW_VERSION_1: u32 = 256; -pub const PCW_VERSION_2: u32 = 512; -pub const PCW_CURRENT_VERSION: u32 = 512; -pub const SECURE_SECTION_ALLOW_PARTIAL_MDL: u32 = 1; -pub const KERNEL_STACK_SIZE: u32 = 24576; -pub const KERNEL_LARGE_STACK_SIZE: u32 = 73728; -pub const KERNEL_LARGE_STACK_COMMIT: u32 = 24576; -pub const KERNEL_MCA_EXCEPTION_STACK_SIZE: u32 = 8192; -pub const KERNEL_SHADOW_STACK_SIZE: u32 = 4096; -pub const EXCEPTION_READ_FAULT: u32 = 0; -pub const EXCEPTION_WRITE_FAULT: u32 = 1; -pub const EXCEPTION_EXECUTE_FAULT: u32 = 8; -pub const CONTEXT_AMD64: u32 = 1048576; -pub const CONTEXT_CONTROL: u32 = 1048577; -pub const CONTEXT_INTEGER: u32 = 1048578; -pub const CONTEXT_SEGMENTS: u32 = 1048580; -pub const CONTEXT_FLOATING_POINT: u32 = 1048584; -pub const CONTEXT_DEBUG_REGISTERS: u32 = 1048592; -pub const CONTEXT_FULL: u32 = 1048587; -pub const CONTEXT_ALL: u32 = 1048607; -pub const CONTEXT_XSTATE: u32 = 1048640; -pub const CONTEXT_KERNEL_CET: u32 = 1048704; -pub const CONTEXT_EXCEPTION_ACTIVE: u32 = 134217728; -pub const CONTEXT_SERVICE_ACTIVE: u32 = 268435456; -pub const CONTEXT_EXCEPTION_REQUEST: u32 = 1073741824; -pub const CONTEXT_EXCEPTION_REPORTING: u32 = 2147483648; -pub const CONTEXT_UNWOUND_TO_CALL: u32 = 536870912; -pub const INITIAL_MXCSR: u32 = 8064; -pub const INITIAL_FPCSR: u32 = 639; -pub const CONTEXT_ARM64: u32 = 4194304; -pub const CONTEXT_ARM64_CONTROL: u32 = 4194305; -pub const CONTEXT_ARM64_INTEGER: u32 = 4194306; -pub const CONTEXT_ARM64_FLOATING_POINT: u32 = 4194308; -pub const CONTEXT_ARM64_DEBUG_REGISTERS: u32 = 4194312; -pub const CONTEXT_ARM64_X18: u32 = 4194320; -pub const CONTEXT_ARM64_FULL: u32 = 4194311; -pub const CONTEXT_ARM64_ALL: u32 = 4194335; -pub const CONTEXT_ARM64_UNWOUND_TO_CALL: u32 = 536870912; -pub const CONTEXT_ARM64_RET_TO_GUEST: u32 = 67108864; -pub const ARM64_MAX_BREAKPOINTS: u32 = 8; -pub const ARM64_MAX_WATCHPOINTS: u32 = 2; -pub const SE_UNSOLICITED_INPUT_PRIVILEGE: u32 = 6; -pub const SE_SIGNING_LEVEL_UNCHECKED: u32 = 0; -pub const SE_SIGNING_LEVEL_UNSIGNED: u32 = 1; -pub const SE_SIGNING_LEVEL_ENTERPRISE: u32 = 2; -pub const SE_SIGNING_LEVEL_CUSTOM_1: u32 = 3; -pub const SE_SIGNING_LEVEL_DEVELOPER: u32 = 3; -pub const SE_SIGNING_LEVEL_AUTHENTICODE: u32 = 4; -pub const SE_SIGNING_LEVEL_CUSTOM_2: u32 = 5; -pub const SE_SIGNING_LEVEL_STORE: u32 = 6; -pub const SE_SIGNING_LEVEL_CUSTOM_3: u32 = 7; -pub const SE_SIGNING_LEVEL_ANTIMALWARE: u32 = 7; -pub const SE_SIGNING_LEVEL_MICROSOFT: u32 = 8; -pub const SE_SIGNING_LEVEL_CUSTOM_4: u32 = 9; -pub const SE_SIGNING_LEVEL_CUSTOM_5: u32 = 10; -pub const SE_SIGNING_LEVEL_DYNAMIC_CODEGEN: u32 = 11; -pub const SE_SIGNING_LEVEL_WINDOWS: u32 = 12; -pub const SE_SIGNING_LEVEL_CUSTOM_7: u32 = 13; -pub const SE_SIGNING_LEVEL_WINDOWS_TCB: u32 = 14; -pub const SE_SIGNING_LEVEL_CUSTOM_6: u32 = 15; -pub const RTL_RUN_ONCE_CHECK_ONLY: u32 = 1; -pub const RTL_RUN_ONCE_ASYNC: u32 = 2; -pub const RTL_RUN_ONCE_INIT_FAILED: u32 = 4; -pub const RTL_RUN_ONCE_CTX_RESERVED_BITS: u32 = 2; -pub const RTL_HASH_ALLOCATED_HEADER: u32 = 1; -pub const RTL_HASH_RESERVED_SIGNATURE: u32 = 0; -pub const RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT: u32 = 8; -pub const FLUSH_NV_MEMORY_IN_FLAG_NO_DRAIN: u32 = 1; -pub const WRITE_NV_MEMORY_FLAG_FLUSH: u32 = 1; -pub const WRITE_NV_MEMORY_FLAG_NON_TEMPORAL: u32 = 2; -pub const WRITE_NV_MEMORY_FLAG_PERSIST: u32 = 3; -pub const WRITE_NV_MEMORY_FLAG_NO_DRAIN: u32 = 256; -pub const FILL_NV_MEMORY_FLAG_FLUSH: u32 = 1; -pub const FILL_NV_MEMORY_FLAG_NON_TEMPORAL: u32 = 2; -pub const FILL_NV_MEMORY_FLAG_PERSIST: u32 = 3; -pub const FILL_NV_MEMORY_FLAG_NO_DRAIN: u32 = 256; -pub const RTL_CORRELATION_VECTOR_STRING_LENGTH: u32 = 129; -pub const RTL_CORRELATION_VECTOR_V1_PREFIX_LENGTH: u32 = 16; -pub const RTL_CORRELATION_VECTOR_V1_LENGTH: u32 = 64; -pub const RTL_CORRELATION_VECTOR_V2_PREFIX_LENGTH: u32 = 22; -pub const RTL_CORRELATION_VECTOR_V2_LENGTH: u32 = 128; -pub const RTL_VIRTUAL_UNWIND2_VALIDATE_PAC: u32 = 1; -pub const FILE_CHARACTERISTICS_EXPECT_ORDERLY_REMOVAL_EX: u32 = 16384; -pub const FILE_CHARACTERISTICS_EXPECT_SURPRISE_REMOVAL_EX: u32 = 32768; -pub const FILE_CHARACTERISTICS_REMOVAL_POLICY_MASK_EX: u32 = 49152; -pub const FILE_CHARACTERISTICS_EXPECT_ORDERLY_REMOVAL_DEPRECATED: u32 = 512; -pub const FILE_CHARACTERISTICS_EXPECT_SURPRISE_REMOVAL_DEPRECATED: u32 = 768; -pub const FILE_CHARACTERISTICS_REMOVAL_POLICY_MASK_DEPRECATED: u32 = 768; -pub const FILE_CHARACTERISTICS_PROPAGATED: u32 = 327951; -pub const FILE_DISPOSITION_DO_NOT_DELETE: u32 = 0; -pub const FILE_DISPOSITION_DELETE: u32 = 1; -pub const FILE_DISPOSITION_POSIX_SEMANTICS: u32 = 2; -pub const FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK: u32 = 4; -pub const FILE_DISPOSITION_ON_CLOSE: u32 = 8; -pub const FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE: u32 = 16; -pub const SSINFO_FLAGS_ALIGNED_DEVICE: u32 = 1; -pub const SSINFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE: u32 = 2; -pub const SSINFO_FLAGS_NO_SEEK_PENALTY: u32 = 4; -pub const SSINFO_FLAGS_TRIM_ENABLED: u32 = 8; -pub const SSINFO_FLAGS_BYTE_ADDRESSABLE: u32 = 16; -pub const SSINFO_OFFSET_UNKNOWN: u32 = 4294967295; -pub const THREAD_CSWITCH_PMU_DISABLE: u32 = 0; -pub const THREAD_CSWITCH_PMU_ENABLE: u32 = 1; -pub const MEMORY_PRIORITY_LOWEST: u32 = 0; -pub const MEMORY_PRIORITY_VERY_LOW: u32 = 1; -pub const MEMORY_PRIORITY_LOW: u32 = 2; -pub const MEMORY_PRIORITY_MEDIUM: u32 = 3; -pub const MEMORY_PRIORITY_BELOW_NORMAL: u32 = 4; -pub const MEMORY_PRIORITY_NORMAL: u32 = 5; -pub const PROCESS_LUID_DOSDEVICES_ONLY: u32 = 1; -pub const PROCESS_HANDLE_EXCEPTIONS_ENABLED: u32 = 1; -pub const PROCESS_HANDLE_RAISE_UM_EXCEPTION_ON_INVALID_HANDLE_CLOSE_DISABLED: u32 = 0; -pub const PROCESS_HANDLE_RAISE_UM_EXCEPTION_ON_INVALID_HANDLE_CLOSE_ENABLED: u32 = 1; -pub const PROCESS_HANDLE_TRACING_MAX_STACKS: u32 = 16; -pub const DYNAMIC_EH_CONTINUATION_TARGET_ADD: u32 = 1; -pub const DYNAMIC_EH_CONTINUATION_TARGET_PROCESSED: u32 = 2; -pub const DYNAMIC_ENFORCED_ADDRESS_RANGE_ADD: u32 = 1; -pub const DYNAMIC_ENFORCED_ADDRESS_RANGE_PROCESSED: u32 = 2; -pub const QUOTA_LIMITS_HARDWS_MIN_ENABLE: u32 = 1; -pub const QUOTA_LIMITS_HARDWS_MIN_DISABLE: u32 = 2; -pub const QUOTA_LIMITS_HARDWS_MAX_ENABLE: u32 = 4; -pub const QUOTA_LIMITS_HARDWS_MAX_DISABLE: u32 = 8; -pub const QUOTA_LIMITS_USE_DEFAULT_LIMITS: u32 = 16; -pub const MAX_HW_COUNTERS: u32 = 16; -pub const THREAD_PROFILING_FLAG_DISPATCH: u32 = 1; -pub const PROCESS_EXCEPTION_PORT_ALL_STATE_BITS: u32 = 3; -pub const POWER_THROTTLING_PROCESS_CURRENT_VERSION: u32 = 1; -pub const POWER_THROTTLING_PROCESS_EXECUTION_SPEED: u32 = 1; -pub const POWER_THROTTLING_PROCESS_DELAYTIMERS: u32 = 2; -pub const POWER_THROTTLING_PROCESS_IGNORE_TIMER_RESOLUTION: u32 = 4; -pub const POWER_THROTTLING_PROCESS_VALID_FLAGS: u32 = 7; -pub const POWER_THROTTLING_THREAD_CURRENT_VERSION: u32 = 1; -pub const POWER_THROTTLING_THREAD_EXECUTION_SPEED: u32 = 1; -pub const POWER_THROTTLING_THREAD_VALID_FLAGS: u32 = 1; -pub const PCR_MINOR_VERSION: u32 = 1; -pub const PCR_MAJOR_VERSION: u32 = 1; -pub const KUMS_UCH_VOLATILE_BIT: u32 = 0; -pub const KUMS_UCH_VOLATILE_MASK: u32 = 1; -pub const RESULT_ZERO: u32 = 0; -pub const RESULT_NEGATIVE: u32 = 1; -pub const RESULT_POSITIVE: u32 = 2; -pub const DRIVER_VERIFIER_SPECIAL_POOLING: u32 = 1; -pub const DRIVER_VERIFIER_FORCE_IRQL_CHECKING: u32 = 2; -pub const DRIVER_VERIFIER_INJECT_ALLOCATION_FAILURES: u32 = 4; -pub const DRIVER_VERIFIER_TRACK_POOL_ALLOCATIONS: u32 = 8; -pub const DRIVER_VERIFIER_IO_CHECKING: u32 = 16; -pub const XSTATE_LEGACY_FLOATING_POINT: u32 = 0; -pub const XSTATE_LEGACY_SSE: u32 = 1; -pub const XSTATE_GSSE: u32 = 2; -pub const XSTATE_AVX: u32 = 2; -pub const XSTATE_MPX_BNDREGS: u32 = 3; -pub const XSTATE_MPX_BNDCSR: u32 = 4; -pub const XSTATE_AVX512_KMASK: u32 = 5; -pub const XSTATE_AVX512_ZMM_H: u32 = 6; -pub const XSTATE_AVX512_ZMM: u32 = 7; -pub const XSTATE_IPT: u32 = 8; -pub const XSTATE_PASID: u32 = 10; -pub const XSTATE_CET_U: u32 = 11; -pub const XSTATE_CET_S: u32 = 12; -pub const XSTATE_AMX_TILE_CONFIG: u32 = 17; -pub const XSTATE_AMX_TILE_DATA: u32 = 18; -pub const XSTATE_LWP: u32 = 62; -pub const MAXIMUM_XSTATE_FEATURES: u32 = 64; -pub const XSTATE_COMPACTION_ENABLE: u32 = 63; -pub const XSTATE_ALIGN_BIT: u32 = 1; -pub const XSTATE_XFD_BIT: u32 = 2; -pub const XSTATE_CONTROLFLAG_XSAVEOPT_MASK: u32 = 1; -pub const XSTATE_CONTROLFLAG_XSAVEC_MASK: u32 = 2; -pub const XSTATE_CONTROLFLAG_XFD_MASK: u32 = 4; -pub const XSTATE_CONTROLFLAG_VALID_MASK: u32 = 7; -pub const NX_SUPPORT_POLICY_ALWAYSOFF: u32 = 0; -pub const NX_SUPPORT_POLICY_ALWAYSON: u32 = 1; -pub const NX_SUPPORT_POLICY_OPTIN: u32 = 2; -pub const NX_SUPPORT_POLICY_OPTOUT: u32 = 3; -pub const SEH_VALIDATION_POLICY_ON: u32 = 0; -pub const SEH_VALIDATION_POLICY_OFF: u32 = 1; -pub const SEH_VALIDATION_POLICY_TELEMETRY: u32 = 2; -pub const SEH_VALIDATION_POLICY_DEFER: u32 = 3; -pub const SHARED_GLOBAL_FLAGS_ERROR_PORT_V: u32 = 0; -pub const SHARED_GLOBAL_FLAGS_ERROR_PORT: u32 = 1; -pub const SHARED_GLOBAL_FLAGS_ELEVATION_ENABLED_V: u32 = 1; -pub const SHARED_GLOBAL_FLAGS_ELEVATION_ENABLED: u32 = 2; -pub const SHARED_GLOBAL_FLAGS_VIRT_ENABLED_V: u32 = 2; -pub const SHARED_GLOBAL_FLAGS_VIRT_ENABLED: u32 = 4; -pub const SHARED_GLOBAL_FLAGS_INSTALLER_DETECT_ENABLED_V: u32 = 3; -pub const SHARED_GLOBAL_FLAGS_INSTALLER_DETECT_ENABLED: u32 = 8; -pub const SHARED_GLOBAL_FLAGS_LKG_ENABLED_V: u32 = 4; -pub const SHARED_GLOBAL_FLAGS_LKG_ENABLED: u32 = 16; -pub const SHARED_GLOBAL_FLAGS_DYNAMIC_PROC_ENABLED_V: u32 = 5; -pub const SHARED_GLOBAL_FLAGS_DYNAMIC_PROC_ENABLED: u32 = 32; -pub const SHARED_GLOBAL_FLAGS_CONSOLE_BROKER_ENABLED_V: u32 = 6; -pub const SHARED_GLOBAL_FLAGS_CONSOLE_BROKER_ENABLED: u32 = 64; -pub const SHARED_GLOBAL_FLAGS_SECURE_BOOT_ENABLED_V: u32 = 7; -pub const SHARED_GLOBAL_FLAGS_SECURE_BOOT_ENABLED: u32 = 128; -pub const SHARED_GLOBAL_FLAGS_MULTI_SESSION_SKU_V: u32 = 8; -pub const SHARED_GLOBAL_FLAGS_MULTI_SESSION_SKU: u32 = 256; -pub const SHARED_GLOBAL_FLAGS_MULTIUSERS_IN_SESSION_SKU_V: u32 = 9; -pub const SHARED_GLOBAL_FLAGS_MULTIUSERS_IN_SESSION_SKU: u32 = 512; -pub const SHARED_GLOBAL_FLAGS_STATE_SEPARATION_ENABLED_V: u32 = 10; -pub const SHARED_GLOBAL_FLAGS_STATE_SEPARATION_ENABLED: u32 = 1024; -pub const SHARED_GLOBAL_FLAGS_SET_GLOBAL_DATA_FLAG: u32 = 1073741824; -pub const SHARED_GLOBAL_FLAGS_CLEAR_GLOBAL_DATA_FLAG: u32 = 2147483648; -pub const SYSTEM_CALL_SYSCALL: u32 = 0; -pub const SYSTEM_CALL_INT_2E: u32 = 1; -pub const SHARED_GLOBAL_FLAGS_QPC_BYPASS_ENABLED: u32 = 1; -pub const SHARED_GLOBAL_FLAGS_QPC_BYPASS_USE_HV_PAGE: u32 = 2; -pub const SHARED_GLOBAL_FLAGS_QPC_BYPASS_DISABLE_32BIT: u32 = 4; -pub const SHARED_GLOBAL_FLAGS_QPC_BYPASS_USE_MFENCE: u32 = 16; -pub const SHARED_GLOBAL_FLAGS_QPC_BYPASS_USE_LFENCE: u32 = 32; -pub const SHARED_GLOBAL_FLAGS_QPC_BYPASS_A73_ERRATA: u32 = 64; -pub const SHARED_GLOBAL_FLAGS_QPC_BYPASS_USE_RDTSCP: u32 = 128; -pub const CmResourceTypeMaximum: u32 = 8; -pub const PCCARD_MAP_ERROR: u32 = 1; -pub const PCCARD_DEVICE_PCI: u32 = 16; -pub const PCCARD_SCAN_DISABLED: u32 = 1; -pub const PCCARD_MAP_ZERO: u32 = 2; -pub const PCCARD_NO_TIMER: u32 = 3; -pub const PCCARD_NO_PIC: u32 = 4; -pub const PCCARD_NO_LEGACY_BASE: u32 = 5; -pub const PCCARD_DUP_LEGACY_BASE: u32 = 6; -pub const PCCARD_NO_CONTROLLERS: u32 = 7; -pub const MAXIMUM_EXPANSION_SIZE: u32 = 71680; -pub const CP_GET_SUCCESS: u32 = 0; -pub const CP_GET_NODATA: u32 = 1; -pub const CP_GET_ERROR: u32 = 2; -pub const PROTECTED_POOL: u32 = 0; -pub const MM_ADD_PHYSICAL_MEMORY_ALREADY_ZEROED: u32 = 1; -pub const MM_ADD_PHYSICAL_MEMORY_LARGE_PAGES_ONLY: u32 = 2; -pub const MM_ADD_PHYSICAL_MEMORY_HUGE_PAGES_ONLY: u32 = 4; -pub const MM_REMOVE_PHYSICAL_MEMORY_BAD_ONLY: u32 = 1; -pub const MM_GET_PHYSICAL_MEMORY_RANGES_INCLUDE_FILE_ONLY: u32 = 1; -pub const MM_GET_PHYSICAL_MEMORY_RANGES_INCLUDE_ALL_PARTITIONS: u32 = 2; -pub const MM_COPY_MEMORY_PHYSICAL: u32 = 1; -pub const MM_COPY_MEMORY_VIRTUAL: u32 = 2; -pub const MM_GET_CACHE_ATTRIBUTE_IO_SPACE: u32 = 1; -pub const MM_SECURE_EXCLUSIVE: u32 = 1; -pub const MM_SECURE_NO_CHANGE: u32 = 2; -pub const MM_SECURE_USER_MODE_ONLY: u32 = 4; -pub const MM_SECURE_NO_INHERIT: u32 = 8; -pub const MM_SYSTEM_VIEW_EXCEPTIONS_FOR_INPAGE_ERRORS: u32 = 1; -pub const IMAGE_ADDRESSING_MODE_32BIT: u32 = 3; -pub const PS_IMAGE_NOTIFY_CONFLICTING_ARCHITECTURE: u32 = 1; -pub const SILO_MONITOR_REGISTRATION_VERSION: u32 = 1; -pub const PS_INVALID_SILO_CONTEXT_SLOT: u32 = 4294967295; -pub const IRP_MN_QUERY_DIRECTORY: u32 = 1; -pub const IRP_MN_NOTIFY_CHANGE_DIRECTORY: u32 = 2; -pub const IRP_MN_NOTIFY_CHANGE_DIRECTORY_EX: u32 = 3; -pub const IRP_MN_USER_FS_REQUEST: u32 = 0; -pub const IRP_MN_MOUNT_VOLUME: u32 = 1; -pub const IRP_MN_VERIFY_VOLUME: u32 = 2; -pub const IRP_MN_LOAD_FILE_SYSTEM: u32 = 3; -pub const IRP_MN_TRACK_LINK: u32 = 4; -pub const IRP_MN_KERNEL_CALL: u32 = 4; -pub const IRP_MN_LOCK: u32 = 1; -pub const IRP_MN_UNLOCK_SINGLE: u32 = 2; -pub const IRP_MN_UNLOCK_ALL: u32 = 3; -pub const IRP_MN_UNLOCK_ALL_BY_KEY: u32 = 4; -pub const IRP_MN_FLUSH_AND_PURGE: u32 = 1; -pub const IRP_MN_FLUSH_DATA_ONLY: u32 = 2; -pub const IRP_MN_FLUSH_NO_SYNC: u32 = 3; -pub const IRP_MN_FLUSH_DATA_SYNC_ONLY: u32 = 4; -pub const IRP_MN_NORMAL: u32 = 0; -pub const IRP_MN_DPC: u32 = 1; -pub const IRP_MN_MDL: u32 = 2; -pub const IRP_MN_COMPLETE: u32 = 4; -pub const IRP_MN_COMPRESSED: u32 = 8; -pub const IRP_MN_MDL_DPC: u32 = 3; -pub const IRP_MN_COMPLETE_MDL: u32 = 6; -pub const IRP_MN_COMPLETE_MDL_DPC: u32 = 7; -pub const IRP_MN_QUERY_LEGACY_BUS_INFORMATION: u32 = 24; -pub const IO_CHECK_CREATE_PARAMETERS: u32 = 512; -pub const IO_ATTACH_DEVICE: u32 = 1024; -pub const IO_IGNORE_SHARE_ACCESS_CHECK: u32 = 2048; -pub const DO_DEVICE_HAS_NAME: u32 = 64; -pub const DO_SYSTEM_BOOT_PARTITION: u32 = 256; -pub const DO_LONG_TERM_REQUESTS: u32 = 512; -pub const DO_NEVER_LAST_DEVICE: u32 = 1024; -pub const DO_LOW_PRIORITY_FILESYSTEM: u32 = 65536; -pub const DO_SUPPORTS_TRANSACTIONS: u32 = 262144; -pub const DO_FORCE_NEITHER_IO: u32 = 524288; -pub const DO_VOLUME_DEVICE_OBJECT: u32 = 1048576; -pub const DO_SYSTEM_SYSTEM_PARTITION: u32 = 2097152; -pub const DO_SYSTEM_CRITICAL_PARTITION: u32 = 4194304; -pub const DO_DISALLOW_EXECUTE: u32 = 8388608; -pub const DO_DEVICE_IRP_REQUIRES_EXTENSION: u32 = 134217728; -pub const DO_BOOT_CRITICAL: u32 = 536870912; -pub const DRVO_REINIT_REGISTERED: u32 = 8; -pub const DRVO_INITIALIZED: u32 = 16; -pub const DRVO_BOOTREINIT_REGISTERED: u32 = 32; -pub const DRVO_LEGACY_RESOURCES: u32 = 64; -pub const TXF_MINIVERSION_DEFAULT_VIEW: u32 = 65534; -pub const OPLOCK_KEY_VERSION_WIN7: u32 = 1; -pub const OPLOCK_KEY_VERSION_WIN8: u32 = 2; -pub const OPLOCK_KEY_FLAG_PARENT_KEY: u32 = 1; -pub const OPLOCK_KEY_FLAG_TARGET_KEY: u32 = 2; -pub const BDCB_IMAGEFLAGS_FAILED_CODE_INTEGRITY: u32 = 1; -pub const ARBITER_FLAG_BOOT_CONFIG: u32 = 1; -pub const ARBITER_FLAG_ROOT_ENUM: u32 = 2; -pub const ARBITER_FLAG_OTHER_ENUM: u32 = 4; -pub const ARBITER_PARTIAL: u32 = 1; -pub const MAXIMUM_DEBUG_BARS: u32 = 6; -pub const DBG_DEVICE_FLAG_HAL_SCRATCH_ALLOCATED: u32 = 1; -pub const DBG_DEVICE_FLAG_BARS_MAPPED: u32 = 2; -pub const DBG_DEVICE_FLAG_SCRATCH_ALLOCATED: u32 = 4; -pub const DBG_DEVICE_FLAG_UNCACHED_MEMORY: u32 = 8; -pub const DBG_DEVICE_FLAG_SYNTHETIC: u32 = 16; -pub const DBG_DEVICE_FLAG_HOST_VISIBLE_ALLOCATED: u32 = 32; -pub const HAL_DISPATCH_VERSION: u32 = 5; -pub const HAL_PLATFORM_DISABLE_WRITE_COMBINING: u32 = 1; -pub const HAL_PLATFORM_DISABLE_PTCG: u32 = 4; -pub const HAL_PLATFORM_DISABLE_UC_MAIN_MEMORY: u32 = 8; -pub const HAL_PLATFORM_ENABLE_WRITE_COMBINING_MMIO: u32 = 16; -pub const HAL_PLATFORM_ACPI_TABLES_CACHED: u32 = 32; -pub const PCI_AGP_RATE_1X: u32 = 1; -pub const PCI_AGP_RATE_2X: u32 = 2; -pub const PCI_AGP_RATE_4X: u32 = 4; -pub const PCIX_MODE_CONVENTIONAL_PCI: u32 = 0; -pub const PCIX_MODE1_66MHZ: u32 = 1; -pub const PCIX_MODE1_100MHZ: u32 = 2; -pub const PCIX_MODE1_133MHZ: u32 = 3; -pub const PCIX_MODE2_266_66MHZ: u32 = 9; -pub const PCIX_MODE2_266_100MHZ: u32 = 10; -pub const PCIX_MODE2_266_133MHZ: u32 = 11; -pub const PCIX_MODE2_533_66MHZ: u32 = 13; -pub const PCIX_MODE2_533_100MHZ: u32 = 14; -pub const PCIX_MODE2_533_133MHZ: u32 = 15; -pub const PCIX_VERSION_MODE1_ONLY: u32 = 0; -pub const PCIX_VERSION_MODE2_ECC: u32 = 1; -pub const PCIX_VERSION_DUAL_MODE_ECC: u32 = 2; -pub const OSC_FIRMWARE_FAILURE: u32 = 2; -pub const OSC_UNRECOGNIZED_UUID: u32 = 4; -pub const OSC_UNRECOGNIZED_REVISION: u32 = 8; -pub const OSC_CAPABILITIES_MASKED: u32 = 16; -pub const PCI_ROOT_BUS_OSC_METHOD_CAPABILITY_REVISION: u32 = 1; -pub const FPB_VECTOR_SIZE_SUPPORTED_256BITS: u32 = 0; -pub const FPB_VECTOR_SIZE_SUPPORTED_512BITS: u32 = 1; -pub const FPB_VECTOR_SIZE_SUPPORTED_1KBITS: u32 = 2; -pub const FPB_VECTOR_SIZE_SUPPORTED_2KBITS: u32 = 3; -pub const FPB_VECTOR_SIZE_SUPPORTED_4KBITS: u32 = 4; -pub const FPB_VECTOR_SIZE_SUPPORTED_8KBITS: u32 = 5; -pub const FPB_RID_VECTOR_GRANULARITY_8RIDS: u32 = 0; -pub const FPB_RID_VECTOR_GRANULARITY_64RIDS: u32 = 3; -pub const FPB_RID_VECTOR_GRANULARITY_256RIDS: u32 = 5; -pub const FPB_MEM_LOW_VECTOR_GRANULARITY_1MB: u32 = 0; -pub const FPB_MEM_LOW_VECTOR_GRANULARITY_2MB: u32 = 1; -pub const FPB_MEM_LOW_VECTOR_GRANULARITY_4MB: u32 = 2; -pub const FPB_MEM_LOW_VECTOR_GRANULARITY_8MB: u32 = 3; -pub const FPB_MEM_LOW_VECTOR_GRANULARITY_16MB: u32 = 4; -pub const FPB_MEM_HIGH_VECTOR_GRANULARITY_256MB: u32 = 0; -pub const FPB_MEM_HIGH_VECTOR_GRANULARITY_512MB: u32 = 1; -pub const FPB_MEM_HIGH_VECTOR_GRANULARITY_1GB: u32 = 2; -pub const FPB_MEM_HIGH_VECTOR_GRANULARITY_2GB: u32 = 3; -pub const FPB_MEM_HIGH_VECTOR_GRANULARITY_4GB: u32 = 4; -pub const FPB_MEM_HIGH_VECTOR_GRANULARITY_8GB: u32 = 5; -pub const FPB_MEM_HIGH_VECTOR_GRANULARITY_16GB: u32 = 6; -pub const FPB_MEM_HIGH_VECTOR_GRANULARITY_32GB: u32 = 7; -pub const FPB_MEM_VECTOR_GRANULARITY_1B: u32 = 8; -pub const FPB_MEM_HIGH_VECTOR_GRANULARITY_1MB: u32 = 9; -pub const FPB_VECTOR_SELECT_RID: u32 = 0; -pub const FPB_VECTOR_SELECT_MEM_LOW: u32 = 1; -pub const FPB_VECTOR_SELECT_MEM_HIGH: u32 = 2; -pub const PCI_DATA_VERSION: u32 = 1; -pub const PCI_EXPRESS_TPH_ST_LOCATION_NONE: u32 = 0; -pub const PCI_EXPRESS_TPH_ST_LOCATION_TPH_CAPABILITY: u32 = 1; -pub const PCI_EXPRESS_TPH_ST_LOCATION_MSIX_TABLE: u32 = 2; -pub const PCI_EXPRESS_TPH_ST_LOCATION_RESERVED: u32 = 3; -pub const PCI_INVALID_ALTERNATE_FUNCTION_NUMBER: u32 = 255; -pub const PCI_BUS_INTERFACE_STANDARD_VERSION: u32 = 2; -pub const WHEA_ERROR_SOURCE_DESCRIPTOR_VERSION_10: u32 = 10; -pub const WHEA_ERROR_SOURCE_DESCRIPTOR_VERSION_11: u32 = 11; -pub const WHEA_MAX_MC_BANKS: u32 = 32; -pub const WHEA_ERROR_SOURCE_FLAG_FIRMWAREFIRST: u32 = 1; -pub const WHEA_ERROR_SOURCE_FLAG_GLOBAL: u32 = 2; -pub const WHEA_ERROR_SOURCE_FLAG_GHES_ASSIST: u32 = 4; -pub const WHEA_ERROR_SOURCE_FLAG_DEFAULTSOURCE: u32 = 2147483648; -pub const WHEA_ERROR_SOURCE_INVALID_RELATED_SOURCE: u32 = 65535; -pub const WHEA_ERROR_SOURCE_DESCRIPTOR_TYPE_XPFMCE: u32 = 0; -pub const WHEA_ERROR_SOURCE_DESCRIPTOR_TYPE_XPFCMC: u32 = 1; -pub const WHEA_ERROR_SOURCE_DESCRIPTOR_TYPE_XPFNMI: u32 = 2; -pub const WHEA_ERROR_SOURCE_DESCRIPTOR_TYPE_IPFMCA: u32 = 3; -pub const WHEA_ERROR_SOURCE_DESCRIPTOR_TYPE_IPFCMC: u32 = 4; -pub const WHEA_ERROR_SOURCE_DESCRIPTOR_TYPE_IPFCPE: u32 = 5; -pub const WHEA_ERROR_SOURCE_DESCRIPTOR_TYPE_AERROOTPORT: u32 = 6; -pub const WHEA_ERROR_SOURCE_DESCRIPTOR_TYPE_AERENDPOINT: u32 = 7; -pub const WHEA_ERROR_SOURCE_DESCRIPTOR_TYPE_AERBRIDGE: u32 = 8; -pub const WHEA_ERROR_SOURCE_DESCRIPTOR_TYPE_GENERIC: u32 = 9; -pub const WHEA_ERROR_SOURCE_DESCRIPTOR_TYPE_GENERIC_V2: u32 = 10; -pub const WHEA_XPF_MC_BANK_STATUSFORMAT_IA32MCA: u32 = 0; -pub const WHEA_XPF_MC_BANK_STATUSFORMAT_Intel64MCA: u32 = 1; -pub const WHEA_XPF_MC_BANK_STATUSFORMAT_AMD64MCA: u32 = 2; -pub const WHEA_NOTIFICATION_TYPE_POLLED: u32 = 0; -pub const WHEA_NOTIFICATION_TYPE_EXTERNALINTERRUPT: u32 = 1; -pub const WHEA_NOTIFICATION_TYPE_LOCALINTERRUPT: u32 = 2; -pub const WHEA_NOTIFICATION_TYPE_SCI: u32 = 3; -pub const WHEA_NOTIFICATION_TYPE_NMI: u32 = 4; -pub const WHEA_NOTIFICATION_TYPE_CMCI: u32 = 5; -pub const WHEA_NOTIFICATION_TYPE_MCE: u32 = 6; -pub const WHEA_NOTIFICATION_TYPE_GPIO_SIGNAL: u32 = 7; -pub const WHEA_NOTIFICATION_TYPE_ARMV8_SEA: u32 = 8; -pub const WHEA_NOTIFICATION_TYPE_ARMV8_SEI: u32 = 9; -pub const WHEA_NOTIFICATION_TYPE_EXTERNALINTERRUPT_GSIV: u32 = 10; -pub const WHEA_NOTIFICATION_TYPE_SDEI: u32 = 11; -pub const WHEA_DEVICE_DRIVER_CONFIG_V1: u32 = 1; -pub const WHEA_DEVICE_DRIVER_CONFIG_V2: u32 = 2; -pub const WHEA_DEVICE_DRIVER_CONFIG_MIN: u32 = 1; -pub const WHEA_DEVICE_DRIVER_CONFIG_MAX: u32 = 2; -pub const WHEA_DEVICE_DRIVER_BUFFER_SET_V1: u32 = 1; -pub const WHEA_DEVICE_DRIVER_BUFFER_SET_MIN: u32 = 1; -pub const WHEA_DEVICE_DRIVER_BUFFER_SET_MAX: u32 = 1; -pub const WHEA_DISABLE_OFFLINE: u32 = 0; -pub const WHEA_MEM_PERSISTOFFLINE: u32 = 1; -pub const WHEA_MEM_PFA_DISABLE: u32 = 2; -pub const WHEA_MEM_PFA_PAGECOUNT: u32 = 3; -pub const WHEA_MEM_PFA_THRESHOLD: u32 = 4; -pub const WHEA_MEM_PFA_TIMEOUT: u32 = 5; -pub const WHEA_DISABLE_DUMMY_WRITE: u32 = 6; -pub const WHEA_RESTORE_CMCI_ENABLED: u32 = 7; -pub const WHEA_RESTORE_CMCI_ATTEMPTS: u32 = 8; -pub const WHEA_RESTORE_CMCI_ERR_LIMIT: u32 = 9; -pub const WHEA_CMCI_THRESHOLD_COUNT: u32 = 10; -pub const WHEA_CMCI_THRESHOLD_TIME: u32 = 11; -pub const WHEA_CMCI_THRESHOLD_POLL_COUNT: u32 = 12; -pub const WHEA_PENDING_PAGE_LIST_SZ: u32 = 13; -pub const WHEA_BAD_PAGE_LIST_MAX_SIZE: u32 = 14; -pub const WHEA_BAD_PAGE_LIST_LOCATION: u32 = 15; -pub const WHEA_NOTIFY_ALL_OFFLINES: u32 = 16; -pub const WHEA_ROW_FAIL_CHECK_EXTENT: u32 = 17; -pub const WHEA_ROW_FAIL_CHECK_ENABLE: u32 = 18; -pub const WHEA_ROW_FAIL_CHECK_THRESHOLD: u32 = 19; -pub const IPMI_OS_SEL_RECORD_VERSION_1: u32 = 1; -pub const IPMI_OS_SEL_RECORD_VERSION: u32 = 1; -pub const IPMI_IOCTL_INDEX: u32 = 1024; -pub const IPMI_OS_SEL_RECORD_MASK: u32 = 65535; -pub const ERRTYP_INTERNAL: u32 = 1; -pub const ERRTYP_BUS: u32 = 16; -pub const ERRTYP_MEM: u32 = 4; -pub const ERRTYP_TLB: u32 = 5; -pub const ERRTYP_CACHE: u32 = 6; -pub const ERRTYP_FUNCTION: u32 = 7; -pub const ERRTYP_SELFTEST: u32 = 8; -pub const ERRTYP_FLOW: u32 = 9; -pub const ERRTYP_MAP: u32 = 17; -pub const ERRTYP_IMPROPER: u32 = 18; -pub const ERRTYP_UNIMPL: u32 = 19; -pub const ERRTYP_LOSSOFLOCKSTEP: u32 = 20; -pub const ERRTYP_RESPONSE: u32 = 21; -pub const ERRTYP_PARITY: u32 = 22; -pub const ERRTYP_PROTOCOL: u32 = 23; -pub const ERRTYP_PATHERROR: u32 = 24; -pub const ERRTYP_TIMEOUT: u32 = 25; -pub const ERRTYP_POISONED: u32 = 26; -pub const WHEA_ERROR_RECORD_VALID_PLATFORMID: u32 = 1; -pub const WHEA_ERROR_RECORD_VALID_TIMESTAMP: u32 = 2; -pub const WHEA_ERROR_RECORD_VALID_PARTITIONID: u32 = 4; -pub const WHEA_ERROR_RECORD_FLAGS_RECOVERED: u32 = 1; -pub const WHEA_ERROR_RECORD_FLAGS_PREVIOUSERROR: u32 = 2; -pub const WHEA_ERROR_RECORD_FLAGS_SIMULATED: u32 = 4; -pub const WHEA_ERROR_RECORD_FLAGS_DEVICE_DRIVER: u32 = 8; -pub const WHEA_ERROR_RECORD_REVISION: u32 = 528; -pub const WHEA_ERROR_RECORD_SIGNATURE_END: u32 = 4294967295; -pub const WHEA_SECTION_DESCRIPTOR_FLAGS_PRIMARY: u32 = 1; -pub const WHEA_SECTION_DESCRIPTOR_FLAGS_CONTAINMENTWRN: u32 = 2; -pub const WHEA_SECTION_DESCRIPTOR_FLAGS_RESET: u32 = 4; -pub const WHEA_SECTION_DESCRIPTOR_FLAGS_THRESHOLDEXCEEDED: u32 = 8; -pub const WHEA_SECTION_DESCRIPTOR_FLAGS_RESOURCENA: u32 = 16; -pub const WHEA_SECTION_DESCRIPTOR_FLAGS_LATENTERROR: u32 = 32; -pub const WHEA_SECTION_DESCRIPTOR_FLAGS_PROPAGATED: u32 = 64; -pub const WHEA_SECTION_DESCRIPTOR_FLAGS_FRU_TEXT_BY_PLUGIN: u32 = 128; -pub const WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_REVISION: u32 = 768; -pub const GENPROC_PROCTYPE_XPF: u32 = 0; -pub const GENPROC_PROCTYPE_IPF: u32 = 1; -pub const GENPROC_PROCTYPE_ARM: u32 = 2; -pub const GENPROC_PROCISA_X86: u32 = 0; -pub const GENPROC_PROCISA_IPF: u32 = 1; -pub const GENPROC_PROCISA_X64: u32 = 2; -pub const GENPROC_PROCISA_ARM32: u32 = 4; -pub const GENPROC_PROCISA_ARM64: u32 = 8; -pub const GENPROC_PROCERRTYPE_UNKNOWN: u32 = 0; -pub const GENPROC_PROCERRTYPE_CACHE: u32 = 1; -pub const GENPROC_PROCERRTYPE_TLB: u32 = 2; -pub const GENPROC_PROCERRTYPE_BUS: u32 = 4; -pub const GENPROC_PROCERRTYPE_MAE: u32 = 8; -pub const GENPROC_OP_GENERIC: u32 = 0; -pub const GENPROC_OP_DATAREAD: u32 = 1; -pub const GENPROC_OP_DATAWRITE: u32 = 2; -pub const GENPROC_OP_INSTRUCTIONEXE: u32 = 3; -pub const GENPROC_FLAGS_RESTARTABLE: u32 = 1; -pub const GENPROC_FLAGS_PRECISEIP: u32 = 2; -pub const GENPROC_FLAGS_OVERFLOW: u32 = 4; -pub const GENPROC_FLAGS_CORRECTED: u32 = 8; -pub const XPF_CACHE_CHECK_TRANSACTIONTYPE_INSTRUCTION: u32 = 0; -pub const XPF_CACHE_CHECK_TRANSACTIONTYPE_DATAACCESS: u32 = 1; -pub const XPF_CACHE_CHECK_TRANSACTIONTYPE_GENERIC: u32 = 2; -pub const XPF_CACHE_CHECK_OPERATION_GENERIC: u32 = 0; -pub const XPF_CACHE_CHECK_OPERATION_GENREAD: u32 = 1; -pub const XPF_CACHE_CHECK_OPERATION_GENWRITE: u32 = 2; -pub const XPF_CACHE_CHECK_OPERATION_DATAREAD: u32 = 3; -pub const XPF_CACHE_CHECK_OPERATION_DATAWRITE: u32 = 4; -pub const XPF_CACHE_CHECK_OPERATION_INSTRUCTIONFETCH: u32 = 5; -pub const XPF_CACHE_CHECK_OPERATION_PREFETCH: u32 = 6; -pub const XPF_CACHE_CHECK_OPERATION_EVICTION: u32 = 7; -pub const XPF_CACHE_CHECK_OPERATION_SNOOP: u32 = 8; -pub const XPF_TLB_CHECK_TRANSACTIONTYPE_INSTRUCTION: u32 = 0; -pub const XPF_TLB_CHECK_TRANSACTIONTYPE_DATAACCESS: u32 = 1; -pub const XPF_TLB_CHECK_TRANSACTIONTYPE_GENERIC: u32 = 2; -pub const XPF_TLB_CHECK_OPERATION_GENERIC: u32 = 0; -pub const XPF_TLB_CHECK_OPERATION_GENREAD: u32 = 1; -pub const XPF_TLB_CHECK_OPERATION_GENWRITE: u32 = 2; -pub const XPF_TLB_CHECK_OPERATION_DATAREAD: u32 = 3; -pub const XPF_TLB_CHECK_OPERATION_DATAWRITE: u32 = 4; -pub const XPF_TLB_CHECK_OPERATION_INSTRUCTIONFETCH: u32 = 5; -pub const XPF_TLB_CHECK_OPERATION_PREFETCH: u32 = 6; -pub const XPF_BUS_CHECK_TRANSACTIONTYPE_INSTRUCTION: u32 = 0; -pub const XPF_BUS_CHECK_TRANSACTIONTYPE_DATAACCESS: u32 = 1; -pub const XPF_BUS_CHECK_TRANSACTIONTYPE_GENERIC: u32 = 2; -pub const XPF_BUS_CHECK_OPERATION_GENERIC: u32 = 0; -pub const XPF_BUS_CHECK_OPERATION_GENREAD: u32 = 1; -pub const XPF_BUS_CHECK_OPERATION_GENWRITE: u32 = 2; -pub const XPF_BUS_CHECK_OPERATION_DATAREAD: u32 = 3; -pub const XPF_BUS_CHECK_OPERATION_DATAWRITE: u32 = 4; -pub const XPF_BUS_CHECK_OPERATION_INSTRUCTIONFETCH: u32 = 5; -pub const XPF_BUS_CHECK_OPERATION_PREFETCH: u32 = 6; -pub const XPF_BUS_CHECK_PARTICIPATION_PROCORIGINATED: u32 = 0; -pub const XPF_BUS_CHECK_PARTICIPATION_PROCRESPONDED: u32 = 1; -pub const XPF_BUS_CHECK_PARTICIPATION_PROCOBSERVED: u32 = 2; -pub const XPF_BUS_CHECK_PARTICIPATION_GENERIC: u32 = 3; -pub const XPF_BUS_CHECK_ADDRESS_MEMORY: u32 = 0; -pub const XPF_BUS_CHECK_ADDRESS_RESERVED: u32 = 1; -pub const XPF_BUS_CHECK_ADDRESS_IO: u32 = 2; -pub const XPF_BUS_CHECK_ADDRESS_OTHER: u32 = 3; -pub const XPF_MS_CHECK_ERRORTYPE_NOERROR: u32 = 0; -pub const XPF_MS_CHECK_ERRORTYPE_UNCLASSIFIED: u32 = 1; -pub const XPF_MS_CHECK_ERRORTYPE_MCROMPARITY: u32 = 2; -pub const XPF_MS_CHECK_ERRORTYPE_EXTERNAL: u32 = 3; -pub const XPF_MS_CHECK_ERRORTYPE_FRC: u32 = 4; -pub const XPF_MS_CHECK_ERRORTYPE_INTERNALUNCLASSIFIED: u32 = 5; -pub const XPF_CONTEXT_INFO_UNCLASSIFIEDDATA: u32 = 0; -pub const XPF_CONTEXT_INFO_MSRREGISTERS: u32 = 1; -pub const XPF_CONTEXT_INFO_32BITCONTEXT: u32 = 2; -pub const XPF_CONTEXT_INFO_64BITCONTEXT: u32 = 3; -pub const XPF_CONTEXT_INFO_FXSAVE: u32 = 4; -pub const XPF_CONTEXT_INFO_32BITDEBUGREGS: u32 = 5; -pub const XPF_CONTEXT_INFO_64BITDEBUGREGS: u32 = 6; -pub const XPF_CONTEXT_INFO_MMREGISTERS: u32 = 7; -pub const WHEA_MEMERRTYPE_UNKNOWN: u32 = 0; -pub const WHEA_MEMERRTYPE_NOERROR: u32 = 1; -pub const WHEA_MEMERRTYPE_SINGLEBITECC: u32 = 2; -pub const WHEA_MEMERRTYPE_MULTIBITECC: u32 = 3; -pub const WHEA_MEMERRTYPE_SINGLESYMCHIPKILL: u32 = 4; -pub const WHEA_MEMERRTYPE_MULTISYMCHIPKILL: u32 = 5; -pub const WHEA_MEMERRTYPE_MASTERABORT: u32 = 6; -pub const WHEA_MEMERRTYPE_TARGETABORT: u32 = 7; -pub const WHEA_MEMERRTYPE_PARITYERROR: u32 = 8; -pub const WHEA_MEMERRTYPE_WATCHDOGTIMEOUT: u32 = 9; -pub const WHEA_MEMERRTYPE_INVALIDADDRESS: u32 = 10; -pub const WHEA_MEMERRTYPE_MIRRORBROKEN: u32 = 11; -pub const WHEA_MEMERRTYPE_MEMORYSPARING: u32 = 12; -pub const WHEA_PMEM_ERROR_SECTION_LOCATION_INFO_SIZE: u32 = 64; -pub const WHEA_PMEM_ERROR_SECTION_MAX_PAGES: u32 = 50; -pub const WHEA_PCIE_CORRECTABLE_ERROR_SECTION_COUNT_SIZE: u32 = 32; -pub const PCIXBUS_ERRTYPE_UNKNOWN: u32 = 0; -pub const PCIXBUS_ERRTYPE_DATAPARITY: u32 = 1; -pub const PCIXBUS_ERRTYPE_SYSTEM: u32 = 2; -pub const PCIXBUS_ERRTYPE_MASTERABORT: u32 = 3; -pub const PCIXBUS_ERRTYPE_BUSTIMEOUT: u32 = 4; -pub const PCIXBUS_ERRTYPE_MASTERDATAPARITY: u32 = 5; -pub const PCIXBUS_ERRTYPE_ADDRESSPARITY: u32 = 6; -pub const PCIXBUS_ERRTYPE_COMMANDPARITY: u32 = 7; -pub const WHEA_FIRMWARE_RECORD_TYPE_IPFSAL: u32 = 0; -pub const WHEA_XPF_MCA_EXTREG_MAX_COUNT: u32 = 24; -pub const WHEA_XPF_MCA_SECTION_VERSION_2: u32 = 2; -pub const WHEA_XPF_MCA_SECTION_VERSION_3: u32 = 3; -pub const WHEA_XPF_MCA_SECTION_VERSION: u32 = 3; -pub const WHEA_AMD_EXT_REG_NUM: u32 = 10; -pub const ANY_SIZE: u32 = 1; -pub const WHEA_ERROR_PACKET_V1_VERSION: u32 = 2; -pub const WHEA_ERROR_PACKET_V2_VERSION: u32 = 3; -pub const WHEA_ERROR_PACKET_VERSION: u32 = 3; -pub const WHEA_ERROR_LOG_ENTRY_VERSION: u32 = 1; -pub const WHEA_ERROR_TEXT_LEN: u32 = 32; -pub const WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_VERSION: u32 = 1; -pub const WCS_RAS_REGISTER_NAME_MAX_LENGTH: u32 = 32; -pub const WHEA_GENERIC_ENTRY_TEXT_LEN: u32 = 20; -pub const WHEA_GENERIC_ENTRY_V2_VERSION: u32 = 768; -pub const WHEA_GENERIC_ENTRY_VERSION: u32 = 768; -pub const WHEA_MAX_LOG_DATA_LEN: u32 = 36; -pub const WHEA_INVALID_ERR_SRC_ID: u32 = 0; -pub const WHEA_ERR_SRC_OVERRIDE_FLAG: u32 = 1; -pub const INJECT_ERRTYPE_PROCESSOR_CORRECTABLE: u32 = 1; -pub const INJECT_ERRTYPE_PROCESSOR_UNCORRECTABLENONFATAL: u32 = 2; -pub const INJECT_ERRTYPE_PROCESSOR_UNCORRECTABLEFATAL: u32 = 4; -pub const INJECT_ERRTYPE_MEMORY_CORRECTABLE: u32 = 8; -pub const INJECT_ERRTYPE_MEMORY_UNCORRECTABLENONFATAL: u32 = 16; -pub const INJECT_ERRTYPE_MEMORY_UNCORRECTABLEFATAL: u32 = 32; -pub const INJECT_ERRTYPE_PCIEXPRESS_CORRECTABLE: u32 = 64; -pub const INJECT_ERRTYPE_PCIEXPRESS_UNCORRECTABLENONFATAL: u32 = 128; -pub const INJECT_ERRTYPE_PCIEXPRESS_UNCORRECTABLEFATAL: u32 = 256; -pub const INJECT_ERRTYPE_PLATFORM_CORRECTABLE: u32 = 512; -pub const INJECT_ERRTYPE_PLATFORM_UNCORRECTABLENONFATAL: u32 = 1024; -pub const INJECT_ERRTYPE_PLATFORM_UNCORRECTABLEFATAL: u32 = 2048; -pub const WHEA_IN_USE_PAGE_NOTIFY_FLAG_PLATFORMDIRECTED: u32 = 1; -pub const WHEA_IN_USE_PAGE_NOTIFY_FLAG_NOTIFYALL: u32 = 64; -pub const WHEA_IN_USE_PAGE_NOTIFY_FLAG_PAGEOFFLINED: u32 = 128; -pub const WHEA_PLUGIN_REGISTRATION_PACKET_V1: u32 = 65536; -pub const WHEA_PLUGIN_REGISTRATION_PACKET_V2: u32 = 131072; -pub const WHEA_PLUGIN_REGISTRATION_PACKET_VERSION: u32 = 131072; -pub const PshedFADiscovery: u32 = 1; -pub const PshedFAErrorSourceControl: u32 = 2; -pub const PshedFAErrorRecordPersistence: u32 = 4; -pub const PshedFAErrorInfoRetrieval: u32 = 8; -pub const PshedFAErrorRecovery: u32 = 16; -pub const PshedFAErrorInjection: u32 = 32; -pub const WHEA_WRITE_FLAG_DUMMY: u32 = 1; -pub const MAXIMUM_LEADBYTES: u32 = 12; -pub const SID_REVISION: u32 = 1; -pub const SID_MAX_SUB_AUTHORITIES: u32 = 15; -pub const SID_RECOMMENDED_SUB_AUTHORITIES: u32 = 1; -pub const SECURITY_MAX_SID_STRING_CHARACTERS: u32 = 187; -pub const SID_HASH_SIZE: u32 = 32; -pub const SECURITY_NULL_RID: u32 = 0; -pub const SECURITY_WORLD_RID: u32 = 0; -pub const SECURITY_LOCAL_RID: u32 = 0; -pub const SECURITY_LOCAL_LOGON_RID: u32 = 1; -pub const SECURITY_CREATOR_OWNER_RID: u32 = 0; -pub const SECURITY_CREATOR_GROUP_RID: u32 = 1; -pub const SECURITY_CREATOR_OWNER_SERVER_RID: u32 = 2; -pub const SECURITY_CREATOR_GROUP_SERVER_RID: u32 = 3; -pub const SECURITY_CREATOR_OWNER_RIGHTS_RID: u32 = 4; -pub const SECURITY_DIALUP_RID: u32 = 1; -pub const SECURITY_NETWORK_RID: u32 = 2; -pub const SECURITY_BATCH_RID: u32 = 3; -pub const SECURITY_INTERACTIVE_RID: u32 = 4; -pub const SECURITY_LOGON_IDS_RID: u32 = 5; -pub const SECURITY_LOGON_IDS_RID_COUNT: u32 = 3; -pub const SECURITY_SERVICE_RID: u32 = 6; -pub const SECURITY_ANONYMOUS_LOGON_RID: u32 = 7; -pub const SECURITY_PROXY_RID: u32 = 8; -pub const SECURITY_ENTERPRISE_CONTROLLERS_RID: u32 = 9; -pub const SECURITY_SERVER_LOGON_RID: u32 = 9; -pub const SECURITY_PRINCIPAL_SELF_RID: u32 = 10; -pub const SECURITY_AUTHENTICATED_USER_RID: u32 = 11; -pub const SECURITY_RESTRICTED_CODE_RID: u32 = 12; -pub const SECURITY_TERMINAL_SERVER_RID: u32 = 13; -pub const SECURITY_REMOTE_LOGON_RID: u32 = 14; -pub const SECURITY_THIS_ORGANIZATION_RID: u32 = 15; -pub const SECURITY_IUSER_RID: u32 = 17; -pub const SECURITY_LOCAL_SYSTEM_RID: u32 = 18; -pub const SECURITY_LOCAL_SERVICE_RID: u32 = 19; -pub const SECURITY_NETWORK_SERVICE_RID: u32 = 20; -pub const SECURITY_NT_NON_UNIQUE: u32 = 21; -pub const SECURITY_NT_NON_UNIQUE_SUB_AUTH_COUNT: u32 = 3; -pub const SECURITY_ENTERPRISE_READONLY_CONTROLLERS_RID: u32 = 22; -pub const SECURITY_BUILTIN_DOMAIN_RID: u32 = 32; -pub const SECURITY_WRITE_RESTRICTED_CODE_RID: u32 = 33; -pub const SECURITY_PACKAGE_BASE_RID: u32 = 64; -pub const SECURITY_PACKAGE_RID_COUNT: u32 = 2; -pub const SECURITY_PACKAGE_NTLM_RID: u32 = 10; -pub const SECURITY_PACKAGE_SCHANNEL_RID: u32 = 14; -pub const SECURITY_PACKAGE_DIGEST_RID: u32 = 21; -pub const SECURITY_CRED_TYPE_BASE_RID: u32 = 65; -pub const SECURITY_CRED_TYPE_RID_COUNT: u32 = 2; -pub const SECURITY_CRED_TYPE_THIS_ORG_CERT_RID: u32 = 1; -pub const SECURITY_MIN_BASE_RID: u32 = 80; -pub const SECURITY_SERVICE_ID_BASE_RID: u32 = 80; -pub const SECURITY_SERVICE_ID_RID_COUNT: u32 = 6; -pub const SECURITY_RESERVED_ID_BASE_RID: u32 = 81; -pub const SECURITY_APPPOOL_ID_BASE_RID: u32 = 82; -pub const SECURITY_APPPOOL_ID_RID_COUNT: u32 = 6; -pub const SECURITY_VIRTUALSERVER_ID_BASE_RID: u32 = 83; -pub const SECURITY_VIRTUALSERVER_ID_RID_COUNT: u32 = 6; -pub const SECURITY_USERMODEDRIVERHOST_ID_BASE_RID: u32 = 84; -pub const SECURITY_USERMODEDRIVERHOST_ID_RID_COUNT: u32 = 6; -pub const SECURITY_CLOUD_INFRASTRUCTURE_SERVICES_ID_BASE_RID: u32 = 85; -pub const SECURITY_CLOUD_INFRASTRUCTURE_SERVICES_ID_RID_COUNT: u32 = 6; -pub const SECURITY_WMIHOST_ID_BASE_RID: u32 = 86; -pub const SECURITY_WMIHOST_ID_RID_COUNT: u32 = 6; -pub const SECURITY_TASK_ID_BASE_RID: u32 = 87; -pub const SECURITY_NFS_ID_BASE_RID: u32 = 88; -pub const SECURITY_COM_ID_BASE_RID: u32 = 89; -pub const SECURITY_WINDOW_MANAGER_BASE_RID: u32 = 90; -pub const SECURITY_RDV_GFX_BASE_RID: u32 = 91; -pub const SECURITY_DASHOST_ID_BASE_RID: u32 = 92; -pub const SECURITY_DASHOST_ID_RID_COUNT: u32 = 6; -pub const SECURITY_USERMANAGER_ID_BASE_RID: u32 = 93; -pub const SECURITY_USERMANAGER_ID_RID_COUNT: u32 = 6; -pub const SECURITY_WINRM_ID_BASE_RID: u32 = 94; -pub const SECURITY_WINRM_ID_RID_COUNT: u32 = 6; -pub const SECURITY_CCG_ID_BASE_RID: u32 = 95; -pub const SECURITY_UMFD_BASE_RID: u32 = 96; -pub const SECURITY_VIRTUALACCOUNT_ID_RID_COUNT: u32 = 6; -pub const SECURITY_MAX_BASE_RID: u32 = 111; -pub const SECURITY_MAX_ALWAYS_FILTERED: u32 = 999; -pub const SECURITY_MIN_NEVER_FILTERED: u32 = 1000; -pub const SECURITY_OTHER_ORGANIZATION_RID: u32 = 1000; -pub const SECURITY_WINDOWSMOBILE_ID_BASE_RID: u32 = 112; -pub const SECURITY_INSTALLER_GROUP_CAPABILITY_BASE: u32 = 32; -pub const SECURITY_INSTALLER_GROUP_CAPABILITY_RID_COUNT: u32 = 9; -pub const SECURITY_INSTALLER_CAPABILITY_RID_COUNT: u32 = 10; -pub const SECURITY_LOCAL_ACCOUNT_RID: u32 = 113; -pub const SECURITY_LOCAL_ACCOUNT_AND_ADMIN_RID: u32 = 114; -pub const DOMAIN_GROUP_RID_AUTHORIZATION_DATA_IS_COMPOUNDED: u32 = 496; -pub const DOMAIN_GROUP_RID_AUTHORIZATION_DATA_CONTAINS_CLAIMS: u32 = 497; -pub const DOMAIN_GROUP_RID_ENTERPRISE_READONLY_DOMAIN_CONTROLLERS: u32 = 498; -pub const FOREST_USER_RID_MAX: u32 = 499; -pub const DOMAIN_USER_RID_ADMIN: u32 = 500; -pub const DOMAIN_USER_RID_GUEST: u32 = 501; -pub const DOMAIN_USER_RID_KRBTGT: u32 = 502; -pub const DOMAIN_USER_RID_DEFAULT_ACCOUNT: u32 = 503; -pub const DOMAIN_USER_RID_WDAG_ACCOUNT: u32 = 504; -pub const DOMAIN_USER_RID_MAX: u32 = 999; -pub const DOMAIN_GROUP_RID_ADMINS: u32 = 512; -pub const DOMAIN_GROUP_RID_USERS: u32 = 513; -pub const DOMAIN_GROUP_RID_GUESTS: u32 = 514; -pub const DOMAIN_GROUP_RID_COMPUTERS: u32 = 515; -pub const DOMAIN_GROUP_RID_CONTROLLERS: u32 = 516; -pub const DOMAIN_GROUP_RID_CERT_ADMINS: u32 = 517; -pub const DOMAIN_GROUP_RID_SCHEMA_ADMINS: u32 = 518; -pub const DOMAIN_GROUP_RID_ENTERPRISE_ADMINS: u32 = 519; -pub const DOMAIN_GROUP_RID_POLICY_ADMINS: u32 = 520; -pub const DOMAIN_GROUP_RID_READONLY_CONTROLLERS: u32 = 521; -pub const DOMAIN_GROUP_RID_CLONEABLE_CONTROLLERS: u32 = 522; -pub const DOMAIN_GROUP_RID_CDC_RESERVED: u32 = 524; -pub const DOMAIN_GROUP_RID_PROTECTED_USERS: u32 = 525; -pub const DOMAIN_GROUP_RID_KEY_ADMINS: u32 = 526; -pub const DOMAIN_GROUP_RID_ENTERPRISE_KEY_ADMINS: u32 = 527; -pub const DOMAIN_ALIAS_RID_ADMINS: u32 = 544; -pub const DOMAIN_ALIAS_RID_USERS: u32 = 545; -pub const DOMAIN_ALIAS_RID_GUESTS: u32 = 546; -pub const DOMAIN_ALIAS_RID_POWER_USERS: u32 = 547; -pub const DOMAIN_ALIAS_RID_ACCOUNT_OPS: u32 = 548; -pub const DOMAIN_ALIAS_RID_SYSTEM_OPS: u32 = 549; -pub const DOMAIN_ALIAS_RID_PRINT_OPS: u32 = 550; -pub const DOMAIN_ALIAS_RID_BACKUP_OPS: u32 = 551; -pub const DOMAIN_ALIAS_RID_REPLICATOR: u32 = 552; -pub const DOMAIN_ALIAS_RID_RAS_SERVERS: u32 = 553; -pub const DOMAIN_ALIAS_RID_PREW2KCOMPACCESS: u32 = 554; -pub const DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS: u32 = 555; -pub const DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS: u32 = 556; -pub const DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS: u32 = 557; -pub const DOMAIN_ALIAS_RID_MONITORING_USERS: u32 = 558; -pub const DOMAIN_ALIAS_RID_LOGGING_USERS: u32 = 559; -pub const DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS: u32 = 560; -pub const DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS: u32 = 561; -pub const DOMAIN_ALIAS_RID_DCOM_USERS: u32 = 562; -pub const DOMAIN_ALIAS_RID_IUSERS: u32 = 568; -pub const DOMAIN_ALIAS_RID_CRYPTO_OPERATORS: u32 = 569; -pub const DOMAIN_ALIAS_RID_CACHEABLE_PRINCIPALS_GROUP: u32 = 571; -pub const DOMAIN_ALIAS_RID_NON_CACHEABLE_PRINCIPALS_GROUP: u32 = 572; -pub const DOMAIN_ALIAS_RID_EVENT_LOG_READERS_GROUP: u32 = 573; -pub const DOMAIN_ALIAS_RID_CERTSVC_DCOM_ACCESS_GROUP: u32 = 574; -pub const DOMAIN_ALIAS_RID_RDS_REMOTE_ACCESS_SERVERS: u32 = 575; -pub const DOMAIN_ALIAS_RID_RDS_ENDPOINT_SERVERS: u32 = 576; -pub const DOMAIN_ALIAS_RID_RDS_MANAGEMENT_SERVERS: u32 = 577; -pub const DOMAIN_ALIAS_RID_HYPER_V_ADMINS: u32 = 578; -pub const DOMAIN_ALIAS_RID_ACCESS_CONTROL_ASSISTANCE_OPS: u32 = 579; -pub const DOMAIN_ALIAS_RID_REMOTE_MANAGEMENT_USERS: u32 = 580; -pub const DOMAIN_ALIAS_RID_DEFAULT_ACCOUNT: u32 = 581; -pub const DOMAIN_ALIAS_RID_STORAGE_REPLICA_ADMINS: u32 = 582; -pub const DOMAIN_ALIAS_RID_DEVICE_OWNERS: u32 = 583; -pub const SECURITY_APP_PACKAGE_BASE_RID: u32 = 2; -pub const SECURITY_BUILTIN_APP_PACKAGE_RID_COUNT: u32 = 2; -pub const SECURITY_APP_PACKAGE_RID_COUNT: u32 = 8; -pub const SECURITY_CAPABILITY_BASE_RID: u32 = 3; -pub const SECURITY_CAPABILITY_APP_RID: u32 = 1024; -pub const SECURITY_CAPABILITY_APP_SILO_RID: u32 = 65536; -pub const SECURITY_BUILTIN_CAPABILITY_RID_COUNT: u32 = 2; -pub const SECURITY_CAPABILITY_RID_COUNT: u32 = 5; -pub const SECURITY_PARENT_PACKAGE_RID_COUNT: u32 = 8; -pub const SECURITY_CHILD_PACKAGE_RID_COUNT: u32 = 12; -pub const SECURITY_BUILTIN_PACKAGE_ANY_PACKAGE: u32 = 1; -pub const SECURITY_BUILTIN_PACKAGE_ANY_RESTRICTED_PACKAGE: u32 = 2; -pub const SECURITY_CAPABILITY_INTERNET_CLIENT: u32 = 1; -pub const SECURITY_CAPABILITY_INTERNET_CLIENT_SERVER: u32 = 2; -pub const SECURITY_CAPABILITY_PRIVATE_NETWORK_CLIENT_SERVER: u32 = 3; -pub const SECURITY_CAPABILITY_PICTURES_LIBRARY: u32 = 4; -pub const SECURITY_CAPABILITY_VIDEOS_LIBRARY: u32 = 5; -pub const SECURITY_CAPABILITY_MUSIC_LIBRARY: u32 = 6; -pub const SECURITY_CAPABILITY_DOCUMENTS_LIBRARY: u32 = 7; -pub const SECURITY_CAPABILITY_ENTERPRISE_AUTHENTICATION: u32 = 8; -pub const SECURITY_CAPABILITY_SHARED_USER_CERTIFICATES: u32 = 9; -pub const SECURITY_CAPABILITY_REMOVABLE_STORAGE: u32 = 10; -pub const SECURITY_CAPABILITY_APPOINTMENTS: u32 = 11; -pub const SECURITY_CAPABILITY_CONTACTS: u32 = 12; -pub const SECURITY_CAPABILITY_INTERNET_EXPLORER: u32 = 4096; -pub const SECURITY_MANDATORY_UNTRUSTED_RID: u32 = 0; -pub const SECURITY_MANDATORY_LOW_RID: u32 = 4096; -pub const SECURITY_MANDATORY_MEDIUM_RID: u32 = 8192; -pub const SECURITY_MANDATORY_MEDIUM_PLUS_RID: u32 = 8448; -pub const SECURITY_MANDATORY_HIGH_RID: u32 = 12288; -pub const SECURITY_MANDATORY_SYSTEM_RID: u32 = 16384; -pub const SECURITY_MANDATORY_PROTECTED_PROCESS_RID: u32 = 20480; -pub const SECURITY_MANDATORY_MAXIMUM_USER_RID: u32 = 16384; -pub const SECURITY_AUTHENTICATION_AUTHORITY_RID_COUNT: u32 = 1; -pub const SECURITY_AUTHENTICATION_AUTHORITY_ASSERTED_RID: u32 = 1; -pub const SECURITY_AUTHENTICATION_SERVICE_ASSERTED_RID: u32 = 2; -pub const SECURITY_AUTHENTICATION_FRESH_KEY_AUTH_RID: u32 = 3; -pub const SECURITY_AUTHENTICATION_KEY_TRUST_RID: u32 = 4; -pub const SECURITY_AUTHENTICATION_KEY_PROPERTY_MFA_RID: u32 = 5; -pub const SECURITY_AUTHENTICATION_KEY_PROPERTY_ATTESTATION_RID: u32 = 6; -pub const SECURITY_PROCESS_TRUST_AUTHORITY_RID_COUNT: u32 = 2; -pub const SECURITY_PROCESS_PROTECTION_TYPE_FULL_RID: u32 = 1024; -pub const SECURITY_PROCESS_PROTECTION_TYPE_LITE_RID: u32 = 512; -pub const SECURITY_PROCESS_PROTECTION_TYPE_NONE_RID: u32 = 0; -pub const SECURITY_PROCESS_PROTECTION_LEVEL_WINTCB_RID: u32 = 8192; -pub const SECURITY_PROCESS_PROTECTION_LEVEL_WINDOWS_RID: u32 = 4096; -pub const SECURITY_PROCESS_PROTECTION_LEVEL_APP_RID: u32 = 2048; -pub const SECURITY_PROCESS_PROTECTION_LEVEL_ANTIMALWARE_RID: u32 = 1536; -pub const SECURITY_PROCESS_PROTECTION_LEVEL_AUTHENTICODE_RID: u32 = 1024; -pub const SECURITY_PROCESS_PROTECTION_LEVEL_NONE_RID: u32 = 0; -pub const SECURITY_TRUSTED_INSTALLER_RID1: u32 = 956008885; -pub const SECURITY_TRUSTED_INSTALLER_RID2: u32 = 3418522649; -pub const SECURITY_TRUSTED_INSTALLER_RID3: u32 = 1831038044; -pub const SECURITY_TRUSTED_INSTALLER_RID4: u32 = 1853292631; -pub const SECURITY_TRUSTED_INSTALLER_RID5: u32 = 2271478464; -pub const ACCESS_MIN_MS_ACE_TYPE: u32 = 0; -pub const ACCESS_ALLOWED_ACE_TYPE: u32 = 0; -pub const ACCESS_DENIED_ACE_TYPE: u32 = 1; -pub const SYSTEM_AUDIT_ACE_TYPE: u32 = 2; -pub const SYSTEM_ALARM_ACE_TYPE: u32 = 3; -pub const ACCESS_MAX_MS_V2_ACE_TYPE: u32 = 3; -pub const ACCESS_ALLOWED_COMPOUND_ACE_TYPE: u32 = 4; -pub const ACCESS_MAX_MS_V3_ACE_TYPE: u32 = 4; -pub const ACCESS_MIN_MS_OBJECT_ACE_TYPE: u32 = 5; -pub const ACCESS_ALLOWED_OBJECT_ACE_TYPE: u32 = 5; -pub const ACCESS_DENIED_OBJECT_ACE_TYPE: u32 = 6; -pub const SYSTEM_AUDIT_OBJECT_ACE_TYPE: u32 = 7; -pub const SYSTEM_ALARM_OBJECT_ACE_TYPE: u32 = 8; -pub const ACCESS_MAX_MS_OBJECT_ACE_TYPE: u32 = 8; -pub const ACCESS_MAX_MS_V4_ACE_TYPE: u32 = 8; -pub const ACCESS_MAX_MS_ACE_TYPE: u32 = 8; -pub const ACCESS_ALLOWED_CALLBACK_ACE_TYPE: u32 = 9; -pub const ACCESS_DENIED_CALLBACK_ACE_TYPE: u32 = 10; -pub const ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE: u32 = 11; -pub const ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE: u32 = 12; -pub const SYSTEM_AUDIT_CALLBACK_ACE_TYPE: u32 = 13; -pub const SYSTEM_ALARM_CALLBACK_ACE_TYPE: u32 = 14; -pub const SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE: u32 = 15; -pub const SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE: u32 = 16; -pub const SYSTEM_MANDATORY_LABEL_ACE_TYPE: u32 = 17; -pub const SYSTEM_RESOURCE_ATTRIBUTE_ACE_TYPE: u32 = 18; -pub const SYSTEM_SCOPED_POLICY_ID_ACE_TYPE: u32 = 19; -pub const SYSTEM_PROCESS_TRUST_LABEL_ACE_TYPE: u32 = 20; -pub const SYSTEM_ACCESS_FILTER_ACE_TYPE: u32 = 21; -pub const ACCESS_MAX_MS_V5_ACE_TYPE: u32 = 21; -pub const OBJECT_INHERIT_ACE: u32 = 1; -pub const CONTAINER_INHERIT_ACE: u32 = 2; -pub const NO_PROPAGATE_INHERIT_ACE: u32 = 4; -pub const INHERIT_ONLY_ACE: u32 = 8; -pub const INHERITED_ACE: u32 = 16; -pub const VALID_INHERIT_FLAGS: u32 = 31; -pub const CRITICAL_ACE_FLAG: u32 = 32; -pub const SUCCESSFUL_ACCESS_ACE_FLAG: u32 = 64; -pub const FAILED_ACCESS_ACE_FLAG: u32 = 128; -pub const TRUST_PROTECTED_FILTER_ACE_FLAG: u32 = 64; -pub const SYSTEM_MANDATORY_LABEL_NO_WRITE_UP: u32 = 1; -pub const SYSTEM_MANDATORY_LABEL_NO_READ_UP: u32 = 2; -pub const SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP: u32 = 4; -pub const SYSTEM_MANDATORY_LABEL_VALID_MASK: u32 = 7; -pub const SYSTEM_PROCESS_TRUST_LABEL_VALID_MASK: u32 = 16777215; -pub const SYSTEM_PROCESS_TRUST_NOCONSTRAINT_MASK: u32 = 4294967295; -pub const SYSTEM_ACCESS_FILTER_VALID_MASK: u32 = 16777215; -pub const SYSTEM_ACCESS_FILTER_NOCONSTRAINT_MASK: u32 = 4294967295; -pub const SE_OWNER_DEFAULTED: u32 = 1; -pub const SE_GROUP_DEFAULTED: u32 = 2; -pub const SE_DACL_PRESENT: u32 = 4; -pub const SE_DACL_DEFAULTED: u32 = 8; -pub const SE_SACL_PRESENT: u32 = 16; -pub const SE_SACL_DEFAULTED: u32 = 32; -pub const SE_DACL_UNTRUSTED: u32 = 64; -pub const SE_SERVER_SECURITY: u32 = 128; -pub const SE_DACL_AUTO_INHERIT_REQ: u32 = 256; -pub const SE_SACL_AUTO_INHERIT_REQ: u32 = 512; -pub const SE_DACL_AUTO_INHERITED: u32 = 1024; -pub const SE_SACL_AUTO_INHERITED: u32 = 2048; -pub const SE_DACL_PROTECTED: u32 = 4096; -pub const SE_SACL_PROTECTED: u32 = 8192; -pub const SE_RM_CONTROL_VALID: u32 = 16384; -pub const SE_SELF_RELATIVE: u32 = 32768; -pub const ACCESS_OBJECT_GUID: u32 = 0; -pub const ACCESS_PROPERTY_SET_GUID: u32 = 1; -pub const ACCESS_PROPERTY_GUID: u32 = 2; -pub const ACCESS_MAX_LEVEL: u32 = 4; -pub const AUDIT_ALLOW_NO_PRIVILEGE: u32 = 1; -#[allow(unsafe_code)] -pub const ACCESS_DS_SOURCE_A: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"DS\0") -}; -#[allow(unsafe_code)] -pub const ACCESS_DS_SOURCE_W: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"DS\0") -}; -#[allow(unsafe_code)] -pub const ACCESS_DS_OBJECT_TYPE_NAME_A: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"Directory Service Object\0") -}; -#[allow(unsafe_code)] -pub const ACCESS_DS_OBJECT_TYPE_NAME_W: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"Directory Service Object\0") -}; -pub const ACCESS_REASON_TYPE_MASK: u32 = 16711680; -pub const ACCESS_REASON_DATA_MASK: u32 = 65535; -pub const ACCESS_REASON_STAGING_MASK: u32 = 2147483648; -pub const ACCESS_REASON_EXDATA_MASK: u32 = 2130706432; -pub const SE_SECURITY_DESCRIPTOR_FLAG_NO_OWNER_ACE: u32 = 1; -pub const SE_SECURITY_DESCRIPTOR_FLAG_NO_LABEL_ACE: u32 = 2; -pub const SE_SECURITY_DESCRIPTOR_FLAG_NO_ACCESS_FILTER_ACE: u32 = 4; -pub const SE_SECURITY_DESCRIPTOR_VALID_FLAGS: u32 = 7; -pub const SE_ACCESS_CHECK_FLAG_NO_LEARNING_MODE_LOGGING: u32 = 8; -pub const SE_ACCESS_CHECK_VALID_FLAGS: u32 = 8; -pub const TOKEN_ASSIGN_PRIMARY: u32 = 1; -pub const TOKEN_DUPLICATE: u32 = 2; -pub const TOKEN_IMPERSONATE: u32 = 4; -pub const TOKEN_QUERY: u32 = 8; -pub const TOKEN_QUERY_SOURCE: u32 = 16; -pub const TOKEN_ADJUST_PRIVILEGES: u32 = 32; -pub const TOKEN_ADJUST_GROUPS: u32 = 64; -pub const TOKEN_ADJUST_DEFAULT: u32 = 128; -pub const TOKEN_ADJUST_SESSIONID: u32 = 256; -pub const TOKEN_ALL_ACCESS_P: u32 = 983295; -pub const TOKEN_ALL_ACCESS: u32 = 983551; -pub const TOKEN_READ: u32 = 131080; -pub const TOKEN_WRITE: u32 = 131296; -pub const TOKEN_EXECUTE: u32 = 131072; -pub const TOKEN_TRUST_CONSTRAINT_MASK: u32 = 131096; -pub const TOKEN_TRUST_ALLOWED_MASK: u32 = 131102; -pub const TOKEN_ACCESS_PSEUDO_HANDLE_WIN8: u32 = 24; -pub const TOKEN_ACCESS_PSEUDO_HANDLE: u32 = 24; -pub const TOKEN_MANDATORY_POLICY_OFF: u32 = 0; -pub const TOKEN_MANDATORY_POLICY_NO_WRITE_UP: u32 = 1; -pub const TOKEN_MANDATORY_POLICY_NEW_PROCESS_MIN: u32 = 2; -pub const TOKEN_MANDATORY_POLICY_VALID_MASK: u32 = 3; -pub const POLICY_AUDIT_SUBCATEGORY_COUNT: u32 = 59; -pub const TOKEN_SOURCE_LENGTH: u32 = 8; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_INVALID: u32 = 0; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64: u32 = 1; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64: u32 = 2; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING: u32 = 3; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_FQBN: u32 = 4; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_SID: u32 = 5; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN: u32 = 6; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING: u32 = 16; -pub const CLAIM_SECURITY_ATTRIBUTE_NON_INHERITABLE: u32 = 1; -pub const CLAIM_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE: u32 = 2; -pub const CLAIM_SECURITY_ATTRIBUTE_USE_FOR_DENY_ONLY: u32 = 4; -pub const CLAIM_SECURITY_ATTRIBUTE_DISABLED_BY_DEFAULT: u32 = 8; -pub const CLAIM_SECURITY_ATTRIBUTE_DISABLED: u32 = 16; -pub const CLAIM_SECURITY_ATTRIBUTE_MANDATORY: u32 = 32; -pub const CLAIM_SECURITY_ATTRIBUTE_VALID_FLAGS: u32 = 63; -pub const CLAIM_SECURITY_ATTRIBUTE_CUSTOM_FLAGS: u32 = 4294901760; -pub const CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION_V1: u32 = 1; -pub const CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION: u32 = 1; -pub const SEGMENT_HEAP_PARAMETERS_VERSION: u32 = 3; -pub const SEGMENT_HEAP_FLG_USE_PAGE_HEAP: u32 = 1; -pub const SEGMENT_HEAP_PARAMS_VALID_FLAGS: u32 = 1; -pub const RTL_HEAP_MEMORY_LIMIT_CURRENT_VERSION: u32 = 1; -pub const HEAP_NO_SERIALIZE: u32 = 1; -pub const HEAP_GROWABLE: u32 = 2; -pub const HEAP_GENERATE_EXCEPTIONS: u32 = 4; -pub const HEAP_ZERO_MEMORY: u32 = 8; -pub const HEAP_REALLOC_IN_PLACE_ONLY: u32 = 16; -pub const HEAP_TAIL_CHECKING_ENABLED: u32 = 32; -pub const HEAP_FREE_CHECKING_ENABLED: u32 = 64; -pub const HEAP_DISABLE_COALESCE_ON_FREE: u32 = 128; -pub const HEAP_CREATE_ALIGN_16: u32 = 65536; -pub const HEAP_CREATE_ENABLE_TRACING: u32 = 131072; -pub const HEAP_CREATE_ENABLE_EXECUTE: u32 = 262144; -pub const HEAP_SETTABLE_USER_VALUE: u32 = 256; -pub const HEAP_SETTABLE_USER_FLAG1: u32 = 512; -pub const HEAP_SETTABLE_USER_FLAG2: u32 = 1024; -pub const HEAP_SETTABLE_USER_FLAG3: u32 = 2048; -pub const HEAP_SETTABLE_USER_FLAGS: u32 = 3584; -pub const HEAP_CLASS_0: u32 = 0; -pub const HEAP_CLASS_1: u32 = 4096; -pub const HEAP_CLASS_2: u32 = 8192; -pub const HEAP_CLASS_3: u32 = 12288; -pub const HEAP_CLASS_4: u32 = 16384; -pub const HEAP_CLASS_5: u32 = 20480; -pub const HEAP_CLASS_6: u32 = 24576; -pub const HEAP_CLASS_7: u32 = 28672; -pub const HEAP_CLASS_8: u32 = 32768; -pub const HEAP_CLASS_MASK: u32 = 61440; -pub const HEAP_MAXIMUM_TAG: u32 = 4095; -pub const HEAP_GLOBAL_TAG: u32 = 2048; -pub const HEAP_PSEUDO_TAG_FLAG: u32 = 32768; -pub const HEAP_TAG_SHIFT: u32 = 18; -pub const HEAP_TAG_MASK: u32 = 1073479680; -pub const HEAP_CREATE_SEGMENT_HEAP: u32 = 256; -pub const HEAP_CREATE_HARDENED: u32 = 512; -pub const HEAP_CREATE_VALID_MASK: u32 = 521215; -pub const RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE: u32 = 1; -pub const RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING: u32 = 2; -pub const COMPRESSION_FORMAT_NONE: u32 = 0; -pub const COMPRESSION_FORMAT_DEFAULT: u32 = 1; -pub const COMPRESSION_FORMAT_LZNT1: u32 = 2; -pub const COMPRESSION_FORMAT_XPRESS: u32 = 3; -pub const COMPRESSION_FORMAT_XPRESS_HUFF: u32 = 4; -pub const COMPRESSION_FORMAT_XP10: u32 = 5; -pub const COMPRESSION_FORMAT_MAX: u32 = 5; -pub const COMPRESSION_ENGINE_STANDARD: u32 = 0; -pub const COMPRESSION_ENGINE_MAXIMUM: u32 = 256; -pub const COMPRESSION_ENGINE_HIBER: u32 = 512; -pub const COMPRESSION_ENGINE_MAX: u32 = 512; -pub const COMPRESSION_FORMAT_MASK: u32 = 255; -pub const COMPRESSION_ENGINE_MASK: u32 = 65280; -pub const COMPRESSION_FORMAT_ENGINE_MASK: u32 = 65535; -pub const MAX_UNICODE_STACK_BUFFER_LENGTH: u32 = 256; -#[allow(unsafe_code)] -pub const RTL_SYSTEM_VOLUME_INFORMATION_FOLDER: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"System Volume Information\0") -}; -pub const PSMP_MINIMUM_SYSAPP_CLAIM_VALUES: u32 = 2; -pub const PSMP_MAXIMUM_SYSAPP_CLAIM_VALUES: u32 = 4; -#[allow(unsafe_code)] -pub const MSV1_0_PACKAGE_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked( - b"MICROSOFT_AUTHENTICATION_PACKAGE_V1_0\0", - ) -}; -#[allow(unsafe_code)] -pub const MSV1_0_PACKAGE_NAMEW: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked( - b"MICROSOFT_AUTHENTICATION_PACKAGE_V1_0\0", - ) -}; -#[allow(unsafe_code)] -pub const MSV1_0_SUBAUTHENTICATION_KEY: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked( - b"SYSTEM\\CurrentControlSet\\Control\\Lsa\\MSV1_0\0", - ) -}; -#[allow(unsafe_code)] -pub const MSV1_0_SUBAUTHENTICATION_VALUE: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"Auth\0") -}; -pub const MSV1_0_CHALLENGE_LENGTH: u32 = 8; -pub const MSV1_0_USER_SESSION_KEY_LENGTH: u32 = 16; -pub const MSV1_0_LANMAN_SESSION_KEY_LENGTH: u32 = 8; -pub const MSV1_0_CLEARTEXT_PASSWORD_ALLOWED: u32 = 2; -pub const MSV1_0_UPDATE_LOGON_STATISTICS: u32 = 4; -pub const MSV1_0_RETURN_USER_PARAMETERS: u32 = 8; -pub const MSV1_0_DONT_TRY_GUEST_ACCOUNT: u32 = 16; -pub const MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT: u32 = 32; -pub const MSV1_0_RETURN_PASSWORD_EXPIRY: u32 = 64; -pub const MSV1_0_USE_CLIENT_CHALLENGE: u32 = 128; -pub const MSV1_0_TRY_GUEST_ACCOUNT_ONLY: u32 = 256; -pub const MSV1_0_RETURN_PROFILE_PATH: u32 = 512; -pub const MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY: u32 = 1024; -pub const MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT: u32 = 2048; -pub const MSV1_0_DISABLE_PERSONAL_FALLBACK: u32 = 4096; -pub const MSV1_0_ALLOW_FORCE_GUEST: u32 = 8192; -pub const MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED: u32 = 16384; -pub const MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY: u32 = 32768; -pub const MSV1_0_SUBAUTHENTICATION_DLL_EX: u32 = 1048576; -pub const MSV1_0_ALLOW_MSVCHAPV2: u32 = 65536; -pub const MSV1_0_S4U2SELF: u32 = 131072; -pub const MSV1_0_CHECK_LOGONHOURS_FOR_S4U: u32 = 262144; -pub const MSV1_0_INTERNET_DOMAIN: u32 = 524288; -pub const MSV1_0_SUBAUTHENTICATION_DLL: u32 = 4278190080; -pub const MSV1_0_SUBAUTHENTICATION_DLL_SHIFT: u32 = 24; -pub const MSV1_0_MNS_LOGON: u32 = 16777216; -pub const MSV1_0_SUBAUTHENTICATION_DLL_RAS: u32 = 2; -pub const MSV1_0_SUBAUTHENTICATION_DLL_IIS: u32 = 132; -pub const MSV1_0_S4U_LOGON_FLAG_CHECK_LOGONHOURS: u32 = 2; -pub const LOGON_GUEST: u32 = 1; -pub const LOGON_NOENCRYPTION: u32 = 2; -pub const LOGON_CACHED_ACCOUNT: u32 = 4; -pub const LOGON_USED_LM_PASSWORD: u32 = 8; -pub const LOGON_EXTRA_SIDS: u32 = 32; -pub const LOGON_SUBAUTH_SESSION_KEY: u32 = 64; -pub const LOGON_SERVER_TRUST_ACCOUNT: u32 = 128; -pub const LOGON_NTLMV2_ENABLED: u32 = 256; -pub const LOGON_RESOURCE_GROUPS: u32 = 512; -pub const LOGON_PROFILE_PATH_RETURNED: u32 = 1024; -pub const LOGON_NT_V2: u32 = 2048; -pub const LOGON_LM_V2: u32 = 4096; -pub const LOGON_NTLM_V2: u32 = 8192; -pub const LOGON_OPTIMIZED: u32 = 16384; -pub const LOGON_WINLOGON: u32 = 32768; -pub const LOGON_PKINIT: u32 = 65536; -pub const LOGON_NO_OPTIMIZED: u32 = 131072; -pub const LOGON_NO_ELEVATION: u32 = 262144; -pub const LOGON_MANAGED_SERVICE: u32 = 524288; -pub const MSV1_0_SUBAUTHENTICATION_FLAGS: u32 = 4278190080; -pub const LOGON_GRACE_LOGON: u32 = 16777216; -pub const MSV1_0_OWF_PASSWORD_LENGTH: u32 = 16; -pub const MSV1_0_SHA_PASSWORD_LENGTH: u32 = 20; -pub const MSV1_0_CREDENTIAL_KEY_LENGTH: u32 = 20; -pub const MSV1_0_CRED_LM_PRESENT: u32 = 1; -pub const MSV1_0_CRED_NT_PRESENT: u32 = 2; -pub const MSV1_0_CRED_REMOVED: u32 = 4; -pub const MSV1_0_CRED_CREDKEY_PRESENT: u32 = 8; -pub const MSV1_0_CRED_SHA_PRESENT: u32 = 16; -pub const MSV1_0_CRED_VERSION: u32 = 0; -pub const MSV1_0_CRED_VERSION_V2: u32 = 2; -pub const MSV1_0_CRED_VERSION_V3: u32 = 4; -pub const MSV1_0_CRED_VERSION_IUM: u32 = 4294901761; -pub const MSV1_0_CRED_VERSION_REMOTE: u32 = 4294901762; -pub const MSV1_0_CRED_VERSION_ARSO: u32 = 4294901763; -pub const MSV1_0_CRED_VERSION_RESERVED_1: u32 = 4294967294; -pub const MSV1_0_CRED_VERSION_INVALID: u32 = 4294967295; -pub const MSV1_0_NTLM3_RESPONSE_LENGTH: u32 = 16; -pub const MSV1_0_NTLM3_OWF_LENGTH: u32 = 16; -pub const MSV1_0_MAX_NTLM3_LIFE: u32 = 129600; -pub const MSV1_0_MAX_AVL_SIZE: u32 = 64000; -pub const MSV1_0_AV_FLAG_FORCE_GUEST: u32 = 1; -pub const MSV1_0_AV_FLAG_MIC_HANDSHAKE_MESSAGES: u32 = 2; -pub const MSV1_0_AV_FLAG_UNVERIFIED_TARGET: u32 = 4; -pub const USE_PRIMARY_PASSWORD: u32 = 1; -pub const RETURN_PRIMARY_USERNAME: u32 = 2; -pub const RETURN_PRIMARY_LOGON_DOMAINNAME: u32 = 4; -pub const RETURN_NON_NT_USER_SESSION_KEY: u32 = 8; -pub const GENERATE_CLIENT_CHALLENGE: u32 = 16; -pub const GCR_NTLM3_PARMS: u32 = 32; -pub const GCR_TARGET_INFO: u32 = 64; -pub const RETURN_RESERVED_PARAMETER: u32 = 128; -pub const GCR_ALLOW_NTLM: u32 = 256; -pub const GCR_USE_OEM_SET: u32 = 512; -pub const GCR_MACHINE_CREDENTIAL: u32 = 1024; -pub const GCR_USE_OWF_PASSWORD: u32 = 2048; -pub const GCR_ALLOW_LM: u32 = 4096; -pub const GCR_ALLOW_NO_TARGET: u32 = 8192; -pub const GCR_VSM_PROTECTED_PASSWORD: u32 = 16384; -pub const FILE_CLEANUP_UNKNOWN: u32 = 0; -pub const FILE_CLEANUP_WRONG_DEVICE: u32 = 1; -pub const FILE_CLEANUP_FILE_REMAINS: u32 = 2; -pub const FILE_CLEANUP_FILE_DELETED: u32 = 4; -pub const FILE_CLEANUP_LINK_DELETED: u32 = 8; -pub const FILE_CLEANUP_STREAM_DELETED: u32 = 16; -pub const FILE_CLEANUP_POSIX_STYLE_DELETE: u32 = 32; -pub const FILE_OPLOCK_BROKEN_TO_LEVEL_2: u32 = 7; -pub const FILE_OPLOCK_BROKEN_TO_NONE: u32 = 8; -pub const FILE_OPBATCH_BREAK_UNDERWAY: u32 = 9; -pub const FILE_NOTIFY_CHANGE_FILE_NAME: u32 = 1; -pub const FILE_NOTIFY_CHANGE_DIR_NAME: u32 = 2; -pub const FILE_NOTIFY_CHANGE_NAME: u32 = 3; -pub const FILE_NOTIFY_CHANGE_ATTRIBUTES: u32 = 4; -pub const FILE_NOTIFY_CHANGE_SIZE: u32 = 8; -pub const FILE_NOTIFY_CHANGE_LAST_WRITE: u32 = 16; -pub const FILE_NOTIFY_CHANGE_LAST_ACCESS: u32 = 32; -pub const FILE_NOTIFY_CHANGE_CREATION: u32 = 64; -pub const FILE_NOTIFY_CHANGE_EA: u32 = 128; -pub const FILE_NOTIFY_CHANGE_SECURITY: u32 = 256; -pub const FILE_NOTIFY_CHANGE_STREAM_NAME: u32 = 512; -pub const FILE_NOTIFY_CHANGE_STREAM_SIZE: u32 = 1024; -pub const FILE_NOTIFY_CHANGE_STREAM_WRITE: u32 = 2048; -pub const FILE_NOTIFY_VALID_MASK: u32 = 4095; -pub const FILE_ACTION_ADDED: u32 = 1; -pub const FILE_ACTION_REMOVED: u32 = 2; -pub const FILE_ACTION_MODIFIED: u32 = 3; -pub const FILE_ACTION_RENAMED_OLD_NAME: u32 = 4; -pub const FILE_ACTION_RENAMED_NEW_NAME: u32 = 5; -pub const FILE_ACTION_ADDED_STREAM: u32 = 6; -pub const FILE_ACTION_REMOVED_STREAM: u32 = 7; -pub const FILE_ACTION_MODIFIED_STREAM: u32 = 8; -pub const FILE_ACTION_REMOVED_BY_DELETE: u32 = 9; -pub const FILE_ACTION_ID_NOT_TUNNELLED: u32 = 10; -pub const FILE_ACTION_TUNNELLED_ID_COLLISION: u32 = 11; -pub const FILE_PIPE_BYTE_STREAM_TYPE: u32 = 0; -pub const FILE_PIPE_MESSAGE_TYPE: u32 = 1; -pub const FILE_PIPE_ACCEPT_REMOTE_CLIENTS: u32 = 0; -pub const FILE_PIPE_REJECT_REMOTE_CLIENTS: u32 = 2; -pub const FILE_PIPE_TYPE_VALID_MASK: u32 = 3; -pub const FILE_PIPE_QUEUE_OPERATION: u32 = 0; -pub const FILE_PIPE_COMPLETE_OPERATION: u32 = 1; -pub const FILE_PIPE_BYTE_STREAM_MODE: u32 = 0; -pub const FILE_PIPE_MESSAGE_MODE: u32 = 1; -pub const FILE_PIPE_INBOUND: u32 = 0; -pub const FILE_PIPE_OUTBOUND: u32 = 1; -pub const FILE_PIPE_FULL_DUPLEX: u32 = 2; -pub const FILE_PIPE_DISCONNECTED_STATE: u32 = 1; -pub const FILE_PIPE_LISTENING_STATE: u32 = 2; -pub const FILE_PIPE_CONNECTED_STATE: u32 = 3; -pub const FILE_PIPE_CLOSING_STATE: u32 = 4; -pub const FILE_PIPE_CLIENT_END: u32 = 0; -pub const FILE_PIPE_SERVER_END: u32 = 1; -pub const FILE_CASE_SENSITIVE_SEARCH: u32 = 1; -pub const FILE_CASE_PRESERVED_NAMES: u32 = 2; -pub const FILE_UNICODE_ON_DISK: u32 = 4; -pub const FILE_PERSISTENT_ACLS: u32 = 8; -pub const FILE_FILE_COMPRESSION: u32 = 16; -pub const FILE_VOLUME_QUOTAS: u32 = 32; -pub const FILE_SUPPORTS_SPARSE_FILES: u32 = 64; -pub const FILE_SUPPORTS_REPARSE_POINTS: u32 = 128; -pub const FILE_SUPPORTS_REMOTE_STORAGE: u32 = 256; -pub const FILE_RETURNS_CLEANUP_RESULT_INFO: u32 = 512; -pub const FILE_SUPPORTS_POSIX_UNLINK_RENAME: u32 = 1024; -pub const FILE_SUPPORTS_BYPASS_IO: u32 = 2048; -pub const FILE_SUPPORTS_STREAM_SNAPSHOTS: u32 = 4096; -pub const FILE_SUPPORTS_CASE_SENSITIVE_DIRS: u32 = 8192; -pub const FILE_VOLUME_IS_COMPRESSED: u32 = 32768; -pub const FILE_SUPPORTS_OBJECT_IDS: u32 = 65536; -pub const FILE_SUPPORTS_ENCRYPTION: u32 = 131072; -pub const FILE_NAMED_STREAMS: u32 = 262144; -pub const FILE_READ_ONLY_VOLUME: u32 = 524288; -pub const FILE_SEQUENTIAL_WRITE_ONCE: u32 = 1048576; -pub const FILE_SUPPORTS_TRANSACTIONS: u32 = 2097152; -pub const FILE_SUPPORTS_HARD_LINKS: u32 = 4194304; -pub const FILE_SUPPORTS_EXTENDED_ATTRIBUTES: u32 = 8388608; -pub const FILE_SUPPORTS_OPEN_BY_FILE_ID: u32 = 16777216; -pub const FILE_SUPPORTS_USN_JOURNAL: u32 = 33554432; -pub const FILE_SUPPORTS_INTEGRITY_STREAMS: u32 = 67108864; -pub const FILE_SUPPORTS_BLOCK_REFCOUNTING: u32 = 134217728; -pub const FILE_SUPPORTS_SPARSE_VDL: u32 = 268435456; -pub const FILE_DAX_VOLUME: u32 = 536870912; -pub const FILE_SUPPORTS_GHOSTING: u32 = 1073741824; -pub const FILE_NEED_EA: u32 = 128; -pub const FILE_EA_TYPE_BINARY: u32 = 65534; -pub const FILE_EA_TYPE_ASCII: u32 = 65533; -pub const FILE_EA_TYPE_BITMAP: u32 = 65531; -pub const FILE_EA_TYPE_METAFILE: u32 = 65530; -pub const FILE_EA_TYPE_ICON: u32 = 65529; -pub const FILE_EA_TYPE_EA: u32 = 65518; -pub const FILE_EA_TYPE_MVMT: u32 = 65503; -pub const FILE_EA_TYPE_MVST: u32 = 65502; -pub const FILE_EA_TYPE_ASN1: u32 = 65501; -pub const FILE_EA_TYPE_FAMILY_IDS: u32 = 65281; -pub const FILE_NAME_FLAG_HARDLINK: u32 = 0; -pub const FILE_NAME_FLAG_NTFS: u32 = 1; -pub const FILE_NAME_FLAG_DOS: u32 = 2; -pub const FILE_NAME_FLAG_BOTH: u32 = 3; -pub const FILE_NAME_FLAGS_UNSPECIFIED: u32 = 128; -pub const FILE_ID_GLOBAL_TX_DIR_INFO_FLAG_WRITELOCKED: u32 = 1; -pub const FILE_ID_GLOBAL_TX_DIR_INFO_FLAG_VISIBLE_TO_TX: u32 = 2; -pub const FILE_ID_GLOBAL_TX_DIR_INFO_FLAG_VISIBLE_OUTSIDE_TX: u32 = 4; -pub const ANSI_DOS_STAR: u8 = 60u8; -pub const ANSI_DOS_QM: u8 = 62u8; -pub const ANSI_DOS_DOT: u8 = 34u8; -pub const DOS_STAR: u8 = 60u8; -pub const DOS_QM: u8 = 62u8; -pub const DOS_DOT: u8 = 34u8; -pub const NO_8DOT3_NAME_PRESENT: u32 = 1; -pub const REMOVED_8DOT3_NAME: u32 = 2; -pub const LX_FILE_METADATA_HAS_UID: u32 = 1; -pub const LX_FILE_METADATA_HAS_GID: u32 = 2; -pub const LX_FILE_METADATA_HAS_MODE: u32 = 4; -pub const LX_FILE_METADATA_HAS_DEVICE_ID: u32 = 8; -pub const LX_FILE_CASE_SENSITIVE_DIR: u32 = 16; -pub const FILE_CS_FLAG_CASE_SENSITIVE_DIR: u32 = 1; -pub const FILE_LINK_REPLACE_IF_EXISTS: u32 = 1; -pub const FILE_LINK_POSIX_SEMANTICS: u32 = 2; -pub const FILE_LINK_SUPPRESS_STORAGE_RESERVE_INHERITANCE: u32 = 8; -pub const FILE_LINK_NO_INCREASE_AVAILABLE_SPACE: u32 = 16; -pub const FILE_LINK_NO_DECREASE_AVAILABLE_SPACE: u32 = 32; -pub const FILE_LINK_PRESERVE_AVAILABLE_SPACE: u32 = 48; -pub const FILE_LINK_IGNORE_READONLY_ATTRIBUTE: u32 = 64; -pub const FILE_LINK_FORCE_RESIZE_TARGET_SR: u32 = 128; -pub const FILE_LINK_FORCE_RESIZE_SOURCE_SR: u32 = 256; -pub const FILE_LINK_FORCE_RESIZE_SR: u32 = 384; -pub const FILE_RENAME_REPLACE_IF_EXISTS: u32 = 1; -pub const FILE_RENAME_POSIX_SEMANTICS: u32 = 2; -pub const FILE_RENAME_SUPPRESS_PIN_STATE_INHERITANCE: u32 = 4; -pub const FILE_RENAME_SUPPRESS_STORAGE_RESERVE_INHERITANCE: u32 = 8; -pub const FILE_RENAME_NO_INCREASE_AVAILABLE_SPACE: u32 = 16; -pub const FILE_RENAME_NO_DECREASE_AVAILABLE_SPACE: u32 = 32; -pub const FILE_RENAME_PRESERVE_AVAILABLE_SPACE: u32 = 48; -pub const FILE_RENAME_IGNORE_READONLY_ATTRIBUTE: u32 = 64; -pub const FILE_RENAME_FORCE_RESIZE_TARGET_SR: u32 = 128; -pub const FILE_RENAME_FORCE_RESIZE_SOURCE_SR: u32 = 256; -pub const FILE_RENAME_FORCE_RESIZE_SR: u32 = 384; -pub const REMOTE_PROTOCOL_FLAG_LOOPBACK: u32 = 1; -pub const REMOTE_PROTOCOL_FLAG_OFFLINE: u32 = 2; -pub const REMOTE_PROTOCOL_FLAG_PERSISTENT_HANDLE: u32 = 4; -pub const REMOTE_PROTOCOL_FLAG_PRIVACY: u32 = 8; -pub const REMOTE_PROTOCOL_FLAG_INTEGRITY: u32 = 16; -pub const REMOTE_PROTOCOL_FLAG_MUTUAL_AUTH: u32 = 32; -pub const RPI_SMB2_SHARECAP_TIMEWARP: u32 = 2; -pub const RPI_SMB2_SHARECAP_DFS: u32 = 8; -pub const RPI_SMB2_SHARECAP_CONTINUOUS_AVAILABILITY: u32 = 16; -pub const RPI_SMB2_SHARECAP_SCALEOUT: u32 = 32; -pub const RPI_SMB2_SHARECAP_CLUSTER: u32 = 64; -pub const RPI_SMB2_SHARECAP_ENCRYPTED: u32 = 128; -pub const RPI_SMB2_SHARECAP_ACCESS_BASED_DIRECTORY_ENUM: u32 = 256; -pub const RPI_SMB2_SHARECAP_IDENTITY_REMOTING: u32 = 512; -pub const RPI_SMB2_SHARECAP_ASYMMETRIC_SCALEOUT: u32 = 1024; -pub const RPI_SMB2_SHAREFLAG_ENCRYPT_DATA: u32 = 1; -pub const RPI_SMB2_SHAREFLAG_COMPRESS_DATA: u32 = 2; -pub const RPI_SMB2_SHARETYPE_DISK: u32 = 0; -pub const RPI_SMB2_SHARETYPE_PIPE: u32 = 1; -pub const RPI_SMB2_SHARETYPE_PRINT: u32 = 2; -pub const RPI_SMB2_SERVERCAP_DFS: u32 = 1; -pub const RPI_SMB2_SERVERCAP_LEASING: u32 = 2; -pub const RPI_SMB2_SERVERCAP_LARGEMTU: u32 = 4; -pub const RPI_SMB2_SERVERCAP_MULTICHANNEL: u32 = 8; -pub const RPI_SMB2_SERVERCAP_PERSISTENT_HANDLES: u32 = 16; -pub const RPI_SMB2_SERVERCAP_DIRECTORY_LEASING: u32 = 32; -pub const RPI_SMB2_SERVERCAP_ENCRYPTION_AWARE: u32 = 64; -pub const FILE_VC_QUOTA_NONE: u32 = 0; -pub const FILE_VC_QUOTA_TRACK: u32 = 1; -pub const FILE_VC_QUOTA_ENFORCE: u32 = 2; -pub const FILE_VC_QUOTA_MASK: u32 = 3; -pub const FILE_VC_CONTENT_INDEX_DISABLED: u32 = 8; -pub const FILE_VC_LOG_QUOTA_THRESHOLD: u32 = 16; -pub const FILE_VC_LOG_QUOTA_LIMIT: u32 = 32; -pub const FILE_VC_LOG_VOLUME_THRESHOLD: u32 = 64; -pub const FILE_VC_LOG_VOLUME_LIMIT: u32 = 128; -pub const FILE_VC_QUOTAS_INCOMPLETE: u32 = 256; -pub const FILE_VC_QUOTAS_REBUILDING: u32 = 512; -pub const FILE_VC_VALID_MASK: u32 = 1023; -pub const FLAGS_END_OF_FILE_INFO_EX_EXTEND_PAGING: u32 = 1; -pub const FLAGS_END_OF_FILE_INFO_EX_NO_EXTRA_PAGING_EXTEND: u32 = 2; -pub const FLAGS_END_OF_FILE_INFO_EX_TIME_CONSTRAINED: u32 = 4; -pub const FLAGS_DELAY_REASONS_LOG_FILE_FULL: u32 = 1; -pub const FLAGS_DELAY_REASONS_BITMAP_SCANNED: u32 = 2; -pub const GET_VOLUME_BITMAP_FLAG_MASK_METADATA: u32 = 1; -pub const FLAG_USN_TRACK_MODIFIED_RANGES_ENABLE: u32 = 1; -pub const USN_PAGE_SIZE: u32 = 4096; -pub const USN_REASON_DATA_OVERWRITE: u32 = 1; -pub const USN_REASON_DATA_EXTEND: u32 = 2; -pub const USN_REASON_DATA_TRUNCATION: u32 = 4; -pub const USN_REASON_NAMED_DATA_OVERWRITE: u32 = 16; -pub const USN_REASON_NAMED_DATA_EXTEND: u32 = 32; -pub const USN_REASON_NAMED_DATA_TRUNCATION: u32 = 64; -pub const USN_REASON_FILE_CREATE: u32 = 256; -pub const USN_REASON_FILE_DELETE: u32 = 512; -pub const USN_REASON_EA_CHANGE: u32 = 1024; -pub const USN_REASON_SECURITY_CHANGE: u32 = 2048; -pub const USN_REASON_RENAME_OLD_NAME: u32 = 4096; -pub const USN_REASON_RENAME_NEW_NAME: u32 = 8192; -pub const USN_REASON_INDEXABLE_CHANGE: u32 = 16384; -pub const USN_REASON_BASIC_INFO_CHANGE: u32 = 32768; -pub const USN_REASON_HARD_LINK_CHANGE: u32 = 65536; -pub const USN_REASON_COMPRESSION_CHANGE: u32 = 131072; -pub const USN_REASON_ENCRYPTION_CHANGE: u32 = 262144; -pub const USN_REASON_OBJECT_ID_CHANGE: u32 = 524288; -pub const USN_REASON_REPARSE_POINT_CHANGE: u32 = 1048576; -pub const USN_REASON_STREAM_CHANGE: u32 = 2097152; -pub const USN_REASON_TRANSACTED_CHANGE: u32 = 4194304; -pub const USN_REASON_INTEGRITY_CHANGE: u32 = 8388608; -pub const USN_REASON_DESIRED_STORAGE_CLASS_CHANGE: u32 = 16777216; -pub const USN_REASON_CLOSE: u32 = 2147483648; -pub const USN_DELETE_FLAG_DELETE: u32 = 1; -pub const USN_DELETE_FLAG_NOTIFY: u32 = 2; -pub const USN_DELETE_VALID_FLAGS: u32 = 3; -pub const USN_SOURCE_DATA_MANAGEMENT: u32 = 1; -pub const USN_SOURCE_AUXILIARY_DATA: u32 = 2; -pub const USN_SOURCE_REPLICATION_MANAGEMENT: u32 = 4; -pub const USN_SOURCE_CLIENT_REPLICATION_MANAGEMENT: u32 = 8; -pub const USN_SOURCE_VALID_FLAGS: u32 = 15; -pub const MARK_HANDLE_PROTECT_CLUSTERS: u32 = 1; -pub const MARK_HANDLE_TXF_SYSTEM_LOG: u32 = 4; -pub const MARK_HANDLE_NOT_TXF_SYSTEM_LOG: u32 = 8; -pub const MARK_HANDLE_REALTIME: u32 = 32; -pub const MARK_HANDLE_NOT_REALTIME: u32 = 64; -pub const MARK_HANDLE_CLOUD_SYNC: u32 = 2048; -pub const MARK_HANDLE_READ_COPY: u32 = 128; -pub const MARK_HANDLE_NOT_READ_COPY: u32 = 256; -pub const MARK_HANDLE_FILTER_METADATA: u32 = 512; -pub const MARK_HANDLE_RETURN_PURGE_FAILURE: u32 = 1024; -pub const MARK_HANDLE_DISABLE_FILE_METADATA_OPTIMIZATION: u32 = 4096; -pub const MARK_HANDLE_ENABLE_USN_SOURCE_ON_PAGING_IO: u32 = 8192; -pub const MARK_HANDLE_SKIP_COHERENCY_SYNC_DISALLOW_WRITES: u32 = 16384; -pub const MARK_HANDLE_SUPPRESS_VOLUME_OPEN_FLUSH: u32 = 32768; -pub const MARK_HANDLE_ENABLE_CPU_CACHE: u32 = 268435456; -pub const VOLUME_IS_DIRTY: u32 = 1; -pub const VOLUME_UPGRADE_SCHEDULED: u32 = 2; -pub const VOLUME_SESSION_OPEN: u32 = 4; -pub const FILE_PREFETCH_TYPE_FOR_CREATE: u32 = 1; -pub const FILE_PREFETCH_TYPE_FOR_DIRENUM: u32 = 2; -pub const FILE_PREFETCH_TYPE_FOR_CREATE_EX: u32 = 3; -pub const FILE_PREFETCH_TYPE_FOR_DIRENUM_EX: u32 = 4; -pub const FILE_PREFETCH_TYPE_MAX: u32 = 4; -pub const FILESYSTEM_STATISTICS_TYPE_NTFS: u32 = 1; -pub const FILESYSTEM_STATISTICS_TYPE_FAT: u32 = 2; -pub const FILESYSTEM_STATISTICS_TYPE_EXFAT: u32 = 3; -pub const FILESYSTEM_STATISTICS_TYPE_REFS: u32 = 4; -pub const FILE_ZERO_DATA_INFORMATION_FLAG_PRESERVE_CACHED_DATA: u32 = 1; -pub const FILE_SET_ENCRYPTION: u32 = 1; -pub const FILE_CLEAR_ENCRYPTION: u32 = 2; -pub const STREAM_SET_ENCRYPTION: u32 = 3; -pub const STREAM_CLEAR_ENCRYPTION: u32 = 4; -pub const MAXIMUM_ENCRYPTION_VALUE: u32 = 4; -pub const ENCRYPTION_FORMAT_DEFAULT: u32 = 1; -pub const ENCRYPTED_DATA_INFO_SPARSE_FILE: u32 = 1; -pub const COPYFILE_SIS_LINK: u32 = 1; -pub const COPYFILE_SIS_REPLACE: u32 = 2; -pub const COPYFILE_SIS_FLAGS: u32 = 3; -pub const SET_REPAIR_ENABLED: u32 = 1; -pub const SET_REPAIR_WARN_ABOUT_DATA_LOSS: u32 = 8; -pub const SET_REPAIR_DISABLED_AND_BUGCHECK_ON_CORRUPT: u32 = 16; -pub const SET_REPAIR_VALID_MASK: u32 = 25; -pub const FILE_INITIATE_REPAIR_HINT1_FILE_RECORD_NOT_IN_USE: u32 = 1; -pub const FILE_INITIATE_REPAIR_HINT1_FILE_RECORD_REUSED: u32 = 2; -pub const FILE_INITIATE_REPAIR_HINT1_FILE_RECORD_NOT_EXIST: u32 = 4; -pub const FILE_INITIATE_REPAIR_HINT1_FILE_RECORD_NOT_BASE_RECORD: u32 = 8; -pub const FILE_INITIATE_REPAIR_HINT1_SYSTEM_FILE: u32 = 16; -pub const FILE_INITIATE_REPAIR_HINT1_NOT_IMPLEMENTED: u32 = 32; -pub const FILE_INITIATE_REPAIR_HINT1_UNABLE_TO_REPAIR: u32 = 64; -pub const FILE_INITIATE_REPAIR_HINT1_REPAIR_DISABLED: u32 = 128; -pub const FILE_INITIATE_REPAIR_HINT1_RECURSIVELY_CORRUPTED: u32 = 256; -pub const FILE_INITIATE_REPAIR_HINT1_ORPHAN_GENERATED: u32 = 512; -pub const FILE_INITIATE_REPAIR_HINT1_REPAIRED: u32 = 1024; -pub const FILE_INITIATE_REPAIR_HINT1_NOTHING_WRONG: u32 = 2048; -pub const FILE_INITIATE_REPAIR_HINT1_ATTRIBUTE_NOT_FOUND: u32 = 4096; -pub const FILE_INITIATE_REPAIR_HINT1_POTENTIAL_CROSSLINK: u32 = 8192; -pub const FILE_INITIATE_REPAIR_HINT1_STALE_INFORMATION: u32 = 16384; -pub const FILE_INITIATE_REPAIR_HINT1_CLUSTERS_ALREADY_IN_USE: u32 = 32768; -pub const FILE_INITIATE_REPAIR_HINT1_LCN_NOT_EXIST: u32 = 65536; -pub const FILE_INITIATE_REPAIR_HINT1_INVALID_RUN_LENGTH: u32 = 131072; -pub const FILE_INITIATE_REPAIR_HINT1_FILE_RECORD_NOT_ORPHAN: u32 = 262144; -pub const FILE_INITIATE_REPAIR_HINT1_FILE_RECORD_IS_BASE_RECORD: u32 = 524288; -pub const FILE_INITIATE_REPAIR_HINT1_INVALID_ARRAY_LENGTH_COUNT: u32 = 1048576; -pub const FILE_INITIATE_REPAIR_HINT1_SID_VALID: u32 = 2097152; -pub const FILE_INITIATE_REPAIR_HINT1_SID_MISMATCH: u32 = 4194304; -pub const FILE_INITIATE_REPAIR_HINT1_INVALID_PARENT: u32 = 8388608; -pub const FILE_INITIATE_REPAIR_HINT1_PARENT_FILE_RECORD_NOT_IN_USE: u32 = 16777216; -pub const FILE_INITIATE_REPAIR_HINT1_PARENT_FILE_RECORD_REUSED: u32 = 33554432; -pub const FILE_INITIATE_REPAIR_HINT1_PARENT_FILE_RECORD_NOT_EXIST: u32 = 67108864; -pub const FILE_INITIATE_REPAIR_HINT1_PARENT_FILE_RECORD_NOT_BASE_RECORD: u32 = 134217728; -pub const FILE_INITIATE_REPAIR_HINT1_PARENT_FILE_RECORD_NOT_INDEX: u32 = 268435456; -pub const FILE_INITIATE_REPAIR_HINT1_VALID_INDEX_ENTRY: u32 = 536870912; -pub const FILE_INITIATE_REPAIR_HINT1_OUT_OF_GENERIC_NAMES: u32 = 1073741824; -pub const FILE_INITIATE_REPAIR_HINT1_OUT_OF_RESOURCE: u32 = 2147483648; -pub const FILE_INITIATE_REPAIR_HINT1_INVALID_LCN: u64 = 4294967296; -pub const FILE_INITIATE_REPAIR_HINT1_INVALID_VCN: u64 = 8589934592; -pub const FILE_INITIATE_REPAIR_HINT1_NAME_CONFLICT: u64 = 17179869184; -pub const FILE_INITIATE_REPAIR_HINT1_ORPHAN: u64 = 34359738368; -pub const FILE_INITIATE_REPAIR_HINT1_ATTRIBUTE_TOO_SMALL: u64 = 68719476736; -pub const FILE_INITIATE_REPAIR_HINT1_ATTRIBUTE_NON_RESIDENT: u64 = 137438953472; -pub const FILE_INITIATE_REPAIR_HINT1_DENY_DEFRAG: u64 = 274877906944; -pub const FILE_INITIATE_REPAIR_HINT1_PREVIOUS_PARENT_STILL_VALID: u64 = 549755813888; -pub const FILE_INITIATE_REPAIR_HINT1_INDEX_ENTRY_MISMATCH: u64 = 1099511627776; -pub const FILE_INITIATE_REPAIR_HINT1_INVALID_ORPHAN_RECOVERY_NAME: u64 = 2199023255552; -pub const FILE_INITIATE_REPAIR_HINT1_MULTIPLE_FILE_NAME_ATTRIBUTES: u64 = 4398046511104; -pub const TXFS_RM_FLAG_LOGGING_MODE: u32 = 1; -pub const TXFS_RM_FLAG_RENAME_RM: u32 = 2; -pub const TXFS_RM_FLAG_LOG_CONTAINER_COUNT_MAX: u32 = 4; -pub const TXFS_RM_FLAG_LOG_CONTAINER_COUNT_MIN: u32 = 8; -pub const TXFS_RM_FLAG_LOG_GROWTH_INCREMENT_NUM_CONTAINERS: u32 = 16; -pub const TXFS_RM_FLAG_LOG_GROWTH_INCREMENT_PERCENT: u32 = 32; -pub const TXFS_RM_FLAG_LOG_AUTO_SHRINK_PERCENTAGE: u32 = 64; -pub const TXFS_RM_FLAG_LOG_NO_CONTAINER_COUNT_MAX: u32 = 128; -pub const TXFS_RM_FLAG_LOG_NO_CONTAINER_COUNT_MIN: u32 = 256; -pub const TXFS_RM_FLAG_GROW_LOG: u32 = 1024; -pub const TXFS_RM_FLAG_SHRINK_LOG: u32 = 2048; -pub const TXFS_RM_FLAG_ENFORCE_MINIMUM_SIZE: u32 = 4096; -pub const TXFS_RM_FLAG_PRESERVE_CHANGES: u32 = 8192; -pub const TXFS_RM_FLAG_RESET_RM_AT_NEXT_START: u32 = 16384; -pub const TXFS_RM_FLAG_DO_NOT_RESET_RM_AT_NEXT_START: u32 = 32768; -pub const TXFS_RM_FLAG_PREFER_CONSISTENCY: u32 = 65536; -pub const TXFS_RM_FLAG_PREFER_AVAILABILITY: u32 = 131072; -pub const TXFS_LOGGING_MODE_SIMPLE: u32 = 1; -pub const TXFS_LOGGING_MODE_FULL: u32 = 2; -pub const TXFS_TRANSACTION_STATE_NONE: u32 = 0; -pub const TXFS_TRANSACTION_STATE_ACTIVE: u32 = 1; -pub const TXFS_TRANSACTION_STATE_PREPARED: u32 = 2; -pub const TXFS_TRANSACTION_STATE_NOTACTIVE: u32 = 3; -pub const TXFS_MODIFY_RM_VALID_FLAGS: u32 = 261631; -pub const TXFS_RM_STATE_NOT_STARTED: u32 = 0; -pub const TXFS_RM_STATE_STARTING: u32 = 1; -pub const TXFS_RM_STATE_ACTIVE: u32 = 2; -pub const TXFS_RM_STATE_SHUTTING_DOWN: u32 = 3; -pub const TXFS_QUERY_RM_INFORMATION_VALID_FLAGS: u32 = 246192; -pub const TXFS_ROLLFORWARD_REDO_FLAG_USE_LAST_REDO_LSN: u32 = 1; -pub const TXFS_ROLLFORWARD_REDO_FLAG_USE_LAST_VIRTUAL_CLOCK: u32 = 2; -pub const TXFS_ROLLFORWARD_REDO_VALID_FLAGS: u32 = 3; -pub const TXFS_START_RM_FLAG_LOG_CONTAINER_COUNT_MAX: u32 = 1; -pub const TXFS_START_RM_FLAG_LOG_CONTAINER_COUNT_MIN: u32 = 2; -pub const TXFS_START_RM_FLAG_LOG_CONTAINER_SIZE: u32 = 4; -pub const TXFS_START_RM_FLAG_LOG_GROWTH_INCREMENT_NUM_CONTAINERS: u32 = 8; -pub const TXFS_START_RM_FLAG_LOG_GROWTH_INCREMENT_PERCENT: u32 = 16; -pub const TXFS_START_RM_FLAG_LOG_AUTO_SHRINK_PERCENTAGE: u32 = 32; -pub const TXFS_START_RM_FLAG_LOG_NO_CONTAINER_COUNT_MAX: u32 = 64; -pub const TXFS_START_RM_FLAG_LOG_NO_CONTAINER_COUNT_MIN: u32 = 128; -pub const TXFS_START_RM_FLAG_RECOVER_BEST_EFFORT: u32 = 512; -pub const TXFS_START_RM_FLAG_LOGGING_MODE: u32 = 1024; -pub const TXFS_START_RM_FLAG_PRESERVE_CHANGES: u32 = 2048; -pub const TXFS_START_RM_FLAG_PREFER_CONSISTENCY: u32 = 4096; -pub const TXFS_START_RM_FLAG_PREFER_AVAILABILITY: u32 = 8192; -pub const TXFS_START_RM_VALID_FLAGS: u32 = 15999; -pub const TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY_FLAG_CREATED: u32 = 1; -pub const TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY_FLAG_DELETED: u32 = 2; -pub const TXFS_TRANSACTED_VERSION_NONTRANSACTED: u32 = 4294967294; -pub const TXFS_TRANSACTED_VERSION_UNCOMMITTED: u32 = 4294967295; -pub const TXFS_SAVEPOINT_SET: u32 = 1; -pub const TXFS_SAVEPOINT_ROLLBACK: u32 = 2; -pub const TXFS_SAVEPOINT_CLEAR: u32 = 4; -pub const TXFS_SAVEPOINT_CLEAR_ALL: u32 = 16; -pub const PERSISTENT_VOLUME_STATE_SHORT_NAME_CREATION_DISABLED: u32 = 1; -pub const PERSISTENT_VOLUME_STATE_VOLUME_SCRUB_DISABLED: u32 = 2; -pub const PERSISTENT_VOLUME_STATE_GLOBAL_METADATA_NO_SEEK_PENALTY: u32 = 4; -pub const PERSISTENT_VOLUME_STATE_LOCAL_METADATA_NO_SEEK_PENALTY: u32 = 8; -pub const PERSISTENT_VOLUME_STATE_NO_HEAT_GATHERING: u32 = 16; -pub const PERSISTENT_VOLUME_STATE_CONTAINS_BACKING_WIM: u32 = 32; -pub const PERSISTENT_VOLUME_STATE_BACKED_BY_WIM: u32 = 64; -pub const PERSISTENT_VOLUME_STATE_NO_WRITE_AUTO_TIERING: u32 = 128; -pub const PERSISTENT_VOLUME_STATE_TXF_DISABLED: u32 = 256; -pub const PERSISTENT_VOLUME_STATE_REALLOCATE_ALL_DATA_WRITES: u32 = 512; -pub const PERSISTENT_VOLUME_STATE_CHKDSK_RAN_ONCE: u32 = 1024; -pub const PERSISTENT_VOLUME_STATE_MODIFIED_BY_CHKDSK: u32 = 2048; -pub const PERSISTENT_VOLUME_STATE_DAX_FORMATTED: u32 = 4096; -pub const PERSISTENT_VOLUME_STATE_DEV_VOLUME: u32 = 8192; -pub const PERSISTENT_VOLUME_STATE_TRUSTED_VOLUME: u32 = 16384; -pub const OPLOCK_LEVEL_CACHE_READ: u32 = 1; -pub const OPLOCK_LEVEL_CACHE_HANDLE: u32 = 2; -pub const OPLOCK_LEVEL_CACHE_WRITE: u32 = 4; -pub const REQUEST_OPLOCK_INPUT_FLAG_REQUEST: u32 = 1; -pub const REQUEST_OPLOCK_INPUT_FLAG_ACK: u32 = 2; -pub const REQUEST_OPLOCK_INPUT_FLAG_COMPLETE_ACK_ON_CLOSE: u32 = 4; -pub const REQUEST_OPLOCK_CURRENT_VERSION: u32 = 1; -pub const REQUEST_OPLOCK_OUTPUT_FLAG_ACK_REQUIRED: u32 = 1; -pub const REQUEST_OPLOCK_OUTPUT_FLAG_MODES_PROVIDED: u32 = 2; -pub const REQUEST_OPLOCK_OUTPUT_FLAG_WRITABLE_SECTION_PRESENT: u32 = 4; -pub const QUERY_DEPENDENT_VOLUME_REQUEST_FLAG_HOST_VOLUMES: u32 = 1; -pub const QUERY_DEPENDENT_VOLUME_REQUEST_FLAG_GUEST_VOLUMES: u32 = 2; -pub const SD_GLOBAL_CHANGE_TYPE_MACHINE_SID: u32 = 1; -pub const SD_GLOBAL_CHANGE_TYPE_QUERY_STATS: u32 = 65536; -pub const SD_GLOBAL_CHANGE_TYPE_ENUM_SDS: u32 = 131072; -pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_FLAG_PAGE_FILE: u32 = 1; -pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_FLAG_DENY_DEFRAG_SET: u32 = 2; -pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_FLAG_FS_SYSTEM_FILE: u32 = 4; -pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_FLAG_TXF_SYSTEM_FILE: u32 = 8; -pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_ATTRIBUTE_MASK: u32 = 4278190080; -pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_ATTRIBUTE_DATA: u32 = 16777216; -pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_ATTRIBUTE_INDEX: u32 = 33554432; -pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_ATTRIBUTE_SYSTEM: u32 = 50331648; -pub const FILE_TYPE_NOTIFICATION_FLAG_USAGE_BEGIN: u32 = 1; -pub const FILE_TYPE_NOTIFICATION_FLAG_USAGE_END: u32 = 2; -pub const CSV_MGMTLOCK_CHECK_VOLUME_REDIRECTED: u32 = 1; -pub const CSV_INVALID_DEVICE_NUMBER: u32 = 4294967295; -pub const CSV_QUERY_MDS_PATH_V2_VERSION_1: u32 = 1; -pub const CSV_QUERY_MDS_PATH_FLAG_STORAGE_ON_THIS_NODE_IS_CONNECTED: u32 = 1; -pub const CSV_QUERY_MDS_PATH_FLAG_CSV_DIRECT_IO_ENABLED: u32 = 2; -pub const CSV_QUERY_MDS_PATH_FLAG_SMB_BYPASS_CSV_ENABLED: u32 = 4; -pub const QUERY_FILE_LAYOUT_RESTART: u32 = 1; -pub const QUERY_FILE_LAYOUT_INCLUDE_NAMES: u32 = 2; -pub const QUERY_FILE_LAYOUT_INCLUDE_STREAMS: u32 = 4; -pub const QUERY_FILE_LAYOUT_INCLUDE_EXTENTS: u32 = 8; -pub const QUERY_FILE_LAYOUT_INCLUDE_EXTRA_INFO: u32 = 16; -pub const QUERY_FILE_LAYOUT_INCLUDE_STREAMS_WITH_NO_CLUSTERS_ALLOCATED: u32 = 32; -pub const QUERY_FILE_LAYOUT_INCLUDE_FULL_PATH_IN_NAMES: u32 = 64; -pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION: u32 = 128; -pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION_FOR_DSC_ATTRIBUTE: u32 = 256; -pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION_FOR_TXF_ATTRIBUTE: u32 = 512; -pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION_FOR_EFS_ATTRIBUTE: u32 = 1024; -pub const QUERY_FILE_LAYOUT_INCLUDE_ONLY_FILES_WITH_SPECIFIC_ATTRIBUTES: u32 = 2048; -pub const QUERY_FILE_LAYOUT_INCLUDE_FILES_WITH_DSC_ATTRIBUTE: u32 = 4096; -pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION_FOR_DATA_ATTRIBUTE: u32 = 8192; -pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION_FOR_REPARSE_ATTRIBUTE: u32 = 16384; -pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION_FOR_EA_ATTRIBUTE: u32 = 32768; -pub const QUERY_FILE_LAYOUT_SINGLE_INSTANCED: u32 = 1; -pub const FILE_LAYOUT_NAME_ENTRY_PRIMARY: u32 = 1; -pub const FILE_LAYOUT_NAME_ENTRY_DOS: u32 = 2; -pub const STREAM_LAYOUT_ENTRY_IMMOVABLE: u32 = 1; -pub const STREAM_LAYOUT_ENTRY_PINNED: u32 = 2; -pub const STREAM_LAYOUT_ENTRY_RESIDENT: u32 = 4; -pub const STREAM_LAYOUT_ENTRY_NO_CLUSTERS_ALLOCATED: u32 = 8; -pub const STREAM_LAYOUT_ENTRY_HAS_INFORMATION: u32 = 16; -pub const STREAM_EXTENT_ENTRY_AS_RETRIEVAL_POINTERS: u32 = 1; -pub const STREAM_EXTENT_ENTRY_ALL_EXTENTS: u32 = 2; -pub const CHECKSUM_TYPE_NONE: u32 = 0; -pub const CHECKSUM_TYPE_CRC32: u32 = 1; -pub const CHECKSUM_TYPE_CRC64: u32 = 2; -pub const CHECKSUM_TYPE_ECC: u32 = 3; -pub const CHECKSUM_TYPE_SHA256: u32 = 4; -pub const CHECKSUM_TYPE_FIRST_UNUSED_TYPE: u32 = 5; -pub const FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF: u32 = 1; -pub const OFFLOAD_READ_FLAG_ALL_ZERO_BEYOND_CURRENT_RANGE: u32 = 1; -pub const SET_PURGE_FAILURE_MODE_ENABLED: u32 = 1; -pub const SET_PURGE_FAILURE_MODE_DISABLED: u32 = 2; -pub const FILE_REGION_USAGE_VALID_CACHED_DATA: u32 = 1; -pub const FILE_REGION_USAGE_VALID_NONCACHED_DATA: u32 = 2; -pub const FILE_REGION_USAGE_OTHER_PAGE_ALIGNMENT: u32 = 4; -pub const FILE_REGION_USAGE_LARGE_PAGE_ALIGNMENT: u32 = 8; -pub const FILE_REGION_USAGE_HUGE_PAGE_ALIGNMENT: u32 = 16; -pub const FILE_REGION_USAGE_QUERY_ALIGNMENT: u32 = 24; -pub const VALID_WRITE_USN_REASON_MASK: u32 = 2147483649; -pub const FILE_STORAGE_TIER_NAME_LENGTH: u32 = 256; -pub const FILE_STORAGE_TIER_DESCRIPTION_LENGTH: u32 = 512; -pub const FILE_STORAGE_TIER_FLAG_NO_SEEK_PENALTY: u32 = 131072; -pub const FILE_STORAGE_TIER_FLAG_WRITE_BACK_CACHE: u32 = 2097152; -pub const FILE_STORAGE_TIER_FLAG_READ_CACHE: u32 = 4194304; -pub const FILE_STORAGE_TIER_FLAG_PARITY: u32 = 8388608; -pub const FILE_STORAGE_TIER_FLAG_SMR: u32 = 16777216; -pub const QUERY_STORAGE_CLASSES_FLAGS_MEASURE_WRITE: u32 = 2147483648; -pub const QUERY_STORAGE_CLASSES_FLAGS_MEASURE_READ: u32 = 1073741824; -pub const QUERY_STORAGE_CLASSES_FLAGS_NO_DEFRAG_VOLUME: u32 = 536870912; -pub const QUERY_FILE_LAYOUT_REPARSE_DATA_INVALID: u32 = 1; -pub const QUERY_FILE_LAYOUT_REPARSE_TAG_INVALID: u32 = 2; -pub const DUPLICATE_EXTENTS_DATA_EX_SOURCE_ATOMIC: u32 = 1; -pub const DUPLICATE_EXTENTS_DATA_EX_ASYNC: u32 = 2; -pub const REFS_SMR_VOLUME_INFO_OUTPUT_VERSION_V0: u32 = 0; -pub const REFS_SMR_VOLUME_INFO_OUTPUT_VERSION_V1: u32 = 1; -pub const REFS_SMR_VOLUME_GC_PARAMETERS_VERSION_V1: u32 = 1; -pub const STREAMS_INVALID_ID: u32 = 0; -pub const STREAMS_MAX_ID: u32 = 65535; -pub const STREAMS_ASSOCIATE_ID_CLEAR: u32 = 1; -pub const STREAMS_ASSOCIATE_ID_SET: u32 = 2; -pub const DAX_ALLOC_ALIGNMENT_FLAG_MANDATORY: u32 = 1; -pub const DAX_ALLOC_ALIGNMENT_FLAG_FALLBACK_SPECIFIED: u32 = 2; -pub const WOF_CURRENT_VERSION: u32 = 1; -pub const WOF_PROVIDER_WIM: u32 = 1; -pub const WOF_PROVIDER_FILE: u32 = 2; -pub const WOF_PROVIDER_CLOUD: u32 = 3; -pub const WIM_PROVIDER_HASH_SIZE: u32 = 20; -pub const WIM_PROVIDER_CURRENT_VERSION: u32 = 1; -pub const WIM_PROVIDER_EXTERNAL_FLAG_NOT_ACTIVE: u32 = 1; -pub const WIM_PROVIDER_EXTERNAL_FLAG_SUSPENDED: u32 = 2; -pub const WIM_BOOT_OS_WIM: u32 = 1; -pub const WIM_BOOT_NOT_OS_WIM: u32 = 0; -pub const FILE_PROVIDER_CURRENT_VERSION: u32 = 1; -pub const FILE_PROVIDER_SINGLE_FILE: u32 = 1; -pub const FILE_PROVIDER_COMPRESSION_XPRESS4K: u32 = 0; -pub const FILE_PROVIDER_COMPRESSION_LZX: u32 = 1; -pub const FILE_PROVIDER_COMPRESSION_XPRESS8K: u32 = 2; -pub const FILE_PROVIDER_COMPRESSION_XPRESS16K: u32 = 3; -pub const FILE_PROVIDER_COMPRESSION_MAXIMUM: u32 = 4; -pub const FILE_PROVIDER_FLAG_COMPRESS_ON_WRITE: u32 = 1; -pub const CONTAINER_VOLUME_STATE_HOSTING_CONTAINER: u32 = 1; -pub const CONTAINER_ROOT_INFO_FLAG_SCRATCH_ROOT: u32 = 1; -pub const CONTAINER_ROOT_INFO_FLAG_LAYER_ROOT: u32 = 2; -pub const CONTAINER_ROOT_INFO_FLAG_VIRTUALIZATION_ROOT: u32 = 4; -pub const CONTAINER_ROOT_INFO_FLAG_VIRTUALIZATION_TARGET_ROOT: u32 = 8; -pub const CONTAINER_ROOT_INFO_FLAG_VIRTUALIZATION_EXCEPTION_ROOT: u32 = 16; -pub const CONTAINER_ROOT_INFO_FLAG_BIND_ROOT: u32 = 32; -pub const CONTAINER_ROOT_INFO_FLAG_BIND_TARGET_ROOT: u32 = 64; -pub const CONTAINER_ROOT_INFO_FLAG_BIND_EXCEPTION_ROOT: u32 = 128; -pub const CONTAINER_ROOT_INFO_FLAG_BIND_DO_NOT_MAP_NAME: u32 = 256; -pub const CONTAINER_ROOT_INFO_FLAG_UNION_LAYER_ROOT: u32 = 512; -pub const CONTAINER_ROOT_INFO_VALID_FLAGS: u32 = 1023; -pub const PROJFS_PROTOCOL_VERSION: u32 = 3; -pub const SYMLINK_FLAG_RELATIVE: u32 = 1; -pub const SYMLINK_DIRECTORY: u32 = 2147483648; -pub const SYMLINK_FILE: u32 = 1073741824; -pub const SYMLINK_RESERVED_MASK: u32 = 4026531840; -pub const MAXIMUM_REPARSE_DATA_BUFFER_SIZE: u32 = 16384; -pub const IO_REPARSE_TAG_RESERVED_ZERO: u32 = 0; -pub const IO_REPARSE_TAG_RESERVED_ONE: u32 = 1; -pub const IO_REPARSE_TAG_RESERVED_TWO: u32 = 2; -pub const IO_REPARSE_TAG_RESERVED_RANGE: u32 = 2; -pub const IO_REPARSE_TAG_VALID_VALUES: u32 = 4026597375; -pub const IO_REPARSE_TAG_RESERVED_INVALID: u32 = 3221258240; -pub const IO_REPARSE_TAG_MOUNT_POINT: u32 = 2684354563; -pub const IO_REPARSE_TAG_HSM: u32 = 3221225476; -pub const IO_REPARSE_TAG_DRIVE_EXTENDER: u32 = 2147483653; -pub const IO_REPARSE_TAG_HSM2: u32 = 2147483654; -pub const IO_REPARSE_TAG_SIS: u32 = 2147483655; -pub const IO_REPARSE_TAG_WIM: u32 = 2147483656; -pub const IO_REPARSE_TAG_CSV: u32 = 2147483657; -pub const IO_REPARSE_TAG_DFS: u32 = 2147483658; -pub const IO_REPARSE_TAG_FILTER_MANAGER: u32 = 2147483659; -pub const IO_REPARSE_TAG_SYMLINK: u32 = 2684354572; -pub const IO_REPARSE_TAG_IIS_CACHE: u32 = 2684354576; -pub const IO_REPARSE_TAG_DFSR: u32 = 2147483666; -pub const IO_REPARSE_TAG_DEDUP: u32 = 2147483667; -pub const IO_REPARSE_TAG_APPXSTRM: u32 = 3221225492; -pub const IO_REPARSE_TAG_NFS: u32 = 2147483668; -pub const IO_REPARSE_TAG_FILE_PLACEHOLDER: u32 = 2147483669; -pub const IO_REPARSE_TAG_DFM: u32 = 2147483670; -pub const IO_REPARSE_TAG_WOF: u32 = 2147483671; -pub const IO_REPARSE_TAG_WCI: u32 = 2147483672; -pub const IO_REPARSE_TAG_WCI_1: u32 = 2415923224; -pub const IO_REPARSE_TAG_GLOBAL_REPARSE: u32 = 2684354585; -pub const IO_REPARSE_TAG_CLOUD: u32 = 2415919130; -pub const IO_REPARSE_TAG_CLOUD_1: u32 = 2415923226; -pub const IO_REPARSE_TAG_CLOUD_2: u32 = 2415927322; -pub const IO_REPARSE_TAG_CLOUD_3: u32 = 2415931418; -pub const IO_REPARSE_TAG_CLOUD_4: u32 = 2415935514; -pub const IO_REPARSE_TAG_CLOUD_5: u32 = 2415939610; -pub const IO_REPARSE_TAG_CLOUD_6: u32 = 2415943706; -pub const IO_REPARSE_TAG_CLOUD_7: u32 = 2415947802; -pub const IO_REPARSE_TAG_CLOUD_8: u32 = 2415951898; -pub const IO_REPARSE_TAG_CLOUD_9: u32 = 2415955994; -pub const IO_REPARSE_TAG_CLOUD_A: u32 = 2415960090; -pub const IO_REPARSE_TAG_CLOUD_B: u32 = 2415964186; -pub const IO_REPARSE_TAG_CLOUD_C: u32 = 2415968282; -pub const IO_REPARSE_TAG_CLOUD_D: u32 = 2415972378; -pub const IO_REPARSE_TAG_CLOUD_E: u32 = 2415976474; -pub const IO_REPARSE_TAG_CLOUD_F: u32 = 2415980570; -pub const IO_REPARSE_TAG_CLOUD_MASK: u32 = 61440; -pub const IO_REPARSE_TAG_APPEXECLINK: u32 = 2147483675; -pub const IO_REPARSE_TAG_PROJFS: u32 = 2415919132; -pub const IO_REPARSE_TAG_LX_SYMLINK: u32 = 2684354589; -pub const IO_REPARSE_TAG_STORAGE_SYNC: u32 = 2147483678; -pub const IO_REPARSE_TAG_WCI_TOMBSTONE: u32 = 2684354591; -pub const IO_REPARSE_TAG_UNHANDLED: u32 = 2147483680; -pub const IO_REPARSE_TAG_ONEDRIVE: u32 = 2147483681; -pub const IO_REPARSE_TAG_PROJFS_TOMBSTONE: u32 = 2684354594; -pub const IO_REPARSE_TAG_AF_UNIX: u32 = 2147483683; -pub const IO_REPARSE_TAG_LX_FIFO: u32 = 2147483684; -pub const IO_REPARSE_TAG_LX_CHR: u32 = 2147483685; -pub const IO_REPARSE_TAG_LX_BLK: u32 = 2147483686; -pub const IO_REPARSE_TAG_WCI_LINK: u32 = 2684354599; -pub const IO_REPARSE_TAG_WCI_LINK_1: u32 = 2684358695; -pub const IO_REPARSE_TAG_DATALESS_CIM: u32 = 2684354600; -pub const IO_REPARSE_TAG_IFSTEST_CONGRUENT: u32 = 9; -pub const IO_REPARSE_TAG_MOONWALK_HSM: u32 = 10; -pub const IO_REPARSE_TAG_TSINGHUA_UNIVERSITY_RESEARCH: u32 = 11; -pub const IO_REPARSE_TAG_ARKIVIO: u32 = 12; -pub const IO_REPARSE_TAG_SOLUTIONSOFT: u32 = 536870925; -pub const IO_REPARSE_TAG_COMMVAULT: u32 = 14; -pub const IO_REPARSE_TAG_OVERTONE: u32 = 15; -pub const IO_REPARSE_TAG_SYMANTEC_HSM2: u32 = 16; -pub const IO_REPARSE_TAG_ENIGMA_HSM: u32 = 17; -pub const IO_REPARSE_TAG_SYMANTEC_HSM: u32 = 18; -pub const IO_REPARSE_TAG_INTERCOPE_HSM: u32 = 19; -pub const IO_REPARSE_TAG_KOM_NETWORKS_HSM: u32 = 20; -pub const IO_REPARSE_TAG_MEMORY_TECH_HSM: u32 = 21; -pub const IO_REPARSE_TAG_BRIDGEHEAD_HSM: u32 = 22; -pub const IO_REPARSE_TAG_OSR_SAMPLE: u32 = 536870935; -pub const IO_REPARSE_TAG_GLOBAL360_HSM: u32 = 24; -pub const IO_REPARSE_TAG_ALTIRIS_HSM: u32 = 25; -pub const IO_REPARSE_TAG_HERMES_HSM: u32 = 26; -pub const IO_REPARSE_TAG_POINTSOFT_HSM: u32 = 27; -pub const IO_REPARSE_TAG_GRAU_DATASTORAGE_HSM: u32 = 28; -pub const IO_REPARSE_TAG_COMMVAULT_HSM: u32 = 29; -pub const IO_REPARSE_TAG_DATASTOR_SIS: u32 = 30; -pub const IO_REPARSE_TAG_EDSI_HSM: u32 = 31; -pub const IO_REPARSE_TAG_HP_HSM: u32 = 32; -pub const IO_REPARSE_TAG_SER_HSM: u32 = 33; -pub const IO_REPARSE_TAG_DOUBLE_TAKE_HSM: u32 = 34; -pub const IO_REPARSE_TAG_WISDATA_HSM: u32 = 35; -pub const IO_REPARSE_TAG_MIMOSA_HSM: u32 = 36; -pub const IO_REPARSE_TAG_HSAG_HSM: u32 = 37; -pub const IO_REPARSE_TAG_ADA_HSM: u32 = 38; -pub const IO_REPARSE_TAG_AUTN_HSM: u32 = 39; -pub const IO_REPARSE_TAG_NEXSAN_HSM: u32 = 40; -pub const IO_REPARSE_TAG_DOUBLE_TAKE_SIS: u32 = 41; -pub const IO_REPARSE_TAG_SONY_HSM: u32 = 42; -pub const IO_REPARSE_TAG_ELTAN_HSM: u32 = 43; -pub const IO_REPARSE_TAG_UTIXO_HSM: u32 = 44; -pub const IO_REPARSE_TAG_QUEST_HSM: u32 = 45; -pub const IO_REPARSE_TAG_DATAGLOBAL_HSM: u32 = 46; -pub const IO_REPARSE_TAG_QI_TECH_HSM: u32 = 536870959; -pub const IO_REPARSE_TAG_DATAFIRST_HSM: u32 = 48; -pub const IO_REPARSE_TAG_C2CSYSTEMS_HSM: u32 = 49; -pub const IO_REPARSE_TAG_WATERFORD: u32 = 50; -pub const IO_REPARSE_TAG_RIVERBED_HSM: u32 = 51; -pub const IO_REPARSE_TAG_CARINGO_HSM: u32 = 52; -pub const IO_REPARSE_TAG_MAXISCALE_HSM: u32 = 536870965; -pub const IO_REPARSE_TAG_CITRIX_PM: u32 = 54; -pub const IO_REPARSE_TAG_OPENAFS_DFS: u32 = 55; -pub const IO_REPARSE_TAG_ZLTI_HSM: u32 = 56; -pub const IO_REPARSE_TAG_EMC_HSM: u32 = 57; -pub const IO_REPARSE_TAG_VMWARE_PM: u32 = 58; -pub const IO_REPARSE_TAG_ARCO_BACKUP: u32 = 59; -pub const IO_REPARSE_TAG_CARROLL_HSM: u32 = 60; -pub const IO_REPARSE_TAG_COMTRADE_HSM: u32 = 61; -pub const IO_REPARSE_TAG_EASEVAULT_HSM: u32 = 62; -pub const IO_REPARSE_TAG_HDS_HSM: u32 = 63; -pub const IO_REPARSE_TAG_MAGINATICS_RDR: u32 = 64; -pub const IO_REPARSE_TAG_GOOGLE_HSM: u32 = 65; -pub const IO_REPARSE_TAG_QUADDRA_HSM: u32 = 66; -pub const IO_REPARSE_TAG_HP_BACKUP: u32 = 67; -pub const IO_REPARSE_TAG_DROPBOX_HSM: u32 = 68; -pub const IO_REPARSE_TAG_ADOBE_HSM: u32 = 69; -pub const IO_REPARSE_TAG_HP_DATA_PROTECT: u32 = 70; -pub const IO_REPARSE_TAG_ACTIVISION_HSM: u32 = 71; -pub const IO_REPARSE_TAG_HDS_HCP_HSM: u32 = 72; -pub const IO_REPARSE_TAG_AURISTOR_FS: u32 = 73; -pub const IO_REPARSE_TAG_ITSTATION: u32 = 74; -pub const IO_REPARSE_TAG_SPHARSOFT: u32 = 75; -pub const IO_REPARSE_TAG_ALERTBOOT: u32 = 536870988; -pub const IO_REPARSE_TAG_MTALOS: u32 = 77; -pub const IO_REPARSE_TAG_CTERA_HSM: u32 = 78; -pub const IO_REPARSE_TAG_NIPPON_HSM: u32 = 79; -pub const IO_REPARSE_TAG_REDSTOR_HSM: u32 = 80; -pub const IO_REPARSE_TAG_NEUSHIELD: u32 = 81; -pub const IO_REPARSE_TAG_DOR_HSM: u32 = 82; -pub const IO_REPARSE_TAG_SHX_BACKUP: u32 = 83; -pub const IO_REPARSE_TAG_NVIDIA_UNIONFS: u32 = 536870996; -pub const IO_REPARSE_TAG_HUBSTOR_HSM: u32 = 85; -pub const IO_REPARSE_TAG_IMANAGE_HSM: u32 = 536870998; -pub const IO_REPARSE_TAG_EASEFILTER_HSM: u32 = 87; -pub const IO_REPARSE_TAG_ACRONIS_HSM_0: u32 = 96; -pub const IO_REPARSE_TAG_ACRONIS_HSM_1: u32 = 97; -pub const IO_REPARSE_TAG_ACRONIS_HSM_2: u32 = 98; -pub const IO_REPARSE_TAG_ACRONIS_HSM_3: u32 = 99; -pub const IO_REPARSE_TAG_ACRONIS_HSM_4: u32 = 100; -pub const IO_REPARSE_TAG_ACRONIS_HSM_5: u32 = 101; -pub const IO_REPARSE_TAG_ACRONIS_HSM_6: u32 = 102; -pub const IO_REPARSE_TAG_ACRONIS_HSM_7: u32 = 103; -pub const IO_REPARSE_TAG_ACRONIS_HSM_8: u32 = 104; -pub const IO_REPARSE_TAG_ACRONIS_HSM_9: u32 = 105; -pub const IO_REPARSE_TAG_ACRONIS_HSM_A: u32 = 106; -pub const IO_REPARSE_TAG_ACRONIS_HSM_B: u32 = 107; -pub const IO_REPARSE_TAG_ACRONIS_HSM_C: u32 = 108; -pub const IO_REPARSE_TAG_ACRONIS_HSM_D: u32 = 109; -pub const IO_REPARSE_TAG_ACRONIS_HSM_E: u32 = 110; -pub const IO_REPARSE_TAG_ACRONIS_HSM_F: u32 = 111; -pub const REPARSE_DATA_EX_FLAG_GIVEN_TAG_OR_NONE: u32 = 1; -pub const SUPPORTED_FS_FEATURES_OFFLOAD_READ: u32 = 1; -pub const SUPPORTED_FS_FEATURES_OFFLOAD_WRITE: u32 = 2; -pub const SUPPORTED_FS_FEATURES_QUERY_OPEN: u32 = 4; -pub const SUPPORTED_FS_FEATURES_BYPASS_IO: u32 = 8; -pub const SUPPORTED_FS_FEATURES_VALID_MASK: u32 = 15; -pub const SCRUB_DATA_INPUT_FLAG_RESUME: u32 = 1; -pub const SCRUB_DATA_INPUT_FLAG_SKIP_IN_SYNC: u32 = 2; -pub const SCRUB_DATA_INPUT_FLAG_SKIP_NON_INTEGRITY_DATA: u32 = 4; -pub const SCRUB_DATA_INPUT_FLAG_IGNORE_REDUNDANCY: u32 = 8; -pub const SCRUB_DATA_INPUT_FLAG_SKIP_DATA: u32 = 16; -pub const SCRUB_DATA_INPUT_FLAG_SCRUB_BY_OBJECT_ID: u32 = 32; -pub const SCRUB_DATA_INPUT_FLAG_OPLOCK_NOT_ACQUIRED: u32 = 64; -pub const SCRUB_DATA_OUTPUT_FLAG_INCOMPLETE: u32 = 1; -pub const SCRUB_DATA_OUTPUT_FLAG_NON_USER_DATA_RANGE: u32 = 65536; -pub const SCRUB_DATA_OUTPUT_FLAG_PARITY_EXTENT_DATA_RETURNED: u32 = 131072; -pub const SCRUB_DATA_OUTPUT_FLAG_RESUME_CONTEXT_LENGTH_SPECIFIED: u32 = 262144; -pub const SHUFFLE_FILE_FLAG_SKIP_INITIALIZING_NEW_CLUSTERS: u32 = 1; -pub const FILE_PIPE_READ_DATA: u32 = 0; -pub const FILE_PIPE_WRITE_SPACE: u32 = 1; -pub const FILE_PIPE_COMPUTER_NAME_LENGTH: u32 = 15; -pub const FILE_PIPE_SYMLINK_FLAG_GLOBAL: u32 = 1; -pub const FILE_PIPE_SYMLINK_FLAG_RELATIVE: u32 = 2; -pub const FILE_PIPE_SYMLINK_VALID_FLAGS: u32 = 3; -pub const QUERY_DIRECT_ACCESS_IMAGE_EXTENTS: u32 = 1; -pub const QUERY_DIRECT_ACCESS_DATA_EXTENTS: u32 = 2; -pub const REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER_VERSION: u32 = 1; -pub const REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER_VERSION: u32 = 1; -pub const REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER_VERSION: u32 = 1; -pub const REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER_VERSION: u32 = 1; -pub const REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER_VERSION: u32 = 1; -pub const REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER_VERSION: u32 = 1; -pub const REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER_VERSION: u32 = 1; -pub const REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER_VERSION: u32 = 1; -pub const IO_QOS_MAX_RESERVATION: u32 = 1000000000; -#[allow(unsafe_code)] -pub const SMB_CCF_APP_INSTANCE_EA_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"ClusteredApplicationInstance\0") -}; -pub const NETWORK_APP_INSTANCE_CSV_FLAGS_VALID_ONLY_IF_CSV_COORDINATOR: u32 = 1; -#[allow(unsafe_code)] -pub const LX_FILE_METADATA_UID_EA_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"$LXUID\0") -}; -#[allow(unsafe_code)] -pub const LX_FILE_METADATA_GID_EA_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"$LXGID\0") -}; -#[allow(unsafe_code)] -pub const LX_FILE_METADATA_MODE_EA_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"$LXMOD\0") -}; -#[allow(unsafe_code)] -pub const LX_FILE_METADATA_DEVICE_ID_EA_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"$LXDEV\0") -}; -pub const VALID_COPY_FILE_CHUNK_FLAGS: u32 = 0; -pub const SYSTEM_PAGE_PRIORITY_BITS: u32 = 3; -pub const SYSTEM_PAGE_PRIORITY_LEVELS: u32 = 8; -pub const TOKEN_HAS_TRAVERSE_PRIVILEGE: u32 = 1; -pub const TOKEN_HAS_BACKUP_PRIVILEGE: u32 = 2; -pub const TOKEN_HAS_RESTORE_PRIVILEGE: u32 = 4; -pub const TOKEN_WRITE_RESTRICTED: u32 = 8; -pub const TOKEN_IS_RESTRICTED: u32 = 16; -pub const TOKEN_SESSION_NOT_REFERENCED: u32 = 32; -pub const TOKEN_SANDBOX_INERT: u32 = 64; -pub const TOKEN_HAS_IMPERSONATE_PRIVILEGE: u32 = 128; -pub const SE_BACKUP_PRIVILEGES_CHECKED: u32 = 256; -pub const TOKEN_VIRTUALIZE_ALLOWED: u32 = 512; -pub const TOKEN_VIRTUALIZE_ENABLED: u32 = 1024; -pub const TOKEN_IS_FILTERED: u32 = 2048; -pub const TOKEN_UIACCESS: u32 = 4096; -pub const TOKEN_NOT_LOW: u32 = 8192; -pub const TOKEN_LOWBOX: u32 = 16384; -pub const TOKEN_HAS_OWN_CLAIM_ATTRIBUTES: u32 = 32768; -pub const TOKEN_PRIVATE_NAMESPACE: u32 = 65536; -pub const TOKEN_DO_NOT_USE_GLOBAL_ATTRIBS_FOR_QUERY: u32 = 131072; -pub const SPECIAL_ENCRYPTED_OPEN: u32 = 262144; -pub const TOKEN_NO_CHILD_PROCESS: u32 = 524288; -pub const TOKEN_NO_CHILD_PROCESS_UNLESS_SECURE: u32 = 1048576; -pub const TOKEN_AUDIT_NO_CHILD_PROCESS: u32 = 2097152; -pub const TOKEN_ENFORCE_REDIRECTION_TRUST: u32 = 4194304; -pub const TOKEN_AUDIT_REDIRECTION_TRUST: u32 = 8388608; -pub const TOKEN_LEARNING_MODE_LOGGING: u32 = 16777216; -pub const TOKEN_PERMISSIVE_LEARNING_MODE: u32 = 50331648; -pub const TOKEN_INHERIT_SECURITY_FLAGS: u32 = 3670016; -pub const SECURITY_DESCRIPTOR_DO_NOT_FREE: u32 = 67108864; -pub const IO_OPEN_PAGING_FILE: u32 = 2; -pub const IO_OPEN_TARGET_DIRECTORY: u32 = 4; -pub const IO_STOP_ON_SYMLINK: u32 = 8; -pub const IO_MM_PAGING_FILE: u32 = 16; -pub const IO_IGNORE_READONLY_ATTRIBUTE: u32 = 64; -pub const FS_FILTER_SECTION_SYNC_IN_FLAG_DONT_UPDATE_LAST_ACCESS: u32 = 1; -pub const FS_FILTER_SECTION_SYNC_IN_FLAG_DONT_UPDATE_LAST_WRITE: u32 = 2; -pub const FS_FILTER_SECTION_SYNC_SUPPORTS_ASYNC_PARALLEL_IO: u32 = 1; -pub const FS_FILTER_SECTION_SYNC_SUPPORTS_DIRECT_MAP_DATA: u32 = 2; -pub const FS_FILTER_SECTION_SYNC_SUPPORTS_DIRECT_MAP_IMAGE: u32 = 4; -pub const FS_FILTER_SECTION_SYNC_IMAGE_EXTENTS_ARE_NOT_RVA: u32 = 8; -pub const DO_SUPPORTS_PERSISTENT_ACLS: u32 = 131072; -pub const IO_FILE_OBJECT_NON_PAGED_POOL_CHARGE: u32 = 64; -pub const IO_FILE_OBJECT_PAGED_POOL_CHARGE: u32 = 1024; -pub const IO_CREATE_STREAM_FILE_RAISE_ON_ERROR: u32 = 1; -pub const IO_CREATE_STREAM_FILE_LITE: u32 = 2; -pub const EFS_TRACKED_OFFSET_HEADER_FLAG: u32 = 1; -pub const SPACES_TRACKED_OFFSET_HEADER_FLAG: u32 = 2; -pub const MM_FORCE_CLOSED_DATA: u32 = 1; -pub const MM_FORCE_CLOSED_IMAGE: u32 = 2; -pub const MM_FORCE_CLOSED_LATER_OK: u32 = 4; -pub const MM_IS_FILE_SECTION_ACTIVE_IMAGE: u32 = 1; -pub const MM_IS_FILE_SECTION_ACTIVE_DATA: u32 = 2; -pub const MM_IS_FILE_SECTION_ACTIVE_USER: u32 = 4; -pub const MM_PREFETCH_FLAGS_MASK: u32 = 127; -pub const DEVICE_RESET_RESERVED_0: u32 = 1; -pub const DEVICE_RESET_RESERVED_1: u32 = 2; -pub const DEVICE_RESET_KEEP_STACK: u32 = 4; -pub const FSRTL_FCB_HEADER_V0: u32 = 0; -pub const FSRTL_FCB_HEADER_V1: u32 = 1; -pub const FSRTL_FCB_HEADER_V2: u32 = 2; -pub const FSRTL_FCB_HEADER_V3: u32 = 3; -pub const FSRTL_FCB_HEADER_V4: u32 = 4; -pub const FSRTL_FLAG_FILE_MODIFIED: u32 = 1; -pub const FSRTL_FLAG_FILE_LENGTH_CHANGED: u32 = 2; -pub const FSRTL_FLAG_LIMIT_MODIFIED_PAGES: u32 = 4; -pub const FSRTL_FLAG_ACQUIRE_MAIN_RSRC_EX: u32 = 8; -pub const FSRTL_FLAG_ACQUIRE_MAIN_RSRC_SH: u32 = 16; -pub const FSRTL_FLAG_USER_MAPPED_FILE: u32 = 32; -pub const FSRTL_FLAG_ADVANCED_HEADER: u32 = 64; -pub const FSRTL_FLAG_EOF_ADVANCE_ACTIVE: u32 = 128; -pub const FSRTL_FLAG2_DO_MODIFIED_WRITE: u32 = 1; -pub const FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS: u32 = 2; -pub const FSRTL_FLAG2_PURGE_WHEN_MAPPED: u32 = 4; -pub const FSRTL_FLAG2_IS_PAGING_FILE: u32 = 8; -pub const FSRTL_FLAG2_WRITABLE_USER_MAPPED_FILE: u32 = 16; -pub const FSRTL_FLAG2_BYPASSIO_STREAM_PAUSED: u32 = 32; -pub const FSRTL_AUXILIARY_FLAG_DEALLOCATE: u32 = 1; -pub const FSRTL_ADD_TC_CASE_SENSITIVE: u32 = 1; -pub const FSRTL_ADD_TC_KEY_BY_SHORT_NAME: u32 = 2; -pub const FSRTL_FIND_TC_CASE_SENSITIVE: u32 = 1; -pub const FSRTL_FAT_LEGAL: u32 = 1; -pub const FSRTL_HPFS_LEGAL: u32 = 2; -pub const FSRTL_NTFS_LEGAL: u32 = 4; -pub const FSRTL_WILD_CHARACTER: u32 = 8; -pub const FSRTL_OLE_LEGAL: u32 = 16; -pub const FSRTL_NTFS_STREAM_LEGAL: u32 = 20; -pub const MCB_FLAG_RAISE_ON_ALLOCATION_FAILURE: u32 = 1; -pub const OPLOCK_FLAG_COMPLETE_IF_OPLOCKED: u32 = 1; -pub const OPLOCK_FLAG_OPLOCK_KEY_CHECK_ONLY: u32 = 2; -pub const OPLOCK_FLAG_BACK_OUT_ATOMIC_OPLOCK: u32 = 4; -pub const OPLOCK_FLAG_IGNORE_OPLOCK_KEYS: u32 = 8; -pub const OPLOCK_FLAG_PARENT_OBJECT: u32 = 16; -pub const OPLOCK_FLAG_CLOSING_DELETE_ON_CLOSE: u32 = 32; -pub const OPLOCK_FLAG_REMOVING_FILE_OR_LINK: u32 = 64; -pub const OPLOCK_FLAG_BREAKING_FOR_SHARING_VIOLATION: u32 = 128; -pub const OPLOCK_UPPER_FLAG_CHECK_NO_BREAK: u32 = 65536; -pub const OPLOCK_UPPER_FLAG_NOTIFY_REFRESH_READ: u32 = 131072; -pub const OPLOCK_FSCTRL_FLAG_ALL_KEYS_MATCH: u32 = 1; -pub const FSRTL_VOLUME_DISMOUNT: u32 = 1; -pub const FSRTL_VOLUME_DISMOUNT_FAILED: u32 = 2; -pub const FSRTL_VOLUME_LOCK: u32 = 3; -pub const FSRTL_VOLUME_LOCK_FAILED: u32 = 4; -pub const FSRTL_VOLUME_UNLOCK: u32 = 5; -pub const FSRTL_VOLUME_MOUNT: u32 = 6; -pub const FSRTL_VOLUME_NEEDS_CHKDSK: u32 = 7; -pub const FSRTL_VOLUME_WORM_NEAR_FULL: u32 = 8; -pub const FSRTL_VOLUME_WEARING_OUT: u32 = 9; -pub const FSRTL_VOLUME_FORCED_CLOSED: u32 = 10; -pub const FSRTL_VOLUME_INFO_MAKE_COMPAT: u32 = 11; -pub const FSRTL_VOLUME_PREPARING_EJECT: u32 = 12; -pub const FSRTL_VOLUME_CHANGE_SIZE: u32 = 13; -pub const FSRTL_VOLUME_BACKGROUND_FORMAT: u32 = 14; -pub const FSRTL_UNC_PROVIDER_FLAGS_MAILSLOTS_SUPPORTED: u32 = 1; -pub const FSRTL_UNC_PROVIDER_FLAGS_CSC_ENABLED: u32 = 2; -pub const FSRTL_UNC_PROVIDER_FLAGS_DOMAIN_SVC_AWARE: u32 = 4; -pub const FSRTL_UNC_PROVIDER_FLAGS_CONTAINER_AWARE: u32 = 8; -pub const FSRTL_UNC_REGISTRATION_VERSION_0200: u32 = 512; -pub const FSRTL_UNC_REGISTRATION_VERSION_0201: u32 = 513; -pub const FSRTL_UNC_REGISTRATION_CURRENT_VERSION: u32 = 513; -pub const FSRTL_UNC_HARDENING_CAPABILITIES_MUTUAL_AUTH: u32 = 1; -pub const FSRTL_UNC_HARDENING_CAPABILITIES_INTEGRITY: u32 = 2; -pub const FSRTL_UNC_HARDENING_CAPABILITIES_PRIVACY: u32 = 4; -pub const FSRTL_ALLOCATE_ECPLIST_FLAG_CHARGE_QUOTA: u32 = 1; -pub const FSRTL_ALLOCATE_ECP_FLAG_CHARGE_QUOTA: u32 = 1; -pub const FSRTL_ALLOCATE_ECP_FLAG_NONPAGED_POOL: u32 = 2; -pub const FSRTL_ECP_LOOKASIDE_FLAG_NONPAGED_POOL: u32 = 2; -pub const NETWORK_OPEN_ECP_IN_FLAG_DISABLE_HANDLE_COLLAPSING: u32 = 1; -pub const NETWORK_OPEN_ECP_IN_FLAG_DISABLE_HANDLE_DURABILITY: u32 = 2; -pub const NETWORK_OPEN_ECP_IN_FLAG_FORCE_MAX_EOF_HACK: u32 = 1073741824; -pub const NETWORK_OPEN_ECP_IN_FLAG_FORCE_BUFFERED_SYNCHRONOUS_IO_HACK: u32 = 2147483648; -pub const NETWORK_OPEN_ECP_IN_FLAG_DISABLE_OPLOCKS: u32 = 4; -pub const NETWORK_OPEN_ECP_IN_FLAG_REQ_MUTUAL_AUTH: u32 = 8; -pub const NETWORK_OPEN_ECP_OUT_FLAG_RET_MUTUAL_AUTH: u32 = 8; -pub const SRV_OPEN_ECP_CONTEXT_VERSION_2: u32 = 2; -pub const CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT_FLAGS_VALID_ONLY_IF_CSV_COORDINATOR: u32 = 1; -pub const OPEN_REPARSE_POINT_TAG_ENCOUNTERED: u32 = 1; -pub const OPEN_REPARSE_POINT_REPARSE_IF_CHILD_EXISTS: u32 = 2; -pub const OPEN_REPARSE_POINT_REPARSE_IF_CHILD_NOT_EXISTS: u32 = 4; -pub const OPEN_REPARSE_POINT_REPARSE_IF_DIRECTORY_FINAL_COMPONENT: u32 = 8; -pub const OPEN_REPARSE_POINT_REPARSE_IF_NON_DIRECTORY_NON_FINAL_COMPONENT: u32 = 16; -pub const OPEN_REPARSE_POINT_REPARSE_IF_NON_DIRECTORY_FINAL_COMPONENT: u32 = 32; -pub const OPEN_REPARSE_POINT_OVERRIDE_CREATE_OPTION: u32 = 64; -pub const OPEN_REPARSE_POINT_RETURN_REPARSE_DATA_BUFFER: u32 = 128; -pub const OPEN_REPARSE_POINT_VERSION_EX: u32 = 2147483648; -pub const OPEN_REPARSE_POINT_REPARSE_IF_NON_FINAL_COMPONENT: u32 = 22; -pub const OPEN_REPARSE_POINT_REPARSE_IF_DIRECTORY_FINAL_COMPONENT_ALWAYS: u32 = 72; -pub const OPEN_REPARSE_POINT_REPARSE_IF_NON_DIRECTORY_NON_FINAL_COMPONENT_ALWAYS: u32 = 80; -pub const OPEN_REPARSE_POINT_REPARSE_IF_NON_DIRECTORY_FINAL_COMPONENT_ALWAYS: u32 = 96; -pub const OPEN_REPARSE_POINT_REPARSE_IF_FINAL_COMPONENT: u32 = 40; -pub const OPEN_REPARSE_POINT_REPARSE_IF_FINAL_COMPONENT_ALWAYS: u32 = 104; -pub const OPEN_REPARSE_POINT_REPARSE_ALWAYS: u32 = 126; -pub const CREATE_REDIRECTION_FLAGS_SERVICED_FROM_LAYER: u32 = 1; -pub const CREATE_REDIRECTION_FLAGS_SERVICED_FROM_SCRATCH: u32 = 2; -pub const CREATE_REDIRECTION_FLAGS_SERVICED_FROM_REGISTERED_LAYER: u32 = 4; -pub const CREATE_REDIRECTION_FLAGS_SERVICED_FROM_REMOTE_LAYER: u32 = 8; -pub const CREATE_REDIRECTION_FLAGS_SERVICED_FROM_USER_MODE: u32 = 16; -pub const WCIFS_REDIRECTION_FLAGS_CREATE_SERVICED_FROM_LAYER: u32 = 1; -pub const WCIFS_REDIRECTION_FLAGS_CREATE_SERVICED_FROM_SCRATCH: u32 = 2; -pub const WCIFS_REDIRECTION_FLAGS_CREATE_SERVICED_FROM_REGISTERED_LAYER: u32 = 4; -pub const WCIFS_REDIRECTION_FLAGS_CREATE_SERVICED_FROM_REMOTE_LAYER: u32 = 8; -pub const ATOMIC_CREATE_ECP_IN_FLAG_SPARSE_SPECIFIED: u32 = 1; -pub const ATOMIC_CREATE_ECP_IN_FLAG_REPARSE_POINT_SPECIFIED: u32 = 2; -pub const ATOMIC_CREATE_ECP_IN_FLAG_EOF_SPECIFIED: u32 = 4; -pub const ATOMIC_CREATE_ECP_IN_FLAG_VDL_SPECIFIED: u32 = 8; -pub const ATOMIC_CREATE_ECP_IN_FLAG_TIMESTAMPS_SPECIFIED: u32 = 16; -pub const ATOMIC_CREATE_ECP_IN_FLAG_FILE_ATTRIBUTES_SPECIFIED: u32 = 32; -pub const ATOMIC_CREATE_ECP_IN_FLAG_SUPPRESS_FILE_ATTRIBUTE_INHERITANCE: u32 = 64; -pub const ATOMIC_CREATE_ECP_IN_FLAG_OP_FLAGS_SPECIFIED: u32 = 128; -pub const ATOMIC_CREATE_ECP_IN_FLAG_OPERATION_MASK: u32 = 255; -pub const ATOMIC_CREATE_ECP_IN_FLAG_BEST_EFFORT: u32 = 256; -pub const ATOMIC_CREATE_ECP_IN_FLAG_SUPPRESS_PARENT_TIMESTAMPS_UPDATE: u32 = 512; -pub const ATOMIC_CREATE_ECP_IN_FLAG_SUPPRESS_DIR_CHANGE_NOTIFY: u32 = 1024; -pub const ATOMIC_CREATE_ECP_IN_FLAG_MARK_USN_SOURCE_INFO: u32 = 2048; -pub const ATOMIC_CREATE_ECP_IN_FLAG_WRITE_USN_CLOSE_RECORD: u32 = 4096; -pub const ATOMIC_CREATE_ECP_IN_FLAG_GEN_FLAGS_SPECIFIED: u32 = 32768; -pub const ATOMIC_CREATE_ECP_IN_OP_FLAG_CASE_SENSITIVE_FLAGS_SPECIFIED: u32 = 1; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_SPARSE_SET: u32 = 1; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_REPARSE_POINT_SET: u32 = 2; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_EOF_SET: u32 = 4; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_VDL_SET: u32 = 8; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_TIMESTAMPS_SET: u32 = 16; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_FILE_ATTRIBUTES_SET: u32 = 32; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_FILE_ATTRIBUTE_INHERITANCE_SUPPRESSED: u32 = 64; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_OP_FLAGS_HONORED: u32 = 128; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_OPERATION_MASK: u32 = 255; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_TIMESTAMPS_RETURNED: u32 = 256; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_FILE_ATTRIBUTES_RETURNED: u32 = 512; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_USN_SOURCE_INFO_MARKED: u32 = 1024; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_USN_CLOSE_RECORD_WRITTEN: u32 = 2048; -pub const ATOMIC_CREATE_ECP_OUT_FLAG_USN_RETURNED: u32 = 4096; -pub const ATOMIC_CREATE_ECP_OUT_OP_FLAG_CASE_SENSITIVE_FLAGS_SET: u32 = 1; -pub const ECP_OPEN_PARAMETERS_FLAG_OPEN_FOR_READ: u32 = 1; -pub const ECP_OPEN_PARAMETERS_FLAG_OPEN_FOR_WRITE: u32 = 2; -pub const ECP_OPEN_PARAMETERS_FLAG_OPEN_FOR_DELETE: u32 = 4; -pub const ECP_OPEN_PARAMETERS_FLAG_IGNORE_DIR_CASE_SENSITIVITY: u32 = 8; -pub const ECP_OPEN_PARAMETERS_FLAG_FAIL_ON_CASE_SENSITIVE_DIR: u32 = 16; -pub const OPLOCK_FS_FILTER_FLAGS_MASK: u32 = 8; -pub const QoCFileStatInformation: u32 = 1; -pub const QoCFileLxInformation: u32 = 2; -pub const QoCFileEaInformation: u32 = 4; -pub const FSRTL_CC_FLUSH_ERROR_FLAG_NO_HARD_ERROR: u32 = 1; -pub const FSRTL_CC_FLUSH_ERROR_FLAG_NO_LOG_ENTRY: u32 = 2; -pub const FSRTL_VIRTDISK_FULLY_ALLOCATED: u32 = 1; -pub const FSRTL_VIRTDISK_NO_DRIVE_LETTER: u32 = 2; -pub const FSRTL_DRIVER_BACKING_FLAG_USE_PAGE_FILE: u32 = 1; -pub const VACB_MAPPING_GRANULARITY: u32 = 262144; -pub const VACB_OFFSET_SHIFT: u32 = 18; -pub const CACHE_MANAGER_CALLBACKS_EX_V1: u32 = 1; -pub const CC_ACQUIRE_DONT_WAIT: u32 = 1; -pub const CC_ACQUIRE_SUPPORTS_ASYNC_LAZYWRITE: u32 = 1; -pub const UNINITIALIZE_CACHE_MAPS: u32 = 1; -pub const DO_NOT_RETRY_PURGE: u32 = 2; -pub const DO_NOT_PURGE_DIRTY_PAGES: u32 = 4; -pub const PURGE_WITH_ACTIVE_VIEWS: u32 = 8; -pub const CC_FLUSH_AND_PURGE_NO_PURGE: u32 = 1; -pub const CC_FLUSH_AND_PURGE_GATHER_DIRTY_BITS: u32 = 2; -pub const CC_FLUSH_AND_PURGE_WRITEABLE_VIEWS_NOTSEEN: u32 = 4; -pub const PIN_WAIT: u32 = 1; -pub const PIN_EXCLUSIVE: u32 = 2; -pub const PIN_NO_READ: u32 = 4; -pub const PIN_IF_BCB: u32 = 8; -pub const PIN_CALLER_TRACKS_DIRTY_DATA: u32 = 32; -pub const PIN_HIGH_PRIORITY: u32 = 64; -pub const PIN_VERIFY_REQUIRED: u32 = 128; -pub const MAP_WAIT: u32 = 1; -pub const MAP_NO_READ: u32 = 16; -pub const MAP_HIGH_PRIORITY: u32 = 64; -pub const MAP_DISABLE_PAGEFAULT_CLUSTERING: u32 = 256; -pub const CACHE_USE_DIRECT_ACCESS_MAPPING: u32 = 1; -pub const CACHE_VALID_FLAGS: u32 = 1; -pub const CC_AGGRESSIVE_UNMAP_BEHIND: u32 = 1; -pub const CC_DISABLE_READ_AHEAD: u32 = 2; -pub const CC_DISABLE_WRITE_BEHIND: u32 = 4; -pub const CC_DISABLE_DIRTY_PAGE_TRACKING: u32 = 8; -pub const CC_ENABLE_DISK_IO_ACCOUNTING: u32 = 16; -pub const CC_DISABLE_UNMAP_BEHIND: u32 = 32; -pub const CC_ENABLE_CPU_CACHE: u32 = 268435456; -pub const ISSP_LEVEL: u32 = 32; -pub const ISSP_MODE: u32 = 0; -pub const SECPKG_FLAG_INTEGRITY: u32 = 1; -pub const SECPKG_FLAG_PRIVACY: u32 = 2; -pub const SECPKG_FLAG_TOKEN_ONLY: u32 = 4; -pub const SECPKG_FLAG_DATAGRAM: u32 = 8; -pub const SECPKG_FLAG_CONNECTION: u32 = 16; -pub const SECPKG_FLAG_MULTI_REQUIRED: u32 = 32; -pub const SECPKG_FLAG_CLIENT_ONLY: u32 = 64; -pub const SECPKG_FLAG_EXTENDED_ERROR: u32 = 128; -pub const SECPKG_FLAG_IMPERSONATION: u32 = 256; -pub const SECPKG_FLAG_ACCEPT_WIN32_NAME: u32 = 512; -pub const SECPKG_FLAG_STREAM: u32 = 1024; -pub const SECPKG_FLAG_NEGOTIABLE: u32 = 2048; -pub const SECPKG_FLAG_GSS_COMPATIBLE: u32 = 4096; -pub const SECPKG_FLAG_LOGON: u32 = 8192; -pub const SECPKG_FLAG_ASCII_BUFFERS: u32 = 16384; -pub const SECPKG_FLAG_FRAGMENT: u32 = 32768; -pub const SECPKG_FLAG_MUTUAL_AUTH: u32 = 65536; -pub const SECPKG_FLAG_DELEGATION: u32 = 131072; -pub const SECPKG_FLAG_READONLY_WITH_CHECKSUM: u32 = 262144; -pub const SECPKG_FLAG_RESTRICTED_TOKENS: u32 = 524288; -pub const SECPKG_FLAG_NEGO_EXTENDER: u32 = 1048576; -pub const SECPKG_FLAG_NEGOTIABLE2: u32 = 2097152; -pub const SECPKG_FLAG_APPCONTAINER_PASSTHROUGH: u32 = 4194304; -pub const SECPKG_FLAG_APPCONTAINER_CHECKS: u32 = 8388608; -pub const SECPKG_FLAG_CREDENTIAL_ISOLATION_ENABLED: u32 = 16777216; -pub const SECPKG_FLAG_APPLY_LOOPBACK: u32 = 33554432; -pub const SECPKG_ID_NONE: u32 = 65535; -pub const SECPKG_CALLFLAGS_APPCONTAINER: u32 = 1; -pub const SECPKG_CALLFLAGS_APPCONTAINER_AUTHCAPABLE: u32 = 2; -pub const SECPKG_CALLFLAGS_FORCE_SUPPLIED: u32 = 4; -pub const SECPKG_CALLFLAGS_APPCONTAINER_UPNCAPABLE: u32 = 8; -pub const SECBUFFER_VERSION: u32 = 0; -pub const SECBUFFER_EMPTY: u32 = 0; -pub const SECBUFFER_DATA: u32 = 1; -pub const SECBUFFER_TOKEN: u32 = 2; -pub const SECBUFFER_PKG_PARAMS: u32 = 3; -pub const SECBUFFER_MISSING: u32 = 4; -pub const SECBUFFER_EXTRA: u32 = 5; -pub const SECBUFFER_STREAM_TRAILER: u32 = 6; -pub const SECBUFFER_STREAM_HEADER: u32 = 7; -pub const SECBUFFER_NEGOTIATION_INFO: u32 = 8; -pub const SECBUFFER_PADDING: u32 = 9; -pub const SECBUFFER_STREAM: u32 = 10; -pub const SECBUFFER_MECHLIST: u32 = 11; -pub const SECBUFFER_MECHLIST_SIGNATURE: u32 = 12; -pub const SECBUFFER_TARGET: u32 = 13; -pub const SECBUFFER_CHANNEL_BINDINGS: u32 = 14; -pub const SECBUFFER_CHANGE_PASS_RESPONSE: u32 = 15; -pub const SECBUFFER_TARGET_HOST: u32 = 16; -pub const SECBUFFER_ALERT: u32 = 17; -pub const SECBUFFER_APPLICATION_PROTOCOLS: u32 = 18; -pub const SECBUFFER_SRTP_PROTECTION_PROFILES: u32 = 19; -pub const SECBUFFER_SRTP_MASTER_KEY_IDENTIFIER: u32 = 20; -pub const SECBUFFER_TOKEN_BINDING: u32 = 21; -pub const SECBUFFER_PRESHARED_KEY: u32 = 22; -pub const SECBUFFER_PRESHARED_KEY_IDENTITY: u32 = 23; -pub const SECBUFFER_DTLS_MTU: u32 = 24; -pub const SECBUFFER_SEND_GENERIC_TLS_EXTENSION: u32 = 25; -pub const SECBUFFER_SUBSCRIBE_GENERIC_TLS_EXTENSION: u32 = 26; -pub const SECBUFFER_FLAGS: u32 = 27; -pub const SECBUFFER_TRAFFIC_SECRETS: u32 = 28; -pub const SECBUFFER_CERTIFICATE_REQUEST_CONTEXT: u32 = 29; -pub const SECBUFFER_CHANNEL_BINDINGS_RESULT: u32 = 30; -pub const SECBUFFER_ATTRMASK: u32 = 4026531840; -pub const SECBUFFER_READONLY: u32 = 2147483648; -pub const SECBUFFER_READONLY_WITH_CHECKSUM: u32 = 268435456; -pub const SECBUFFER_RESERVED: u32 = 1610612736; -pub const SEC_CHANNEL_BINDINGS_AUDIT_BINDINGS: u32 = 1; -pub const SEC_CHANNEL_BINDINGS_VALID_FLAGS: u32 = 1; -pub const SEC_CHANNEL_BINDINGS_RESULT_CLIENT_SUPPORT: u32 = 1; -pub const SEC_CHANNEL_BINDINGS_RESULT_ABSENT: u32 = 2; -pub const SEC_CHANNEL_BINDINGS_RESULT_NOTVALID_MISMATCH: u32 = 4; -pub const SEC_CHANNEL_BINDINGS_RESULT_NOTVALID_MISSING: u32 = 8; -pub const SEC_CHANNEL_BINDINGS_RESULT_VALID_MATCHED: u32 = 16; -pub const SEC_CHANNEL_BINDINGS_RESULT_VALID_PROXY: u32 = 32; -pub const SEC_CHANNEL_BINDINGS_RESULT_VALID_MISSING: u32 = 64; -pub const SEC_CHANNEL_BINDINGS_RESULT_VALID: u32 = 112; -pub const SEC_CHANNEL_BINDINGS_RESULT_NOTVALID: u32 = 12; -pub const SZ_ALG_MAX_SIZE: u32 = 64; -pub const SECURITY_NATIVE_DREP: u32 = 16; -pub const SECURITY_NETWORK_DREP: u32 = 0; -pub const SECPKG_CRED_INBOUND: u32 = 1; -pub const SECPKG_CRED_OUTBOUND: u32 = 2; -pub const SECPKG_CRED_BOTH: u32 = 3; -pub const SECPKG_CRED_DEFAULT: u32 = 4; -pub const SECPKG_CRED_RESERVED: u32 = 4026531840; -pub const SECPKG_CRED_AUTOLOGON_RESTRICTED: u32 = 16; -pub const SECPKG_CRED_PROCESS_POLICY_ONLY: u32 = 32; -pub const ISC_REQ_DELEGATE: u32 = 1; -pub const ISC_REQ_MUTUAL_AUTH: u32 = 2; -pub const ISC_REQ_REPLAY_DETECT: u32 = 4; -pub const ISC_REQ_SEQUENCE_DETECT: u32 = 8; -pub const ISC_REQ_CONFIDENTIALITY: u32 = 16; -pub const ISC_REQ_USE_SESSION_KEY: u32 = 32; -pub const ISC_REQ_PROMPT_FOR_CREDS: u32 = 64; -pub const ISC_REQ_USE_SUPPLIED_CREDS: u32 = 128; -pub const ISC_REQ_ALLOCATE_MEMORY: u32 = 256; -pub const ISC_REQ_USE_DCE_STYLE: u32 = 512; -pub const ISC_REQ_DATAGRAM: u32 = 1024; -pub const ISC_REQ_CONNECTION: u32 = 2048; -pub const ISC_REQ_CALL_LEVEL: u32 = 4096; -pub const ISC_REQ_FRAGMENT_SUPPLIED: u32 = 8192; -pub const ISC_REQ_EXTENDED_ERROR: u32 = 16384; -pub const ISC_REQ_STREAM: u32 = 32768; -pub const ISC_REQ_INTEGRITY: u32 = 65536; -pub const ISC_REQ_IDENTIFY: u32 = 131072; -pub const ISC_REQ_NULL_SESSION: u32 = 262144; -pub const ISC_REQ_MANUAL_CRED_VALIDATION: u32 = 524288; -pub const ISC_REQ_RESERVED1: u32 = 1048576; -pub const ISC_REQ_FRAGMENT_TO_FIT: u32 = 2097152; -pub const ISC_REQ_FORWARD_CREDENTIALS: u32 = 4194304; -pub const ISC_REQ_NO_INTEGRITY: u32 = 8388608; -pub const ISC_REQ_USE_HTTP_STYLE: u32 = 16777216; -pub const ISC_REQ_UNVERIFIED_TARGET_NAME: u32 = 536870912; -pub const ISC_REQ_CONFIDENTIALITY_ONLY: u32 = 1073741824; -pub const ISC_REQ_MESSAGES: u64 = 4294967296; -pub const ISC_REQ_DEFERRED_CRED_VALIDATION: u64 = 8589934592; -pub const ISC_REQ_NO_POST_HANDSHAKE_AUTH: u64 = 17179869184; -pub const ISC_RET_DELEGATE: u32 = 1; -pub const ISC_RET_MUTUAL_AUTH: u32 = 2; -pub const ISC_RET_REPLAY_DETECT: u32 = 4; -pub const ISC_RET_SEQUENCE_DETECT: u32 = 8; -pub const ISC_RET_CONFIDENTIALITY: u32 = 16; -pub const ISC_RET_USE_SESSION_KEY: u32 = 32; -pub const ISC_RET_USED_COLLECTED_CREDS: u32 = 64; -pub const ISC_RET_USED_SUPPLIED_CREDS: u32 = 128; -pub const ISC_RET_ALLOCATED_MEMORY: u32 = 256; -pub const ISC_RET_USED_DCE_STYLE: u32 = 512; -pub const ISC_RET_DATAGRAM: u32 = 1024; -pub const ISC_RET_CONNECTION: u32 = 2048; -pub const ISC_RET_INTERMEDIATE_RETURN: u32 = 4096; -pub const ISC_RET_CALL_LEVEL: u32 = 8192; -pub const ISC_RET_EXTENDED_ERROR: u32 = 16384; -pub const ISC_RET_STREAM: u32 = 32768; -pub const ISC_RET_INTEGRITY: u32 = 65536; -pub const ISC_RET_IDENTIFY: u32 = 131072; -pub const ISC_RET_NULL_SESSION: u32 = 262144; -pub const ISC_RET_MANUAL_CRED_VALIDATION: u32 = 524288; -pub const ISC_RET_RESERVED1: u32 = 1048576; -pub const ISC_RET_FRAGMENT_ONLY: u32 = 2097152; -pub const ISC_RET_FORWARD_CREDENTIALS: u32 = 4194304; -pub const ISC_RET_USED_HTTP_STYLE: u32 = 16777216; -pub const ISC_RET_NO_ADDITIONAL_TOKEN: u32 = 33554432; -pub const ISC_RET_REAUTHENTICATION: u32 = 134217728; -pub const ISC_RET_CONFIDENTIALITY_ONLY: u32 = 1073741824; -pub const ISC_RET_MESSAGES: u64 = 4294967296; -pub const ISC_RET_DEFERRED_CRED_VALIDATION: u64 = 8589934592; -pub const ISC_RET_NO_POST_HANDSHAKE_AUTH: u64 = 17179869184; -pub const ASC_REQ_DELEGATE: u32 = 1; -pub const ASC_REQ_MUTUAL_AUTH: u32 = 2; -pub const ASC_REQ_REPLAY_DETECT: u32 = 4; -pub const ASC_REQ_SEQUENCE_DETECT: u32 = 8; -pub const ASC_REQ_CONFIDENTIALITY: u32 = 16; -pub const ASC_REQ_USE_SESSION_KEY: u32 = 32; -pub const ASC_REQ_SESSION_TICKET: u32 = 64; -pub const ASC_REQ_ALLOCATE_MEMORY: u32 = 256; -pub const ASC_REQ_USE_DCE_STYLE: u32 = 512; -pub const ASC_REQ_DATAGRAM: u32 = 1024; -pub const ASC_REQ_CONNECTION: u32 = 2048; -pub const ASC_REQ_CALL_LEVEL: u32 = 4096; -pub const ASC_REQ_FRAGMENT_SUPPLIED: u32 = 8192; -pub const ASC_REQ_EXTENDED_ERROR: u32 = 32768; -pub const ASC_REQ_STREAM: u32 = 65536; -pub const ASC_REQ_INTEGRITY: u32 = 131072; -pub const ASC_REQ_LICENSING: u32 = 262144; -pub const ASC_REQ_IDENTIFY: u32 = 524288; -pub const ASC_REQ_ALLOW_NULL_SESSION: u32 = 1048576; -pub const ASC_REQ_ALLOW_NON_USER_LOGONS: u32 = 2097152; -pub const ASC_REQ_ALLOW_CONTEXT_REPLAY: u32 = 4194304; -pub const ASC_REQ_FRAGMENT_TO_FIT: u32 = 8388608; -pub const ASC_REQ_NO_TOKEN: u32 = 16777216; -pub const ASC_REQ_PROXY_BINDINGS: u32 = 67108864; -pub const ASC_REQ_ALLOW_MISSING_BINDINGS: u32 = 268435456; -pub const ASC_REQ_MESSAGES: u64 = 4294967296; -pub const ASC_RET_DELEGATE: u32 = 1; -pub const ASC_RET_MUTUAL_AUTH: u32 = 2; -pub const ASC_RET_REPLAY_DETECT: u32 = 4; -pub const ASC_RET_SEQUENCE_DETECT: u32 = 8; -pub const ASC_RET_CONFIDENTIALITY: u32 = 16; -pub const ASC_RET_USE_SESSION_KEY: u32 = 32; -pub const ASC_RET_SESSION_TICKET: u32 = 64; -pub const ASC_RET_ALLOCATED_MEMORY: u32 = 256; -pub const ASC_RET_USED_DCE_STYLE: u32 = 512; -pub const ASC_RET_DATAGRAM: u32 = 1024; -pub const ASC_RET_CONNECTION: u32 = 2048; -pub const ASC_RET_CALL_LEVEL: u32 = 8192; -pub const ASC_RET_THIRD_LEG_FAILED: u32 = 16384; -pub const ASC_RET_EXTENDED_ERROR: u32 = 32768; -pub const ASC_RET_STREAM: u32 = 65536; -pub const ASC_RET_INTEGRITY: u32 = 131072; -pub const ASC_RET_LICENSING: u32 = 262144; -pub const ASC_RET_IDENTIFY: u32 = 524288; -pub const ASC_RET_NULL_SESSION: u32 = 1048576; -pub const ASC_RET_ALLOW_NON_USER_LOGONS: u32 = 2097152; -pub const ASC_RET_ALLOW_CONTEXT_REPLAY: u32 = 4194304; -pub const ASC_RET_FRAGMENT_ONLY: u32 = 8388608; -pub const ASC_RET_NO_TOKEN: u32 = 16777216; -pub const ASC_RET_NO_ADDITIONAL_TOKEN: u32 = 33554432; -pub const ASC_RET_MESSAGES: u64 = 4294967296; -pub const SECPKG_CRED_ATTR_NAMES: u32 = 1; -pub const SECPKG_CRED_ATTR_SSI_PROVIDER: u32 = 2; -pub const SECPKG_CRED_ATTR_KDC_PROXY_SETTINGS: u32 = 3; -pub const SECPKG_CRED_ATTR_CERT: u32 = 4; -pub const SECPKG_CRED_ATTR_PAC_BYPASS: u32 = 5; -pub const KDC_PROXY_SETTINGS_V1: u32 = 1; -pub const KDC_PROXY_SETTINGS_FLAGS_FORCEPROXY: u32 = 1; -pub const SECPKG_ATTR_SIZES: u32 = 0; -pub const SECPKG_ATTR_NAMES: u32 = 1; -pub const SECPKG_ATTR_LIFESPAN: u32 = 2; -pub const SECPKG_ATTR_DCE_INFO: u32 = 3; -pub const SECPKG_ATTR_STREAM_SIZES: u32 = 4; -pub const SECPKG_ATTR_KEY_INFO: u32 = 5; -pub const SECPKG_ATTR_AUTHORITY: u32 = 6; -pub const SECPKG_ATTR_PROTO_INFO: u32 = 7; -pub const SECPKG_ATTR_PASSWORD_EXPIRY: u32 = 8; -pub const SECPKG_ATTR_SESSION_KEY: u32 = 9; -pub const SECPKG_ATTR_PACKAGE_INFO: u32 = 10; -pub const SECPKG_ATTR_USER_FLAGS: u32 = 11; -pub const SECPKG_ATTR_NEGOTIATION_INFO: u32 = 12; -pub const SECPKG_ATTR_NATIVE_NAMES: u32 = 13; -pub const SECPKG_ATTR_FLAGS: u32 = 14; -pub const SECPKG_ATTR_USE_VALIDATED: u32 = 15; -pub const SECPKG_ATTR_CREDENTIAL_NAME: u32 = 16; -pub const SECPKG_ATTR_TARGET_INFORMATION: u32 = 17; -pub const SECPKG_ATTR_ACCESS_TOKEN: u32 = 18; -pub const SECPKG_ATTR_TARGET: u32 = 19; -pub const SECPKG_ATTR_AUTHENTICATION_ID: u32 = 20; -pub const SECPKG_ATTR_LOGOFF_TIME: u32 = 21; -pub const SECPKG_ATTR_NEGO_KEYS: u32 = 22; -pub const SECPKG_ATTR_PROMPTING_NEEDED: u32 = 24; -pub const SECPKG_ATTR_UNIQUE_BINDINGS: u32 = 25; -pub const SECPKG_ATTR_ENDPOINT_BINDINGS: u32 = 26; -pub const SECPKG_ATTR_CLIENT_SPECIFIED_TARGET: u32 = 27; -pub const SECPKG_ATTR_LAST_CLIENT_TOKEN_STATUS: u32 = 30; -pub const SECPKG_ATTR_NEGO_PKG_INFO: u32 = 31; -pub const SECPKG_ATTR_NEGO_STATUS: u32 = 32; -pub const SECPKG_ATTR_CONTEXT_DELETED: u32 = 33; -pub const SECPKG_ATTR_DTLS_MTU: u32 = 34; -pub const SECPKG_ATTR_DATAGRAM_SIZES: u32 = 4; -pub const SECPKG_ATTR_SUBJECT_SECURITY_ATTRIBUTES: u32 = 128; -pub const SECPKG_ATTR_APPLICATION_PROTOCOL: u32 = 35; -pub const SECPKG_ATTR_NEGOTIATED_TLS_EXTENSIONS: u32 = 36; -pub const SECPKG_ATTR_IS_LOOPBACK: u32 = 37; -pub const SECPKG_ATTR_NEGO_INFO_FLAG_NO_KERBEROS: u32 = 1; -pub const SECPKG_ATTR_NEGO_INFO_FLAG_NO_NTLM: u32 = 2; -pub const SECPKG_CONTEXT_EXPORT_RESET_NEW: u32 = 1; -pub const SECPKG_CONTEXT_EXPORT_DELETE_OLD: u32 = 2; -pub const SECPKG_CONTEXT_EXPORT_TO_KERNEL: u32 = 4; -pub const SECQOP_WRAP_NO_ENCRYPT: u32 = 2147483649; -pub const SECQOP_WRAP_OOB_DATA: u32 = 1073741824; -pub const SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION: u32 = 1; -pub const SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_2: u32 = 2; -pub const SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_3: u32 = 3; -pub const SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_4: u32 = 4; -pub const SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_5: u32 = 5; -pub const SEC_WINNT_AUTH_IDENTITY_VERSION_2: u32 = 513; -pub const SEC_WINNT_AUTH_IDENTITY_ANSI: u32 = 1; -pub const SEC_WINNT_AUTH_IDENTITY_UNICODE: u32 = 2; -pub const SEC_WINNT_AUTH_IDENTITY_VERSION: u32 = 512; -pub const SEC_WINNT_AUTH_IDENTITY_MARSHALLED: u32 = 4; -pub const SEC_WINNT_AUTH_IDENTITY_ONLY: u32 = 8; -pub const UNDERSTANDS_LONG_NAMES: u32 = 1; -pub const NO_LONG_NAMES: u32 = 2; -#[allow(unsafe_code)] -pub const DD_MUP_DEVICE_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"\\Device\\Mup\0") -}; -#[allow(unsafe_code)] -pub const EA_NAME_NETWORK_OPEN_ECP_PRIVACY: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked( - b"ECP{c584edbf-00df-4d28-00b8-8435baca8911e8}-PRIVACY\0", - ) -}; -#[allow(unsafe_code)] -pub const EA_NAME_NETWORK_OPEN_ECP_PRIVACY_U: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked( - b"ECP{c584edbf-00df-4d28-00b8-8435baca8911e8}-PRIVACY\0", - ) -}; -#[allow(unsafe_code)] -pub const EA_NAME_NETWORK_OPEN_ECP_INTEGRITY: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked( - b"ECP{c584edbf-00df-4d28-00b8-8435baca8911e8}-INTEGRITY\0", - ) -}; -#[allow(unsafe_code)] -pub const EA_NAME_NETWORK_OPEN_ECP_INTEGRITY_U: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked( - b"ECP{c584edbf-00df-4d28-00b8-8435baca8911e8}-INTEGRITY\0", - ) -}; -pub const WNNC_NET_MSNET: u32 = 65536; -pub const WNNC_NET_SMB: u32 = 131072; -pub const WNNC_NET_NETWARE: u32 = 196608; -pub const WNNC_NET_VINES: u32 = 262144; -pub const WNNC_NET_10NET: u32 = 327680; -pub const WNNC_NET_LOCUS: u32 = 393216; -pub const WNNC_NET_SUN_PC_NFS: u32 = 458752; -pub const WNNC_NET_LANSTEP: u32 = 524288; -pub const WNNC_NET_9TILES: u32 = 589824; -pub const WNNC_NET_LANTASTIC: u32 = 655360; -pub const WNNC_NET_AS400: u32 = 720896; -pub const WNNC_NET_FTP_NFS: u32 = 786432; -pub const WNNC_NET_PATHWORKS: u32 = 851968; -pub const WNNC_NET_LIFENET: u32 = 917504; -pub const WNNC_NET_POWERLAN: u32 = 983040; -pub const WNNC_NET_BWNFS: u32 = 1048576; -pub const WNNC_NET_COGENT: u32 = 1114112; -pub const WNNC_NET_FARALLON: u32 = 1179648; -pub const WNNC_NET_APPLETALK: u32 = 1245184; -pub const WNNC_NET_INTERGRAPH: u32 = 1310720; -pub const WNNC_NET_SYMFONET: u32 = 1376256; -pub const WNNC_NET_CLEARCASE: u32 = 1441792; -pub const WNNC_NET_FRONTIER: u32 = 1507328; -pub const WNNC_NET_BMC: u32 = 1572864; -pub const WNNC_NET_DCE: u32 = 1638400; -pub const WNNC_NET_AVID: u32 = 1703936; -pub const WNNC_NET_DOCUSPACE: u32 = 1769472; -pub const WNNC_NET_MANGOSOFT: u32 = 1835008; -pub const WNNC_NET_SERNET: u32 = 1900544; -pub const WNNC_NET_RIVERFRONT1: u32 = 1966080; -pub const WNNC_NET_RIVERFRONT2: u32 = 2031616; -pub const WNNC_NET_DECORB: u32 = 2097152; -pub const WNNC_NET_PROTSTOR: u32 = 2162688; -pub const WNNC_NET_FJ_REDIR: u32 = 2228224; -pub const WNNC_NET_DISTINCT: u32 = 2293760; -pub const WNNC_NET_TWINS: u32 = 2359296; -pub const WNNC_NET_RDR2SAMPLE: u32 = 2424832; -pub const WNNC_NET_CSC: u32 = 2490368; -pub const WNNC_NET_3IN1: u32 = 2555904; -pub const WNNC_NET_EXTENDNET: u32 = 2686976; -pub const WNNC_NET_STAC: u32 = 2752512; -pub const WNNC_NET_FOXBAT: u32 = 2818048; -pub const WNNC_NET_YAHOO: u32 = 2883584; -pub const WNNC_NET_EXIFS: u32 = 2949120; -pub const WNNC_NET_DAV: u32 = 3014656; -pub const WNNC_NET_KNOWARE: u32 = 3080192; -pub const WNNC_NET_OBJECT_DIRE: u32 = 3145728; -pub const WNNC_NET_MASFAX: u32 = 3211264; -pub const WNNC_NET_HOB_NFS: u32 = 3276800; -pub const WNNC_NET_SHIVA: u32 = 3342336; -pub const WNNC_NET_IBMAL: u32 = 3407872; -pub const WNNC_NET_LOCK: u32 = 3473408; -pub const WNNC_NET_TERMSRV: u32 = 3538944; -pub const WNNC_NET_SRT: u32 = 3604480; -pub const WNNC_NET_QUINCY: u32 = 3670016; -pub const WNNC_NET_OPENAFS: u32 = 3735552; -pub const WNNC_NET_AVID1: u32 = 3801088; -pub const WNNC_NET_DFS: u32 = 3866624; -pub const WNNC_NET_KWNP: u32 = 3932160; -pub const WNNC_NET_ZENWORKS: u32 = 3997696; -pub const WNNC_NET_DRIVEONWEB: u32 = 4063232; -pub const WNNC_NET_VMWARE: u32 = 4128768; -pub const WNNC_NET_RSFX: u32 = 4194304; -pub const WNNC_NET_MFILES: u32 = 4259840; -pub const WNNC_NET_MS_NFS: u32 = 4325376; -pub const WNNC_NET_GOOGLE: u32 = 4390912; -pub const WNNC_NET_NDFS: u32 = 4456448; -pub const WNNC_NET_DOCUSHARE: u32 = 4521984; -pub const WNNC_NET_AURISTOR_FS: u32 = 4587520; -pub const WNNC_NET_SECUREAGENT: u32 = 4653056; -pub const WNNC_NET_9P: u32 = 4718592; -pub const WNNC_CRED_MANAGER: u32 = 4294901760; -pub const WNNC_NET_LANMAN: u32 = 131072; -pub const VOLSNAPCONTROLTYPE: u32 = 83; -pub const WDF_DRIVER_GLOBALS_NAME_LEN: u32 = 32; -pub const WDF_FIRST_VERSION_SUPPORTING_CLIENT_VERSION_HIGHER_THAN_FRAMEWORK: u32 = 25; -pub const WDF_ALWAYS_AVAILABLE_FUNCTION_COUNT: u32 = 453; -#[allow(unsafe_code)] -pub const WDF_TYPE_INIT_BASE_SECTION_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b".kmdftypeinit\0") -}; -#[allow(unsafe_code)] -pub const WDF_TYPE_INIT_SECTION_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b".kmdftypeinit$b\0") -}; -#[allow(unsafe_code)] -pub const WDF_TYPE_DEFAULT_SECTION_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b".data\0") -}; -#[allow(unsafe_code)] -pub const WDF_S0_IDLE_ENABLED_VALUE_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"IdleInWorkingState\0") -}; -#[allow(unsafe_code)] -pub const WDF_SX_WAKE_ENABLED_VALUE_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"WakeFromSleepState\0") -}; -#[allow(unsafe_code)] -pub const WDF_S0_IDLE_DEFAULT_VALUE_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"WdfDefaultIdleInWorkingState\0") -}; -#[allow(unsafe_code)] -pub const WDF_SX_WAKE_DEFAULT_VALUE_NAME: &::core::ffi::CStr = unsafe { - ::core::ffi::CStr::from_bytes_with_nul_unchecked(b"WdfDefaultWakeFromSleepState\0") -}; -pub const WDF_REGKEY_DEVICE_SUBKEY: u32 = 0; -pub const WDF_REGKEY_DRIVER_SUBKEY: u32 = 0; -extern "C" { - pub static mut KeNumberProcessors: CCHAR; -} -extern "C" { - pub static GUID_MAX_POWER_SAVINGS: GUID; -} -extern "C" { - pub static GUID_MIN_POWER_SAVINGS: GUID; -} -extern "C" { - pub static GUID_TYPICAL_POWER_SAVINGS: GUID; -} -extern "C" { - pub static NO_SUBGROUP_GUID: GUID; -} -extern "C" { - pub static ALL_POWERSCHEMES_GUID: GUID; -} -extern "C" { - pub static GUID_POWERSCHEME_PERSONALITY: GUID; -} -extern "C" { - pub static GUID_ACTIVE_POWERSCHEME: GUID; -} -extern "C" { - pub static GUID_IDLE_RESILIENCY_SUBGROUP: GUID; -} -extern "C" { - pub static GUID_IDLE_RESILIENCY_PERIOD: GUID; -} -extern "C" { - pub static GUID_DEEP_SLEEP_ENABLED: GUID; -} -extern "C" { - pub static GUID_DEEP_SLEEP_PLATFORM_STATE: GUID; -} -extern "C" { - pub static GUID_DISK_COALESCING_POWERDOWN_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_EXECUTION_REQUIRED_REQUEST_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_VIDEO_SUBGROUP: GUID; -} -extern "C" { - pub static GUID_VIDEO_POWERDOWN_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_VIDEO_ANNOYANCE_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_VIDEO_ADAPTIVE_PERCENT_INCREASE: GUID; -} -extern "C" { - pub static GUID_VIDEO_DIM_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_VIDEO_ADAPTIVE_POWERDOWN: GUID; -} -extern "C" { - pub static GUID_MONITOR_POWER_ON: GUID; -} -extern "C" { - pub static GUID_DEVICE_POWER_POLICY_VIDEO_BRIGHTNESS: GUID; -} -extern "C" { - pub static GUID_DEVICE_POWER_POLICY_VIDEO_DIM_BRIGHTNESS: GUID; -} -extern "C" { - pub static GUID_VIDEO_CURRENT_MONITOR_BRIGHTNESS: GUID; -} -extern "C" { - pub static GUID_VIDEO_ADAPTIVE_DISPLAY_BRIGHTNESS: GUID; -} -extern "C" { - pub static GUID_CONSOLE_DISPLAY_STATE: GUID; -} -extern "C" { - pub static GUID_ALLOW_DISPLAY_REQUIRED: GUID; -} -extern "C" { - pub static GUID_VIDEO_CONSOLE_LOCK_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_ADVANCED_COLOR_QUALITY_BIAS: GUID; -} -extern "C" { - pub static GUID_ADAPTIVE_POWER_BEHAVIOR_SUBGROUP: GUID; -} -extern "C" { - pub static GUID_NON_ADAPTIVE_INPUT_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_ADAPTIVE_INPUT_CONTROLLER_STATE: GUID; -} -extern "C" { - pub static GUID_DISK_SUBGROUP: GUID; -} -extern "C" { - pub static GUID_DISK_MAX_POWER: GUID; -} -extern "C" { - pub static GUID_DISK_POWERDOWN_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_DISK_IDLE_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_DISK_BURST_IGNORE_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_DISK_ADAPTIVE_POWERDOWN: GUID; -} -extern "C" { - pub static GUID_DISK_NVME_NOPPME: GUID; -} -extern "C" { - pub static GUID_SLEEP_SUBGROUP: GUID; -} -extern "C" { - pub static GUID_SLEEP_IDLE_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_STANDBY_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_UNATTEND_SLEEP_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_HIBERNATE_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_HIBERNATE_FASTS4_POLICY: GUID; -} -extern "C" { - pub static GUID_CRITICAL_POWER_TRANSITION: GUID; -} -extern "C" { - pub static GUID_SYSTEM_AWAYMODE: GUID; -} -extern "C" { - pub static GUID_ALLOW_AWAYMODE: GUID; -} -extern "C" { - pub static GUID_USER_PRESENCE_PREDICTION: GUID; -} -extern "C" { - pub static GUID_STANDBY_BUDGET_GRACE_PERIOD: GUID; -} -extern "C" { - pub static GUID_STANDBY_BUDGET_PERCENT: GUID; -} -extern "C" { - pub static GUID_STANDBY_RESERVE_GRACE_PERIOD: GUID; -} -extern "C" { - pub static GUID_STANDBY_RESERVE_TIME: GUID; -} -extern "C" { - pub static GUID_STANDBY_RESET_PERCENT: GUID; -} -extern "C" { - pub static GUID_HUPR_ADAPTIVE_AWAY_DISPLAY_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_HUPR_ADAPTIVE_INATTENTIVE_DIM_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_HUPR_ADAPTIVE_INATTENTIVE_DISPLAY_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_HUPR_ADAPTIVE_AWAY_DIM_TIMEOUT: GUID; -} -extern "C" { - pub static GUID_ALLOW_STANDBY_STATES: GUID; -} -extern "C" { - pub static GUID_ALLOW_RTC_WAKE: GUID; -} -extern "C" { - pub static GUID_LEGACY_RTC_MITIGATION: GUID; -} -extern "C" { - pub static GUID_ALLOW_SYSTEM_REQUIRED: GUID; -} -extern "C" { - pub static GUID_POWER_SAVING_STATUS: GUID; -} -extern "C" { - pub static GUID_ENERGY_SAVER_SUBGROUP: GUID; -} -extern "C" { - pub static GUID_ENERGY_SAVER_BATTERY_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_ENERGY_SAVER_BRIGHTNESS: GUID; -} -extern "C" { - pub static GUID_ENERGY_SAVER_POLICY: GUID; -} -extern "C" { - pub static GUID_SYSTEM_BUTTON_SUBGROUP: GUID; -} -extern "C" { - pub static GUID_POWERBUTTON_ACTION: GUID; -} -extern "C" { - pub static GUID_SLEEPBUTTON_ACTION: GUID; -} -extern "C" { - pub static GUID_USERINTERFACEBUTTON_ACTION: GUID; -} -extern "C" { - pub static GUID_LIDCLOSE_ACTION: GUID; -} -extern "C" { - pub static GUID_LIDOPEN_POWERSTATE: GUID; -} -extern "C" { - pub static GUID_BATTERY_SUBGROUP: GUID; -} -extern "C" { - pub static GUID_BATTERY_DISCHARGE_ACTION_0: GUID; -} -extern "C" { - pub static GUID_BATTERY_DISCHARGE_LEVEL_0: GUID; -} -extern "C" { - pub static GUID_BATTERY_DISCHARGE_FLAGS_0: GUID; -} -extern "C" { - pub static GUID_BATTERY_DISCHARGE_ACTION_1: GUID; -} -extern "C" { - pub static GUID_BATTERY_DISCHARGE_LEVEL_1: GUID; -} -extern "C" { - pub static GUID_BATTERY_DISCHARGE_FLAGS_1: GUID; -} -extern "C" { - pub static GUID_BATTERY_DISCHARGE_ACTION_2: GUID; -} -extern "C" { - pub static GUID_BATTERY_DISCHARGE_LEVEL_2: GUID; -} -extern "C" { - pub static GUID_BATTERY_DISCHARGE_FLAGS_2: GUID; -} -extern "C" { - pub static GUID_BATTERY_DISCHARGE_ACTION_3: GUID; -} -extern "C" { - pub static GUID_BATTERY_DISCHARGE_LEVEL_3: GUID; -} -extern "C" { - pub static GUID_BATTERY_DISCHARGE_FLAGS_3: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_SETTINGS_SUBGROUP: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_THROTTLE_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_THROTTLE_MAXIMUM: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_THROTTLE_MAXIMUM_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_THROTTLE_MINIMUM: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_THROTTLE_MINIMUM_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_FREQUENCY_LIMIT: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_FREQUENCY_LIMIT_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_ALLOW_THROTTLING: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_IDLESTATE_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERFSTATE_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_INCREASE_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_INCREASE_THRESHOLD_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_DECREASE_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_DECREASE_THRESHOLD_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_INCREASE_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_INCREASE_POLICY_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_DECREASE_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_DECREASE_POLICY_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_INCREASE_TIME: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_INCREASE_TIME_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_DECREASE_TIME: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_DECREASE_TIME_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_TIME_CHECK: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_BOOST_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_BOOST_MODE: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_AUTONOMOUS_MODE: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_ENERGY_PERFORMANCE_PREFERENCE: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_ENERGY_PERFORMANCE_PREFERENCE_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_AUTONOMOUS_ACTIVITY_WINDOW: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_DUTY_CYCLING: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_IDLE_ALLOW_SCALING: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_IDLE_DISABLE: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_IDLE_STATE_MAXIMUM: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_IDLE_TIME_CHECK: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_IDLE_DEMOTE_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_IDLE_PROMOTE_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_INCREASE_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_DECREASE_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_INCREASE_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_DECREASE_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_MAX_CORES: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_MAX_CORES_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_MIN_CORES: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_MIN_CORES_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_INCREASE_TIME: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_DECREASE_TIME: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_AFFINITY_HISTORY_DECREASE_FACTOR: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_AFFINITY_HISTORY_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_AFFINITY_WEIGHTING: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_HISTORY_DECREASE_FACTOR: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_HISTORY_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_WEIGHTING: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CORE_PARKING_OVER_UTILIZATION_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PARKING_CORE_OVERRIDE: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PARKING_PERF_STATE: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PARKING_PERF_STATE_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PARKING_CONCURRENCY_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PARKING_HEADROOM_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PARKING_DISTRIBUTION_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_SOFT_PARKING_LATENCY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_HISTORY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_HISTORY_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_INCREASE_HISTORY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_DECREASE_HISTORY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_CORE_PARKING_HISTORY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_LATENCY_HINT: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_LATENCY_HINT_PERF: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_PERF_LATENCY_HINT_PERF_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_LATENCY_HINT_MIN_UNPARK: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_LATENCY_HINT_MIN_UNPARK_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_MODULE_PARKING_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_COMPLEX_PARKING_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_SMT_UNPARKING_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_DISTRIBUTE_UTILITY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_HETEROGENEOUS_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_HETERO_DECREASE_TIME: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_HETERO_INCREASE_TIME: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_HETERO_DECREASE_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_HETERO_DECREASE_THRESHOLD_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_HETERO_INCREASE_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_HETERO_INCREASE_THRESHOLD_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CLASS0_FLOOR_PERF: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_CLASS1_INITIAL_PERF: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_THREAD_SCHEDULING_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_SHORT_THREAD_SCHEDULING_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_SHORT_THREAD_RUNTIME_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_SHORT_THREAD_ARCH_CLASS_UPPER_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_SHORT_THREAD_ARCH_CLASS_LOWER_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_LONG_THREAD_ARCH_CLASS_UPPER_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_LONG_THREAD_ARCH_CLASS_LOWER_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_SYSTEM_COOLING_POLICY: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_RESPONSIVENESS_DISABLE_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_RESPONSIVENESS_DISABLE_THRESHOLD_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_RESPONSIVENESS_ENABLE_THRESHOLD: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_RESPONSIVENESS_ENABLE_THRESHOLD_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_RESPONSIVENESS_DISABLE_TIME: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_RESPONSIVENESS_DISABLE_TIME_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_RESPONSIVENESS_ENABLE_TIME: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_RESPONSIVENESS_ENABLE_TIME_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_RESPONSIVENESS_EPP_CEILING: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_RESPONSIVENESS_EPP_CEILING_1: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_RESPONSIVENESS_PERF_FLOOR: GUID; -} -extern "C" { - pub static GUID_PROCESSOR_RESPONSIVENESS_PERF_FLOOR_1: GUID; -} -extern "C" { - pub static GUID_LOCK_CONSOLE_ON_WAKE: GUID; -} -extern "C" { - pub static GUID_DEVICE_IDLE_POLICY: GUID; -} -extern "C" { - pub static GUID_CONNECTIVITY_IN_STANDBY: GUID; -} -extern "C" { - pub static GUID_DISCONNECTED_STANDBY_MODE: GUID; -} -extern "C" { - pub static GUID_ACDC_POWER_SOURCE: GUID; -} -extern "C" { - pub static GUID_LIDSWITCH_STATE_CHANGE: GUID; -} -extern "C" { - pub static GUID_LIDSWITCH_STATE_RELIABILITY: GUID; -} -extern "C" { - pub static GUID_BATTERY_PERCENTAGE_REMAINING: GUID; -} -extern "C" { - pub static GUID_BATTERY_COUNT: GUID; -} -extern "C" { - pub static GUID_GLOBAL_USER_PRESENCE: GUID; -} -extern "C" { - pub static GUID_SESSION_DISPLAY_STATUS: GUID; -} -extern "C" { - pub static GUID_SESSION_USER_PRESENCE: GUID; -} -extern "C" { - pub static GUID_IDLE_BACKGROUND_TASK: GUID; -} -extern "C" { - pub static GUID_BACKGROUND_TASK_NOTIFICATION: GUID; -} -extern "C" { - pub static GUID_APPLAUNCH_BUTTON: GUID; -} -extern "C" { - pub static GUID_PCIEXPRESS_SETTINGS_SUBGROUP: GUID; -} -extern "C" { - pub static GUID_PCIEXPRESS_ASPM_POLICY: GUID; -} -extern "C" { - pub static GUID_ENABLE_SWITCH_FORCED_SHUTDOWN: GUID; -} -extern "C" { - pub static GUID_INTSTEER_SUBGROUP: GUID; -} -extern "C" { - pub static GUID_INTSTEER_MODE: GUID; -} -extern "C" { - pub static GUID_INTSTEER_LOAD_PER_PROC_TRIGGER: GUID; -} -extern "C" { - pub static GUID_INTSTEER_TIME_UNPARK_TRIGGER: GUID; -} -extern "C" { - pub static GUID_GRAPHICS_SUBGROUP: GUID; -} -extern "C" { - pub static GUID_GPU_PREFERENCE_POLICY: GUID; -} -extern "C" { - pub static GUID_MIXED_REALITY_MODE: GUID; -} -extern "C" { - pub static GUID_SPR_ACTIVE_SESSION_CHANGE: GUID; -} -extern "C" { - pub static mut NlsMbCodePageTag: *mut BOOLEAN; -} -extern "C" { - pub static mut NlsMbOemCodePageTag: *mut BOOLEAN; -} -extern "C" { - pub static mut NtGlobalFlag: ULONG; -} -extern "C" { - pub static mut NtGlobalFlag2: ULONG; -} -extern "C" { - pub static mut KdDebuggerNotPresent: PBOOLEAN; -} -extern "C" { - pub static mut KdDebuggerEnabled: PBOOLEAN; -} -pub const ExPoolZeroingNativelySupported: BOOLEAN = 0; -extern "C" { - pub static mut Mm64BitPhysicalAddress: PBOOLEAN; -} -extern "C" { - pub static mut MmBadPointer: PVOID; -} -extern "C" { - pub static CLFS_LSN_INVALID: CLFS_LSN; -} -extern "C" { - pub static CLFS_LSN_NULL: CLFS_LSN; -} -extern "C" { - pub static mut CmKeyObjectType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut IoFileObjectType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut ExEventObjectType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut ExSemaphoreObjectType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut TmTransactionManagerObjectType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut TmResourceManagerObjectType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut TmEnlistmentObjectType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut TmTransactionObjectType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut PsProcessType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut PsThreadType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut PsJobType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut SeTokenObjectType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut ExDesktopObjectType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut PsSiloContextPagedType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut PsSiloContextNonPagedType: *mut POBJECT_TYPE; -} -extern "C" { - pub static mut KeLastBranchMSR: ULONG; -} -extern "C" { - pub static MmHighestUserAddress: PVOID; -} -extern "C" { - pub static MmSystemRangeStart: PVOID; -} -extern "C" { - pub static MmUserProbeAddress: ULONG64; -} -extern "C" { - pub static mut PsInitialSystemProcess: PEPROCESS; -} -extern "C" { - pub static GUID_ECP_CREATE_USER_PROCESS: GUID; -} -extern "C" { - pub static mut HalDispatchTable: PHAL_DISPATCH; -} -extern "C" { - pub static CMC_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static CPE_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static MCE_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static PCIe_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static INIT_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static NMI_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static BOOT_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static SEA_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static SEI_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static PEI_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static BMC_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static SCI_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static EXTINT_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static DEVICE_DRIVER_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static CMCI_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static WHEA_DEVICE_ERROR_SUMMARY_GUID: GUID; -} -extern "C" { - pub static PROCESSOR_GENERIC_ERROR_SECTION_GUID: GUID; -} -extern "C" { - pub static XPF_PROCESSOR_ERROR_SECTION_GUID: GUID; -} -extern "C" { - pub static IPF_PROCESSOR_ERROR_SECTION_GUID: GUID; -} -extern "C" { - pub static ARM_PROCESSOR_ERROR_SECTION_GUID: GUID; -} -extern "C" { - pub static MEMORY_ERROR_SECTION_GUID: GUID; -} -extern "C" { - pub static PCIEXPRESS_ERROR_SECTION_GUID: GUID; -} -extern "C" { - pub static PCIXBUS_ERROR_SECTION_GUID: GUID; -} -extern "C" { - pub static PCIXDEVICE_ERROR_SECTION_GUID: GUID; -} -extern "C" { - pub static FIRMWARE_ERROR_RECORD_REFERENCE_GUID: GUID; -} -extern "C" { - pub static PMEM_ERROR_SECTION_GUID: GUID; -} -extern "C" { - pub static MU_TELEMETRY_SECTION_GUID: GUID; -} -extern "C" { - pub static RECOVERY_INFO_SECTION_GUID: GUID; -} -extern "C" { - pub static WHEA_CACHECHECK_GUID: GUID; -} -extern "C" { - pub static WHEA_TLBCHECK_GUID: GUID; -} -extern "C" { - pub static WHEA_BUSCHECK_GUID: GUID; -} -extern "C" { - pub static WHEA_MSCHECK_GUID: GUID; -} -extern "C" { - pub static CPER_EMPTY_GUID: GUID; -} -extern "C" { - pub static WHEA_RECORD_CREATOR_GUID: GUID; -} -extern "C" { - pub static DEFAULT_DEVICE_DRIVER_CREATOR_GUID: GUID; -} -extern "C" { - pub static GENERIC_NOTIFY_TYPE_GUID: GUID; -} -extern "C" { - pub static IPF_SAL_RECORD_SECTION_GUID: GUID; -} -extern "C" { - pub static XPF_MCA_SECTION_GUID: GUID; -} -extern "C" { - pub static NMI_SECTION_GUID: GUID; -} -extern "C" { - pub static GENERIC_SECTION_GUID: GUID; -} -extern "C" { - pub static IPMI_MSR_DUMP_SECTION_GUID: GUID; -} -extern "C" { - pub static WHEA_ERROR_PACKET_SECTION_GUID: GUID; -} -extern "C" { - pub static WHEA_DPC_CAPABILITY_SECTION_GUID: GUID; -} -extern "C" { - pub static PCIE_CORRECTABLE_ERROR_SUMMARY_SECTION_GUID: GUID; -} -extern "C" { - pub static MEMORY_CORRECTABLE_ERROR_SUMMARY_SECTION_GUID: GUID; -} -extern "C" { - pub static SEA_SECTION_GUID: GUID; -} -extern "C" { - pub static SEI_SECTION_GUID: GUID; -} -extern "C" { - pub static PCI_RECOVERY_SECTION_GUID: GUID; -} -extern "C" { - pub static mut HvlpWheaErrorNotificationCallback: PHVL_WHEA_ERROR_NOTIFICATION; -} -extern "C" { - pub static RtlAllocateStringRoutine: PRTL_ALLOCATE_STRING_ROUTINE; -} -extern "C" { - pub static RtlFreeStringRoutine: PRTL_FREE_STRING_ROUTINE; -} -extern "C" { - pub static RtlReallocateStringRoutine: PRTL_REALLOCATE_STRING_ROUTINE; -} -extern "C" { - pub static FILE_TYPE_NOTIFICATION_GUID_PAGE_FILE: GUID; -} -extern "C" { - pub static FILE_TYPE_NOTIFICATION_GUID_HIBERNATION_FILE: GUID; -} -extern "C" { - pub static FILE_TYPE_NOTIFICATION_GUID_CRASHDUMP_FILE: GUID; -} -extern "C" { - pub static mut SeExports: PSE_EXPORTS; -} -extern "C" { - pub static mut IoStatisticsLock: KSPIN_LOCK; -} -extern "C" { - pub static mut IoReadOperationCount: ULONG; -} -extern "C" { - pub static mut IoWriteOperationCount: ULONG; -} -extern "C" { - pub static mut IoOtherOperationCount: ULONG; -} -extern "C" { - pub static mut IoReadTransferCount: LARGE_INTEGER; -} -extern "C" { - pub static mut IoWriteTransferCount: LARGE_INTEGER; -} -extern "C" { - pub static mut IoOtherTransferCount: LARGE_INTEGER; -} -extern "C" { - pub static mut FsRtlLegalAnsiCharacterArray: *const *const UCHAR; -} -extern "C" { - pub static mut NlsOemLeadByteInfo: *mut PUSHORT; -} -extern "C" { - pub static GUID_ECP_OPLOCK_KEY: GUID; -} -extern "C" { - pub static GUID_ECP_DUAL_OPLOCK_KEY: GUID; -} -extern "C" { - pub static GUID_ECP_NETWORK_OPEN_CONTEXT: GUID; -} -extern "C" { - pub static GUID_ECP_NETWORK_APP_INSTANCE: GUID; -} -extern "C" { - pub static GUID_ECP_NETWORK_APP_INSTANCE_VERSION: GUID; -} -extern "C" { - pub static GUID_ECP_PREFETCH_OPEN: GUID; -} -extern "C" { - pub static GUID_ECP_NFS_OPEN: GUID; -} -extern "C" { - pub static GUID_ECP_SRV_OPEN: GUID; -} -extern "C" { - pub static GUID_ECP_RKF_BYPASS: GUID; -} -extern "C" { - pub static GUID_ECP_IO_DEVICE_HINT: GUID; -} -extern "C" { - pub static GUID_ECP_CSV_DOWN_LEVEL_OPEN: GUID; -} -extern "C" { - pub static GUID_ECP_CSV_QUERY_FILE_REVISION: GUID; -} -extern "C" { - pub static GUID_ECP_CSV_QUERY_FILE_REVISION_FILE_ID_128: GUID; -} -extern "C" { - pub static GUID_ECP_CSV_SET_HANDLE_PROPERTIES: GUID; -} -extern "C" { - pub static ECP_TYPE_OPEN_REPARSE_GUID: GUID; -} -extern "C" { - pub static ECP_TYPE_IO_STOP_ON_SYMLINK_FILTER_GUID: GUID; -} -extern "C" { - pub static ECP_TYPE_CLFS_CREATE_CONTAINER: GUID; -} -extern "C" { - pub static GUID_ECP_CREATE_REDIRECTION: GUID; -} -extern "C" { - pub static GUID_ECP_ATOMIC_CREATE: GUID; -} -extern "C" { - pub static GUID_ECP_OPEN_PARAMETERS: GUID; -} -extern "C" { - pub static GUID_ECP_QUERY_ON_CREATE: GUID; -} -extern "C" { - pub static GUID_ECP_CLOUDFILES_ATTRIBUTION: GUID; -} -extern "C" { - pub static mut CcFastMdlReadWait: ULONG; -} -extern "C" { - pub static mut WdfFunctions_01033: *const WDFFUNC; -} -extern "C" { - pub static mut WdfDriverMiniportUnloadOverride: WDFFUNC; -} -extern "C" { - pub static mut WdfDriverGlobals: PWDF_DRIVER_GLOBALS; -} -extern "C" { - pub static mut WdfClientVersionHigherThanFramework: BOOLEAN; -} -extern "C" { - pub static mut WdfFunctionCount: ULONG; -} -extern "C" { - pub static mut WdfStructureCount: ULONG; -} -extern "C" { - pub static mut WdfStructures: WDF_STRUCT_INFO; -} -pub const WdfMinimumVersionRequired: ULONG = 33; -extern "C" { - pub static SDDL_DEVOBJ_KERNEL_ONLY: UNICODE_STRING; -} -extern "C" { - pub static SDDL_DEVOBJ_SYS_ALL: UNICODE_STRING; -} -extern "C" { - pub static SDDL_DEVOBJ_SYS_ALL_ADM_ALL: UNICODE_STRING; -} -extern "C" { - pub static SDDL_DEVOBJ_SYS_ALL_ADM_RX: UNICODE_STRING; -} -extern "C" { - pub static SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_R: UNICODE_STRING; -} -extern "C" { - pub static SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_R_RES_R: UNICODE_STRING; -} -extern "C" { - pub static SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RW_RES_R: UNICODE_STRING; -} -extern "C" { - pub static SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RWX_RES_RWX: UNICODE_STRING; -} diff --git a/crates/wdk-sys/generated_bindings/ntddk.rs b/crates/wdk-sys/generated_bindings/ntddk.rs deleted file mode 100644 index a298813c..00000000 --- a/crates/wdk-sys/generated_bindings/ntddk.rs +++ /dev/null @@ -1,14246 +0,0 @@ -/* automatically generated by rust-bindgen 0.69.4 */ - -extern "C" { - pub fn __va_start(arg1: *mut *mut ::core::ffi::c_char, ...); -} -extern "C" { - pub fn _guard_check_icall(Target: usize); -} -extern "C" { - pub fn _guard_icall_checks_enforced() -> ::core::ffi::c_int; -} -extern "C" { - pub fn _guard_rf_checks_enforced() -> ::core::ffi::c_int; -} -extern "C" { - pub fn __C_specific_handler( - ExceptionRecord: *mut _EXCEPTION_RECORD, - EstablisherFrame: *mut ::core::ffi::c_void, - ContextRecord: *mut _CONTEXT, - DispatcherContext: *mut _DISPATCHER_CONTEXT, - ) -> EXCEPTION_DISPOSITION; -} -extern "C" { - pub fn _exception_code() -> ::core::ffi::c_ulong; -} -extern "C" { - pub fn _exception_info() -> *mut ::core::ffi::c_void; -} -extern "C" { - pub fn _abnormal_termination() -> ::core::ffi::c_int; -} -extern "C" { - pub fn _isctype( - _C: ::core::ffi::c_int, - _Type: ::core::ffi::c_int, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _isctype_l( - _C: ::core::ffi::c_int, - _Type: ::core::ffi::c_int, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn isalpha(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _isalpha_l(_C: ::core::ffi::c_int, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn isupper(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _isupper_l(_C: ::core::ffi::c_int, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn islower(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _islower_l(_C: ::core::ffi::c_int, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn isdigit(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _isdigit_l(_C: ::core::ffi::c_int, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn isxdigit(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _isxdigit_l(_C: ::core::ffi::c_int, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn isspace(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _isspace_l(_C: ::core::ffi::c_int, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn ispunct(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _ispunct_l(_C: ::core::ffi::c_int, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn isalnum(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _isalnum_l(_C: ::core::ffi::c_int, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn isprint(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _isprint_l(_C: ::core::ffi::c_int, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn isgraph(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _isgraph_l(_C: ::core::ffi::c_int, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn iscntrl(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iscntrl_l(_C: ::core::ffi::c_int, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn toupper(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn tolower(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _tolower(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _tolower_l(_C: ::core::ffi::c_int, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _toupper(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _toupper_l(_C: ::core::ffi::c_int, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn __isascii(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn __toascii(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn __iscsymf(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn __iscsym(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn iswalpha(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswalpha_l(_C: wint_t, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn iswupper(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswupper_l(_C: wint_t, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn iswlower(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswlower_l(_C: wint_t, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn iswdigit(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswdigit_l(_C: wint_t, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn iswxdigit(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswxdigit_l(_C: wint_t, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn iswspace(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswspace_l(_C: wint_t, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn iswpunct(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswpunct_l(_C: wint_t, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn iswalnum(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswalnum_l(_C: wint_t, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn iswprint(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswprint_l(_C: wint_t, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn iswgraph(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswgraph_l(_C: wint_t, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn iswcntrl(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswcntrl_l(_C: wint_t, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn iswascii(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn isleadbyte(_C: ::core::ffi::c_int) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _isleadbyte_l( - _C: ::core::ffi::c_int, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn towupper(_C: wint_t) -> wint_t; -} -extern "C" { - pub fn _towupper_l(_C: wint_t, _Locale: _locale_t) -> wint_t; -} -extern "C" { - pub fn towlower(_C: wint_t) -> wint_t; -} -extern "C" { - pub fn _towlower_l(_C: wint_t, _Locale: _locale_t) -> wint_t; -} -extern "C" { - pub fn iswctype(_C: wint_t, _Type: wctype_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswctype_l( - _C: wint_t, - _Type: wctype_t, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn __iswcsymf(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswcsymf_l(_C: wint_t, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn __iswcsym(_C: wint_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _iswcsym_l(_C: wint_t, _Locale: _locale_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn is_wctype(_C: wint_t, _Type: wctype_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _rotl8( - Value: ::core::ffi::c_uchar, - Shift: ::core::ffi::c_uchar, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _rotl16( - Value: ::core::ffi::c_ushort, - Shift: ::core::ffi::c_uchar, - ) -> ::core::ffi::c_ushort; -} -extern "C" { - pub fn _rotr8( - Value: ::core::ffi::c_uchar, - Shift: ::core::ffi::c_uchar, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _rotr16( - Value: ::core::ffi::c_ushort, - Shift: ::core::ffi::c_uchar, - ) -> ::core::ffi::c_ushort; -} -extern "C" { - pub fn _rotl( - Value: ::core::ffi::c_uint, - Shift: ::core::ffi::c_int, - ) -> ::core::ffi::c_uint; -} -extern "C" { - pub fn _rotl64( - Value: ::core::ffi::c_ulonglong, - Shift: ::core::ffi::c_int, - ) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn _rotr( - Value: ::core::ffi::c_uint, - Shift: ::core::ffi::c_int, - ) -> ::core::ffi::c_uint; -} -extern "C" { - pub fn _rotr64( - Value: ::core::ffi::c_ulonglong, - Shift: ::core::ffi::c_int, - ) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn _memccpy( - _Dst: *mut ::core::ffi::c_void, - _Src: *const ::core::ffi::c_void, - _Val: ::core::ffi::c_int, - _MaxCount: usize, - ) -> *mut ::core::ffi::c_void; -} -extern "C" { - pub fn memchr( - _Buf: *const ::core::ffi::c_void, - _Val: ::core::ffi::c_int, - _MaxCount: ::core::ffi::c_ulonglong, - ) -> *mut ::core::ffi::c_void; -} -extern "C" { - pub fn _memicmp( - _Buf1: *const ::core::ffi::c_void, - _Buf2: *const ::core::ffi::c_void, - _Size: usize, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _memicmp_l( - _Buf1: *const ::core::ffi::c_void, - _Buf2: *const ::core::ffi::c_void, - _Size: usize, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn memcmp( - _Buf1: *const ::core::ffi::c_void, - _Buf2: *const ::core::ffi::c_void, - _Size: ::core::ffi::c_ulonglong, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn memcpy( - _Dst: *mut ::core::ffi::c_void, - _Src: *const ::core::ffi::c_void, - _MaxCount: ::core::ffi::c_ulonglong, - ) -> *mut ::core::ffi::c_void; -} -extern "C" { - pub fn memcpy_s( - _Dst: *mut ::core::ffi::c_void, - _DstSize: rsize_t, - _Src: *const ::core::ffi::c_void, - _MaxCount: rsize_t, - ) -> errno_t; -} -extern "C" { - pub fn memset( - _Dst: *mut ::core::ffi::c_void, - _Val: ::core::ffi::c_int, - _Size: ::core::ffi::c_ulonglong, - ) -> *mut ::core::ffi::c_void; -} -extern "C" { - pub fn memccpy( - _Dst: *mut ::core::ffi::c_void, - _Src: *const ::core::ffi::c_void, - _Val: ::core::ffi::c_int, - _Size: ::core::ffi::c_ulonglong, - ) -> *mut ::core::ffi::c_void; -} -extern "C" { - pub fn memicmp( - _Buf1: *const ::core::ffi::c_void, - _Buf2: *const ::core::ffi::c_void, - _Size: usize, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _strset_s( - _Dst: *mut ::core::ffi::c_char, - _DstSize: usize, - _Value: ::core::ffi::c_int, - ) -> errno_t; -} -extern "C" { - pub fn _strset( - _Dest: *mut ::core::ffi::c_char, - _Value: ::core::ffi::c_int, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strcpy_s( - _Dst: *mut ::core::ffi::c_char, - _SizeInBytes: rsize_t, - _Src: *const ::core::ffi::c_char, - ) -> errno_t; -} -extern "C" { - pub fn strcpy( - _Dest: *mut ::core::ffi::c_char, - _Source: *const ::core::ffi::c_char, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strcat_s( - _Dst: *mut ::core::ffi::c_char, - _SizeInBytes: rsize_t, - _Src: *const ::core::ffi::c_char, - ) -> errno_t; -} -extern "C" { - pub fn strcat( - _Dest: *mut ::core::ffi::c_char, - _Source: *const ::core::ffi::c_char, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strcmp( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn strlen(_Str: *const ::core::ffi::c_char) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn strnlen(_Str: *const ::core::ffi::c_char, _MaxCount: usize) -> usize; -} -extern "C" { - pub fn memmove_s( - _Dst: *mut ::core::ffi::c_void, - _DstSize: rsize_t, - _Src: *const ::core::ffi::c_void, - _MaxCount: rsize_t, - ) -> errno_t; -} -extern "C" { - pub fn memmove( - _Dst: *mut ::core::ffi::c_void, - _Src: *const ::core::ffi::c_void, - _Size: ::core::ffi::c_ulonglong, - ) -> *mut ::core::ffi::c_void; -} -extern "C" { - pub fn _strdup(_Src: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strchr( - _Str: *const ::core::ffi::c_char, - _Val: ::core::ffi::c_int, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn _stricmp( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _strcmpi( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _stricmp_l( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn strcoll( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _strcoll_l( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _stricoll( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _stricoll_l( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _strncoll( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - _MaxCount: usize, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _strncoll_l( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - _MaxCount: usize, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _strnicoll( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - _MaxCount: usize, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _strnicoll_l( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - _MaxCount: usize, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn strcspn( - _Str: *const ::core::ffi::c_char, - _Control: *const ::core::ffi::c_char, - ) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn _strerror(_ErrMsg: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn _strerror_s( - _Buf: *mut ::core::ffi::c_char, - _SizeInBytes: usize, - _ErrMsg: *const ::core::ffi::c_char, - ) -> errno_t; -} -extern "C" { - pub fn strerror(arg1: ::core::ffi::c_int) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strerror_s( - _Buf: *mut ::core::ffi::c_char, - _SizeInBytes: usize, - _ErrNum: ::core::ffi::c_int, - ) -> errno_t; -} -extern "C" { - pub fn _strlwr_s(_Str: *mut ::core::ffi::c_char, _Size: usize) -> errno_t; -} -extern "C" { - pub fn _strlwr(_String: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn _strlwr_s_l( - _Str: *mut ::core::ffi::c_char, - _Size: usize, - _Locale: _locale_t, - ) -> errno_t; -} -extern "C" { - pub fn _strlwr_l( - _String: *mut ::core::ffi::c_char, - _Locale: _locale_t, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strncat_s( - _Dst: *mut ::core::ffi::c_char, - _SizeInBytes: rsize_t, - _Src: *const ::core::ffi::c_char, - _MaxCount: rsize_t, - ) -> errno_t; -} -extern "C" { - pub fn strncat( - _Dest: *mut ::core::ffi::c_char, - _Source: *const ::core::ffi::c_char, - _Count: ::core::ffi::c_ulonglong, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strncmp( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - _MaxCount: ::core::ffi::c_ulonglong, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _strnicmp( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - _MaxCount: usize, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _strnicmp_l( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - _MaxCount: usize, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn strncpy_s( - _Dst: *mut ::core::ffi::c_char, - _SizeInBytes: rsize_t, - _Src: *const ::core::ffi::c_char, - _MaxCount: rsize_t, - ) -> errno_t; -} -extern "C" { - pub fn strncpy( - _Dest: *mut ::core::ffi::c_char, - _Source: *const ::core::ffi::c_char, - _Count: ::core::ffi::c_ulonglong, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn _strnset_s( - _Str: *mut ::core::ffi::c_char, - _SizeInBytes: usize, - _Val: ::core::ffi::c_int, - _MaxCount: usize, - ) -> errno_t; -} -extern "C" { - pub fn _strnset( - _Dest: *mut ::core::ffi::c_char, - _Val: ::core::ffi::c_int, - _Count: usize, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strpbrk( - _Str: *const ::core::ffi::c_char, - _Control: *const ::core::ffi::c_char, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strrchr( - _Str: *const ::core::ffi::c_char, - _Ch: ::core::ffi::c_int, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn _strrev(_Str: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strspn( - _Str: *const ::core::ffi::c_char, - _Control: *const ::core::ffi::c_char, - ) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn strstr( - _Str: *const ::core::ffi::c_char, - _SubStr: *const ::core::ffi::c_char, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strtok( - _Str: *mut ::core::ffi::c_char, - _Delim: *const ::core::ffi::c_char, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strtok_s( - _Str: *mut ::core::ffi::c_char, - _Delim: *const ::core::ffi::c_char, - _Context: *mut *mut ::core::ffi::c_char, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn _strupr_s(_Str: *mut ::core::ffi::c_char, _Size: usize) -> errno_t; -} -extern "C" { - pub fn _strupr(_String: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn _strupr_s_l( - _Str: *mut ::core::ffi::c_char, - _Size: usize, - _Locale: _locale_t, - ) -> errno_t; -} -extern "C" { - pub fn _strupr_l( - _String: *mut ::core::ffi::c_char, - _Locale: _locale_t, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strxfrm( - _Dst: *mut ::core::ffi::c_char, - _Src: *const ::core::ffi::c_char, - _MaxCount: ::core::ffi::c_ulonglong, - ) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn _strxfrm_l( - _Dst: *mut ::core::ffi::c_char, - _Src: *const ::core::ffi::c_char, - _MaxCount: usize, - _Locale: _locale_t, - ) -> usize; -} -extern "C" { - pub fn strdup(_Src: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strcmpi( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn stricmp( - _Str1: *const ::core::ffi::c_char, - _Str2: *const ::core::ffi::c_char, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn strlwr(_Str: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strnicmp( - _Str1: *const ::core::ffi::c_char, - _Str: *const ::core::ffi::c_char, - _MaxCount: usize, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn strnset( - _Str: *mut ::core::ffi::c_char, - _Val: ::core::ffi::c_int, - _MaxCount: usize, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strrev(_Str: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strset( - _Str: *mut ::core::ffi::c_char, - _Val: ::core::ffi::c_int, - ) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn strupr(_Str: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char; -} -extern "C" { - pub fn _wcsdup(_Str: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcscat_s( - _Dst: *mut wchar_t, - _SizeInWords: rsize_t, - _Src: *const wchar_t, - ) -> errno_t; -} -extern "C" { - pub fn wcscat(_Dest: *mut wchar_t, _Source: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcschr( - _Str: *const ::core::ffi::c_ushort, - _Ch: ::core::ffi::c_ushort, - ) -> *mut ::core::ffi::c_ushort; -} -extern "C" { - pub fn wcscmp( - _Str1: *const ::core::ffi::c_ushort, - _Str2: *const ::core::ffi::c_ushort, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn wcscpy_s( - _Dst: *mut wchar_t, - _SizeInWords: rsize_t, - _Src: *const wchar_t, - ) -> errno_t; -} -extern "C" { - pub fn wcscpy(_Dest: *mut wchar_t, _Source: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcscspn(_Str: *const wchar_t, _Control: *const wchar_t) -> usize; -} -extern "C" { - pub fn wcslen(_Str: *const ::core::ffi::c_ushort) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn wcsnlen(_Src: *const wchar_t, _MaxCount: usize) -> usize; -} -extern "C" { - pub fn wcsncat_s( - _Dst: *mut wchar_t, - _SizeInWords: rsize_t, - _Src: *const wchar_t, - _MaxCount: rsize_t, - ) -> errno_t; -} -extern "C" { - pub fn wcsncat( - _Dest: *mut wchar_t, - _Source: *const wchar_t, - _Count: usize, - ) -> *mut wchar_t; -} -extern "C" { - pub fn wcsncmp( - _Str1: *const ::core::ffi::c_ushort, - _Str2: *const ::core::ffi::c_ushort, - _MaxCount: ::core::ffi::c_ulonglong, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn wcsncpy_s( - _Dst: *mut wchar_t, - _SizeInWords: rsize_t, - _Src: *const wchar_t, - _MaxCount: rsize_t, - ) -> errno_t; -} -extern "C" { - pub fn wcsncpy( - _Dest: *mut wchar_t, - _Source: *const wchar_t, - _Count: usize, - ) -> *mut wchar_t; -} -extern "C" { - pub fn wcspbrk(_Str: *const wchar_t, _Control: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcsrchr(_Str: *const wchar_t, _Ch: wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcsspn(_Str: *const wchar_t, _Control: *const wchar_t) -> usize; -} -extern "C" { - pub fn wcsstr(_Str: *const wchar_t, _SubStr: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcstok(_Str: *mut wchar_t, _Delim: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcstok_s( - _Str: *mut wchar_t, - _Delim: *const wchar_t, - _Context: *mut *mut wchar_t, - ) -> *mut wchar_t; -} -extern "C" { - pub fn _wcserror(_ErrNum: ::core::ffi::c_int) -> *mut wchar_t; -} -extern "C" { - pub fn _wcserror_s( - _Buf: *mut wchar_t, - _SizeInWords: usize, - _ErrNum: ::core::ffi::c_int, - ) -> errno_t; -} -extern "C" { - pub fn __wcserror(_Str: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn __wcserror_s( - _Buffer: *mut wchar_t, - _SizeInWords: usize, - _ErrMsg: *const wchar_t, - ) -> errno_t; -} -extern "C" { - pub fn _wcsicmp(_Str1: *const wchar_t, _Str2: *const wchar_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _wcsicmp_l( - _Str1: *const wchar_t, - _Str2: *const wchar_t, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _wcsnicmp( - _Str1: *const wchar_t, - _Str2: *const wchar_t, - _MaxCount: usize, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _wcsnicmp_l( - _Str1: *const wchar_t, - _Str2: *const wchar_t, - _MaxCount: usize, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _wcsnset_s( - _Dst: *mut wchar_t, - _SizeInWords: usize, - _Val: wchar_t, - _MaxCount: usize, - ) -> errno_t; -} -extern "C" { - pub fn _wcsnset(_Str: *mut wchar_t, _Val: wchar_t, _MaxCount: usize) -> *mut wchar_t; -} -extern "C" { - pub fn _wcsrev(_Str: *mut wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn _wcsset_s( - _Dst: *mut wchar_t, - _SizeInWords: usize, - _Value: wchar_t, - ) -> errno_t; -} -extern "C" { - pub fn _wcsset(_Str: *mut wchar_t, _Val: wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn _wcslwr_s(_Str: *mut wchar_t, _SizeInWords: usize) -> errno_t; -} -extern "C" { - pub fn _wcslwr(_String: *mut wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn _wcslwr_s_l( - _Str: *mut wchar_t, - _SizeInWords: usize, - _Locale: _locale_t, - ) -> errno_t; -} -extern "C" { - pub fn _wcslwr_l(_String: *mut wchar_t, _Locale: _locale_t) -> *mut wchar_t; -} -extern "C" { - pub fn _wcsupr_s(_Str: *mut wchar_t, _Size: usize) -> errno_t; -} -extern "C" { - pub fn _wcsupr(_String: *mut wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn _wcsupr_s_l(_Str: *mut wchar_t, _Size: usize, _Locale: _locale_t) -> errno_t; -} -extern "C" { - pub fn _wcsupr_l(_String: *mut wchar_t, _Locale: _locale_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcsxfrm(_Dst: *mut wchar_t, _Src: *const wchar_t, _MaxCount: usize) -> usize; -} -extern "C" { - pub fn _wcsxfrm_l( - _Dst: *mut wchar_t, - _Src: *const wchar_t, - _MaxCount: usize, - _Locale: _locale_t, - ) -> usize; -} -extern "C" { - pub fn wcscoll(_Str1: *const wchar_t, _Str2: *const wchar_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _wcscoll_l( - _Str1: *const wchar_t, - _Str2: *const wchar_t, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _wcsicoll(_Str1: *const wchar_t, _Str2: *const wchar_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _wcsicoll_l( - _Str1: *const wchar_t, - _Str2: *const wchar_t, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _wcsncoll( - _Str1: *const wchar_t, - _Str2: *const wchar_t, - _MaxCount: usize, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _wcsncoll_l( - _Str1: *const wchar_t, - _Str2: *const wchar_t, - _MaxCount: usize, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _wcsnicoll( - _Str1: *const wchar_t, - _Str2: *const wchar_t, - _MaxCount: usize, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _wcsnicoll_l( - _Str1: *const wchar_t, - _Str2: *const wchar_t, - _MaxCount: usize, - _Locale: _locale_t, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn wcsdup(_Str: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcsicmp(_Str1: *const wchar_t, _Str2: *const wchar_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn wcsnicmp( - _Str1: *const wchar_t, - _Str2: *const wchar_t, - _MaxCount: usize, - ) -> ::core::ffi::c_int; -} -extern "C" { - pub fn wcsnset(_Str: *mut wchar_t, _Val: wchar_t, _MaxCount: usize) -> *mut wchar_t; -} -extern "C" { - pub fn wcsrev(_Str: *mut wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcsset(_Str: *mut wchar_t, _Val: wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcslwr(_Str: *mut wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcsupr(_Str: *mut wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcsicoll(_Str1: *const wchar_t, _Str2: *const wchar_t) -> ::core::ffi::c_int; -} -extern "C" { - pub fn _RTL_CONSTANT_STRING_type_check( - s: *const ::core::ffi::c_void, - ) -> ::core::ffi::c_char; -} -extern "C" { - pub fn __readgsqword(Offset: ::core::ffi::c_ulong) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn _bittest( - Base: *const ::core::ffi::c_long, - Offset: ::core::ffi::c_long, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _bittestandcomplement( - Base: *mut ::core::ffi::c_long, - Offset: ::core::ffi::c_long, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _bittestandset( - Base: *mut ::core::ffi::c_long, - Offset: ::core::ffi::c_long, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _bittestandreset( - Base: *mut ::core::ffi::c_long, - Offset: ::core::ffi::c_long, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _interlockedbittestandset( - Base: *mut ::core::ffi::c_long, - Offset: ::core::ffi::c_long, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _interlockedbittestandreset( - Base: *mut ::core::ffi::c_long, - Offset: ::core::ffi::c_long, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _bittest64( - Base: *const ::core::ffi::c_longlong, - Offset: ::core::ffi::c_longlong, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _bittestandcomplement64( - Base: *mut ::core::ffi::c_longlong, - Offset: ::core::ffi::c_longlong, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _bittestandset64( - Base: *mut ::core::ffi::c_longlong, - Offset: ::core::ffi::c_longlong, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _bittestandreset64( - Base: *mut ::core::ffi::c_longlong, - Offset: ::core::ffi::c_longlong, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _interlockedbittestandset64( - Base: *mut ::core::ffi::c_longlong, - Offset: ::core::ffi::c_longlong, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _interlockedbittestandreset64( - Base: *mut ::core::ffi::c_longlong, - Offset: ::core::ffi::c_longlong, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _BitScanForward( - Index: *mut ::core::ffi::c_ulong, - Mask: ::core::ffi::c_ulong, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _BitScanReverse( - Index: *mut ::core::ffi::c_ulong, - Mask: ::core::ffi::c_ulong, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _BitScanForward64( - Index: *mut ::core::ffi::c_ulong, - Mask: ::core::ffi::c_ulonglong, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _BitScanReverse64( - Index: *mut ::core::ffi::c_ulong, - Mask: ::core::ffi::c_ulonglong, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _InterlockedIncrement16( - Addend: *mut ::core::ffi::c_short, - ) -> ::core::ffi::c_short; -} -extern "C" { - pub fn _InterlockedDecrement16( - Addend: *mut ::core::ffi::c_short, - ) -> ::core::ffi::c_short; -} -extern "C" { - pub fn _InterlockedCompareExchange16( - Destination: *mut ::core::ffi::c_short, - ExChange: ::core::ffi::c_short, - Comperand: ::core::ffi::c_short, - ) -> ::core::ffi::c_short; -} -extern "C" { - pub fn _InterlockedAnd( - Destination: *mut ::core::ffi::c_long, - Value: ::core::ffi::c_long, - ) -> ::core::ffi::c_long; -} -extern "C" { - pub fn _InterlockedOr( - Destination: *mut ::core::ffi::c_long, - Value: ::core::ffi::c_long, - ) -> ::core::ffi::c_long; -} -extern "C" { - pub fn _InterlockedXor( - Destination: *mut ::core::ffi::c_long, - Value: ::core::ffi::c_long, - ) -> ::core::ffi::c_long; -} -extern "C" { - pub fn _InterlockedAnd64( - Destination: *mut ::core::ffi::c_longlong, - Value: ::core::ffi::c_longlong, - ) -> ::core::ffi::c_longlong; -} -extern "C" { - pub fn _InterlockedOr64( - Destination: *mut ::core::ffi::c_longlong, - Value: ::core::ffi::c_longlong, - ) -> ::core::ffi::c_longlong; -} -extern "C" { - pub fn _InterlockedXor64( - Destination: *mut ::core::ffi::c_longlong, - Value: ::core::ffi::c_longlong, - ) -> ::core::ffi::c_longlong; -} -extern "C" { - pub fn _InterlockedIncrement( - Addend: *mut ::core::ffi::c_long, - ) -> ::core::ffi::c_long; -} -extern "C" { - pub fn _InterlockedDecrement( - Addend: *mut ::core::ffi::c_long, - ) -> ::core::ffi::c_long; -} -extern "C" { - pub fn _InterlockedExchange( - Target: *mut ::core::ffi::c_long, - Value: ::core::ffi::c_long, - ) -> ::core::ffi::c_long; -} -extern "C" { - pub fn _InterlockedExchangeAdd( - Addend: *mut ::core::ffi::c_long, - Value: ::core::ffi::c_long, - ) -> ::core::ffi::c_long; -} -extern "C" { - pub fn _InterlockedCompareExchange( - Destination: *mut ::core::ffi::c_long, - ExChange: ::core::ffi::c_long, - Comperand: ::core::ffi::c_long, - ) -> ::core::ffi::c_long; -} -extern "C" { - pub fn _InterlockedIncrement64( - Addend: *mut ::core::ffi::c_longlong, - ) -> ::core::ffi::c_longlong; -} -extern "C" { - pub fn _InterlockedDecrement64( - Addend: *mut ::core::ffi::c_longlong, - ) -> ::core::ffi::c_longlong; -} -extern "C" { - pub fn _InterlockedExchange64( - Target: *mut ::core::ffi::c_longlong, - Value: ::core::ffi::c_longlong, - ) -> ::core::ffi::c_longlong; -} -extern "C" { - pub fn _InterlockedExchangeAdd64( - Addend: *mut ::core::ffi::c_longlong, - Value: ::core::ffi::c_longlong, - ) -> ::core::ffi::c_longlong; -} -extern "C" { - pub fn _InterlockedCompareExchange64( - Destination: *mut ::core::ffi::c_longlong, - ExChange: ::core::ffi::c_longlong, - Comperand: ::core::ffi::c_longlong, - ) -> ::core::ffi::c_longlong; -} -extern "C" { - pub fn _InterlockedCompareExchange128( - Destination: *mut ::core::ffi::c_longlong, - ExchangeHigh: ::core::ffi::c_longlong, - ExchangeLow: ::core::ffi::c_longlong, - ComparandResult: *mut ::core::ffi::c_longlong, - ) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn _InterlockedCompareExchangePointer( - Destination: *mut *mut ::core::ffi::c_void, - Exchange: *mut ::core::ffi::c_void, - Comperand: *mut ::core::ffi::c_void, - ) -> *mut ::core::ffi::c_void; -} -extern "C" { - pub fn _InterlockedExchangePointer( - Target: *mut *mut ::core::ffi::c_void, - Value: *mut ::core::ffi::c_void, - ) -> *mut ::core::ffi::c_void; -} -extern "C" { - pub fn _InterlockedExchange8( - Target: *mut ::core::ffi::c_char, - Value: ::core::ffi::c_char, - ) -> ::core::ffi::c_char; -} -extern "C" { - pub fn _InterlockedExchange16( - Destination: *mut ::core::ffi::c_short, - ExChange: ::core::ffi::c_short, - ) -> ::core::ffi::c_short; -} -extern "C" { - pub fn _InterlockedExchangeAdd8( - _Addend: *mut ::core::ffi::c_char, - _Value: ::core::ffi::c_char, - ) -> ::core::ffi::c_char; -} -extern "C" { - pub fn _InterlockedAnd8( - Destination: *mut ::core::ffi::c_char, - Value: ::core::ffi::c_char, - ) -> ::core::ffi::c_char; -} -extern "C" { - pub fn _InterlockedOr8( - Destination: *mut ::core::ffi::c_char, - Value: ::core::ffi::c_char, - ) -> ::core::ffi::c_char; -} -extern "C" { - pub fn _InterlockedXor8( - Destination: *mut ::core::ffi::c_char, - Value: ::core::ffi::c_char, - ) -> ::core::ffi::c_char; -} -extern "C" { - pub fn _InterlockedAnd16( - Destination: *mut ::core::ffi::c_short, - Value: ::core::ffi::c_short, - ) -> ::core::ffi::c_short; -} -extern "C" { - pub fn _InterlockedOr16( - Destination: *mut ::core::ffi::c_short, - Value: ::core::ffi::c_short, - ) -> ::core::ffi::c_short; -} -extern "C" { - pub fn _InterlockedXor16( - Destination: *mut ::core::ffi::c_short, - Value: ::core::ffi::c_short, - ) -> ::core::ffi::c_short; -} -extern "C" { - pub fn __cpuidex( - CPUInfo: *mut ::core::ffi::c_int, - Function: ::core::ffi::c_int, - SubLeaf: ::core::ffi::c_int, - ); -} -extern "C" { - pub fn _mm_clflush(Address: *const ::core::ffi::c_void); -} -extern "C" { - pub fn _ReadWriteBarrier(); -} -extern "C" { - pub fn __faststorefence(); -} -extern "C" { - pub fn _mm_lfence(); -} -extern "C" { - pub fn _mm_mfence(); -} -extern "C" { - pub fn _mm_sfence(); -} -extern "C" { - pub fn _mm_pause(); -} -extern "C" { - pub fn _mm_prefetch(a: *const ::core::ffi::c_char, sel: ::core::ffi::c_int); -} -extern "C" { - pub fn _m_prefetchw(Source: *const ::core::ffi::c_void); -} -extern "C" { - pub fn _mm_getcsr() -> ::core::ffi::c_uint; -} -extern "C" { - pub fn _mm_setcsr(MxCsr: ::core::ffi::c_uint); -} -extern "C" { - pub fn __getcallerseflags() -> ::core::ffi::c_uint; -} -extern "C" { - pub fn __segmentlimit(Selector: ULONG) -> ULONG; -} -extern "C" { - pub fn __readpmc(Counter: ULONG) -> ULONG64; -} -extern "C" { - pub fn __rdtsc() -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn __movsb(Destination: PUCHAR, Source: *const UCHAR, Count: SIZE_T); -} -extern "C" { - pub fn __movsw(Destination: PUSHORT, Source: *const USHORT, Count: SIZE_T); -} -extern "C" { - pub fn __movsd(Destination: PULONG, Source: *const ULONG, Count: SIZE_T); -} -extern "C" { - pub fn __movsq(Destination: PULONG64, Source: *const ULONG64, Count: SIZE_T); -} -extern "C" { - pub fn __stosb( - Destination: *mut ::core::ffi::c_uchar, - Value: ::core::ffi::c_uchar, - Count: ::core::ffi::c_ulonglong, - ); -} -extern "C" { - pub fn __stosw(Destination: PUSHORT, Value: USHORT, Count: SIZE_T); -} -extern "C" { - pub fn __stosd(Destination: PULONG, Value: ULONG, Count: SIZE_T); -} -extern "C" { - pub fn __stosq(Destination: PULONG64, Value: ULONG64, Count: SIZE_T); -} -extern "C" { - pub fn __mulh( - Multiplier: ::core::ffi::c_longlong, - Multiplicand: ::core::ffi::c_longlong, - ) -> ::core::ffi::c_longlong; -} -extern "C" { - pub fn __umulh( - Multiplier: ::core::ffi::c_ulonglong, - Multiplicand: ::core::ffi::c_ulonglong, - ) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn __popcnt64(operand: ::core::ffi::c_ulonglong) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn __shiftleft128( - LowPart: ::core::ffi::c_ulonglong, - HighPart: ::core::ffi::c_ulonglong, - Shift: ::core::ffi::c_uchar, - ) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn __shiftright128( - LowPart: ::core::ffi::c_ulonglong, - HighPart: ::core::ffi::c_ulonglong, - Shift: ::core::ffi::c_uchar, - ) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn _mul128( - Multiplier: ::core::ffi::c_longlong, - Multiplicand: ::core::ffi::c_longlong, - HighProduct: *mut ::core::ffi::c_longlong, - ) -> ::core::ffi::c_longlong; -} -extern "C" { - pub fn UnsignedMultiply128( - Multiplier: ULONG64, - Multiplicand: ULONG64, - HighProduct: *mut ULONG64, - ) -> ULONG64; -} -extern "C" { - pub fn _umul128( - Multiplier: ::core::ffi::c_ulonglong, - Multiplicand: ::core::ffi::c_ulonglong, - HighProduct: *mut ::core::ffi::c_ulonglong, - ) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn __readgsbyte(Offset: ::core::ffi::c_ulong) -> ::core::ffi::c_uchar; -} -extern "C" { - pub fn __readgsword(Offset: ::core::ffi::c_ulong) -> ::core::ffi::c_ushort; -} -extern "C" { - pub fn __readgsdword(Offset: ::core::ffi::c_ulong) -> ::core::ffi::c_ulong; -} -extern "C" { - pub fn __writegsbyte(Offset: ULONG, Data: UCHAR); -} -extern "C" { - pub fn __writegsword(Offset: ULONG, Data: USHORT); -} -extern "C" { - pub fn __writegsdword(Offset: ULONG, Data: ULONG); -} -extern "C" { - pub fn __writegsqword(Offset: ULONG, Data: ULONG64); -} -extern "C" { - pub fn __incgsbyte(Offset: ULONG); -} -extern "C" { - pub fn __addgsbyte(Offset: ULONG, Value: UCHAR); -} -extern "C" { - pub fn __incgsword(Offset: ULONG); -} -extern "C" { - pub fn __addgsword(Offset: ULONG, Value: USHORT); -} -extern "C" { - pub fn __incgsdword(Offset: ULONG); -} -extern "C" { - pub fn __addgsdword(Offset: ULONG, Value: ULONG); -} -extern "C" { - pub fn __incgsqword(Offset: ULONG); -} -extern "C" { - pub fn __addgsqword(Offset: ULONG, Value: ULONG64); -} -extern "C" { - pub fn __int2c() -> !; -} -extern "C" { - #[must_use] - pub fn NtManagePartition( - TargetHandle: HANDLE, - SourceHandle: HANDLE, - PartitionInformationClass: PARTITION_INFORMATION_CLASS, - PartitionInformation: PVOID, - PartitionInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtPowerInformation( - InformationLevel: POWER_INFORMATION_LEVEL::Type, - InputBuffer: PVOID, - InputBufferLength: ULONG, - OutputBuffer: PVOID, - OutputBufferLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlAssert( - VoidFailedAssertion: PVOID, - VoidFileName: PVOID, - LineNumber: ULONG, - MutableMessage: PSTR, - ); -} -extern "C" { - pub fn __fastfail(Code: ::core::ffi::c_uint) -> !; -} -extern "C" { - #[must_use] - pub fn RtlIntegerToUnicodeString( - Value: ULONG, - Base: ULONG, - String: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlInt64ToUnicodeString( - Value: ULONGLONG, - Base: ULONG, - String: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUnicodeStringToInteger( - String: PCUNICODE_STRING, - Base: ULONG, - Value: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUnicodeStringToInt64( - String: PCUNICODE_STRING, - Base: ULONG, - Number: PLONG64, - EndPointer: *mut PWSTR, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlInitString(DestinationString: PSTRING, SourceString: PCSZ); -} -extern "C" { - pub fn RtlInitAnsiString(DestinationString: PANSI_STRING, SourceString: PCSZ); -} -extern "C" { - pub fn RtlInitUTF8String(DestinationString: PUTF8_STRING, SourceString: PCSZ); -} -extern "C" { - pub fn RtlInitUnicodeString( - DestinationString: PUNICODE_STRING, - SourceString: PCWSTR, - ); -} -extern "C" { - #[must_use] - pub fn RtlQueryRegistryValues( - RelativeTo: ULONG, - Path: PCWSTR, - QueryTable: PRTL_QUERY_REGISTRY_TABLE, - Context: PVOID, - Environment: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn MmGetSystemRoutineAddress(SystemRoutineName: PUNICODE_STRING) -> PVOID; -} -extern "C" { - #[must_use] - pub fn RtlWriteRegistryValue( - RelativeTo: ULONG, - Path: PCWSTR, - ValueName: PCWSTR, - ValueType: ULONG, - ValueData: PVOID, - ValueLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlDeleteRegistryValue( - RelativeTo: ULONG, - Path: PCWSTR, - ValueName: PCWSTR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlCreateRegistryKey(RelativeTo: ULONG, Path: PWSTR) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlCheckRegistryKey(RelativeTo: ULONG, Path: PWSTR) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlInitAnsiStringEx( - DestinationString: PANSI_STRING, - SourceString: PCSZ, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlInitStringEx(DestinationString: PSTRING, SourceString: PCSZ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlInitUTF8StringEx( - DestinationString: PUTF8_STRING, - SourceString: PCSZ, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlAnsiStringToUnicodeString( - DestinationString: PUNICODE_STRING, - SourceString: PCANSI_STRING, - AllocateDestinationString: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUnicodeStringToAnsiString( - DestinationString: PANSI_STRING, - SourceString: PCUNICODE_STRING, - AllocateDestinationString: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlCompareUnicodeStrings( - String1: PCWCH, - String1Length: SIZE_T, - String2: PCWCH, - String2Length: SIZE_T, - CaseInSensitive: BOOLEAN, - ) -> LONG; -} -extern "C" { - pub fn RtlCompareUnicodeString( - String1: PCUNICODE_STRING, - String2: PCUNICODE_STRING, - CaseInSensitive: BOOLEAN, - ) -> LONG; -} -extern "C" { - pub fn RtlEqualUnicodeString( - String1: PCUNICODE_STRING, - String2: PCUNICODE_STRING, - CaseInSensitive: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn RtlHashUnicodeString( - String: PCUNICODE_STRING, - CaseInSensitive: BOOLEAN, - HashAlgorithm: ULONG, - HashValue: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlCopyUnicodeString( - DestinationString: PUNICODE_STRING, - SourceString: PCUNICODE_STRING, - ); -} -extern "C" { - #[must_use] - pub fn RtlAppendUnicodeStringToString( - Destination: PUNICODE_STRING, - Source: PCUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlAppendUnicodeToString( - Destination: PUNICODE_STRING, - Source: PCWSTR, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlUpcaseUnicodeChar(SourceCharacter: WCHAR) -> WCHAR; -} -extern "C" { - pub fn RtlDowncaseUnicodeChar(SourceCharacter: WCHAR) -> WCHAR; -} -extern "C" { - pub fn RtlFreeUnicodeString(UnicodeString: PUNICODE_STRING); -} -extern "C" { - pub fn RtlFreeAnsiString(AnsiString: PANSI_STRING); -} -extern "C" { - pub fn RtlFreeUTF8String(utf8String: PUTF8_STRING); -} -extern "C" { - pub fn RtlxUnicodeStringToAnsiSize(UnicodeString: PCUNICODE_STRING) -> ULONG; -} -extern "C" { - pub fn RtlxAnsiStringToUnicodeSize(AnsiString: PCANSI_STRING) -> ULONG; -} -extern "C" { - #[must_use] - pub fn RtlUnicodeToUTF8N( - UTF8StringDestination: PCHAR, - UTF8StringMaxByteCount: ULONG, - UTF8StringActualByteCount: PULONG, - UnicodeStringSource: PCWCH, - UnicodeStringByteCount: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUTF8ToUnicodeN( - UnicodeStringDestination: PWSTR, - UnicodeStringMaxByteCount: ULONG, - UnicodeStringActualByteCount: PULONG, - UTF8StringSource: PCCH, - UTF8StringByteCount: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUnicodeStringToUTF8String( - DestinationString: PUTF8_STRING, - SourceString: PCUNICODE_STRING, - AllocateDestinationString: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUTF8StringToUnicodeString( - DestinationString: PUNICODE_STRING, - SourceString: PUTF8_STRING, - AllocateDestinationString: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlStringFromGUID(Guid: *const GUID, GuidString: PUNICODE_STRING) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlGUIDFromString(GuidString: PCUNICODE_STRING, Guid: *mut GUID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlGenerateClass5Guid( - NamespaceGuid: *const GUID, - Buffer: PVOID, - BufferSize: ULONG, - Guid: *mut GUID, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlCopyMemoryNonTemporal( - Destination: *mut ::core::ffi::c_void, - Source: *const ::core::ffi::c_void, - Length: SIZE_T, - ); -} -extern "C" { - pub fn RtlFillMemoryNonTemporal( - Destination: *mut ::core::ffi::c_void, - Length: SIZE_T, - Value: UCHAR, - ); -} -extern "C" { - pub fn RtlPrefetchMemoryNonTemporal(Source: PVOID, Length: SIZE_T); -} -extern "C" { - pub fn DbgBreakPointWithStatus(Status: ULONG); -} -extern "C" { - pub fn DbgPrint(Format: PCSTR, ...) -> ULONG; -} -extern "C" { - pub fn DbgPrintEx(ComponentId: ULONG, Level: ULONG, Format: PCSTR, ...) -> ULONG; -} -extern "C" { - pub fn vDbgPrintEx( - ComponentId: ULONG, - Level: ULONG, - Format: PCCH, - arglist: va_list, - ) -> ULONG; -} -extern "C" { - pub fn vDbgPrintExWithPrefix( - Prefix: PCCH, - ComponentId: ULONG, - Level: ULONG, - Format: PCCH, - arglist: va_list, - ) -> ULONG; -} -extern "C" { - pub fn DbgPrintReturnControlC(Format: PCCH, ...) -> ULONG; -} -extern "C" { - #[must_use] - pub fn DbgQueryDebugFilterState(ComponentId: ULONG, Level: ULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn DbgSetDebugFilterState( - ComponentId: ULONG, - Level: ULONG, - State: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn DbgSetDebugPrintCallback( - DebugPrintCallback: PDEBUG_PRINT_CALLBACK, - Enable: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlTimeToTimeFields(Time: PLARGE_INTEGER, TimeFields: PTIME_FIELDS); -} -extern "C" { - pub fn RtlTimeFieldsToTime( - TimeFields: PTIME_FIELDS, - Time: PLARGE_INTEGER, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlInitializeBitMap( - BitMapHeader: PRTL_BITMAP, - BitMapBuffer: PULONG, - SizeOfBitMap: ULONG, - ); -} -extern "C" { - pub fn RtlClearBit(BitMapHeader: PRTL_BITMAP, BitNumber: ULONG); -} -extern "C" { - pub fn RtlSetBit(BitMapHeader: PRTL_BITMAP, BitNumber: ULONG); -} -extern "C" { - pub fn RtlTestBit(BitMapHeader: PRTL_BITMAP, BitNumber: ULONG) -> BOOLEAN; -} -extern "C" { - pub fn RtlClearAllBits(BitMapHeader: PRTL_BITMAP); -} -extern "C" { - pub fn RtlSetAllBits(BitMapHeader: PRTL_BITMAP); -} -extern "C" { - pub fn RtlFindClearBits( - BitMapHeader: PRTL_BITMAP, - NumberToFind: ULONG, - HintIndex: ULONG, - ) -> ULONG; -} -extern "C" { - pub fn RtlFindSetBits( - BitMapHeader: PRTL_BITMAP, - NumberToFind: ULONG, - HintIndex: ULONG, - ) -> ULONG; -} -extern "C" { - pub fn RtlFindClearBitsAndSet( - BitMapHeader: PRTL_BITMAP, - NumberToFind: ULONG, - HintIndex: ULONG, - ) -> ULONG; -} -extern "C" { - pub fn RtlFindSetBitsAndClear( - BitMapHeader: PRTL_BITMAP, - NumberToFind: ULONG, - HintIndex: ULONG, - ) -> ULONG; -} -extern "C" { - pub fn RtlClearBits( - BitMapHeader: PRTL_BITMAP, - StartingIndex: ULONG, - NumberToClear: ULONG, - ); -} -extern "C" { - pub fn RtlSetBits( - BitMapHeader: PRTL_BITMAP, - StartingIndex: ULONG, - NumberToSet: ULONG, - ); -} -extern "C" { - pub fn RtlFindClearRuns( - BitMapHeader: PRTL_BITMAP, - RunArray: PRTL_BITMAP_RUN, - SizeOfRunArray: ULONG, - LocateLongestRuns: BOOLEAN, - ) -> ULONG; -} -extern "C" { - pub fn RtlFindLongestRunClear( - BitMapHeader: PRTL_BITMAP, - StartingIndex: PULONG, - ) -> ULONG; -} -extern "C" { - pub fn RtlFindFirstRunClear( - BitMapHeader: PRTL_BITMAP, - StartingIndex: PULONG, - ) -> ULONG; -} -extern "C" { - pub fn RtlNumberOfClearBitsInRange( - BitMapHeader: PRTL_BITMAP, - StartingIndex: ULONG, - Length: ULONG, - ) -> ULONG; -} -extern "C" { - pub fn RtlNumberOfSetBitsInRange( - BitMapHeader: PRTL_BITMAP, - StartingIndex: ULONG, - Length: ULONG, - ) -> ULONG; -} -extern "C" { - pub fn RtlNumberOfClearBits(BitMapHeader: PRTL_BITMAP) -> ULONG; -} -extern "C" { - pub fn RtlNumberOfSetBits(BitMapHeader: PRTL_BITMAP) -> ULONG; -} -extern "C" { - pub fn RtlAreBitsClear( - BitMapHeader: PRTL_BITMAP, - StartingIndex: ULONG, - Length: ULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlAreBitsSet( - BitMapHeader: PRTL_BITMAP, - StartingIndex: ULONG, - Length: ULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlFindNextForwardRunClear( - BitMapHeader: PRTL_BITMAP, - FromIndex: ULONG, - StartingRunIndex: PULONG, - ) -> ULONG; -} -extern "C" { - pub fn RtlFindLastBackwardRunClear( - BitMapHeader: PRTL_BITMAP, - FromIndex: ULONG, - StartingRunIndex: PULONG, - ) -> ULONG; -} -extern "C" { - pub fn RtlFindLeastSignificantBit(Set: ULONGLONG) -> CCHAR; -} -extern "C" { - pub fn RtlFindMostSignificantBit(Set: ULONGLONG) -> CCHAR; -} -extern "C" { - pub fn RtlNumberOfSetBitsUlongPtr(Target: ULONG_PTR) -> ULONG; -} -extern "C" { - pub fn RtlCopyBitMap( - Source: PRTL_BITMAP, - Destination: PRTL_BITMAP, - TargetBit: ULONG, - ); -} -extern "C" { - pub fn RtlExtractBitMap( - Source: PRTL_BITMAP, - Destination: PRTL_BITMAP, - TargetBit: ULONG, - NumberOfBits: ULONG, - ); -} -extern "C" { - #[must_use] - pub fn RtlCreateSecurityDescriptor( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - Revision: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlValidSecurityDescriptor( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlLengthSecurityDescriptor( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - ) -> ULONG; -} -extern "C" { - pub fn RtlValidRelativeSecurityDescriptor( - SecurityDescriptorInput: PSECURITY_DESCRIPTOR, - SecurityDescriptorLength: ULONG, - RequiredInformation: SECURITY_INFORMATION, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn RtlSetDaclSecurityDescriptor( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - DaclPresent: BOOLEAN, - Dacl: PACL, - DaclDefaulted: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn _byteswap_ushort(arg1: ::core::ffi::c_ushort) -> ::core::ffi::c_ushort; -} -extern "C" { - pub fn _byteswap_ulong(arg1: ::core::ffi::c_ulong) -> ::core::ffi::c_ulong; -} -extern "C" { - pub fn _byteswap_uint64(arg1: ::core::ffi::c_ulonglong) -> ::core::ffi::c_ulonglong; -} -extern "C" { - pub fn VerSetConditionMask( - ConditionMask: ULONGLONG, - TypeMask: ULONG, - Condition: UCHAR, - ) -> ULONGLONG; -} -extern "C" { - #[must_use] - pub fn RtlGetVersion(lpVersionInformation: PRTL_OSVERSIONINFOW) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlVerifyVersionInfo( - VersionInfo: PRTL_OSVERSIONINFOEXW, - TypeMask: ULONG, - ConditionMask: ULONGLONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlIsNtDdiVersionAvailable(Version: ULONG) -> BOOLEAN; -} -extern "C" { - pub fn RtlIsServicePackVersionInstalled(Version: ULONG) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn RtlIoEncodeMemIoResource( - Descriptor: PIO_RESOURCE_DESCRIPTOR, - Type: UCHAR, - Length: ULONGLONG, - Alignment: ULONGLONG, - MinimumAddress: ULONGLONG, - MaximumAddress: ULONGLONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlCmEncodeMemIoResource( - Descriptor: PCM_PARTIAL_RESOURCE_DESCRIPTOR, - Type: UCHAR, - Length: ULONGLONG, - Start: ULONGLONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlIoDecodeMemIoResource( - Descriptor: PIO_RESOURCE_DESCRIPTOR, - Alignment: PULONGLONG, - MinimumAddress: PULONGLONG, - MaximumAddress: PULONGLONG, - ) -> ULONGLONG; -} -extern "C" { - pub fn RtlCmDecodeMemIoResource( - Descriptor: PCM_PARTIAL_RESOURCE_DESCRIPTOR, - Start: PULONGLONG, - ) -> ULONGLONG; -} -extern "C" { - #[must_use] - pub fn RtlFindClosestEncodableLength( - SourceLength: ULONGLONG, - TargetLength: PULONGLONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlIsUntrustedObject( - Handle: HANDLE, - Object: PVOID, - UntrustedObject: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlQueryValidationRunlevel(ComponentName: PCUNICODE_STRING) -> ULONG; -} -extern "C" { - pub fn RtlCrc32( - Buffer: *const ::core::ffi::c_void, - Size: usize, - InitialCrc: ULONG, - ) -> ULONG; -} -extern "C" { - pub fn RtlCrc64( - Buffer: *const ::core::ffi::c_void, - Size: usize, - InitialCrc: ULONGLONG, - ) -> ULONGLONG; -} -extern "C" { - pub fn RtlOsDeploymentState(Flags: ULONG) -> OS_DEPLOYEMENT_STATE_VALUES; -} -extern "C" { - pub fn RtlCompareMemory( - Source1: *const ::core::ffi::c_void, - Source2: *const ::core::ffi::c_void, - Length: SIZE_T, - ) -> SIZE_T; -} -extern "C" { - #[must_use] - pub fn NtCreateTransactionManager( - TmHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - LogFileName: PUNICODE_STRING, - CreateOptions: ULONG, - CommitStrength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtOpenTransactionManager( - TmHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - LogFileName: PUNICODE_STRING, - TmIdentity: LPGUID, - OpenOptions: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtRenameTransactionManager( - LogFileName: PUNICODE_STRING, - ExistingTransactionManagerGuid: LPGUID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtRollforwardTransactionManager( - TransactionManagerHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtRecoverTransactionManager(TransactionManagerHandle: HANDLE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQueryInformationTransactionManager( - TransactionManagerHandle: HANDLE, - TransactionManagerInformationClass: TRANSACTIONMANAGER_INFORMATION_CLASS, - TransactionManagerInformation: PVOID, - TransactionManagerInformationLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtSetInformationTransactionManager( - TmHandle: HANDLE, - TransactionManagerInformationClass: TRANSACTIONMANAGER_INFORMATION_CLASS, - TransactionManagerInformation: PVOID, - TransactionManagerInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtEnumerateTransactionObject( - RootObjectHandle: HANDLE, - QueryType: KTMOBJECT_TYPE, - ObjectCursor: PKTMOBJECT_CURSOR, - ObjectCursorLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtCreateTransaction( - TransactionHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - Uow: LPGUID, - TmHandle: HANDLE, - CreateOptions: ULONG, - IsolationLevel: ULONG, - IsolationFlags: ULONG, - Timeout: PLARGE_INTEGER, - Description: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtOpenTransaction( - TransactionHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - Uow: LPGUID, - TmHandle: HANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQueryInformationTransaction( - TransactionHandle: HANDLE, - TransactionInformationClass: TRANSACTION_INFORMATION_CLASS, - TransactionInformation: PVOID, - TransactionInformationLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtSetInformationTransaction( - TransactionHandle: HANDLE, - TransactionInformationClass: TRANSACTION_INFORMATION_CLASS, - TransactionInformation: PVOID, - TransactionInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtCommitTransaction(TransactionHandle: HANDLE, Wait: BOOLEAN) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtRollbackTransaction(TransactionHandle: HANDLE, Wait: BOOLEAN) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtCreateEnlistment( - EnlistmentHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ResourceManagerHandle: HANDLE, - TransactionHandle: HANDLE, - ObjectAttributes: POBJECT_ATTRIBUTES, - CreateOptions: ULONG, - NotificationMask: NOTIFICATION_MASK, - EnlistmentKey: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtOpenEnlistment( - EnlistmentHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ResourceManagerHandle: HANDLE, - EnlistmentGuid: LPGUID, - ObjectAttributes: POBJECT_ATTRIBUTES, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQueryInformationEnlistment( - EnlistmentHandle: HANDLE, - EnlistmentInformationClass: ENLISTMENT_INFORMATION_CLASS, - EnlistmentInformation: PVOID, - EnlistmentInformationLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtSetInformationEnlistment( - EnlistmentHandle: HANDLE, - EnlistmentInformationClass: ENLISTMENT_INFORMATION_CLASS, - EnlistmentInformation: PVOID, - EnlistmentInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtRecoverEnlistment( - EnlistmentHandle: HANDLE, - EnlistmentKey: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtPrePrepareEnlistment( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtPrepareEnlistment( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtCommitEnlistment( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtRollbackEnlistment( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtPrePrepareComplete( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtPrepareComplete( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtCommitComplete( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtReadOnlyEnlistment( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtRollbackComplete( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtSinglePhaseReject( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtCreateResourceManager( - ResourceManagerHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - TmHandle: HANDLE, - RmGuid: LPGUID, - ObjectAttributes: POBJECT_ATTRIBUTES, - CreateOptions: ULONG, - Description: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtOpenResourceManager( - ResourceManagerHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - TmHandle: HANDLE, - ResourceManagerGuid: LPGUID, - ObjectAttributes: POBJECT_ATTRIBUTES, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtRecoverResourceManager(ResourceManagerHandle: HANDLE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtGetNotificationResourceManager( - ResourceManagerHandle: HANDLE, - TransactionNotification: PTRANSACTION_NOTIFICATION, - NotificationLength: ULONG, - Timeout: PLARGE_INTEGER, - ReturnLength: PULONG, - Asynchronous: ULONG, - AsynchronousContext: ULONG_PTR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQueryInformationResourceManager( - ResourceManagerHandle: HANDLE, - ResourceManagerInformationClass: RESOURCEMANAGER_INFORMATION_CLASS, - ResourceManagerInformation: PVOID, - ResourceManagerInformationLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtSetInformationResourceManager( - ResourceManagerHandle: HANDLE, - ResourceManagerInformationClass: RESOURCEMANAGER_INFORMATION_CLASS, - ResourceManagerInformation: PVOID, - ResourceManagerInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtRegisterProtocolAddressInformation( - ResourceManager: HANDLE, - ProtocolId: PCRM_PROTOCOL_ID, - ProtocolInformationSize: ULONG, - ProtocolInformation: PVOID, - CreateOptions: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtPropagationComplete( - ResourceManagerHandle: HANDLE, - RequestCookie: ULONG, - BufferLength: ULONG, - Buffer: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtPropagationFailed( - ResourceManagerHandle: HANDLE, - RequestCookie: ULONG, - PropStatus: NTSTATUS, - ) -> NTSTATUS; -} -extern "C" { - pub fn __inbyte(Port: USHORT) -> UCHAR; -} -extern "C" { - pub fn __inword(Port: USHORT) -> USHORT; -} -extern "C" { - pub fn __indword(Port: USHORT) -> ULONG; -} -extern "C" { - pub fn __outbyte(Port: USHORT, Data: UCHAR); -} -extern "C" { - pub fn __outword(Port: USHORT, Data: USHORT); -} -extern "C" { - pub fn __outdword(Port: USHORT, Data: ULONG); -} -extern "C" { - pub fn __inbytestring(Port: USHORT, Buffer: PUCHAR, Count: ULONG); -} -extern "C" { - pub fn __inwordstring(Port: USHORT, Buffer: PUSHORT, Count: ULONG); -} -extern "C" { - pub fn __indwordstring(Port: USHORT, Buffer: PULONG, Count: ULONG); -} -extern "C" { - pub fn __outbytestring(Port: USHORT, Buffer: PUCHAR, Count: ULONG); -} -extern "C" { - pub fn __outwordstring(Port: USHORT, Buffer: PUSHORT, Count: ULONG); -} -extern "C" { - pub fn __outdwordstring(Port: USHORT, Buffer: PULONG, Count: ULONG); -} -extern "C" { - pub fn __readcr8() -> ULONG64; -} -extern "C" { - pub fn __writecr8(Data: ULONG64); -} -extern "C" { - pub fn KeFlushIoBuffers(Mdl: PMDL, ReadOperation: BOOLEAN, DmaOperation: BOOLEAN); -} -extern "C" { - pub fn KeGetCurrentIrql() -> KIRQL; -} -extern "C" { - pub fn KeLowerIrql(NewIrql: KIRQL); -} -extern "C" { - pub fn KfRaiseIrql(NewIrql: KIRQL) -> KIRQL; -} -extern "C" { - pub fn KeInitializeDpc( - Dpc: PRKDPC, - DeferredRoutine: PKDEFERRED_ROUTINE, - DeferredContext: PVOID, - ); -} -extern "C" { - pub fn KeInitializeThreadedDpc( - Dpc: PRKDPC, - DeferredRoutine: PKDEFERRED_ROUTINE, - DeferredContext: PVOID, - ); -} -extern "C" { - pub fn KeInsertQueueDpc( - Dpc: PRKDPC, - SystemArgument1: PVOID, - SystemArgument2: PVOID, - ) -> BOOLEAN; -} -extern "C" { - pub fn KeRemoveQueueDpc(Dpc: PRKDPC) -> BOOLEAN; -} -extern "C" { - pub fn KeRemoveQueueDpcEx(Dpc: PRKDPC, WaitIfActive: BOOLEAN) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn KeInitializeCrashDumpHeader( - DumpType: ULONG, - Flags: ULONG, - Buffer: PVOID, - BufferSize: ULONG, - BufferNeeded: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn KeSetImportanceDpc(Dpc: PRKDPC, Importance: KDPC_IMPORTANCE); -} -extern "C" { - pub fn KeSetTargetProcessorDpc(Dpc: PRKDPC, Number: CCHAR); -} -extern "C" { - pub fn KeFlushQueuedDpcs(); -} -extern "C" { - pub fn KeInitializeDeviceQueue(DeviceQueue: PKDEVICE_QUEUE); -} -extern "C" { - pub fn KeInsertDeviceQueue( - DeviceQueue: PKDEVICE_QUEUE, - DeviceQueueEntry: PKDEVICE_QUEUE_ENTRY, - ) -> BOOLEAN; -} -extern "C" { - pub fn KeInsertByKeyDeviceQueue( - DeviceQueue: PKDEVICE_QUEUE, - DeviceQueueEntry: PKDEVICE_QUEUE_ENTRY, - SortKey: ULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn KeRemoveDeviceQueue(DeviceQueue: PKDEVICE_QUEUE) -> PKDEVICE_QUEUE_ENTRY; -} -extern "C" { - pub fn KeRemoveByKeyDeviceQueue( - DeviceQueue: PKDEVICE_QUEUE, - SortKey: ULONG, - ) -> PKDEVICE_QUEUE_ENTRY; -} -extern "C" { - pub fn KeRemoveByKeyDeviceQueueIfBusy( - DeviceQueue: PKDEVICE_QUEUE, - SortKey: ULONG, - ) -> PKDEVICE_QUEUE_ENTRY; -} -extern "C" { - pub fn KeRemoveEntryDeviceQueue( - DeviceQueue: PKDEVICE_QUEUE, - DeviceQueueEntry: PKDEVICE_QUEUE_ENTRY, - ) -> BOOLEAN; -} -extern "C" { - pub fn KeSynchronizeExecution( - Interrupt: PKINTERRUPT, - SynchronizeRoutine: PKSYNCHRONIZE_ROUTINE, - SynchronizeContext: PVOID, - ) -> BOOLEAN; -} -extern "C" { - pub fn KeAcquireInterruptSpinLock(Interrupt: PKINTERRUPT) -> KIRQL; -} -extern "C" { - pub fn KeReleaseInterruptSpinLock(Interrupt: PKINTERRUPT, OldIrql: KIRQL); -} -extern "C" { - pub fn KeInitializeEvent(Event: PRKEVENT, Type: EVENT_TYPE, State: BOOLEAN); -} -extern "C" { - pub fn KeClearEvent(Event: PRKEVENT); -} -extern "C" { - pub fn KeReadStateEvent(Event: PRKEVENT) -> LONG; -} -extern "C" { - pub fn KeResetEvent(Event: PRKEVENT) -> LONG; -} -extern "C" { - pub fn KeSetEvent(Event: PRKEVENT, Increment: KPRIORITY, Wait: BOOLEAN) -> LONG; -} -extern "C" { - pub fn KeInitializeMutex(Mutex: PRKMUTEX, Level: ULONG); -} -extern "C" { - pub fn KeReadStateMutex(Mutex: PRKMUTEX) -> LONG; -} -extern "C" { - pub fn KeReleaseMutex(Mutex: PRKMUTEX, Wait: BOOLEAN) -> LONG; -} -extern "C" { - pub fn KeInitializeSemaphore(Semaphore: PRKSEMAPHORE, Count: LONG, Limit: LONG); -} -extern "C" { - pub fn KeReadStateSemaphore(Semaphore: PRKSEMAPHORE) -> LONG; -} -extern "C" { - pub fn KeReleaseSemaphore( - Semaphore: PRKSEMAPHORE, - Increment: KPRIORITY, - Adjustment: LONG, - Wait: BOOLEAN, - ) -> LONG; -} -extern "C" { - #[must_use] - pub fn KeDelayExecutionThread( - WaitMode: KPROCESSOR_MODE, - Alertable: BOOLEAN, - Interval: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - pub fn KeQueryPriorityThread(Thread: PKTHREAD) -> KPRIORITY; -} -extern "C" { - pub fn KeQueryRuntimeThread(Thread: PKTHREAD, UserTime: PULONG) -> ULONG; -} -extern "C" { - pub fn KeQueryTotalCycleTimeThread( - Thread: PKTHREAD, - CycleTimeStamp: PULONG64, - ) -> ULONG64; -} -extern "C" { - #[must_use] - pub fn KeSetTargetProcessorDpcEx( - Dpc: PKDPC, - ProcNumber: PPROCESSOR_NUMBER, - ) -> NTSTATUS; -} -extern "C" { - pub fn KeRevertToUserAffinityThread(); -} -extern "C" { - pub fn KeSetSystemAffinityThread(Affinity: KAFFINITY); -} -extern "C" { - pub fn KeRevertToUserAffinityThreadEx(Affinity: KAFFINITY); -} -extern "C" { - pub fn KeSetSystemGroupAffinityThread( - Affinity: PGROUP_AFFINITY, - PreviousAffinity: PGROUP_AFFINITY, - ); -} -extern "C" { - pub fn KeRevertToUserGroupAffinityThread(PreviousAffinity: PGROUP_AFFINITY); -} -extern "C" { - pub fn KeSetSystemAffinityThreadEx(Affinity: KAFFINITY) -> KAFFINITY; -} -extern "C" { - pub fn KeSetPriorityThread(Thread: PKTHREAD, Priority: KPRIORITY) -> KPRIORITY; -} -extern "C" { - pub fn KeEnterCriticalRegion(); -} -extern "C" { - pub fn KeLeaveCriticalRegion(); -} -extern "C" { - pub fn KeEnterGuardedRegion(); -} -extern "C" { - pub fn KeLeaveGuardedRegion(); -} -extern "C" { - pub fn KeAreApcsDisabled() -> BOOLEAN; -} -extern "C" { - pub fn KeInitializeTimer(Timer: PKTIMER); -} -extern "C" { - pub fn KeInitializeTimerEx(Timer: PKTIMER, Type: TIMER_TYPE); -} -extern "C" { - pub fn KeCancelTimer(arg1: PKTIMER) -> BOOLEAN; -} -extern "C" { - pub fn KeReadStateTimer(Timer: PKTIMER) -> BOOLEAN; -} -extern "C" { - pub fn KeSetTimer(Timer: PKTIMER, DueTime: LARGE_INTEGER, Dpc: PKDPC) -> BOOLEAN; -} -extern "C" { - pub fn KeSetTimerEx( - Timer: PKTIMER, - DueTime: LARGE_INTEGER, - Period: LONG, - Dpc: PKDPC, - ) -> BOOLEAN; -} -extern "C" { - pub fn KeSetCoalescableTimer( - Timer: PKTIMER, - DueTime: LARGE_INTEGER, - Period: ULONG, - TolerableDelay: ULONG, - Dpc: PKDPC, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn KeWaitForMultipleObjects( - Count: ULONG, - Object: *mut PVOID, - WaitType: WAIT_TYPE, - WaitReason: KWAIT_REASON, - WaitMode: KPROCESSOR_MODE, - Alertable: BOOLEAN, - Timeout: PLARGE_INTEGER, - WaitBlockArray: PKWAIT_BLOCK, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn KeWaitForSingleObject( - Object: PVOID, - WaitReason: KWAIT_REASON, - WaitMode: KPROCESSOR_MODE, - Alertable: BOOLEAN, - Timeout: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - pub fn KeIpiGenericCall( - BroadcastFunction: PKIPI_BROADCAST_WORKER, - Context: ULONG_PTR, - ) -> ULONG_PTR; -} -extern "C" { - pub fn KeInitializeSpinLock(SpinLock: PKSPIN_LOCK); -} -extern "C" { - pub fn KeTestSpinLock(SpinLock: PKSPIN_LOCK) -> BOOLEAN; -} -extern "C" { - pub fn KeTryToAcquireSpinLockAtDpcLevel(SpinLock: PKSPIN_LOCK) -> BOOLEAN; -} -extern "C" { - pub fn KeAcquireSpinLockAtDpcLevel(SpinLock: PKSPIN_LOCK); -} -extern "C" { - pub fn KeAcquireSpinLockRaiseToDpc(SpinLock: PKSPIN_LOCK) -> KIRQL; -} -extern "C" { - pub fn KeReleaseSpinLock(SpinLock: PKSPIN_LOCK, NewIrql: KIRQL); -} -extern "C" { - pub fn KeReleaseSpinLockFromDpcLevel(SpinLock: PKSPIN_LOCK); -} -extern "C" { - pub fn KeAcquireSpinLockForDpc(SpinLock: PKSPIN_LOCK) -> KIRQL; -} -extern "C" { - pub fn KeReleaseSpinLockForDpc(SpinLock: PKSPIN_LOCK, OldIrql: KIRQL); -} -extern "C" { - pub fn KeAcquireInStackQueuedSpinLock( - SpinLock: PKSPIN_LOCK, - LockHandle: PKLOCK_QUEUE_HANDLE, - ); -} -extern "C" { - pub fn KeReleaseInStackQueuedSpinLock(LockHandle: PKLOCK_QUEUE_HANDLE); -} -extern "C" { - pub fn KeAcquireInStackQueuedSpinLockAtDpcLevel( - SpinLock: PKSPIN_LOCK, - LockHandle: PKLOCK_QUEUE_HANDLE, - ); -} -extern "C" { - pub fn KeReleaseInStackQueuedSpinLockFromDpcLevel(LockHandle: PKLOCK_QUEUE_HANDLE); -} -extern "C" { - pub fn KeAcquireInStackQueuedSpinLockForDpc( - SpinLock: PKSPIN_LOCK, - LockHandle: PKLOCK_QUEUE_HANDLE, - ); -} -extern "C" { - pub fn KeReleaseInStackQueuedSpinLockForDpc(LockHandle: PKLOCK_QUEUE_HANDLE); -} -extern "C" { - #[must_use] - pub fn KeQueryDpcWatchdogInformation( - WatchdogInformation: PKDPC_WATCHDOG_INFORMATION, - ) -> NTSTATUS; -} -extern "C" { - pub fn KeIsExecutingDpc() -> LOGICAL; -} -extern "C" { - pub fn KeDeregisterBugCheckCallback( - CallbackRecord: PKBUGCHECK_CALLBACK_RECORD, - ) -> BOOLEAN; -} -extern "C" { - pub fn KeRegisterBugCheckCallback( - CallbackRecord: PKBUGCHECK_CALLBACK_RECORD, - CallbackRoutine: PKBUGCHECK_CALLBACK_ROUTINE, - Buffer: PVOID, - Length: ULONG, - Component: PUCHAR, - ) -> BOOLEAN; -} -extern "C" { - pub fn BugCheckSecondaryMultiPartDumpDataCallback( - Reason: KBUGCHECK_CALLBACK_REASON, - Record: *mut _KBUGCHECK_REASON_CALLBACK_RECORD, - ReasonSpecificData: PVOID, - ReasonSpecificDataLength: ULONG, - ); -} -extern "C" { - #[must_use] - pub fn KeInitializeTriageDumpDataArray( - KtriageDumpDataArray: PKTRIAGE_DUMP_DATA_ARRAY, - Size: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn KeAddTriageDumpDataBlock( - KtriageDumpDataArray: PKTRIAGE_DUMP_DATA_ARRAY, - Address: PVOID, - Size: SIZE_T, - ) -> NTSTATUS; -} -extern "C" { - pub fn KeDeregisterBugCheckReasonCallback( - CallbackRecord: PKBUGCHECK_REASON_CALLBACK_RECORD, - ) -> BOOLEAN; -} -extern "C" { - pub fn KeRegisterBugCheckReasonCallback( - CallbackRecord: PKBUGCHECK_REASON_CALLBACK_RECORD, - CallbackRoutine: PKBUGCHECK_REASON_CALLBACK_ROUTINE, - Reason: KBUGCHECK_CALLBACK_REASON, - Component: PUCHAR, - ) -> BOOLEAN; -} -extern "C" { - pub fn KeRegisterNmiCallback( - CallbackRoutine: PNMI_CALLBACK, - Context: PVOID, - ) -> PVOID; -} -extern "C" { - #[must_use] - pub fn KeDeregisterNmiCallback(Handle: PVOID) -> NTSTATUS; -} -extern "C" { - pub fn KeRegisterBoundCallback(CallbackRoutine: PBOUND_CALLBACK) -> PVOID; -} -extern "C" { - #[must_use] - pub fn KeDeregisterBoundCallback(Handle: PVOID) -> NTSTATUS; -} -extern "C" { - pub fn KeBugCheckEx( - BugCheckCode: ULONG, - BugCheckParameter1: ULONG_PTR, - BugCheckParameter2: ULONG_PTR, - BugCheckParameter3: ULONG_PTR, - BugCheckParameter4: ULONG_PTR, - ) -> !; -} -extern "C" { - pub fn KeQuerySystemTimePrecise(CurrentTime: PLARGE_INTEGER); -} -extern "C" { - pub fn KeQueryInterruptTimePrecise(QpcTimeStamp: PULONG64) -> ULONG64; -} -extern "C" { - pub fn KeQueryUnbiasedInterruptTimePrecise(QpcTimeStamp: PULONG64) -> ULONG64; -} -extern "C" { - pub fn KeQueryTimeIncrement() -> ULONG; -} -extern "C" { - pub fn KeQueryUnbiasedInterruptTime() -> ULONGLONG; -} -extern "C" { - pub fn KeGetRecommendedSharedDataAlignment() -> ULONG; -} -extern "C" { - pub fn KeQueryActiveProcessors() -> KAFFINITY; -} -extern "C" { - pub fn KeQueryActiveProcessorCount(ActiveProcessors: PKAFFINITY) -> ULONG; -} -extern "C" { - pub fn KeQueryActiveProcessorCountEx(GroupNumber: USHORT) -> ULONG; -} -extern "C" { - pub fn KeQueryMaximumProcessorCount() -> ULONG; -} -extern "C" { - pub fn KeQueryMaximumProcessorCountEx(GroupNumber: USHORT) -> ULONG; -} -extern "C" { - pub fn KeQueryActiveGroupCount() -> USHORT; -} -extern "C" { - pub fn KeQueryMaximumGroupCount() -> USHORT; -} -extern "C" { - pub fn KeQueryGroupAffinity(GroupNumber: USHORT) -> KAFFINITY; -} -extern "C" { - pub fn KeGetCurrentProcessorNumberEx(ProcNumber: PPROCESSOR_NUMBER) -> ULONG; -} -extern "C" { - pub fn KeQueryNodeActiveAffinity( - NodeNumber: USHORT, - Affinity: PGROUP_AFFINITY, - Count: PUSHORT, - ); -} -extern "C" { - pub fn KeQueryNodeMaximumProcessorCount(NodeNumber: USHORT) -> USHORT; -} -extern "C" { - pub fn KeQueryHighestNodeNumber() -> USHORT; -} -extern "C" { - pub fn KeGetCurrentNodeNumber() -> USHORT; -} -extern "C" { - #[must_use] - pub fn KeQueryLogicalProcessorRelationship( - ProcessorNumber: PPROCESSOR_NUMBER, - RelationshipType: LOGICAL_PROCESSOR_RELATIONSHIP, - Information: PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX, - Length: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn KeShouldYieldProcessor() -> LOGICAL; -} -extern "C" { - #[must_use] - pub fn KeQueryNodeActiveAffinity2( - NodeNumber: USHORT, - GroupAffinities: PGROUP_AFFINITY, - GroupAffinitiesCount: USHORT, - GroupAffinitiesRequired: PUSHORT, - ) -> NTSTATUS; -} -extern "C" { - pub fn KeQueryNodeActiveProcessorCount(NodeNumber: USHORT) -> ULONG; -} -extern "C" { - pub fn KeAreAllApcsDisabled() -> BOOLEAN; -} -extern "C" { - pub fn KeInitializeGuardedMutex(Mutex: PKGUARDED_MUTEX); -} -extern "C" { - pub fn KeAcquireGuardedMutex(Mutex: PKGUARDED_MUTEX); -} -extern "C" { - pub fn KeReleaseGuardedMutex(Mutex: PKGUARDED_MUTEX); -} -extern "C" { - pub fn KeTryToAcquireGuardedMutex(Mutex: PKGUARDED_MUTEX) -> BOOLEAN; -} -extern "C" { - pub fn KeAcquireGuardedMutexUnsafe(FastMutex: PKGUARDED_MUTEX); -} -extern "C" { - pub fn KeReleaseGuardedMutexUnsafe(FastMutex: PKGUARDED_MUTEX); -} -extern "C" { - pub fn KeRegisterProcessorChangeCallback( - CallbackFunction: PPROCESSOR_CALLBACK_FUNCTION, - CallbackContext: PVOID, - Flags: ULONG, - ) -> PVOID; -} -extern "C" { - pub fn KeDeregisterProcessorChangeCallback(CallbackHandle: PVOID); -} -extern "C" { - #[must_use] - pub fn KeGetProcessorNumberFromIndex( - ProcIndex: ULONG, - ProcNumber: PPROCESSOR_NUMBER, - ) -> NTSTATUS; -} -extern "C" { - pub fn KeGetProcessorIndexFromNumber(ProcNumber: PPROCESSOR_NUMBER) -> ULONG; -} -extern "C" { - #[must_use] - pub fn KeSaveExtendedProcessorState( - Mask: ULONG64, - XStateSave: PXSTATE_SAVE, - ) -> NTSTATUS; -} -extern "C" { - pub fn KeRestoreExtendedProcessorState(XStateSave: PXSTATE_SAVE); -} -extern "C" { - #[must_use] - pub fn KeConvertAuxiliaryCounterToPerformanceCounter( - AuxiliaryCounterValue: ULONG64, - PerformanceCounterValue: PULONG64, - ConversionError: PULONG64, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn KeConvertPerformanceCounterToAuxiliaryCounter( - PerformanceCounterValue: ULONG64, - AuxiliaryCounterValue: PULONG64, - ConversionError: PULONG64, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn KeQueryAuxiliaryCounterFrequency( - AuxiliaryCounterFrequency: PULONG64, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn KdDisableDebugger() -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn KdEnableDebugger() -> NTSTATUS; -} -extern "C" { - pub fn KdRefreshDebuggerNotPresent() -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn KdChangeOption( - Option: KD_OPTION, - InBufferBytes: ULONG, - InBuffer: PVOID, - OutBufferBytes: ULONG, - OutBuffer: PVOID, - OutBufferNeeded: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn ExAllocatePool(PoolType: POOL_TYPE, NumberOfBytes: SIZE_T) -> PVOID; -} -extern "C" { - pub fn ExAllocatePoolWithQuota(PoolType: POOL_TYPE, NumberOfBytes: SIZE_T) -> PVOID; -} -extern "C" { - pub fn ExAllocatePool2( - Flags: POOL_FLAGS, - NumberOfBytes: SIZE_T, - Tag: ULONG, - ) -> PVOID; -} -extern "C" { - pub fn ExAllocatePool3( - Flags: POOL_FLAGS, - NumberOfBytes: SIZE_T, - Tag: ULONG, - ExtendedParameters: PCPOOL_EXTENDED_PARAMETER, - ExtendedParametersCount: ULONG, - ) -> PVOID; -} -extern "C" { - pub fn ExFreePool2( - P: PVOID, - Tag: ULONG, - ExtendedParameters: PCPOOL_EXTENDED_PARAMETER, - ExtendedParametersCount: ULONG, - ); -} -extern "C" { - #[must_use] - pub fn ExCreatePool( - Flags: ULONG, - Tag: ULONG_PTR, - Params: *mut POOL_CREATE_EXTENDED_PARAMS, - PoolHandle: *mut HANDLE, - ) -> NTSTATUS; -} -extern "C" { - pub fn ExDestroyPool(PoolHandle: HANDLE); -} -extern "C" { - #[must_use] - pub fn ExSecurePoolUpdate( - SecurePoolHandle: HANDLE, - Tag: ULONG, - Allocation: PVOID, - Cookie: ULONG_PTR, - Offset: SIZE_T, - Size: SIZE_T, - Buffer: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn ExSecurePoolValidate( - SecurePoolHandle: HANDLE, - Tag: ULONG, - Allocation: PVOID, - Cookie: ULONG_PTR, - ) -> LOGICAL; -} -extern "C" { - pub fn ExFreePool(P: PVOID); -} -extern "C" { - pub fn ExFreePoolWithTag(P: PVOID, Tag: ULONG); -} -extern "C" { - pub fn ExAcquireFastMutexUnsafe(FastMutex: PFAST_MUTEX); -} -extern "C" { - pub fn ExReleaseFastMutexUnsafe(FastMutex: PFAST_MUTEX); -} -extern "C" { - pub fn ExAcquireFastMutex(FastMutex: PFAST_MUTEX); -} -extern "C" { - pub fn ExReleaseFastMutex(FastMutex: PFAST_MUTEX); -} -extern "C" { - pub fn ExTryToAcquireFastMutex(FastMutex: PFAST_MUTEX) -> BOOLEAN; -} -extern "C" { - pub fn ExInterlockedAddLargeInteger( - Addend: PLARGE_INTEGER, - Increment: LARGE_INTEGER, - Lock: PKSPIN_LOCK, - ) -> LARGE_INTEGER; -} -extern "C" { - pub fn ExInterlockedAddUlong( - Addend: PULONG, - Increment: ULONG, - Lock: PKSPIN_LOCK, - ) -> ULONG; -} -extern "C" { - pub fn ExInterlockedInsertHeadList( - ListHead: PLIST_ENTRY, - ListEntry: PLIST_ENTRY, - Lock: PKSPIN_LOCK, - ) -> PLIST_ENTRY; -} -extern "C" { - pub fn ExInterlockedInsertTailList( - ListHead: PLIST_ENTRY, - ListEntry: PLIST_ENTRY, - Lock: PKSPIN_LOCK, - ) -> PLIST_ENTRY; -} -extern "C" { - pub fn ExInterlockedRemoveHeadList( - ListHead: PLIST_ENTRY, - Lock: PKSPIN_LOCK, - ) -> PLIST_ENTRY; -} -extern "C" { - pub fn ExInterlockedPopEntryList( - ListHead: PSINGLE_LIST_ENTRY, - Lock: PKSPIN_LOCK, - ) -> PSINGLE_LIST_ENTRY; -} -extern "C" { - pub fn ExInterlockedPushEntryList( - ListHead: PSINGLE_LIST_ENTRY, - ListEntry: PSINGLE_LIST_ENTRY, - Lock: PKSPIN_LOCK, - ) -> PSINGLE_LIST_ENTRY; -} -extern "C" { - pub fn InitializeSListHead(SListHead: PSLIST_HEADER); -} -extern "C" { - pub fn FirstEntrySList(SListHead: PSLIST_HEADER) -> PSLIST_ENTRY; -} -extern "C" { - pub fn ExQueryDepthSList(SListHead: PSLIST_HEADER) -> USHORT; -} -extern "C" { - pub fn ExpInterlockedPopEntrySList(ListHead: PSLIST_HEADER) -> PSLIST_ENTRY; -} -extern "C" { - pub fn ExpInterlockedPushEntrySList( - ListHead: PSLIST_HEADER, - ListEntry: PSLIST_ENTRY, - ) -> PSLIST_ENTRY; -} -extern "C" { - pub fn ExpInterlockedFlushSList(ListHead: PSLIST_HEADER) -> PSLIST_ENTRY; -} -extern "C" { - #[must_use] - pub fn ExInitializeLookasideListEx( - Lookaside: PLOOKASIDE_LIST_EX, - Allocate: PALLOCATE_FUNCTION_EX, - Free: PFREE_FUNCTION_EX, - PoolType: POOL_TYPE, - Flags: ULONG, - Size: SIZE_T, - Tag: ULONG, - Depth: USHORT, - ) -> NTSTATUS; -} -extern "C" { - pub fn ExDeleteLookasideListEx(Lookaside: PLOOKASIDE_LIST_EX); -} -extern "C" { - pub fn ExFlushLookasideListEx(Lookaside: PLOOKASIDE_LIST_EX); -} -extern "C" { - pub fn ExAllocateFromLookasideListEx(Lookaside: PLOOKASIDE_LIST_EX) -> PVOID; -} -extern "C" { - pub fn ExFreeToLookasideListEx(Lookaside: PLOOKASIDE_LIST_EX, Entry: PVOID); -} -extern "C" { - pub fn ExInitializeNPagedLookasideList( - Lookaside: PNPAGED_LOOKASIDE_LIST, - Allocate: PALLOCATE_FUNCTION, - Free: PFREE_FUNCTION, - Flags: ULONG, - Size: SIZE_T, - Tag: ULONG, - Depth: USHORT, - ); -} -extern "C" { - pub fn ExDeleteNPagedLookasideList(Lookaside: PNPAGED_LOOKASIDE_LIST); -} -extern "C" { - pub fn ExAllocateFromNPagedLookasideList(Lookaside: PNPAGED_LOOKASIDE_LIST) -> PVOID; -} -extern "C" { - pub fn ExFreeToNPagedLookasideList(Lookaside: PNPAGED_LOOKASIDE_LIST, Entry: PVOID); -} -extern "C" { - pub fn ExInitializePagedLookasideList( - Lookaside: PPAGED_LOOKASIDE_LIST, - Allocate: PALLOCATE_FUNCTION, - Free: PFREE_FUNCTION, - Flags: ULONG, - Size: SIZE_T, - Tag: ULONG, - Depth: USHORT, - ); -} -extern "C" { - pub fn ExDeletePagedLookasideList(Lookaside: PPAGED_LOOKASIDE_LIST); -} -extern "C" { - pub fn ExAllocateFromPagedLookasideList(Lookaside: PPAGED_LOOKASIDE_LIST) -> PVOID; -} -extern "C" { - pub fn ExFreeToPagedLookasideList(Lookaside: PPAGED_LOOKASIDE_LIST, Entry: PVOID); -} -extern "C" { - pub fn ProbeForRead( - Address: *mut ::core::ffi::c_void, - Length: SIZE_T, - Alignment: ULONG, - ); -} -extern "C" { - pub fn ExRaiseStatus(Status: NTSTATUS) -> !; -} -extern "C" { - pub fn ProbeForWrite( - Address: *mut ::core::ffi::c_void, - Length: SIZE_T, - Alignment: ULONG, - ); -} -extern "C" { - pub fn ExQueueWorkItem(WorkItem: PWORK_QUEUE_ITEM, QueueType: WORK_QUEUE_TYPE); -} -extern "C" { - pub fn ExIsProcessorFeaturePresent(ProcessorFeature: ULONG) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn ExInitializeResourceLite(Resource: PERESOURCE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ExReinitializeResourceLite(Resource: PERESOURCE) -> NTSTATUS; -} -extern "C" { - pub fn ExAcquireResourceSharedLite(Resource: PERESOURCE, Wait: BOOLEAN) -> BOOLEAN; -} -extern "C" { - pub fn ExEnterCriticalRegionAndAcquireResourceShared(Resource: PERESOURCE) -> PVOID; -} -extern "C" { - pub fn ExAcquireResourceExclusiveLite( - Resource: PERESOURCE, - Wait: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - pub fn ExEnterCriticalRegionAndAcquireResourceExclusive( - Resource: PERESOURCE, - ) -> PVOID; -} -extern "C" { - pub fn ExAcquireSharedStarveExclusive( - Resource: PERESOURCE, - Wait: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - pub fn ExAcquireSharedWaitForExclusive( - Resource: PERESOURCE, - Wait: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - pub fn ExEnterCriticalRegionAndAcquireSharedWaitForExclusive( - Resource: PERESOURCE, - ) -> PVOID; -} -extern "C" { - pub fn ExReleaseResourceLite(Resource: PERESOURCE); -} -extern "C" { - pub fn ExReleaseResourceAndLeaveCriticalRegion(Resource: PERESOURCE); -} -extern "C" { - pub fn ExReleaseResourceForThreadLite( - Resource: PERESOURCE, - ResourceThreadId: ERESOURCE_THREAD, - ); -} -extern "C" { - pub fn ExSetResourceOwnerPointer(Resource: PERESOURCE, OwnerPointer: PVOID); -} -extern "C" { - pub fn ExSetResourceOwnerPointerEx( - Resource: PERESOURCE, - OwnerPointer: PVOID, - Flags: ULONG, - ); -} -extern "C" { - pub fn ExConvertExclusiveToSharedLite(Resource: PERESOURCE); -} -extern "C" { - #[must_use] - pub fn ExDeleteResourceLite(Resource: PERESOURCE) -> NTSTATUS; -} -extern "C" { - pub fn ExGetExclusiveWaiterCount(Resource: PERESOURCE) -> ULONG; -} -extern "C" { - pub fn ExGetSharedWaiterCount(Resource: PERESOURCE) -> ULONG; -} -extern "C" { - pub fn ExIsResourceAcquiredExclusiveLite(Resource: PERESOURCE) -> BOOLEAN; -} -extern "C" { - pub fn ExIsResourceAcquiredSharedLite(Resource: PERESOURCE) -> ULONG; -} -extern "C" { - pub fn ExGetPreviousMode() -> KPROCESSOR_MODE; -} -extern "C" { - pub fn ExSetTimerResolution(DesiredTime: ULONG, SetResolution: BOOLEAN) -> ULONG; -} -extern "C" { - pub fn ExQueryTimerResolution( - MaximumTime: PULONG, - MinimumTime: PULONG, - CurrentTime: PULONG, - ); -} -extern "C" { - pub fn ExSystemTimeToLocalTime( - SystemTime: PLARGE_INTEGER, - LocalTime: PLARGE_INTEGER, - ); -} -extern "C" { - pub fn ExLocalTimeToSystemTime( - LocalTime: PLARGE_INTEGER, - SystemTime: PLARGE_INTEGER, - ); -} -extern "C" { - pub fn ExAllocateTimer( - Callback: PEXT_CALLBACK, - CallbackContext: PVOID, - Attributes: ULONG, - ) -> PEX_TIMER; -} -extern "C" { - pub fn ExSetTimer( - Timer: PEX_TIMER, - DueTime: LONGLONG, - Period: LONGLONG, - Parameters: PEXT_SET_PARAMETERS, - ) -> BOOLEAN; -} -extern "C" { - pub fn ExCancelTimer( - Timer: PEX_TIMER, - Parameters: PEXT_CANCEL_PARAMETERS, - ) -> BOOLEAN; -} -extern "C" { - pub fn ExDeleteTimer( - Timer: PEX_TIMER, - Cancel: BOOLEAN, - Wait: BOOLEAN, - Parameters: PEXT_DELETE_PARAMETERS, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn ExCreateCallback( - CallbackObject: *mut PCALLBACK_OBJECT, - ObjectAttributes: POBJECT_ATTRIBUTES, - Create: BOOLEAN, - AllowMultipleCallbacks: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn ExRegisterCallback( - CallbackObject: PCALLBACK_OBJECT, - CallbackFunction: PCALLBACK_FUNCTION, - CallbackContext: PVOID, - ) -> PVOID; -} -extern "C" { - pub fn ExUnregisterCallback(CallbackRegistration: PVOID); -} -extern "C" { - pub fn ExNotifyCallback(CallbackObject: PVOID, Argument1: PVOID, Argument2: PVOID); -} -extern "C" { - pub fn ExVerifySuite(SuiteType: SUITE_TYPE) -> BOOLEAN; -} -extern "C" { - pub fn ExInitializeRundownProtection(RunRef: PEX_RUNDOWN_REF); -} -extern "C" { - pub fn ExReInitializeRundownProtection(RunRef: PEX_RUNDOWN_REF); -} -extern "C" { - pub fn ExAcquireRundownProtection(RunRef: PEX_RUNDOWN_REF) -> BOOLEAN; -} -extern "C" { - pub fn ExAcquireRundownProtectionEx( - RunRef: PEX_RUNDOWN_REF, - Count: ULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn ExReleaseRundownProtection(RunRef: PEX_RUNDOWN_REF); -} -extern "C" { - pub fn ExReleaseRundownProtectionEx(RunRef: PEX_RUNDOWN_REF, Count: ULONG); -} -extern "C" { - pub fn ExRundownCompleted(RunRef: PEX_RUNDOWN_REF); -} -extern "C" { - pub fn ExWaitForRundownProtectionRelease(RunRef: PEX_RUNDOWN_REF); -} -extern "C" { - pub fn ExAllocateCacheAwareRundownProtection( - PoolType: POOL_TYPE, - PoolTag: ULONG, - ) -> PEX_RUNDOWN_REF_CACHE_AWARE; -} -extern "C" { - pub fn ExSizeOfRundownProtectionCacheAware() -> SIZE_T; -} -extern "C" { - pub fn ExInitializeRundownProtectionCacheAware( - RunRefCacheAware: PEX_RUNDOWN_REF_CACHE_AWARE, - RunRefSize: SIZE_T, - ); -} -extern "C" { - pub fn ExFreeCacheAwareRundownProtection( - RunRefCacheAware: PEX_RUNDOWN_REF_CACHE_AWARE, - ); -} -extern "C" { - pub fn ExAcquireRundownProtectionCacheAware( - RunRefCacheAware: PEX_RUNDOWN_REF_CACHE_AWARE, - ) -> BOOLEAN; -} -extern "C" { - pub fn ExReleaseRundownProtectionCacheAware( - RunRefCacheAware: PEX_RUNDOWN_REF_CACHE_AWARE, - ); -} -extern "C" { - pub fn ExAcquireRundownProtectionCacheAwareEx( - RunRefCacheAware: PEX_RUNDOWN_REF_CACHE_AWARE, - Count: ULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn ExReleaseRundownProtectionCacheAwareEx( - RunRef: PEX_RUNDOWN_REF_CACHE_AWARE, - Count: ULONG, - ); -} -extern "C" { - pub fn ExWaitForRundownProtectionReleaseCacheAware( - RunRef: PEX_RUNDOWN_REF_CACHE_AWARE, - ); -} -extern "C" { - pub fn ExReInitializeRundownProtectionCacheAware( - RunRefCacheAware: PEX_RUNDOWN_REF_CACHE_AWARE, - ); -} -extern "C" { - pub fn ExRundownCompletedCacheAware(RunRefCacheAware: PEX_RUNDOWN_REF_CACHE_AWARE); -} -extern "C" { - pub fn ExInitializeRundownProtectionCacheAwareEx( - RunRefCacheAware: PEX_RUNDOWN_REF_CACHE_AWARE, - Flags: ULONG, - ); -} -extern "C" { - pub fn ExCleanupRundownProtectionCacheAware( - RunRefCacheAware: PEX_RUNDOWN_REF_CACHE_AWARE, - ); -} -extern "C" { - pub fn ExInitializePushLock(PushLock: PULONG_PTR); -} -extern "C" { - pub fn ExAcquirePushLockExclusiveEx(PushLock: PULONG_PTR, Flags: ULONG); -} -extern "C" { - pub fn ExAcquirePushLockSharedEx(PushLock: PULONG_PTR, Flags: ULONG); -} -extern "C" { - pub fn ExReleasePushLockExclusiveEx(PushLock: PULONG_PTR, Flags: ULONG); -} -extern "C" { - pub fn ExReleasePushLockSharedEx(PushLock: PULONG_PTR, Flags: ULONG); -} -extern "C" { - #[must_use] - pub fn ExInitializeDeviceAts( - PhysicalDeviceObject: *mut [u8; 0usize], - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn ExAcquireSpinLockSharedAtDpcLevel(SpinLock: PEX_SPIN_LOCK); -} -extern "C" { - pub fn ExAcquireSpinLockShared(SpinLock: PEX_SPIN_LOCK) -> KIRQL; -} -extern "C" { - pub fn ExReleaseSpinLockSharedFromDpcLevel(SpinLock: PEX_SPIN_LOCK); -} -extern "C" { - pub fn ExReleaseSpinLockShared(SpinLock: PEX_SPIN_LOCK, OldIrql: KIRQL); -} -extern "C" { - pub fn ExTryConvertSharedSpinLockExclusive(SpinLock: PEX_SPIN_LOCK) -> LOGICAL; -} -extern "C" { - pub fn ExAcquireSpinLockExclusiveAtDpcLevel(SpinLock: PEX_SPIN_LOCK); -} -extern "C" { - pub fn ExAcquireSpinLockExclusive(SpinLock: PEX_SPIN_LOCK) -> KIRQL; -} -extern "C" { - pub fn ExReleaseSpinLockExclusiveFromDpcLevel(SpinLock: PEX_SPIN_LOCK); -} -extern "C" { - pub fn ExReleaseSpinLockExclusive(SpinLock: PEX_SPIN_LOCK, OldIrql: KIRQL); -} -extern "C" { - pub fn ExTryAcquireSpinLockSharedAtDpcLevel(SpinLock: PEX_SPIN_LOCK) -> LOGICAL; -} -extern "C" { - pub fn ExTryAcquireSpinLockExclusiveAtDpcLevel(SpinLock: PEX_SPIN_LOCK) -> LOGICAL; -} -extern "C" { - #[must_use] - pub fn ExGetFirmwareEnvironmentVariable( - VariableName: PUNICODE_STRING, - VendorGuid: LPGUID, - Value: PVOID, - ValueLength: PULONG, - Attributes: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ExSetFirmwareEnvironmentVariable( - VariableName: PUNICODE_STRING, - VendorGuid: LPGUID, - Value: PVOID, - ValueLength: ULONG, - Attributes: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn ExIsManufacturingModeEnabled() -> BOOLEAN; -} -extern "C" { - pub fn ExIsSoftBoot() -> BOOLEAN; -} -extern "C" { - pub fn ExGetFirmwareType() -> FIRMWARE_TYPE; -} -extern "C" { - #[must_use] - pub fn ExEnumerateSystemFirmwareTables( - FirmwareTableProviderSignature: ULONG, - FirmwareTableBuffer: PVOID, - BufferLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ExGetSystemFirmwareTable( - FirmwareTableProviderSignature: ULONG, - FirmwareTableID: ULONG, - FirmwareTableBuffer: PVOID, - BufferLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn CmRegisterCallback( - Function: PEX_CALLBACK_FUNCTION, - Context: PVOID, - Cookie: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn CmUnRegisterCallback(Cookie: LARGE_INTEGER) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn CmRegisterCallbackEx( - Function: PEX_CALLBACK_FUNCTION, - Altitude: PCUNICODE_STRING, - Driver: PVOID, - Context: PVOID, - Cookie: PLARGE_INTEGER, - Reserved: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn CmGetCallbackVersion(Major: PULONG, Minor: PULONG); -} -extern "C" { - #[must_use] - pub fn CmSetCallbackObjectContext( - Object: PVOID, - Cookie: PLARGE_INTEGER, - NewContext: PVOID, - OldContext: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn CmCallbackGetKeyObjectID( - Cookie: PLARGE_INTEGER, - Object: PVOID, - ObjectID: PULONG_PTR, - ObjectName: *mut PCUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - pub fn CmGetBoundTransaction(Cookie: PLARGE_INTEGER, Object: PVOID) -> PVOID; -} -extern "C" { - #[must_use] - pub fn CmCallbackGetKeyObjectIDEx( - Cookie: PLARGE_INTEGER, - Object: PVOID, - ObjectID: PULONG_PTR, - ObjectName: *mut PCUNICODE_STRING, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn CmCallbackReleaseKeyObjectIDEx(ObjectName: PCUNICODE_STRING); -} -extern "C" { - pub fn MmQuerySystemSize() -> MM_SYSTEMSIZE; -} -extern "C" { - #[must_use] - pub fn MmIsVerifierEnabled(VerifierFlags: PULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmAddVerifierThunks(ThunkBuffer: PVOID, ThunkBufferSize: ULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmAddVerifierSpecialThunks( - EntryRoutine: ULONG_PTR, - ThunkBuffer: PVOID, - ThunkBufferSize: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn MmProbeAndLockSelectedPages( - MemoryDescriptorList: PMDL, - SegmentArray: PFILE_SEGMENT_ELEMENT, - AccessMode: KPROCESSOR_MODE, - Operation: LOCK_OPERATION, - ); -} -extern "C" { - pub fn MmProbeAndLockProcessPages( - MemoryDescriptorList: PMDL, - Process: PEPROCESS, - AccessMode: KPROCESSOR_MODE, - Operation: LOCK_OPERATION, - ); -} -extern "C" { - pub fn MmProbeAndLockPages( - MemoryDescriptorList: PMDL, - AccessMode: KPROCESSOR_MODE, - Operation: LOCK_OPERATION, - ); -} -extern "C" { - pub fn MmUnlockPages(MemoryDescriptorList: PMDL); -} -extern "C" { - pub fn MmBuildMdlForNonPagedPool(MemoryDescriptorList: PMDL); -} -extern "C" { - #[must_use] - pub fn MmAllocateMdlForIoSpace( - PhysicalAddressList: PMM_PHYSICAL_ADDRESS_LIST, - NumberOfEntries: SIZE_T, - NewMdl: *mut PMDL, - ) -> NTSTATUS; -} -extern "C" { - pub fn MmAreMdlPagesCached(MemoryDescriptorList: PMDL) -> LOGICAL; -} -extern "C" { - #[must_use] - pub fn MmSetPermanentCacheAttribute( - StartAddress: PHYSICAL_ADDRESS, - NumberOfBytes: LARGE_INTEGER, - CacheType: MEMORY_CACHING_TYPE, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn MmMapLockedPages( - MemoryDescriptorList: PMDL, - AccessMode: KPROCESSOR_MODE, - ) -> PVOID; -} -extern "C" { - #[must_use] - pub fn MmMapMdl( - MemoryDescriptorList: PMDL, - Protection: ULONG, - DriverRoutine: PMM_MDL_ROUTINE, - DriverContext: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmMapMemoryDumpMdlEx( - Va: PVOID, - PageTotal: PFN_NUMBER, - MemoryDumpMdl: PMDL, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn MmIsIoSpaceActive( - StartAddress: PHYSICAL_ADDRESS, - NumberOfBytes: SIZE_T, - ) -> LOGICAL; -} -extern "C" { - #[must_use] - pub fn MmAdvanceMdl(Mdl: PMDL, NumberOfBytes: ULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmProtectMdlSystemAddress( - MemoryDescriptorList: PMDL, - NewProtect: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn MmMapLockedPagesSpecifyCache( - MemoryDescriptorList: PMDL, - AccessMode: KPROCESSOR_MODE, - CacheType: MEMORY_CACHING_TYPE, - RequestedAddress: PVOID, - BugCheckOnFailure: ULONG, - Priority: ULONG, - ) -> PVOID; -} -extern "C" { - pub fn MmUnmapLockedPages(BaseAddress: PVOID, MemoryDescriptorList: PMDL); -} -extern "C" { - pub fn MmAllocateMappingAddressEx( - NumberOfBytes: SIZE_T, - PoolTag: ULONG, - Flags: ULONG, - ) -> PVOID; -} -extern "C" { - pub fn MmAllocateMappingAddress(NumberOfBytes: SIZE_T, PoolTag: ULONG) -> PVOID; -} -extern "C" { - pub fn MmFreeMappingAddress(BaseAddress: PVOID, PoolTag: ULONG); -} -extern "C" { - pub fn MmMapLockedPagesWithReservedMapping( - MappingAddress: PVOID, - PoolTag: ULONG, - MemoryDescriptorList: PMDL, - CacheType: MEMORY_CACHING_TYPE, - ) -> PVOID; -} -extern "C" { - pub fn MmUnmapReservedMapping( - BaseAddress: PVOID, - PoolTag: ULONG, - MemoryDescriptorList: PMDL, - ); -} -extern "C" { - pub fn MmAllocateNodePagesForMdlEx( - LowAddress: PHYSICAL_ADDRESS, - HighAddress: PHYSICAL_ADDRESS, - SkipBytes: PHYSICAL_ADDRESS, - TotalBytes: SIZE_T, - CacheType: MEMORY_CACHING_TYPE, - IdealNode: ULONG, - Flags: ULONG, - ) -> PMDL; -} -extern "C" { - pub fn MmAllocatePartitionNodePagesForMdlEx( - LowAddress: PHYSICAL_ADDRESS, - HighAddress: PHYSICAL_ADDRESS, - SkipBytes: PHYSICAL_ADDRESS, - TotalBytes: SIZE_T, - CacheType: MEMORY_CACHING_TYPE, - IdealNode: MM_NODE_NUMBER_ZERO_BASED, - Flags: ULONG, - PartitionObject: PVOID, - ) -> PMDL; -} -extern "C" { - pub fn MmAllocatePagesForMdlEx( - LowAddress: PHYSICAL_ADDRESS, - HighAddress: PHYSICAL_ADDRESS, - SkipBytes: PHYSICAL_ADDRESS, - TotalBytes: SIZE_T, - CacheType: MEMORY_CACHING_TYPE, - Flags: ULONG, - ) -> PMDL; -} -extern "C" { - pub fn MmAllocatePagesForMdl( - LowAddress: PHYSICAL_ADDRESS, - HighAddress: PHYSICAL_ADDRESS, - SkipBytes: PHYSICAL_ADDRESS, - TotalBytes: SIZE_T, - ) -> PMDL; -} -extern "C" { - pub fn MmFreePagesFromMdlEx(MemoryDescriptorList: PMDL, Flags: ULONG); -} -extern "C" { - pub fn MmFreePagesFromMdl(MemoryDescriptorList: PMDL); -} -extern "C" { - pub fn MmMapIoSpace( - PhysicalAddress: PHYSICAL_ADDRESS, - NumberOfBytes: SIZE_T, - CacheType: MEMORY_CACHING_TYPE, - ) -> PVOID; -} -extern "C" { - pub fn MmUnmapIoSpace(BaseAddress: PVOID, NumberOfBytes: SIZE_T); -} -extern "C" { - pub fn MmMapIoSpaceEx( - PhysicalAddress: PHYSICAL_ADDRESS, - NumberOfBytes: SIZE_T, - Protect: ULONG, - ) -> PVOID; -} -extern "C" { - pub fn MmAllocateContiguousMemory( - NumberOfBytes: SIZE_T, - HighestAcceptableAddress: PHYSICAL_ADDRESS, - ) -> PVOID; -} -extern "C" { - pub fn MmAllocateContiguousMemorySpecifyCache( - NumberOfBytes: SIZE_T, - LowestAcceptableAddress: PHYSICAL_ADDRESS, - HighestAcceptableAddress: PHYSICAL_ADDRESS, - BoundaryAddressMultiple: PHYSICAL_ADDRESS, - CacheType: MEMORY_CACHING_TYPE, - ) -> PVOID; -} -extern "C" { - pub fn MmAllocateContiguousMemorySpecifyCacheNode( - NumberOfBytes: SIZE_T, - LowestAcceptableAddress: PHYSICAL_ADDRESS, - HighestAcceptableAddress: PHYSICAL_ADDRESS, - BoundaryAddressMultiple: PHYSICAL_ADDRESS, - CacheType: MEMORY_CACHING_TYPE, - PreferredNode: NODE_REQUIREMENT, - ) -> PVOID; -} -extern "C" { - pub fn MmAllocateContiguousNodeMemory( - NumberOfBytes: SIZE_T, - LowestAcceptableAddress: PHYSICAL_ADDRESS, - HighestAcceptableAddress: PHYSICAL_ADDRESS, - BoundaryAddressMultiple: PHYSICAL_ADDRESS, - Protect: ULONG, - PreferredNode: NODE_REQUIREMENT, - ) -> PVOID; -} -extern "C" { - #[must_use] - pub fn MmAllocateContiguousMemoryEx( - NumberOfBytes: PSIZE_T, - LowestAcceptableAddress: PHYSICAL_ADDRESS, - HighestAcceptableAddress: PHYSICAL_ADDRESS, - BoundaryAddressMultiple: PHYSICAL_ADDRESS, - PreferredNode: NODE_REQUIREMENT, - Protect: ULONG, - PartitionObject: PVOID, - Tag: ULONG, - Flags: ULONG, - BaseAddress: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn MmFreeContiguousMemory(BaseAddress: PVOID); -} -extern "C" { - pub fn MmFreeContiguousMemorySpecifyCache( - BaseAddress: PVOID, - NumberOfBytes: SIZE_T, - CacheType: MEMORY_CACHING_TYPE, - ); -} -extern "C" { - pub fn MmSizeOfMdl(Base: PVOID, Length: SIZE_T) -> SIZE_T; -} -extern "C" { - pub fn MmCreateMdl(MemoryDescriptorList: PMDL, Base: PVOID, Length: SIZE_T) -> PMDL; -} -extern "C" { - pub fn MmMdlPageContentsState( - MemoryDescriptorList: PMDL, - State: MM_MDL_PAGE_CONTENTS_STATE, - ) -> MM_MDL_PAGE_CONTENTS_STATE; -} -extern "C" { - pub fn MmLockPagableDataSection(AddressWithinSection: PVOID) -> PVOID; -} -extern "C" { - pub fn MmResetDriverPaging(AddressWithinSection: PVOID); -} -extern "C" { - pub fn MmPageEntireDriver(AddressWithinSection: PVOID) -> PVOID; -} -extern "C" { - pub fn MmUnlockPagableImageSection(ImageSectionHandle: PVOID); -} -extern "C" { - pub fn MmIsDriverSuspectForVerifier(DriverObject: *mut _DRIVER_OBJECT) -> LOGICAL; -} -extern "C" { - pub fn MmIsDriverVerifying(DriverObject: *mut _DRIVER_OBJECT) -> LOGICAL; -} -extern "C" { - pub fn MmIsDriverVerifyingByAddress(AddressWithinSection: PVOID) -> LOGICAL; -} -extern "C" { - #[must_use] - pub fn MmProtectDriverSection( - AddressWithinSection: PVOID, - Size: SIZE_T, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn SeCaptureSubjectContext(SubjectContext: PSECURITY_SUBJECT_CONTEXT); -} -extern "C" { - pub fn SeLockSubjectContext(SubjectContext: PSECURITY_SUBJECT_CONTEXT); -} -extern "C" { - pub fn SeUnlockSubjectContext(SubjectContext: PSECURITY_SUBJECT_CONTEXT); -} -extern "C" { - pub fn SeReleaseSubjectContext(SubjectContext: PSECURITY_SUBJECT_CONTEXT); -} -extern "C" { - #[must_use] - pub fn SeAssignSecurity( - ParentDescriptor: PSECURITY_DESCRIPTOR, - ExplicitDescriptor: PSECURITY_DESCRIPTOR, - NewDescriptor: *mut PSECURITY_DESCRIPTOR, - IsDirectoryObject: BOOLEAN, - SubjectContext: PSECURITY_SUBJECT_CONTEXT, - GenericMapping: PGENERIC_MAPPING, - PoolType: POOL_TYPE, - ) -> NTSTATUS; -} -extern "C" { - pub fn SeComputeAutoInheritByObjectType( - ObjectType: PVOID, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - ParentSecurityDescriptor: PSECURITY_DESCRIPTOR, - ) -> ULONG; -} -extern "C" { - #[must_use] - pub fn SeAssignSecurityEx( - ParentDescriptor: PSECURITY_DESCRIPTOR, - ExplicitDescriptor: PSECURITY_DESCRIPTOR, - NewDescriptor: *mut PSECURITY_DESCRIPTOR, - ObjectType: *mut GUID, - IsDirectoryObject: BOOLEAN, - AutoInheritFlags: ULONG, - SubjectContext: PSECURITY_SUBJECT_CONTEXT, - GenericMapping: PGENERIC_MAPPING, - PoolType: POOL_TYPE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeDeassignSecurity(SecurityDescriptor: *mut PSECURITY_DESCRIPTOR) -> NTSTATUS; -} -extern "C" { - pub fn SeObjectCreateSaclAccessBits( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - ) -> ULONG; -} -extern "C" { - pub fn SeAccessCheck( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - SubjectSecurityContext: PSECURITY_SUBJECT_CONTEXT, - SubjectContextLocked: BOOLEAN, - DesiredAccess: ACCESS_MASK, - PreviouslyGrantedAccess: ACCESS_MASK, - Privileges: *mut PPRIVILEGE_SET, - GenericMapping: PGENERIC_MAPPING, - AccessMode: KPROCESSOR_MODE, - GrantedAccess: PACCESS_MASK, - AccessStatus: PNTSTATUS, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn SeSetAuditParameter( - AuditParameters: PSE_ADT_PARAMETER_ARRAY, - Type: SE_ADT_PARAMETER_TYPE, - Index: ULONG, - Data: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeReportSecurityEvent( - Flags: ULONG, - SourceName: PUNICODE_STRING, - UserSid: PSID, - AuditParameters: PSE_ADT_PARAMETER_ARRAY, - ) -> NTSTATUS; -} -extern "C" { - pub fn SeValidSecurityDescriptor( - Length: ULONG, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn SeRegisterImageVerificationCallback( - ImageType: SE_IMAGE_TYPE, - CallbackType: SE_IMAGE_VERIFICATION_CALLBACK_TYPE, - CallbackFunction: PSE_IMAGE_VERIFICATION_CALLBACK_FUNCTION, - CallbackContext: PVOID, - Token: SE_IMAGE_VERIFICATION_CALLBACK_TOKEN, - CallbackHandle: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn SeUnregisterImageVerificationCallback(CallbackHandle: PVOID); -} -extern "C" { - #[must_use] - pub fn PsCreateSystemThread( - ThreadHandle: PHANDLE, - DesiredAccess: ULONG, - ObjectAttributes: POBJECT_ATTRIBUTES, - ProcessHandle: HANDLE, - ClientId: PCLIENT_ID, - StartRoutine: PKSTART_ROUTINE, - StartContext: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsTerminateSystemThread(ExitStatus: NTSTATUS) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsWrapApcWow64Thread( - ApcContext: *mut PVOID, - ApcRoutine: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn PsGetVersion( - MajorVersion: PULONG, - MinorVersion: PULONG, - BuildNumber: PULONG, - CSDVersion: PUNICODE_STRING, - ) -> BOOLEAN; -} -extern "C" { - pub fn PsQueryTotalCycleTimeProcess( - Process: PEPROCESS, - CycleTimeStamp: PULONG64, - ) -> ULONG64; -} -extern "C" { - #[must_use] - pub fn PsAllocateAffinityToken(AffinityToken: *mut PAFFINITY_TOKEN) -> NTSTATUS; -} -extern "C" { - pub fn PsFreeAffinityToken(AffinityToken: PAFFINITY_TOKEN); -} -extern "C" { - #[must_use] - pub fn PsSetSystemMultipleGroupAffinityThread( - GroupAffinities: PGROUP_AFFINITY, - GroupCount: USHORT, - AffinityToken: PAFFINITY_TOKEN, - ) -> NTSTATUS; -} -extern "C" { - pub fn PsRevertToUserMultipleGroupAffinityThread(AffinityToken: PAFFINITY_TOKEN); -} -extern "C" { - pub fn IoAcquireCancelSpinLock(Irql: PKIRQL); -} -extern "C" { - #[must_use] - pub fn IoAllocateDriverObjectExtension( - DriverObject: PDRIVER_OBJECT, - ClientIdentificationAddress: PVOID, - DriverObjectExtensionSize: ULONG, - DriverObjectExtension: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoAllocateErrorLogEntry(IoObject: PVOID, EntrySize: UCHAR) -> PVOID; -} -extern "C" { - pub fn IoAllocateIrp(StackSize: CCHAR, ChargeQuota: BOOLEAN) -> PIRP; -} -extern "C" { - pub fn IoAllocateIrpEx( - DeviceObject: PDEVICE_OBJECT, - StackSize: CCHAR, - ChargeQuota: BOOLEAN, - ) -> PIRP; -} -extern "C" { - pub fn IoAllocateMdl( - VirtualAddress: PVOID, - Length: ULONG, - SecondaryBuffer: BOOLEAN, - ChargeQuota: BOOLEAN, - Irp: PIRP, - ) -> PMDL; -} -extern "C" { - #[must_use] - pub fn IoAttachDevice( - SourceDevice: PDEVICE_OBJECT, - TargetDevice: PUNICODE_STRING, - AttachedDevice: *mut PDEVICE_OBJECT, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoAttachDeviceToDeviceStack( - SourceDevice: PDEVICE_OBJECT, - TargetDevice: PDEVICE_OBJECT, - ) -> PDEVICE_OBJECT; -} -extern "C" { - pub fn IoBuildAsynchronousFsdRequest( - MajorFunction: ULONG, - DeviceObject: PDEVICE_OBJECT, - Buffer: PVOID, - Length: ULONG, - StartingOffset: PLARGE_INTEGER, - IoStatusBlock: PIO_STATUS_BLOCK, - ) -> PIRP; -} -extern "C" { - pub fn IoBuildDeviceIoControlRequest( - IoControlCode: ULONG, - DeviceObject: PDEVICE_OBJECT, - InputBuffer: PVOID, - InputBufferLength: ULONG, - OutputBuffer: PVOID, - OutputBufferLength: ULONG, - InternalDeviceIoControl: BOOLEAN, - Event: PKEVENT, - IoStatusBlock: PIO_STATUS_BLOCK, - ) -> PIRP; -} -extern "C" { - pub fn IoBuildPartialMdl( - SourceMdl: PMDL, - TargetMdl: PMDL, - VirtualAddress: PVOID, - Length: ULONG, - ); -} -extern "C" { - #[must_use] - pub fn IoGetBootDiskInformation( - BootDiskInformation: PBOOTDISK_INFORMATION, - Size: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetBootDiskInformationLite( - BootDiskInformation: *mut PBOOTDISK_INFORMATION_LITE, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoBuildSynchronousFsdRequest( - MajorFunction: ULONG, - DeviceObject: PDEVICE_OBJECT, - Buffer: PVOID, - Length: ULONG, - StartingOffset: PLARGE_INTEGER, - Event: PKEVENT, - IoStatusBlock: PIO_STATUS_BLOCK, - ) -> PIRP; -} -extern "C" { - #[must_use] - pub fn IofCallDriver(DeviceObject: PDEVICE_OBJECT, Irp: PIRP) -> NTSTATUS; -} -extern "C" { - pub fn IoCancelIrp(Irp: PIRP) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn IoCheckShareAccess( - DesiredAccess: ACCESS_MASK, - DesiredShareAccess: ULONG, - FileObject: PFILE_OBJECT, - ShareAccess: PSHARE_ACCESS, - Update: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoCheckShareAccessEx( - DesiredAccess: ACCESS_MASK, - DesiredShareAccess: ULONG, - FileObject: PFILE_OBJECT, - ShareAccess: PSHARE_ACCESS, - Update: BOOLEAN, - WritePermission: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoCheckLinkShareAccess( - DesiredAccess: ACCESS_MASK, - DesiredShareAccess: ULONG, - FileObject: PFILE_OBJECT, - ShareAccess: PSHARE_ACCESS, - LinkShareAccess: PLINK_SHARE_ACCESS, - IoShareAccessFlags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn IofCompleteRequest(Irp: PIRP, PriorityBoost: CCHAR); -} -extern "C" { - #[must_use] - pub fn IoConnectInterrupt( - InterruptObject: *mut PKINTERRUPT, - ServiceRoutine: PKSERVICE_ROUTINE, - ServiceContext: PVOID, - SpinLock: PKSPIN_LOCK, - Vector: ULONG, - Irql: KIRQL, - SynchronizeIrql: KIRQL, - InterruptMode: KINTERRUPT_MODE, - ShareVector: BOOLEAN, - ProcessorEnableMask: KAFFINITY, - FloatingSave: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoConnectInterruptEx( - Parameters: PIO_CONNECT_INTERRUPT_PARAMETERS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoCreateDevice( - DriverObject: PDRIVER_OBJECT, - DeviceExtensionSize: ULONG, - DeviceName: PUNICODE_STRING, - DeviceType: ULONG, - DeviceCharacteristics: ULONG, - Exclusive: BOOLEAN, - DeviceObject: *mut PDEVICE_OBJECT, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoIsWdmVersionAvailable(MajorVersion: UCHAR, MinorVersion: UCHAR) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn IoCreateFile( - FileHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - IoStatusBlock: PIO_STATUS_BLOCK, - AllocationSize: PLARGE_INTEGER, - FileAttributes: ULONG, - ShareAccess: ULONG, - Disposition: ULONG, - CreateOptions: ULONG, - EaBuffer: PVOID, - EaLength: ULONG, - CreateFileType: CREATE_FILE_TYPE, - InternalParameters: PVOID, - Options: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoCreateNotificationEvent( - EventName: PUNICODE_STRING, - EventHandle: PHANDLE, - ) -> PKEVENT; -} -extern "C" { - #[must_use] - pub fn IoCreateSymbolicLink( - SymbolicLinkName: PUNICODE_STRING, - DeviceName: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoCreateSynchronizationEvent( - EventName: PUNICODE_STRING, - EventHandle: PHANDLE, - ) -> PKEVENT; -} -extern "C" { - #[must_use] - pub fn IoCreateUnprotectedSymbolicLink( - SymbolicLinkName: PUNICODE_STRING, - DeviceName: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoDeleteDevice(DeviceObject: PDEVICE_OBJECT); -} -extern "C" { - #[must_use] - pub fn IoDeleteSymbolicLink(SymbolicLinkName: PUNICODE_STRING) -> NTSTATUS; -} -extern "C" { - pub fn IoDetachDevice(TargetDevice: PDEVICE_OBJECT); -} -extern "C" { - pub fn IoDisconnectInterrupt(InterruptObject: PKINTERRUPT); -} -extern "C" { - pub fn IoDisconnectInterruptEx(Parameters: PIO_DISCONNECT_INTERRUPT_PARAMETERS); -} -extern "C" { - pub fn IoReportInterruptActive( - Parameters: PIO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS, - ); -} -extern "C" { - pub fn IoReportInterruptInactive( - Parameters: PIO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS, - ); -} -extern "C" { - #[must_use] - pub fn IoGetAffinityInterrupt( - InterruptObject: PKINTERRUPT, - GroupAffinity: PGROUP_AFFINITY, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoFreeIrp(Irp: PIRP); -} -extern "C" { - pub fn IoFreeMdl(Mdl: PMDL); -} -extern "C" { - pub fn IoGetAttachedDeviceReference(DeviceObject: PDEVICE_OBJECT) -> PDEVICE_OBJECT; -} -extern "C" { - pub fn IoGetDriverObjectExtension( - DriverObject: PDRIVER_OBJECT, - ClientIdentificationAddress: PVOID, - ) -> PVOID; -} -extern "C" { - pub fn IoGetCurrentProcess() -> PEPROCESS; -} -extern "C" { - #[must_use] - pub fn IoGetDeviceObjectPointer( - ObjectName: PUNICODE_STRING, - DesiredAccess: ACCESS_MASK, - FileObject: *mut PFILE_OBJECT, - DeviceObject: *mut PDEVICE_OBJECT, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoGetDmaAdapter( - PhysicalDeviceObject: PDEVICE_OBJECT, - DeviceDescription: *mut _DEVICE_DESCRIPTION, - NumberOfMapRegisters: PULONG, - ) -> *mut _DMA_ADAPTER; -} -extern "C" { - #[must_use] - pub fn IoGetIommuInterface( - Version: ULONG, - InterfaceOut: PDMA_IOMMU_INTERFACE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetIommuInterfaceEx( - Version: ULONG, - Flags: ULONGLONG, - InterfaceOut: PDMA_IOMMU_INTERFACE_EX, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoForwardIrpSynchronously(DeviceObject: PDEVICE_OBJECT, Irp: PIRP) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn IoSynchronousCallDriver(DeviceObject: PDEVICE_OBJECT, Irp: PIRP) -> NTSTATUS; -} -extern "C" { - pub fn IoGetInitialStack() -> PVOID; -} -extern "C" { - pub fn IoGetStackLimits(LowLimit: PULONG_PTR, HighLimit: PULONG_PTR); -} -extern "C" { - pub fn IoWithinStackLimits(RegionStart: ULONG_PTR, RegionSize: SIZE_T) -> LOGICAL; -} -extern "C" { - pub fn IoGetRelatedDeviceObject(FileObject: PFILE_OBJECT) -> PDEVICE_OBJECT; -} -extern "C" { - pub fn IoGetTopLevelIrp() -> PIRP; -} -extern "C" { - pub fn IoInitializeIrp(Irp: PIRP, PacketSize: USHORT, StackSize: CCHAR); -} -extern "C" { - pub fn IoCleanupIrp(Irp: PIRP); -} -extern "C" { - pub fn IoInitializeIrpEx( - Irp: PIRP, - DeviceObject: PDEVICE_OBJECT, - PacketSize: USHORT, - StackSize: CCHAR, - ); -} -extern "C" { - #[must_use] - pub fn IoInitializeTimer( - DeviceObject: PDEVICE_OBJECT, - TimerRoutine: PIO_TIMER_ROUTINE, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoReuseIrp(Irp: PIRP, Iostatus: NTSTATUS); -} -extern "C" { - #[must_use] - pub fn IoRegisterShutdownNotification(DeviceObject: PDEVICE_OBJECT) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoRegisterLastChanceShutdownNotification( - DeviceObject: PDEVICE_OBJECT, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoReleaseCancelSpinLock(Irql: KIRQL); -} -extern "C" { - pub fn IoRemoveShareAccess(FileObject: PFILE_OBJECT, ShareAccess: PSHARE_ACCESS); -} -extern "C" { - pub fn IoRemoveLinkShareAccess( - FileObject: PFILE_OBJECT, - ShareAccess: PSHARE_ACCESS, - LinkShareAccess: PLINK_SHARE_ACCESS, - ); -} -extern "C" { - pub fn IoRemoveLinkShareAccessEx( - FileObject: PFILE_OBJECT, - ShareAccess: PSHARE_ACCESS, - LinkShareAccess: PLINK_SHARE_ACCESS, - IoShareAccessFlags: ULONG, - ); -} -extern "C" { - #[must_use] - pub fn IoSetCompletionRoutineEx( - DeviceObject: PDEVICE_OBJECT, - Irp: PIRP, - CompletionRoutine: PIO_COMPLETION_ROUTINE, - Context: PVOID, - InvokeOnSuccess: BOOLEAN, - InvokeOnError: BOOLEAN, - InvokeOnCancel: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoSetShareAccess( - DesiredAccess: ACCESS_MASK, - DesiredShareAccess: ULONG, - FileObject: PFILE_OBJECT, - ShareAccess: PSHARE_ACCESS, - ); -} -extern "C" { - pub fn IoSetShareAccessEx( - DesiredAccess: ACCESS_MASK, - DesiredShareAccess: ULONG, - FileObject: PFILE_OBJECT, - ShareAccess: PSHARE_ACCESS, - WritePermission: PBOOLEAN, - ); -} -extern "C" { - pub fn IoSetLinkShareAccess( - DesiredAccess: ACCESS_MASK, - DesiredShareAccess: ULONG, - FileObject: PFILE_OBJECT, - ShareAccess: PSHARE_ACCESS, - LinkShareAccess: PLINK_SHARE_ACCESS, - IoShareAccessFlags: ULONG, - ); -} -extern "C" { - pub fn IoSetTopLevelIrp(Irp: PIRP); -} -extern "C" { - pub fn IoInitializeRemoveLockEx( - Lock: PIO_REMOVE_LOCK, - AllocateTag: ULONG, - MaxLockedMinutes: ULONG, - HighWatermark: ULONG, - RemlockSize: ULONG, - ); -} -extern "C" { - #[must_use] - pub fn IoAcquireRemoveLockEx( - RemoveLock: PIO_REMOVE_LOCK, - Tag: PVOID, - File: PCSTR, - Line: ULONG, - RemlockSize: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoReleaseRemoveLockEx( - RemoveLock: PIO_REMOVE_LOCK, - Tag: PVOID, - RemlockSize: ULONG, - ); -} -extern "C" { - pub fn IoReleaseRemoveLockAndWaitEx( - RemoveLock: PIO_REMOVE_LOCK, - Tag: PVOID, - RemlockSize: ULONG, - ); -} -extern "C" { - pub fn IoSizeOfIrpEx(DeviceObject: PDEVICE_OBJECT, StackSize: CCHAR) -> USHORT; -} -extern "C" { - pub fn IoStartNextPacket(DeviceObject: PDEVICE_OBJECT, Cancelable: BOOLEAN); -} -extern "C" { - pub fn IoStartNextPacketByKey( - DeviceObject: PDEVICE_OBJECT, - Cancelable: BOOLEAN, - Key: ULONG, - ); -} -extern "C" { - pub fn IoStartPacket( - DeviceObject: PDEVICE_OBJECT, - Irp: PIRP, - Key: PULONG, - CancelFunction: PDRIVER_CANCEL, - ); -} -extern "C" { - pub fn IoSetStartIoAttributes( - DeviceObject: PDEVICE_OBJECT, - DeferredStartIo: BOOLEAN, - NonCancelable: BOOLEAN, - ); -} -extern "C" { - pub fn IoStartTimer(DeviceObject: PDEVICE_OBJECT); -} -extern "C" { - pub fn IoStopTimer(DeviceObject: PDEVICE_OBJECT); -} -extern "C" { - pub fn IoUnregisterShutdownNotification(DeviceObject: PDEVICE_OBJECT); -} -extern "C" { - pub fn IoUpdateShareAccess(FileObject: PFILE_OBJECT, ShareAccess: PSHARE_ACCESS); -} -extern "C" { - pub fn IoUpdateLinkShareAccess( - FileObject: PFILE_OBJECT, - ShareAccess: PSHARE_ACCESS, - LinkShareAccess: PLINK_SHARE_ACCESS, - ); -} -extern "C" { - pub fn IoUpdateLinkShareAccessEx( - FileObject: PFILE_OBJECT, - ShareAccess: PSHARE_ACCESS, - LinkShareAccess: PLINK_SHARE_ACCESS, - IoShareAccessFlags: ULONG, - ); -} -extern "C" { - pub fn IoWriteErrorLogEntry(ElEntry: PVOID); -} -extern "C" { - #[must_use] - pub fn IoCreateSystemThread( - IoObject: PVOID, - ThreadHandle: PHANDLE, - DesiredAccess: ULONG, - ObjectAttributes: POBJECT_ATTRIBUTES, - ProcessHandle: HANDLE, - ClientId: PCLIENT_ID, - StartRoutine: PKSTART_ROUTINE, - StartContext: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoAllocateWorkItem(DeviceObject: PDEVICE_OBJECT) -> PIO_WORKITEM; -} -extern "C" { - pub fn IoFreeWorkItem(IoWorkItem: PIO_WORKITEM); -} -extern "C" { - pub fn IoQueueWorkItem( - IoWorkItem: PIO_WORKITEM, - WorkerRoutine: PIO_WORKITEM_ROUTINE, - QueueType: WORK_QUEUE_TYPE, - Context: PVOID, - ); -} -extern "C" { - pub fn IoQueueWorkItemEx( - IoWorkItem: PIO_WORKITEM, - WorkerRoutine: PIO_WORKITEM_ROUTINE_EX, - QueueType: WORK_QUEUE_TYPE, - Context: PVOID, - ); -} -extern "C" { - pub fn IoSizeofWorkItem() -> ULONG; -} -extern "C" { - pub fn IoInitializeWorkItem(IoObject: PVOID, IoWorkItem: PIO_WORKITEM); -} -extern "C" { - pub fn IoUninitializeWorkItem(IoWorkItem: PIO_WORKITEM); -} -extern "C" { - pub fn IoTryQueueWorkItem( - IoWorkItem: PIO_WORKITEM, - WorkerRoutine: PIO_WORKITEM_ROUTINE_EX, - QueueType: WORK_QUEUE_TYPE, - Context: PVOID, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn IoWMIRegistrationControl( - DeviceObject: PDEVICE_OBJECT, - Action: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWMIAllocateInstanceIds( - Guid: LPCGUID, - InstanceCount: ULONG, - FirstInstanceId: *mut ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWMISuggestInstanceName( - PhysicalDeviceObject: PDEVICE_OBJECT, - SymbolicLinkName: PUNICODE_STRING, - CombineNames: BOOLEAN, - SuggestedInstanceName: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWMIWriteEvent(WnodeEventItem: PVOID) -> NTSTATUS; -} -extern "C" { - pub fn IoWMIDeviceObjectToProviderId(DeviceObject: PDEVICE_OBJECT) -> ULONG; -} -extern "C" { - #[must_use] - pub fn IoWMIOpenBlock( - Guid: LPCGUID, - DesiredAccess: ULONG, - DataBlockObject: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWMIQueryAllData( - DataBlockObject: PVOID, - InOutBufferSize: PULONG, - OutBuffer: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWMIQueryAllDataMultiple( - DataBlockObjectList: *mut PVOID, - ObjectCount: ULONG, - InOutBufferSize: PULONG, - OutBuffer: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWMIQuerySingleInstance( - DataBlockObject: PVOID, - InstanceName: PUNICODE_STRING, - InOutBufferSize: PULONG, - OutBuffer: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWMIQuerySingleInstanceMultiple( - DataBlockObjectList: *mut PVOID, - InstanceNames: PUNICODE_STRING, - ObjectCount: ULONG, - InOutBufferSize: PULONG, - OutBuffer: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWMISetSingleInstance( - DataBlockObject: PVOID, - InstanceName: PUNICODE_STRING, - Version: ULONG, - ValueBufferSize: ULONG, - ValueBuffer: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWMISetSingleItem( - DataBlockObject: PVOID, - InstanceName: PUNICODE_STRING, - DataItemId: ULONG, - Version: ULONG, - ValueBufferSize: ULONG, - ValueBuffer: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWMIExecuteMethod( - DataBlockObject: PVOID, - InstanceName: PUNICODE_STRING, - MethodId: ULONG, - InBufferSize: ULONG, - OutBufferSize: PULONG, - InOutBuffer: PUCHAR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWMISetNotificationCallback( - Object: PVOID, - Callback: WMI_NOTIFICATION_CALLBACK, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWMIHandleToInstanceName( - DataBlockObject: PVOID, - FileHandle: HANDLE, - InstanceName: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWMIDeviceObjectToInstanceName( - DataBlockObject: PVOID, - DeviceObject: PDEVICE_OBJECT, - InstanceName: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoIs32bitProcess(Irp: PIRP) -> BOOLEAN; -} -extern "C" { - pub fn IoIsInitiator32bitProcess(Irp: PIRP) -> BOOLEAN; -} -extern "C" { - pub fn IoFreeErrorLogEntry(ElEntry: PVOID); -} -extern "C" { - #[must_use] - pub fn IoCsqInitialize( - Csq: PIO_CSQ, - CsqInsertIrp: PIO_CSQ_INSERT_IRP, - CsqRemoveIrp: PIO_CSQ_REMOVE_IRP, - CsqPeekNextIrp: PIO_CSQ_PEEK_NEXT_IRP, - CsqAcquireLock: PIO_CSQ_ACQUIRE_LOCK, - CsqReleaseLock: PIO_CSQ_RELEASE_LOCK, - CsqCompleteCanceledIrp: PIO_CSQ_COMPLETE_CANCELED_IRP, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoCsqInitializeEx( - Csq: PIO_CSQ, - CsqInsertIrp: PIO_CSQ_INSERT_IRP_EX, - CsqRemoveIrp: PIO_CSQ_REMOVE_IRP, - CsqPeekNextIrp: PIO_CSQ_PEEK_NEXT_IRP, - CsqAcquireLock: PIO_CSQ_ACQUIRE_LOCK, - CsqReleaseLock: PIO_CSQ_RELEASE_LOCK, - CsqCompleteCanceledIrp: PIO_CSQ_COMPLETE_CANCELED_IRP, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoCsqInsertIrp(Csq: PIO_CSQ, Irp: PIRP, Context: PIO_CSQ_IRP_CONTEXT); -} -extern "C" { - #[must_use] - pub fn IoCsqInsertIrpEx( - Csq: PIO_CSQ, - Irp: PIRP, - Context: PIO_CSQ_IRP_CONTEXT, - InsertContext: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoCsqRemoveNextIrp(Csq: PIO_CSQ, PeekContext: PVOID) -> PIRP; -} -extern "C" { - pub fn IoCsqRemoveIrp(Csq: PIO_CSQ, Context: PIO_CSQ_IRP_CONTEXT) -> PIRP; -} -extern "C" { - #[must_use] - pub fn IoValidateDeviceIoControlAccess(Irp: PIRP, RequiredAccess: ULONG) -> NTSTATUS; -} -extern "C" { - pub fn IoGetIoPriorityHint(Irp: PIRP) -> IO_PRIORITY_HINT; -} -extern "C" { - #[must_use] - pub fn IoSetIoPriorityHint(Irp: PIRP, PriorityHint: IO_PRIORITY_HINT) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoAllocateSfioStreamIdentifier( - FileObject: PFILE_OBJECT, - Length: ULONG, - Signature: PVOID, - StreamIdentifier: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoGetSfioStreamIdentifier( - FileObject: PFILE_OBJECT, - Signature: PVOID, - ) -> PVOID; -} -extern "C" { - #[must_use] - pub fn IoFreeSfioStreamIdentifier( - FileObject: PFILE_OBJECT, - Signature: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetIoAttributionHandle( - Irp: PIRP, - IoAttributionHandle: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoRecordIoAttribution( - OpaqueHandle: PVOID, - AttributionInformation: *mut IO_ATTRIBUTION_INFORMATION, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoSetIoAttributionIrp( - Irp: PIRP, - AttributionSource: PVOID, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetContainerInformation( - InformationClass: IO_CONTAINER_INFORMATION_CLASS, - ContainerObject: PVOID, - Buffer: PVOID, - BufferLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoRegisterContainerNotification( - NotificationClass: IO_CONTAINER_NOTIFICATION_CLASS, - CallbackFunction: PIO_CONTAINER_NOTIFICATION_FUNCTION, - NotificationInformation: PVOID, - NotificationInformationLength: ULONG, - CallbackRegistration: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoUnregisterContainerNotification(CallbackRegistration: PVOID); -} -extern "C" { - #[must_use] - pub fn IoReserveKsrPersistentMemory( - DriverObject: PDRIVER_OBJECT, - PhysicalDeviceObject: PDEVICE_OBJECT, - Size: SIZE_T, - Flags: ULONG, - DataHandle: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoFreeKsrPersistentMemory(DataHandle: PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoQueryKsrPersistentMemorySize( - DriverObject: PDRIVER_OBJECT, - PhysicalDeviceObject: PDEVICE_OBJECT, - BufferSize: PSIZE_T, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoAcquireKsrPersistentMemory( - DriverObject: PDRIVER_OBJECT, - PhysicalDeviceObject: PDEVICE_OBJECT, - Buffer: PVOID, - Size: PSIZE_T, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWriteKsrPersistentMemory( - DataHandle: PVOID, - Buffer: PVOID, - Size: SIZE_T, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoEnumerateKsrPersistentMemoryEx( - DriverObject: PDRIVER_OBJECT, - PhysicalDeviceObject: PDEVICE_OBJECT, - PhysicalDeviceId: PUNICODE_STRING, - Callback: PIO_PERSISTED_MEMORY_ENUMERATION_CALLBACK, - CallbackContext: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoReserveKsrPersistentMemoryEx( - DriverObject: PDRIVER_OBJECT, - PhysicalDeviceObject: PDEVICE_OBJECT, - PhysicalDeviceId: PUNICODE_STRING, - DataTag: PUSHORT, - DataVersion: ULONG, - Size: SIZE_T, - Flags: ULONG, - DataHandle: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoQueryKsrPersistentMemorySizeEx( - DriverObject: PDRIVER_OBJECT, - PhysicalDeviceObject: PDEVICE_OBJECT, - PhysicalDeviceId: PUNICODE_STRING, - DataTag: PUSHORT, - DataVersion: PULONG, - BufferSize: PSIZE_T, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoAcquireKsrPersistentMemoryEx( - DriverObject: PDRIVER_OBJECT, - PhysicalDeviceObject: PDEVICE_OBJECT, - PhysicalDeviceId: PUNICODE_STRING, - DataTag: PUSHORT, - DataVersion: PULONG, - Buffer: PVOID, - Size: PSIZE_T, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WmiQueryTraceInformation( - TraceInformationClass: TRACE_INFORMATION_CLASS, - TraceInformation: PVOID, - TraceInformationLength: ULONG, - RequiredLength: PULONG, - Buffer: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn EtwRegister( - ProviderId: LPCGUID, - EnableCallback: PETWENABLECALLBACK, - CallbackContext: PVOID, - RegHandle: PREGHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn EtwUnregister(RegHandle: REGHANDLE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn EtwSetInformation( - RegHandle: REGHANDLE, - InformationClass: EVENT_INFO_CLASS, - EventInformation: PVOID, - InformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn EtwEventEnabled( - RegHandle: REGHANDLE, - EventDescriptor: PCEVENT_DESCRIPTOR, - ) -> BOOLEAN; -} -extern "C" { - pub fn EtwProviderEnabled( - RegHandle: REGHANDLE, - Level: UCHAR, - Keyword: ULONGLONG, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn EtwActivityIdControl(ControlCode: ULONG, ActivityId: LPGUID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn EtwWrite( - RegHandle: REGHANDLE, - EventDescriptor: PCEVENT_DESCRIPTOR, - ActivityId: LPCGUID, - UserDataCount: ULONG, - UserData: PEVENT_DATA_DESCRIPTOR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn EtwWriteTransfer( - RegHandle: REGHANDLE, - EventDescriptor: PCEVENT_DESCRIPTOR, - ActivityId: LPCGUID, - RelatedActivityId: LPCGUID, - UserDataCount: ULONG, - UserData: PEVENT_DATA_DESCRIPTOR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn EtwWriteString( - RegHandle: REGHANDLE, - Level: UCHAR, - Keyword: ULONGLONG, - ActivityId: LPCGUID, - String: PCWSTR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn EtwWriteEx( - RegHandle: REGHANDLE, - EventDescriptor: PCEVENT_DESCRIPTOR, - Filter: ULONG64, - Flags: ULONG, - ActivityId: LPCGUID, - RelatedActivityId: LPCGUID, - UserDataCount: ULONG, - UserData: PEVENT_DATA_DESCRIPTOR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeEtwWriteKMCveEvent( - CveId: PCUNICODE_STRING, - AdditionalDetails: PCUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoInvalidateDeviceRelations( - DeviceObject: PDEVICE_OBJECT, - Type: DEVICE_RELATION_TYPE, - ); -} -extern "C" { - pub fn IoRequestDeviceEject(PhysicalDeviceObject: PDEVICE_OBJECT); -} -extern "C" { - #[must_use] - pub fn IoRequestDeviceEjectEx( - PhysicalDeviceObject: PDEVICE_OBJECT, - Callback: PIO_DEVICE_EJECT_CALLBACK, - Context: PVOID, - DriverObject: PDRIVER_OBJECT, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetDeviceProperty( - DeviceObject: PDEVICE_OBJECT, - DeviceProperty: DEVICE_REGISTRY_PROPERTY::Type, - BufferLength: ULONG, - PropertyBuffer: PVOID, - ResultLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoOpenDeviceRegistryKey( - DeviceObject: PDEVICE_OBJECT, - DevInstKeyType: ULONG, - DesiredAccess: ACCESS_MASK, - DeviceRegKey: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoRegisterDeviceInterface( - PhysicalDeviceObject: PDEVICE_OBJECT, - InterfaceClassGuid: *const GUID, - ReferenceString: PUNICODE_STRING, - SymbolicLinkName: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoOpenDeviceInterfaceRegistryKey( - SymbolicLinkName: PUNICODE_STRING, - DesiredAccess: ACCESS_MASK, - DeviceInterfaceRegKey: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoSetDeviceInterfaceState( - SymbolicLinkName: PUNICODE_STRING, - Enable: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetDeviceInterfaces( - InterfaceClassGuid: *const GUID, - PhysicalDeviceObject: PDEVICE_OBJECT, - Flags: ULONG, - SymbolicLinkList: *mut PZZWSTR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetDeviceInterfaceAlias( - SymbolicLinkName: PUNICODE_STRING, - AliasInterfaceClassGuid: *const GUID, - AliasSymbolicLinkName: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoRegisterPlugPlayNotification( - EventCategory: IO_NOTIFICATION_EVENT_CATEGORY, - EventCategoryFlags: ULONG, - EventCategoryData: PVOID, - DriverObject: PDRIVER_OBJECT, - CallbackRoutine: PDRIVER_NOTIFICATION_CALLBACK_ROUTINE, - Context: PVOID, - NotificationEntry: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoUnregisterPlugPlayNotification(NotificationEntry: PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoUnregisterPlugPlayNotificationEx(NotificationEntry: PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoReportTargetDeviceChange( - PhysicalDeviceObject: PDEVICE_OBJECT, - NotificationStructure: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoInvalidateDeviceState(PhysicalDeviceObject: PDEVICE_OBJECT); -} -extern "C" { - #[must_use] - pub fn IoReportTargetDeviceChangeAsynchronous( - PhysicalDeviceObject: PDEVICE_OBJECT, - NotificationStructure: PVOID, - Callback: PDEVICE_CHANGE_COMPLETE_CALLBACK, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetDriverDirectory( - DriverObject: PDRIVER_OBJECT, - DirectoryType: DRIVER_DIRECTORY_TYPE, - Flags: ULONG, - DriverDirectoryHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetDeviceDirectory( - PhysicalDeviceObject: PDEVICE_OBJECT, - DirectoryType: DEVICE_DIRECTORY_TYPE, - Flags: ULONG, - Reserved: PVOID, - DeviceDirectoryHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoOpenDriverRegistryKey( - DriverObject: PDRIVER_OBJECT, - RegKeyType: DRIVER_REGKEY_TYPE, - DesiredAccess: ACCESS_MASK, - Flags: ULONG, - DriverRegKey: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoSetDevicePropertyData( - Pdo: PDEVICE_OBJECT, - PropertyKey: *const DEVPROPKEY, - Lcid: LCID, - Flags: ULONG, - Type: DEVPROPTYPE, - Size: ULONG, - Data: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetDevicePropertyData( - Pdo: PDEVICE_OBJECT, - PropertyKey: *const DEVPROPKEY, - Lcid: LCID, - Flags: ULONG, - Size: ULONG, - Data: PVOID, - RequiredSize: PULONG, - Type: PDEVPROPTYPE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoSetDeviceInterfacePropertyData( - SymbolicLinkName: PUNICODE_STRING, - PropertyKey: *const DEVPROPKEY, - Lcid: LCID, - Flags: ULONG, - Type: DEVPROPTYPE, - Size: ULONG, - Data: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetDeviceInterfacePropertyData( - SymbolicLinkName: PUNICODE_STRING, - PropertyKey: *const DEVPROPKEY, - Lcid: LCID, - Flags: ULONG, - Size: ULONG, - Data: PVOID, - RequiredSize: PULONG, - Type: PDEVPROPTYPE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetDeviceNumaNode(Pdo: PDEVICE_OBJECT, NodeNumber: PUSHORT) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoReplacePartitionUnit( - TargetPdo: PDEVICE_OBJECT, - SparePdo: PDEVICE_OBJECT, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn KeFlushWriteBuffer(); -} -extern "C" { - pub fn KeQueryPerformanceCounter( - PerformanceFrequency: PLARGE_INTEGER, - ) -> LARGE_INTEGER; -} -extern "C" { - pub fn KeStallExecutionProcessor(MicroSeconds: ULONG); -} -extern "C" { - pub fn PoSetHiberRange( - MemoryMap: PVOID, - Flags: ULONG, - Address: PVOID, - Length: ULONG_PTR, - Tag: ULONG, - ); -} -extern "C" { - pub fn PoSetSystemState(Flags: EXECUTION_STATE); -} -extern "C" { - pub fn PoRegisterSystemState(StateHandle: PVOID, Flags: EXECUTION_STATE) -> PVOID; -} -extern "C" { - #[must_use] - pub fn PoCreatePowerRequest( - PowerRequest: *mut PVOID, - DeviceObject: PDEVICE_OBJECT, - Context: PCOUNTED_REASON_CONTEXT, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PoSetPowerRequest(PowerRequest: PVOID, Type: POWER_REQUEST_TYPE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PoClearPowerRequest( - PowerRequest: PVOID, - Type: POWER_REQUEST_TYPE, - ) -> NTSTATUS; -} -extern "C" { - pub fn PoDeletePowerRequest(PowerRequest: PVOID); -} -extern "C" { - #[must_use] - pub fn PoRequestPowerIrp( - DeviceObject: PDEVICE_OBJECT, - MinorFunction: UCHAR, - PowerState: POWER_STATE, - CompletionFunction: PREQUEST_POWER_COMPLETE, - Context: PVOID, - Irp: *mut PIRP, - ) -> NTSTATUS; -} -extern "C" { - pub fn PoSetSystemWake(Irp: PIRP); -} -extern "C" { - pub fn PoSetSystemWakeDevice(DeviceObject: PDEVICE_OBJECT); -} -extern "C" { - pub fn PoGetSystemWake(Irp: PIRP) -> BOOLEAN; -} -extern "C" { - pub fn PoUnregisterSystemState(StateHandle: PVOID); -} -extern "C" { - pub fn PoSetPowerState( - DeviceObject: PDEVICE_OBJECT, - Type: POWER_STATE_TYPE, - State: POWER_STATE, - ) -> POWER_STATE; -} -extern "C" { - #[must_use] - pub fn PoCallDriver(DeviceObject: PDEVICE_OBJECT, Irp: PIRP) -> NTSTATUS; -} -extern "C" { - pub fn PoStartNextPowerIrp(Irp: PIRP); -} -extern "C" { - pub fn PoRegisterDeviceForIdleDetection( - DeviceObject: PDEVICE_OBJECT, - ConservationIdleTime: ULONG, - PerformanceIdleTime: ULONG, - State: DEVICE_POWER_STATE, - ) -> PULONG; -} -extern "C" { - pub fn PoSetDeviceBusyEx(IdlePointer: PULONG); -} -extern "C" { - pub fn PoStartDeviceBusy(IdlePointer: PULONG); -} -extern "C" { - pub fn PoEndDeviceBusy(IdlePointer: PULONG); -} -extern "C" { - pub fn PoQueryWatchdogTime(Pdo: PDEVICE_OBJECT, SecondsRemaining: PULONG) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn PoRegisterPowerSettingCallback( - DeviceObject: PDEVICE_OBJECT, - SettingGuid: LPCGUID, - Callback: PPOWER_SETTING_CALLBACK, - Context: PVOID, - Handle: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PoUnregisterPowerSettingCallback(Handle: PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PoFxRegisterDevice( - Pdo: PDEVICE_OBJECT, - Device: PPO_FX_DEVICE, - Handle: *mut POHANDLE, - ) -> NTSTATUS; -} -extern "C" { - pub fn PoFxStartDevicePowerManagement(Handle: POHANDLE); -} -extern "C" { - pub fn PoFxUnregisterDevice(Handle: POHANDLE); -} -extern "C" { - #[must_use] - pub fn PoFxRegisterCrashdumpDevice(Handle: POHANDLE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PoFxPowerOnCrashdumpDevice(Handle: POHANDLE, Context: PVOID) -> NTSTATUS; -} -extern "C" { - pub fn PoFxActivateComponent(Handle: POHANDLE, Component: ULONG, Flags: ULONG); -} -extern "C" { - pub fn PoFxCompleteDevicePowerNotRequired(Handle: POHANDLE); -} -extern "C" { - pub fn PoFxCompleteIdleCondition(Handle: POHANDLE, Component: ULONG); -} -extern "C" { - pub fn PoFxCompleteIdleState(Handle: POHANDLE, Component: ULONG); -} -extern "C" { - pub fn PoFxIdleComponent(Handle: POHANDLE, Component: ULONG, Flags: ULONG); -} -extern "C" { - pub fn PoFxSetComponentLatency( - Handle: POHANDLE, - Component: ULONG, - Latency: ULONGLONG, - ); -} -extern "C" { - pub fn PoFxSetComponentResidency( - Handle: POHANDLE, - Component: ULONG, - Residency: ULONGLONG, - ); -} -extern "C" { - pub fn PoFxSetComponentWake(Handle: POHANDLE, Component: ULONG, WakeHint: BOOLEAN); -} -extern "C" { - pub fn PoFxSetDeviceIdleTimeout(Handle: POHANDLE, IdleTimeout: ULONGLONG); -} -extern "C" { - pub fn PoFxReportDevicePoweredOn(Handle: POHANDLE); -} -extern "C" { - #[must_use] - pub fn PoFxPowerControl( - Handle: POHANDLE, - PowerControlCode: LPCGUID, - InBuffer: PVOID, - InBufferSize: SIZE_T, - OutBuffer: PVOID, - OutBufferSize: SIZE_T, - BytesReturned: PSIZE_T, - ) -> NTSTATUS; -} -extern "C" { - pub fn PoFxNotifySurprisePowerOn(Pdo: PDEVICE_OBJECT); -} -extern "C" { - #[must_use] - pub fn PoFxRegisterComponentPerfStates( - Handle: POHANDLE, - Component: ULONG, - Flags: ULONGLONG, - ComponentPerfStateCallback: PPO_FX_COMPONENT_PERF_STATE_CALLBACK, - InputStateInfo: PPO_FX_COMPONENT_PERF_INFO, - OutputStateInfo: *mut PPO_FX_COMPONENT_PERF_INFO, - ) -> NTSTATUS; -} -extern "C" { - pub fn PoFxIssueComponentPerfStateChange( - Handle: POHANDLE, - Flags: ULONG, - Component: ULONG, - PerfChange: PPO_FX_PERF_STATE_CHANGE, - Context: PVOID, - ); -} -extern "C" { - pub fn PoFxIssueComponentPerfStateChangeMultiple( - Handle: POHANDLE, - Flags: ULONG, - Component: ULONG, - PerfChangesCount: ULONG, - PerfChanges: *mut PO_FX_PERF_STATE_CHANGE, - Context: PVOID, - ); -} -extern "C" { - #[must_use] - pub fn PoFxQueryCurrentComponentPerfState( - Handle: POHANDLE, - Flags: ULONG, - Component: ULONG, - SetIndex: ULONG, - CurrentPerf: PULONGLONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PoFxSetTargetDripsDevicePowerState( - Handle: POHANDLE, - TargetState: DEVICE_POWER_STATE, - ) -> NTSTATUS; -} -extern "C" { - pub fn PoFxCompleteDirectedPowerDown(Handle: POHANDLE); -} -extern "C" { - #[must_use] - pub fn PoCreateThermalRequest( - ThermalRequest: *mut PVOID, - TargetDeviceObject: PDEVICE_OBJECT, - PolicyDeviceObject: PDEVICE_OBJECT, - Context: PCOUNTED_REASON_CONTEXT, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn PoGetThermalRequestSupport( - ThermalRequest: PVOID, - Type: PO_THERMAL_REQUEST_TYPE, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn PoSetThermalPassiveCooling( - ThermalRequest: PVOID, - Throttle: UCHAR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PoSetThermalActiveCooling( - ThermalRequest: PVOID, - Engaged: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn PoDeleteThermalRequest(ThermalRequest: PVOID); -} -extern "C" { - pub fn PoFxRegisterDripsWatchdogCallback( - Handle: POHANDLE, - Callback: PPO_FX_DRIPS_WATCHDOG_CALLBACK, - IncludeChildDevices: BOOLEAN, - MatchingDriverObject: PDRIVER_OBJECT, - ); -} -extern "C" { - #[must_use] - pub fn ObReferenceObjectByHandle( - Handle: HANDLE, - DesiredAccess: ACCESS_MASK, - ObjectType: POBJECT_TYPE, - AccessMode: KPROCESSOR_MODE, - Object: *mut PVOID, - HandleInformation: POBJECT_HANDLE_INFORMATION, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ObReferenceObjectByHandleWithTag( - Handle: HANDLE, - DesiredAccess: ACCESS_MASK, - ObjectType: POBJECT_TYPE, - AccessMode: KPROCESSOR_MODE, - Tag: ULONG, - Object: *mut PVOID, - HandleInformation: POBJECT_HANDLE_INFORMATION, - ) -> NTSTATUS; -} -extern "C" { - pub fn ObReferenceObjectSafe(Object: PVOID) -> BOOLEAN; -} -extern "C" { - pub fn ObReferenceObjectSafeWithTag(Object: PVOID, Tag: ULONG) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn ObCloseHandle(Handle: HANDLE, PreviousMode: KPROCESSOR_MODE) -> NTSTATUS; -} -extern "C" { - pub fn ObfReferenceObject(Object: PVOID) -> LONG_PTR; -} -extern "C" { - pub fn ObfReferenceObjectWithTag(Object: PVOID, Tag: ULONG) -> LONG_PTR; -} -extern "C" { - #[must_use] - pub fn ObReferenceObjectByPointer( - Object: PVOID, - DesiredAccess: ACCESS_MASK, - ObjectType: POBJECT_TYPE, - AccessMode: KPROCESSOR_MODE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ObReferenceObjectByPointerWithTag( - Object: PVOID, - DesiredAccess: ACCESS_MASK, - ObjectType: POBJECT_TYPE, - AccessMode: KPROCESSOR_MODE, - Tag: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn ObfDereferenceObject(Object: PVOID) -> LONG_PTR; -} -extern "C" { - pub fn ObfDereferenceObjectWithTag(Object: PVOID, Tag: ULONG) -> LONG_PTR; -} -extern "C" { - pub fn ObDereferenceObjectDeferDelete(Object: PVOID); -} -extern "C" { - pub fn ObDereferenceObjectDeferDeleteWithTag(Object: PVOID, Tag: ULONG); -} -extern "C" { - #[must_use] - pub fn ObGetObjectSecurity( - Object: PVOID, - SecurityDescriptor: *mut PSECURITY_DESCRIPTOR, - MemoryAllocated: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn ObReleaseObjectSecurity( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - MemoryAllocated: BOOLEAN, - ); -} -extern "C" { - #[must_use] - pub fn ObRegisterCallbacks( - CallbackRegistration: POB_CALLBACK_REGISTRATION, - RegistrationHandle: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn ObUnRegisterCallbacks(RegistrationHandle: PVOID); -} -extern "C" { - pub fn ObGetFilterVersion() -> USHORT; -} -extern "C" { - #[must_use] - pub fn ZwCreateFile( - FileHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - IoStatusBlock: PIO_STATUS_BLOCK, - AllocationSize: PLARGE_INTEGER, - FileAttributes: ULONG, - ShareAccess: ULONG, - CreateDisposition: ULONG, - CreateOptions: ULONG, - EaBuffer: PVOID, - EaLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenFile( - FileHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - IoStatusBlock: PIO_STATUS_BLOCK, - ShareAccess: ULONG, - OpenOptions: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwLoadDriver(DriverServiceName: PUNICODE_STRING) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwUnloadDriver(DriverServiceName: PUNICODE_STRING) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryInformationFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - FileInformation: PVOID, - Length: ULONG, - FileInformationClass: FILE_INFORMATION_CLASS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetInformationFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - FileInformation: PVOID, - Length: ULONG, - FileInformationClass: FILE_INFORMATION_CLASS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwReadFile( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - Buffer: PVOID, - Length: ULONG, - ByteOffset: PLARGE_INTEGER, - Key: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwWriteFile( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - Buffer: PVOID, - Length: ULONG, - ByteOffset: PLARGE_INTEGER, - Key: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwClose(Handle: HANDLE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCreateDirectoryObject( - DirectoryHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwMakeTemporaryObject(Handle: HANDLE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCreateSection( - SectionHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - MaximumSize: PLARGE_INTEGER, - SectionPageProtection: ULONG, - AllocationAttributes: ULONG, - FileHandle: HANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenSection( - SectionHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwMapViewOfSection( - SectionHandle: HANDLE, - ProcessHandle: HANDLE, - BaseAddress: *mut PVOID, - ZeroBits: ULONG_PTR, - CommitSize: SIZE_T, - SectionOffset: PLARGE_INTEGER, - ViewSize: PSIZE_T, - InheritDisposition: SECTION_INHERIT, - AllocationType: ULONG, - Win32Protect: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwUnmapViewOfSection(ProcessHandle: HANDLE, BaseAddress: PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCreateKey( - KeyHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - TitleIndex: ULONG, - Class: PUNICODE_STRING, - CreateOptions: ULONG, - Disposition: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCreateKeyTransacted( - KeyHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - TitleIndex: ULONG, - Class: PUNICODE_STRING, - CreateOptions: ULONG, - TransactionHandle: HANDLE, - Disposition: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCreateRegistryTransaction( - TransactionHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - CreateOptions: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtOpenRegistryTransaction( - TransactionHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCommitRegistryTransaction( - TransactionHandle: HANDLE, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtRollbackRegistryTransaction( - TransactionHandle: HANDLE, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenKey( - KeyHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenKeyEx( - KeyHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - OpenOptions: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenKeyTransacted( - KeyHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - TransactionHandle: HANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenKeyTransactedEx( - KeyHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - OpenOptions: ULONG, - TransactionHandle: HANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwDeleteKey(KeyHandle: HANDLE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwDeleteValueKey(KeyHandle: HANDLE, ValueName: PUNICODE_STRING) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwEnumerateKey( - KeyHandle: HANDLE, - Index: ULONG, - KeyInformationClass: KEY_INFORMATION_CLASS, - KeyInformation: PVOID, - Length: ULONG, - ResultLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwEnumerateValueKey( - KeyHandle: HANDLE, - Index: ULONG, - KeyValueInformationClass: KEY_VALUE_INFORMATION_CLASS, - KeyValueInformation: PVOID, - Length: ULONG, - ResultLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwFlushKey(KeyHandle: HANDLE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryKey( - KeyHandle: HANDLE, - KeyInformationClass: KEY_INFORMATION_CLASS, - KeyInformation: PVOID, - Length: ULONG, - ResultLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryValueKey( - KeyHandle: HANDLE, - ValueName: PUNICODE_STRING, - KeyValueInformationClass: KEY_VALUE_INFORMATION_CLASS, - KeyValueInformation: PVOID, - Length: ULONG, - ResultLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwRenameKey(KeyHandle: HANDLE, NewName: PUNICODE_STRING) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSaveKey(KeyHandle: HANDLE, FileHandle: HANDLE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSaveKeyEx(KeyHandle: HANDLE, FileHandle: HANDLE, Format: ULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwRestoreKey(KeyHandle: HANDLE, FileHandle: HANDLE, Flags: ULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetInformationKey( - KeyHandle: HANDLE, - KeySetInformationClass: KEY_SET_INFORMATION_CLASS, - KeySetInformation: PVOID, - KeySetInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetValueKey( - KeyHandle: HANDLE, - ValueName: PUNICODE_STRING, - TitleIndex: ULONG, - Type: ULONG, - Data: PVOID, - DataSize: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenSymbolicLinkObject( - LinkHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQuerySymbolicLinkObject( - LinkHandle: HANDLE, - LinkTarget: PUNICODE_STRING, - ReturnedLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCreateTransactionManager( - TmHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - LogFileName: PUNICODE_STRING, - CreateOptions: ULONG, - CommitStrength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenTransactionManager( - TmHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - LogFileName: PUNICODE_STRING, - TmIdentity: LPGUID, - OpenOptions: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwRollforwardTransactionManager( - TransactionManagerHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwRecoverTransactionManager(TransactionManagerHandle: HANDLE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryInformationTransactionManager( - TransactionManagerHandle: HANDLE, - TransactionManagerInformationClass: TRANSACTIONMANAGER_INFORMATION_CLASS, - TransactionManagerInformation: PVOID, - TransactionManagerInformationLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetInformationTransactionManager( - TmHandle: HANDLE, - TransactionManagerInformationClass: TRANSACTIONMANAGER_INFORMATION_CLASS, - TransactionManagerInformation: PVOID, - TransactionManagerInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwEnumerateTransactionObject( - RootObjectHandle: HANDLE, - QueryType: KTMOBJECT_TYPE, - ObjectCursor: PKTMOBJECT_CURSOR, - ObjectCursorLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCreateTransaction( - TransactionHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - Uow: LPGUID, - TmHandle: HANDLE, - CreateOptions: ULONG, - IsolationLevel: ULONG, - IsolationFlags: ULONG, - Timeout: PLARGE_INTEGER, - Description: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenTransaction( - TransactionHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - Uow: LPGUID, - TmHandle: HANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryInformationTransaction( - TransactionHandle: HANDLE, - TransactionInformationClass: TRANSACTION_INFORMATION_CLASS, - TransactionInformation: PVOID, - TransactionInformationLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetInformationTransaction( - TransactionHandle: HANDLE, - TransactionInformationClass: TRANSACTION_INFORMATION_CLASS, - TransactionInformation: PVOID, - TransactionInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCommitTransaction(TransactionHandle: HANDLE, Wait: BOOLEAN) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwRollbackTransaction(TransactionHandle: HANDLE, Wait: BOOLEAN) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCreateResourceManager( - ResourceManagerHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - TmHandle: HANDLE, - ResourceManagerGuid: LPGUID, - ObjectAttributes: POBJECT_ATTRIBUTES, - CreateOptions: ULONG, - Description: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenResourceManager( - ResourceManagerHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - TmHandle: HANDLE, - ResourceManagerGuid: LPGUID, - ObjectAttributes: POBJECT_ATTRIBUTES, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwRecoverResourceManager(ResourceManagerHandle: HANDLE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwGetNotificationResourceManager( - ResourceManagerHandle: HANDLE, - TransactionNotification: PTRANSACTION_NOTIFICATION, - NotificationLength: ULONG, - Timeout: PLARGE_INTEGER, - ReturnLength: PULONG, - Asynchronous: ULONG, - AsynchronousContext: ULONG_PTR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryInformationResourceManager( - ResourceManagerHandle: HANDLE, - ResourceManagerInformationClass: RESOURCEMANAGER_INFORMATION_CLASS, - ResourceManagerInformation: PVOID, - ResourceManagerInformationLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetInformationResourceManager( - ResourceManagerHandle: HANDLE, - ResourceManagerInformationClass: RESOURCEMANAGER_INFORMATION_CLASS, - ResourceManagerInformation: PVOID, - ResourceManagerInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCreateEnlistment( - EnlistmentHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ResourceManagerHandle: HANDLE, - TransactionHandle: HANDLE, - ObjectAttributes: POBJECT_ATTRIBUTES, - CreateOptions: ULONG, - NotificationMask: NOTIFICATION_MASK, - EnlistmentKey: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenEnlistment( - EnlistmentHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - RmHandle: HANDLE, - EnlistmentGuid: LPGUID, - ObjectAttributes: POBJECT_ATTRIBUTES, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryInformationEnlistment( - EnlistmentHandle: HANDLE, - EnlistmentInformationClass: ENLISTMENT_INFORMATION_CLASS, - EnlistmentInformation: PVOID, - EnlistmentInformationLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetInformationEnlistment( - EnlistmentHandle: HANDLE, - EnlistmentInformationClass: ENLISTMENT_INFORMATION_CLASS, - EnlistmentInformation: PVOID, - EnlistmentInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwRecoverEnlistment( - EnlistmentHandle: HANDLE, - EnlistmentKey: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwPrePrepareEnlistment( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwPrepareEnlistment( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCommitEnlistment( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwRollbackEnlistment( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwPrePrepareComplete( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwPrepareComplete( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCommitComplete( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwReadOnlyEnlistment( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwRollbackComplete( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSinglePhaseReject( - EnlistmentHandle: HANDLE, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenEvent( - EventHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryInformationByName( - ObjectAttributes: POBJECT_ATTRIBUTES, - IoStatusBlock: PIO_STATUS_BLOCK, - FileInformation: PVOID, - Length: ULONG, - FileInformationClass: FILE_INFORMATION_CLASS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryFullAttributesFile( - ObjectAttributes: POBJECT_ATTRIBUTES, - FileInformation: PFILE_NETWORK_OPEN_INFORMATION, - ) -> NTSTATUS; -} -extern "C" { - pub fn ClfsLsnEqual(plsn1: *const CLFS_LSN, plsn2: *const CLFS_LSN) -> BOOLEAN; -} -extern "C" { - pub fn ClfsLsnLess(plsn1: *const CLFS_LSN, plsn2: *const CLFS_LSN) -> BOOLEAN; -} -extern "C" { - pub fn ClfsLsnGreater(plsn1: *const CLFS_LSN, plsn2: *const CLFS_LSN) -> BOOLEAN; -} -extern "C" { - pub fn ClfsLsnNull(plsn: *const CLFS_LSN) -> BOOLEAN; -} -extern "C" { - pub fn ClfsLsnContainer(plsn: *const CLFS_LSN) -> CLFS_CONTAINER_ID; -} -extern "C" { - pub fn ClfsLsnCreate( - cidContainer: CLFS_CONTAINER_ID, - offBlock: ULONG, - cRecord: ULONG, - ) -> CLFS_LSN; -} -extern "C" { - pub fn ClfsLsnBlockOffset(plsn: *const CLFS_LSN) -> ULONG; -} -extern "C" { - pub fn ClfsLsnRecordSequence(plsn: *const CLFS_LSN) -> ULONG; -} -extern "C" { - pub fn ClfsLsnInvalid(plsn: *const CLFS_LSN) -> BOOLEAN; -} -extern "C" { - pub fn ClfsLsnIncrement(plsn: PCLFS_LSN) -> CLFS_LSN; -} -extern "C" { - #[must_use] - pub fn ClfsMgmtRegisterManagedClient( - LogFile: PLOG_FILE_OBJECT, - RegistrationData: PCLFS_MGMT_CLIENT_REGISTRATION, - ClientCookie: PCLFS_MGMT_CLIENT, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsMgmtDeregisterManagedClient(ClientCookie: CLFS_MGMT_CLIENT) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsMgmtTailAdvanceFailure( - Client: CLFS_MGMT_CLIENT, - Reason: NTSTATUS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsMgmtHandleLogFileFull(Client: CLFS_MGMT_CLIENT) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsMgmtInstallPolicy( - LogFile: PLOG_FILE_OBJECT, - Policy: PCLFS_MGMT_POLICY, - PolicyLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsMgmtQueryPolicy( - LogFile: PLOG_FILE_OBJECT, - PolicyType: CLFS_MGMT_POLICY_TYPE, - Policy: PCLFS_MGMT_POLICY, - PolicyLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsMgmtRemovePolicy( - LogFile: PLOG_FILE_OBJECT, - PolicyType: CLFS_MGMT_POLICY_TYPE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsMgmtSetLogFileSize( - LogFile: PLOG_FILE_OBJECT, - NewSizeInContainers: PULONGLONG, - ResultingSizeInContainers: PULONGLONG, - CompletionRoutine: PCLFS_SET_LOG_SIZE_COMPLETE_CALLBACK, - CompletionRoutineData: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsMgmtSetLogFileSizeAsClient( - LogFile: PLOG_FILE_OBJECT, - ClientCookie: PCLFS_MGMT_CLIENT, - NewSizeInContainers: PULONGLONG, - ResultingSizeInContainers: PULONGLONG, - CompletionRoutine: PCLFS_SET_LOG_SIZE_COMPLETE_CALLBACK, - CompletionRoutineData: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsInitialize() -> NTSTATUS; -} -extern "C" { - pub fn ClfsFinalize(); -} -extern "C" { - #[must_use] - pub fn ClfsCreateLogFile( - pplfoLog: PPLOG_FILE_OBJECT, - puszLogFileName: PUNICODE_STRING, - fDesiredAccess: ACCESS_MASK, - dwShareMode: ULONG, - psdLogFile: PSECURITY_DESCRIPTOR, - fCreateDisposition: ULONG, - fCreateOptions: ULONG, - fFlagsAndAttributes: ULONG, - fLogOptionFlag: ULONG, - pvContext: PVOID, - cbContext: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsDeleteLogByPointer(plfoLog: PLOG_FILE_OBJECT) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsDeleteLogFile( - puszLogFileName: PUNICODE_STRING, - pvReserved: PVOID, - fLogOptionFlag: ULONG, - pvContext: PVOID, - cbContext: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsAddLogContainer( - plfoLog: PLOG_FILE_OBJECT, - pcbContainer: PULONGLONG, - puszContainerPath: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsAddLogContainerSet( - plfoLog: PLOG_FILE_OBJECT, - cContainers: USHORT, - pcbContainer: PULONGLONG, - rguszContainerPath: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsRemoveLogContainer( - plfoLog: PLOG_FILE_OBJECT, - puszContainerPath: PUNICODE_STRING, - fForce: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsRemoveLogContainerSet( - plfoLog: PLOG_FILE_OBJECT, - cContainers: USHORT, - rgwszContainerPath: PUNICODE_STRING, - fForce: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsSetArchiveTail( - plfoLog: PLOG_FILE_OBJECT, - plsnArchiveTail: PCLFS_LSN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsSetEndOfLog(plfoLog: PLOG_FILE_OBJECT, plsnEnd: PCLFS_LSN) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsCreateScanContext( - plfoLog: PLOG_FILE_OBJECT, - cFromContainer: ULONG, - cContainers: ULONG, - eScanMode: CLFS_SCAN_MODE, - pcxScan: PCLFS_SCAN_CONTEXT, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsScanLogContainers( - pcxScan: PCLFS_SCAN_CONTEXT, - eScanMode: CLFS_SCAN_MODE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsGetContainerName( - plfoLog: PLOG_FILE_OBJECT, - cidLogicalContainer: CLFS_CONTAINER_ID, - puszContainerName: PUNICODE_STRING, - pcActualLenContainerName: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsGetLogFileInformation( - plfoLog: PLOG_FILE_OBJECT, - pinfoBuffer: PCLFS_INFORMATION, - pcbInfoBuffer: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsQueryLogFileInformation( - plfoLog: PLOG_FILE_OBJECT, - eInformationClass: CLFS_LOG_INFORMATION_CLASS, - pinfoInputBuffer: PVOID, - cbinfoInputBuffer: ULONG, - pinfoBuffer: PVOID, - pcbInfoBuffer: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsSetLogFileInformation( - plfoLog: PLOG_FILE_OBJECT, - eInformationClass: CLFS_LOG_INFORMATION_CLASS, - pinfoBuffer: PVOID, - cbBuffer: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsReadRestartArea( - pvMarshalContext: PVOID, - ppvRestartBuffer: *mut PVOID, - pcbRestartBuffer: PULONG, - plsn: PCLFS_LSN, - ppvReadContext: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsReadPreviousRestartArea( - pvReadContext: PVOID, - ppvRestartBuffer: *mut PVOID, - pcbRestartBuffer: PULONG, - plsnRestart: PCLFS_LSN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsWriteRestartArea( - pvMarshalContext: PVOID, - pvRestartBuffer: PVOID, - cbRestartBuffer: ULONG, - plsnBase: PCLFS_LSN, - fFlags: ULONG, - pcbWritten: PULONG, - plsnNext: PCLFS_LSN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsAdvanceLogBase( - pvMarshalContext: PVOID, - plsnBase: PCLFS_LSN, - fFlags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsCloseAndResetLogFile(plfoLog: PLOG_FILE_OBJECT) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsCloseLogFileObject(plfoLog: PLOG_FILE_OBJECT) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsCreateMarshallingArea( - plfoLog: PLOG_FILE_OBJECT, - ePoolType: POOL_TYPE, - pfnAllocBuffer: PALLOCATE_FUNCTION, - pfnFreeBuffer: PFREE_FUNCTION, - cbMarshallingBuffer: ULONG, - cMaxWriteBuffers: ULONG, - cMaxReadBuffers: ULONG, - ppvMarshalContext: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsCreateMarshallingAreaEx( - plfoLog: PLOG_FILE_OBJECT, - ePoolType: POOL_TYPE, - pfnAllocBuffer: PALLOCATE_FUNCTION, - pfnFreeBuffer: PFREE_FUNCTION, - cbMarshallingBuffer: ULONG, - cMaxWriteBuffers: ULONG, - cMaxReadBuffers: ULONG, - cAlignmentSize: ULONG, - fFlags: ULONGLONG, - ppvMarshalContext: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsDeleteMarshallingArea(pvMarshalContext: PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsReserveAndAppendLog( - pvMarshalContext: PVOID, - rgWriteEntries: PCLFS_WRITE_ENTRY, - cWriteEntries: ULONG, - plsnUndoNext: PCLFS_LSN, - plsnPrevious: PCLFS_LSN, - cReserveRecords: ULONG, - rgcbReservation: PLONGLONG, - fFlags: ULONG, - plsn: PCLFS_LSN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsReserveAndAppendLogAligned( - pvMarshalContext: PVOID, - rgWriteEntries: PCLFS_WRITE_ENTRY, - cWriteEntries: ULONG, - cbEntryAlignment: ULONG, - plsnUndoNext: PCLFS_LSN, - plsnPrevious: PCLFS_LSN, - cReserveRecords: ULONG, - rgcbReservation: PLONGLONG, - fFlags: ULONG, - plsn: PCLFS_LSN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsAlignReservedLog( - pvMarshalContext: PVOID, - cRecords: ULONG, - rgcbReservation: *mut LONGLONG, - pcbAlignReservation: PLONGLONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsAllocReservedLog( - pvMarshalContext: PVOID, - cRecords: ULONG, - pcbAdjustment: PLONGLONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsFreeReservedLog( - pvMarshalContext: PVOID, - cRecords: ULONG, - pcbAdjustment: PLONGLONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsFlushBuffers(pvMarshalContext: PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsFlushToLsn( - pvMarshalContext: PVOID, - plsnFlush: PCLFS_LSN, - plsnLastFlushed: PCLFS_LSN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsReadLogRecord( - pvMarshalContext: PVOID, - plsnFirst: PCLFS_LSN, - peContextMode: CLFS_CONTEXT_MODE, - ppvReadBuffer: *mut PVOID, - pcbReadBuffer: PULONG, - peRecordType: PCLFS_RECORD_TYPE, - plsnUndoNext: PCLFS_LSN, - plsnPrevious: PCLFS_LSN, - ppvReadContext: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsReadNextLogRecord( - pvReadContext: PVOID, - ppvBuffer: *mut PVOID, - pcbBuffer: PULONG, - peRecordType: PCLFS_RECORD_TYPE, - plsnUser: PCLFS_LSN, - plsnUndoNext: PCLFS_LSN, - plsnPrevious: PCLFS_LSN, - plsnRecord: PCLFS_LSN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsTerminateReadLog(pvCursorContext: PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsGetLastLsn(plfoLog: PLOG_FILE_OBJECT, plsnLast: PCLFS_LSN) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ClfsGetIoStatistics( - plfoLog: PLOG_FILE_OBJECT, - pvStatsBuffer: PVOID, - cbStatsBuffer: ULONG, - eStatsClass: CLFS_IOSTATS_CLASS, - pcbStatsWritten: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn ClfsLaterLsn(plsn: PCLFS_LSN) -> CLFS_LSN; -} -extern "C" { - pub fn ClfsEarlierLsn(plsn: PCLFS_LSN) -> CLFS_LSN; -} -extern "C" { - #[must_use] - pub fn ClfsLsnDifference( - plsnStart: PCLFS_LSN, - plsnFinish: PCLFS_LSN, - cbContainer: ULONG, - cbMaxBlock: ULONG, - pcbDifference: PLONGLONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn ClfsValidTopLevelContext(pirpTopLevelContext: PIRP) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn TmInitializeTransactionManager( - TransactionManager: PRKTM, - LogFileName: PCUNICODE_STRING, - TmId: PGUID, - CreateOptions: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmRenameTransactionManager( - LogFileName: PUNICODE_STRING, - ExistingTransactionManagerGuid: LPGUID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmRecoverTransactionManager( - Tm: PKTM, - TargetVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmCommitTransaction(Transaction: PKTRANSACTION, Wait: BOOLEAN) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmRollbackTransaction(Transaction: PKTRANSACTION, Wait: BOOLEAN) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmCreateEnlistment( - EnlistmentHandle: PHANDLE, - PreviousMode: KPROCESSOR_MODE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - ResourceManager: PRKRESOURCEMANAGER, - Transaction: PKTRANSACTION, - CreateOptions: ULONG, - NotificationMask: NOTIFICATION_MASK, - EnlistmentKey: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmRecoverEnlistment( - Enlistment: PKENLISTMENT, - EnlistmentKey: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmPrePrepareEnlistment( - Enlistment: PKENLISTMENT, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmPrepareEnlistment( - Enlistment: PKENLISTMENT, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmCommitEnlistment( - Enlistment: PKENLISTMENT, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmRollbackEnlistment( - Enlistment: PKENLISTMENT, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmPrePrepareComplete( - Enlistment: PKENLISTMENT, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmPrepareComplete( - Enlistment: PKENLISTMENT, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmReadOnlyEnlistment( - Enlistment: PKENLISTMENT, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmCommitComplete( - Enlistment: PKENLISTMENT, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmRollbackComplete( - Enlistment: PKENLISTMENT, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmReferenceEnlistmentKey( - Enlistment: PKENLISTMENT, - Key: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmDereferenceEnlistmentKey( - Enlistment: PKENLISTMENT, - LastReference: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmSinglePhaseReject( - Enlistment: PKENLISTMENT, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmRequestOutcomeEnlistment( - Enlistment: PKENLISTMENT, - TmVirtualClock: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmEnableCallbacks( - ResourceManager: PKRESOURCEMANAGER, - CallbackRoutine: PTM_RM_NOTIFICATION, - RMKey: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmRecoverResourceManager(ResourceManager: PKRESOURCEMANAGER) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmPropagationComplete( - ResourceManager: PKRESOURCEMANAGER, - RequestCookie: ULONG, - BufferLength: ULONG, - Buffer: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn TmPropagationFailed( - ResourceManager: PKRESOURCEMANAGER, - RequestCookie: ULONG, - Status: NTSTATUS, - ) -> NTSTATUS; -} -extern "C" { - pub fn TmGetTransactionId(Transaction: PKTRANSACTION, TransactionId: PUOW); -} -extern "C" { - pub fn TmIsTransactionActive(Transaction: PKTRANSACTION) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn PcwRegister( - Registration: *mut PPCW_REGISTRATION, - Info: PPCW_REGISTRATION_INFORMATION, - ) -> NTSTATUS; -} -extern "C" { - pub fn PcwUnregister(Registration: PPCW_REGISTRATION); -} -extern "C" { - #[must_use] - pub fn PcwCreateInstance( - Instance: *mut PPCW_INSTANCE, - Registration: PPCW_REGISTRATION, - Name: PCUNICODE_STRING, - Count: ULONG, - Data: PPCW_DATA, - ) -> NTSTATUS; -} -extern "C" { - pub fn PcwCloseInstance(Instance: PPCW_INSTANCE); -} -extern "C" { - #[must_use] - pub fn PcwAddInstance( - Buffer: PPCW_BUFFER, - Name: PCUNICODE_STRING, - Id: ULONG, - Count: ULONG, - Data: PPCW_DATA, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn VslCreateSecureSection( - Handle: PHANDLE, - TargetProcess: PEPROCESS, - Mdl: PMDL, - DevicePageProtection: ULONG, - Attributes: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn VslDeleteSecureSection(GlobalHandle: HANDLE) -> NTSTATUS; -} -extern "C" { - pub fn RtlRunOnceInitialize(RunOnce: PRTL_RUN_ONCE); -} -extern "C" { - #[must_use] - pub fn RtlRunOnceExecuteOnce( - RunOnce: PRTL_RUN_ONCE, - InitFn: PRTL_RUN_ONCE_INIT_FN, - Parameter: PVOID, - Context: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlRunOnceBeginInitialize( - RunOnce: PRTL_RUN_ONCE, - Flags: ULONG, - Context: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlRunOnceComplete( - RunOnce: PRTL_RUN_ONCE, - Flags: ULONG, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlInitializeGenericTableAvl( - Table: PRTL_AVL_TABLE, - CompareRoutine: PRTL_AVL_COMPARE_ROUTINE, - AllocateRoutine: PRTL_AVL_ALLOCATE_ROUTINE, - FreeRoutine: PRTL_AVL_FREE_ROUTINE, - TableContext: PVOID, - ); -} -extern "C" { - pub fn RtlInsertElementGenericTableAvl( - Table: PRTL_AVL_TABLE, - Buffer: PVOID, - BufferSize: CLONG, - NewElement: PBOOLEAN, - ) -> PVOID; -} -extern "C" { - pub fn RtlInsertElementGenericTableFullAvl( - Table: PRTL_AVL_TABLE, - Buffer: PVOID, - BufferSize: CLONG, - NewElement: PBOOLEAN, - NodeOrParent: PVOID, - SearchResult: TABLE_SEARCH_RESULT, - ) -> PVOID; -} -extern "C" { - pub fn RtlDeleteElementGenericTableAvl( - Table: PRTL_AVL_TABLE, - Buffer: PVOID, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlDeleteElementGenericTableAvlEx(Table: PRTL_AVL_TABLE, NodeOrParent: PVOID); -} -extern "C" { - pub fn RtlLookupElementGenericTableAvl( - Table: PRTL_AVL_TABLE, - Buffer: PVOID, - ) -> PVOID; -} -extern "C" { - pub fn RtlLookupElementGenericTableFullAvl( - Table: PRTL_AVL_TABLE, - Buffer: PVOID, - NodeOrParent: *mut PVOID, - SearchResult: *mut TABLE_SEARCH_RESULT, - ) -> PVOID; -} -extern "C" { - pub fn RtlEnumerateGenericTableAvl(Table: PRTL_AVL_TABLE, Restart: BOOLEAN) -> PVOID; -} -extern "C" { - pub fn RtlEnumerateGenericTableWithoutSplayingAvl( - Table: PRTL_AVL_TABLE, - RestartKey: *mut PVOID, - ) -> PVOID; -} -extern "C" { - pub fn RtlLookupFirstMatchingElementGenericTableAvl( - Table: PRTL_AVL_TABLE, - Buffer: PVOID, - RestartKey: *mut PVOID, - ) -> PVOID; -} -extern "C" { - pub fn RtlEnumerateGenericTableLikeADirectory( - Table: PRTL_AVL_TABLE, - MatchFunction: PRTL_AVL_MATCH_FUNCTION, - MatchData: PVOID, - NextFlag: ULONG, - RestartKey: *mut PVOID, - DeleteCount: PULONG, - Buffer: PVOID, - ) -> PVOID; -} -extern "C" { - pub fn RtlGetElementGenericTableAvl(Table: PRTL_AVL_TABLE, I: ULONG) -> PVOID; -} -extern "C" { - pub fn RtlNumberGenericTableElementsAvl(Table: PRTL_AVL_TABLE) -> ULONG; -} -extern "C" { - pub fn RtlIsGenericTableEmptyAvl(Table: PRTL_AVL_TABLE) -> BOOLEAN; -} -extern "C" { - pub fn RtlSplay(Links: PRTL_SPLAY_LINKS) -> PRTL_SPLAY_LINKS; -} -extern "C" { - pub fn RtlDelete(Links: PRTL_SPLAY_LINKS) -> PRTL_SPLAY_LINKS; -} -extern "C" { - pub fn RtlDeleteNoSplay(Links: PRTL_SPLAY_LINKS, Root: *mut PRTL_SPLAY_LINKS); -} -extern "C" { - pub fn RtlSubtreeSuccessor(Links: PRTL_SPLAY_LINKS) -> PRTL_SPLAY_LINKS; -} -extern "C" { - pub fn RtlSubtreePredecessor(Links: PRTL_SPLAY_LINKS) -> PRTL_SPLAY_LINKS; -} -extern "C" { - pub fn RtlRealSuccessor(Links: PRTL_SPLAY_LINKS) -> PRTL_SPLAY_LINKS; -} -extern "C" { - pub fn RtlRealPredecessor(Links: PRTL_SPLAY_LINKS) -> PRTL_SPLAY_LINKS; -} -extern "C" { - pub fn RtlInitializeGenericTable( - Table: PRTL_GENERIC_TABLE, - CompareRoutine: PRTL_GENERIC_COMPARE_ROUTINE, - AllocateRoutine: PRTL_GENERIC_ALLOCATE_ROUTINE, - FreeRoutine: PRTL_GENERIC_FREE_ROUTINE, - TableContext: PVOID, - ); -} -extern "C" { - pub fn RtlInsertElementGenericTable( - Table: PRTL_GENERIC_TABLE, - Buffer: PVOID, - BufferSize: CLONG, - NewElement: PBOOLEAN, - ) -> PVOID; -} -extern "C" { - pub fn RtlInsertElementGenericTableFull( - Table: PRTL_GENERIC_TABLE, - Buffer: PVOID, - BufferSize: CLONG, - NewElement: PBOOLEAN, - NodeOrParent: PVOID, - SearchResult: TABLE_SEARCH_RESULT, - ) -> PVOID; -} -extern "C" { - pub fn RtlDeleteElementGenericTable( - Table: PRTL_GENERIC_TABLE, - Buffer: PVOID, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlLookupElementGenericTable( - Table: PRTL_GENERIC_TABLE, - Buffer: PVOID, - ) -> PVOID; -} -extern "C" { - pub fn RtlLookupElementGenericTableFull( - Table: PRTL_GENERIC_TABLE, - Buffer: PVOID, - NodeOrParent: *mut PVOID, - SearchResult: *mut TABLE_SEARCH_RESULT, - ) -> PVOID; -} -extern "C" { - pub fn RtlEnumerateGenericTable( - Table: PRTL_GENERIC_TABLE, - Restart: BOOLEAN, - ) -> PVOID; -} -extern "C" { - pub fn RtlEnumerateGenericTableWithoutSplaying( - Table: PRTL_GENERIC_TABLE, - RestartKey: *mut PVOID, - ) -> PVOID; -} -extern "C" { - pub fn RtlGetElementGenericTable(Table: PRTL_GENERIC_TABLE, I: ULONG) -> PVOID; -} -extern "C" { - pub fn RtlNumberGenericTableElements(Table: PRTL_GENERIC_TABLE) -> ULONG; -} -extern "C" { - pub fn RtlIsGenericTableEmpty(Table: PRTL_GENERIC_TABLE) -> BOOLEAN; -} -extern "C" { - pub fn RtlCreateHashTable( - HashTable: *mut PRTL_DYNAMIC_HASH_TABLE, - Shift: ULONG, - Flags: ULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlCreateHashTableEx( - HashTable: *mut PRTL_DYNAMIC_HASH_TABLE, - InitialSize: ULONG, - Shift: ULONG, - Flags: ULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlDeleteHashTable(HashTable: PRTL_DYNAMIC_HASH_TABLE); -} -extern "C" { - pub fn RtlInsertEntryHashTable( - HashTable: PRTL_DYNAMIC_HASH_TABLE, - Entry: PRTL_DYNAMIC_HASH_TABLE_ENTRY, - Signature: ULONG_PTR, - Context: PRTL_DYNAMIC_HASH_TABLE_CONTEXT, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlRemoveEntryHashTable( - HashTable: PRTL_DYNAMIC_HASH_TABLE, - Entry: PRTL_DYNAMIC_HASH_TABLE_ENTRY, - Context: PRTL_DYNAMIC_HASH_TABLE_CONTEXT, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlLookupEntryHashTable( - HashTable: PRTL_DYNAMIC_HASH_TABLE, - Signature: ULONG_PTR, - Context: PRTL_DYNAMIC_HASH_TABLE_CONTEXT, - ) -> PRTL_DYNAMIC_HASH_TABLE_ENTRY; -} -extern "C" { - pub fn RtlGetNextEntryHashTable( - HashTable: PRTL_DYNAMIC_HASH_TABLE, - Context: PRTL_DYNAMIC_HASH_TABLE_CONTEXT, - ) -> PRTL_DYNAMIC_HASH_TABLE_ENTRY; -} -extern "C" { - pub fn RtlInitEnumerationHashTable( - HashTable: PRTL_DYNAMIC_HASH_TABLE, - Enumerator: PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlEnumerateEntryHashTable( - HashTable: PRTL_DYNAMIC_HASH_TABLE, - Enumerator: PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR, - ) -> PRTL_DYNAMIC_HASH_TABLE_ENTRY; -} -extern "C" { - pub fn RtlEndEnumerationHashTable( - HashTable: PRTL_DYNAMIC_HASH_TABLE, - Enumerator: PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR, - ); -} -extern "C" { - pub fn RtlInitWeakEnumerationHashTable( - HashTable: PRTL_DYNAMIC_HASH_TABLE, - Enumerator: PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlWeaklyEnumerateEntryHashTable( - HashTable: PRTL_DYNAMIC_HASH_TABLE, - Enumerator: PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR, - ) -> PRTL_DYNAMIC_HASH_TABLE_ENTRY; -} -extern "C" { - pub fn RtlEndWeakEnumerationHashTable( - HashTable: PRTL_DYNAMIC_HASH_TABLE, - Enumerator: PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR, - ); -} -extern "C" { - pub fn RtlInitStrongEnumerationHashTable( - HashTable: PRTL_DYNAMIC_HASH_TABLE, - Enumerator: PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlStronglyEnumerateEntryHashTable( - HashTable: PRTL_DYNAMIC_HASH_TABLE, - Enumerator: PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR, - ) -> PRTL_DYNAMIC_HASH_TABLE_ENTRY; -} -extern "C" { - pub fn RtlEndStrongEnumerationHashTable( - HashTable: PRTL_DYNAMIC_HASH_TABLE, - Enumerator: PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR, - ); -} -extern "C" { - pub fn RtlExpandHashTable(HashTable: PRTL_DYNAMIC_HASH_TABLE) -> BOOLEAN; -} -extern "C" { - pub fn RtlContractHashTable(HashTable: PRTL_DYNAMIC_HASH_TABLE) -> BOOLEAN; -} -extern "C" { - pub fn _ReturnAddress() -> *mut ::core::ffi::c_void; -} -extern "C" { - pub fn RtlGetCallersAddress(CallersAddress: *mut PVOID, CallersCaller: *mut PVOID); -} -extern "C" { - pub fn RtlWalkFrameChain(Callers: *mut PVOID, Count: ULONG, Flags: ULONG) -> ULONG; -} -extern "C" { - pub fn RtlGetEnabledExtendedFeatures(FeatureMask: ULONG64) -> ULONG64; -} -extern "C" { - #[must_use] - pub fn RtlCharToInteger(String: PCSZ, Base: ULONG, Value: PULONG) -> NTSTATUS; -} -extern "C" { - pub fn RtlCopyString(DestinationString: PSTRING, SourceString: *const STRING); -} -extern "C" { - pub fn RtlUpperChar(Character: CHAR) -> CHAR; -} -extern "C" { - pub fn RtlCompareString( - String1: *const STRING, - String2: *const STRING, - CaseInSensitive: BOOLEAN, - ) -> LONG; -} -extern "C" { - pub fn RtlEqualString( - String1: *const STRING, - String2: *const STRING, - CaseInSensitive: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlUpperString(DestinationString: PSTRING, SourceString: *const STRING); -} -extern "C" { - pub fn RtlPrefixUnicodeString( - String1: PCUNICODE_STRING, - String2: PCUNICODE_STRING, - CaseInSensitive: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlSuffixUnicodeString( - String1: PCUNICODE_STRING, - String2: PCUNICODE_STRING, - CaseInSensitive: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn RtlUpcaseUnicodeString( - DestinationString: PUNICODE_STRING, - SourceString: PCUNICODE_STRING, - AllocateDestinationString: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlQueryRegistryValueWithFallback( - PrimaryHandle: HANDLE, - FallbackHandle: HANDLE, - ValueName: PUNICODE_STRING, - ValueLength: ULONG, - ValueType: PULONG, - ValueData: PVOID, - ResultLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlMapGenericMask( - AccessMask: PACCESS_MASK, - GenericMapping: *const GENERIC_MAPPING, - ); -} -extern "C" { - #[must_use] - pub fn RtlVolumeDeviceToDosName( - VolumeDeviceObject: PVOID, - DosName: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - pub fn DbgPrompt(Prompt: PCCH, Response: PCH, Length: ULONG) -> ULONG; -} -extern "C" { - pub fn RtlGetProductInfo( - OSMajorVersion: ULONG, - OSMinorVersion: ULONG, - SpMajorVersion: ULONG, - SpMinorVersion: ULONG, - ReturnedProductType: PULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlGetActiveConsoleId() -> ULONG; -} -extern "C" { - pub fn RtlGetConsoleSessionForegroundProcessId() -> ULONGLONG; -} -extern "C" { - pub fn RtlGetSuiteMask() -> ULONG; -} -extern "C" { - pub fn RtlIsMultiSessionSku() -> BOOLEAN; -} -extern "C" { - pub fn RtlIsStateSeparationEnabled() -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn RtlGetPersistedStateLocation( - SourceID: PCWSTR, - CustomValue: PCWSTR, - DefaultPath: PCWSTR, - StateLocationType: STATE_LOCATION_TYPE, - TargetPath: PWCHAR, - BufferLengthIn: ULONG, - BufferLengthOut: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlIsApiSetImplemented(apiSetName: PCSTR) -> NTSTATUS; -} -extern "C" { - pub fn RtlIsMultiUsersInSessionSku() -> BOOLEAN; -} -extern "C" { - pub fn RtlGetNtProductType(NtProductType: PNT_PRODUCT_TYPE) -> BOOLEAN; -} -extern "C" { - pub fn RtlGetNtSystemRoot() -> PCWSTR; -} -extern "C" { - #[must_use] - pub fn RtlGetNonVolatileToken( - NvBuffer: PVOID, - Size: SIZE_T, - NvToken: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlFreeNonVolatileToken(NvToken: PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlFlushNonVolatileMemory( - NvToken: PVOID, - NvBuffer: PVOID, - Size: SIZE_T, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlDrainNonVolatileFlush(NvToken: PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlWriteNonVolatileMemory( - NvToken: PVOID, - NvDestination: *mut ::core::ffi::c_void, - Source: *const ::core::ffi::c_void, - Size: SIZE_T, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlFillNonVolatileMemory( - NvToken: PVOID, - NvDestination: *mut ::core::ffi::c_void, - Size: SIZE_T, - Value: UCHAR, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlFlushNonVolatileMemoryRanges( - NvToken: PVOID, - NvRanges: PNV_MEMORY_RANGE, - NumRanges: SIZE_T, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlInitializeCorrelationVector( - CorrelationVector: PCORRELATION_VECTOR, - Version: ::core::ffi::c_int, - Guid: *const GUID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlIncrementCorrelationVector( - CorrelationVector: PCORRELATION_VECTOR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlExtendCorrelationVector( - CorrelationVector: PCORRELATION_VECTOR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlValidateCorrelationVector(Vector: PCORRELATION_VECTOR) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlRaiseCustomSystemEventTrigger( - TriggerConfig: PCUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlIsZeroMemory(Buffer: PVOID, Length: SIZE_T) -> BOOLEAN; -} -extern "C" { - pub fn RtlNormalizeSecurityDescriptor( - SecurityDescriptor: *mut PSECURITY_DESCRIPTOR, - SecurityDescriptorLength: ULONG, - NewSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, - NewSecurityDescriptorLength: PULONG, - CheckOnly: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn RtlGetSystemGlobalData( - DataId: RTL_SYSTEM_GLOBAL_DATA_ID, - Buffer: PVOID, - Size: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlSetSystemGlobalData( - DataId: RTL_SYSTEM_GLOBAL_DATA_ID, - Buffer: PVOID, - Size: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtOpenProcess( - ProcessHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - ClientId: PCLIENT_ID, - ) -> NTSTATUS; -} -extern "C" { - pub fn KePulseEvent(Event: PRKEVENT, Increment: KPRIORITY, Wait: BOOLEAN) -> LONG; -} -extern "C" { - #[must_use] - pub fn KeExpandKernelStackAndCallout( - Callout: PEXPAND_STACK_CALLOUT, - Parameter: PVOID, - Size: SIZE_T, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn KeExpandKernelStackAndCalloutEx( - Callout: PEXPAND_STACK_CALLOUT, - Parameter: PVOID, - Size: SIZE_T, - Wait: BOOLEAN, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn KeSetBasePriorityThread(Thread: PKTHREAD, Increment: LONG) -> LONG; -} -extern "C" { - pub fn KeBugCheck(BugCheckCode: ULONG) -> !; -} -extern "C" { - pub fn KeInvalidateAllCaches() -> BOOLEAN; -} -extern "C" { - pub fn KeInvalidateRangeAllCaches(BaseAddress: PVOID, Length: ULONG); -} -extern "C" { - #[must_use] - pub fn KeSetHardwareCounterConfiguration( - CounterArray: PHARDWARE_COUNTER, - Count: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn KeQueryHardwareCounterConfiguration( - CounterArray: PHARDWARE_COUNTER, - MaximumCount: ULONG, - Count: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn ExRaiseDatatypeMisalignment() -> !; -} -extern "C" { - pub fn ExRaiseAccessViolation() -> !; -} -extern "C" { - #[must_use] - pub fn ExInitializeZone( - Zone: PZONE_HEADER, - BlockSize: ULONG, - InitialSegment: PVOID, - InitialSegmentSize: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ExExtendZone( - Zone: PZONE_HEADER, - Segment: PVOID, - SegmentSize: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ExInterlockedExtendZone( - Zone: PZONE_HEADER, - Segment: PVOID, - SegmentSize: ULONG, - Lock: PKSPIN_LOCK, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ExUuidCreate(Uuid: *mut UUID) -> NTSTATUS; -} -extern "C" { - pub fn MmIsThisAnNtAsSystem() -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn MmMapUserAddressesToPage( - BaseAddress: PVOID, - NumberOfBytes: SIZE_T, - PageAddress: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmAddPhysicalMemory( - StartAddress: PPHYSICAL_ADDRESS, - NumberOfBytes: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmRotatePhysicalView( - VirtualAddress: PVOID, - NumberOfBytes: PSIZE_T, - NewMdl: PMDL, - Direction: MM_ROTATE_DIRECTION, - CopyFunction: PMM_ROTATE_COPY_CALLBACK_FUNCTION, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmRemovePhysicalMemory( - StartAddress: PPHYSICAL_ADDRESS, - NumberOfBytes: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - pub fn MmGetPhysicalMemoryRanges() -> PPHYSICAL_MEMORY_RANGE; -} -extern "C" { - pub fn MmGetPhysicalMemoryRangesEx(PartitionObject: PVOID) -> PPHYSICAL_MEMORY_RANGE; -} -extern "C" { - pub fn MmGetPhysicalMemoryRangesEx2( - PartitionObject: PVOID, - Flags: ULONG, - ) -> PPHYSICAL_MEMORY_RANGE; -} -extern "C" { - pub fn MmMapVideoDisplay( - PhysicalAddress: PHYSICAL_ADDRESS, - NumberOfBytes: SIZE_T, - CacheType: MEMORY_CACHING_TYPE, - ) -> PVOID; -} -extern "C" { - pub fn MmUnmapVideoDisplay(BaseAddress: PVOID, NumberOfBytes: SIZE_T); -} -extern "C" { - pub fn MmGetPhysicalAddress(BaseAddress: PVOID) -> PHYSICAL_ADDRESS; -} -extern "C" { - #[must_use] - pub fn MmGetCacheAttribute( - PhysicalAddress: PHYSICAL_ADDRESS, - CacheType: *mut MEMORY_CACHING_TYPE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmCopyMemory( - TargetAddress: PVOID, - SourceAddress: MM_COPY_ADDRESS, - NumberOfBytes: SIZE_T, - Flags: ULONG, - NumberOfBytesTransferred: PSIZE_T, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmGetCacheAttributeEx( - PhysicalAddress: PHYSICAL_ADDRESS, - Flags: ULONG, - CacheType: *mut MEMORY_CACHING_TYPE, - ) -> NTSTATUS; -} -extern "C" { - pub fn MmGetVirtualForPhysical(PhysicalAddress: PHYSICAL_ADDRESS) -> PVOID; -} -extern "C" { - pub fn MmAllocateNonCachedMemory(NumberOfBytes: SIZE_T) -> PVOID; -} -extern "C" { - pub fn MmFreeNonCachedMemory(BaseAddress: PVOID, NumberOfBytes: SIZE_T); -} -extern "C" { - pub fn MmIsAddressValid(VirtualAddress: PVOID) -> BOOLEAN; -} -extern "C" { - pub fn MmIsNonPagedSystemAddressValid(VirtualAddress: PVOID) -> BOOLEAN; -} -extern "C" { - pub fn MmLockPagableSectionByHandle(ImageSectionHandle: PVOID); -} -extern "C" { - pub fn MmSecureVirtualMemory( - Address: PVOID, - Size: SIZE_T, - ProbeMode: ULONG, - ) -> HANDLE; -} -extern "C" { - pub fn MmSecureVirtualMemoryEx( - Address: PVOID, - Size: SIZE_T, - ProbeMode: ULONG, - Flags: ULONG, - ) -> HANDLE; -} -extern "C" { - pub fn MmUnsecureVirtualMemory(SecureHandle: HANDLE); -} -extern "C" { - #[must_use] - pub fn MmMapViewInSystemSpaceEx( - Section: PVOID, - MappedBase: *mut PVOID, - ViewSize: PSIZE_T, - SectionOffset: PLARGE_INTEGER, - Flags: ULONG_PTR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmMapViewInSystemSpace( - Section: PVOID, - MappedBase: *mut PVOID, - ViewSize: PSIZE_T, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmUnmapViewInSystemSpace(MappedBase: PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmMapViewInSessionSpaceEx( - Section: PVOID, - MappedBase: *mut PVOID, - ViewSize: PSIZE_T, - SectionOffset: PLARGE_INTEGER, - Flags: ULONG_PTR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmMapViewInSessionSpace( - Section: PVOID, - MappedBase: *mut PVOID, - ViewSize: PSIZE_T, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmUnmapViewInSessionSpace(MappedBase: PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmCreateMirror() -> NTSTATUS; -} -extern "C" { - pub fn SeSinglePrivilegeCheck( - PrivilegeValue: LUID, - PreviousMode: KPROCESSOR_MODE, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn PsSetCreateProcessNotifyRoutine( - NotifyRoutine: PCREATE_PROCESS_NOTIFY_ROUTINE, - Remove: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsSetCreateProcessNotifyRoutineEx( - NotifyRoutine: PCREATE_PROCESS_NOTIFY_ROUTINE_EX, - Remove: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsSetCreateProcessNotifyRoutineEx2( - NotifyType: PSCREATEPROCESSNOTIFYTYPE, - NotifyInformation: PVOID, - Remove: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsSetCreateThreadNotifyRoutine( - NotifyRoutine: PCREATE_THREAD_NOTIFY_ROUTINE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsSetCreateThreadNotifyRoutineEx( - NotifyType: PSCREATETHREADNOTIFYTYPE, - NotifyInformation: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsRemoveCreateThreadNotifyRoutine( - NotifyRoutine: PCREATE_THREAD_NOTIFY_ROUTINE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsSetLoadImageNotifyRoutine( - NotifyRoutine: PLOAD_IMAGE_NOTIFY_ROUTINE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsSetLoadImageNotifyRoutineEx( - NotifyRoutine: PLOAD_IMAGE_NOTIFY_ROUTINE, - Flags: ULONG_PTR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsRemoveLoadImageNotifyRoutine( - NotifyRoutine: PLOAD_IMAGE_NOTIFY_ROUTINE, - ) -> NTSTATUS; -} -extern "C" { - pub fn PsGetCurrentProcessId() -> HANDLE; -} -extern "C" { - pub fn PsGetCurrentThreadId() -> HANDLE; -} -extern "C" { - pub fn PsSetCurrentThreadPrefetching(Prefetching: BOOLEAN) -> BOOLEAN; -} -extern "C" { - pub fn PsIsCurrentThreadPrefetching() -> BOOLEAN; -} -extern "C" { - pub fn PsGetProcessCreateTimeQuadPart(Process: PEPROCESS) -> LONGLONG; -} -extern "C" { - pub fn PsGetProcessStartKey(Process: PEPROCESS) -> ULONGLONG; -} -extern "C" { - #[must_use] - pub fn PsGetProcessExitStatus(Process: PEPROCESS) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsGetThreadExitStatus(Thread: PETHREAD) -> NTSTATUS; -} -extern "C" { - pub fn PsGetProcessId(Process: PEPROCESS) -> HANDLE; -} -extern "C" { - pub fn PsGetThreadId(Thread: PETHREAD) -> HANDLE; -} -extern "C" { - pub fn PsGetThreadProperty(Thread: PETHREAD, Key: ULONG_PTR, Flags: ULONG) -> PVOID; -} -extern "C" { - pub fn PsGetThreadProcessId(Thread: PETHREAD) -> HANDLE; -} -extern "C" { - pub fn PsGetThreadCreateTime(Thread: PETHREAD) -> LONGLONG; -} -extern "C" { - pub fn PsGetCurrentThreadTeb() -> PVOID; -} -extern "C" { - #[must_use] - pub fn PsGetJobSilo(Job: PEJOB, Silo: *mut PESILO) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsGetJobServerSilo(Job: PEJOB, ServerSilo: *mut PESILO) -> NTSTATUS; -} -extern "C" { - pub fn PsGetEffectiveServerSilo(Silo: PESILO) -> PESILO; -} -extern "C" { - pub fn PsAttachSiloToCurrentThread(Silo: PESILO) -> PESILO; -} -extern "C" { - pub fn PsDetachSiloFromCurrentThread(PreviousSilo: PESILO); -} -extern "C" { - pub fn PsIsHostSilo(Silo: PESILO) -> BOOLEAN; -} -extern "C" { - pub fn PsGetHostSilo() -> PESILO; -} -extern "C" { - pub fn PsGetCurrentSilo() -> PESILO; -} -extern "C" { - pub fn PsGetCurrentServerSilo() -> PESILO; -} -extern "C" { - pub fn PsGetCurrentServerSiloName() -> PUNICODE_STRING; -} -extern "C" { - pub fn PsIsCurrentThreadInServerSilo() -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn PsAcquireSiloHardReference(Silo: PESILO) -> NTSTATUS; -} -extern "C" { - pub fn PsReleaseSiloHardReference(Silo: PESILO); -} -extern "C" { - #[must_use] - pub fn PsAllocSiloContextSlot( - Reserved: ULONG_PTR, - ReturnedContextSlot: *mut ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsFreeSiloContextSlot(ContextSlot: ULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsCreateSiloContext( - Silo: PESILO, - Size: ULONG, - PoolType: POOL_TYPE, - ContextCleanupCallback: SILO_CONTEXT_CLEANUP_CALLBACK, - ReturnedSiloContext: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsInsertSiloContext( - Silo: PESILO, - ContextSlot: ULONG, - SiloContext: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsReplaceSiloContext( - Silo: PESILO, - ContextSlot: ULONG, - NewSiloContext: PVOID, - OldSiloContext: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsGetSiloContext( - Silo: PESILO, - ContextSlot: ULONG, - ReturnedSiloContext: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsRemoveSiloContext( - Silo: PESILO, - ContextSlot: ULONG, - RemovedSiloContext: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn PsReferenceSiloContext(SiloContext: PVOID); -} -extern "C" { - pub fn PsDereferenceSiloContext(SiloContext: PVOID); -} -extern "C" { - #[must_use] - pub fn PsInsertPermanentSiloContext( - Silo: PESILO, - ContextSlot: ULONG, - SiloContext: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsMakeSiloContextPermanent(Silo: PESILO, ContextSlot: ULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsGetPermanentSiloContext( - Silo: PESILO, - ContextSlot: ULONG, - ReturnedSiloContext: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsRegisterSiloMonitor( - Registration: PSILO_MONITOR_REGISTRATION, - ReturnedMonitor: *mut PSILO_MONITOR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsStartSiloMonitor(Monitor: PSILO_MONITOR) -> NTSTATUS; -} -extern "C" { - pub fn PsGetSiloMonitorContextSlot(Monitor: PSILO_MONITOR) -> ULONG; -} -extern "C" { - pub fn PsUnregisterSiloMonitor(Monitor: PSILO_MONITOR); -} -extern "C" { - pub fn PsGetServerSiloServiceSessionId(Silo: PESILO) -> ULONG; -} -extern "C" { - pub fn PsGetServerSiloActiveConsoleId(Silo: PESILO) -> ULONG; -} -extern "C" { - pub fn PsTerminateServerSilo(ServerSilo: PESILO, ExitStatus: NTSTATUS); -} -extern "C" { - pub fn PsGetParentSilo(Job: PEJOB) -> PESILO; -} -extern "C" { - pub fn PsGetThreadServerSilo(Thread: PETHREAD) -> PESILO; -} -extern "C" { - pub fn PsGetSiloContainerId(Silo: PESILO) -> *mut GUID; -} -extern "C" { - pub fn IoAllocateController( - ControllerObject: PCONTROLLER_OBJECT, - DeviceObject: PDEVICE_OBJECT, - ExecutionRoutine: PDRIVER_CONTROL, - Context: PVOID, - ); -} -extern "C" { - #[must_use] - pub fn IoAssignResources( - RegistryPath: PUNICODE_STRING, - DriverClassName: PUNICODE_STRING, - DriverObject: PDRIVER_OBJECT, - DeviceObject: PDEVICE_OBJECT, - RequestedResources: PIO_RESOURCE_REQUIREMENTS_LIST, - AllocatedResources: *mut PCM_RESOURCE_LIST, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoAttachDeviceByPointer( - SourceDevice: PDEVICE_OBJECT, - TargetDevice: PDEVICE_OBJECT, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoCreateController(Size: ULONG) -> PCONTROLLER_OBJECT; -} -extern "C" { - pub fn IoDeleteController(ControllerObject: PCONTROLLER_OBJECT); -} -extern "C" { - pub fn IoFreeController(ControllerObject: PCONTROLLER_OBJECT); -} -extern "C" { - pub fn IoGetConfigurationInformation() -> PCONFIGURATION_INFORMATION; -} -extern "C" { - pub fn IoGetFileObjectGenericMapping() -> PGENERIC_MAPPING; -} -extern "C" { - pub fn IoCancelFileOpen(DeviceObject: PDEVICE_OBJECT, FileObject: PFILE_OBJECT); -} -extern "C" { - pub fn IoMakeAssociatedIrp(Irp: PIRP, StackSize: CCHAR) -> PIRP; -} -extern "C" { - pub fn IoMakeAssociatedIrpEx( - Irp: PIRP, - DeviceObject: PDEVICE_OBJECT, - StackSize: CCHAR, - ) -> PIRP; -} -extern "C" { - #[must_use] - pub fn IoQueryDeviceDescription( - BusType: PINTERFACE_TYPE, - BusNumber: PULONG, - ControllerType: PCONFIGURATION_TYPE, - ControllerNumber: PULONG, - PeripheralType: PCONFIGURATION_TYPE, - PeripheralNumber: PULONG, - CalloutRoutine: PIO_QUERY_DEVICE_ROUTINE, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoRaiseHardError(Irp: PIRP, Vpb: PVPB, RealDeviceObject: PDEVICE_OBJECT); -} -extern "C" { - pub fn IoRaiseInformationalHardError( - ErrorStatus: NTSTATUS, - String: PUNICODE_STRING, - Thread: PKTHREAD, - ) -> BOOLEAN; -} -extern "C" { - pub fn IoSetThreadHardErrorMode(EnableHardErrors: BOOLEAN) -> BOOLEAN; -} -extern "C" { - pub fn IoRegisterBootDriverReinitialization( - DriverObject: PDRIVER_OBJECT, - DriverReinitializationRoutine: PDRIVER_REINITIALIZE, - Context: PVOID, - ); -} -extern "C" { - pub fn IoRegisterDriverReinitialization( - DriverObject: PDRIVER_OBJECT, - DriverReinitializationRoutine: PDRIVER_REINITIALIZE, - Context: PVOID, - ); -} -extern "C" { - #[must_use] - pub fn IoReportResourceUsage( - DriverClassName: PUNICODE_STRING, - DriverObject: PDRIVER_OBJECT, - DriverList: PCM_RESOURCE_LIST, - DriverListSize: ULONG, - DeviceObject: PDEVICE_OBJECT, - DeviceList: PCM_RESOURCE_LIST, - DeviceListSize: ULONG, - OverrideConflict: BOOLEAN, - ConflictDetected: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoTranslateBusAddress( - InterfaceType: INTERFACE_TYPE, - BusNumber: ULONG, - BusAddress: PHYSICAL_ADDRESS, - AddressSpace: PULONG, - TranslatedAddress: PPHYSICAL_ADDRESS, - ) -> BOOLEAN; -} -extern "C" { - pub fn IoSetHardErrorOrVerifyDevice(Irp: PIRP, DeviceObject: PDEVICE_OBJECT); -} -extern "C" { - pub fn HalExamineMBR( - DeviceObject: PDEVICE_OBJECT, - SectorSize: ULONG, - MBRTypeIdentifier: ULONG, - Buffer: *mut PVOID, - ); -} -extern "C" { - #[must_use] - pub fn IoReadPartitionTable( - DeviceObject: PDEVICE_OBJECT, - SectorSize: ULONG, - ReturnRecognizedPartitions: BOOLEAN, - PartitionBuffer: *mut *mut _DRIVE_LAYOUT_INFORMATION, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoSetPartitionInformation( - DeviceObject: PDEVICE_OBJECT, - SectorSize: ULONG, - PartitionNumber: ULONG, - PartitionType: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWritePartitionTable( - DeviceObject: PDEVICE_OBJECT, - SectorSize: ULONG, - SectorsPerTrack: ULONG, - NumberOfHeads: ULONG, - PartitionBuffer: *mut _DRIVE_LAYOUT_INFORMATION, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoCreateDisk( - DeviceObject: PDEVICE_OBJECT, - Disk: *mut [u8; 0usize], - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoReadPartitionTableEx( - DeviceObject: PDEVICE_OBJECT, - DriveLayout: *mut *mut [u8; 0usize], - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoWritePartitionTableEx( - DeviceObject: PDEVICE_OBJECT, - DriveLayout: *mut [u8; 0usize], - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoSetPartitionInformationEx( - DeviceObject: PDEVICE_OBJECT, - PartitionNumber: ULONG, - PartitionInfo: *mut [u8; 0usize], - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoVerifyPartitionTable( - DeviceObject: PDEVICE_OBJECT, - FixErrors: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoReadDiskSignature( - DeviceObject: PDEVICE_OBJECT, - BytesPerSector: ULONG, - Signature: PDISK_SIGNATURE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoVolumeDeviceToDosName( - VolumeDeviceObject: PVOID, - DosName: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoVolumeDeviceToGuidPath( - VolumeDeviceObject: PVOID, - GuidPath: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoVolumeDeviceToGuid(VolumeDeviceObject: PVOID, Guid: *mut GUID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoVolumeDeviceNameToGuid( - VolumeDeviceName: PUNICODE_STRING, - Guid: *mut GUID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoVolumeDeviceNameToGuidPath( - VolumeDeviceName: PUNICODE_STRING, - GuidPath: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoSetSystemPartition(VolumeNameString: PUNICODE_STRING) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoCreateFileSpecifyDeviceObjectHint( - FileHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - IoStatusBlock: PIO_STATUS_BLOCK, - AllocationSize: PLARGE_INTEGER, - FileAttributes: ULONG, - ShareAccess: ULONG, - Disposition: ULONG, - CreateOptions: ULONG, - EaBuffer: PVOID, - EaLength: ULONG, - CreateFileType: CREATE_FILE_TYPE, - InternalParameters: PVOID, - Options: ULONG, - DeviceObject: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoGetSiloParameters(FileObject: PFILE_OBJECT) -> PIO_FOEXT_SILO_PARAMETERS; -} -extern "C" { - pub fn IoGetSilo(FileObject: PFILE_OBJECT) -> PESILO; -} -extern "C" { - pub fn IoGetTransactionParameterBlock( - FileObject: PFILE_OBJECT, - ) -> PTXN_PARAMETER_BLOCK; -} -extern "C" { - pub fn IoGetOplockKeyContext(FileObject: PFILE_OBJECT) -> POPLOCK_KEY_ECP_CONTEXT; -} -extern "C" { - pub fn IoGetOplockKeyContextEx(FileObject: PFILE_OBJECT) -> POPLOCK_KEY_CONTEXT; -} -extern "C" { - pub fn IoGetShadowFileInformation(FileObject: PFILE_OBJECT) -> PIO_FOEXT_SHADOW_FILE; -} -extern "C" { - #[must_use] - pub fn IoSetShadowFileInformation( - FileObject: PFILE_OBJECT, - BackingFileObject: PFILE_OBJECT, - BackingFltInstance: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoCreateFileEx( - FileHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - IoStatusBlock: PIO_STATUS_BLOCK, - AllocationSize: PLARGE_INTEGER, - FileAttributes: ULONG, - ShareAccess: ULONG, - Disposition: ULONG, - CreateOptions: ULONG, - EaBuffer: PVOID, - EaLength: ULONG, - CreateFileType: CREATE_FILE_TYPE, - InternalParameters: PVOID, - Options: ULONG, - DriverContext: PIO_DRIVER_CREATE_CONTEXT, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoSetIrpExtraCreateParameter( - Irp: PIRP, - ExtraCreateParameter: *mut _ECP_LIST, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoClearIrpExtraCreateParameter(Irp: PIRP); -} -extern "C" { - #[must_use] - pub fn IoGetIrpExtraCreateParameter( - Irp: PIRP, - ExtraCreateParameter: *mut *mut _ECP_LIST, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoQueryInformationByName( - ObjectAttributes: POBJECT_ATTRIBUTES, - IoStatusBlock: PIO_STATUS_BLOCK, - FileInformation: PVOID, - Length: ULONG, - FileInformationClass: FILE_INFORMATION_CLASS, - Options: ULONG, - DriverContext: PIO_DRIVER_CREATE_CONTEXT, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoAttachDeviceToDeviceStackSafe( - SourceDevice: PDEVICE_OBJECT, - TargetDevice: PDEVICE_OBJECT, - AttachedToDeviceObject: *mut PDEVICE_OBJECT, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoIsFileOriginRemote(FileObject: PFILE_OBJECT) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn IoSetFileOrigin(FileObject: PFILE_OBJECT, Remote: BOOLEAN) -> NTSTATUS; -} -extern "C" { - pub fn IoIsFileObjectIgnoringSharing(FileObject: PFILE_OBJECT) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn IoSetFileObjectIgnoreSharing(FileObject: PFILE_OBJECT) -> NTSTATUS; -} -extern "C" { - pub fn IoGetPagingIoPriority(Irp: PIRP) -> IO_PAGING_PRIORITY; -} -extern "C" { - pub fn IoRegisterBootDriverCallback( - CallbackFunction: PBOOT_DRIVER_CALLBACK_FUNCTION, - CallbackContext: PVOID, - ) -> PVOID; -} -extern "C" { - pub fn IoUnregisterBootDriverCallback(CallbackHandle: PVOID); -} -extern "C" { - #[must_use] - pub fn IoGetActivityIdIrp(Irp: PIRP, Guid: LPGUID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoSetActivityIdIrp(Irp: PIRP, Guid: LPCGUID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoPropagateActivityIdToThread( - Irp: PIRP, - PropagatedId: LPGUID, - OriginalId: *mut LPCGUID, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoSetActivityIdThread(ActivityId: LPCGUID) -> LPCGUID; -} -extern "C" { - pub fn IoClearActivityIdThread(OriginalId: LPCGUID); -} -extern "C" { - pub fn IoGetActivityIdThread() -> LPCGUID; -} -extern "C" { - pub fn IoTransferActivityId(ActivityId: LPCGUID, RelatedActivityId: LPCGUID); -} -extern "C" { - #[must_use] - pub fn IoGetFsZeroingOffset(Irp: PIRP, ZeroingOffset: PULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoSetFsZeroingOffsetRequired(Irp: PIRP) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoSetFsZeroingOffset(Irp: PIRP, ZeroingOffset: ULONG) -> NTSTATUS; -} -extern "C" { - pub fn IoIsValidIrpStatus(Status: NTSTATUS) -> LOGICAL; -} -extern "C" { - #[must_use] - pub fn IoIncrementKeepAliveCount( - FileObject: PFILE_OBJECT, - Process: PEPROCESS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoDecrementKeepAliveCount( - FileObject: PFILE_OBJECT, - Process: PEPROCESS, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoGetInitiatorProcess(FileObject: PFILE_OBJECT) -> PEPROCESS; -} -extern "C" { - pub fn IoSetMasterIrpStatus(MasterIrp: PIRP, Status: NTSTATUS); -} -extern "C" { - #[must_use] - pub fn IoQueryFullDriverPath( - DriverObject: PDRIVER_OBJECT, - FullPath: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoReportDetectedDevice( - DriverObject: PDRIVER_OBJECT, - LegacyBusType: INTERFACE_TYPE, - BusNumber: ULONG, - SlotNumber: ULONG, - ResourceList: PCM_RESOURCE_LIST, - ResourceRequirements: PIO_RESOURCE_REQUIREMENTS_LIST, - ResourceAssigned: BOOLEAN, - DeviceObject: *mut PDEVICE_OBJECT, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoReportRootDevice(DriverObject: PDRIVER_OBJECT) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoReportResourceForDetection( - DriverObject: PDRIVER_OBJECT, - DriverList: PCM_RESOURCE_LIST, - DriverListSize: ULONG, - DeviceObject: PDEVICE_OBJECT, - DeviceList: PCM_RESOURCE_LIST, - DeviceListSize: ULONG, - ConflictDetected: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn HalAcquireDisplayOwnership( - ResetDisplayParameters: PHAL_RESET_DISPLAY_PARAMETERS, - ); -} -extern "C" { - pub fn HalSetBusDataByOffset( - BusDataType: BUS_DATA_TYPE, - BusNumber: ULONG, - SlotNumber: ULONG, - Buffer: PVOID, - Offset: ULONG, - Length: ULONG, - ) -> ULONG; -} -extern "C" { - pub fn HalTranslateBusAddress( - InterfaceType: INTERFACE_TYPE, - BusNumber: ULONG, - BusAddress: PHYSICAL_ADDRESS, - AddressSpace: PULONG, - TranslatedAddress: PPHYSICAL_ADDRESS, - ) -> BOOLEAN; -} -extern "C" { - pub fn HalAllocateCrashDumpRegisters( - AdapterObject: PADAPTER_OBJECT, - NumberOfMapRegisters: PULONG, - ) -> PVOID; -} -extern "C" { - #[must_use] - pub fn HalDmaAllocateCrashDumpRegistersEx( - Adapter: PADAPTER_OBJECT, - NumberOfMapRegisters: ULONG, - Type: HAL_DMA_CRASH_DUMP_REGISTER_TYPE, - MapRegisterBase: *mut PVOID, - MapRegistersAvailable: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn HalDmaFreeCrashDumpRegistersEx( - Adapter: PADAPTER_OBJECT, - Type: HAL_DMA_CRASH_DUMP_REGISTER_TYPE, - ) -> NTSTATUS; -} -extern "C" { - pub fn HalGetBusDataByOffset( - BusDataType: BUS_DATA_TYPE, - BusNumber: ULONG, - SlotNumber: ULONG, - Buffer: PVOID, - Offset: ULONG, - Length: ULONG, - ) -> ULONG; -} -extern "C" { - pub fn HalGetAdapter( - DeviceDescription: PDEVICE_DESCRIPTION, - NumberOfMapRegisters: PULONG, - ) -> PADAPTER_OBJECT; -} -extern "C" { - #[must_use] - pub fn HalGetScatterGatherList( - DmaAdapter: PADAPTER_OBJECT, - DeviceObject: PDEVICE_OBJECT, - Mdl: PMDL, - CurrentVa: PVOID, - Length: ULONG, - ExecutionRoutine: PDRIVER_LIST_CONTROL, - Context: PVOID, - WriteToDevice: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn HalPutScatterGatherList( - DmaAdapter: PADAPTER_OBJECT, - ScatterGather: PSCATTER_GATHER_LIST, - WriteToDevice: BOOLEAN, - ); -} -extern "C" { - pub fn HalPutDmaAdapter(DmaAdapter: PADAPTER_OBJECT); -} -extern "C" { - pub fn HalBugCheckSystem( - ErrorSource: PWHEA_ERROR_SOURCE_DESCRIPTOR, - ErrorRecord: PWHEA_ERROR_RECORD, - ); -} -extern "C" { - #[must_use] - pub fn HalAllocateHardwareCounters( - GroupAffinty: PGROUP_AFFINITY, - GroupCount: ULONG, - ResourceList: PPHYSICAL_COUNTER_RESOURCE_LIST, - CounterSetHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn HalFreeHardwareCounters(CounterSetHandle: HANDLE) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlIsTotalDeviceFailure(Status: NTSTATUS) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn ZwSetInformationThread( - ThreadHandle: HANDLE, - ThreadInformationClass: THREADINFOCLASS, - ThreadInformation: PVOID, - ThreadInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCreateTimer( - TimerHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - TimerType: TIMER_TYPE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenTimer( - TimerHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCancelTimer(TimerHandle: HANDLE, CurrentState: PBOOLEAN) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetTimer( - TimerHandle: HANDLE, - DueTime: PLARGE_INTEGER, - TimerApcRoutine: PTIMER_APC_ROUTINE, - TimerContext: PVOID, - ResumeTimer: BOOLEAN, - Period: LONG, - PreviousState: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetTimerEx( - TimerHandle: HANDLE, - TimerSetInformationClass: TIMER_SET_INFORMATION_CLASS, - TimerSetInformation: PVOID, - TimerSetInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryVolumeInformationFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - FsInformation: PVOID, - Length: ULONG, - FsInformationClass: FS_INFORMATION_CLASS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwDeviceIoControlFile( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - IoControlCode: ULONG, - InputBuffer: PVOID, - InputBufferLength: ULONG, - OutputBuffer: PVOID, - OutputBufferLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwDisplayString(String: PUNICODE_STRING) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwPowerInformation( - InformationLevel: POWER_INFORMATION_LEVEL::Type, - InputBuffer: PVOID, - InputBufferLength: ULONG, - OutputBuffer: PVOID, - OutputBufferLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwAllocateLocallyUniqueId(Luid: PLUID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwTerminateProcess(ProcessHandle: HANDLE, ExitStatus: NTSTATUS) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenProcess( - ProcessHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - ClientId: PCLIENT_ID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaAddErrorSourceDeviceDriver( - Context: PVOID, - Configuration: PWHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER, - NumberPreallocatedErrorReports: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaAddErrorSourceDeviceDriverV1( - Context: PVOID, - Configuration: PWHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER, - NumBuffersToPreallocate: ULONG, - MaxDataLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaRemoveErrorSourceDeviceDriver(ErrorSourceId: ULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaReportHwErrorDeviceDriver( - ErrorSourceId: ULONG, - DeviceObject: PDEVICE_OBJECT, - ErrorData: PUCHAR, - ErrorDataLength: ULONG, - SectionTypeGuid: LPGUID, - ErrorSeverity: WHEA_ERROR_SEVERITY, - DeviceFriendlyName: LPSTR, - ) -> NTSTATUS; -} -extern "C" { - pub fn WheaCreateHwErrorReportDeviceDriver( - ErrorSourceId: ULONG, - DeviceObject: PDEVICE_OBJECT, - ) -> WHEA_ERROR_HANDLE; -} -extern "C" { - #[must_use] - pub fn WheaAddHwErrorReportSectionDeviceDriver( - ErrorHandle: WHEA_ERROR_HANDLE, - SectionDataLength: ULONG, - BufferSet: PWHEA_DRIVER_BUFFER_SET, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaHwErrorReportAbandonDeviceDriver( - ErrorHandle: WHEA_ERROR_HANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaHwErrorReportSubmitDeviceDriver( - ErrorHandle: WHEA_ERROR_HANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaHwErrorReportSetSeverityDeviceDriver( - ErrorHandle: WHEA_ERROR_HANDLE, - ErrorSeverity: WHEA_ERROR_SEVERITY, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaHwErrorReportSetSectionNameDeviceDriver( - BufferSet: PWHEA_DRIVER_BUFFER_SET, - NameLength: ULONG, - Name: PUCHAR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaReportHwError(ErrorPacket: PWHEA_ERROR_PACKET) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaAddErrorSource( - ErrorSource: PWHEA_ERROR_SOURCE_DESCRIPTOR, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaInitializeRecordHeader(Header: PWHEA_ERROR_RECORD_HEADER) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaConfigureErrorSource( - SourceType: WHEA_ERROR_SOURCE_TYPE, - Configuration: PWHEA_ERROR_SOURCE_CONFIGURATION, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaUnconfigureErrorSource(SourceType: WHEA_ERROR_SOURCE_TYPE) -> NTSTATUS; -} -extern "C" { - pub fn WheaRemoveErrorSource(ErrorSourceId: ULONG); -} -extern "C" { - pub fn WheaLogInternalEvent(Entry: PWHEA_EVENT_LOG_ENTRY); -} -extern "C" { - pub fn WheaErrorSourceGetState(ErrorSourceId: ULONG) -> WHEA_ERROR_SOURCE_STATE; -} -extern "C" { - pub fn WheaIsCriticalState() -> BOOLEAN; -} -extern "C" { - pub fn WheaSignalHandlerOverride( - SourceType: WHEA_ERROR_SOURCE_TYPE, - Context: UINT_PTR, - ) -> BOOLEAN; -} -extern "C" { - pub fn WheaUnregisterErrorSourceOverride( - Type: WHEA_ERROR_SOURCE_TYPE, - OverrideErrorSourceId: ULONG32, - ); -} -extern "C" { - #[must_use] - pub fn WheaRegisterErrorSourceOverride( - OverrideSettings: WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS, - OverrideConfig: PWHEA_ERROR_SOURCE_CONFIGURATION, - OverrideCallback: WHEA_SIGNAL_HANDLER_OVERRIDE_CALLBACK, - ) -> NTSTATUS; -} -extern "C" { - pub fn WheaHighIrqlLogSelEventHandlerRegister( - Handler: PFN_WHEA_HIGH_IRQL_LOG_SEL_EVENT_HANDLER, - Context: PVOID, - ) -> BOOLEAN; -} -extern "C" { - pub fn WheaHighIrqlLogSelEventHandlerUnregister(); -} -extern "C" { - #[must_use] - pub fn WheaRegisterInUsePageOfflineNotification( - Callback: PFN_IN_USE_PAGE_OFFLINE_NOTIFY, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn WheaUnregisterInUsePageOfflineNotification( - Callback: PFN_IN_USE_PAGE_OFFLINE_NOTIFY, - ) -> NTSTATUS; -} -extern "C" { - pub fn WheaGetNotifyAllOfflinesPolicy() -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn HvlRegisterWheaErrorNotification( - Callback: PHVL_WHEA_ERROR_NOTIFICATION, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn HvlUnregisterWheaErrorNotification( - Callback: PHVL_WHEA_ERROR_NOTIFICATION, - ) -> NTSTATUS; -} -extern "C" { - pub fn PshedAllocateMemory(Size: ULONG) -> PVOID; -} -extern "C" { - pub fn PshedFreeMemory(Address: PVOID); -} -extern "C" { - pub fn PshedIsSystemWheaEnabled() -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn PshedRegisterPlugin( - Packet: PWHEA_PSHED_PLUGIN_REGISTRATION_PACKET, - ) -> NTSTATUS; -} -extern "C" { - pub fn PshedUnregisterPlugin(PluginHandle: PVOID); -} -extern "C" { - pub fn PshedSynchronizeExecution( - ErrorSource: PWHEA_ERROR_SOURCE_DESCRIPTOR, - SynchronizeRoutine: PKSYNCHRONIZE_ROUTINE, - SynchronizeContext: PVOID, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn NtOpenThreadToken( - ThreadHandle: HANDLE, - DesiredAccess: ACCESS_MASK, - OpenAsSelf: BOOLEAN, - TokenHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtOpenThreadTokenEx( - ThreadHandle: HANDLE, - DesiredAccess: ACCESS_MASK, - OpenAsSelf: BOOLEAN, - HandleAttributes: ULONG, - TokenHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtOpenProcessToken( - ProcessHandle: HANDLE, - DesiredAccess: ACCESS_MASK, - TokenHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtOpenProcessTokenEx( - ProcessHandle: HANDLE, - DesiredAccess: ACCESS_MASK, - HandleAttributes: ULONG, - TokenHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtOpenJobObjectToken( - JobHandle: HANDLE, - DesiredAccess: ACCESS_MASK, - TokenHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtDuplicateToken( - ExistingTokenHandle: HANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - EffectiveOnly: BOOLEAN, - TokenType: TOKEN_TYPE, - NewTokenHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtFilterToken( - ExistingTokenHandle: HANDLE, - Flags: ULONG, - SidsToDisable: PTOKEN_GROUPS, - PrivilegesToDelete: PTOKEN_PRIVILEGES, - RestrictedSids: PTOKEN_GROUPS, - NewTokenHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtImpersonateAnonymousToken(ThreadHandle: HANDLE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQueryInformationToken( - TokenHandle: HANDLE, - TokenInformationClass: TOKEN_INFORMATION_CLASS, - TokenInformation: PVOID, - TokenInformationLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtSetInformationToken( - TokenHandle: HANDLE, - TokenInformationClass: TOKEN_INFORMATION_CLASS, - TokenInformation: PVOID, - TokenInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtAdjustPrivilegesToken( - TokenHandle: HANDLE, - DisableAllPrivileges: BOOLEAN, - NewState: PTOKEN_PRIVILEGES, - BufferLength: ULONG, - PreviousState: PTOKEN_PRIVILEGES, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtAdjustGroupsToken( - TokenHandle: HANDLE, - ResetToDefault: BOOLEAN, - NewState: PTOKEN_GROUPS, - BufferLength: ULONG, - PreviousState: PTOKEN_GROUPS, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtPrivilegeCheck( - ClientToken: HANDLE, - RequiredPrivileges: PPRIVILEGE_SET, - Result: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtAccessCheckAndAuditAlarm( - SubsystemName: PUNICODE_STRING, - HandleId: PVOID, - ObjectTypeName: PUNICODE_STRING, - ObjectName: PUNICODE_STRING, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - DesiredAccess: ACCESS_MASK, - GenericMapping: PGENERIC_MAPPING, - ObjectCreation: BOOLEAN, - GrantedAccess: PACCESS_MASK, - AccessStatus: PNTSTATUS, - GenerateOnClose: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtAccessCheckByTypeAndAuditAlarm( - SubsystemName: PUNICODE_STRING, - HandleId: PVOID, - ObjectTypeName: PUNICODE_STRING, - ObjectName: PUNICODE_STRING, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - PrincipalSelfSid: PSID, - DesiredAccess: ACCESS_MASK, - AuditType: AUDIT_EVENT_TYPE, - Flags: ULONG, - ObjectTypeList: POBJECT_TYPE_LIST, - ObjectTypeListLength: ULONG, - GenericMapping: PGENERIC_MAPPING, - ObjectCreation: BOOLEAN, - GrantedAccess: PACCESS_MASK, - AccessStatus: PNTSTATUS, - GenerateOnClose: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtAccessCheckByTypeResultListAndAuditAlarm( - SubsystemName: PUNICODE_STRING, - HandleId: PVOID, - ObjectTypeName: PUNICODE_STRING, - ObjectName: PUNICODE_STRING, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - PrincipalSelfSid: PSID, - DesiredAccess: ACCESS_MASK, - AuditType: AUDIT_EVENT_TYPE, - Flags: ULONG, - ObjectTypeList: POBJECT_TYPE_LIST, - ObjectTypeListLength: ULONG, - GenericMapping: PGENERIC_MAPPING, - ObjectCreation: BOOLEAN, - GrantedAccess: PACCESS_MASK, - AccessStatus: PNTSTATUS, - GenerateOnClose: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtAccessCheckByTypeResultListAndAuditAlarmByHandle( - SubsystemName: PUNICODE_STRING, - HandleId: PVOID, - ClientToken: HANDLE, - ObjectTypeName: PUNICODE_STRING, - ObjectName: PUNICODE_STRING, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - PrincipalSelfSid: PSID, - DesiredAccess: ACCESS_MASK, - AuditType: AUDIT_EVENT_TYPE, - Flags: ULONG, - ObjectTypeList: POBJECT_TYPE_LIST, - ObjectTypeListLength: ULONG, - GenericMapping: PGENERIC_MAPPING, - ObjectCreation: BOOLEAN, - GrantedAccess: PACCESS_MASK, - AccessStatus: PNTSTATUS, - GenerateOnClose: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtOpenObjectAuditAlarm( - SubsystemName: PUNICODE_STRING, - HandleId: PVOID, - ObjectTypeName: PUNICODE_STRING, - ObjectName: PUNICODE_STRING, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - ClientToken: HANDLE, - DesiredAccess: ACCESS_MASK, - GrantedAccess: ACCESS_MASK, - Privileges: PPRIVILEGE_SET, - ObjectCreation: BOOLEAN, - AccessGranted: BOOLEAN, - GenerateOnClose: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtPrivilegeObjectAuditAlarm( - SubsystemName: PUNICODE_STRING, - HandleId: PVOID, - ClientToken: HANDLE, - DesiredAccess: ACCESS_MASK, - Privileges: PPRIVILEGE_SET, - AccessGranted: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtCloseObjectAuditAlarm( - SubsystemName: PUNICODE_STRING, - HandleId: PVOID, - GenerateOnClose: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtDeleteObjectAuditAlarm( - SubsystemName: PUNICODE_STRING, - HandleId: PVOID, - GenerateOnClose: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtPrivilegedServiceAuditAlarm( - SubsystemName: PUNICODE_STRING, - ServiceName: PUNICODE_STRING, - ClientToken: HANDLE, - Privileges: PPRIVILEGE_SET, - AccessGranted: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlCreateHeap( - Flags: ULONG, - HeapBase: PVOID, - ReserveSize: SIZE_T, - CommitSize: SIZE_T, - Lock: PVOID, - Parameters: PRTL_HEAP_PARAMETERS, - ) -> PVOID; -} -extern "C" { - pub fn RtlDestroyHeap(HeapHandle: PVOID) -> PVOID; -} -extern "C" { - pub fn RtlAllocateHeap(HeapHandle: PVOID, Flags: ULONG, Size: SIZE_T) -> PVOID; -} -extern "C" { - pub fn RtlFreeHeap(HeapHandle: PVOID, Flags: ULONG, BaseAddress: PVOID) -> LOGICAL; -} -extern "C" { - pub fn RtlRandom(Seed: PULONG) -> ULONG; -} -extern "C" { - pub fn RtlRandomEx(Seed: PULONG) -> ULONG; -} -extern "C" { - #[must_use] - pub fn RtlInitUnicodeStringEx( - DestinationString: PUNICODE_STRING, - SourceString: PCWSTR, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlCreateUnicodeString( - DestinationString: PUNICODE_STRING, - SourceString: PCWSTR, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlPrefixString( - String1: *const STRING, - String2: *const STRING, - CaseInSensitive: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn RtlAppendStringToString( - Destination: PSTRING, - Source: *const STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlOemStringToUnicodeString( - DestinationString: PUNICODE_STRING, - SourceString: PCOEM_STRING, - AllocateDestinationString: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUnicodeStringToOemString( - DestinationString: POEM_STRING, - SourceString: PCUNICODE_STRING, - AllocateDestinationString: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUpcaseUnicodeStringToOemString( - DestinationString: POEM_STRING, - SourceString: PCUNICODE_STRING, - AllocateDestinationString: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlOemStringToCountedUnicodeString( - DestinationString: PUNICODE_STRING, - SourceString: PCOEM_STRING, - AllocateDestinationString: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUnicodeStringToCountedOemString( - DestinationString: POEM_STRING, - SourceString: PCUNICODE_STRING, - AllocateDestinationString: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUpcaseUnicodeStringToCountedOemString( - DestinationString: POEM_STRING, - SourceString: PCUNICODE_STRING, - AllocateDestinationString: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlValidateUnicodeString(Flags: ULONG, String: PCUNICODE_STRING) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlDuplicateUnicodeString( - Flags: ULONG, - StringIn: PCUNICODE_STRING, - StringOut: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlDowncaseUnicodeString( - DestinationString: PUNICODE_STRING, - SourceString: PCUNICODE_STRING, - AllocateDestinationString: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlFreeOemString(OemString: POEM_STRING); -} -extern "C" { - pub fn RtlxUnicodeStringToOemSize(UnicodeString: PCUNICODE_STRING) -> ULONG; -} -extern "C" { - pub fn RtlxOemStringToUnicodeSize(OemString: PCOEM_STRING) -> ULONG; -} -extern "C" { - #[must_use] - pub fn RtlMultiByteToUnicodeN( - UnicodeString: PWCH, - MaxBytesInUnicodeString: ULONG, - BytesInUnicodeString: PULONG, - MultiByteString: *const CHAR, - BytesInMultiByteString: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlMultiByteToUnicodeSize( - BytesInUnicodeString: PULONG, - MultiByteString: *const CHAR, - BytesInMultiByteString: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUnicodeToMultiByteSize( - BytesInMultiByteString: PULONG, - UnicodeString: PCWCH, - BytesInUnicodeString: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUnicodeToMultiByteN( - MultiByteString: PCHAR, - MaxBytesInMultiByteString: ULONG, - BytesInMultiByteString: PULONG, - UnicodeString: PCWCH, - BytesInUnicodeString: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUpcaseUnicodeToMultiByteN( - MultiByteString: PCHAR, - MaxBytesInMultiByteString: ULONG, - BytesInMultiByteString: PULONG, - UnicodeString: PCWCH, - BytesInUnicodeString: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlOemToUnicodeN( - UnicodeString: PWCH, - MaxBytesInUnicodeString: ULONG, - BytesInUnicodeString: PULONG, - OemString: PCCH, - BytesInOemString: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUnicodeToOemN( - OemString: PCHAR, - MaxBytesInOemString: ULONG, - BytesInOemString: PULONG, - UnicodeString: PCWCH, - BytesInUnicodeString: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUpcaseUnicodeToOemN( - OemString: PCHAR, - MaxBytesInOemString: ULONG, - BytesInOemString: PULONG, - UnicodeString: PCWCH, - BytesInUnicodeString: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlNormalizeString( - NormForm: ULONG, - SourceString: PCWSTR, - SourceStringLength: LONG, - DestinationString: PWSTR, - DestinationStringLength: PLONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlIsNormalizedString( - NormForm: ULONG, - SourceString: PCWSTR, - SourceStringLength: LONG, - Normalized: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlIdnToAscii( - Flags: ULONG, - SourceString: PCWSTR, - SourceStringLength: LONG, - DestinationString: PWSTR, - DestinationStringLength: PLONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlIdnToUnicode( - Flags: ULONG, - SourceString: PCWSTR, - SourceStringLength: LONG, - DestinationString: PWSTR, - DestinationStringLength: PLONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlIdnToNameprepUnicode( - Flags: ULONG, - SourceString: PCWSTR, - SourceStringLength: LONG, - DestinationString: PWSTR, - DestinationStringLength: PLONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlGenerate8dot3Name( - Name: PCUNICODE_STRING, - AllowExtendedCharacters: BOOLEAN, - Context: PGENERATE_NAME_CONTEXT, - Name8dot3: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlIsNameLegalDOS8Dot3( - Name: PCUNICODE_STRING, - OemName: POEM_STRING, - NameContainsSpaces: PBOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlIsValidOemCharacter(Char: PWCHAR) -> BOOLEAN; -} -extern "C" { - pub fn PfxInitialize(PrefixTable: PPREFIX_TABLE); -} -extern "C" { - pub fn PfxInsertPrefix( - PrefixTable: PPREFIX_TABLE, - Prefix: PSTRING, - PrefixTableEntry: PPREFIX_TABLE_ENTRY, - ) -> BOOLEAN; -} -extern "C" { - pub fn PfxRemovePrefix( - PrefixTable: PPREFIX_TABLE, - PrefixTableEntry: PPREFIX_TABLE_ENTRY, - ); -} -extern "C" { - pub fn PfxFindPrefix( - PrefixTable: PPREFIX_TABLE, - FullName: PSTRING, - ) -> PPREFIX_TABLE_ENTRY; -} -extern "C" { - pub fn RtlInitializeUnicodePrefix(PrefixTable: PUNICODE_PREFIX_TABLE); -} -extern "C" { - pub fn RtlInsertUnicodePrefix( - PrefixTable: PUNICODE_PREFIX_TABLE, - Prefix: PUNICODE_STRING, - PrefixTableEntry: PUNICODE_PREFIX_TABLE_ENTRY, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlRemoveUnicodePrefix( - PrefixTable: PUNICODE_PREFIX_TABLE, - PrefixTableEntry: PUNICODE_PREFIX_TABLE_ENTRY, - ); -} -extern "C" { - pub fn RtlFindUnicodePrefix( - PrefixTable: PUNICODE_PREFIX_TABLE, - FullName: PCUNICODE_STRING, - CaseInsensitiveIndex: ULONG, - ) -> PUNICODE_PREFIX_TABLE_ENTRY; -} -extern "C" { - pub fn RtlNextUnicodePrefix( - PrefixTable: PUNICODE_PREFIX_TABLE, - Restart: BOOLEAN, - ) -> PUNICODE_PREFIX_TABLE_ENTRY; -} -extern "C" { - #[must_use] - pub fn RtlGetCompressionWorkSpaceSize( - CompressionFormatAndEngine: USHORT, - CompressBufferWorkSpaceSize: PULONG, - CompressFragmentWorkSpaceSize: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlCompressBuffer( - CompressionFormatAndEngine: USHORT, - UncompressedBuffer: PUCHAR, - UncompressedBufferSize: ULONG, - CompressedBuffer: PUCHAR, - CompressedBufferSize: ULONG, - UncompressedChunkSize: ULONG, - FinalCompressedSize: PULONG, - WorkSpace: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlDecompressBuffer( - CompressionFormat: USHORT, - UncompressedBuffer: PUCHAR, - UncompressedBufferSize: ULONG, - CompressedBuffer: PUCHAR, - CompressedBufferSize: ULONG, - FinalUncompressedSize: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlDecompressBufferEx( - CompressionFormat: USHORT, - UncompressedBuffer: PUCHAR, - UncompressedBufferSize: ULONG, - CompressedBuffer: PUCHAR, - CompressedBufferSize: ULONG, - FinalUncompressedSize: PULONG, - WorkSpace: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlDecompressBufferEx2( - CompressionFormat: USHORT, - UncompressedBuffer: PUCHAR, - UncompressedBufferSize: ULONG, - CompressedBuffer: PUCHAR, - CompressedBufferSize: ULONG, - UncompressedChunkSize: ULONG, - FinalUncompressedSize: PULONG, - WorkSpace: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlDecompressFragment( - CompressionFormat: USHORT, - UncompressedFragment: PUCHAR, - UncompressedFragmentSize: ULONG, - CompressedBuffer: PUCHAR, - CompressedBufferSize: ULONG, - FragmentOffset: ULONG, - FinalUncompressedSize: PULONG, - WorkSpace: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlDecompressFragmentEx( - CompressionFormat: USHORT, - UncompressedFragment: PUCHAR, - UncompressedFragmentSize: ULONG, - CompressedBuffer: PUCHAR, - CompressedBufferSize: ULONG, - FragmentOffset: ULONG, - UncompressedChunkSize: ULONG, - FinalUncompressedSize: PULONG, - WorkSpace: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlDescribeChunk( - CompressionFormat: USHORT, - CompressedBuffer: *mut PUCHAR, - EndOfCompressedBufferPlus1: PUCHAR, - ChunkBuffer: *mut PUCHAR, - ChunkSize: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlReserveChunk( - CompressionFormat: USHORT, - CompressedBuffer: *mut PUCHAR, - EndOfCompressedBufferPlus1: PUCHAR, - ChunkBuffer: *mut PUCHAR, - ChunkSize: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlDecompressChunks( - UncompressedBuffer: PUCHAR, - UncompressedBufferSize: ULONG, - CompressedBuffer: PUCHAR, - CompressedBufferSize: ULONG, - CompressedTail: PUCHAR, - CompressedTailSize: ULONG, - CompressedDataInfo: PCOMPRESSED_DATA_INFO, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlCompressChunks( - UncompressedBuffer: PUCHAR, - UncompressedBufferSize: ULONG, - CompressedBuffer: PUCHAR, - CompressedBufferSize: ULONG, - CompressedDataInfo: PCOMPRESSED_DATA_INFO, - CompressedDataInfoLength: ULONG, - WorkSpace: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlCompareMemoryUlong( - Source: PVOID, - Length: SIZE_T, - Pattern: ULONG, - ) -> SIZE_T; -} -extern "C" { - pub fn RtlTimeToSecondsSince1980( - Time: PLARGE_INTEGER, - ElapsedSeconds: PULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlSecondsSince1980ToTime(ElapsedSeconds: ULONG, Time: PLARGE_INTEGER); -} -extern "C" { - pub fn RtlTimeToSecondsSince1970( - Time: PLARGE_INTEGER, - ElapsedSeconds: PULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlSecondsSince1970ToTime(ElapsedSeconds: ULONG, Time: PLARGE_INTEGER); -} -extern "C" { - pub fn RtlValidSid(Sid: PSID) -> BOOLEAN; -} -extern "C" { - pub fn RtlEqualSid(Sid1: PSID, Sid2: PSID) -> BOOLEAN; -} -extern "C" { - pub fn RtlEqualPrefixSid(Sid1: PSID, Sid2: PSID) -> BOOLEAN; -} -extern "C" { - pub fn RtlLengthRequiredSid(SubAuthorityCount: ULONG) -> ULONG; -} -extern "C" { - pub fn RtlFreeSid(Sid: PSID) -> PVOID; -} -extern "C" { - #[must_use] - pub fn RtlAllocateAndInitializeSid( - IdentifierAuthority: PSID_IDENTIFIER_AUTHORITY, - SubAuthorityCount: UCHAR, - SubAuthority0: ULONG, - SubAuthority1: ULONG, - SubAuthority2: ULONG, - SubAuthority3: ULONG, - SubAuthority4: ULONG, - SubAuthority5: ULONG, - SubAuthority6: ULONG, - SubAuthority7: ULONG, - Sid: *mut PSID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlAllocateAndInitializeSidEx( - IdentifierAuthority: PSID_IDENTIFIER_AUTHORITY, - SubAuthorityCount: UCHAR, - SubAuthorities: PULONG, - Sid: *mut PSID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlInitializeSid( - Sid: PSID, - IdentifierAuthority: PSID_IDENTIFIER_AUTHORITY, - SubAuthorityCount: UCHAR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlInitializeSidEx( - Sid: PSID, - IdentifierAuthority: PSID_IDENTIFIER_AUTHORITY, - SubAuthorityCount: UCHAR, - ... - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlIdentifierAuthoritySid(Sid: PSID) -> PSID_IDENTIFIER_AUTHORITY; -} -extern "C" { - pub fn RtlSubAuthoritySid(Sid: PSID, SubAuthority: ULONG) -> PULONG; -} -extern "C" { - pub fn RtlSubAuthorityCountSid(Sid: PSID) -> PUCHAR; -} -extern "C" { - pub fn RtlLengthSid(Sid: PSID) -> ULONG; -} -extern "C" { - #[must_use] - pub fn RtlCopySid( - DestinationSidLength: ULONG, - DestinationSid: PSID, - SourceSid: PSID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlCreateServiceSid( - ServiceName: PUNICODE_STRING, - ServiceSid: PSID, - ServiceSidLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlGetSaclSecurityDescriptor( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - SaclPresent: PBOOLEAN, - Sacl: *mut PACL, - SaclDefaulted: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlReplaceSidInSd( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - OldSid: PSID, - NewSid: PSID, - NumChanges: *mut ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlCreateVirtualAccountSid( - Name: PCUNICODE_STRING, - BaseSubAuthority: ULONG, - Sid: PSID, - SidLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlConvertSidToUnicodeString( - UnicodeString: PUNICODE_STRING, - Sid: PSID, - AllocateDestinationString: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlCopyLuid(DestinationLuid: PLUID, SourceLuid: PLUID); -} -extern "C" { - #[must_use] - pub fn RtlCreateAcl(Acl: PACL, AclLength: ULONG, AclRevision: ULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlAddAce( - Acl: PACL, - AceRevision: ULONG, - StartingAceIndex: ULONG, - AceList: PVOID, - AceListLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlDeleteAce(Acl: PACL, AceIndex: ULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlGetAce(Acl: PACL, AceIndex: ULONG, Ace: *mut PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlAddAccessAllowedAce( - Acl: PACL, - AceRevision: ULONG, - AccessMask: ACCESS_MASK, - Sid: PSID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlAddAccessAllowedAceEx( - Acl: PACL, - AceRevision: ULONG, - AceFlags: ULONG, - AccessMask: ACCESS_MASK, - Sid: PSID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlCreateSecurityDescriptorRelative( - SecurityDescriptor: PISECURITY_DESCRIPTOR_RELATIVE, - Revision: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlGetDaclSecurityDescriptor( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - DaclPresent: PBOOLEAN, - Dacl: *mut PACL, - DaclDefaulted: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlSetOwnerSecurityDescriptor( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - Owner: PSID, - OwnerDefaulted: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlSetGroupSecurityDescriptor( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - Group: PSID, - GroupDefaulted: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlGetGroupSecurityDescriptor( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - Group: *mut PSID, - GroupDefaulted: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlAbsoluteToSelfRelativeSD( - AbsoluteSecurityDescriptor: PSECURITY_DESCRIPTOR, - SelfRelativeSecurityDescriptor: PSECURITY_DESCRIPTOR, - BufferLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlSelfRelativeToAbsoluteSD( - SelfRelativeSecurityDescriptor: PSECURITY_DESCRIPTOR, - AbsoluteSecurityDescriptor: PSECURITY_DESCRIPTOR, - AbsoluteSecurityDescriptorSize: PULONG, - Dacl: PACL, - DaclSize: PULONG, - Sacl: PACL, - SaclSize: PULONG, - Owner: PSID, - OwnerSize: PULONG, - PrimaryGroup: PSID, - PrimaryGroupSize: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlGetOwnerSecurityDescriptor( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - Owner: *mut PSID, - OwnerDefaulted: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlNtStatusToDosError(Status: NTSTATUS) -> ULONG; -} -extern "C" { - pub fn RtlNtStatusToDosErrorNoTeb(Status: NTSTATUS) -> ULONG; -} -extern "C" { - #[must_use] - pub fn RtlCustomCPToUnicodeN( - CustomCP: PCPTABLEINFO, - UnicodeString: PWCH, - MaxBytesInUnicodeString: ULONG, - BytesInUnicodeString: PULONG, - CustomCPString: PCH, - BytesInCustomCPString: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUnicodeToCustomCPN( - CustomCP: PCPTABLEINFO, - CustomCPString: PCH, - MaxBytesInCustomCPString: ULONG, - BytesInCustomCPString: PULONG, - UnicodeString: PWCH, - BytesInUnicodeString: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlUpcaseUnicodeToCustomCPN( - CustomCP: PCPTABLEINFO, - CustomCPString: PCH, - MaxBytesInCustomCPString: ULONG, - BytesInCustomCPString: PULONG, - UnicodeString: PWCH, - BytesInUnicodeString: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlInitCodePageTable(TableBase: PUSHORT, CodePageTable: PCPTABLEINFO); -} -extern "C" { - #[must_use] - pub fn RtlCreateSystemVolumeInformationFolder( - VolumeRootPath: PCUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlCompareAltitudes( - Altitude1: PCUNICODE_STRING, - Altitude2: PCUNICODE_STRING, - ) -> LONG; -} -extern "C" { - #[must_use] - pub fn RtlQueryPackageIdentity( - TokenObject: PVOID, - PackageFullName: PWSTR, - PackageSize: PSIZE_T, - AppId: PWSTR, - AppIdSize: PSIZE_T, - Packaged: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlQueryPackageIdentityEx( - TokenObject: PVOID, - PackageFullName: PWSTR, - PackageSize: PSIZE_T, - AppId: PWSTR, - AppIdSize: PSIZE_T, - DynamicId: LPGUID, - Flags: PULONG64, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlIsNonEmptyDirectoryReparsePointAllowed(ReparseTag: ULONG) -> BOOLEAN; -} -extern "C" { - pub fn RtlIsCloudFilesPlaceholder( - FileAttributes: ULONG, - ReparseTag: ULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlIsPartialPlaceholder(FileAttributes: ULONG, ReparseTag: ULONG) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn RtlIsPartialPlaceholderFileHandle( - FileHandle: HANDLE, - IsPartialPlaceholder: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn RtlIsPartialPlaceholderFileInfo( - InfoBuffer: *const ::core::ffi::c_void, - InfoClass: FILE_INFORMATION_CLASS, - IsPartialPlaceholder: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn RtlQueryThreadPlaceholderCompatibilityMode() -> CHAR; -} -extern "C" { - pub fn RtlSetThreadPlaceholderCompatibilityMode(Mode: CHAR) -> CHAR; -} -extern "C" { - pub fn RtlQueryProcessPlaceholderCompatibilityMode() -> CHAR; -} -extern "C" { - pub fn RtlSetProcessPlaceholderCompatibilityMode(Mode: CHAR) -> CHAR; -} -extern "C" { - pub fn RtlCaptureStackBackTrace( - FramesToSkip: ULONG, - FramesToCapture: ULONG, - BackTrace: *mut PVOID, - BackTraceHash: PULONG, - ) -> USHORT; -} -extern "C" { - pub fn RtlCaptureContext(ContextRecord: PCONTEXT); -} -extern "C" { - pub fn RtlCaptureContext2(ContextRecord: PCONTEXT); -} -extern "C" { - #[must_use] - pub fn NtSetInformationThread( - ThreadHandle: HANDLE, - ThreadInformationClass: THREADINFOCLASS, - ThreadInformation: PVOID, - ThreadInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn LsaRegisterLogonProcess( - LogonProcessName: PLSA_STRING, - LsaHandle: PHANDLE, - SecurityMode: PLSA_OPERATIONAL_MODE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn LsaLogonUser( - LsaHandle: HANDLE, - OriginName: PLSA_STRING, - LogonType: SECURITY_LOGON_TYPE, - AuthenticationPackage: ULONG, - AuthenticationInformation: PVOID, - AuthenticationInformationLength: ULONG, - LocalGroups: PTOKEN_GROUPS, - SourceContext: PTOKEN_SOURCE, - ProfileBuffer: *mut PVOID, - ProfileBufferLength: PULONG, - LogonId: PLUID, - Token: PHANDLE, - Quotas: PQUOTA_LIMITS, - SubStatus: PNTSTATUS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn LsaFreeReturnBuffer(Buffer: PVOID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtCreateFile( - FileHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - IoStatusBlock: PIO_STATUS_BLOCK, - AllocationSize: PLARGE_INTEGER, - FileAttributes: ULONG, - ShareAccess: ULONG, - CreateDisposition: ULONG, - CreateOptions: ULONG, - EaBuffer: PVOID, - EaLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtDeviceIoControlFile( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - IoControlCode: ULONG, - InputBuffer: PVOID, - InputBufferLength: ULONG, - OutputBuffer: PVOID, - OutputBufferLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtFsControlFile( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - FsControlCode: ULONG, - InputBuffer: PVOID, - InputBufferLength: ULONG, - OutputBuffer: PVOID, - OutputBufferLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtLockFile( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - ByteOffset: PLARGE_INTEGER, - Length: PLARGE_INTEGER, - Key: ULONG, - FailImmediately: BOOLEAN, - ExclusiveLock: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtOpenFile( - FileHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - IoStatusBlock: PIO_STATUS_BLOCK, - ShareAccess: ULONG, - OpenOptions: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQueryDirectoryFile( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - FileInformation: PVOID, - Length: ULONG, - FileInformationClass: FILE_INFORMATION_CLASS, - ReturnSingleEntry: BOOLEAN, - FileName: PUNICODE_STRING, - RestartScan: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQueryDirectoryFileEx( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - FileInformation: PVOID, - Length: ULONG, - FileInformationClass: FILE_INFORMATION_CLASS, - QueryFlags: ULONG, - FileName: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQueryInformationByName( - ObjectAttributes: POBJECT_ATTRIBUTES, - IoStatusBlock: PIO_STATUS_BLOCK, - FileInformation: PVOID, - Length: ULONG, - FileInformationClass: FILE_INFORMATION_CLASS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQueryInformationFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - FileInformation: PVOID, - Length: ULONG, - FileInformationClass: FILE_INFORMATION_CLASS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQueryQuotaInformationFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - Buffer: PVOID, - Length: ULONG, - ReturnSingleEntry: BOOLEAN, - SidList: PVOID, - SidListLength: ULONG, - StartSid: PSID, - RestartScan: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQueryVolumeInformationFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - FsInformation: PVOID, - Length: ULONG, - FsInformationClass: FS_INFORMATION_CLASS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtReadFile( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - Buffer: PVOID, - Length: ULONG, - ByteOffset: PLARGE_INTEGER, - Key: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtSetInformationFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - FileInformation: PVOID, - Length: ULONG, - FileInformationClass: FILE_INFORMATION_CLASS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtSetQuotaInformationFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - Buffer: PVOID, - Length: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtSetVolumeInformationFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - FsInformation: PVOID, - Length: ULONG, - FsInformationClass: FS_INFORMATION_CLASS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtWriteFile( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - Buffer: PVOID, - Length: ULONG, - ByteOffset: PLARGE_INTEGER, - Key: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtUnlockFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - ByteOffset: PLARGE_INTEGER, - Length: PLARGE_INTEGER, - Key: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtFlushBuffersFileEx( - FileHandle: HANDLE, - Flags: ULONG, - Parameters: PVOID, - ParametersSize: ULONG, - IoStatusBlock: PIO_STATUS_BLOCK, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtCopyFileChunk( - SourceHandle: HANDLE, - DestHandle: HANDLE, - Event: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - Length: ULONG, - SourceOffset: PLARGE_INTEGER, - DestOffset: PLARGE_INTEGER, - SourceKey: PULONG, - DestKey: PULONG, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQueryObject( - Handle: HANDLE, - ObjectInformationClass: OBJECT_INFORMATION_CLASS, - ObjectInformation: PVOID, - ObjectInformationLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtSetSecurityObject( - Handle: HANDLE, - SecurityInformation: SECURITY_INFORMATION, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQuerySecurityObject( - Handle: HANDLE, - SecurityInformation: SECURITY_INFORMATION, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - Length: ULONG, - LengthNeeded: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtClose(Handle: HANDLE) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtCreateSection( - SectionHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - MaximumSize: PLARGE_INTEGER, - SectionPageProtection: ULONG, - AllocationAttributes: ULONG, - FileHandle: HANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtCreateSectionEx( - SectionHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - MaximumSize: PLARGE_INTEGER, - SectionPageProtection: ULONG, - AllocationAttributes: ULONG, - FileHandle: HANDLE, - ExtendedParameters: PMEM_EXTENDED_PARAMETER, - ExtendedParameterCount: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtAllocateVirtualMemory( - ProcessHandle: HANDLE, - BaseAddress: *mut PVOID, - ZeroBits: ULONG_PTR, - RegionSize: PSIZE_T, - AllocationType: ULONG, - Protect: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtFreeVirtualMemory( - ProcessHandle: HANDLE, - BaseAddress: *mut PVOID, - RegionSize: PSIZE_T, - FreeType: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtQueryVirtualMemory( - ProcessHandle: HANDLE, - BaseAddress: PVOID, - MemoryInformationClass: MEMORY_INFORMATION_CLASS, - MemoryInformation: PVOID, - MemoryInformationLength: SIZE_T, - ReturnLength: PSIZE_T, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn NtSetInformationVirtualMemory( - ProcessHandle: HANDLE, - VmInformationClass: VIRTUAL_MEMORY_INFORMATION_CLASS, - NumberOfEntries: ULONG_PTR, - VirtualAddresses: PMEMORY_RANGE_ENTRY, - VmInformation: PVOID, - VmInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn KeInitializeMutant(Mutant: PRKMUTANT, InitialOwner: BOOLEAN); -} -extern "C" { - pub fn KeQueryOwnerMutant(Mutant: PKMUTANT, ClientId: PCLIENT_ID); -} -extern "C" { - pub fn KeReadStateMutant(Mutant: PRKMUTANT) -> LONG; -} -extern "C" { - pub fn KeReleaseMutant( - Mutant: PRKMUTANT, - Increment: KPRIORITY, - Abandoned: BOOLEAN, - Wait: BOOLEAN, - ) -> LONG; -} -extern "C" { - pub fn KeInitializeQueue(Queue: PRKQUEUE, Count: ULONG); -} -extern "C" { - pub fn KeReadStateQueue(Queue: PRKQUEUE) -> LONG; -} -extern "C" { - pub fn KeInsertQueue(Queue: PRKQUEUE, Entry: PLIST_ENTRY) -> LONG; -} -extern "C" { - pub fn KeInsertHeadQueue(Queue: PRKQUEUE, Entry: PLIST_ENTRY) -> LONG; -} -extern "C" { - pub fn KeRemoveQueue( - Queue: PRKQUEUE, - WaitMode: KPROCESSOR_MODE, - Timeout: PLARGE_INTEGER, - ) -> PLIST_ENTRY; -} -extern "C" { - pub fn KeRemoveQueueEx( - Queue: PKQUEUE, - WaitMode: KPROCESSOR_MODE, - Alertable: BOOLEAN, - Timeout: PLARGE_INTEGER, - EntryArray: *mut PLIST_ENTRY, - Count: ULONG, - ) -> ULONG; -} -extern "C" { - pub fn KeRundownQueue(Queue: PRKQUEUE) -> PLIST_ENTRY; -} -extern "C" { - pub fn KeAttachProcess(Process: PRKPROCESS); -} -extern "C" { - pub fn KeDetachProcess(); -} -extern "C" { - pub fn KeStackAttachProcess(PROCESS: PRKPROCESS, ApcState: PRKAPC_STATE); -} -extern "C" { - pub fn KeUnstackDetachProcess(ApcState: PRKAPC_STATE); -} -extern "C" { - pub fn KeSetIdealProcessorThread(Thread: PKTHREAD, Processor: UCHAR) -> UCHAR; -} -extern "C" { - pub fn KeSetKernelStackSwapEnable(Enable: BOOLEAN) -> BOOLEAN; -} -extern "C" { - pub fn KeAcquireQueuedSpinLock(Number: KSPIN_LOCK_QUEUE_NUMBER) -> KIRQL; -} -extern "C" { - pub fn KeReleaseQueuedSpinLock(Number: KSPIN_LOCK_QUEUE_NUMBER, OldIrql: KIRQL); -} -extern "C" { - pub fn KeTryToAcquireQueuedSpinLock( - Number: KSPIN_LOCK_QUEUE_NUMBER, - OldIrql: PKIRQL, - ) -> LOGICAL; -} -extern "C" { - pub fn KeAcquireSpinLockRaiseToSynch(SpinLock: PKSPIN_LOCK) -> KIRQL; -} -extern "C" { - pub fn ExQueryPoolBlockSize(PoolBlock: PVOID, QuotaCharged: PBOOLEAN) -> SIZE_T; -} -extern "C" { - pub fn InterlockedPushListSList( - ListHead: PSLIST_HEADER, - List: PSLIST_ENTRY, - ListEnd: PSLIST_ENTRY, - Count: ULONG, - ) -> PSLIST_ENTRY; -} -extern "C" { - pub fn ExAdjustLookasideDepth(); -} -extern "C" { - pub fn ExDisableResourceBoostLite(Resource: PERESOURCE); -} -extern "C" { - pub fn SeDeleteClientSecurity(ClientContext: PSECURITY_CLIENT_CONTEXT); -} -extern "C" { - pub fn SeCaptureSubjectContextEx( - Thread: PETHREAD, - Process: PEPROCESS, - SubjectContext: PSECURITY_SUBJECT_CONTEXT, - ); -} -extern "C" { - #[must_use] - pub fn SeReportSecurityEventWithSubCategory( - Flags: ULONG, - SourceName: PUNICODE_STRING, - UserSid: PSID, - AuditParameters: PSE_ADT_PARAMETER_ARRAY, - AuditSubcategoryId: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn SeAccessCheckFromState( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - PrimaryTokenInformation: PTOKEN_ACCESS_INFORMATION, - ClientTokenInformation: PTOKEN_ACCESS_INFORMATION, - DesiredAccess: ACCESS_MASK, - PreviouslyGrantedAccess: ACCESS_MASK, - Privileges: *mut PPRIVILEGE_SET, - GenericMapping: PGENERIC_MAPPING, - AccessMode: KPROCESSOR_MODE, - GrantedAccess: PACCESS_MASK, - AccessStatus: PNTSTATUS, - ) -> BOOLEAN; -} -extern "C" { - pub fn SeAccessCheckFromStateEx( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - PrimaryToken: PACCESS_TOKEN, - ClientToken: PACCESS_TOKEN, - DesiredAccess: ACCESS_MASK, - PreviouslyGrantedAccess: ACCESS_MASK, - Privileges: *mut PPRIVILEGE_SET, - GenericMapping: PGENERIC_MAPPING, - AccessMode: KPROCESSOR_MODE, - GrantedAccess: PACCESS_MASK, - AccessStatus: PNTSTATUS, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn SeTokenFromAccessInformation( - AccessInformation: PTOKEN_ACCESS_INFORMATION, - Token: PACCESS_TOKEN, - Length: ULONG, - RequiredLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn SePrivilegeCheck( - RequiredPrivileges: PPRIVILEGE_SET, - SubjectSecurityContext: PSECURITY_SUBJECT_CONTEXT, - AccessMode: KPROCESSOR_MODE, - ) -> BOOLEAN; -} -extern "C" { - pub fn SeFreePrivileges(Privileges: PPRIVILEGE_SET); -} -extern "C" { - pub fn SeOpenObjectAuditAlarm( - ObjectTypeName: PUNICODE_STRING, - Object: PVOID, - AbsoluteObjectName: PUNICODE_STRING, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - AccessState: PACCESS_STATE, - ObjectCreated: BOOLEAN, - AccessGranted: BOOLEAN, - AccessMode: KPROCESSOR_MODE, - GenerateOnClose: PBOOLEAN, - ); -} -extern "C" { - pub fn SeOpenObjectAuditAlarmWithTransaction( - ObjectTypeName: PUNICODE_STRING, - Object: PVOID, - AbsoluteObjectName: PUNICODE_STRING, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - AccessState: PACCESS_STATE, - ObjectCreated: BOOLEAN, - AccessGranted: BOOLEAN, - AccessMode: KPROCESSOR_MODE, - TransactionId: *mut GUID, - GenerateOnClose: PBOOLEAN, - ); -} -extern "C" { - pub fn SeOpenObjectForDeleteAuditAlarm( - ObjectTypeName: PUNICODE_STRING, - Object: PVOID, - AbsoluteObjectName: PUNICODE_STRING, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - AccessState: PACCESS_STATE, - ObjectCreated: BOOLEAN, - AccessGranted: BOOLEAN, - AccessMode: KPROCESSOR_MODE, - GenerateOnClose: PBOOLEAN, - ); -} -extern "C" { - pub fn SeOpenObjectForDeleteAuditAlarmWithTransaction( - ObjectTypeName: PUNICODE_STRING, - Object: PVOID, - AbsoluteObjectName: PUNICODE_STRING, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - AccessState: PACCESS_STATE, - ObjectCreated: BOOLEAN, - AccessGranted: BOOLEAN, - AccessMode: KPROCESSOR_MODE, - TransactionId: *mut GUID, - GenerateOnClose: PBOOLEAN, - ); -} -extern "C" { - pub fn SeExamineSacl( - Sacl: PACL, - ResourceSacl: PACL, - Token: PACCESS_TOKEN, - DesiredAccess: ACCESS_MASK, - AccessGranted: BOOLEAN, - GenerateAudit: PBOOLEAN, - GenerateAlarm: PBOOLEAN, - ); -} -extern "C" { - pub fn SeDeleteObjectAuditAlarm(Object: PVOID, Handle: HANDLE); -} -extern "C" { - pub fn SeDeleteObjectAuditAlarmWithTransaction( - Object: PVOID, - Handle: HANDLE, - TransactionId: *mut GUID, - ); -} -extern "C" { - pub fn SeTokenType(Token: PACCESS_TOKEN) -> TOKEN_TYPE; -} -extern "C" { - pub fn SeTokenIsAdmin(Token: PACCESS_TOKEN) -> BOOLEAN; -} -extern "C" { - pub fn SeTokenIsRestricted(Token: PACCESS_TOKEN) -> BOOLEAN; -} -extern "C" { - pub fn SeTokenIsWriteRestricted(Token: PACCESS_TOKEN) -> BOOLEAN; -} -extern "C" { - pub fn SeTokenIsNoChildProcessRestrictionEnforced( - Token: PACCESS_TOKEN, - UnlessSecure: PBOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - pub fn SeTokenSetNoChildProcessRestricted( - Token: PACCESS_TOKEN, - UnlessSecure: BOOLEAN, - AuditOnly: BOOLEAN, - ); -} -extern "C" { - pub fn SeTokenGetNoChildProcessRestricted( - Token: PACCESS_TOKEN, - Enforced: PBOOLEAN, - UnlessSecure: PBOOLEAN, - AuditOnly: PBOOLEAN, - ); -} -extern "C" { - pub fn SeTokenSetRedirectionTrustPolicy(Token: PACCESS_TOKEN, AuditOnly: BOOLEAN); -} -extern "C" { - pub fn SeTokenGetRedirectionTrustPolicy( - Token: PACCESS_TOKEN, - Enforced: PBOOLEAN, - AuditOnly: PBOOLEAN, - ); -} -extern "C" { - #[must_use] - pub fn SeFilterToken( - ExistingToken: PACCESS_TOKEN, - Flags: ULONG, - SidsToDisable: PTOKEN_GROUPS, - PrivilegesToDelete: PTOKEN_PRIVILEGES, - RestrictedSids: PTOKEN_GROUPS, - FilteredToken: *mut PACCESS_TOKEN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeQueryAuthenticationIdToken( - Token: PACCESS_TOKEN, - AuthenticationId: PLUID, - ) -> NTSTATUS; -} -extern "C" { - pub fn SeQueryTokenIntegrity(Token: PACCESS_TOKEN, IntegritySA: PSID_AND_ATTRIBUTES); -} -extern "C" { - #[must_use] - pub fn SeQuerySessionIdToken(Token: PACCESS_TOKEN, SessionId: PULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeQuerySessionIdTokenEx( - Token: PACCESS_TOKEN, - SessionId: PULONG, - IsServiceSession: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeQueryServerSiloToken( - Token: PACCESS_TOKEN, - pServerSilo: *mut PESILO, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeSetSessionIdToken(Token: PACCESS_TOKEN, SessionId: ULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeCreateClientSecurity( - ClientThread: PETHREAD, - ClientSecurityQos: PSECURITY_QUALITY_OF_SERVICE, - RemoteSession: BOOLEAN, - ClientContext: PSECURITY_CLIENT_CONTEXT, - ) -> NTSTATUS; -} -extern "C" { - pub fn SeImpersonateClient( - ClientContext: PSECURITY_CLIENT_CONTEXT, - ServerThread: PETHREAD, - ); -} -extern "C" { - #[must_use] - pub fn SeImpersonateClientEx( - ClientContext: PSECURITY_CLIENT_CONTEXT, - ServerThread: PETHREAD, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeCreateClientSecurityFromSubjectContext( - SubjectContext: PSECURITY_SUBJECT_CONTEXT, - ClientSecurityQos: PSECURITY_QUALITY_OF_SERVICE, - ServerIsRemote: BOOLEAN, - ClientContext: PSECURITY_CLIENT_CONTEXT, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeQuerySecurityDescriptorInfo( - SecurityInformation: PSECURITY_INFORMATION, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - Length: PULONG, - ObjectsSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeSetSecurityDescriptorInfo( - Object: PVOID, - SecurityInformation: PSECURITY_INFORMATION, - ModificationDescriptor: PSECURITY_DESCRIPTOR, - ObjectsSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, - PoolType: POOL_TYPE, - GenericMapping: PGENERIC_MAPPING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeSetSecurityDescriptorInfoEx( - Object: PVOID, - SecurityInformation: PSECURITY_INFORMATION, - ModificationDescriptor: PSECURITY_DESCRIPTOR, - ObjectsSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, - AutoInheritFlags: ULONG, - PoolType: POOL_TYPE, - GenericMapping: PGENERIC_MAPPING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeAppendPrivileges( - AccessState: PACCESS_STATE, - Privileges: PPRIVILEGE_SET, - ) -> NTSTATUS; -} -extern "C" { - pub fn SeAuditHardLinkCreation( - FileName: PUNICODE_STRING, - LinkName: PUNICODE_STRING, - bSuccess: BOOLEAN, - ); -} -extern "C" { - pub fn SeAuditHardLinkCreationWithTransaction( - FileName: PUNICODE_STRING, - LinkName: PUNICODE_STRING, - bSuccess: BOOLEAN, - TransactionId: *mut GUID, - ); -} -extern "C" { - pub fn SeAuditFipsCryptoSelftests(bSuccess: BOOLEAN, SelftestCode: ULONG); -} -extern "C" { - pub fn SeAuditTransactionStateChange( - TransactionId: *mut GUID, - ResourceManagerId: *mut GUID, - NewTransactionState: ULONG, - ); -} -extern "C" { - pub fn SeAuditingFileEvents( - AccessGranted: BOOLEAN, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - ) -> BOOLEAN; -} -extern "C" { - pub fn SeAuditingFileEventsWithContext( - AccessGranted: BOOLEAN, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - SubjectSecurityContext: PSECURITY_SUBJECT_CONTEXT, - ) -> BOOLEAN; -} -extern "C" { - pub fn SeAuditingAnyFileEventsWithContext( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - SubjectSecurityContext: PSECURITY_SUBJECT_CONTEXT, - ) -> BOOLEAN; -} -extern "C" { - pub fn SeAuditingFileEventsWithContextEx( - AccessGranted: BOOLEAN, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - SubjectSecurityContext: PSECURITY_SUBJECT_CONTEXT, - StagingEnabled: PBOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - pub fn SeAuditingAnyFileEventsWithContextEx( - SecurityDescriptor: PSECURITY_DESCRIPTOR, - SubjectSecurityContext: PSECURITY_SUBJECT_CONTEXT, - StagingEnabled: PBOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - pub fn SeAdjustAccessStateForTrustLabel( - ObjectType: PVOID, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - AccessState: PACCESS_STATE, - ); -} -extern "C" { - pub fn SeAdjustAccessStateForAccessConstraints( - ObjectType: PVOID, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - AccessState: PACCESS_STATE, - ); -} -extern "C" { - pub fn SeShouldCheckForAccessRightsFromParent( - ObjectType: PVOID, - ChildDescriptor: PSECURITY_DESCRIPTOR, - AccessState: PACCESS_STATE, - ) -> BOOLEAN; -} -extern "C" { - pub fn SeAuditingHardLinkEvents( - AccessGranted: BOOLEAN, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - ) -> BOOLEAN; -} -extern "C" { - pub fn SeAuditingHardLinkEventsWithContext( - AccessGranted: BOOLEAN, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - SubjectSecurityContext: PSECURITY_SUBJECT_CONTEXT, - ) -> BOOLEAN; -} -extern "C" { - pub fn SeAuditingFileOrGlobalEvents( - AccessGranted: BOOLEAN, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - SubjectSecurityContext: PSECURITY_SUBJECT_CONTEXT, - ) -> BOOLEAN; -} -extern "C" { - pub fn SeSetAccessStateGenericMapping( - AccessState: PACCESS_STATE, - GenericMapping: PGENERIC_MAPPING, - ); -} -extern "C" { - #[must_use] - pub fn SeRegisterLogonSessionTerminatedRoutine( - CallbackRoutine: PSE_LOGON_SESSION_TERMINATED_ROUTINE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeUnregisterLogonSessionTerminatedRoutine( - CallbackRoutine: PSE_LOGON_SESSION_TERMINATED_ROUTINE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeRegisterLogonSessionTerminatedRoutineEx( - CallbackRoutine: PSE_LOGON_SESSION_TERMINATED_ROUTINE_EX, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeUnregisterLogonSessionTerminatedRoutineEx( - CallbackRoutine: PSE_LOGON_SESSION_TERMINATED_ROUTINE_EX, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeMarkLogonSessionForTerminationNotification(LogonId: PLUID) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeMarkLogonSessionForTerminationNotificationEx( - LogonId: PLUID, - pServerSilo: PESILO, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeQueryInformationToken( - Token: PACCESS_TOKEN, - TokenInformationClass: TOKEN_INFORMATION_CLASS, - TokenInformation: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SeLocateProcessImageName( - Process: PEPROCESS, - pImageFileName: *mut PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - pub fn SeExamineGlobalSacl( - ObjectType: PUNICODE_STRING, - ResourceSacl: PACL, - Token: PACCESS_TOKEN, - DesiredAccess: ACCESS_MASK, - AccessGranted: BOOLEAN, - GenerateAudit: PBOOLEAN, - GenerateAlarm: PBOOLEAN, - ); -} -extern "C" { - pub fn SeMaximumAuditMaskFromGlobalSacl( - ObjectTypeName: PUNICODE_STRING, - GrantedAccess: ACCESS_MASK, - Token: PACCESS_TOKEN, - AuditMask: PACCESS_MASK, - ); -} -extern "C" { - pub fn RtlIsSandboxedTokenHandle( - TokenHandle: HANDLE, - PreviousMode: KPROCESSOR_MODE, - ) -> BOOLEAN; -} -extern "C" { - pub fn RtlIsSandboxedToken( - Context: PSECURITY_SUBJECT_CONTEXT, - PreviousMode: KPROCESSOR_MODE, - ) -> BOOLEAN; -} -extern "C" { - pub fn SeCheckForCriticalAceRemoval( - CurrentDescriptor: PSECURITY_DESCRIPTOR, - NewDescriptor: PSECURITY_DESCRIPTOR, - SubjectSecurityContext: PSECURITY_SUBJECT_CONTEXT, - AceRemoved: PBOOLEAN, - ); -} -extern "C" { - #[must_use] - pub fn SeAdjustObjectSecurity( - ObjectName: PUNICODE_STRING, - OriginalDescriptor: PSECURITY_DESCRIPTOR, - ProposedDescriptor: PSECURITY_DESCRIPTOR, - SubjectSecurityContext: PSECURITY_SUBJECT_CONTEXT, - AdjustedDescriptor: *mut PSECURITY_DESCRIPTOR, - ApplyAdjustedDescriptor: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsAssignImpersonationToken(Thread: PETHREAD, Token: HANDLE) -> NTSTATUS; -} -extern "C" { - pub fn PsReferencePrimaryToken(Process: PEPROCESS) -> PACCESS_TOKEN; -} -extern "C" { - pub fn PsDereferencePrimaryToken(PrimaryToken: PACCESS_TOKEN); -} -extern "C" { - pub fn PsDereferenceImpersonationToken(ImpersonationToken: PACCESS_TOKEN); -} -extern "C" { - pub fn PsReferenceImpersonationToken( - Thread: PETHREAD, - CopyOnOpen: PBOOLEAN, - EffectiveOnly: PBOOLEAN, - ImpersonationLevel: PSECURITY_IMPERSONATION_LEVEL, - ) -> PACCESS_TOKEN; -} -extern "C" { - pub fn PsGetProcessExitTime() -> LARGE_INTEGER; -} -extern "C" { - pub fn PsIsThreadTerminating(Thread: PETHREAD) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn PsImpersonateClient( - Thread: PETHREAD, - Token: PACCESS_TOKEN, - CopyOnOpen: BOOLEAN, - EffectiveOnly: BOOLEAN, - ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, - ) -> NTSTATUS; -} -extern "C" { - pub fn PsDisableImpersonation( - Thread: PETHREAD, - ImpersonationState: PSE_IMPERSONATION_STATE, - ) -> BOOLEAN; -} -extern "C" { - pub fn PsRestoreImpersonation( - Thread: PETHREAD, - ImpersonationState: PSE_IMPERSONATION_STATE, - ); -} -extern "C" { - pub fn PsRevertToSelf(); -} -extern "C" { - #[must_use] - pub fn PsLookupProcessByProcessId( - ProcessId: HANDLE, - Process: *mut PEPROCESS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PsLookupThreadByThreadId(ThreadId: HANDLE, Thread: *mut PETHREAD) -> NTSTATUS; -} -extern "C" { - pub fn PsChargePoolQuota(Process: PEPROCESS, PoolType: POOL_TYPE, Amount: ULONG_PTR); -} -extern "C" { - #[must_use] - pub fn PsChargeProcessPoolQuota( - Process: PEPROCESS, - PoolType: POOL_TYPE, - Amount: ULONG_PTR, - ) -> NTSTATUS; -} -extern "C" { - pub fn PsReturnPoolQuota(Process: PEPROCESS, PoolType: POOL_TYPE, Amount: ULONG_PTR); -} -extern "C" { - pub fn PsGetThreadProcess(Thread: PETHREAD) -> PEPROCESS; -} -extern "C" { - pub fn PsIsSystemThread(Thread: PETHREAD) -> BOOLEAN; -} -extern "C" { - pub fn PsUpdateDiskCounters( - Process: PEPROCESS, - BytesRead: ULONG64, - BytesWritten: ULONG64, - ReadOperationCount: ULONG, - WriteOperationCount: ULONG, - FlushOperationCount: ULONG, - ); -} -extern "C" { - pub fn PsIsDiskCountersEnabled() -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn FsRtlRegisterFileSystemFilterCallbacks( - FilterDriverObject: *mut _DRIVER_OBJECT, - Callbacks: PFS_FILTER_CALLBACKS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlNotifyStreamFileObject( - StreamFileObject: *mut _FILE_OBJECT, - DeviceObjectHint: *mut _DEVICE_OBJECT, - NotificationType: FS_FILTER_STREAM_FO_NOTIFICATION_TYPE, - SafeToRecurse: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoAcquireVpbSpinLock(Irql: PKIRQL); -} -extern "C" { - #[must_use] - pub fn IoCheckDesiredAccess( - DesiredAccess: PACCESS_MASK, - GrantedAccess: ACCESS_MASK, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoCheckEaBufferValidity( - EaBuffer: PFILE_FULL_EA_INFORMATION, - EaLength: ULONG, - ErrorOffset: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoCheckFileObjectOpenedAsCopyDestination(FileObject: PFILE_OBJECT) -> BOOLEAN; -} -extern "C" { - pub fn IoCheckFileObjectOpenedAsCopySource(FileObject: PFILE_OBJECT) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn IoCheckFunctionAccess( - GrantedAccess: ACCESS_MASK, - MajorFunction: UCHAR, - MinorFunction: UCHAR, - IoControlCode: ULONG, - Arg1: PVOID, - Arg2: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoCheckQuerySetFileInformation( - FileInformationClass: FILE_INFORMATION_CLASS, - Length: ULONG, - SetOperation: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoCheckQuerySetVolumeInformation( - FsInformationClass: FS_INFORMATION_CLASS, - Length: ULONG, - SetOperation: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoCheckQuotaBufferValidity( - QuotaBuffer: PFILE_QUOTA_INFORMATION, - QuotaLength: ULONG, - ErrorOffset: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoCreateStreamFileObject( - FileObject: PFILE_OBJECT, - DeviceObject: PDEVICE_OBJECT, - ) -> PFILE_OBJECT; -} -extern "C" { - pub fn IoCreateStreamFileObjectEx( - FileObject: PFILE_OBJECT, - DeviceObject: PDEVICE_OBJECT, - FileHandle: PHANDLE, - ) -> PFILE_OBJECT; -} -extern "C" { - pub fn IoCreateStreamFileObjectLite( - FileObject: PFILE_OBJECT, - DeviceObject: PDEVICE_OBJECT, - ) -> PFILE_OBJECT; -} -extern "C" { - #[must_use] - pub fn IoCreateStreamFileObjectEx2( - CreateOptions: PIO_CREATE_STREAM_FILE_OPTIONS, - FileObject: PFILE_OBJECT, - DeviceObject: PDEVICE_OBJECT, - StreamFileObject: *mut PFILE_OBJECT, - FileHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoFastQueryNetworkAttributes( - ObjectAttributes: POBJECT_ATTRIBUTES, - DesiredAccess: ACCESS_MASK, - OpenOptions: ULONG, - IoStatus: PIO_STATUS_BLOCK, - Buffer: PFILE_NETWORK_OPEN_INFORMATION, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn IoPageRead( - FileObject: PFILE_OBJECT, - MemoryDescriptorList: PMDL, - StartingOffset: PLARGE_INTEGER, - Event: PKEVENT, - IoStatusBlock: PIO_STATUS_BLOCK, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoGetAttachedDevice(DeviceObject: PDEVICE_OBJECT) -> PDEVICE_OBJECT; -} -extern "C" { - pub fn IoGetBaseFileSystemDeviceObject(FileObject: PFILE_OBJECT) -> PDEVICE_OBJECT; -} -extern "C" { - pub fn IoGetDeviceToVerify(Thread: PETHREAD) -> PDEVICE_OBJECT; -} -extern "C" { - pub fn IoGetRequestorProcessId(Irp: PIRP) -> ULONG; -} -extern "C" { - pub fn IoGetRequestorProcess(Irp: PIRP) -> PEPROCESS; -} -extern "C" { - pub fn IoIsOperationSynchronous(Irp: PIRP) -> BOOLEAN; -} -extern "C" { - pub fn IoIsSystemThread(Thread: PETHREAD) -> BOOLEAN; -} -extern "C" { - pub fn IoIsValidNameGraftingBuffer( - Irp: PIRP, - ReparseBuffer: PREPARSE_DATA_BUFFER, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn IoQueryFileDosDeviceName( - FileObject: PFILE_OBJECT, - ObjectNameInformation: *mut POBJECT_NAME_INFORMATION, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoQueryFileInformation( - FileObject: PFILE_OBJECT, - FileInformationClass: FILE_INFORMATION_CLASS, - Length: ULONG, - FileInformation: PVOID, - ReturnedLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoQueryVolumeInformation( - FileObject: PFILE_OBJECT, - FsInformationClass: FS_INFORMATION_CLASS, - Length: ULONG, - FsInformation: PVOID, - ReturnedLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoQueueThreadIrp(Irp: PIRP); -} -extern "C" { - pub fn IoRegisterFileSystem(DeviceObject: PDEVICE_OBJECT); -} -extern "C" { - #[must_use] - pub fn IoRegisterFsRegistrationChange( - DriverObject: PDRIVER_OBJECT, - DriverNotificationRoutine: PDRIVER_FS_NOTIFICATION, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoRegisterFsRegistrationChangeMountAware( - DriverObject: PDRIVER_OBJECT, - DriverNotificationRoutine: PDRIVER_FS_NOTIFICATION, - SynchronizeWithMounts: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoEnumerateRegisteredFiltersList( - DriverObjectList: *mut PDRIVER_OBJECT, - DriverObjectListSize: ULONG, - ActualNumberDriverObjects: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoReplaceFileObjectName( - FileObject: PFILE_OBJECT, - NewFileName: PWSTR, - FileNameLength: USHORT, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoReleaseVpbSpinLock(Irql: KIRQL); -} -extern "C" { - pub fn IoSetDeviceToVerify(Thread: PETHREAD, DeviceObject: PDEVICE_OBJECT); -} -extern "C" { - #[must_use] - pub fn IoSetInformation( - FileObject: PFILE_OBJECT, - FileInformationClass: FILE_INFORMATION_CLASS, - Length: ULONG, - FileInformation: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoSynchronousPageWrite( - FileObject: PFILE_OBJECT, - MemoryDescriptorList: PMDL, - StartingOffset: PLARGE_INTEGER, - Event: PKEVENT, - IoStatusBlock: PIO_STATUS_BLOCK, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoThreadToProcess(Thread: PETHREAD) -> PEPROCESS; -} -extern "C" { - pub fn IoUnregisterFileSystem(DeviceObject: PDEVICE_OBJECT); -} -extern "C" { - pub fn IoUnregisterFsRegistrationChange( - DriverObject: PDRIVER_OBJECT, - DriverNotificationRoutine: PDRIVER_FS_NOTIFICATION, - ); -} -extern "C" { - #[must_use] - pub fn IoVerifyVolume( - DeviceObject: PDEVICE_OBJECT, - AllowRawMount: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetRequestorSessionId(Irp: PIRP, pSessionId: PULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoEnumerateDeviceObjectList( - DriverObject: PDRIVER_OBJECT, - DeviceObjectList: *mut PDEVICE_OBJECT, - DeviceObjectListSize: ULONG, - ActualNumberDeviceObjects: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn IoGetLowerDeviceObject(DeviceObject: PDEVICE_OBJECT) -> PDEVICE_OBJECT; -} -extern "C" { - pub fn IoGetDeviceAttachmentBaseRef(DeviceObject: PDEVICE_OBJECT) -> PDEVICE_OBJECT; -} -extern "C" { - #[must_use] - pub fn IoGetDiskDeviceObject( - FileSystemDeviceObject: PDEVICE_OBJECT, - DiskDeviceObject: *mut PDEVICE_OBJECT, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoRetrievePriorityInfo( - Irp: PIRP, - FileObject: PFILE_OBJECT, - Thread: PETHREAD, - PriorityInfo: PIO_PRIORITY_INFO, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoApplyPriorityInfoThread( - InputPriorityInfo: PIO_PRIORITY_INFO, - OutputPriorityInfo: PIO_PRIORITY_INFO, - Thread: PETHREAD, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoGetFsTrackOffsetState( - Irp: PIRP, - RetFsTrackOffsetBlob: *mut PIO_IRP_EXT_TRACK_OFFSET_HEADER, - RetTrackedOffset: *mut LONGLONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoSetFsTrackOffsetState( - Irp: PIRP, - FsTrackOffsetBlob: PIO_IRP_EXT_TRACK_OFFSET_HEADER, - TrackedOffset: LONGLONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoClearFsTrackOffsetState(Irp: PIRP) -> NTSTATUS; -} -extern "C" { - pub fn IoIrpHasFsTrackOffsetExtensionType(Irp: PIRP) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn IoGetCopyInformationExtension( - Irp: PIRP, - CopyInformation: PCOPY_INFORMATION, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn PoQueueShutdownWorkItem(WorkItem: PWORK_QUEUE_ITEM) -> NTSTATUS; -} -extern "C" { - pub fn MmIsRecursiveIoFault() -> BOOLEAN; -} -extern "C" { - pub fn MmForceSectionClosed( - SectionObjectPointer: PSECTION_OBJECT_POINTERS, - DelayClose: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - pub fn MmForceSectionClosedEx( - SectionObjectPointer: PSECTION_OBJECT_POINTERS, - ForceCloseFlags: ULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn MmGetMaximumFileSectionSize() -> ULONGLONG; -} -extern "C" { - pub fn MmFlushImageSection( - SectionObjectPointer: PSECTION_OBJECT_POINTERS, - FlushType: MMFLUSH_TYPE, - ) -> BOOLEAN; -} -extern "C" { - pub fn MmCanFileBeTruncated( - SectionPointer: PSECTION_OBJECT_POINTERS, - NewFileSize: PLARGE_INTEGER, - ) -> BOOLEAN; -} -extern "C" { - pub fn MmSetAddressRangeModified(Address: PVOID, Length: SIZE_T) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn MmIsFileSectionActive( - FsSectionPointer: PSECTION_OBJECT_POINTERS, - Flags: ULONG, - SectionIsActive: PLOGICAL, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MmPrefetchPages(NumberOfLists: ULONG, ReadLists: *mut PREAD_LIST) -> NTSTATUS; -} -extern "C" { - pub fn MmDoesFileHaveUserWritableReferences( - SectionPointer: PSECTION_OBJECT_POINTERS, - ) -> ULONG; -} -extern "C" { - pub fn MmMdlPagesAreZero(Mdl: PMDL) -> LOGICAL; -} -extern "C" { - #[must_use] - pub fn ObInsertObject( - Object: PVOID, - PassedAccessState: PACCESS_STATE, - DesiredAccess: ACCESS_MASK, - ObjectPointerBias: ULONG, - NewObject: *mut PVOID, - Handle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ObOpenObjectByPointer( - Object: PVOID, - HandleAttributes: ULONG, - PassedAccessState: PACCESS_STATE, - DesiredAccess: ACCESS_MASK, - ObjectType: POBJECT_TYPE, - AccessMode: KPROCESSOR_MODE, - Handle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ObOpenObjectByPointerWithTag( - Object: PVOID, - HandleAttributes: ULONG, - PassedAccessState: PACCESS_STATE, - DesiredAccess: ACCESS_MASK, - ObjectType: POBJECT_TYPE, - AccessMode: KPROCESSOR_MODE, - Tag: ULONG, - Handle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - pub fn ObMakeTemporaryObject(Object: PVOID); -} -extern "C" { - #[must_use] - pub fn ObQueryNameString( - Object: PVOID, - ObjectNameInfo: POBJECT_NAME_INFORMATION, - Length: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn ObIsKernelHandle(Handle: HANDLE) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn ObQueryObjectAuditingByHandle( - Handle: HANDLE, - GenerateOnClose: PBOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn IoRequestDeviceRemovalForReset( - PhysicalDeviceObject: PDEVICE_OBJECT, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlCopyRead( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Wait: BOOLEAN, - LockKey: ULONG, - Buffer: PVOID, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: PDEVICE_OBJECT, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlCopyWrite( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Wait: BOOLEAN, - LockKey: ULONG, - Buffer: PVOID, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: PDEVICE_OBJECT, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn FsRtlMdlReadEx( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - LockKey: ULONG, - MdlChain: *mut PMDL, - IoStatus: PIO_STATUS_BLOCK, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlMdlReadDev( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - LockKey: ULONG, - MdlChain: *mut PMDL, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: PDEVICE_OBJECT, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlMdlReadCompleteDev( - FileObject: PFILE_OBJECT, - MdlChain: PMDL, - DeviceObject: PDEVICE_OBJECT, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn FsRtlPrepareMdlWriteEx( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - LockKey: ULONG, - MdlChain: *mut PMDL, - IoStatus: PIO_STATUS_BLOCK, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlPrepareMdlWriteDev( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - LockKey: ULONG, - MdlChain: *mut PMDL, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: PDEVICE_OBJECT, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlMdlWriteCompleteDev( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - MdlChain: PMDL, - DeviceObject: PDEVICE_OBJECT, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlAcquireFileExclusive(FileObject: PFILE_OBJECT); -} -extern "C" { - pub fn FsRtlReleaseFile(FileObject: PFILE_OBJECT); -} -extern "C" { - #[must_use] - pub fn FsRtlGetFileSize( - FileObject: PFILE_OBJECT, - FileSize: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlAllocateFileLock( - CompleteLockIrpRoutine: PCOMPLETE_LOCK_IRP_ROUTINE, - UnlockRoutine: PUNLOCK_ROUTINE, - ) -> PFILE_LOCK; -} -extern "C" { - pub fn FsRtlFreeFileLock(FileLock: PFILE_LOCK); -} -extern "C" { - pub fn FsRtlInitializeFileLock( - FileLock: PFILE_LOCK, - CompleteLockIrpRoutine: PCOMPLETE_LOCK_IRP_ROUTINE, - UnlockRoutine: PUNLOCK_ROUTINE, - ); -} -extern "C" { - pub fn FsRtlUninitializeFileLock(FileLock: PFILE_LOCK); -} -extern "C" { - #[must_use] - pub fn FsRtlProcessFileLock( - FileLock: PFILE_LOCK, - Irp: PIRP, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlCheckLockForReadAccess(FileLock: PFILE_LOCK, Irp: PIRP) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlCheckLockForWriteAccess(FileLock: PFILE_LOCK, Irp: PIRP) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlCheckLockForOplockRequest( - FileLock: PFILE_LOCK, - AllocationSize: PLARGE_INTEGER, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlFastCheckLockForRead( - FileLock: PFILE_LOCK, - StartingByte: PLARGE_INTEGER, - Length: PLARGE_INTEGER, - Key: ULONG, - FileObject: PFILE_OBJECT, - ProcessId: PVOID, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlFastCheckLockForWrite( - FileLock: PFILE_LOCK, - StartingByte: PLARGE_INTEGER, - Length: PLARGE_INTEGER, - Key: ULONG, - FileObject: PVOID, - ProcessId: PVOID, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlGetNextFileLock( - FileLock: PFILE_LOCK, - Restart: BOOLEAN, - ) -> PFILE_LOCK_INFO; -} -extern "C" { - pub fn FsRtlAreThereCurrentOrInProgressFileLocks(FileLock: PFILE_LOCK) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlAreThereWaitingFileLocks(FileLock: PFILE_LOCK) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn FsRtlFastUnlockSingle( - FileLock: PFILE_LOCK, - FileObject: PFILE_OBJECT, - FileOffset: *mut LARGE_INTEGER, - Length: PLARGE_INTEGER, - ProcessId: PEPROCESS, - Key: ULONG, - Context: PVOID, - AlreadySynchronized: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlFastUnlockAll( - FileLock: PFILE_LOCK, - FileObject: PFILE_OBJECT, - ProcessId: PEPROCESS, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlFastUnlockAllByKey( - FileLock: PFILE_LOCK, - FileObject: PFILE_OBJECT, - ProcessId: PEPROCESS, - Key: ULONG, - Context: PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlPrivateLock( - FileLock: PFILE_LOCK, - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: PLARGE_INTEGER, - ProcessId: PEPROCESS, - Key: ULONG, - FailImmediately: BOOLEAN, - ExclusiveLock: BOOLEAN, - Iosb: PIO_STATUS_BLOCK, - Irp: PIRP, - Context: PVOID, - AlreadySynchronized: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlInitializeTunnelCache(Cache: *mut TUNNEL); -} -extern "C" { - pub fn FsRtlAddToTunnelCache( - Cache: *mut TUNNEL, - DirectoryKey: ULONGLONG, - ShortName: *mut UNICODE_STRING, - LongName: *mut UNICODE_STRING, - KeyByShortName: BOOLEAN, - DataLength: ULONG, - Data: *mut ::core::ffi::c_void, - ); -} -extern "C" { - pub fn FsRtlFindInTunnelCache( - Cache: *mut TUNNEL, - DirectoryKey: ULONGLONG, - Name: *mut UNICODE_STRING, - ShortName: *mut UNICODE_STRING, - LongName: *mut UNICODE_STRING, - DataLength: *mut ULONG, - Data: *mut ::core::ffi::c_void, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlAddToTunnelCacheEx( - Cache: *mut TUNNEL, - DirectoryKey: ULONGLONG, - ShortName: *mut UNICODE_STRING, - LongName: *mut UNICODE_STRING, - Flags: ULONG, - DataLength: ULONG, - Data: *mut ::core::ffi::c_void, - ); -} -extern "C" { - pub fn FsRtlFindInTunnelCacheEx( - Cache: *mut TUNNEL, - DirectoryKey: ULONGLONG, - Name: *mut UNICODE_STRING, - ShortName: *mut UNICODE_STRING, - LongName: *mut UNICODE_STRING, - Flags: ULONG, - DataLength: *mut ULONG, - Data: *mut ::core::ffi::c_void, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlDeleteKeyFromTunnelCache(Cache: *mut TUNNEL, DirectoryKey: ULONGLONG); -} -extern "C" { - pub fn FsRtlDeleteTunnelCache(Cache: *mut TUNNEL); -} -extern "C" { - pub fn FsRtlDissectDbcs( - Path: ANSI_STRING, - FirstName: PANSI_STRING, - RemainingName: PANSI_STRING, - ); -} -extern "C" { - pub fn FsRtlDoesDbcsContainWildCards(Name: PANSI_STRING) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlIsDbcsInExpression( - Expression: PANSI_STRING, - Name: PANSI_STRING, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlIsFatDbcsLegal( - DbcsName: ANSI_STRING, - WildCardsPermissible: BOOLEAN, - PathNamePermissible: BOOLEAN, - LeadingBackslashPermissible: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlIsHpfsDbcsLegal( - DbcsName: ANSI_STRING, - WildCardsPermissible: BOOLEAN, - PathNamePermissible: BOOLEAN, - LeadingBackslashPermissible: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn FsRtlNormalizeNtstatus( - Exception: NTSTATUS, - GenericException: NTSTATUS, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlIsNtstatusExpected(Exception: NTSTATUS) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlAllocateResource() -> PERESOURCE; -} -extern "C" { - pub fn FsRtlInitializeLargeMcb(Mcb: PLARGE_MCB, PoolType: POOL_TYPE); -} -extern "C" { - pub fn FsRtlUninitializeLargeMcb(Mcb: PLARGE_MCB); -} -extern "C" { - pub fn FsRtlResetLargeMcb(Mcb: PLARGE_MCB, SelfSynchronized: BOOLEAN); -} -extern "C" { - pub fn FsRtlTruncateLargeMcb(Mcb: PLARGE_MCB, Vbn: LONGLONG); -} -extern "C" { - pub fn FsRtlAddLargeMcbEntry( - Mcb: PLARGE_MCB, - Vbn: LONGLONG, - Lbn: LONGLONG, - SectorCount: LONGLONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlRemoveLargeMcbEntry( - Mcb: PLARGE_MCB, - Vbn: LONGLONG, - SectorCount: LONGLONG, - ); -} -extern "C" { - pub fn FsRtlLookupLargeMcbEntry( - Mcb: PLARGE_MCB, - Vbn: LONGLONG, - Lbn: PLONGLONG, - SectorCountFromLbn: PLONGLONG, - StartingLbn: PLONGLONG, - SectorCountFromStartingLbn: PLONGLONG, - Index: PULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlLookupLastLargeMcbEntry( - Mcb: PLARGE_MCB, - Vbn: PLONGLONG, - Lbn: PLONGLONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlLookupLastLargeMcbEntryAndIndex( - OpaqueMcb: PLARGE_MCB, - LargeVbn: PLONGLONG, - LargeLbn: PLONGLONG, - Index: PULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlNumberOfRunsInLargeMcb(Mcb: PLARGE_MCB) -> ULONG; -} -extern "C" { - pub fn FsRtlGetNextLargeMcbEntry( - Mcb: PLARGE_MCB, - RunIndex: ULONG, - Vbn: PLONGLONG, - Lbn: PLONGLONG, - SectorCount: PLONGLONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlSplitLargeMcb( - Mcb: PLARGE_MCB, - Vbn: LONGLONG, - Amount: LONGLONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlInitializeBaseMcb(Mcb: PBASE_MCB, PoolType: POOL_TYPE); -} -extern "C" { - pub fn FsRtlInitializeBaseMcbEx( - Mcb: PBASE_MCB, - PoolType: POOL_TYPE, - Flags: USHORT, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlUninitializeBaseMcb(Mcb: PBASE_MCB); -} -extern "C" { - pub fn FsRtlResetBaseMcb(Mcb: PBASE_MCB); -} -extern "C" { - pub fn FsRtlTruncateBaseMcb(Mcb: PBASE_MCB, Vbn: LONGLONG); -} -extern "C" { - pub fn FsRtlAddBaseMcbEntry( - Mcb: PBASE_MCB, - Vbn: LONGLONG, - Lbn: LONGLONG, - SectorCount: LONGLONG, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn FsRtlAddBaseMcbEntryEx( - Mcb: PBASE_MCB, - Vbn: LONGLONG, - Lbn: LONGLONG, - SectorCount: LONGLONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlRemoveBaseMcbEntry( - Mcb: PBASE_MCB, - Vbn: LONGLONG, - SectorCount: LONGLONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlLookupBaseMcbEntry( - Mcb: PBASE_MCB, - Vbn: LONGLONG, - Lbn: PLONGLONG, - SectorCountFromLbn: PLONGLONG, - StartingLbn: PLONGLONG, - SectorCountFromStartingLbn: PLONGLONG, - Index: PULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlLookupLastBaseMcbEntry( - Mcb: PBASE_MCB, - Vbn: PLONGLONG, - Lbn: PLONGLONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlLookupLastBaseMcbEntryAndIndex( - OpaqueMcb: PBASE_MCB, - LargeVbn: PLONGLONG, - LargeLbn: PLONGLONG, - Index: PULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlNumberOfRunsInBaseMcb(Mcb: PBASE_MCB) -> ULONG; -} -extern "C" { - pub fn FsRtlGetNextBaseMcbEntry( - Mcb: PBASE_MCB, - RunIndex: ULONG, - Vbn: PLONGLONG, - Lbn: PLONGLONG, - SectorCount: PLONGLONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlSplitBaseMcb(Mcb: PBASE_MCB, Vbn: LONGLONG, Amount: LONGLONG) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlInitializeMcb(Mcb: PMCB, PoolType: POOL_TYPE); -} -extern "C" { - pub fn FsRtlUninitializeMcb(Mcb: PMCB); -} -extern "C" { - pub fn FsRtlTruncateMcb(Mcb: PMCB, Vbn: VBN); -} -extern "C" { - pub fn FsRtlAddMcbEntry( - Mcb: PMCB, - Vbn: VBN, - Lbn: LBN, - SectorCount: ULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlRemoveMcbEntry(Mcb: PMCB, Vbn: VBN, SectorCount: ULONG); -} -extern "C" { - pub fn FsRtlLookupMcbEntry( - Mcb: PMCB, - Vbn: VBN, - Lbn: PLBN, - SectorCount: PULONG, - Index: PULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlLookupLastMcbEntry(Mcb: PMCB, Vbn: PVBN, Lbn: PLBN) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlNumberOfRunsInMcb(Mcb: PMCB) -> ULONG; -} -extern "C" { - pub fn FsRtlGetNextMcbEntry( - Mcb: PMCB, - RunIndex: ULONG, - Vbn: PVBN, - Lbn: PLBN, - SectorCount: PULONG, - ) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn FsRtlBalanceReads(TargetDevice: PDEVICE_OBJECT) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlInitializeOplock(Oplock: POPLOCK); -} -extern "C" { - pub fn FsRtlUninitializeOplock(Oplock: POPLOCK); -} -extern "C" { - #[must_use] - pub fn FsRtlOplockFsctrl(Oplock: POPLOCK, Irp: PIRP, OpenCount: ULONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlCheckOplock( - Oplock: POPLOCK, - Irp: PIRP, - Context: PVOID, - CompletionRoutine: POPLOCK_WAIT_COMPLETE_ROUTINE, - PostIrpRoutine: POPLOCK_FS_PREPOST_IRP, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlCheckOplockEx( - Oplock: POPLOCK, - Irp: PIRP, - Flags: ULONG, - Context: PVOID, - CompletionRoutine: POPLOCK_WAIT_COMPLETE_ROUTINE, - PostIrpRoutine: POPLOCK_FS_PREPOST_IRP, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlCheckUpperOplock( - Oplock: POPLOCK, - NewLowerOplockState: ULONG, - CompletionRoutineContext: PVOID, - CompletionRoutine: POPLOCK_WAIT_COMPLETE_ROUTINE, - PrePendRoutine: POPLOCK_FS_PREPOST_IRP, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlUpperOplockFsctrl( - Oplock: POPLOCK, - Irp: PIRP, - OpenCount: ULONG, - LowerOplockState: ULONG, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlOplockIsFastIoPossible(Oplock: POPLOCK) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlCurrentBatchOplock(Oplock: POPLOCK) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlCurrentOplock(Oplock: POPLOCK) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn FsRtlOplockBreakToNone( - Oplock: POPLOCK, - IrpSp: PIO_STACK_LOCATION, - Irp: PIRP, - Context: PVOID, - CompletionRoutine: POPLOCK_WAIT_COMPLETE_ROUTINE, - PostIrpRoutine: POPLOCK_FS_PREPOST_IRP, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlOplockIsSharedRequest(Irp: PIRP) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn FsRtlOplockBreakH( - Oplock: POPLOCK, - Irp: PIRP, - Flags: ULONG, - Context: PVOID, - CompletionRoutine: POPLOCK_WAIT_COMPLETE_ROUTINE, - PostIrpRoutine: POPLOCK_FS_PREPOST_IRP, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlOplockBreakH2( - Oplock: POPLOCK, - Irp: PIRP, - Flags: ULONG, - Context: PVOID, - CompletionRoutine: POPLOCK_WAIT_COMPLETE_ROUTINE, - PostIrpRoutine: POPLOCK_FS_PREPOST_IRP, - GrantedAccess: PACCESS_MASK, - ShareAccess: PUSHORT, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlCurrentOplockH(Oplock: POPLOCK) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn FsRtlOplockBreakToNoneEx( - Oplock: POPLOCK, - Irp: PIRP, - Flags: ULONG, - Context: PVOID, - CompletionRoutine: POPLOCK_WAIT_COMPLETE_ROUTINE, - PostIrpRoutine: POPLOCK_FS_PREPOST_IRP, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlOplockFsctrlEx( - Oplock: POPLOCK, - Irp: PIRP, - OpenCount: ULONG, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlOplockKeysEqual(Fo1: PFILE_OBJECT, Fo2: PFILE_OBJECT) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn FsRtlNotifyVolumeEvent( - FileObject: PFILE_OBJECT, - EventCode: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlNotifyVolumeEventEx( - FileObject: PFILE_OBJECT, - EventCode: ULONG, - Event: PTARGET_DEVICE_CUSTOM_NOTIFICATION, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlNotifyInitializeSync(NotifySync: *mut PNOTIFY_SYNC); -} -extern "C" { - pub fn FsRtlNotifyUninitializeSync(NotifySync: *mut PNOTIFY_SYNC); -} -extern "C" { - pub fn FsRtlNotifyFullChangeDirectory( - NotifySync: PNOTIFY_SYNC, - NotifyList: PLIST_ENTRY, - FsContext: PVOID, - FullDirectoryName: PSTRING, - WatchTree: BOOLEAN, - IgnoreBuffer: BOOLEAN, - CompletionFilter: ULONG, - NotifyIrp: PIRP, - TraverseCallback: PCHECK_FOR_TRAVERSE_ACCESS, - SubjectContext: PSECURITY_SUBJECT_CONTEXT, - ); -} -extern "C" { - pub fn FsRtlNotifyFilterChangeDirectory( - NotifySync: PNOTIFY_SYNC, - NotifyList: PLIST_ENTRY, - FsContext: PVOID, - FullDirectoryName: PSTRING, - WatchTree: BOOLEAN, - IgnoreBuffer: BOOLEAN, - CompletionFilter: ULONG, - NotifyIrp: PIRP, - TraverseCallback: PCHECK_FOR_TRAVERSE_ACCESS, - SubjectContext: PSECURITY_SUBJECT_CONTEXT, - FilterCallback: PFILTER_REPORT_CHANGE, - ); -} -extern "C" { - pub fn FsRtlNotifyFilterReportChange( - NotifySync: PNOTIFY_SYNC, - NotifyList: PLIST_ENTRY, - FullTargetName: PSTRING, - TargetNameOffset: USHORT, - StreamName: PSTRING, - NormalizedParentName: PSTRING, - FilterMatch: ULONG, - Action: ULONG, - TargetContext: PVOID, - FilterContext: PVOID, - ); -} -extern "C" { - pub fn FsRtlNotifyFullReportChange( - NotifySync: PNOTIFY_SYNC, - NotifyList: PLIST_ENTRY, - FullTargetName: PSTRING, - TargetNameOffset: USHORT, - StreamName: PSTRING, - NormalizedParentName: PSTRING, - FilterMatch: ULONG, - Action: ULONG, - TargetContext: PVOID, - ); -} -extern "C" { - pub fn FsRtlNotifyCleanup( - NotifySync: PNOTIFY_SYNC, - NotifyList: PLIST_ENTRY, - FsContext: PVOID, - ); -} -extern "C" { - pub fn FsRtlNotifyCleanupAll(NotifySync: PNOTIFY_SYNC, NotifyList: PLIST_ENTRY); -} -extern "C" { - pub fn FsRtlDissectName( - Path: UNICODE_STRING, - FirstName: PUNICODE_STRING, - RemainingName: PUNICODE_STRING, - ); -} -extern "C" { - pub fn FsRtlDoesNameContainWildCards(Name: PUNICODE_STRING) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlAreNamesEqual( - ConstantNameA: PCUNICODE_STRING, - ConstantNameB: PCUNICODE_STRING, - IgnoreCase: BOOLEAN, - UpcaseTable: PCWCH, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlIsNameInExpression( - Expression: PUNICODE_STRING, - Name: PUNICODE_STRING, - IgnoreCase: BOOLEAN, - UpcaseTable: PWCH, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlIsNameInUnUpcasedExpression( - Expression: PUNICODE_STRING, - Name: PUNICODE_STRING, - IgnoreCase: BOOLEAN, - UpcaseTable: PWCH, - ) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlPostStackOverflow( - Context: PVOID, - Event: PKEVENT, - StackOverflowRoutine: PFSRTL_STACK_OVERFLOW_ROUTINE, - ); -} -extern "C" { - pub fn FsRtlPostPagingFileStackOverflow( - Context: PVOID, - Event: PKEVENT, - StackOverflowRoutine: PFSRTL_STACK_OVERFLOW_ROUTINE, - ); -} -extern "C" { - #[must_use] - pub fn FsRtlRegisterUncProvider( - MupHandle: PHANDLE, - RedirectorDeviceName: PCUNICODE_STRING, - MailslotsSupported: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlRegisterUncProviderEx( - MupHandle: PHANDLE, - RedirDevName: PCUNICODE_STRING, - DeviceObject: PDEVICE_OBJECT, - Flags: FSRTL_UNC_PROVIDER_FLAGS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlRegisterUncProviderEx2( - RedirDevName: PCUNICODE_STRING, - DeviceObject: PDEVICE_OBJECT, - Registration: *const FSRTL_UNC_PROVIDER_REGISTRATION, - MupHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlDeregisterUncProvider(Handle: HANDLE); -} -extern "C" { - #[must_use] - pub fn FsRtlCancellableWaitForSingleObject( - Object: PVOID, - Timeout: PLARGE_INTEGER, - Irp: PIRP, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlCancellableWaitForMultipleObjects( - Count: ULONG, - ObjectArray: *mut PVOID, - WaitType: WAIT_TYPE, - Timeout: PLARGE_INTEGER, - WaitBlockArray: PKWAIT_BLOCK, - Irp: PIRP, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlMupGetProviderInfoFromFileObject( - pFileObject: PFILE_OBJECT, - Level: ULONG, - pBuffer: PVOID, - pBufferSize: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlMupGetProviderIdFromName( - pProviderName: PCUNICODE_STRING, - pProviderId: PULONG32, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlInsertPerFileContext( - PerFileContextPointer: *mut PVOID, - Ptr: PFSRTL_PER_FILE_CONTEXT, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlLookupPerFileContext( - PerFileContextPointer: *mut PVOID, - OwnerId: PVOID, - InstanceId: PVOID, - ) -> PFSRTL_PER_FILE_CONTEXT; -} -extern "C" { - pub fn FsRtlRemovePerFileContext( - PerFileContextPointer: *mut PVOID, - OwnerId: PVOID, - InstanceId: PVOID, - ) -> PFSRTL_PER_FILE_CONTEXT; -} -extern "C" { - pub fn FsRtlTeardownPerFileContexts(PerFileContextPointer: *mut PVOID); -} -extern "C" { - #[must_use] - pub fn FsRtlInsertPerStreamContext( - PerStreamContext: PFSRTL_ADVANCED_FCB_HEADER, - Ptr: PFSRTL_PER_STREAM_CONTEXT, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlLookupPerStreamContextInternal( - StreamContext: PFSRTL_ADVANCED_FCB_HEADER, - OwnerId: PVOID, - InstanceId: PVOID, - ) -> PFSRTL_PER_STREAM_CONTEXT; -} -extern "C" { - pub fn FsRtlRemovePerStreamContext( - StreamContext: PFSRTL_ADVANCED_FCB_HEADER, - OwnerId: PVOID, - InstanceId: PVOID, - ) -> PFSRTL_PER_STREAM_CONTEXT; -} -extern "C" { - pub fn FsRtlAllocateAePushLock(PoolType: POOL_TYPE, Tag: ULONG) -> PVOID; -} -extern "C" { - pub fn FsRtlFreeAePushLock(AePushLock: PVOID); -} -extern "C" { - pub fn FsRtlTeardownPerStreamContexts(AdvancedHeader: PFSRTL_ADVANCED_FCB_HEADER); -} -extern "C" { - #[must_use] - pub fn FsRtlInsertPerFileObjectContext( - FileObject: PFILE_OBJECT, - Ptr: PFSRTL_PER_FILEOBJECT_CONTEXT, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlLookupPerFileObjectContext( - FileObject: PFILE_OBJECT, - OwnerId: PVOID, - InstanceId: PVOID, - ) -> PFSRTL_PER_FILEOBJECT_CONTEXT; -} -extern "C" { - pub fn FsRtlRemovePerFileObjectContext( - FileObject: PFILE_OBJECT, - OwnerId: PVOID, - InstanceId: PVOID, - ) -> PFSRTL_PER_FILEOBJECT_CONTEXT; -} -extern "C" { - pub fn FsRtlIncrementCcFastReadNotPossible(); -} -extern "C" { - pub fn FsRtlIncrementCcFastReadWait(); -} -extern "C" { - pub fn FsRtlIncrementCcFastReadNoWait(); -} -extern "C" { - pub fn FsRtlIncrementCcFastReadResourceMiss(); -} -extern "C" { - pub fn FsRtlIncrementCcFastMdlReadWait(); -} -extern "C" { - pub fn FsRtlIsPagingFile(FileObject: PFILE_OBJECT) -> LOGICAL; -} -extern "C" { - pub fn FsRtlIsSystemPagingFile(FileObject: PFILE_OBJECT) -> LOGICAL; -} -extern "C" { - #[must_use] - pub fn FsRtlCreateSectionForDataScan( - SectionHandle: PHANDLE, - SectionObject: *mut PVOID, - SectionFileSize: PLARGE_INTEGER, - FileObject: PFILE_OBJECT, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - MaximumSize: PLARGE_INTEGER, - SectionPageProtection: ULONG, - AllocationAttributes: ULONG, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlValidateReparsePointBuffer( - BufferLength: ULONG, - ReparseBuffer: PREPARSE_DATA_BUFFER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlRemoveDotsFromPath( - OriginalString: PWSTR, - PathLength: USHORT, - NewLength: *mut USHORT, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlIsNonEmptyDirectoryReparsePointAllowed(ReparseTag: ULONG) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn FsRtlAllocateExtraCreateParameterList( - Flags: FSRTL_ALLOCATE_ECPLIST_FLAGS, - EcpList: *mut PECP_LIST, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlFreeExtraCreateParameterList(EcpList: PECP_LIST); -} -extern "C" { - #[must_use] - pub fn FsRtlInitializeExtraCreateParameterList(EcpList: PECP_LIST) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlAllocateExtraCreateParameter( - EcpType: LPCGUID, - SizeOfContext: ULONG, - Flags: FSRTL_ALLOCATE_ECP_FLAGS, - CleanupCallback: PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK, - PoolTag: ULONG, - EcpContext: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlFreeExtraCreateParameter(EcpContext: PVOID); -} -extern "C" { - pub fn FsRtlInitializeExtraCreateParameter( - Ecp: PECP_HEADER, - EcpFlags: ULONG, - CleanupCallback: PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK, - TotalSize: ULONG, - EcpType: LPCGUID, - ListAllocatedFrom: PVOID, - ); -} -extern "C" { - pub fn FsRtlInitExtraCreateParameterLookasideList( - Lookaside: PVOID, - Flags: FSRTL_ECP_LOOKASIDE_FLAGS, - Size: SIZE_T, - Tag: ULONG, - ); -} -extern "C" { - pub fn FsRtlDeleteExtraCreateParameterLookasideList( - Lookaside: PVOID, - Flags: FSRTL_ECP_LOOKASIDE_FLAGS, - ); -} -extern "C" { - #[must_use] - pub fn FsRtlAllocateExtraCreateParameterFromLookasideList( - EcpType: LPCGUID, - SizeOfContext: ULONG, - Flags: FSRTL_ALLOCATE_ECP_FLAGS, - CleanupCallback: PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK, - LookasideList: PVOID, - EcpContext: *mut PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlInsertExtraCreateParameter( - EcpList: PECP_LIST, - EcpContext: PVOID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlFindExtraCreateParameter( - EcpList: PECP_LIST, - EcpType: LPCGUID, - EcpContext: *mut PVOID, - EcpContextSize: *mut ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlRemoveExtraCreateParameter( - EcpList: PECP_LIST, - EcpType: LPCGUID, - EcpContext: *mut PVOID, - EcpContextSize: *mut ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlGetEcpListFromIrp(Irp: PIRP, EcpList: *mut PECP_LIST) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlSetEcpListIntoIrp(Irp: PIRP, EcpList: PECP_LIST) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlGetNextExtraCreateParameter( - EcpList: PECP_LIST, - CurrentEcpContext: PVOID, - NextEcpType: LPGUID, - NextEcpContext: *mut PVOID, - NextEcpContextSize: *mut ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlAcknowledgeEcp(EcpContext: PVOID); -} -extern "C" { - pub fn FsRtlPrepareToReuseEcp(EcpContext: PVOID); -} -extern "C" { - pub fn FsRtlIsEcpAcknowledged(EcpContext: PVOID) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlIsEcpFromUserMode(EcpContext: PVOID) -> BOOLEAN; -} -extern "C" { - pub fn FsRtlOplockGetAnyBreakOwnerProcess(Oplock: POPLOCK) -> PEPROCESS; -} -extern "C" { - #[must_use] - pub fn FsRtlCheckOplockEx2( - Oplock: POPLOCK, - Irp: PIRP, - Flags: ULONG, - FlagsEx2: ULONG, - CompletionRoutineContext: PVOID, - CompletionRoutine: POPLOCK_WAIT_COMPLETE_ROUTINE, - PostIrpRoutine: POPLOCK_FS_PREPOST_IRP, - Timeout: ULONGLONG, - NotifyContext: PVOID, - NotifyRoutine: POPLOCK_NOTIFY_ROUTINE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlCheckOplockForFsFilterCallback( - Oplock: POPLOCK, - CallbackData: PVOID, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlGetCurrentProcessLoaderList() -> PLIST_ENTRY; -} -extern "C" { - pub fn FsRtlIs32BitProcess(Process: PEPROCESS) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn FsRtlChangeBackingFileObject( - CurrentFileObject: PFILE_OBJECT, - NewFileObject: PFILE_OBJECT, - ChangeBackingType: FSRTL_CHANGE_BACKING_TYPE, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlLogCcFlushError( - FileName: PUNICODE_STRING, - DeviceObject: PDEVICE_OBJECT, - SectionObjectPointer: PSECTION_OBJECT_POINTERS, - FlushError: NTSTATUS, - Flags: ULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlAreVolumeStartupApplicationsComplete() -> BOOLEAN; -} -extern "C" { - pub fn FsRtlQueryMaximumVirtualDiskNestingLevel() -> ULONG; -} -extern "C" { - #[must_use] - pub fn FsRtlGetVirtualDiskNestingLevel( - DeviceObject: PDEVICE_OBJECT, - NestingLevel: PULONG, - NestingFlags: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlVolumeDeviceToCorrelationId( - VolumeDeviceObject: PDEVICE_OBJECT, - Guid: *mut GUID, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlIssueDeviceIoControl( - DeviceObject: PDEVICE_OBJECT, - IoCtl: ULONG, - Flags: UCHAR, - InputBuffer: PVOID, - InputBufferLength: ULONG, - OutputBuffer: PVOID, - OutputBufferLength: ULONG, - IosbInformation: PULONG_PTR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlGetSectorSizeInformation( - DeviceObject: PDEVICE_OBJECT, - SectorSizeInfo: PFILE_FS_SECTOR_SIZE_INFORMATION, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlGetSupportedFeatures( - DeviceObject: PDEVICE_OBJECT, - SupportedFeatures: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlKernelFsControlFile( - FileObject: PFILE_OBJECT, - FsControlCode: ULONG, - InputBuffer: PVOID, - InputBufferLength: ULONG, - OutputBuffer: PVOID, - OutputBufferLength: ULONG, - RetOutputBufferSize: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlQueryKernelEaFile( - FileObject: PFILE_OBJECT, - ReturnedEaData: PVOID, - Length: ULONG, - ReturnSingleEntry: BOOLEAN, - EaList: PVOID, - EaListLength: ULONG, - EaIndex: PULONG, - RestartScan: BOOLEAN, - LengthReturned: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlSetKernelEaFile( - FileObject: PFILE_OBJECT, - EaBuffer: PVOID, - Length: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlQueryInformationFile( - FileObject: PFILE_OBJECT, - FileInformation: PVOID, - Length: ULONG, - FileInformationClass: FILE_INFORMATION_CLASS, - RetFileInformationSize: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn FsRtlQueryCachedVdl(FileObject: PFILE_OBJECT, Vdl: PLONGLONG) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlUpdateDiskCounters(BytesRead: ULONG64, BytesWritten: ULONG64); -} -extern "C" { - pub fn FsRtlDismountComplete(DeviceObject: PDEVICE_OBJECT, DismountStatus: NTSTATUS); -} -extern "C" { - #[must_use] - pub fn FsRtlSetDriverBacking(DriverObj: PDRIVER_OBJECT, Flags: ULONG) -> NTSTATUS; -} -extern "C" { - pub fn FsRtlIsMobileOS() -> BOOLEAN; -} -extern "C" { - pub fn FsRtlIsExtentDangling( - StartPage: PFN_NUMBER, - NumberOfPages: PFN_NUMBER, - Flags: ULONG, - ) -> PFN_NUMBER; -} -extern "C" { - pub fn FsRtlIsDaxVolume(FileObject: PFILE_OBJECT) -> BOOLEAN; -} -extern "C" { - pub fn CcInitializeCacheMap( - FileObject: PFILE_OBJECT, - FileSizes: PCC_FILE_SIZES, - PinAccess: BOOLEAN, - Callbacks: PCACHE_MANAGER_CALLBACKS, - LazyWriteContext: PVOID, - ); -} -extern "C" { - pub fn CcUninitializeCacheMap( - FileObject: PFILE_OBJECT, - TruncateSize: PLARGE_INTEGER, - UninitializeEvent: PCACHE_UNINITIALIZE_EVENT, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcSetFileSizes(FileObject: PFILE_OBJECT, FileSizes: PCC_FILE_SIZES); -} -extern "C" { - #[must_use] - pub fn CcSetFileSizesEx( - FileObject: PFILE_OBJECT, - FileSizes: PCC_FILE_SIZES, - ) -> NTSTATUS; -} -extern "C" { - pub fn CcPurgeCacheSection( - SectionObjectPointer: PSECTION_OBJECT_POINTERS, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Flags: ULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcCoherencyFlushAndPurgeCache( - SectionObjectPointer: PSECTION_OBJECT_POINTERS, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - IoStatus: PIO_STATUS_BLOCK, - Flags: ULONG, - ); -} -extern "C" { - pub fn CcSetDirtyPageThreshold(FileObject: PFILE_OBJECT, DirtyPageThreshold: ULONG); -} -extern "C" { - pub fn CcFlushCache( - SectionObjectPointer: PSECTION_OBJECT_POINTERS, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - IoStatus: PIO_STATUS_BLOCK, - ); -} -extern "C" { - pub fn CcGetFlushedValidData( - SectionObjectPointer: PSECTION_OBJECT_POINTERS, - BcbListHeld: BOOLEAN, - ) -> LARGE_INTEGER; -} -extern "C" { - pub fn CcZeroData( - FileObject: PFILE_OBJECT, - StartOffset: PLARGE_INTEGER, - EndOffset: PLARGE_INTEGER, - Wait: BOOLEAN, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcRemapBcb(Bcb: PVOID) -> PVOID; -} -extern "C" { - pub fn CcRepinBcb(Bcb: PVOID); -} -extern "C" { - pub fn CcUnpinRepinnedBcb( - Bcb: PVOID, - WriteThrough: BOOLEAN, - IoStatus: PIO_STATUS_BLOCK, - ); -} -extern "C" { - pub fn CcGetFileObjectFromSectionPtrs( - SectionObjectPointer: PSECTION_OBJECT_POINTERS, - ) -> PFILE_OBJECT; -} -extern "C" { - pub fn CcGetFileObjectFromSectionPtrsRef( - SectionObjectPointer: PSECTION_OBJECT_POINTERS, - ) -> PFILE_OBJECT; -} -extern "C" { - pub fn CcGetFileObjectFromBcb(Bcb: PVOID) -> PFILE_OBJECT; -} -extern "C" { - pub fn CcCopyWriteWontFlush( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcCanIWrite( - FileObject: PFILE_OBJECT, - BytesToWrite: ULONG, - Wait: BOOLEAN, - Retrying: UCHAR, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcDeferWrite( - FileObject: PFILE_OBJECT, - PostRoutine: PCC_POST_DEFERRED_WRITE, - Context1: PVOID, - Context2: PVOID, - BytesToWrite: ULONG, - Retrying: BOOLEAN, - ); -} -extern "C" { - pub fn CcCopyRead( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Wait: BOOLEAN, - Buffer: PVOID, - IoStatus: PIO_STATUS_BLOCK, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcFastCopyRead( - FileObject: PFILE_OBJECT, - FileOffset: ULONG, - Length: ULONG, - PageCount: ULONG, - Buffer: PVOID, - IoStatus: PIO_STATUS_BLOCK, - ); -} -extern "C" { - pub fn CcCopyWrite( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Wait: BOOLEAN, - Buffer: PVOID, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcFastCopyWrite( - FileObject: PFILE_OBJECT, - FileOffset: ULONG, - Length: ULONG, - Buffer: PVOID, - ); -} -extern "C" { - pub fn CcMdlRead( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - MdlChain: *mut PMDL, - IoStatus: PIO_STATUS_BLOCK, - ); -} -extern "C" { - pub fn CcMdlReadComplete(FileObject: PFILE_OBJECT, MdlChain: PMDL); -} -extern "C" { - pub fn CcPrepareMdlWrite( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - MdlChain: *mut PMDL, - IoStatus: PIO_STATUS_BLOCK, - ); -} -extern "C" { - pub fn CcMdlWriteComplete( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - MdlChain: PMDL, - ); -} -extern "C" { - pub fn CcMdlWriteAbort(FileObject: PFILE_OBJECT, MdlChain: PMDL); -} -extern "C" { - pub fn CcScheduleReadAhead( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - ); -} -extern "C" { - #[must_use] - pub fn CcWaitForCurrentLazyWriterActivity() -> NTSTATUS; -} -extern "C" { - pub fn CcSetReadAheadGranularity(FileObject: PFILE_OBJECT, Granularity: ULONG); -} -extern "C" { - pub fn CcCopyWriteEx( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Wait: BOOLEAN, - Buffer: PVOID, - IoIssuerThread: PETHREAD, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcCopyReadEx( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Wait: BOOLEAN, - Buffer: PVOID, - IoStatus: PIO_STATUS_BLOCK, - IoIssuerThread: PETHREAD, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcAsyncCopyRead( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Wait: BOOLEAN, - Buffer: PVOID, - IoStatus: PIO_STATUS_BLOCK, - IoIssuerThread: PETHREAD, - AsyncReadContext: PCC_ASYNC_READ_CONTEXT, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcScheduleReadAheadEx( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - IoIssuerThread: PETHREAD, - ); -} -extern "C" { - pub fn CcInitializeCacheMapEx( - FileObject: PFILE_OBJECT, - FileSizes: PCC_FILE_SIZES, - PinAccess: BOOLEAN, - Callbacks: PCACHE_MANAGER_CALLBACKS, - LazyWriteContext: PVOID, - Flags: ULONG, - ); -} -extern "C" { - pub fn CcInitializeCacheMapEx2( - FileObject: PFILE_OBJECT, - FileSizes: PCC_FILE_SIZES, - PinAccess: BOOLEAN, - AsyncCallbacks: PCACHE_MANAGER_CALLBACKS_EX, - LazyWriteContext: PVOID, - Flags: ULONG, - ); -} -extern "C" { - pub fn CcPinRead( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Flags: ULONG, - Bcb: *mut PVOID, - Buffer: *mut PVOID, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcMapData( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Flags: ULONG, - Bcb: *mut PVOID, - Buffer: *mut PVOID, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcPinMappedData( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Flags: ULONG, - Bcb: *mut PVOID, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcPreparePinWrite( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Zero: BOOLEAN, - Flags: ULONG, - Bcb: *mut PVOID, - Buffer: *mut PVOID, - ) -> BOOLEAN; -} -extern "C" { - pub fn CcSetDirtyPinnedData(BcbVoid: PVOID, Lsn: PLARGE_INTEGER); -} -extern "C" { - pub fn CcUnpinData(Bcb: PVOID); -} -extern "C" { - pub fn CcSetBcbOwnerPointer(Bcb: PVOID, OwnerPointer: PVOID); -} -extern "C" { - pub fn CcUnpinDataForThread(Bcb: PVOID, ResourceThreadId: ERESOURCE_THREAD); -} -extern "C" { - pub fn CcSetAdditionalCacheAttributes( - FileObject: PFILE_OBJECT, - DisableReadAhead: BOOLEAN, - DisableWriteBehind: BOOLEAN, - ); -} -extern "C" { - pub fn CcSetAdditionalCacheAttributesEx(FileObject: PFILE_OBJECT, Flags: ULONG); -} -extern "C" { - pub fn CcSetParallelFlushFile( - FileObject: PFILE_OBJECT, - EnableParallelFlush: BOOLEAN, - ); -} -extern "C" { - pub fn CcSetLogHandleForFile( - FileObject: PFILE_OBJECT, - LogHandle: PVOID, - FlushToLsnRoutine: PFLUSH_TO_LSN, - ); -} -extern "C" { - pub fn CcGetDirtyPages( - LogHandle: PVOID, - DirtyPageRoutine: PDIRTY_PAGE_ROUTINE, - Context1: PVOID, - Context2: PVOID, - ) -> LARGE_INTEGER; -} -extern "C" { - pub fn CcIsThereDirtyData(Vpb: PVPB) -> BOOLEAN; -} -extern "C" { - pub fn CcIsThereDirtyDataEx(Vpb: PVPB, NumberOfDirtyPages: PULONG) -> BOOLEAN; -} -extern "C" { - pub fn CcIsCacheManagerCallbackNeeded(Status: NTSTATUS) -> BOOLEAN; -} -extern "C" { - #[must_use] - pub fn CcErrorCallbackRoutine(Context: PCC_ERROR_CALLBACK_CONTEXT) -> NTSTATUS; -} -extern "C" { - pub fn AcquireCredentialsHandleW( - pPrincipal: PSECURITY_STRING, - pPackage: PSECURITY_STRING, - fCredentialUse: ::core::ffi::c_ulong, - pvLogonId: *mut ::core::ffi::c_void, - pAuthData: *mut ::core::ffi::c_void, - pGetKeyFn: SEC_GET_KEY_FN, - pvGetKeyArgument: *mut ::core::ffi::c_void, - phCredential: PCredHandle, - ptsExpiry: PTimeStamp, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn FreeCredentialsHandle(phCredential: PCredHandle) -> SECURITY_STATUS; -} -extern "C" { - pub fn AddCredentialsW( - hCredentials: PCredHandle, - pPrincipal: PSECURITY_STRING, - pPackage: PSECURITY_STRING, - fCredentialUse: ::core::ffi::c_ulong, - pAuthData: *mut ::core::ffi::c_void, - pGetKeyFn: SEC_GET_KEY_FN, - pvGetKeyArgument: *mut ::core::ffi::c_void, - ptsExpiry: PTimeStamp, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn AddCredentialsA( - hCredentials: PCredHandle, - pszPrincipal: LPSTR, - pszPackage: LPSTR, - fCredentialUse: ::core::ffi::c_ulong, - pAuthData: *mut ::core::ffi::c_void, - pGetKeyFn: SEC_GET_KEY_FN, - pvGetKeyArgument: *mut ::core::ffi::c_void, - ptsExpiry: PTimeStamp, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiCreateAsyncContext() -> *mut SspiAsyncContext; -} -extern "C" { - pub fn SspiFreeAsyncContext(Handle: *mut SspiAsyncContext); -} -extern "C" { - #[must_use] - pub fn SspiReinitAsyncContext(Handle: *mut SspiAsyncContext) -> NTSTATUS; -} -extern "C" { - pub fn SspiSetAsyncNotifyCallback( - Context: *mut SspiAsyncContext, - Callback: SspiAsyncNotifyCallback, - CallbackData: *mut ::core::ffi::c_void, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiAsyncContextRequiresNotify( - AsyncContext: *mut SspiAsyncContext, - ) -> BOOLEAN; -} -extern "C" { - pub fn SspiGetAsyncCallStatus(Handle: *mut SspiAsyncContext) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiAcquireCredentialsHandleAsyncW( - AsyncContext: *mut SspiAsyncContext, - pszPrincipal: PSECURITY_STRING, - pszPackage: PSECURITY_STRING, - fCredentialUse: ::core::ffi::c_ulong, - pvLogonId: *mut ::core::ffi::c_void, - pAuthData: *mut ::core::ffi::c_void, - pGetKeyFn: SEC_GET_KEY_FN, - pvGetKeyArgument: *mut ::core::ffi::c_void, - phCredential: PCredHandle, - ptsExpiry: PTimeStamp, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiAcquireCredentialsHandleAsyncA( - AsyncContext: *mut SspiAsyncContext, - pszPrincipal: LPSTR, - pszPackage: LPSTR, - fCredentialUse: ::core::ffi::c_ulong, - pvLogonId: *mut ::core::ffi::c_void, - pAuthData: *mut ::core::ffi::c_void, - pGetKeyFn: SEC_GET_KEY_FN, - pvGetKeyArgument: *mut ::core::ffi::c_void, - phCredential: PCredHandle, - ptsExpiry: PTimeStamp, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiInitializeSecurityContextAsyncW( - AsyncContext: *mut SspiAsyncContext, - phCredential: PCredHandle, - phContext: PCtxtHandle, - pszTargetName: PSECURITY_STRING, - fContextReq: ::core::ffi::c_ulong, - Reserved1: ::core::ffi::c_ulong, - TargetDataRep: ::core::ffi::c_ulong, - pInput: PSecBufferDesc, - Reserved2: ::core::ffi::c_ulong, - phNewContext: PCtxtHandle, - pOutput: PSecBufferDesc, - pfContextAttr: *mut ::core::ffi::c_ulong, - ptsExpiry: PTimeStamp, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiInitializeSecurityContextAsyncA( - AsyncContext: *mut SspiAsyncContext, - phCredential: PCredHandle, - phContext: PCtxtHandle, - pszTargetName: LPSTR, - fContextReq: ::core::ffi::c_ulong, - Reserved1: ::core::ffi::c_ulong, - TargetDataRep: ::core::ffi::c_ulong, - pInput: PSecBufferDesc, - Reserved2: ::core::ffi::c_ulong, - phNewContext: PCtxtHandle, - pOutput: PSecBufferDesc, - pfContextAttr: *mut ::core::ffi::c_ulong, - ptsExpiry: PTimeStamp, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiAcceptSecurityContextAsync( - AsyncContext: *mut SspiAsyncContext, - phCredential: PCredHandle, - phContext: PCtxtHandle, - pInput: PSecBufferDesc, - fContextReq: ::core::ffi::c_ulong, - TargetDataRep: ::core::ffi::c_ulong, - phNewContext: PCtxtHandle, - pOutput: PSecBufferDesc, - pfContextAttr: *mut ::core::ffi::c_ulong, - ptsExpiry: PTimeStamp, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiFreeCredentialsHandleAsync( - AsyncContext: *mut SspiAsyncContext, - phCredential: PCredHandle, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiDeleteSecurityContextAsync( - AsyncContext: *mut SspiAsyncContext, - phContext: PCtxtHandle, - ) -> SECURITY_STATUS; -} -extern "C" { - /** - - Context Management Functions - -*/ - pub fn InitializeSecurityContextW( - phCredential: PCredHandle, - phContext: PCtxtHandle, - pTargetName: PSECURITY_STRING, - fContextReq: ::core::ffi::c_ulong, - Reserved1: ::core::ffi::c_ulong, - TargetDataRep: ::core::ffi::c_ulong, - pInput: PSecBufferDesc, - Reserved2: ::core::ffi::c_ulong, - phNewContext: PCtxtHandle, - pOutput: PSecBufferDesc, - pfContextAttr: *mut ::core::ffi::c_ulong, - ptsExpiry: PTimeStamp, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn AcceptSecurityContext( - phCredential: PCredHandle, - phContext: PCtxtHandle, - pInput: PSecBufferDesc, - fContextReq: ::core::ffi::c_ulong, - TargetDataRep: ::core::ffi::c_ulong, - phNewContext: PCtxtHandle, - pOutput: PSecBufferDesc, - pfContextAttr: *mut ::core::ffi::c_ulong, - ptsExpiry: PTimeStamp, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn CompleteAuthToken( - phContext: PCtxtHandle, - pToken: PSecBufferDesc, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn ImpersonateSecurityContext(phContext: PCtxtHandle) -> SECURITY_STATUS; -} -extern "C" { - pub fn RevertSecurityContext(phContext: PCtxtHandle) -> SECURITY_STATUS; -} -extern "C" { - pub fn QuerySecurityContextToken( - phContext: PCtxtHandle, - Token: *mut *mut ::core::ffi::c_void, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn DeleteSecurityContext(phContext: PCtxtHandle) -> SECURITY_STATUS; -} -extern "C" { - pub fn ApplyControlToken( - phContext: PCtxtHandle, - pInput: PSecBufferDesc, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn QueryContextAttributesW( - phContext: PCtxtHandle, - ulAttribute: ::core::ffi::c_ulong, - pBuffer: *mut ::core::ffi::c_void, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn QueryContextAttributesExW( - phContext: PCtxtHandle, - ulAttribute: ::core::ffi::c_ulong, - pBuffer: *mut ::core::ffi::c_void, - cbBuffer: ::core::ffi::c_ulong, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SetContextAttributesW( - phContext: PCtxtHandle, - ulAttribute: ::core::ffi::c_ulong, - pBuffer: *mut ::core::ffi::c_void, - cbBuffer: ::core::ffi::c_ulong, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn QueryCredentialsAttributesW( - phCredential: PCredHandle, - ulAttribute: ::core::ffi::c_ulong, - pBuffer: *mut ::core::ffi::c_void, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn QueryCredentialsAttributesExW( - phCredential: PCredHandle, - ulAttribute: ::core::ffi::c_ulong, - pBuffer: *mut ::core::ffi::c_void, - cbBuffer: ::core::ffi::c_ulong, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SetCredentialsAttributesW( - phCredential: PCredHandle, - ulAttribute: ::core::ffi::c_ulong, - pBuffer: *mut ::core::ffi::c_void, - cbBuffer: ::core::ffi::c_ulong, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn FreeContextBuffer(pvContextBuffer: PVOID) -> SECURITY_STATUS; -} -extern "C" { - /** - - Message Support API - -*/ - pub fn MakeSignature( - phContext: PCtxtHandle, - fQOP: ::core::ffi::c_ulong, - pMessage: PSecBufferDesc, - MessageSeqNo: ::core::ffi::c_ulong, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn VerifySignature( - phContext: PCtxtHandle, - pMessage: PSecBufferDesc, - MessageSeqNo: ::core::ffi::c_ulong, - pfQOP: *mut ::core::ffi::c_ulong, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn EncryptMessage( - phContext: PCtxtHandle, - fQOP: ::core::ffi::c_ulong, - pMessage: PSecBufferDesc, - MessageSeqNo: ::core::ffi::c_ulong, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn DecryptMessage( - phContext: PCtxtHandle, - pMessage: PSecBufferDesc, - MessageSeqNo: ::core::ffi::c_ulong, - pfQOP: *mut ::core::ffi::c_ulong, - ) -> SECURITY_STATUS; -} -extern "C" { - /** - - Misc. - -*/ - pub fn EnumerateSecurityPackagesW( - pcPackages: *mut ::core::ffi::c_ulong, - ppPackageInfo: *mut PSecPkgInfoW, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn QuerySecurityPackageInfoW( - pPackageName: PSECURITY_STRING, - ppPackageInfo: *mut PSecPkgInfoW, - ) -> SECURITY_STATUS; -} -extern "C" { - /** - - Context export/import - -*/ - pub fn ExportSecurityContext( - phContext: PCtxtHandle, - fFlags: ULONG, - pPackedContext: PSecBuffer, - pToken: *mut *mut ::core::ffi::c_void, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn ImportSecurityContextW( - pszPackage: PSECURITY_STRING, - pPackedContext: PSecBuffer, - Token: *mut ::core::ffi::c_void, - phContext: PCtxtHandle, - ) -> SECURITY_STATUS; -} -extern "C" { - #[must_use] - pub fn SecMakeSPN( - ServiceClass: PUNICODE_STRING, - ServiceName: PUNICODE_STRING, - InstanceName: PUNICODE_STRING, - InstancePort: USHORT, - Referrer: PUNICODE_STRING, - Spn: PUNICODE_STRING, - Length: PULONG, - Allocate: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SecMakeSPNEx( - ServiceClass: PUNICODE_STRING, - ServiceName: PUNICODE_STRING, - InstanceName: PUNICODE_STRING, - InstancePort: USHORT, - Referrer: PUNICODE_STRING, - TargetInfo: PUNICODE_STRING, - Spn: PUNICODE_STRING, - Length: PULONG, - Allocate: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SecMakeSPNEx2( - ServiceClass: PUNICODE_STRING, - ServiceName: PUNICODE_STRING, - InstanceName: PUNICODE_STRING, - InstancePort: USHORT, - Referrer: PUNICODE_STRING, - InTargetInfo: PUNICODE_STRING, - Spn: PUNICODE_STRING, - TotalSize: PULONG, - Allocate: BOOLEAN, - IsTargetInfoMarshaled: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SecLookupAccountSid( - Sid: PSID, - NameSize: PULONG, - NameBuffer: PUNICODE_STRING, - DomainSize: PULONG, - DomainBuffer: PUNICODE_STRING, - NameUse: PSID_NAME_USE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SecLookupAccountName( - Name: PUNICODE_STRING, - SidSize: PULONG, - Sid: PSID, - NameUse: PSID_NAME_USE, - DomainSize: PULONG, - ReferencedDomain: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn SecLookupWellKnownSid( - SidType: WELL_KNOWN_SID_TYPE::Type, - Sid: PSID, - SidBufferSize: ULONG, - SidSize: PULONG, - ) -> NTSTATUS; -} -extern "C" { - pub fn InitSecurityInterfaceW() -> PSecurityFunctionTableW; -} -extern "C" { - pub fn SspiEncodeAuthIdentityAsStrings( - pAuthIdentity: PSEC_WINNT_AUTH_IDENTITY_OPAQUE, - ppszUserName: *mut PCWSTR, - ppszDomainName: *mut PCWSTR, - ppszPackedCredentialsString: *mut PCWSTR, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiValidateAuthIdentity( - AuthData: PSEC_WINNT_AUTH_IDENTITY_OPAQUE, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiCopyAuthIdentity( - AuthData: PSEC_WINNT_AUTH_IDENTITY_OPAQUE, - AuthDataCopy: *mut PSEC_WINNT_AUTH_IDENTITY_OPAQUE, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiFreeAuthIdentity(AuthData: PSEC_WINNT_AUTH_IDENTITY_OPAQUE); -} -extern "C" { - pub fn SspiZeroAuthIdentity(AuthData: PSEC_WINNT_AUTH_IDENTITY_OPAQUE); -} -extern "C" { - pub fn SspiLocalFree(DataBuffer: PVOID); -} -extern "C" { - pub fn SspiEncodeStringsAsAuthIdentity( - pszUserName: PCWSTR, - pszDomainName: PCWSTR, - pszPackedCredentialsString: PCWSTR, - ppAuthIdentity: *mut PSEC_WINNT_AUTH_IDENTITY_OPAQUE, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiCompareAuthIdentities( - AuthIdentity1: PSEC_WINNT_AUTH_IDENTITY_OPAQUE, - AuthIdentity2: PSEC_WINNT_AUTH_IDENTITY_OPAQUE, - SameSuppliedUser: PBOOLEAN, - SameSuppliedIdentity: PBOOLEAN, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiMarshalAuthIdentity( - AuthIdentity: PSEC_WINNT_AUTH_IDENTITY_OPAQUE, - AuthIdentityLength: *mut ::core::ffi::c_ulong, - AuthIdentityByteArray: *mut *mut ::core::ffi::c_char, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiUnmarshalAuthIdentity( - AuthIdentityLength: ::core::ffi::c_ulong, - AuthIdentityByteArray: *mut ::core::ffi::c_char, - ppAuthIdentity: *mut PSEC_WINNT_AUTH_IDENTITY_OPAQUE, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiIsPromptingNeeded(ErrorOrNtStatus: ::core::ffi::c_ulong) -> BOOLEAN; -} -extern "C" { - pub fn SspiGetTargetHostName( - pszTargetName: PCWSTR, - pszHostName: *mut PWSTR, - ) -> SECURITY_STATUS; -} -extern "C" { - pub fn SspiExcludePackage( - AuthIdentity: PSEC_WINNT_AUTH_IDENTITY_OPAQUE, - pszPackageName: PCWSTR, - ppNewAuthIdentity: *mut PSEC_WINNT_AUTH_IDENTITY_OPAQUE, - ) -> SECURITY_STATUS; -} -extern "C" { - #[must_use] - pub fn GetSecurityUserInfo( - LogonId: PLUID, - Flags: ULONG, - UserInformation: *mut PSecurityUserData, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn MapSecurityError(SecStatus: SECURITY_STATUS) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryObject( - Handle: HANDLE, - ObjectInformationClass: OBJECT_INFORMATION_CLASS, - ObjectInformation: PVOID, - ObjectInformationLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwNotifyChangeKey( - KeyHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - CompletionFilter: ULONG, - WatchTree: BOOLEAN, - Buffer: PVOID, - BufferSize: ULONG, - Asynchronous: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwCreateEvent( - EventHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - EventType: EVENT_TYPE, - InitialState: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwDeleteFile(ObjectAttributes: POBJECT_ATTRIBUTES) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryDirectoryFile( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - FileInformation: PVOID, - Length: ULONG, - FileInformationClass: FILE_INFORMATION_CLASS, - ReturnSingleEntry: BOOLEAN, - FileName: PUNICODE_STRING, - RestartScan: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryDirectoryFileEx( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - FileInformation: PVOID, - Length: ULONG, - FileInformationClass: FILE_INFORMATION_CLASS, - QueryFlags: ULONG, - FileName: PUNICODE_STRING, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetVolumeInformationFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - FsInformation: PVOID, - Length: ULONG, - FsInformationClass: FS_INFORMATION_CLASS, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwFsControlFile( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - FsControlCode: ULONG, - InputBuffer: PVOID, - InputBufferLength: ULONG, - OutputBuffer: PVOID, - OutputBufferLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwDuplicateObject( - SourceProcessHandle: HANDLE, - SourceHandle: HANDLE, - TargetProcessHandle: HANDLE, - TargetHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - HandleAttributes: ULONG, - Options: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenDirectoryObject( - DirectoryHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwAllocateVirtualMemory( - ProcessHandle: HANDLE, - BaseAddress: *mut PVOID, - ZeroBits: ULONG_PTR, - RegionSize: PSIZE_T, - AllocationType: ULONG, - Protect: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwAllocateVirtualMemoryEx( - ProcessHandle: HANDLE, - BaseAddress: *mut PVOID, - RegionSize: PSIZE_T, - AllocationType: ULONG, - PageProtection: ULONG, - ExtendedParameters: PMEM_EXTENDED_PARAMETER, - ExtendedParameterCount: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwFreeVirtualMemory( - ProcessHandle: HANDLE, - BaseAddress: *mut PVOID, - RegionSize: PSIZE_T, - FreeType: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryVirtualMemory( - ProcessHandle: HANDLE, - BaseAddress: PVOID, - MemoryInformationClass: MEMORY_INFORMATION_CLASS, - MemoryInformation: PVOID, - MemoryInformationLength: SIZE_T, - ReturnLength: PSIZE_T, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetInformationVirtualMemory( - ProcessHandle: HANDLE, - VmInformationClass: VIRTUAL_MEMORY_INFORMATION_CLASS, - NumberOfEntries: ULONG_PTR, - VirtualAddresses: PMEMORY_RANGE_ENTRY, - VmInformation: PVOID, - VmInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwWaitForSingleObject( - Handle: HANDLE, - Alertable: BOOLEAN, - Timeout: PLARGE_INTEGER, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetEvent(EventHandle: HANDLE, PreviousState: PLONG) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwFlushVirtualMemory( - ProcessHandle: HANDLE, - BaseAddress: *mut PVOID, - RegionSize: PSIZE_T, - IoStatus: PIO_STATUS_BLOCK, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenProcessTokenEx( - ProcessHandle: HANDLE, - DesiredAccess: ACCESS_MASK, - HandleAttributes: ULONG, - TokenHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwOpenThreadTokenEx( - ThreadHandle: HANDLE, - DesiredAccess: ACCESS_MASK, - OpenAsSelf: BOOLEAN, - HandleAttributes: ULONG, - TokenHandle: PHANDLE, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryInformationToken( - TokenHandle: HANDLE, - TokenInformationClass: TOKEN_INFORMATION_CLASS, - TokenInformation: PVOID, - TokenInformationLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetInformationToken( - TokenHandle: HANDLE, - TokenInformationClass: TOKEN_INFORMATION_CLASS, - TokenInformation: PVOID, - TokenInformationLength: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetSecurityObject( - Handle: HANDLE, - SecurityInformation: SECURITY_INFORMATION, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQuerySecurityObject( - Handle: HANDLE, - SecurityInformation: SECURITY_INFORMATION, - SecurityDescriptor: PSECURITY_DESCRIPTOR, - Length: ULONG, - LengthNeeded: PULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwLockFile( - FileHandle: HANDLE, - Event: HANDLE, - ApcRoutine: PIO_APC_ROUTINE, - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - ByteOffset: PLARGE_INTEGER, - Length: PLARGE_INTEGER, - Key: ULONG, - FailImmediately: BOOLEAN, - ExclusiveLock: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwUnlockFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - ByteOffset: PLARGE_INTEGER, - Length: PLARGE_INTEGER, - Key: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryQuotaInformationFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - Buffer: PVOID, - Length: ULONG, - ReturnSingleEntry: BOOLEAN, - SidList: PVOID, - SidListLength: ULONG, - StartSid: PSID, - RestartScan: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetQuotaInformationFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - Buffer: PVOID, - Length: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwFlushBuffersFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwFlushBuffersFileEx( - FileHandle: HANDLE, - FLags: ULONG, - Parameters: PVOID, - ParametersSize: ULONG, - IoStatusBlock: PIO_STATUS_BLOCK, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwQueryEaFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - Buffer: PVOID, - Length: ULONG, - ReturnSingleEntry: BOOLEAN, - EaList: PVOID, - EaListLength: ULONG, - EaIndex: PULONG, - RestartScan: BOOLEAN, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwSetEaFile( - FileHandle: HANDLE, - IoStatusBlock: PIO_STATUS_BLOCK, - Buffer: PVOID, - Length: ULONG, - ) -> NTSTATUS; -} -extern "C" { - #[must_use] - pub fn ZwDuplicateToken( - ExistingTokenHandle: HANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - EffectiveOnly: BOOLEAN, - TokenType: TOKEN_TYPE, - NewTokenHandle: PHANDLE, - ) -> NTSTATUS; -} diff --git a/crates/wdk-sys/generated_bindings/types.rs b/crates/wdk-sys/generated_bindings/types.rs deleted file mode 100644 index 475b4bc9..00000000 --- a/crates/wdk-sys/generated_bindings/types.rs +++ /dev/null @@ -1,211616 +0,0 @@ -/* automatically generated by rust-bindgen 0.69.4 */ - -#[repr(C)] -#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct __BindgenBitfieldUnit { - storage: Storage, -} -impl __BindgenBitfieldUnit { - #[inline] - pub const fn new(storage: Storage) -> Self { - Self { storage } - } -} -impl __BindgenBitfieldUnit -where - Storage: AsRef<[u8]> + AsMut<[u8]>, -{ - #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; - let bit_index = if cfg!(target_endian = "big") { - 7 - (index % 8) - } else { - index % 8 - }; - let mask = 1 << bit_index; - byte & mask == mask - } - #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; - let bit_index = if cfg!(target_endian = "big") { - 7 - (index % 8) - } else { - index % 8 - }; - let mask = 1 << bit_index; - if val { - *byte |= mask; - } else { - *byte &= !mask; - } - } - #[inline] - pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { - debug_assert!(bit_width <= 64); - debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); - debug_assert!( - (bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len(), - ); - let mut val = 0; - for i in 0..(bit_width as usize) { - if self.get_bit(i + bit_offset) { - let index = if cfg!(target_endian = "big") { - bit_width as usize - 1 - i - } else { - i - }; - val |= 1 << index; - } - } - val - } - #[inline] - pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { - debug_assert!(bit_width <= 64); - debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); - debug_assert!( - (bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len(), - ); - for i in 0..(bit_width as usize) { - let mask = 1 << i; - let val_bit_is_set = val & mask == mask; - let index = if cfg!(target_endian = "big") { - bit_width as usize - 1 - i - } else { - i - }; - self.set_bit(index + bit_offset, val_bit_is_set); - } - } -} -#[repr(C)] -#[derive(Default)] -pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); -impl __IncompleteArrayField { - #[inline] - pub const fn new() -> Self { - __IncompleteArrayField(::core::marker::PhantomData, []) - } - #[inline] - pub fn as_ptr(&self) -> *const T { - self as *const _ as *const T - } - #[inline] - pub fn as_mut_ptr(&mut self) -> *mut T { - self as *mut _ as *mut T - } - #[inline] - pub unsafe fn as_slice(&self, len: usize) -> &[T] { - ::core::slice::from_raw_parts(self.as_ptr(), len) - } - #[inline] - pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { - ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) - } -} -impl ::core::fmt::Debug for __IncompleteArrayField { - fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - fmt.write_str("__IncompleteArrayField") - } -} -#[repr(C)] -pub struct __BindgenUnionField(::core::marker::PhantomData); -impl __BindgenUnionField { - #[inline] - pub const fn new() -> Self { - __BindgenUnionField(::core::marker::PhantomData) - } - #[inline] - pub unsafe fn as_ref(&self) -> &T { - ::core::mem::transmute(self) - } - #[inline] - pub unsafe fn as_mut(&mut self) -> &mut T { - ::core::mem::transmute(self) - } -} -impl ::core::default::Default for __BindgenUnionField { - #[inline] - fn default() -> Self { - Self::new() - } -} -impl ::core::clone::Clone for __BindgenUnionField { - #[inline] - fn clone(&self) -> Self { - *self - } -} -impl ::core::marker::Copy for __BindgenUnionField {} -impl ::core::fmt::Debug for __BindgenUnionField { - fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - fmt.write_str("__BindgenUnionField") - } -} -impl ::core::hash::Hash for __BindgenUnionField { - fn hash(&self, _state: &mut H) {} -} -impl ::core::cmp::PartialEq for __BindgenUnionField { - fn eq(&self, _other: &__BindgenUnionField) -> bool { - true - } -} -impl ::core::cmp::Eq for __BindgenUnionField {} -pub type va_list = *mut ::core::ffi::c_char; -pub type rsize_t = usize; -pub type wchar_t = ::core::ffi::c_ushort; -pub type wint_t = ::core::ffi::c_ushort; -pub type wctype_t = ::core::ffi::c_ushort; -pub type errcode = ::core::ffi::c_int; -pub type errno_t = ::core::ffi::c_int; -pub type __time32_t = ::core::ffi::c_long; -pub type __time64_t = ::core::ffi::c_longlong; -pub type time_t = __time64_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct threadmbcinfostruct { - _unused: [u8; 0], -} -pub type pthreadlocinfo = *mut threadlocaleinfostruct; -pub type pthreadmbcinfo = *mut threadmbcinfostruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __lc_time_data { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct localeinfo_struct { - pub locinfo: pthreadlocinfo, - pub mbcinfo: pthreadmbcinfo, -} -#[test] -fn bindgen_test_layout_localeinfo_struct() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(localeinfo_struct)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(localeinfo_struct)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).locinfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(localeinfo_struct), - "::", - stringify!(locinfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).mbcinfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(localeinfo_struct), - "::", - stringify!(mbcinfo), - ), - ); -} -impl Default for localeinfo_struct { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type _locale_tstruct = localeinfo_struct; -pub type _locale_t = *mut localeinfo_struct; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct tagLC_ID { - pub wLanguage: ::core::ffi::c_ushort, - pub wCountry: ::core::ffi::c_ushort, - pub wCodePage: ::core::ffi::c_ushort, -} -#[test] -fn bindgen_test_layout_tagLC_ID() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 6usize, - concat!("Size of: ", stringify!(tagLC_ID)), - ); - assert_eq!( - ::core::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(tagLC_ID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wLanguage) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(tagLC_ID), "::", stringify!(wLanguage)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wCountry) as usize - ptr as usize }, - 2usize, - concat!("Offset of field: ", stringify!(tagLC_ID), "::", stringify!(wCountry)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wCodePage) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(tagLC_ID), "::", stringify!(wCodePage)), - ); -} -pub type LC_ID = tagLC_ID; -pub type LPLC_ID = *mut tagLC_ID; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct threadlocaleinfostruct { - pub refcount: ::core::ffi::c_int, - pub lc_codepage: ::core::ffi::c_uint, - pub lc_collate_cp: ::core::ffi::c_uint, - pub lc_handle: [::core::ffi::c_ulong; 6usize], - pub lc_id: [LC_ID; 6usize], - pub lc_category: [threadlocaleinfostruct__bindgen_ty_1; 6usize], - pub lc_clike: ::core::ffi::c_int, - pub mb_cur_max: ::core::ffi::c_int, - pub lconv_intl_refcount: *mut ::core::ffi::c_int, - pub lconv_num_refcount: *mut ::core::ffi::c_int, - pub lconv_mon_refcount: *mut ::core::ffi::c_int, - pub lconv: *mut lconv, - pub ctype1_refcount: *mut ::core::ffi::c_int, - pub ctype1: *mut ::core::ffi::c_ushort, - pub pctype: *const ::core::ffi::c_ushort, - pub pclmap: *const ::core::ffi::c_uchar, - pub pcumap: *const ::core::ffi::c_uchar, - pub lc_time_curr: *mut __lc_time_data, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct threadlocaleinfostruct__bindgen_ty_1 { - pub locale: *mut ::core::ffi::c_char, - pub wlocale: *mut wchar_t, - pub refcount: *mut ::core::ffi::c_int, - pub wrefcount: *mut ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_threadlocaleinfostruct__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(threadlocaleinfostruct__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(threadlocaleinfostruct__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).locale) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct__bindgen_ty_1), - "::", - stringify!(locale), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wlocale) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct__bindgen_ty_1), - "::", - stringify!(wlocale), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).refcount) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct__bindgen_ty_1), - "::", - stringify!(refcount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wrefcount) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct__bindgen_ty_1), - "::", - stringify!(wrefcount), - ), - ); -} -impl Default for threadlocaleinfostruct__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout_threadlocaleinfostruct() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 352usize, - concat!("Size of: ", stringify!(threadlocaleinfostruct)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(threadlocaleinfostruct)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).refcount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(refcount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).lc_codepage) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(lc_codepage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).lc_collate_cp) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(lc_collate_cp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).lc_handle) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(lc_handle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).lc_id) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(lc_id), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).lc_category) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(lc_category), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).lc_clike) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(lc_clike), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).mb_cur_max) as usize - ptr as usize }, - 268usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(mb_cur_max), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).lconv_intl_refcount) as usize - ptr as usize - }, - 272usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(lconv_intl_refcount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).lconv_num_refcount) as usize - ptr as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(lconv_num_refcount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).lconv_mon_refcount) as usize - ptr as usize - }, - 288usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(lconv_mon_refcount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).lconv) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(lconv), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ctype1_refcount) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(ctype1_refcount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ctype1) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(ctype1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pctype) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(pctype), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pclmap) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(pclmap), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pcumap) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(pcumap), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).lc_time_curr) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(threadlocaleinfostruct), - "::", - stringify!(lc_time_curr), - ), - ); -} -impl Default for threadlocaleinfostruct { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type threadlocinfo = threadlocaleinfostruct; -pub mod _EXCEPTION_DISPOSITION { - pub type Type = ::core::ffi::c_int; - pub const ExceptionContinueExecution: Type = 0; - pub const ExceptionContinueSearch: Type = 1; - pub const ExceptionNestedException: Type = 2; - pub const ExceptionCollidedUnwind: Type = 3; -} -pub use self::_EXCEPTION_DISPOSITION::Type as EXCEPTION_DISPOSITION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DISPATCHER_CONTEXT { - _unused: [u8; 0], -} -pub type POINTER_64_INT = ::core::ffi::c_ulonglong; -pub type INT8 = ::core::ffi::c_schar; -pub type PINT8 = *mut ::core::ffi::c_schar; -pub type INT16 = ::core::ffi::c_short; -pub type PINT16 = *mut ::core::ffi::c_short; -pub type INT32 = ::core::ffi::c_int; -pub type PINT32 = *mut ::core::ffi::c_int; -pub type INT64 = ::core::ffi::c_longlong; -pub type PINT64 = *mut ::core::ffi::c_longlong; -pub type UINT8 = ::core::ffi::c_uchar; -pub type PUINT8 = *mut ::core::ffi::c_uchar; -pub type UINT16 = ::core::ffi::c_ushort; -pub type PUINT16 = *mut ::core::ffi::c_ushort; -pub type UINT32 = ::core::ffi::c_uint; -pub type PUINT32 = *mut ::core::ffi::c_uint; -pub type UINT64 = ::core::ffi::c_ulonglong; -pub type PUINT64 = *mut ::core::ffi::c_ulonglong; -pub type LONG32 = ::core::ffi::c_int; -pub type PLONG32 = *mut ::core::ffi::c_int; -pub type ULONG32 = ::core::ffi::c_uint; -pub type PULONG32 = *mut ::core::ffi::c_uint; -pub type DWORD32 = ::core::ffi::c_uint; -pub type PDWORD32 = *mut ::core::ffi::c_uint; -pub type INT_PTR = ::core::ffi::c_longlong; -pub type PINT_PTR = *mut ::core::ffi::c_longlong; -pub type UINT_PTR = ::core::ffi::c_ulonglong; -pub type PUINT_PTR = *mut ::core::ffi::c_ulonglong; -pub type LONG_PTR = ::core::ffi::c_longlong; -pub type PLONG_PTR = *mut ::core::ffi::c_longlong; -pub type ULONG_PTR = ::core::ffi::c_ulonglong; -pub type PULONG_PTR = *mut ::core::ffi::c_ulonglong; -pub type PHANDLE64 = *mut *mut ::core::ffi::c_void; -pub type SHANDLE_PTR = ::core::ffi::c_longlong; -pub type HANDLE_PTR = ::core::ffi::c_ulonglong; -pub type UHALF_PTR = ::core::ffi::c_uint; -pub type PUHALF_PTR = *mut ::core::ffi::c_uint; -pub type HALF_PTR = ::core::ffi::c_int; -pub type PHALF_PTR = *mut ::core::ffi::c_int; -pub type SIZE_T = ULONG_PTR; -pub type PSIZE_T = *mut ULONG_PTR; -pub type SSIZE_T = LONG_PTR; -pub type PSSIZE_T = *mut LONG_PTR; -pub type DWORD_PTR = ULONG_PTR; -pub type PDWORD_PTR = *mut ULONG_PTR; -pub type LONG64 = ::core::ffi::c_longlong; -pub type PLONG64 = *mut ::core::ffi::c_longlong; -pub type ULONG64 = ::core::ffi::c_ulonglong; -pub type PULONG64 = *mut ::core::ffi::c_ulonglong; -pub type DWORD64 = ::core::ffi::c_ulonglong; -pub type PDWORD64 = *mut ::core::ffi::c_ulonglong; -pub type KAFFINITY = ULONG_PTR; -pub type PKAFFINITY = *mut KAFFINITY; -pub type PVOID = *mut ::core::ffi::c_void; -pub type CHAR = ::core::ffi::c_char; -pub type SHORT = ::core::ffi::c_short; -pub type LONG = ::core::ffi::c_long; -pub type INT = ::core::ffi::c_int; -pub type WCHAR = wchar_t; -pub type PWCHAR = *mut WCHAR; -pub type LPWCH = *mut WCHAR; -pub type PWCH = *mut WCHAR; -pub type LPCWCH = *const WCHAR; -pub type PCWCH = *const WCHAR; -pub type NWPSTR = *mut WCHAR; -pub type LPWSTR = *mut WCHAR; -pub type PWSTR = *mut WCHAR; -pub type PZPWSTR = *mut PWSTR; -pub type PCZPWSTR = *const PWSTR; -pub type LPUWSTR = *mut WCHAR; -pub type PUWSTR = *mut WCHAR; -pub type LPCWSTR = *const WCHAR; -pub type PCWSTR = *const WCHAR; -pub type PZPCWSTR = *mut PCWSTR; -pub type PCZPCWSTR = *const PCWSTR; -pub type LPCUWSTR = *const WCHAR; -pub type PCUWSTR = *const WCHAR; -pub type PZZWSTR = *mut WCHAR; -pub type PCZZWSTR = *const WCHAR; -pub type PUZZWSTR = *mut WCHAR; -pub type PCUZZWSTR = *const WCHAR; -pub type PNZWCH = *mut WCHAR; -pub type PCNZWCH = *const WCHAR; -pub type PUNZWCH = *mut WCHAR; -pub type PCUNZWCH = *const WCHAR; -pub type PCHAR = *mut CHAR; -pub type LPCH = *mut CHAR; -pub type PCH = *mut CHAR; -pub type LPCCH = *const CHAR; -pub type PCCH = *const CHAR; -pub type NPSTR = *mut CHAR; -pub type LPSTR = *mut CHAR; -pub type PSTR = *mut CHAR; -pub type PZPSTR = *mut PSTR; -pub type PCZPSTR = *const PSTR; -pub type LPCSTR = *const CHAR; -pub type PCSTR = *const CHAR; -pub type PZPCSTR = *mut PCSTR; -pub type PCZPCSTR = *const PCSTR; -pub type PZZSTR = *mut CHAR; -pub type PCZZSTR = *const CHAR; -pub type PNZCH = *mut CHAR; -pub type PCNZCH = *const CHAR; -pub type TCHAR = ::core::ffi::c_char; -pub type PTCHAR = *mut ::core::ffi::c_char; -pub type TUCHAR = ::core::ffi::c_uchar; -pub type PTUCHAR = *mut ::core::ffi::c_uchar; -pub type LPTCH = LPCH; -pub type PTCH = LPCH; -pub type LPCTCH = LPCCH; -pub type PCTCH = LPCCH; -pub type PTSTR = LPSTR; -pub type LPTSTR = LPSTR; -pub type PUTSTR = LPSTR; -pub type LPUTSTR = LPSTR; -pub type PCTSTR = LPCSTR; -pub type LPCTSTR = LPCSTR; -pub type PCUTSTR = LPCSTR; -pub type LPCUTSTR = LPCSTR; -pub type PZZTSTR = PZZSTR; -pub type PUZZTSTR = PZZSTR; -pub type PCZZTSTR = PCZZSTR; -pub type PCUZZTSTR = PCZZSTR; -pub type PZPTSTR = PZPSTR; -pub type PNZTCH = PNZCH; -pub type PUNZTCH = PNZCH; -pub type PCNZTCH = PCNZCH; -pub type PCUNZTCH = PCNZCH; -pub type DOUBLE = f64; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _QUAD { - pub __bindgen_anon_1: _QUAD__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _QUAD__bindgen_ty_1 { - pub UseThisFieldToCopy: ::core::ffi::c_longlong, - pub DoNotUseThisField: f64, -} -#[test] -fn bindgen_test_layout__QUAD__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_QUAD__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUAD__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_QUAD__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_QUAD__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_QUAD__bindgen_ty_1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UseThisFieldToCopy) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUAD__bindgen_ty_1), - "::", - stringify!(UseThisFieldToCopy), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DoNotUseThisField) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUAD__bindgen_ty_1), - "::", - stringify!(DoNotUseThisField), - ), - ); -} -impl Default for _QUAD__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__QUAD() { - assert_eq!( - ::core::mem::size_of::<_QUAD>(), - 8usize, - concat!("Size of: ", stringify!(_QUAD)), - ); - assert_eq!( - ::core::mem::align_of::<_QUAD>(), - 8usize, - concat!("Alignment of ", stringify!(_QUAD)), - ); -} -impl Default for _QUAD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type QUAD = _QUAD; -pub type PSHORT = *mut SHORT; -pub type PLONG = *mut LONG; -pub type PQUAD = *mut QUAD; -pub type UCHAR = ::core::ffi::c_uchar; -pub type USHORT = ::core::ffi::c_ushort; -pub type ULONG = ::core::ffi::c_ulong; -pub type UQUAD = QUAD; -pub type PUCHAR = *mut UCHAR; -pub type PUSHORT = *mut USHORT; -pub type PULONG = *mut ULONG; -pub type PUQUAD = *mut UQUAD; -pub type SCHAR = ::core::ffi::c_schar; -pub type PSCHAR = *mut SCHAR; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESSOR_NUMBER { - pub Group: USHORT, - pub Number: UCHAR, - pub Reserved: UCHAR, -} -#[test] -fn bindgen_test_layout__PROCESSOR_NUMBER() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESSOR_NUMBER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESSOR_NUMBER>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESSOR_NUMBER)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESSOR_NUMBER>(), - 2usize, - concat!("Alignment of ", stringify!(_PROCESSOR_NUMBER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Group) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESSOR_NUMBER), - "::", - stringify!(Group), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Number) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PROCESSOR_NUMBER), - "::", - stringify!(Number), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_PROCESSOR_NUMBER), - "::", - stringify!(Reserved), - ), - ); -} -pub type PROCESSOR_NUMBER = _PROCESSOR_NUMBER; -pub type PPROCESSOR_NUMBER = *mut _PROCESSOR_NUMBER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _GROUP_AFFINITY { - pub Mask: KAFFINITY, - pub Group: USHORT, - pub Reserved: [USHORT; 3usize], -} -#[test] -fn bindgen_test_layout__GROUP_AFFINITY() { - const UNINIT: ::core::mem::MaybeUninit<_GROUP_AFFINITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GROUP_AFFINITY>(), - 16usize, - concat!("Size of: ", stringify!(_GROUP_AFFINITY)), - ); - assert_eq!( - ::core::mem::align_of::<_GROUP_AFFINITY>(), - 8usize, - concat!("Alignment of ", stringify!(_GROUP_AFFINITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_GROUP_AFFINITY), "::", stringify!(Mask)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Group) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GROUP_AFFINITY), - "::", - stringify!(Group), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_GROUP_AFFINITY), - "::", - stringify!(Reserved), - ), - ); -} -pub type GROUP_AFFINITY = _GROUP_AFFINITY; -pub type PGROUP_AFFINITY = *mut _GROUP_AFFINITY; -pub type HANDLE = *mut ::core::ffi::c_void; -pub type PHANDLE = *mut HANDLE; -pub type FCHAR = UCHAR; -pub type FSHORT = USHORT; -pub type FLONG = ULONG; -pub type HRESULT = ::core::ffi::c_long; -pub type CCHAR = ::core::ffi::c_char; -pub type CSHORT = ::core::ffi::c_short; -pub type CLONG = ULONG; -pub type PCCHAR = *mut CCHAR; -pub type PCSHORT = *mut CSHORT; -pub type PCLONG = *mut CLONG; -pub type LCID = ULONG; -pub type PLCID = PULONG; -pub type LANGID = USHORT; -pub mod COMPARTMENT_ID { - pub type Type = ::core::ffi::c_int; - pub const UNSPECIFIED_COMPARTMENT_ID: Type = 0; - pub const DEFAULT_COMPARTMENT_ID: Type = 1; -} -pub type PCOMPARTMENT_ID = *mut COMPARTMENT_ID::Type; -pub type LOGICAL = ULONG; -pub type PLOGICAL = *mut ULONG; -pub type NTSTATUS = LONG; -pub type PNTSTATUS = *mut NTSTATUS; -pub type SECURITY_STATUS = ::core::ffi::c_long; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FLOAT128 { - pub LowPart: ::core::ffi::c_longlong, - pub HighPart: ::core::ffi::c_longlong, -} -#[test] -fn bindgen_test_layout__FLOAT128() { - const UNINIT: ::core::mem::MaybeUninit<_FLOAT128> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FLOAT128>(), - 16usize, - concat!("Size of: ", stringify!(_FLOAT128)), - ); - assert_eq!( - ::core::mem::align_of::<_FLOAT128>(), - 8usize, - concat!("Alignment of ", stringify!(_FLOAT128)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowPart) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_FLOAT128), "::", stringify!(LowPart)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HighPart) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_FLOAT128), "::", stringify!(HighPart)), - ); -} -pub type FLOAT128 = _FLOAT128; -pub type PFLOAT128 = *mut FLOAT128; -pub type LONGLONG = ::core::ffi::c_longlong; -pub type ULONGLONG = ::core::ffi::c_ulonglong; -pub type PLONGLONG = *mut LONGLONG; -pub type PULONGLONG = *mut ULONGLONG; -pub type USN = LONGLONG; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _LARGE_INTEGER { - pub __bindgen_anon_1: _LARGE_INTEGER__bindgen_ty_1, - pub u: _LARGE_INTEGER__bindgen_ty_2, - pub QuadPart: LONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _LARGE_INTEGER__bindgen_ty_1 { - pub LowPart: ULONG, - pub HighPart: LONG, -} -#[test] -fn bindgen_test_layout__LARGE_INTEGER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_LARGE_INTEGER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LARGE_INTEGER__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_LARGE_INTEGER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_LARGE_INTEGER__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_LARGE_INTEGER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowPart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LARGE_INTEGER__bindgen_ty_1), - "::", - stringify!(LowPart), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HighPart) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_LARGE_INTEGER__bindgen_ty_1), - "::", - stringify!(HighPart), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _LARGE_INTEGER__bindgen_ty_2 { - pub LowPart: ULONG, - pub HighPart: LONG, -} -#[test] -fn bindgen_test_layout__LARGE_INTEGER__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_LARGE_INTEGER__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LARGE_INTEGER__bindgen_ty_2>(), - 8usize, - concat!("Size of: ", stringify!(_LARGE_INTEGER__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_LARGE_INTEGER__bindgen_ty_2>(), - 4usize, - concat!("Alignment of ", stringify!(_LARGE_INTEGER__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowPart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LARGE_INTEGER__bindgen_ty_2), - "::", - stringify!(LowPart), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HighPart) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_LARGE_INTEGER__bindgen_ty_2), - "::", - stringify!(HighPart), - ), - ); -} -#[test] -fn bindgen_test_layout__LARGE_INTEGER() { - const UNINIT: ::core::mem::MaybeUninit<_LARGE_INTEGER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LARGE_INTEGER>(), - 8usize, - concat!("Size of: ", stringify!(_LARGE_INTEGER)), - ); - assert_eq!( - ::core::mem::align_of::<_LARGE_INTEGER>(), - 8usize, - concat!("Alignment of ", stringify!(_LARGE_INTEGER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_LARGE_INTEGER), "::", stringify!(u)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QuadPart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LARGE_INTEGER), - "::", - stringify!(QuadPart), - ), - ); -} -impl Default for _LARGE_INTEGER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type LARGE_INTEGER = _LARGE_INTEGER; -pub type PLARGE_INTEGER = *mut LARGE_INTEGER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _ULARGE_INTEGER { - pub __bindgen_anon_1: _ULARGE_INTEGER__bindgen_ty_1, - pub u: _ULARGE_INTEGER__bindgen_ty_2, - pub QuadPart: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ULARGE_INTEGER__bindgen_ty_1 { - pub LowPart: ULONG, - pub HighPart: ULONG, -} -#[test] -fn bindgen_test_layout__ULARGE_INTEGER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_ULARGE_INTEGER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ULARGE_INTEGER__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_ULARGE_INTEGER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_ULARGE_INTEGER__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_ULARGE_INTEGER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowPart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ULARGE_INTEGER__bindgen_ty_1), - "::", - stringify!(LowPart), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HighPart) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ULARGE_INTEGER__bindgen_ty_1), - "::", - stringify!(HighPart), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ULARGE_INTEGER__bindgen_ty_2 { - pub LowPart: ULONG, - pub HighPart: ULONG, -} -#[test] -fn bindgen_test_layout__ULARGE_INTEGER__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_ULARGE_INTEGER__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ULARGE_INTEGER__bindgen_ty_2>(), - 8usize, - concat!("Size of: ", stringify!(_ULARGE_INTEGER__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_ULARGE_INTEGER__bindgen_ty_2>(), - 4usize, - concat!("Alignment of ", stringify!(_ULARGE_INTEGER__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowPart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ULARGE_INTEGER__bindgen_ty_2), - "::", - stringify!(LowPart), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HighPart) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ULARGE_INTEGER__bindgen_ty_2), - "::", - stringify!(HighPart), - ), - ); -} -#[test] -fn bindgen_test_layout__ULARGE_INTEGER() { - const UNINIT: ::core::mem::MaybeUninit<_ULARGE_INTEGER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ULARGE_INTEGER>(), - 8usize, - concat!("Size of: ", stringify!(_ULARGE_INTEGER)), - ); - assert_eq!( - ::core::mem::align_of::<_ULARGE_INTEGER>(), - 8usize, - concat!("Alignment of ", stringify!(_ULARGE_INTEGER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_ULARGE_INTEGER), "::", stringify!(u)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QuadPart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ULARGE_INTEGER), - "::", - stringify!(QuadPart), - ), - ); -} -impl Default for _ULARGE_INTEGER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ULARGE_INTEGER = _ULARGE_INTEGER; -pub type PULARGE_INTEGER = *mut ULARGE_INTEGER; -pub type RTL_REFERENCE_COUNT = LONG_PTR; -pub type PRTL_REFERENCE_COUNT = *mut LONG_PTR; -pub type RTL_REFERENCE_COUNT32 = LONG; -pub type PRTL_REFERENCE_COUNT32 = *mut LONG; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _LUID { - pub LowPart: ULONG, - pub HighPart: LONG, -} -#[test] -fn bindgen_test_layout__LUID() { - const UNINIT: ::core::mem::MaybeUninit<_LUID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LUID>(), - 8usize, - concat!("Size of: ", stringify!(_LUID)), - ); - assert_eq!( - ::core::mem::align_of::<_LUID>(), - 4usize, - concat!("Alignment of ", stringify!(_LUID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowPart) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_LUID), "::", stringify!(LowPart)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HighPart) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_LUID), "::", stringify!(HighPart)), - ); -} -pub type LUID = _LUID; -pub type PLUID = *mut _LUID; -pub type DWORDLONG = ULONGLONG; -pub type PDWORDLONG = *mut DWORDLONG; -pub type PHYSICAL_ADDRESS = LARGE_INTEGER; -pub type PPHYSICAL_ADDRESS = *mut LARGE_INTEGER; -pub mod _EVENT_TYPE { - pub type Type = ::core::ffi::c_int; - pub const NotificationEvent: Type = 0; - pub const SynchronizationEvent: Type = 1; -} -pub use self::_EVENT_TYPE::Type as EVENT_TYPE; -pub mod _TIMER_TYPE { - pub type Type = ::core::ffi::c_int; - pub const NotificationTimer: Type = 0; - pub const SynchronizationTimer: Type = 1; -} -pub use self::_TIMER_TYPE::Type as TIMER_TYPE; -pub mod _WAIT_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WaitAll: Type = 0; - pub const WaitAny: Type = 1; - pub const WaitNotification: Type = 2; - pub const WaitDequeue: Type = 3; - pub const WaitDpc: Type = 4; -} -pub use self::_WAIT_TYPE::Type as WAIT_TYPE; -pub type PSZ = *mut CHAR; -pub type PCSZ = *const ::core::ffi::c_char; -pub type RTL_STRING_LENGTH_TYPE = USHORT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _STRING { - pub Length: USHORT, - pub MaximumLength: USHORT, - pub Buffer: PCHAR, -} -#[test] -fn bindgen_test_layout__STRING() { - const UNINIT: ::core::mem::MaybeUninit<_STRING> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STRING>(), - 16usize, - concat!("Size of: ", stringify!(_STRING)), - ); - assert_eq!( - ::core::mem::align_of::<_STRING>(), - 8usize, - concat!("Alignment of ", stringify!(_STRING)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_STRING), "::", stringify!(Length)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_STRING), - "::", - stringify!(MaximumLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_STRING), "::", stringify!(Buffer)), - ); -} -impl Default for _STRING { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type STRING = _STRING; -pub type PSTRING = *mut STRING; -pub type ANSI_STRING = STRING; -pub type PANSI_STRING = PSTRING; -pub type OEM_STRING = STRING; -pub type POEM_STRING = PSTRING; -pub type PCOEM_STRING = *const STRING; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CSTRING { - pub Length: USHORT, - pub MaximumLength: USHORT, - pub Buffer: *const ::core::ffi::c_char, -} -#[test] -fn bindgen_test_layout__CSTRING() { - const UNINIT: ::core::mem::MaybeUninit<_CSTRING> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSTRING>(), - 16usize, - concat!("Size of: ", stringify!(_CSTRING)), - ); - assert_eq!( - ::core::mem::align_of::<_CSTRING>(), - 8usize, - concat!("Alignment of ", stringify!(_CSTRING)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_CSTRING), "::", stringify!(Length)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CSTRING), - "::", - stringify!(MaximumLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_CSTRING), "::", stringify!(Buffer)), - ); -} -impl Default for _CSTRING { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CSTRING = _CSTRING; -pub type PCSTRING = *mut CSTRING; -pub type CANSI_STRING = STRING; -pub type PCANSI_STRING = PSTRING; -pub type UTF8_STRING = STRING; -pub type PUTF8_STRING = PSTRING; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _UNICODE_STRING { - pub Length: USHORT, - pub MaximumLength: USHORT, - pub Buffer: PWCH, -} -#[test] -fn bindgen_test_layout__UNICODE_STRING() { - const UNINIT: ::core::mem::MaybeUninit<_UNICODE_STRING> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_UNICODE_STRING>(), - 16usize, - concat!("Size of: ", stringify!(_UNICODE_STRING)), - ); - assert_eq!( - ::core::mem::align_of::<_UNICODE_STRING>(), - 8usize, - concat!("Alignment of ", stringify!(_UNICODE_STRING)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_UNICODE_STRING), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_UNICODE_STRING), - "::", - stringify!(MaximumLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_UNICODE_STRING), - "::", - stringify!(Buffer), - ), - ); -} -impl Default for _UNICODE_STRING { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type UNICODE_STRING = _UNICODE_STRING; -pub type PUNICODE_STRING = *mut UNICODE_STRING; -pub type PCUNICODE_STRING = *const UNICODE_STRING; -pub type BOOLEAN = UCHAR; -pub type PBOOLEAN = *mut BOOLEAN; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _LIST_ENTRY { - pub Flink: *mut _LIST_ENTRY, - pub Blink: *mut _LIST_ENTRY, -} -#[test] -fn bindgen_test_layout__LIST_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_LIST_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LIST_ENTRY>(), - 16usize, - concat!("Size of: ", stringify!(_LIST_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_LIST_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_LIST_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flink) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_LIST_ENTRY), "::", stringify!(Flink)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Blink) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_LIST_ENTRY), "::", stringify!(Blink)), - ); -} -impl Default for _LIST_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type LIST_ENTRY = _LIST_ENTRY; -pub type PLIST_ENTRY = *mut _LIST_ENTRY; -pub type PRLIST_ENTRY = *mut _LIST_ENTRY; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SINGLE_LIST_ENTRY { - pub Next: *mut _SINGLE_LIST_ENTRY, -} -#[test] -fn bindgen_test_layout__SINGLE_LIST_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_SINGLE_LIST_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SINGLE_LIST_ENTRY>(), - 8usize, - concat!("Size of: ", stringify!(_SINGLE_LIST_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_SINGLE_LIST_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_SINGLE_LIST_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Next) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SINGLE_LIST_ENTRY), - "::", - stringify!(Next), - ), - ); -} -impl Default for _SINGLE_LIST_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SINGLE_LIST_ENTRY = _SINGLE_LIST_ENTRY; -pub type PSINGLE_LIST_ENTRY = *mut _SINGLE_LIST_ENTRY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _RTL_BALANCED_NODE { - pub __bindgen_anon_1: _RTL_BALANCED_NODE__bindgen_ty_1, - pub __bindgen_anon_2: _RTL_BALANCED_NODE__bindgen_ty_2, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _RTL_BALANCED_NODE__bindgen_ty_1 { - pub Children: [*mut _RTL_BALANCED_NODE; 2usize], - pub __bindgen_anon_1: _RTL_BALANCED_NODE__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RTL_BALANCED_NODE__bindgen_ty_1__bindgen_ty_1 { - pub Left: *mut _RTL_BALANCED_NODE, - pub Right: *mut _RTL_BALANCED_NODE, -} -#[test] -fn bindgen_test_layout__RTL_BALANCED_NODE__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _RTL_BALANCED_NODE__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_BALANCED_NODE__bindgen_ty_1__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_RTL_BALANCED_NODE__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_BALANCED_NODE__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_RTL_BALANCED_NODE__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Left) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_BALANCED_NODE__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Left), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Right) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RTL_BALANCED_NODE__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Right), - ), - ); -} -impl Default for _RTL_BALANCED_NODE__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__RTL_BALANCED_NODE__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_BALANCED_NODE__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_BALANCED_NODE__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_RTL_BALANCED_NODE__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_BALANCED_NODE__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_BALANCED_NODE__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Children) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_BALANCED_NODE__bindgen_ty_1), - "::", - stringify!(Children), - ), - ); -} -impl Default for _RTL_BALANCED_NODE__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _RTL_BALANCED_NODE__bindgen_ty_2 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - pub ParentValue: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__RTL_BALANCED_NODE__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_BALANCED_NODE__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_BALANCED_NODE__bindgen_ty_2>(), - 8usize, - concat!("Size of: ", stringify!(_RTL_BALANCED_NODE__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_BALANCED_NODE__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_BALANCED_NODE__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParentValue) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_BALANCED_NODE__bindgen_ty_2), - "::", - stringify!(ParentValue), - ), - ); -} -impl Default for _RTL_BALANCED_NODE__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -impl _RTL_BALANCED_NODE__bindgen_ty_2 { - #[inline] - pub fn Red(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_Red(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Balance(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u8) } - } - #[inline] - pub fn set_Balance(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 2u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Red: UCHAR, - Balance: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Red: u8 = unsafe { ::core::mem::transmute(Red) }; - Red as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 2u8, - { - let Balance: u8 = unsafe { ::core::mem::transmute(Balance) }; - Balance as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__RTL_BALANCED_NODE() { - assert_eq!( - ::core::mem::size_of::<_RTL_BALANCED_NODE>(), - 24usize, - concat!("Size of: ", stringify!(_RTL_BALANCED_NODE)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_BALANCED_NODE>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_BALANCED_NODE)), - ); -} -impl Default for _RTL_BALANCED_NODE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_BALANCED_NODE = _RTL_BALANCED_NODE; -pub type PRTL_BALANCED_NODE = *mut _RTL_BALANCED_NODE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct LIST_ENTRY32 { - pub Flink: ULONG, - pub Blink: ULONG, -} -#[test] -fn bindgen_test_layout_LIST_ENTRY32() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(LIST_ENTRY32)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(LIST_ENTRY32)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flink) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(LIST_ENTRY32), "::", stringify!(Flink)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Blink) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(LIST_ENTRY32), "::", stringify!(Blink)), - ); -} -pub type PLIST_ENTRY32 = *mut LIST_ENTRY32; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct LIST_ENTRY64 { - pub Flink: ULONGLONG, - pub Blink: ULONGLONG, -} -#[test] -fn bindgen_test_layout_LIST_ENTRY64() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(LIST_ENTRY64)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(LIST_ENTRY64)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flink) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(LIST_ENTRY64), "::", stringify!(Flink)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Blink) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(LIST_ENTRY64), "::", stringify!(Blink)), - ); -} -pub type PLIST_ENTRY64 = *mut LIST_ENTRY64; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SINGLE_LIST_ENTRY32 { - pub Next: ULONG, -} -#[test] -fn bindgen_test_layout__SINGLE_LIST_ENTRY32() { - const UNINIT: ::core::mem::MaybeUninit<_SINGLE_LIST_ENTRY32> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SINGLE_LIST_ENTRY32>(), - 4usize, - concat!("Size of: ", stringify!(_SINGLE_LIST_ENTRY32)), - ); - assert_eq!( - ::core::mem::align_of::<_SINGLE_LIST_ENTRY32>(), - 4usize, - concat!("Alignment of ", stringify!(_SINGLE_LIST_ENTRY32)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Next) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SINGLE_LIST_ENTRY32), - "::", - stringify!(Next), - ), - ); -} -pub type SINGLE_LIST_ENTRY32 = _SINGLE_LIST_ENTRY32; -pub type PSINGLE_LIST_ENTRY32 = *mut _SINGLE_LIST_ENTRY32; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WNF_STATE_NAME { - pub Data: [ULONG; 2usize], -} -#[test] -fn bindgen_test_layout__WNF_STATE_NAME() { - const UNINIT: ::core::mem::MaybeUninit<_WNF_STATE_NAME> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WNF_STATE_NAME>(), - 8usize, - concat!("Size of: ", stringify!(_WNF_STATE_NAME)), - ); - assert_eq!( - ::core::mem::align_of::<_WNF_STATE_NAME>(), - 4usize, - concat!("Alignment of ", stringify!(_WNF_STATE_NAME)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_WNF_STATE_NAME), "::", stringify!(Data)), - ); -} -pub type WNF_STATE_NAME = _WNF_STATE_NAME; -pub type PWNF_STATE_NAME = *mut _WNF_STATE_NAME; -pub type PCWNF_STATE_NAME = *const _WNF_STATE_NAME; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _STRING32 { - pub Length: USHORT, - pub MaximumLength: USHORT, - pub Buffer: ULONG, -} -#[test] -fn bindgen_test_layout__STRING32() { - const UNINIT: ::core::mem::MaybeUninit<_STRING32> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STRING32>(), - 8usize, - concat!("Size of: ", stringify!(_STRING32)), - ); - assert_eq!( - ::core::mem::align_of::<_STRING32>(), - 4usize, - concat!("Alignment of ", stringify!(_STRING32)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_STRING32), "::", stringify!(Length)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_STRING32), - "::", - stringify!(MaximumLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_STRING32), "::", stringify!(Buffer)), - ); -} -pub type STRING32 = _STRING32; -pub type PSTRING32 = *mut STRING32; -pub type UNICODE_STRING32 = STRING32; -pub type PUNICODE_STRING32 = *mut UNICODE_STRING32; -pub type ANSI_STRING32 = STRING32; -pub type PANSI_STRING32 = *mut ANSI_STRING32; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _STRING64 { - pub Length: USHORT, - pub MaximumLength: USHORT, - pub Buffer: ULONGLONG, -} -#[test] -fn bindgen_test_layout__STRING64() { - const UNINIT: ::core::mem::MaybeUninit<_STRING64> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STRING64>(), - 16usize, - concat!("Size of: ", stringify!(_STRING64)), - ); - assert_eq!( - ::core::mem::align_of::<_STRING64>(), - 8usize, - concat!("Alignment of ", stringify!(_STRING64)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_STRING64), "::", stringify!(Length)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_STRING64), - "::", - stringify!(MaximumLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_STRING64), "::", stringify!(Buffer)), - ); -} -pub type STRING64 = _STRING64; -pub type PSTRING64 = *mut STRING64; -pub type UNICODE_STRING64 = STRING64; -pub type PUNICODE_STRING64 = *mut UNICODE_STRING64; -pub type ANSI_STRING64 = STRING64; -pub type PANSI_STRING64 = *mut ANSI_STRING64; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _OBJECT_ATTRIBUTES64 { - pub Length: ULONG, - pub RootDirectory: ULONG64, - pub ObjectName: ULONG64, - pub Attributes: ULONG, - pub SecurityDescriptor: ULONG64, - pub SecurityQualityOfService: ULONG64, -} -#[test] -fn bindgen_test_layout__OBJECT_ATTRIBUTES64() { - const UNINIT: ::core::mem::MaybeUninit<_OBJECT_ATTRIBUTES64> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OBJECT_ATTRIBUTES64>(), - 48usize, - concat!("Size of: ", stringify!(_OBJECT_ATTRIBUTES64)), - ); - assert_eq!( - ::core::mem::align_of::<_OBJECT_ATTRIBUTES64>(), - 8usize, - concat!("Alignment of ", stringify!(_OBJECT_ATTRIBUTES64)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES64), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootDirectory) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES64), - "::", - stringify!(RootDirectory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectName) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES64), - "::", - stringify!(ObjectName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Attributes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES64), - "::", - stringify!(Attributes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityDescriptor) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES64), - "::", - stringify!(SecurityDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityQualityOfService) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES64), - "::", - stringify!(SecurityQualityOfService), - ), - ); -} -pub type OBJECT_ATTRIBUTES64 = _OBJECT_ATTRIBUTES64; -pub type POBJECT_ATTRIBUTES64 = *mut OBJECT_ATTRIBUTES64; -pub type PCOBJECT_ATTRIBUTES64 = *const OBJECT_ATTRIBUTES64; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _OBJECT_ATTRIBUTES32 { - pub Length: ULONG, - pub RootDirectory: ULONG, - pub ObjectName: ULONG, - pub Attributes: ULONG, - pub SecurityDescriptor: ULONG, - pub SecurityQualityOfService: ULONG, -} -#[test] -fn bindgen_test_layout__OBJECT_ATTRIBUTES32() { - const UNINIT: ::core::mem::MaybeUninit<_OBJECT_ATTRIBUTES32> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OBJECT_ATTRIBUTES32>(), - 24usize, - concat!("Size of: ", stringify!(_OBJECT_ATTRIBUTES32)), - ); - assert_eq!( - ::core::mem::align_of::<_OBJECT_ATTRIBUTES32>(), - 4usize, - concat!("Alignment of ", stringify!(_OBJECT_ATTRIBUTES32)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES32), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootDirectory) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES32), - "::", - stringify!(RootDirectory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES32), - "::", - stringify!(ObjectName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Attributes) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES32), - "::", - stringify!(Attributes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityDescriptor) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES32), - "::", - stringify!(SecurityDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityQualityOfService) as usize - - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES32), - "::", - stringify!(SecurityQualityOfService), - ), - ); -} -pub type OBJECT_ATTRIBUTES32 = _OBJECT_ATTRIBUTES32; -pub type POBJECT_ATTRIBUTES32 = *mut OBJECT_ATTRIBUTES32; -pub type PCOBJECT_ATTRIBUTES32 = *const OBJECT_ATTRIBUTES32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OBJECT_ATTRIBUTES { - pub Length: ULONG, - pub RootDirectory: HANDLE, - pub ObjectName: PUNICODE_STRING, - pub Attributes: ULONG, - pub SecurityDescriptor: PVOID, - pub SecurityQualityOfService: PVOID, -} -#[test] -fn bindgen_test_layout__OBJECT_ATTRIBUTES() { - const UNINIT: ::core::mem::MaybeUninit<_OBJECT_ATTRIBUTES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OBJECT_ATTRIBUTES>(), - 48usize, - concat!("Size of: ", stringify!(_OBJECT_ATTRIBUTES)), - ); - assert_eq!( - ::core::mem::align_of::<_OBJECT_ATTRIBUTES>(), - 8usize, - concat!("Alignment of ", stringify!(_OBJECT_ATTRIBUTES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootDirectory) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES), - "::", - stringify!(RootDirectory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectName) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES), - "::", - stringify!(ObjectName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Attributes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES), - "::", - stringify!(Attributes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityDescriptor) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES), - "::", - stringify!(SecurityDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityQualityOfService) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_ATTRIBUTES), - "::", - stringify!(SecurityQualityOfService), - ), - ); -} -impl Default for _OBJECT_ATTRIBUTES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OBJECT_ATTRIBUTES = _OBJECT_ATTRIBUTES; -pub type POBJECT_ATTRIBUTES = *mut OBJECT_ATTRIBUTES; -pub type PCOBJECT_ATTRIBUTES = *const OBJECT_ATTRIBUTES; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _GUID { - pub Data1: ::core::ffi::c_ulong, - pub Data2: ::core::ffi::c_ushort, - pub Data3: ::core::ffi::c_ushort, - pub Data4: [::core::ffi::c_uchar; 8usize], -} -#[test] -fn bindgen_test_layout__GUID() { - const UNINIT: ::core::mem::MaybeUninit<_GUID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GUID>(), - 16usize, - concat!("Size of: ", stringify!(_GUID)), - ); - assert_eq!( - ::core::mem::align_of::<_GUID>(), - 4usize, - concat!("Alignment of ", stringify!(_GUID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data1) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_GUID), "::", stringify!(Data1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data2) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_GUID), "::", stringify!(Data2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data3) as usize - ptr as usize }, - 6usize, - concat!("Offset of field: ", stringify!(_GUID), "::", stringify!(Data3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data4) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_GUID), "::", stringify!(Data4)), - ); -} -pub type GUID = _GUID; -pub type LPGUID = *mut GUID; -pub type LPCGUID = *const GUID; -pub type IID = GUID; -pub type LPIID = *mut IID; -pub type CLSID = GUID; -pub type LPCLSID = *mut CLSID; -pub type FMTID = GUID; -pub type LPFMTID = *mut FMTID; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _OBJECTID { - pub Lineage: GUID, - pub Uniquifier: ULONG, -} -#[test] -fn bindgen_test_layout__OBJECTID() { - const UNINIT: ::core::mem::MaybeUninit<_OBJECTID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OBJECTID>(), - 20usize, - concat!("Size of: ", stringify!(_OBJECTID)), - ); - assert_eq!( - ::core::mem::align_of::<_OBJECTID>(), - 4usize, - concat!("Alignment of ", stringify!(_OBJECTID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lineage) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_OBJECTID), "::", stringify!(Lineage)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Uniquifier) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_OBJECTID), "::", stringify!(Uniquifier)), - ); -} -pub type OBJECTID = _OBJECTID; -pub type PEXCEPTION_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - arg1: *mut _EXCEPTION_RECORD, - arg2: PVOID, - arg3: *mut _CONTEXT, - arg4: PVOID, - ) -> EXCEPTION_DISPOSITION, ->; -pub type KIRQL = UCHAR; -pub type PKIRQL = *mut KIRQL; -pub mod _NT_PRODUCT_TYPE { - pub type Type = ::core::ffi::c_int; - pub const NtProductWinNt: Type = 1; - pub const NtProductLanManNt: Type = 2; - pub const NtProductServer: Type = 3; -} -pub use self::_NT_PRODUCT_TYPE::Type as NT_PRODUCT_TYPE; -pub type PNT_PRODUCT_TYPE = *mut _NT_PRODUCT_TYPE::Type; -pub mod _SUITE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const SmallBusiness: Type = 0; - pub const Enterprise: Type = 1; - pub const BackOffice: Type = 2; - pub const CommunicationServer: Type = 3; - pub const TerminalServer: Type = 4; - pub const SmallBusinessRestricted: Type = 5; - pub const EmbeddedNT: Type = 6; - pub const DataCenter: Type = 7; - pub const SingleUserTS: Type = 8; - pub const Personal: Type = 9; - pub const Blade: Type = 10; - pub const EmbeddedRestricted: Type = 11; - pub const SecurityAppliance: Type = 12; - pub const StorageServer: Type = 13; - pub const ComputeServer: Type = 14; - pub const WHServer: Type = 15; - pub const PhoneNT: Type = 16; - pub const MultiUserTS: Type = 17; - pub const MaxSuiteType: Type = 18; -} -pub use self::_SUITE_TYPE::Type as SUITE_TYPE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _bindgen_ty_1 { - pub x: ::core::ffi::c_char, - pub test: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_bindgen_ty_1), "::", stringify!(x)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).test) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_bindgen_ty_1), "::", stringify!(test)), - ); -} -impl Default for _bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type __C_ASSERT__ = [::core::ffi::c_char; 1usize]; -pub type __prefast_analysis_mode_flag0 = ::core::ffi::c_int; -pub type __prefast_analysis_mode_flag1 = ::core::ffi::c_int; -pub type PACCESS_STATE = *mut _ACCESS_STATE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CALLBACK_OBJECT { - _unused: [u8; 0], -} -pub type PCALLBACK_OBJECT = *mut _CALLBACK_OBJECT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KPROCESS { - _unused: [u8; 0], -} -pub type PEPROCESS = *mut _KPROCESS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KTHREAD { - _unused: [u8; 0], -} -pub type PETHREAD = *mut _KTHREAD; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_TIMER { - _unused: [u8; 0], -} -pub type PIO_TIMER = *mut _IO_TIMER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KINTERRUPT { - _unused: [u8; 0], -} -pub type PKINTERRUPT = *mut _KINTERRUPT; -pub type PKTHREAD = *mut _KTHREAD; -pub type PRKTHREAD = *mut _KTHREAD; -pub type PKPROCESS = *mut _KPROCESS; -pub type PRKPROCESS = *mut _KPROCESS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OBJECT_TYPE { - _unused: [u8; 0], -} -pub type POBJECT_TYPE = *mut _OBJECT_TYPE; -pub type PSECURITY_QUALITY_OF_SERVICE = *mut _SECURITY_QUALITY_OF_SERVICE; -pub type PCONTEXT = *mut _CONTEXT; -pub type PIO_STACK_LOCATION = *mut _IO_STACK_LOCATION; -pub type PVPB = *mut _VPB; -pub type PFILE_GET_QUOTA_INFORMATION = *mut _FILE_GET_QUOTA_INFORMATION; -pub mod MCA_EXCEPTION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const HAL_MCE_RECORD: Type = 0; - pub const HAL_MCA_RECORD: Type = 1; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _MCI_ADDR { - pub __bindgen_anon_1: _MCI_ADDR__bindgen_ty_1, - pub QuadPart: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MCI_ADDR__bindgen_ty_1 { - pub Address: ULONG, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__MCI_ADDR__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_MCI_ADDR__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MCI_ADDR__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_MCI_ADDR__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_MCI_ADDR__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_MCI_ADDR__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MCI_ADDR__bindgen_ty_1), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MCI_ADDR__bindgen_ty_1), - "::", - stringify!(Reserved), - ), - ); -} -#[test] -fn bindgen_test_layout__MCI_ADDR() { - const UNINIT: ::core::mem::MaybeUninit<_MCI_ADDR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MCI_ADDR>(), - 8usize, - concat!("Size of: ", stringify!(_MCI_ADDR)), - ); - assert_eq!( - ::core::mem::align_of::<_MCI_ADDR>(), - 8usize, - concat!("Alignment of ", stringify!(_MCI_ADDR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QuadPart) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_MCI_ADDR), "::", stringify!(QuadPart)), - ); -} -impl Default for _MCI_ADDR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MCI_ADDR = _MCI_ADDR; -pub type PMCI_ADDR = *mut _MCI_ADDR; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _MCI_STATS { - pub MciStatus: _MCI_STATS__bindgen_ty_1, - pub QuadPart: ULONG64, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MCI_STATS__bindgen_ty_1 { - pub McaErrorCode: USHORT, - pub ModelErrorCode: USHORT, - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__MCI_STATS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_MCI_STATS__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MCI_STATS__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_MCI_STATS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_MCI_STATS__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_MCI_STATS__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).McaErrorCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MCI_STATS__bindgen_ty_1), - "::", - stringify!(McaErrorCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ModelErrorCode) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_MCI_STATS__bindgen_ty_1), - "::", - stringify!(ModelErrorCode), - ), - ); -} -impl _MCI_STATS__bindgen_ty_1 { - #[inline] - pub fn OtherInformation(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 25u8) as u32) } - } - #[inline] - pub fn set_OtherInformation(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 25u8, val as u64) - } - } - #[inline] - pub fn ContextCorrupt(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u32) } - } - #[inline] - pub fn set_ContextCorrupt(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(25usize, 1u8, val as u64) - } - } - #[inline] - pub fn AddressValid(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u32) } - } - #[inline] - pub fn set_AddressValid(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(26usize, 1u8, val as u64) - } - } - #[inline] - pub fn MiscValid(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u32) } - } - #[inline] - pub fn set_MiscValid(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(27usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorEnabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u32) } - } - #[inline] - pub fn set_ErrorEnabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(28usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectedError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectedError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(29usize, 1u8, val as u64) - } - } - #[inline] - pub fn StatusOverFlow(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) } - } - #[inline] - pub fn set_StatusOverFlow(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(30usize, 1u8, val as u64) - } - } - #[inline] - pub fn Valid(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_Valid(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - OtherInformation: ULONG, - ContextCorrupt: ULONG, - AddressValid: ULONG, - MiscValid: ULONG, - ErrorEnabled: ULONG, - UncorrectedError: ULONG, - StatusOverFlow: ULONG, - Valid: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 25u8, - { - let OtherInformation: u32 = unsafe { - ::core::mem::transmute(OtherInformation) - }; - OtherInformation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 25usize, - 1u8, - { - let ContextCorrupt: u32 = unsafe { - ::core::mem::transmute(ContextCorrupt) - }; - ContextCorrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 26usize, - 1u8, - { - let AddressValid: u32 = unsafe { - ::core::mem::transmute(AddressValid) - }; - AddressValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 27usize, - 1u8, - { - let MiscValid: u32 = unsafe { ::core::mem::transmute(MiscValid) }; - MiscValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 28usize, - 1u8, - { - let ErrorEnabled: u32 = unsafe { - ::core::mem::transmute(ErrorEnabled) - }; - ErrorEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 29usize, - 1u8, - { - let UncorrectedError: u32 = unsafe { - ::core::mem::transmute(UncorrectedError) - }; - UncorrectedError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 30usize, - 1u8, - { - let StatusOverFlow: u32 = unsafe { - ::core::mem::transmute(StatusOverFlow) - }; - StatusOverFlow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 31usize, - 1u8, - { - let Valid: u32 = unsafe { ::core::mem::transmute(Valid) }; - Valid as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__MCI_STATS() { - const UNINIT: ::core::mem::MaybeUninit<_MCI_STATS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MCI_STATS>(), - 8usize, - concat!("Size of: ", stringify!(_MCI_STATS)), - ); - assert_eq!( - ::core::mem::align_of::<_MCI_STATS>(), - 8usize, - concat!("Alignment of ", stringify!(_MCI_STATS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MciStatus) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_MCI_STATS), "::", stringify!(MciStatus)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QuadPart) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_MCI_STATS), "::", stringify!(QuadPart)), - ); -} -impl Default for _MCI_STATS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MCI_STATS = _MCI_STATS; -pub type PMCI_STATS = *mut _MCI_STATS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _MCA_EXCEPTION { - pub VersionNumber: ULONG, - pub ExceptionType: MCA_EXCEPTION_TYPE::Type, - pub TimeStamp: LARGE_INTEGER, - pub ProcessorNumber: ULONG, - pub Reserved1: ULONG, - pub u: _MCA_EXCEPTION__bindgen_ty_1, - pub ExtCnt: ULONG, - pub Reserved3: ULONG, - pub ExtReg: [ULONGLONG; 24usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _MCA_EXCEPTION__bindgen_ty_1 { - pub Mca: _MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1, - pub Mce: _MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1 { - pub BankNumber: UCHAR, - pub Reserved2: [UCHAR; 7usize], - pub Status: MCI_STATS, - pub Address: MCI_ADDR, - pub Misc: ULONGLONG, -} -#[test] -fn bindgen_test_layout__MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1>(), - 32usize, - concat!("Size of: ", stringify!(_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BankNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(BankNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Misc) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Misc), - ), - ); -} -impl Default for _MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_2 { - pub Address: ULONGLONG, - pub Type: ULONGLONG, -} -#[test] -fn bindgen_test_layout__MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_2>(), - 16usize, - concat!("Size of: ", stringify!(_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Type), - ), - ); -} -#[test] -fn bindgen_test_layout__MCA_EXCEPTION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_MCA_EXCEPTION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MCA_EXCEPTION__bindgen_ty_1>(), - 32usize, - concat!("Size of: ", stringify!(_MCA_EXCEPTION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_MCA_EXCEPTION__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_MCA_EXCEPTION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mca) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION__bindgen_ty_1), - "::", - stringify!(Mca), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION__bindgen_ty_1), - "::", - stringify!(Mce), - ), - ); -} -impl Default for _MCA_EXCEPTION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__MCA_EXCEPTION() { - const UNINIT: ::core::mem::MaybeUninit<_MCA_EXCEPTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MCA_EXCEPTION>(), - 256usize, - concat!("Size of: ", stringify!(_MCA_EXCEPTION)), - ); - assert_eq!( - ::core::mem::align_of::<_MCA_EXCEPTION>(), - 8usize, - concat!("Alignment of ", stringify!(_MCA_EXCEPTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VersionNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION), - "::", - stringify!(VersionNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION), - "::", - stringify!(ExceptionType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimeStamp) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION), - "::", - stringify!(TimeStamp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProcessorNumber) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION), - "::", - stringify!(ProcessorNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_MCA_EXCEPTION), "::", stringify!(u)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtCnt) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION), - "::", - stringify!(ExtCnt), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved3) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION), - "::", - stringify!(Reserved3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtReg) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_MCA_EXCEPTION), - "::", - stringify!(ExtReg), - ), - ); -} -impl Default for _MCA_EXCEPTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MCA_EXCEPTION = _MCA_EXCEPTION; -pub type PMCA_EXCEPTION = *mut _MCA_EXCEPTION; -pub type CMC_EXCEPTION = MCA_EXCEPTION; -pub type PCMC_EXCEPTION = *mut MCA_EXCEPTION; -pub type CPE_EXCEPTION = MCA_EXCEPTION; -pub type PCPE_EXCEPTION = *mut MCA_EXCEPTION; -pub type ERROR_SEVERITY = UCHAR; -pub type PERROR_SEVERITY = *mut UCHAR; -pub mod _ERROR_SEVERITY_VALUE { - pub type Type = ::core::ffi::c_int; - pub const ErrorRecoverable: Type = 0; - pub const ErrorFatal: Type = 1; - pub const ErrorCorrected: Type = 2; - pub const ErrorOthers: Type = 3; -} -pub use self::_ERROR_SEVERITY_VALUE::Type as ERROR_SEVERITY_VALUE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KSYSTEM_TIME { - pub LowPart: ULONG, - pub High1Time: LONG, - pub High2Time: LONG, -} -#[test] -fn bindgen_test_layout__KSYSTEM_TIME() { - const UNINIT: ::core::mem::MaybeUninit<_KSYSTEM_TIME> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KSYSTEM_TIME>(), - 12usize, - concat!("Size of: ", stringify!(_KSYSTEM_TIME)), - ); - assert_eq!( - ::core::mem::align_of::<_KSYSTEM_TIME>(), - 4usize, - concat!("Alignment of ", stringify!(_KSYSTEM_TIME)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowPart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KSYSTEM_TIME), - "::", - stringify!(LowPart), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).High1Time) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_KSYSTEM_TIME), - "::", - stringify!(High1Time), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).High2Time) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KSYSTEM_TIME), - "::", - stringify!(High2Time), - ), - ); -} -pub type KSYSTEM_TIME = _KSYSTEM_TIME; -pub type PKSYSTEM_TIME = *mut _KSYSTEM_TIME; -pub type KPRIORITY = LONG; -pub type KSPIN_LOCK = ULONG_PTR; -pub type PKSPIN_LOCK = *mut KSPIN_LOCK; -pub type KSPIN_LOCK_QUEUE_NUMBER = ULONG64; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KSPIN_LOCK_QUEUE { - pub Next: *mut _KSPIN_LOCK_QUEUE, - pub Lock: PKSPIN_LOCK, -} -#[test] -fn bindgen_test_layout__KSPIN_LOCK_QUEUE() { - const UNINIT: ::core::mem::MaybeUninit<_KSPIN_LOCK_QUEUE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KSPIN_LOCK_QUEUE>(), - 16usize, - concat!("Size of: ", stringify!(_KSPIN_LOCK_QUEUE)), - ); - assert_eq!( - ::core::mem::align_of::<_KSPIN_LOCK_QUEUE>(), - 8usize, - concat!("Alignment of ", stringify!(_KSPIN_LOCK_QUEUE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Next) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KSPIN_LOCK_QUEUE), - "::", - stringify!(Next), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lock) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KSPIN_LOCK_QUEUE), - "::", - stringify!(Lock), - ), - ); -} -impl Default for _KSPIN_LOCK_QUEUE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KSPIN_LOCK_QUEUE = _KSPIN_LOCK_QUEUE; -pub type PKSPIN_LOCK_QUEUE = *mut _KSPIN_LOCK_QUEUE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KLOCK_QUEUE_HANDLE { - pub LockQueue: KSPIN_LOCK_QUEUE, - pub OldIrql: KIRQL, -} -#[test] -fn bindgen_test_layout__KLOCK_QUEUE_HANDLE() { - const UNINIT: ::core::mem::MaybeUninit<_KLOCK_QUEUE_HANDLE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KLOCK_QUEUE_HANDLE>(), - 24usize, - concat!("Size of: ", stringify!(_KLOCK_QUEUE_HANDLE)), - ); - assert_eq!( - ::core::mem::align_of::<_KLOCK_QUEUE_HANDLE>(), - 8usize, - concat!("Alignment of ", stringify!(_KLOCK_QUEUE_HANDLE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LockQueue) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KLOCK_QUEUE_HANDLE), - "::", - stringify!(LockQueue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OldIrql) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KLOCK_QUEUE_HANDLE), - "::", - stringify!(OldIrql), - ), - ); -} -impl Default for _KLOCK_QUEUE_HANDLE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KLOCK_QUEUE_HANDLE = _KLOCK_QUEUE_HANDLE; -pub type PKLOCK_QUEUE_HANDLE = *mut _KLOCK_QUEUE_HANDLE; -pub mod _KPROFILE_SOURCE { - pub type Type = ::core::ffi::c_int; - pub const ProfileTime: Type = 0; - pub const ProfileAlignmentFixup: Type = 1; - pub const ProfileTotalIssues: Type = 2; - pub const ProfilePipelineDry: Type = 3; - pub const ProfileLoadInstructions: Type = 4; - pub const ProfilePipelineFrozen: Type = 5; - pub const ProfileBranchInstructions: Type = 6; - pub const ProfileTotalNonissues: Type = 7; - pub const ProfileDcacheMisses: Type = 8; - pub const ProfileIcacheMisses: Type = 9; - pub const ProfileCacheMisses: Type = 10; - pub const ProfileBranchMispredictions: Type = 11; - pub const ProfileStoreInstructions: Type = 12; - pub const ProfileFpInstructions: Type = 13; - pub const ProfileIntegerInstructions: Type = 14; - pub const Profile2Issue: Type = 15; - pub const Profile3Issue: Type = 16; - pub const Profile4Issue: Type = 17; - pub const ProfileSpecialInstructions: Type = 18; - pub const ProfileTotalCycles: Type = 19; - pub const ProfileIcacheIssues: Type = 20; - pub const ProfileDcacheAccesses: Type = 21; - pub const ProfileMemoryBarrierCycles: Type = 22; - pub const ProfileLoadLinkedIssues: Type = 23; - pub const ProfileMaximum: Type = 24; -} -pub use self::_KPROFILE_SOURCE::Type as KPROFILE_SOURCE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK { - pub Signature: ULONG, - pub Revision: USHORT, - pub Size: USHORT, - pub DpcWatchdogProfileOffset: USHORT, - pub DpcWatchdogProfileLength: ULONG, -} -#[test] -fn bindgen_test_layout__DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK() { - const UNINIT: ::core::mem::MaybeUninit<_DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK>(), - 16usize, - concat!("Size of: ", stringify!(_DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK)), - ); - assert_eq!( - ::core::mem::align_of::<_DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK>(), - 4usize, - concat!("Alignment of ", stringify!(_DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK), - "::", - stringify!(Signature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DpcWatchdogProfileOffset) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK), - "::", - stringify!(DpcWatchdogProfileOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DpcWatchdogProfileLength) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK), - "::", - stringify!(DpcWatchdogProfileLength), - ), - ); -} -pub type DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK = _DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK; -pub type PDPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK = *mut _DPC_WATCHDOG_GLOBAL_TRIAGE_BLOCK; -#[repr(C)] -#[repr(align(16))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _M128A { - pub Low: ULONGLONG, - pub High: LONGLONG, -} -#[test] -fn bindgen_test_layout__M128A() { - const UNINIT: ::core::mem::MaybeUninit<_M128A> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_M128A>(), - 16usize, - concat!("Size of: ", stringify!(_M128A)), - ); - assert_eq!( - ::core::mem::align_of::<_M128A>(), - 16usize, - concat!("Alignment of ", stringify!(_M128A)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Low) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_M128A), "::", stringify!(Low)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).High) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_M128A), "::", stringify!(High)), - ); -} -pub type M128A = _M128A; -pub type PM128A = *mut _M128A; -#[repr(C)] -#[repr(align(16))] -#[derive(Debug, Copy, Clone)] -pub struct _XSAVE_FORMAT { - pub ControlWord: USHORT, - pub StatusWord: USHORT, - pub TagWord: UCHAR, - pub Reserved1: UCHAR, - pub ErrorOpcode: USHORT, - pub ErrorOffset: ULONG, - pub ErrorSelector: USHORT, - pub Reserved2: USHORT, - pub DataOffset: ULONG, - pub DataSelector: USHORT, - pub Reserved3: USHORT, - pub MxCsr: ULONG, - pub MxCsr_Mask: ULONG, - pub FloatRegisters: [M128A; 8usize], - pub XmmRegisters: [M128A; 16usize], - pub Reserved4: [UCHAR; 96usize], -} -#[test] -fn bindgen_test_layout__XSAVE_FORMAT() { - const UNINIT: ::core::mem::MaybeUninit<_XSAVE_FORMAT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_XSAVE_FORMAT>(), - 512usize, - concat!("Size of: ", stringify!(_XSAVE_FORMAT)), - ); - assert_eq!( - ::core::mem::align_of::<_XSAVE_FORMAT>(), - 16usize, - concat!("Alignment of ", stringify!(_XSAVE_FORMAT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ControlWord) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(ControlWord), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StatusWord) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(StatusWord), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TagWord) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(TagWord), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorOpcode) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(ErrorOpcode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorOffset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(ErrorOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSelector) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(ErrorSelector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataOffset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(DataOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataSelector) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(DataSelector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved3) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(Reserved3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MxCsr) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_XSAVE_FORMAT), "::", stringify!(MxCsr)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MxCsr_Mask) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(MxCsr_Mask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FloatRegisters) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(FloatRegisters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).XmmRegisters) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(XmmRegisters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved4) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_FORMAT), - "::", - stringify!(Reserved4), - ), - ); -} -impl Default for _XSAVE_FORMAT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type XSAVE_FORMAT = _XSAVE_FORMAT; -pub type PXSAVE_FORMAT = *mut _XSAVE_FORMAT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _XSAVE_CET_U_FORMAT { - pub Ia32CetUMsr: ULONG64, - pub Ia32Pl3SspMsr: ULONG64, -} -#[test] -fn bindgen_test_layout__XSAVE_CET_U_FORMAT() { - const UNINIT: ::core::mem::MaybeUninit<_XSAVE_CET_U_FORMAT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_XSAVE_CET_U_FORMAT>(), - 16usize, - concat!("Size of: ", stringify!(_XSAVE_CET_U_FORMAT)), - ); - assert_eq!( - ::core::mem::align_of::<_XSAVE_CET_U_FORMAT>(), - 8usize, - concat!("Alignment of ", stringify!(_XSAVE_CET_U_FORMAT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ia32CetUMsr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_CET_U_FORMAT), - "::", - stringify!(Ia32CetUMsr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ia32Pl3SspMsr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_CET_U_FORMAT), - "::", - stringify!(Ia32Pl3SspMsr), - ), - ); -} -pub type XSAVE_CET_U_FORMAT = _XSAVE_CET_U_FORMAT; -pub type PXSAVE_CET_U_FORMAT = *mut _XSAVE_CET_U_FORMAT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _XSAVE_AREA_HEADER { - pub Mask: ULONG64, - pub CompactionMask: ULONG64, - pub Reserved2: [ULONG64; 6usize], -} -#[test] -fn bindgen_test_layout__XSAVE_AREA_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_XSAVE_AREA_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_XSAVE_AREA_HEADER>(), - 64usize, - concat!("Size of: ", stringify!(_XSAVE_AREA_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_XSAVE_AREA_HEADER>(), - 8usize, - concat!("Alignment of ", stringify!(_XSAVE_AREA_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_AREA_HEADER), - "::", - stringify!(Mask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompactionMask) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_AREA_HEADER), - "::", - stringify!(CompactionMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_AREA_HEADER), - "::", - stringify!(Reserved2), - ), - ); -} -pub type XSAVE_AREA_HEADER = _XSAVE_AREA_HEADER; -pub type PXSAVE_AREA_HEADER = *mut _XSAVE_AREA_HEADER; -#[repr(C)] -#[repr(align(16))] -#[derive(Debug, Copy, Clone)] -pub struct _XSAVE_AREA { - pub LegacyState: XSAVE_FORMAT, - pub Header: XSAVE_AREA_HEADER, -} -#[test] -fn bindgen_test_layout__XSAVE_AREA() { - const UNINIT: ::core::mem::MaybeUninit<_XSAVE_AREA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_XSAVE_AREA>(), - 576usize, - concat!("Size of: ", stringify!(_XSAVE_AREA)), - ); - assert_eq!( - ::core::mem::align_of::<_XSAVE_AREA>(), - 16usize, - concat!("Alignment of ", stringify!(_XSAVE_AREA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LegacyState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XSAVE_AREA), - "::", - stringify!(LegacyState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 512usize, - concat!("Offset of field: ", stringify!(_XSAVE_AREA), "::", stringify!(Header)), - ); -} -impl Default for _XSAVE_AREA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type XSAVE_AREA = _XSAVE_AREA; -pub type PXSAVE_AREA = *mut _XSAVE_AREA; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XSTATE_CONTEXT { - pub Mask: ULONG64, - pub Length: ULONG, - pub Reserved1: ULONG, - pub Area: PXSAVE_AREA, - pub Buffer: PVOID, -} -#[test] -fn bindgen_test_layout__XSTATE_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_XSTATE_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_XSTATE_CONTEXT>(), - 32usize, - concat!("Size of: ", stringify!(_XSTATE_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_XSTATE_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_XSTATE_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_XSTATE_CONTEXT), "::", stringify!(Mask)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONTEXT), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONTEXT), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Area) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_XSTATE_CONTEXT), "::", stringify!(Area)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONTEXT), - "::", - stringify!(Buffer), - ), - ); -} -impl Default for _XSTATE_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type XSTATE_CONTEXT = _XSTATE_CONTEXT; -pub type PXSTATE_CONTEXT = *mut _XSTATE_CONTEXT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KERNEL_CET_CONTEXT { - pub Ssp: ULONG64, - pub Rip: ULONG64, - pub SegCs: USHORT, - pub __bindgen_anon_1: _KERNEL_CET_CONTEXT__bindgen_ty_1, - pub Fill: [USHORT; 2usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KERNEL_CET_CONTEXT__bindgen_ty_1 { - pub AllFlags: USHORT, - pub __bindgen_anon_1: _KERNEL_CET_CONTEXT__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KERNEL_CET_CONTEXT__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__KERNEL_CET_CONTEXT__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_KERNEL_CET_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_KERNEL_CET_CONTEXT__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KERNEL_CET_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_KERNEL_CET_CONTEXT__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _KERNEL_CET_CONTEXT__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn UseWrss(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_UseWrss(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn PopShadowStackOne(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_PopShadowStackOne(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Unused(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 14u8) as u16) } - } - #[inline] - pub fn set_Unused(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 14u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - UseWrss: USHORT, - PopShadowStackOne: USHORT, - Unused: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let UseWrss: u16 = unsafe { ::core::mem::transmute(UseWrss) }; - UseWrss as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let PopShadowStackOne: u16 = unsafe { - ::core::mem::transmute(PopShadowStackOne) - }; - PopShadowStackOne as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 14u8, - { - let Unused: u16 = unsafe { ::core::mem::transmute(Unused) }; - Unused as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__KERNEL_CET_CONTEXT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KERNEL_CET_CONTEXT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KERNEL_CET_CONTEXT__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_KERNEL_CET_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KERNEL_CET_CONTEXT__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_KERNEL_CET_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KERNEL_CET_CONTEXT__bindgen_ty_1), - "::", - stringify!(AllFlags), - ), - ); -} -impl Default for _KERNEL_CET_CONTEXT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__KERNEL_CET_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_KERNEL_CET_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KERNEL_CET_CONTEXT>(), - 24usize, - concat!("Size of: ", stringify!(_KERNEL_CET_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_KERNEL_CET_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_KERNEL_CET_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ssp) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KERNEL_CET_CONTEXT), - "::", - stringify!(Ssp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rip) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KERNEL_CET_CONTEXT), - "::", - stringify!(Rip), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegCs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KERNEL_CET_CONTEXT), - "::", - stringify!(SegCs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Fill) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_KERNEL_CET_CONTEXT), - "::", - stringify!(Fill), - ), - ); -} -impl Default for _KERNEL_CET_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KERNEL_CET_CONTEXT = _KERNEL_CET_CONTEXT; -pub type PKERNEL_CET_CONTEXT = *mut _KERNEL_CET_CONTEXT; -pub type XMM_SAVE_AREA32 = XSAVE_FORMAT; -pub type PXMM_SAVE_AREA32 = *mut XSAVE_FORMAT; -pub type PACCESS_TOKEN = PVOID; -pub type PSECURITY_DESCRIPTOR = PVOID; -pub type PSID = PVOID; -pub type PCLAIMS_BLOB = PVOID; -pub type ACCESS_MASK = ULONG; -pub type PACCESS_MASK = *mut ACCESS_MASK; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _GENERIC_MAPPING { - pub GenericRead: ACCESS_MASK, - pub GenericWrite: ACCESS_MASK, - pub GenericExecute: ACCESS_MASK, - pub GenericAll: ACCESS_MASK, -} -#[test] -fn bindgen_test_layout__GENERIC_MAPPING() { - const UNINIT: ::core::mem::MaybeUninit<_GENERIC_MAPPING> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERIC_MAPPING>(), - 16usize, - concat!("Size of: ", stringify!(_GENERIC_MAPPING)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERIC_MAPPING>(), - 4usize, - concat!("Alignment of ", stringify!(_GENERIC_MAPPING)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GenericRead) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERIC_MAPPING), - "::", - stringify!(GenericRead), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GenericWrite) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_GENERIC_MAPPING), - "::", - stringify!(GenericWrite), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GenericExecute) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GENERIC_MAPPING), - "::", - stringify!(GenericExecute), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GenericAll) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_GENERIC_MAPPING), - "::", - stringify!(GenericAll), - ), - ); -} -pub type GENERIC_MAPPING = _GENERIC_MAPPING; -pub type PGENERIC_MAPPING = *mut GENERIC_MAPPING; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _LUID_AND_ATTRIBUTES { - pub Luid: LUID, - pub Attributes: ULONG, -} -#[test] -fn bindgen_test_layout__LUID_AND_ATTRIBUTES() { - const UNINIT: ::core::mem::MaybeUninit<_LUID_AND_ATTRIBUTES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LUID_AND_ATTRIBUTES>(), - 12usize, - concat!("Size of: ", stringify!(_LUID_AND_ATTRIBUTES)), - ); - assert_eq!( - ::core::mem::align_of::<_LUID_AND_ATTRIBUTES>(), - 4usize, - concat!("Alignment of ", stringify!(_LUID_AND_ATTRIBUTES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Luid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LUID_AND_ATTRIBUTES), - "::", - stringify!(Luid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Attributes) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_LUID_AND_ATTRIBUTES), - "::", - stringify!(Attributes), - ), - ); -} -pub type LUID_AND_ATTRIBUTES = _LUID_AND_ATTRIBUTES; -pub type PLUID_AND_ATTRIBUTES = *mut _LUID_AND_ATTRIBUTES; -pub type LUID_AND_ATTRIBUTES_ARRAY = [LUID_AND_ATTRIBUTES; 1usize]; -pub type PLUID_AND_ATTRIBUTES_ARRAY = *mut LUID_AND_ATTRIBUTES_ARRAY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ACL { - pub AclRevision: UCHAR, - pub Sbz1: UCHAR, - pub AclSize: USHORT, - pub AceCount: USHORT, - pub Sbz2: USHORT, -} -#[test] -fn bindgen_test_layout__ACL() { - const UNINIT: ::core::mem::MaybeUninit<_ACL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ACL>(), - 8usize, - concat!("Size of: ", stringify!(_ACL)), - ); - assert_eq!( - ::core::mem::align_of::<_ACL>(), - 2usize, - concat!("Alignment of ", stringify!(_ACL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AclRevision) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_ACL), "::", stringify!(AclRevision)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sbz1) as usize - ptr as usize }, - 1usize, - concat!("Offset of field: ", stringify!(_ACL), "::", stringify!(Sbz1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AclSize) as usize - ptr as usize }, - 2usize, - concat!("Offset of field: ", stringify!(_ACL), "::", stringify!(AclSize)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AceCount) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_ACL), "::", stringify!(AceCount)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sbz2) as usize - ptr as usize }, - 6usize, - concat!("Offset of field: ", stringify!(_ACL), "::", stringify!(Sbz2)), - ); -} -pub type ACL = _ACL; -pub type PACL = *mut ACL; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PRIVILEGE_SET { - pub PrivilegeCount: ULONG, - pub Control: ULONG, - pub Privilege: [LUID_AND_ATTRIBUTES; 1usize], -} -#[test] -fn bindgen_test_layout__PRIVILEGE_SET() { - const UNINIT: ::core::mem::MaybeUninit<_PRIVILEGE_SET> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PRIVILEGE_SET>(), - 20usize, - concat!("Size of: ", stringify!(_PRIVILEGE_SET)), - ); - assert_eq!( - ::core::mem::align_of::<_PRIVILEGE_SET>(), - 4usize, - concat!("Alignment of ", stringify!(_PRIVILEGE_SET)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrivilegeCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PRIVILEGE_SET), - "::", - stringify!(PrivilegeCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PRIVILEGE_SET), - "::", - stringify!(Control), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Privilege) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PRIVILEGE_SET), - "::", - stringify!(Privilege), - ), - ); -} -pub type PRIVILEGE_SET = _PRIVILEGE_SET; -pub type PPRIVILEGE_SET = *mut _PRIVILEGE_SET; -pub mod _SECURITY_IMPERSONATION_LEVEL { - pub type Type = ::core::ffi::c_int; - pub const SecurityAnonymous: Type = 0; - pub const SecurityIdentification: Type = 1; - pub const SecurityImpersonation: Type = 2; - pub const SecurityDelegation: Type = 3; -} -pub use self::_SECURITY_IMPERSONATION_LEVEL::Type as SECURITY_IMPERSONATION_LEVEL; -pub type PSECURITY_IMPERSONATION_LEVEL = *mut _SECURITY_IMPERSONATION_LEVEL::Type; -pub type SECURITY_CONTEXT_TRACKING_MODE = BOOLEAN; -pub type PSECURITY_CONTEXT_TRACKING_MODE = *mut BOOLEAN; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SECURITY_QUALITY_OF_SERVICE { - pub Length: ULONG, - pub ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, - pub ContextTrackingMode: SECURITY_CONTEXT_TRACKING_MODE, - pub EffectiveOnly: BOOLEAN, -} -#[test] -fn bindgen_test_layout__SECURITY_QUALITY_OF_SERVICE() { - const UNINIT: ::core::mem::MaybeUninit<_SECURITY_QUALITY_OF_SERVICE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SECURITY_QUALITY_OF_SERVICE>(), - 12usize, - concat!("Size of: ", stringify!(_SECURITY_QUALITY_OF_SERVICE)), - ); - assert_eq!( - ::core::mem::align_of::<_SECURITY_QUALITY_OF_SERVICE>(), - 4usize, - concat!("Alignment of ", stringify!(_SECURITY_QUALITY_OF_SERVICE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_QUALITY_OF_SERVICE), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ImpersonationLevel) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_QUALITY_OF_SERVICE), - "::", - stringify!(ImpersonationLevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ContextTrackingMode) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_QUALITY_OF_SERVICE), - "::", - stringify!(ContextTrackingMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EffectiveOnly) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_QUALITY_OF_SERVICE), - "::", - stringify!(EffectiveOnly), - ), - ); -} -impl Default for _SECURITY_QUALITY_OF_SERVICE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SECURITY_QUALITY_OF_SERVICE = _SECURITY_QUALITY_OF_SERVICE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SE_IMPERSONATION_STATE { - pub Token: PACCESS_TOKEN, - pub CopyOnOpen: BOOLEAN, - pub EffectiveOnly: BOOLEAN, - pub Level: SECURITY_IMPERSONATION_LEVEL, -} -#[test] -fn bindgen_test_layout__SE_IMPERSONATION_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_SE_IMPERSONATION_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_IMPERSONATION_STATE>(), - 16usize, - concat!("Size of: ", stringify!(_SE_IMPERSONATION_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_IMPERSONATION_STATE>(), - 8usize, - concat!("Alignment of ", stringify!(_SE_IMPERSONATION_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Token) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_IMPERSONATION_STATE), - "::", - stringify!(Token), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CopyOnOpen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SE_IMPERSONATION_STATE), - "::", - stringify!(CopyOnOpen), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EffectiveOnly) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_SE_IMPERSONATION_STATE), - "::", - stringify!(EffectiveOnly), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Level) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SE_IMPERSONATION_STATE), - "::", - stringify!(Level), - ), - ); -} -impl Default for _SE_IMPERSONATION_STATE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SE_IMPERSONATION_STATE = _SE_IMPERSONATION_STATE; -pub type PSE_IMPERSONATION_STATE = *mut _SE_IMPERSONATION_STATE; -pub type SECURITY_INFORMATION = ULONG; -pub type PSECURITY_INFORMATION = *mut ULONG; -pub mod _SE_ADT_PARAMETER_TYPE { - pub type Type = ::core::ffi::c_int; - pub const SeAdtParmTypeNone: Type = 0; - pub const SeAdtParmTypeString: Type = 1; - pub const SeAdtParmTypeFileSpec: Type = 2; - pub const SeAdtParmTypeUlong: Type = 3; - pub const SeAdtParmTypeSid: Type = 4; - pub const SeAdtParmTypeLogonId: Type = 5; - pub const SeAdtParmTypeNoLogonId: Type = 6; - pub const SeAdtParmTypeAccessMask: Type = 7; - pub const SeAdtParmTypePrivs: Type = 8; - pub const SeAdtParmTypeObjectTypes: Type = 9; - pub const SeAdtParmTypeHexUlong: Type = 10; - pub const SeAdtParmTypePtr: Type = 11; - pub const SeAdtParmTypeTime: Type = 12; - pub const SeAdtParmTypeGuid: Type = 13; - pub const SeAdtParmTypeLuid: Type = 14; - pub const SeAdtParmTypeHexInt64: Type = 15; - pub const SeAdtParmTypeStringList: Type = 16; - pub const SeAdtParmTypeSidList: Type = 17; - pub const SeAdtParmTypeDuration: Type = 18; - pub const SeAdtParmTypeUserAccountControl: Type = 19; - pub const SeAdtParmTypeNoUac: Type = 20; - pub const SeAdtParmTypeMessage: Type = 21; - pub const SeAdtParmTypeDateTime: Type = 22; - pub const SeAdtParmTypeSockAddr: Type = 23; - pub const SeAdtParmTypeSD: Type = 24; - pub const SeAdtParmTypeLogonHours: Type = 25; - pub const SeAdtParmTypeLogonIdNoSid: Type = 26; - pub const SeAdtParmTypeUlongNoConv: Type = 27; - pub const SeAdtParmTypeSockAddrNoPort: Type = 28; - pub const SeAdtParmTypeAccessReason: Type = 29; - pub const SeAdtParmTypeStagingReason: Type = 30; - pub const SeAdtParmTypeResourceAttribute: Type = 31; - pub const SeAdtParmTypeClaims: Type = 32; - pub const SeAdtParmTypeLogonIdAsSid: Type = 33; - pub const SeAdtParmTypeMultiSzString: Type = 34; - pub const SeAdtParmTypeLogonIdEx: Type = 35; -} -pub use self::_SE_ADT_PARAMETER_TYPE::Type as SE_ADT_PARAMETER_TYPE; -pub type PSE_ADT_PARAMETER_TYPE = *mut _SE_ADT_PARAMETER_TYPE::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SE_ADT_OBJECT_TYPE { - pub ObjectType: GUID, - pub Flags: USHORT, - pub Level: USHORT, - pub AccessMask: ACCESS_MASK, -} -#[test] -fn bindgen_test_layout__SE_ADT_OBJECT_TYPE() { - const UNINIT: ::core::mem::MaybeUninit<_SE_ADT_OBJECT_TYPE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_ADT_OBJECT_TYPE>(), - 24usize, - concat!("Size of: ", stringify!(_SE_ADT_OBJECT_TYPE)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_ADT_OBJECT_TYPE>(), - 4usize, - concat!("Alignment of ", stringify!(_SE_ADT_OBJECT_TYPE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_OBJECT_TYPE), - "::", - stringify!(ObjectType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_OBJECT_TYPE), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Level) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_OBJECT_TYPE), - "::", - stringify!(Level), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AccessMask) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_OBJECT_TYPE), - "::", - stringify!(AccessMask), - ), - ); -} -pub type SE_ADT_OBJECT_TYPE = _SE_ADT_OBJECT_TYPE; -pub type PSE_ADT_OBJECT_TYPE = *mut _SE_ADT_OBJECT_TYPE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SE_ADT_PARAMETER_ARRAY_ENTRY { - pub Type: SE_ADT_PARAMETER_TYPE, - pub Length: ULONG, - pub Data: [ULONG_PTR; 2usize], - pub Address: PVOID, -} -#[test] -fn bindgen_test_layout__SE_ADT_PARAMETER_ARRAY_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_SE_ADT_PARAMETER_ARRAY_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_ADT_PARAMETER_ARRAY_ENTRY>(), - 32usize, - concat!("Size of: ", stringify!(_SE_ADT_PARAMETER_ARRAY_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_ADT_PARAMETER_ARRAY_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_SE_ADT_PARAMETER_ARRAY_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY_ENTRY), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY_ENTRY), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY_ENTRY), - "::", - stringify!(Data), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY_ENTRY), - "::", - stringify!(Address), - ), - ); -} -impl Default for _SE_ADT_PARAMETER_ARRAY_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SE_ADT_PARAMETER_ARRAY_ENTRY = _SE_ADT_PARAMETER_ARRAY_ENTRY; -pub type PSE_ADT_PARAMETER_ARRAY_ENTRY = *mut _SE_ADT_PARAMETER_ARRAY_ENTRY; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SE_ADT_ACCESS_REASON { - pub AccessMask: ACCESS_MASK, - pub AccessReasons: [ULONG; 32usize], - pub ObjectTypeIndex: ULONG, - pub AccessGranted: ULONG, - pub SecurityDescriptor: PSECURITY_DESCRIPTOR, -} -#[test] -fn bindgen_test_layout__SE_ADT_ACCESS_REASON() { - const UNINIT: ::core::mem::MaybeUninit<_SE_ADT_ACCESS_REASON> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_ADT_ACCESS_REASON>(), - 152usize, - concat!("Size of: ", stringify!(_SE_ADT_ACCESS_REASON)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_ADT_ACCESS_REASON>(), - 8usize, - concat!("Alignment of ", stringify!(_SE_ADT_ACCESS_REASON)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AccessMask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_ACCESS_REASON), - "::", - stringify!(AccessMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AccessReasons) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_ACCESS_REASON), - "::", - stringify!(AccessReasons), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectTypeIndex) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_ACCESS_REASON), - "::", - stringify!(ObjectTypeIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AccessGranted) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_ACCESS_REASON), - "::", - stringify!(AccessGranted), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityDescriptor) as usize - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_ACCESS_REASON), - "::", - stringify!(SecurityDescriptor), - ), - ); -} -impl Default for _SE_ADT_ACCESS_REASON { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SE_ADT_ACCESS_REASON = _SE_ADT_ACCESS_REASON; -pub type PSE_ADT_ACCESS_REASON = *mut _SE_ADT_ACCESS_REASON; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SE_ADT_CLAIMS { - pub Length: ULONG, - pub Claims: PCLAIMS_BLOB, -} -#[test] -fn bindgen_test_layout__SE_ADT_CLAIMS() { - const UNINIT: ::core::mem::MaybeUninit<_SE_ADT_CLAIMS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_ADT_CLAIMS>(), - 16usize, - concat!("Size of: ", stringify!(_SE_ADT_CLAIMS)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_ADT_CLAIMS>(), - 8usize, - concat!("Alignment of ", stringify!(_SE_ADT_CLAIMS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_CLAIMS), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Claims) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_CLAIMS), - "::", - stringify!(Claims), - ), - ); -} -impl Default for _SE_ADT_CLAIMS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SE_ADT_CLAIMS = _SE_ADT_CLAIMS; -pub type PSE_ADT_CLAIMS = *mut _SE_ADT_CLAIMS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SE_ADT_PARAMETER_ARRAY { - pub CategoryId: ULONG, - pub AuditId: ULONG, - pub ParameterCount: ULONG, - pub Length: ULONG, - pub FlatSubCategoryId: USHORT, - pub Type: USHORT, - pub Flags: ULONG, - pub Parameters: [SE_ADT_PARAMETER_ARRAY_ENTRY; 32usize], -} -#[test] -fn bindgen_test_layout__SE_ADT_PARAMETER_ARRAY() { - const UNINIT: ::core::mem::MaybeUninit<_SE_ADT_PARAMETER_ARRAY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_ADT_PARAMETER_ARRAY>(), - 1048usize, - concat!("Size of: ", stringify!(_SE_ADT_PARAMETER_ARRAY)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_ADT_PARAMETER_ARRAY>(), - 8usize, - concat!("Alignment of ", stringify!(_SE_ADT_PARAMETER_ARRAY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CategoryId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY), - "::", - stringify!(CategoryId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AuditId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY), - "::", - stringify!(AuditId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParameterCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY), - "::", - stringify!(ParameterCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FlatSubCategoryId) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY), - "::", - stringify!(FlatSubCategoryId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY), - "::", - stringify!(Parameters), - ), - ); -} -impl Default for _SE_ADT_PARAMETER_ARRAY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SE_ADT_PARAMETER_ARRAY = _SE_ADT_PARAMETER_ARRAY; -pub type PSE_ADT_PARAMETER_ARRAY = *mut _SE_ADT_PARAMETER_ARRAY; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SE_ADT_PARAMETER_ARRAY_EX { - pub CategoryId: ULONG, - pub AuditId: ULONG, - pub Version: ULONG, - pub ParameterCount: ULONG, - pub Length: ULONG, - pub FlatSubCategoryId: USHORT, - pub Type: USHORT, - pub Flags: ULONG, - pub Parameters: [SE_ADT_PARAMETER_ARRAY_ENTRY; 32usize], -} -#[test] -fn bindgen_test_layout__SE_ADT_PARAMETER_ARRAY_EX() { - const UNINIT: ::core::mem::MaybeUninit<_SE_ADT_PARAMETER_ARRAY_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_ADT_PARAMETER_ARRAY_EX>(), - 1056usize, - concat!("Size of: ", stringify!(_SE_ADT_PARAMETER_ARRAY_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_ADT_PARAMETER_ARRAY_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_SE_ADT_PARAMETER_ARRAY_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CategoryId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY_EX), - "::", - stringify!(CategoryId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AuditId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY_EX), - "::", - stringify!(AuditId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY_EX), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParameterCount) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY_EX), - "::", - stringify!(ParameterCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY_EX), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FlatSubCategoryId) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY_EX), - "::", - stringify!(FlatSubCategoryId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY_EX), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY_EX), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SE_ADT_PARAMETER_ARRAY_EX), - "::", - stringify!(Parameters), - ), - ); -} -impl Default for _SE_ADT_PARAMETER_ARRAY_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SE_ADT_PARAMETER_ARRAY_EX = _SE_ADT_PARAMETER_ARRAY_EX; -pub type PSE_ADT_PARAMETER_ARRAY_EX = *mut _SE_ADT_PARAMETER_ARRAY_EX; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _EXTENDED_CREATE_INFORMATION { - pub ExtendedCreateFlags: LONGLONG, - pub EaBuffer: PVOID, - pub EaLength: ULONG, -} -#[test] -fn bindgen_test_layout__EXTENDED_CREATE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_EXTENDED_CREATE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EXTENDED_CREATE_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_EXTENDED_CREATE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_EXTENDED_CREATE_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_EXTENDED_CREATE_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExtendedCreateFlags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EXTENDED_CREATE_INFORMATION), - "::", - stringify!(ExtendedCreateFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaBuffer) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EXTENDED_CREATE_INFORMATION), - "::", - stringify!(EaBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_EXTENDED_CREATE_INFORMATION), - "::", - stringify!(EaLength), - ), - ); -} -impl Default for _EXTENDED_CREATE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type EXTENDED_CREATE_INFORMATION = _EXTENDED_CREATE_INFORMATION; -pub type PEXTENDED_CREATE_INFORMATION = *mut _EXTENDED_CREATE_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_STATUS_BLOCK { - pub __bindgen_anon_1: _IO_STATUS_BLOCK__bindgen_ty_1, - pub Information: ULONG_PTR, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IO_STATUS_BLOCK__bindgen_ty_1 { - pub Status: NTSTATUS, - pub Pointer: PVOID, -} -#[test] -fn bindgen_test_layout__IO_STATUS_BLOCK__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_IO_STATUS_BLOCK__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STATUS_BLOCK__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_IO_STATUS_BLOCK__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STATUS_BLOCK__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_STATUS_BLOCK__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STATUS_BLOCK__bindgen_ty_1), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Pointer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STATUS_BLOCK__bindgen_ty_1), - "::", - stringify!(Pointer), - ), - ); -} -impl Default for _IO_STATUS_BLOCK__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IO_STATUS_BLOCK() { - const UNINIT: ::core::mem::MaybeUninit<_IO_STATUS_BLOCK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STATUS_BLOCK>(), - 16usize, - concat!("Size of: ", stringify!(_IO_STATUS_BLOCK)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STATUS_BLOCK>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_STATUS_BLOCK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Information) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STATUS_BLOCK), - "::", - stringify!(Information), - ), - ); -} -impl Default for _IO_STATUS_BLOCK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_STATUS_BLOCK = _IO_STATUS_BLOCK; -pub type PIO_STATUS_BLOCK = *mut _IO_STATUS_BLOCK; -pub type IO_STATUS_BLOCK64 = IO_STATUS_BLOCK; -pub type PIO_STATUS_BLOCK64 = *mut IO_STATUS_BLOCK64; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_STATUS_BLOCK32 { - pub Status: NTSTATUS, - pub Information: ULONG, -} -#[test] -fn bindgen_test_layout__IO_STATUS_BLOCK32() { - const UNINIT: ::core::mem::MaybeUninit<_IO_STATUS_BLOCK32> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STATUS_BLOCK32>(), - 8usize, - concat!("Size of: ", stringify!(_IO_STATUS_BLOCK32)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STATUS_BLOCK32>(), - 4usize, - concat!("Alignment of ", stringify!(_IO_STATUS_BLOCK32)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STATUS_BLOCK32), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Information) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_STATUS_BLOCK32), - "::", - stringify!(Information), - ), - ); -} -pub type IO_STATUS_BLOCK32 = _IO_STATUS_BLOCK32; -pub type PIO_STATUS_BLOCK32 = *mut _IO_STATUS_BLOCK32; -pub type PIO_APC_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - ApcContext: PVOID, - IoStatusBlock: PIO_STATUS_BLOCK, - Reserved: ULONG, - ), ->; -pub mod _IO_SESSION_EVENT { - pub type Type = ::core::ffi::c_int; - pub const IoSessionEventIgnore: Type = 0; - pub const IoSessionEventCreated: Type = 1; - pub const IoSessionEventTerminated: Type = 2; - pub const IoSessionEventConnected: Type = 3; - pub const IoSessionEventDisconnected: Type = 4; - pub const IoSessionEventLogon: Type = 5; - pub const IoSessionEventLogoff: Type = 6; - pub const IoSessionEventMax: Type = 7; -} -pub use self::_IO_SESSION_EVENT::Type as IO_SESSION_EVENT; -pub type PIO_SESSION_EVENT = *mut _IO_SESSION_EVENT::Type; -pub mod _IO_SESSION_STATE { - pub type Type = ::core::ffi::c_int; - pub const IoSessionStateCreated: Type = 1; - pub const IoSessionStateInitialized: Type = 2; - pub const IoSessionStateConnected: Type = 3; - pub const IoSessionStateDisconnected: Type = 4; - pub const IoSessionStateDisconnectedLoggedOn: Type = 5; - pub const IoSessionStateLoggedOn: Type = 6; - pub const IoSessionStateLoggedOff: Type = 7; - pub const IoSessionStateTerminated: Type = 8; - pub const IoSessionStateMax: Type = 9; -} -pub use self::_IO_SESSION_STATE::Type as IO_SESSION_STATE; -pub type PIO_SESSION_STATE = *mut _IO_SESSION_STATE::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_SESSION_CONNECT_INFO { - pub SessionId: ULONG, - pub LocalSession: BOOLEAN, -} -#[test] -fn bindgen_test_layout__IO_SESSION_CONNECT_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_IO_SESSION_CONNECT_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_SESSION_CONNECT_INFO>(), - 8usize, - concat!("Size of: ", stringify!(_IO_SESSION_CONNECT_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_SESSION_CONNECT_INFO>(), - 4usize, - concat!("Alignment of ", stringify!(_IO_SESSION_CONNECT_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SessionId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_SESSION_CONNECT_INFO), - "::", - stringify!(SessionId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LocalSession) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_SESSION_CONNECT_INFO), - "::", - stringify!(LocalSession), - ), - ); -} -pub type IO_SESSION_CONNECT_INFO = _IO_SESSION_CONNECT_INFO; -pub type PIO_SESSION_CONNECT_INFO = *mut _IO_SESSION_CONNECT_INFO; -pub mod _FILE_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const FileDirectoryInformation: Type = 1; - pub const FileFullDirectoryInformation: Type = 2; - pub const FileBothDirectoryInformation: Type = 3; - pub const FileBasicInformation: Type = 4; - pub const FileStandardInformation: Type = 5; - pub const FileInternalInformation: Type = 6; - pub const FileEaInformation: Type = 7; - pub const FileAccessInformation: Type = 8; - pub const FileNameInformation: Type = 9; - pub const FileRenameInformation: Type = 10; - pub const FileLinkInformation: Type = 11; - pub const FileNamesInformation: Type = 12; - pub const FileDispositionInformation: Type = 13; - pub const FilePositionInformation: Type = 14; - pub const FileFullEaInformation: Type = 15; - pub const FileModeInformation: Type = 16; - pub const FileAlignmentInformation: Type = 17; - pub const FileAllInformation: Type = 18; - pub const FileAllocationInformation: Type = 19; - pub const FileEndOfFileInformation: Type = 20; - pub const FileAlternateNameInformation: Type = 21; - pub const FileStreamInformation: Type = 22; - pub const FilePipeInformation: Type = 23; - pub const FilePipeLocalInformation: Type = 24; - pub const FilePipeRemoteInformation: Type = 25; - pub const FileMailslotQueryInformation: Type = 26; - pub const FileMailslotSetInformation: Type = 27; - pub const FileCompressionInformation: Type = 28; - pub const FileObjectIdInformation: Type = 29; - pub const FileCompletionInformation: Type = 30; - pub const FileMoveClusterInformation: Type = 31; - pub const FileQuotaInformation: Type = 32; - pub const FileReparsePointInformation: Type = 33; - pub const FileNetworkOpenInformation: Type = 34; - pub const FileAttributeTagInformation: Type = 35; - pub const FileTrackingInformation: Type = 36; - pub const FileIdBothDirectoryInformation: Type = 37; - pub const FileIdFullDirectoryInformation: Type = 38; - pub const FileValidDataLengthInformation: Type = 39; - pub const FileShortNameInformation: Type = 40; - pub const FileIoCompletionNotificationInformation: Type = 41; - pub const FileIoStatusBlockRangeInformation: Type = 42; - pub const FileIoPriorityHintInformation: Type = 43; - pub const FileSfioReserveInformation: Type = 44; - pub const FileSfioVolumeInformation: Type = 45; - pub const FileHardLinkInformation: Type = 46; - pub const FileProcessIdsUsingFileInformation: Type = 47; - pub const FileNormalizedNameInformation: Type = 48; - pub const FileNetworkPhysicalNameInformation: Type = 49; - pub const FileIdGlobalTxDirectoryInformation: Type = 50; - pub const FileIsRemoteDeviceInformation: Type = 51; - pub const FileUnusedInformation: Type = 52; - pub const FileNumaNodeInformation: Type = 53; - pub const FileStandardLinkInformation: Type = 54; - pub const FileRemoteProtocolInformation: Type = 55; - pub const FileRenameInformationBypassAccessCheck: Type = 56; - pub const FileLinkInformationBypassAccessCheck: Type = 57; - pub const FileVolumeNameInformation: Type = 58; - pub const FileIdInformation: Type = 59; - pub const FileIdExtdDirectoryInformation: Type = 60; - pub const FileReplaceCompletionInformation: Type = 61; - pub const FileHardLinkFullIdInformation: Type = 62; - pub const FileIdExtdBothDirectoryInformation: Type = 63; - pub const FileDispositionInformationEx: Type = 64; - pub const FileRenameInformationEx: Type = 65; - pub const FileRenameInformationExBypassAccessCheck: Type = 66; - pub const FileDesiredStorageClassInformation: Type = 67; - pub const FileStatInformation: Type = 68; - pub const FileMemoryPartitionInformation: Type = 69; - pub const FileStatLxInformation: Type = 70; - pub const FileCaseSensitiveInformation: Type = 71; - pub const FileLinkInformationEx: Type = 72; - pub const FileLinkInformationExBypassAccessCheck: Type = 73; - pub const FileStorageReserveIdInformation: Type = 74; - pub const FileCaseSensitiveInformationForceAccessCheck: Type = 75; - pub const FileKnownFolderInformation: Type = 76; - pub const FileStatBasicInformation: Type = 77; - pub const FileId64ExtdDirectoryInformation: Type = 78; - pub const FileId64ExtdBothDirectoryInformation: Type = 79; - pub const FileIdAllExtdDirectoryInformation: Type = 80; - pub const FileIdAllExtdBothDirectoryInformation: Type = 81; - pub const FileMaximumInformation: Type = 82; -} -pub use self::_FILE_INFORMATION_CLASS::Type as FILE_INFORMATION_CLASS; -pub type PFILE_INFORMATION_CLASS = *mut _FILE_INFORMATION_CLASS::Type; -pub mod _DIRECTORY_NOTIFY_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const DirectoryNotifyInformation: Type = 1; - pub const DirectoryNotifyExtendedInformation: Type = 2; - pub const DirectoryNotifyFullInformation: Type = 3; - pub const DirectoryNotifyMaximumInformation: Type = 4; -} -pub use self::_DIRECTORY_NOTIFY_INFORMATION_CLASS::Type as DIRECTORY_NOTIFY_INFORMATION_CLASS; -pub type PDIRECTORY_NOTIFY_INFORMATION_CLASS = *mut _DIRECTORY_NOTIFY_INFORMATION_CLASS::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_BASIC_INFORMATION { - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub FileAttributes: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_BASIC_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_BASIC_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_BASIC_INFORMATION>(), - 40usize, - concat!("Size of: ", stringify!(_FILE_BASIC_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_BASIC_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_BASIC_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BASIC_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BASIC_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BASIC_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BASIC_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BASIC_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); -} -impl Default for _FILE_BASIC_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_BASIC_INFORMATION = _FILE_BASIC_INFORMATION; -pub type PFILE_BASIC_INFORMATION = *mut _FILE_BASIC_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_STANDARD_INFORMATION { - pub AllocationSize: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub NumberOfLinks: ULONG, - pub DeletePending: BOOLEAN, - pub Directory: BOOLEAN, -} -#[test] -fn bindgen_test_layout__FILE_STANDARD_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_STANDARD_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_STANDARD_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_STANDARD_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_STANDARD_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_STANDARD_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfLinks) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_INFORMATION), - "::", - stringify!(NumberOfLinks), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeletePending) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_INFORMATION), - "::", - stringify!(DeletePending), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Directory) as usize - ptr as usize }, - 21usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_INFORMATION), - "::", - stringify!(Directory), - ), - ); -} -impl Default for _FILE_STANDARD_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_STANDARD_INFORMATION = _FILE_STANDARD_INFORMATION; -pub type PFILE_STANDARD_INFORMATION = *mut _FILE_STANDARD_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_STANDARD_INFORMATION_EX { - pub AllocationSize: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub NumberOfLinks: ULONG, - pub DeletePending: BOOLEAN, - pub Directory: BOOLEAN, - pub AlternateStream: BOOLEAN, - pub MetadataAttribute: BOOLEAN, -} -#[test] -fn bindgen_test_layout__FILE_STANDARD_INFORMATION_EX() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_STANDARD_INFORMATION_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_STANDARD_INFORMATION_EX>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_STANDARD_INFORMATION_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_STANDARD_INFORMATION_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_STANDARD_INFORMATION_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_INFORMATION_EX), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_INFORMATION_EX), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfLinks) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_INFORMATION_EX), - "::", - stringify!(NumberOfLinks), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeletePending) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_INFORMATION_EX), - "::", - stringify!(DeletePending), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Directory) as usize - ptr as usize }, - 21usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_INFORMATION_EX), - "::", - stringify!(Directory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AlternateStream) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_INFORMATION_EX), - "::", - stringify!(AlternateStream), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetadataAttribute) as usize - ptr as usize - }, - 23usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_INFORMATION_EX), - "::", - stringify!(MetadataAttribute), - ), - ); -} -impl Default for _FILE_STANDARD_INFORMATION_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_STANDARD_INFORMATION_EX = _FILE_STANDARD_INFORMATION_EX; -pub type PFILE_STANDARD_INFORMATION_EX = *mut _FILE_STANDARD_INFORMATION_EX; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_POSITION_INFORMATION { - pub CurrentByteOffset: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FILE_POSITION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_POSITION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_POSITION_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_POSITION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_POSITION_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_POSITION_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CurrentByteOffset) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_POSITION_INFORMATION), - "::", - stringify!(CurrentByteOffset), - ), - ); -} -impl Default for _FILE_POSITION_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_POSITION_INFORMATION = _FILE_POSITION_INFORMATION; -pub type PFILE_POSITION_INFORMATION = *mut _FILE_POSITION_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_NETWORK_OPEN_INFORMATION { - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub FileAttributes: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_NETWORK_OPEN_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_NETWORK_OPEN_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_NETWORK_OPEN_INFORMATION>(), - 56usize, - concat!("Size of: ", stringify!(_FILE_NETWORK_OPEN_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_NETWORK_OPEN_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_NETWORK_OPEN_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NETWORK_OPEN_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NETWORK_OPEN_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NETWORK_OPEN_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NETWORK_OPEN_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NETWORK_OPEN_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NETWORK_OPEN_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NETWORK_OPEN_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); -} -impl Default for _FILE_NETWORK_OPEN_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_NETWORK_OPEN_INFORMATION = _FILE_NETWORK_OPEN_INFORMATION; -pub type PFILE_NETWORK_OPEN_INFORMATION = *mut _FILE_NETWORK_OPEN_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_FULL_EA_INFORMATION { - pub NextEntryOffset: ULONG, - pub Flags: UCHAR, - pub EaNameLength: UCHAR, - pub EaValueLength: USHORT, - pub EaName: [CHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_FULL_EA_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FULL_EA_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FULL_EA_INFORMATION>(), - 12usize, - concat!("Size of: ", stringify!(_FILE_FULL_EA_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FULL_EA_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_FULL_EA_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_EA_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_EA_INFORMATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaNameLength) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_EA_INFORMATION), - "::", - stringify!(EaNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaValueLength) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_EA_INFORMATION), - "::", - stringify!(EaValueLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_EA_INFORMATION), - "::", - stringify!(EaName), - ), - ); -} -pub type FILE_FULL_EA_INFORMATION = _FILE_FULL_EA_INFORMATION; -pub type PFILE_FULL_EA_INFORMATION = *mut _FILE_FULL_EA_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_SFIO_RESERVE_INFORMATION { - pub RequestsPerPeriod: ULONG, - pub Period: ULONG, - pub RetryFailures: BOOLEAN, - pub Discardable: BOOLEAN, - pub RequestSize: ULONG, - pub NumOutstandingRequests: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_SFIO_RESERVE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_SFIO_RESERVE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_SFIO_RESERVE_INFORMATION>(), - 20usize, - concat!("Size of: ", stringify!(_FILE_SFIO_RESERVE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_SFIO_RESERVE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_SFIO_RESERVE_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RequestsPerPeriod) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SFIO_RESERVE_INFORMATION), - "::", - stringify!(RequestsPerPeriod), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Period) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SFIO_RESERVE_INFORMATION), - "::", - stringify!(Period), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RetryFailures) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SFIO_RESERVE_INFORMATION), - "::", - stringify!(RetryFailures), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Discardable) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SFIO_RESERVE_INFORMATION), - "::", - stringify!(Discardable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequestSize) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SFIO_RESERVE_INFORMATION), - "::", - stringify!(RequestSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumOutstandingRequests) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SFIO_RESERVE_INFORMATION), - "::", - stringify!(NumOutstandingRequests), - ), - ); -} -pub type FILE_SFIO_RESERVE_INFORMATION = _FILE_SFIO_RESERVE_INFORMATION; -pub type PFILE_SFIO_RESERVE_INFORMATION = *mut _FILE_SFIO_RESERVE_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_SFIO_VOLUME_INFORMATION { - pub MaximumRequestsPerPeriod: ULONG, - pub MinimumPeriod: ULONG, - pub MinimumTransferSize: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_SFIO_VOLUME_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_SFIO_VOLUME_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_SFIO_VOLUME_INFORMATION>(), - 12usize, - concat!("Size of: ", stringify!(_FILE_SFIO_VOLUME_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_SFIO_VOLUME_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_SFIO_VOLUME_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumRequestsPerPeriod) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SFIO_VOLUME_INFORMATION), - "::", - stringify!(MaximumRequestsPerPeriod), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinimumPeriod) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SFIO_VOLUME_INFORMATION), - "::", - stringify!(MinimumPeriod), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MinimumTransferSize) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SFIO_VOLUME_INFORMATION), - "::", - stringify!(MinimumTransferSize), - ), - ); -} -pub type FILE_SFIO_VOLUME_INFORMATION = _FILE_SFIO_VOLUME_INFORMATION; -pub type PFILE_SFIO_VOLUME_INFORMATION = *mut _FILE_SFIO_VOLUME_INFORMATION; -pub mod _IO_PRIORITY_HINT { - pub type Type = ::core::ffi::c_int; - pub const IoPriorityVeryLow: Type = 0; - pub const IoPriorityLow: Type = 1; - pub const IoPriorityNormal: Type = 2; - pub const IoPriorityHigh: Type = 3; - pub const IoPriorityCritical: Type = 4; - pub const MaxIoPriorityTypes: Type = 5; -} -pub use self::_IO_PRIORITY_HINT::Type as IO_PRIORITY_HINT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_IO_PRIORITY_HINT_INFORMATION { - pub PriorityHint: IO_PRIORITY_HINT, -} -#[test] -fn bindgen_test_layout__FILE_IO_PRIORITY_HINT_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_IO_PRIORITY_HINT_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_IO_PRIORITY_HINT_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_IO_PRIORITY_HINT_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_IO_PRIORITY_HINT_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_IO_PRIORITY_HINT_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PriorityHint) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_IO_PRIORITY_HINT_INFORMATION), - "::", - stringify!(PriorityHint), - ), - ); -} -impl Default for _FILE_IO_PRIORITY_HINT_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_IO_PRIORITY_HINT_INFORMATION = _FILE_IO_PRIORITY_HINT_INFORMATION; -pub type PFILE_IO_PRIORITY_HINT_INFORMATION = *mut _FILE_IO_PRIORITY_HINT_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_IO_PRIORITY_HINT_INFORMATION_EX { - pub PriorityHint: IO_PRIORITY_HINT, - pub BoostOutstanding: BOOLEAN, -} -#[test] -fn bindgen_test_layout__FILE_IO_PRIORITY_HINT_INFORMATION_EX() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_IO_PRIORITY_HINT_INFORMATION_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_IO_PRIORITY_HINT_INFORMATION_EX>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_IO_PRIORITY_HINT_INFORMATION_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_IO_PRIORITY_HINT_INFORMATION_EX>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_IO_PRIORITY_HINT_INFORMATION_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PriorityHint) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_IO_PRIORITY_HINT_INFORMATION_EX), - "::", - stringify!(PriorityHint), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BoostOutstanding) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_IO_PRIORITY_HINT_INFORMATION_EX), - "::", - stringify!(BoostOutstanding), - ), - ); -} -impl Default for _FILE_IO_PRIORITY_HINT_INFORMATION_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_IO_PRIORITY_HINT_INFORMATION_EX = _FILE_IO_PRIORITY_HINT_INFORMATION_EX; -pub type PFILE_IO_PRIORITY_HINT_INFORMATION_EX = *mut _FILE_IO_PRIORITY_HINT_INFORMATION_EX; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_IO_COMPLETION_NOTIFICATION_INFORMATION { - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_IO_COMPLETION_NOTIFICATION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit< - _FILE_IO_COMPLETION_NOTIFICATION_INFORMATION, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_IO_COMPLETION_NOTIFICATION_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_IO_COMPLETION_NOTIFICATION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_IO_COMPLETION_NOTIFICATION_INFORMATION>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_FILE_IO_COMPLETION_NOTIFICATION_INFORMATION), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_IO_COMPLETION_NOTIFICATION_INFORMATION), - "::", - stringify!(Flags), - ), - ); -} -pub type FILE_IO_COMPLETION_NOTIFICATION_INFORMATION = _FILE_IO_COMPLETION_NOTIFICATION_INFORMATION; -pub type PFILE_IO_COMPLETION_NOTIFICATION_INFORMATION = *mut _FILE_IO_COMPLETION_NOTIFICATION_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_PROCESS_IDS_USING_FILE_INFORMATION { - pub NumberOfProcessIdsInList: ULONG, - pub ProcessIdList: [ULONG_PTR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_PROCESS_IDS_USING_FILE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PROCESS_IDS_USING_FILE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PROCESS_IDS_USING_FILE_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_PROCESS_IDS_USING_FILE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PROCESS_IDS_USING_FILE_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_PROCESS_IDS_USING_FILE_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfProcessIdsInList) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PROCESS_IDS_USING_FILE_INFORMATION), - "::", - stringify!(NumberOfProcessIdsInList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProcessIdList) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PROCESS_IDS_USING_FILE_INFORMATION), - "::", - stringify!(ProcessIdList), - ), - ); -} -pub type FILE_PROCESS_IDS_USING_FILE_INFORMATION = _FILE_PROCESS_IDS_USING_FILE_INFORMATION; -pub type PFILE_PROCESS_IDS_USING_FILE_INFORMATION = *mut _FILE_PROCESS_IDS_USING_FILE_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_IS_REMOTE_DEVICE_INFORMATION { - pub IsRemote: BOOLEAN, -} -#[test] -fn bindgen_test_layout__FILE_IS_REMOTE_DEVICE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_IS_REMOTE_DEVICE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_IS_REMOTE_DEVICE_INFORMATION>(), - 1usize, - concat!("Size of: ", stringify!(_FILE_IS_REMOTE_DEVICE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_IS_REMOTE_DEVICE_INFORMATION>(), - 1usize, - concat!("Alignment of ", stringify!(_FILE_IS_REMOTE_DEVICE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsRemote) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_IS_REMOTE_DEVICE_INFORMATION), - "::", - stringify!(IsRemote), - ), - ); -} -pub type FILE_IS_REMOTE_DEVICE_INFORMATION = _FILE_IS_REMOTE_DEVICE_INFORMATION; -pub type PFILE_IS_REMOTE_DEVICE_INFORMATION = *mut _FILE_IS_REMOTE_DEVICE_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_NUMA_NODE_INFORMATION { - pub NodeNumber: USHORT, -} -#[test] -fn bindgen_test_layout__FILE_NUMA_NODE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_NUMA_NODE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_NUMA_NODE_INFORMATION>(), - 2usize, - concat!("Size of: ", stringify!(_FILE_NUMA_NODE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_NUMA_NODE_INFORMATION>(), - 2usize, - concat!("Alignment of ", stringify!(_FILE_NUMA_NODE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NodeNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NUMA_NODE_INFORMATION), - "::", - stringify!(NodeNumber), - ), - ); -} -pub type FILE_NUMA_NODE_INFORMATION = _FILE_NUMA_NODE_INFORMATION; -pub type PFILE_NUMA_NODE_INFORMATION = *mut _FILE_NUMA_NODE_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_IOSTATUSBLOCK_RANGE_INFORMATION { - pub IoStatusBlockRange: PUCHAR, - pub Length: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_IOSTATUSBLOCK_RANGE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_IOSTATUSBLOCK_RANGE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_IOSTATUSBLOCK_RANGE_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_IOSTATUSBLOCK_RANGE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_IOSTATUSBLOCK_RANGE_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_IOSTATUSBLOCK_RANGE_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IoStatusBlockRange) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_IOSTATUSBLOCK_RANGE_INFORMATION), - "::", - stringify!(IoStatusBlockRange), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_IOSTATUSBLOCK_RANGE_INFORMATION), - "::", - stringify!(Length), - ), - ); -} -impl Default for _FILE_IOSTATUSBLOCK_RANGE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_IOSTATUSBLOCK_RANGE_INFORMATION = _FILE_IOSTATUSBLOCK_RANGE_INFORMATION; -pub type PFILE_IOSTATUSBLOCK_RANGE_INFORMATION = *mut _FILE_IOSTATUSBLOCK_RANGE_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_MEMORY_PARTITION_INFORMATION { - pub OwnerPartitionHandle: ULONG_PTR, - pub Flags: _FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1 { - pub __bindgen_anon_1: _FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1__bindgen_ty_1, - pub AllFlags: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - pub NoCrossPartitionAccess: UCHAR, - pub Spare: [UCHAR; 3usize], -} -#[test] -fn bindgen_test_layout__FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NoCrossPartitionAccess) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(NoCrossPartitionAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spare) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Spare), - ), - ); -} -#[test] -fn bindgen_test_layout__FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1), - "::", - stringify!(AllFlags), - ), - ); -} -impl Default for _FILE_MEMORY_PARTITION_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FILE_MEMORY_PARTITION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_MEMORY_PARTITION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_MEMORY_PARTITION_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_MEMORY_PARTITION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_MEMORY_PARTITION_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_MEMORY_PARTITION_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OwnerPartitionHandle) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MEMORY_PARTITION_INFORMATION), - "::", - stringify!(OwnerPartitionHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MEMORY_PARTITION_INFORMATION), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _FILE_MEMORY_PARTITION_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_MEMORY_PARTITION_INFORMATION = _FILE_MEMORY_PARTITION_INFORMATION; -pub type PFILE_MEMORY_PARTITION_INFORMATION = *mut _FILE_MEMORY_PARTITION_INFORMATION; -pub mod _FSINFOCLASS { - pub type Type = ::core::ffi::c_int; - pub const FileFsVolumeInformation: Type = 1; - pub const FileFsLabelInformation: Type = 2; - pub const FileFsSizeInformation: Type = 3; - pub const FileFsDeviceInformation: Type = 4; - pub const FileFsAttributeInformation: Type = 5; - pub const FileFsControlInformation: Type = 6; - pub const FileFsFullSizeInformation: Type = 7; - pub const FileFsObjectIdInformation: Type = 8; - pub const FileFsDriverPathInformation: Type = 9; - pub const FileFsVolumeFlagsInformation: Type = 10; - pub const FileFsSectorSizeInformation: Type = 11; - pub const FileFsDataCopyInformation: Type = 12; - pub const FileFsMetadataSizeInformation: Type = 13; - pub const FileFsFullSizeInformationEx: Type = 14; - pub const FileFsGuidInformation: Type = 15; - pub const FileFsMaximumInformation: Type = 16; -} -pub use self::_FSINFOCLASS::Type as FS_INFORMATION_CLASS; -pub type PFS_INFORMATION_CLASS = *mut _FSINFOCLASS::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_FS_DEVICE_INFORMATION { - pub DeviceType: ULONG, - pub Characteristics: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_FS_DEVICE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_DEVICE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_DEVICE_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_FS_DEVICE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_DEVICE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_FS_DEVICE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_DEVICE_INFORMATION), - "::", - stringify!(DeviceType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Characteristics) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_DEVICE_INFORMATION), - "::", - stringify!(Characteristics), - ), - ); -} -pub type FILE_FS_DEVICE_INFORMATION = _FILE_FS_DEVICE_INFORMATION; -pub type PFILE_FS_DEVICE_INFORMATION = *mut _FILE_FS_DEVICE_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FILE_SEGMENT_ELEMENT { - pub Buffer: *mut ::core::ffi::c_void, - pub Alignment: ULONGLONG, -} -#[test] -fn bindgen_test_layout__FILE_SEGMENT_ELEMENT() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_SEGMENT_ELEMENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_SEGMENT_ELEMENT>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_SEGMENT_ELEMENT)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_SEGMENT_ELEMENT>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_SEGMENT_ELEMENT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SEGMENT_ELEMENT), - "::", - stringify!(Buffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Alignment) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SEGMENT_ELEMENT), - "::", - stringify!(Alignment), - ), - ); -} -impl Default for _FILE_SEGMENT_ELEMENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_SEGMENT_ELEMENT = _FILE_SEGMENT_ELEMENT; -pub type PFILE_SEGMENT_ELEMENT = *mut _FILE_SEGMENT_ELEMENT; -pub mod _INTERFACE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const InterfaceTypeUndefined: Type = -1; - pub const Internal: Type = 0; - pub const Isa: Type = 1; - pub const Eisa: Type = 2; - pub const MicroChannel: Type = 3; - pub const TurboChannel: Type = 4; - pub const PCIBus: Type = 5; - pub const VMEBus: Type = 6; - pub const NuBus: Type = 7; - pub const PCMCIABus: Type = 8; - pub const CBus: Type = 9; - pub const MPIBus: Type = 10; - pub const MPSABus: Type = 11; - pub const ProcessorInternal: Type = 12; - pub const InternalPowerBus: Type = 13; - pub const PNPISABus: Type = 14; - pub const PNPBus: Type = 15; - pub const Vmcs: Type = 16; - pub const ACPIBus: Type = 17; - pub const MaximumInterfaceType: Type = 18; -} -pub use self::_INTERFACE_TYPE::Type as INTERFACE_TYPE; -pub type PINTERFACE_TYPE = *mut _INTERFACE_TYPE::Type; -pub mod _DMA_WIDTH { - pub type Type = ::core::ffi::c_int; - pub const Width8Bits: Type = 0; - pub const Width16Bits: Type = 1; - pub const Width32Bits: Type = 2; - pub const Width64Bits: Type = 3; - pub const WidthNoWrap: Type = 4; - pub const MaximumDmaWidth: Type = 5; -} -pub use self::_DMA_WIDTH::Type as DMA_WIDTH; -pub type PDMA_WIDTH = *mut _DMA_WIDTH::Type; -pub mod _DMA_SPEED { - pub type Type = ::core::ffi::c_int; - pub const Compatible: Type = 0; - pub const TypeA: Type = 1; - pub const TypeB: Type = 2; - pub const TypeC: Type = 3; - pub const TypeF: Type = 4; - pub const MaximumDmaSpeed: Type = 5; -} -pub use self::_DMA_SPEED::Type as DMA_SPEED; -pub type PDMA_SPEED = *mut _DMA_SPEED::Type; -pub type PINTERFACE_REFERENCE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID), ->; -pub type PINTERFACE_DEREFERENCE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID), ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_ERROR_LOG_PACKET { - pub MajorFunctionCode: UCHAR, - pub RetryCount: UCHAR, - pub DumpDataSize: USHORT, - pub NumberOfStrings: USHORT, - pub StringOffset: USHORT, - pub EventCategory: USHORT, - pub ErrorCode: NTSTATUS, - pub UniqueErrorValue: ULONG, - pub FinalStatus: NTSTATUS, - pub SequenceNumber: ULONG, - pub IoControlCode: ULONG, - pub DeviceOffset: LARGE_INTEGER, - pub DumpData: [ULONG; 1usize], -} -#[test] -fn bindgen_test_layout__IO_ERROR_LOG_PACKET() { - const UNINIT: ::core::mem::MaybeUninit<_IO_ERROR_LOG_PACKET> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_ERROR_LOG_PACKET>(), - 48usize, - concat!("Size of: ", stringify!(_IO_ERROR_LOG_PACKET)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_ERROR_LOG_PACKET>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_ERROR_LOG_PACKET)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MajorFunctionCode) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_PACKET), - "::", - stringify!(MajorFunctionCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RetryCount) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_PACKET), - "::", - stringify!(RetryCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DumpDataSize) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_PACKET), - "::", - stringify!(DumpDataSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfStrings) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_PACKET), - "::", - stringify!(NumberOfStrings), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StringOffset) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_PACKET), - "::", - stringify!(StringOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EventCategory) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_PACKET), - "::", - stringify!(EventCategory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorCode) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_PACKET), - "::", - stringify!(ErrorCode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UniqueErrorValue) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_PACKET), - "::", - stringify!(UniqueErrorValue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FinalStatus) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_PACKET), - "::", - stringify!(FinalStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SequenceNumber) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_PACKET), - "::", - stringify!(SequenceNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoControlCode) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_PACKET), - "::", - stringify!(IoControlCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceOffset) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_PACKET), - "::", - stringify!(DeviceOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DumpData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_PACKET), - "::", - stringify!(DumpData), - ), - ); -} -impl Default for _IO_ERROR_LOG_PACKET { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_ERROR_LOG_PACKET = _IO_ERROR_LOG_PACKET; -pub type PIO_ERROR_LOG_PACKET = *mut _IO_ERROR_LOG_PACKET; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_ERROR_LOG_MESSAGE { - pub Type: USHORT, - pub Size: USHORT, - pub DriverNameLength: USHORT, - pub TimeStamp: LARGE_INTEGER, - pub DriverNameOffset: ULONG, - pub EntryData: IO_ERROR_LOG_PACKET, -} -#[test] -fn bindgen_test_layout__IO_ERROR_LOG_MESSAGE() { - const UNINIT: ::core::mem::MaybeUninit<_IO_ERROR_LOG_MESSAGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_ERROR_LOG_MESSAGE>(), - 72usize, - concat!("Size of: ", stringify!(_IO_ERROR_LOG_MESSAGE)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_ERROR_LOG_MESSAGE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_ERROR_LOG_MESSAGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_MESSAGE), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_MESSAGE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DriverNameLength) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_MESSAGE), - "::", - stringify!(DriverNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimeStamp) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_MESSAGE), - "::", - stringify!(TimeStamp), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DriverNameOffset) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_MESSAGE), - "::", - stringify!(DriverNameOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntryData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_ERROR_LOG_MESSAGE), - "::", - stringify!(EntryData), - ), - ); -} -impl Default for _IO_ERROR_LOG_MESSAGE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_ERROR_LOG_MESSAGE = _IO_ERROR_LOG_MESSAGE; -pub type PIO_ERROR_LOG_MESSAGE = *mut _IO_ERROR_LOG_MESSAGE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KEY_BASIC_INFORMATION { - pub LastWriteTime: LARGE_INTEGER, - pub TitleIndex: ULONG, - pub NameLength: ULONG, - pub Name: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__KEY_BASIC_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_KEY_BASIC_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEY_BASIC_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_KEY_BASIC_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_BASIC_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_KEY_BASIC_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEY_BASIC_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TitleIndex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KEY_BASIC_INFORMATION), - "::", - stringify!(TitleIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KEY_BASIC_INFORMATION), - "::", - stringify!(NameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KEY_BASIC_INFORMATION), - "::", - stringify!(Name), - ), - ); -} -impl Default for _KEY_BASIC_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KEY_BASIC_INFORMATION = _KEY_BASIC_INFORMATION; -pub type PKEY_BASIC_INFORMATION = *mut _KEY_BASIC_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KEY_NODE_INFORMATION { - pub LastWriteTime: LARGE_INTEGER, - pub TitleIndex: ULONG, - pub ClassOffset: ULONG, - pub ClassLength: ULONG, - pub NameLength: ULONG, - pub Name: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__KEY_NODE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_KEY_NODE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEY_NODE_INFORMATION>(), - 32usize, - concat!("Size of: ", stringify!(_KEY_NODE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_NODE_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_KEY_NODE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEY_NODE_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TitleIndex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KEY_NODE_INFORMATION), - "::", - stringify!(TitleIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClassOffset) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KEY_NODE_INFORMATION), - "::", - stringify!(ClassOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClassLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KEY_NODE_INFORMATION), - "::", - stringify!(ClassLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_KEY_NODE_INFORMATION), - "::", - stringify!(NameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KEY_NODE_INFORMATION), - "::", - stringify!(Name), - ), - ); -} -impl Default for _KEY_NODE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KEY_NODE_INFORMATION = _KEY_NODE_INFORMATION; -pub type PKEY_NODE_INFORMATION = *mut _KEY_NODE_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KEY_FULL_INFORMATION { - pub LastWriteTime: LARGE_INTEGER, - pub TitleIndex: ULONG, - pub ClassOffset: ULONG, - pub ClassLength: ULONG, - pub SubKeys: ULONG, - pub MaxNameLen: ULONG, - pub MaxClassLen: ULONG, - pub Values: ULONG, - pub MaxValueNameLen: ULONG, - pub MaxValueDataLen: ULONG, - pub Class: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__KEY_FULL_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_KEY_FULL_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEY_FULL_INFORMATION>(), - 48usize, - concat!("Size of: ", stringify!(_KEY_FULL_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_FULL_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_KEY_FULL_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEY_FULL_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TitleIndex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KEY_FULL_INFORMATION), - "::", - stringify!(TitleIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClassOffset) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KEY_FULL_INFORMATION), - "::", - stringify!(ClassOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClassLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KEY_FULL_INFORMATION), - "::", - stringify!(ClassLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubKeys) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_KEY_FULL_INFORMATION), - "::", - stringify!(SubKeys), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxNameLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KEY_FULL_INFORMATION), - "::", - stringify!(MaxNameLen), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxClassLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_KEY_FULL_INFORMATION), - "::", - stringify!(MaxClassLen), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Values) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KEY_FULL_INFORMATION), - "::", - stringify!(Values), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxValueNameLen) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_KEY_FULL_INFORMATION), - "::", - stringify!(MaxValueNameLen), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxValueDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KEY_FULL_INFORMATION), - "::", - stringify!(MaxValueDataLen), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Class) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_KEY_FULL_INFORMATION), - "::", - stringify!(Class), - ), - ); -} -impl Default for _KEY_FULL_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KEY_FULL_INFORMATION = _KEY_FULL_INFORMATION; -pub type PKEY_FULL_INFORMATION = *mut _KEY_FULL_INFORMATION; -pub mod _KEY_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const KeyBasicInformation: Type = 0; - pub const KeyNodeInformation: Type = 1; - pub const KeyFullInformation: Type = 2; - pub const KeyNameInformation: Type = 3; - pub const KeyCachedInformation: Type = 4; - pub const KeyFlagsInformation: Type = 5; - pub const KeyVirtualizationInformation: Type = 6; - pub const KeyHandleTagsInformation: Type = 7; - pub const KeyTrustInformation: Type = 8; - pub const KeyLayerInformation: Type = 9; - pub const MaxKeyInfoClass: Type = 10; -} -pub use self::_KEY_INFORMATION_CLASS::Type as KEY_INFORMATION_CLASS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KEY_WRITE_TIME_INFORMATION { - pub LastWriteTime: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__KEY_WRITE_TIME_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_KEY_WRITE_TIME_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEY_WRITE_TIME_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_KEY_WRITE_TIME_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_WRITE_TIME_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_KEY_WRITE_TIME_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEY_WRITE_TIME_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); -} -impl Default for _KEY_WRITE_TIME_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KEY_WRITE_TIME_INFORMATION = _KEY_WRITE_TIME_INFORMATION; -pub type PKEY_WRITE_TIME_INFORMATION = *mut _KEY_WRITE_TIME_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KEY_WOW64_FLAGS_INFORMATION { - pub UserFlags: ULONG, -} -#[test] -fn bindgen_test_layout__KEY_WOW64_FLAGS_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_KEY_WOW64_FLAGS_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEY_WOW64_FLAGS_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_KEY_WOW64_FLAGS_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_WOW64_FLAGS_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_KEY_WOW64_FLAGS_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEY_WOW64_FLAGS_INFORMATION), - "::", - stringify!(UserFlags), - ), - ); -} -pub type KEY_WOW64_FLAGS_INFORMATION = _KEY_WOW64_FLAGS_INFORMATION; -pub type PKEY_WOW64_FLAGS_INFORMATION = *mut _KEY_WOW64_FLAGS_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KEY_CONTROL_FLAGS_INFORMATION { - pub ControlFlags: ULONG, -} -#[test] -fn bindgen_test_layout__KEY_CONTROL_FLAGS_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_KEY_CONTROL_FLAGS_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEY_CONTROL_FLAGS_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_KEY_CONTROL_FLAGS_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_CONTROL_FLAGS_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_KEY_CONTROL_FLAGS_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ControlFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEY_CONTROL_FLAGS_INFORMATION), - "::", - stringify!(ControlFlags), - ), - ); -} -pub type KEY_CONTROL_FLAGS_INFORMATION = _KEY_CONTROL_FLAGS_INFORMATION; -pub type PKEY_CONTROL_FLAGS_INFORMATION = *mut _KEY_CONTROL_FLAGS_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KEY_SET_VIRTUALIZATION_INFORMATION { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__KEY_SET_VIRTUALIZATION_INFORMATION() { - assert_eq!( - ::core::mem::size_of::<_KEY_SET_VIRTUALIZATION_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_KEY_SET_VIRTUALIZATION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_SET_VIRTUALIZATION_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_KEY_SET_VIRTUALIZATION_INFORMATION)), - ); -} -impl _KEY_SET_VIRTUALIZATION_INFORMATION { - #[inline] - pub fn VirtualTarget(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_VirtualTarget(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn VirtualStore(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_VirtualStore(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn VirtualSource(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_VirtualSource(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 29u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - VirtualTarget: ULONG, - VirtualStore: ULONG, - VirtualSource: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let VirtualTarget: u32 = unsafe { - ::core::mem::transmute(VirtualTarget) - }; - VirtualTarget as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let VirtualStore: u32 = unsafe { - ::core::mem::transmute(VirtualStore) - }; - VirtualStore as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let VirtualSource: u32 = unsafe { - ::core::mem::transmute(VirtualSource) - }; - VirtualSource as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 29u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type KEY_SET_VIRTUALIZATION_INFORMATION = _KEY_SET_VIRTUALIZATION_INFORMATION; -pub type PKEY_SET_VIRTUALIZATION_INFORMATION = *mut _KEY_SET_VIRTUALIZATION_INFORMATION; -pub mod _KEY_SET_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const KeyWriteTimeInformation: Type = 0; - pub const KeyWow64FlagsInformation: Type = 1; - pub const KeyControlFlagsInformation: Type = 2; - pub const KeySetVirtualizationInformation: Type = 3; - pub const KeySetDebugInformation: Type = 4; - pub const KeySetHandleTagsInformation: Type = 5; - pub const KeySetLayerInformation: Type = 6; - pub const MaxKeySetInfoClass: Type = 7; -} -pub use self::_KEY_SET_INFORMATION_CLASS::Type as KEY_SET_INFORMATION_CLASS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KEY_VALUE_BASIC_INFORMATION { - pub TitleIndex: ULONG, - pub Type: ULONG, - pub NameLength: ULONG, - pub Name: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__KEY_VALUE_BASIC_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_KEY_VALUE_BASIC_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEY_VALUE_BASIC_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_KEY_VALUE_BASIC_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_VALUE_BASIC_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_KEY_VALUE_BASIC_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TitleIndex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_BASIC_INFORMATION), - "::", - stringify!(TitleIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_BASIC_INFORMATION), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_BASIC_INFORMATION), - "::", - stringify!(NameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_BASIC_INFORMATION), - "::", - stringify!(Name), - ), - ); -} -pub type KEY_VALUE_BASIC_INFORMATION = _KEY_VALUE_BASIC_INFORMATION; -pub type PKEY_VALUE_BASIC_INFORMATION = *mut _KEY_VALUE_BASIC_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KEY_VALUE_FULL_INFORMATION { - pub TitleIndex: ULONG, - pub Type: ULONG, - pub DataOffset: ULONG, - pub DataLength: ULONG, - pub NameLength: ULONG, - pub Name: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__KEY_VALUE_FULL_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_KEY_VALUE_FULL_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEY_VALUE_FULL_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_KEY_VALUE_FULL_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_VALUE_FULL_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_KEY_VALUE_FULL_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TitleIndex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_FULL_INFORMATION), - "::", - stringify!(TitleIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_FULL_INFORMATION), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataOffset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_FULL_INFORMATION), - "::", - stringify!(DataOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataLength) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_FULL_INFORMATION), - "::", - stringify!(DataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_FULL_INFORMATION), - "::", - stringify!(NameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_FULL_INFORMATION), - "::", - stringify!(Name), - ), - ); -} -pub type KEY_VALUE_FULL_INFORMATION = _KEY_VALUE_FULL_INFORMATION; -pub type PKEY_VALUE_FULL_INFORMATION = *mut _KEY_VALUE_FULL_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KEY_VALUE_PARTIAL_INFORMATION { - pub TitleIndex: ULONG, - pub Type: ULONG, - pub DataLength: ULONG, - pub Data: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__KEY_VALUE_PARTIAL_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_KEY_VALUE_PARTIAL_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEY_VALUE_PARTIAL_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_KEY_VALUE_PARTIAL_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_VALUE_PARTIAL_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_KEY_VALUE_PARTIAL_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TitleIndex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_PARTIAL_INFORMATION), - "::", - stringify!(TitleIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_PARTIAL_INFORMATION), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_PARTIAL_INFORMATION), - "::", - stringify!(DataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_PARTIAL_INFORMATION), - "::", - stringify!(Data), - ), - ); -} -pub type KEY_VALUE_PARTIAL_INFORMATION = _KEY_VALUE_PARTIAL_INFORMATION; -pub type PKEY_VALUE_PARTIAL_INFORMATION = *mut _KEY_VALUE_PARTIAL_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KEY_VALUE_PARTIAL_INFORMATION_ALIGN64 { - pub Type: ULONG, - pub DataLength: ULONG, - pub Data: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__KEY_VALUE_PARTIAL_INFORMATION_ALIGN64() { - const UNINIT: ::core::mem::MaybeUninit<_KEY_VALUE_PARTIAL_INFORMATION_ALIGN64> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEY_VALUE_PARTIAL_INFORMATION_ALIGN64>(), - 12usize, - concat!("Size of: ", stringify!(_KEY_VALUE_PARTIAL_INFORMATION_ALIGN64)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_VALUE_PARTIAL_INFORMATION_ALIGN64>(), - 4usize, - concat!("Alignment of ", stringify!(_KEY_VALUE_PARTIAL_INFORMATION_ALIGN64)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_PARTIAL_INFORMATION_ALIGN64), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_PARTIAL_INFORMATION_ALIGN64), - "::", - stringify!(DataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_PARTIAL_INFORMATION_ALIGN64), - "::", - stringify!(Data), - ), - ); -} -pub type KEY_VALUE_PARTIAL_INFORMATION_ALIGN64 = _KEY_VALUE_PARTIAL_INFORMATION_ALIGN64; -pub type PKEY_VALUE_PARTIAL_INFORMATION_ALIGN64 = *mut _KEY_VALUE_PARTIAL_INFORMATION_ALIGN64; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KEY_VALUE_LAYER_INFORMATION { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__KEY_VALUE_LAYER_INFORMATION() { - assert_eq!( - ::core::mem::size_of::<_KEY_VALUE_LAYER_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_KEY_VALUE_LAYER_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_VALUE_LAYER_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_KEY_VALUE_LAYER_INFORMATION)), - ); -} -impl _KEY_VALUE_LAYER_INFORMATION { - #[inline] - pub fn IsTombstone(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsTombstone(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 31u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - IsTombstone: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let IsTombstone: u32 = unsafe { - ::core::mem::transmute(IsTombstone) - }; - IsTombstone as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 31u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type KEY_VALUE_LAYER_INFORMATION = _KEY_VALUE_LAYER_INFORMATION; -pub type PKEY_VALUE_LAYER_INFORMATION = *mut _KEY_VALUE_LAYER_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KEY_VALUE_ENTRY { - pub ValueName: PUNICODE_STRING, - pub DataLength: ULONG, - pub DataOffset: ULONG, - pub Type: ULONG, -} -#[test] -fn bindgen_test_layout__KEY_VALUE_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_KEY_VALUE_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEY_VALUE_ENTRY>(), - 24usize, - concat!("Size of: ", stringify!(_KEY_VALUE_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_VALUE_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_KEY_VALUE_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValueName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_ENTRY), - "::", - stringify!(ValueName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_ENTRY), - "::", - stringify!(DataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataOffset) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_ENTRY), - "::", - stringify!(DataOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KEY_VALUE_ENTRY), - "::", - stringify!(Type), - ), - ); -} -impl Default for _KEY_VALUE_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KEY_VALUE_ENTRY = _KEY_VALUE_ENTRY; -pub type PKEY_VALUE_ENTRY = *mut _KEY_VALUE_ENTRY; -pub mod _KEY_VALUE_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const KeyValueBasicInformation: Type = 0; - pub const KeyValueFullInformation: Type = 1; - pub const KeyValuePartialInformation: Type = 2; - pub const KeyValueFullInformationAlign64: Type = 3; - pub const KeyValuePartialInformationAlign64: Type = 4; - pub const KeyValueLayerInformation: Type = 5; - pub const MaxKeyValueInfoClass: Type = 6; -} -pub use self::_KEY_VALUE_INFORMATION_CLASS::Type as KEY_VALUE_INFORMATION_CLASS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KEY_TRUST_INFORMATION { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__KEY_TRUST_INFORMATION() { - assert_eq!( - ::core::mem::size_of::<_KEY_TRUST_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_KEY_TRUST_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_TRUST_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_KEY_TRUST_INFORMATION)), - ); -} -impl _KEY_TRUST_INFORMATION { - #[inline] - pub fn TrustedKey(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_TrustedKey(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 31u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TrustedKey: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let TrustedKey: u32 = unsafe { ::core::mem::transmute(TrustedKey) }; - TrustedKey as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 31u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type KEY_TRUST_INFORMATION = _KEY_TRUST_INFORMATION; -pub type PKEY_TRUST_INFORMATION = *mut _KEY_TRUST_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OBJECT_NAME_INFORMATION { - pub Name: UNICODE_STRING, -} -#[test] -fn bindgen_test_layout__OBJECT_NAME_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_OBJECT_NAME_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OBJECT_NAME_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_OBJECT_NAME_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_OBJECT_NAME_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_OBJECT_NAME_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_NAME_INFORMATION), - "::", - stringify!(Name), - ), - ); -} -impl Default for _OBJECT_NAME_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OBJECT_NAME_INFORMATION = _OBJECT_NAME_INFORMATION; -pub type POBJECT_NAME_INFORMATION = *mut _OBJECT_NAME_INFORMATION; -pub mod _SECTION_INHERIT { - pub type Type = ::core::ffi::c_int; - pub const ViewShare: Type = 1; - pub const ViewUnmap: Type = 2; -} -pub use self::_SECTION_INHERIT::Type as SECTION_INHERIT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MEM_ADDRESS_REQUIREMENTS { - pub LowestStartingAddress: PVOID, - pub HighestEndingAddress: PVOID, - pub Alignment: SIZE_T, -} -#[test] -fn bindgen_test_layout__MEM_ADDRESS_REQUIREMENTS() { - const UNINIT: ::core::mem::MaybeUninit<_MEM_ADDRESS_REQUIREMENTS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MEM_ADDRESS_REQUIREMENTS>(), - 24usize, - concat!("Size of: ", stringify!(_MEM_ADDRESS_REQUIREMENTS)), - ); - assert_eq!( - ::core::mem::align_of::<_MEM_ADDRESS_REQUIREMENTS>(), - 8usize, - concat!("Alignment of ", stringify!(_MEM_ADDRESS_REQUIREMENTS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LowestStartingAddress) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MEM_ADDRESS_REQUIREMENTS), - "::", - stringify!(LowestStartingAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HighestEndingAddress) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MEM_ADDRESS_REQUIREMENTS), - "::", - stringify!(HighestEndingAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Alignment) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MEM_ADDRESS_REQUIREMENTS), - "::", - stringify!(Alignment), - ), - ); -} -impl Default for _MEM_ADDRESS_REQUIREMENTS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MEM_ADDRESS_REQUIREMENTS = _MEM_ADDRESS_REQUIREMENTS; -pub type PMEM_ADDRESS_REQUIREMENTS = *mut _MEM_ADDRESS_REQUIREMENTS; -pub mod MEM_EXTENDED_PARAMETER_TYPE { - pub type Type = ::core::ffi::c_int; - pub const MemExtendedParameterInvalidType: Type = 0; - pub const MemExtendedParameterAddressRequirements: Type = 1; - pub const MemExtendedParameterNumaNode: Type = 2; - pub const MemExtendedParameterPartitionHandle: Type = 3; - pub const MemExtendedParameterUserPhysicalHandle: Type = 4; - pub const MemExtendedParameterAttributeFlags: Type = 5; - pub const MemExtendedParameterImageMachine: Type = 6; - pub const MemExtendedParameterMax: Type = 7; -} -pub type PMEM_EXTENDED_PARAMETER_TYPE = *mut MEM_EXTENDED_PARAMETER_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct MEM_EXTENDED_PARAMETER { - pub __bindgen_anon_1: MEM_EXTENDED_PARAMETER__bindgen_ty_1, - pub __bindgen_anon_2: MEM_EXTENDED_PARAMETER__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct MEM_EXTENDED_PARAMETER__bindgen_ty_1 { - pub _bitfield_align_1: [u64; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout_MEM_EXTENDED_PARAMETER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(MEM_EXTENDED_PARAMETER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(MEM_EXTENDED_PARAMETER__bindgen_ty_1)), - ); -} -impl MEM_EXTENDED_PARAMETER__bindgen_ty_1 { - #[inline] - pub fn Type(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u64) } - } - #[inline] - pub fn set_Type(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 56u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 56u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Type: ULONG64, - Reserved: ULONG64, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let Type: u64 = unsafe { ::core::mem::transmute(Type) }; - Type as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 56u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union MEM_EXTENDED_PARAMETER__bindgen_ty_2 { - pub ULong64: ULONG64, - pub Pointer: PVOID, - pub Size: SIZE_T, - pub Handle: HANDLE, - pub ULong: ULONG, -} -#[test] -fn bindgen_test_layout_MEM_EXTENDED_PARAMETER__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(MEM_EXTENDED_PARAMETER__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(MEM_EXTENDED_PARAMETER__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ULong64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(MEM_EXTENDED_PARAMETER__bindgen_ty_2), - "::", - stringify!(ULong64), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Pointer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(MEM_EXTENDED_PARAMETER__bindgen_ty_2), - "::", - stringify!(Pointer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(MEM_EXTENDED_PARAMETER__bindgen_ty_2), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Handle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(MEM_EXTENDED_PARAMETER__bindgen_ty_2), - "::", - stringify!(Handle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ULong) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(MEM_EXTENDED_PARAMETER__bindgen_ty_2), - "::", - stringify!(ULong), - ), - ); -} -impl Default for MEM_EXTENDED_PARAMETER__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout_MEM_EXTENDED_PARAMETER() { - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(MEM_EXTENDED_PARAMETER)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(MEM_EXTENDED_PARAMETER)), - ); -} -impl Default for MEM_EXTENDED_PARAMETER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PMEM_EXTENDED_PARAMETER = *mut MEM_EXTENDED_PARAMETER; -pub mod _MEM_DEDICATED_ATTRIBUTE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const MemDedicatedAttributeReadBandwidth: Type = 0; - pub const MemDedicatedAttributeReadLatency: Type = 1; - pub const MemDedicatedAttributeWriteBandwidth: Type = 2; - pub const MemDedicatedAttributeWriteLatency: Type = 3; - pub const MemDedicatedAttributeMax: Type = 4; -} -pub use self::_MEM_DEDICATED_ATTRIBUTE_TYPE::Type as MEM_DEDICATED_ATTRIBUTE_TYPE; -pub type PMEM_DEDICATED_ATTRIBUTE_TYPE = *mut _MEM_DEDICATED_ATTRIBUTE_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION { - pub DedicatedMemoryTypeId: ULONG64, - pub HandleAttributes: ULONG, - pub DesiredAccess: ACCESS_MASK, - pub DedicatedMemoryPartitionHandle: HANDLE, -} -#[test] -fn bindgen_test_layout__MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit< - _MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION>(), - 24usize, - concat!( - "Size of: ", - stringify!(_MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION), - ), - ); - assert_eq!( - ::core::mem::align_of::<_MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DedicatedMemoryTypeId) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION), - "::", - stringify!(DedicatedMemoryTypeId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HandleAttributes) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION), - "::", - stringify!(HandleAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DesiredAccess) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION), - "::", - stringify!(DesiredAccess), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DedicatedMemoryPartitionHandle) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION), - "::", - stringify!(DedicatedMemoryPartitionHandle), - ), - ); -} -impl Default for _MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION = _MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION; -pub type PMEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION = *mut _MEMORY_PARTITION_DEDICATED_MEMORY_OPEN_INFORMATION; -pub mod MEM_SECTION_EXTENDED_PARAMETER_TYPE { - pub type Type = ::core::ffi::c_int; - pub const MemSectionExtendedParameterInvalidType: Type = 0; - pub const MemSectionExtendedParameterUserPhysicalFlags: Type = 1; - pub const MemSectionExtendedParameterNumaNode: Type = 2; - pub const MemSectionExtendedParameterSigningLevel: Type = 3; - pub const MemSectionExtendedParameterMax: Type = 4; -} -pub type PMEM_SECTION_EXTENDED_PARAMETER_TYPE = *mut MEM_SECTION_EXTENDED_PARAMETER_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CLIENT_ID { - pub UniqueProcess: HANDLE, - pub UniqueThread: HANDLE, -} -#[test] -fn bindgen_test_layout__CLIENT_ID() { - const UNINIT: ::core::mem::MaybeUninit<_CLIENT_ID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLIENT_ID>(), - 16usize, - concat!("Size of: ", stringify!(_CLIENT_ID)), - ); - assert_eq!( - ::core::mem::align_of::<_CLIENT_ID>(), - 8usize, - concat!("Alignment of ", stringify!(_CLIENT_ID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UniqueProcess) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLIENT_ID), - "::", - stringify!(UniqueProcess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UniqueThread) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLIENT_ID), - "::", - stringify!(UniqueThread), - ), - ); -} -impl Default for _CLIENT_ID { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLIENT_ID = _CLIENT_ID; -pub type PCLIENT_ID = *mut CLIENT_ID; -pub mod _PARTITION_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const SystemMemoryPartitionInformation: Type = 0; - pub const SystemMemoryPartitionDedicatedMemoryInformation: Type = 9; - pub const SystemMemoryPartitionOpenDedicatedMemory: Type = 10; -} -pub use self::_PARTITION_INFORMATION_CLASS::Type as PARTITION_INFORMATION_CLASS; -pub type PPARTITION_INFORMATION_CLASS = *mut _PARTITION_INFORMATION_CLASS::Type; -pub mod _SYSTEM_POWER_STATE { - pub type Type = ::core::ffi::c_int; - pub const PowerSystemUnspecified: Type = 0; - pub const PowerSystemWorking: Type = 1; - pub const PowerSystemSleeping1: Type = 2; - pub const PowerSystemSleeping2: Type = 3; - pub const PowerSystemSleeping3: Type = 4; - pub const PowerSystemHibernate: Type = 5; - pub const PowerSystemShutdown: Type = 6; - pub const PowerSystemMaximum: Type = 7; -} -pub use self::_SYSTEM_POWER_STATE::Type as SYSTEM_POWER_STATE; -pub type PSYSTEM_POWER_STATE = *mut _SYSTEM_POWER_STATE::Type; -pub mod POWER_ACTION { - pub type Type = ::core::ffi::c_int; - pub const PowerActionNone: Type = 0; - pub const PowerActionReserved: Type = 1; - pub const PowerActionSleep: Type = 2; - pub const PowerActionHibernate: Type = 3; - pub const PowerActionShutdown: Type = 4; - pub const PowerActionShutdownReset: Type = 5; - pub const PowerActionShutdownOff: Type = 6; - pub const PowerActionWarmEject: Type = 7; - pub const PowerActionDisplayOff: Type = 8; -} -pub type PPOWER_ACTION = *mut POWER_ACTION::Type; -pub mod _DEVICE_POWER_STATE { - pub type Type = ::core::ffi::c_int; - pub const PowerDeviceUnspecified: Type = 0; - pub const PowerDeviceD0: Type = 1; - pub const PowerDeviceD1: Type = 2; - pub const PowerDeviceD2: Type = 3; - pub const PowerDeviceD3: Type = 4; - pub const PowerDeviceMaximum: Type = 5; -} -pub use self::_DEVICE_POWER_STATE::Type as DEVICE_POWER_STATE; -pub type PDEVICE_POWER_STATE = *mut _DEVICE_POWER_STATE::Type; -pub mod _MONITOR_DISPLAY_STATE { - pub type Type = ::core::ffi::c_int; - pub const PowerMonitorOff: Type = 0; - pub const PowerMonitorOn: Type = 1; - pub const PowerMonitorDim: Type = 2; -} -pub use self::_MONITOR_DISPLAY_STATE::Type as MONITOR_DISPLAY_STATE; -pub type PMONITOR_DISPLAY_STATE = *mut _MONITOR_DISPLAY_STATE::Type; -pub mod _USER_ACTIVITY_PRESENCE { - pub type Type = ::core::ffi::c_int; - pub const PowerUserPresent: Type = 0; - pub const PowerUserNotPresent: Type = 1; - pub const PowerUserInactive: Type = 2; - pub const PowerUserMaximum: Type = 3; - pub const PowerUserInvalid: Type = 3; -} -pub use self::_USER_ACTIVITY_PRESENCE::Type as USER_ACTIVITY_PRESENCE; -pub type PUSER_ACTIVITY_PRESENCE = *mut _USER_ACTIVITY_PRESENCE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _POWER_STATE { - pub SystemState: SYSTEM_POWER_STATE, - pub DeviceState: DEVICE_POWER_STATE, -} -#[test] -fn bindgen_test_layout__POWER_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_POWER_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POWER_STATE>(), - 4usize, - concat!("Size of: ", stringify!(_POWER_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_POWER_STATE>(), - 4usize, - concat!("Alignment of ", stringify!(_POWER_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SystemState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_STATE), - "::", - stringify!(SystemState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_STATE), - "::", - stringify!(DeviceState), - ), - ); -} -impl Default for _POWER_STATE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type POWER_STATE = _POWER_STATE; -pub type PPOWER_STATE = *mut _POWER_STATE; -pub mod _POWER_STATE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const SystemPowerState: Type = 0; - pub const DevicePowerState: Type = 1; -} -pub use self::_POWER_STATE_TYPE::Type as POWER_STATE_TYPE; -pub type PPOWER_STATE_TYPE = *mut _POWER_STATE_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _SYSTEM_POWER_STATE_CONTEXT { - pub __bindgen_anon_1: _SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1 { - pub __bindgen_anon_1: _SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1__bindgen_ty_1, - pub ContextAsUlong: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn TargetSystemState(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 4u8) as u32) } - } - #[inline] - pub fn set_TargetSystemState(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 4u8, val as u64) - } - } - #[inline] - pub fn EffectiveSystemState(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 4u8) as u32) } - } - #[inline] - pub fn set_EffectiveSystemState(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 4u8, val as u64) - } - } - #[inline] - pub fn CurrentSystemState(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 4u8) as u32) } - } - #[inline] - pub fn set_CurrentSystemState(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 4u8, val as u64) - } - } - #[inline] - pub fn IgnoreHibernationPath(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } - } - #[inline] - pub fn set_IgnoreHibernationPath(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 1u8, val as u64) - } - } - #[inline] - pub fn PseudoTransition(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } - } - #[inline] - pub fn set_PseudoTransition(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 1u8, val as u64) - } - } - #[inline] - pub fn KernelSoftReboot(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u32) } - } - #[inline] - pub fn set_KernelSoftReboot(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 1u8, val as u64) - } - } - #[inline] - pub fn DirectedDripsTransition(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u32) } - } - #[inline] - pub fn set_DirectedDripsTransition(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(23usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Reserved1: ULONG, - TargetSystemState: ULONG, - EffectiveSystemState: ULONG, - CurrentSystemState: ULONG, - IgnoreHibernationPath: ULONG, - PseudoTransition: ULONG, - KernelSoftReboot: ULONG, - DirectedDripsTransition: ULONG, - Reserved2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 4u8, - { - let TargetSystemState: u32 = unsafe { - ::core::mem::transmute(TargetSystemState) - }; - TargetSystemState as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 4u8, - { - let EffectiveSystemState: u32 = unsafe { - ::core::mem::transmute(EffectiveSystemState) - }; - EffectiveSystemState as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 4u8, - { - let CurrentSystemState: u32 = unsafe { - ::core::mem::transmute(CurrentSystemState) - }; - CurrentSystemState as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 1u8, - { - let IgnoreHibernationPath: u32 = unsafe { - ::core::mem::transmute(IgnoreHibernationPath) - }; - IgnoreHibernationPath as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 1u8, - { - let PseudoTransition: u32 = unsafe { - ::core::mem::transmute(PseudoTransition) - }; - PseudoTransition as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 1u8, - { - let KernelSoftReboot: u32 = unsafe { - ::core::mem::transmute(KernelSoftReboot) - }; - KernelSoftReboot as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 23usize, - 1u8, - { - let DirectedDripsTransition: u32 = unsafe { - ::core::mem::transmute(DirectedDripsTransition) - }; - DirectedDripsTransition as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContextAsUlong) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1), - "::", - stringify!(ContextAsUlong), - ), - ); -} -impl Default for _SYSTEM_POWER_STATE_CONTEXT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__SYSTEM_POWER_STATE_CONTEXT() { - assert_eq!( - ::core::mem::size_of::<_SYSTEM_POWER_STATE_CONTEXT>(), - 4usize, - concat!("Size of: ", stringify!(_SYSTEM_POWER_STATE_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_POWER_STATE_CONTEXT>(), - 4usize, - concat!("Alignment of ", stringify!(_SYSTEM_POWER_STATE_CONTEXT)), - ); -} -impl Default for _SYSTEM_POWER_STATE_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SYSTEM_POWER_STATE_CONTEXT = _SYSTEM_POWER_STATE_CONTEXT; -pub type PSYSTEM_POWER_STATE_CONTEXT = *mut _SYSTEM_POWER_STATE_CONTEXT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _COUNTED_REASON_CONTEXT { - pub Version: ULONG, - pub Flags: ULONG, - pub __bindgen_anon_1: _COUNTED_REASON_CONTEXT__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _COUNTED_REASON_CONTEXT__bindgen_ty_1 { - pub __bindgen_anon_1: _COUNTED_REASON_CONTEXT__bindgen_ty_1__bindgen_ty_1, - pub SimpleString: UNICODE_STRING, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _COUNTED_REASON_CONTEXT__bindgen_ty_1__bindgen_ty_1 { - pub ResourceFileName: UNICODE_STRING, - pub ResourceReasonId: USHORT, - pub StringCount: ULONG, - pub ReasonStrings: PUNICODE_STRING, -} -#[test] -fn bindgen_test_layout__COUNTED_REASON_CONTEXT__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _COUNTED_REASON_CONTEXT__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_COUNTED_REASON_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 32usize, - concat!( - "Size of: ", - stringify!(_COUNTED_REASON_CONTEXT__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_COUNTED_REASON_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_COUNTED_REASON_CONTEXT__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ResourceFileName) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_COUNTED_REASON_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ResourceFileName), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ResourceReasonId) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_COUNTED_REASON_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ResourceReasonId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StringCount) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_COUNTED_REASON_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(StringCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReasonStrings) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_COUNTED_REASON_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ReasonStrings), - ), - ); -} -impl Default for _COUNTED_REASON_CONTEXT__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__COUNTED_REASON_CONTEXT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_COUNTED_REASON_CONTEXT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_COUNTED_REASON_CONTEXT__bindgen_ty_1>(), - 32usize, - concat!("Size of: ", stringify!(_COUNTED_REASON_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_COUNTED_REASON_CONTEXT__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_COUNTED_REASON_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SimpleString) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_COUNTED_REASON_CONTEXT__bindgen_ty_1), - "::", - stringify!(SimpleString), - ), - ); -} -impl Default for _COUNTED_REASON_CONTEXT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__COUNTED_REASON_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_COUNTED_REASON_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_COUNTED_REASON_CONTEXT>(), - 40usize, - concat!("Size of: ", stringify!(_COUNTED_REASON_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_COUNTED_REASON_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_COUNTED_REASON_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_COUNTED_REASON_CONTEXT), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_COUNTED_REASON_CONTEXT), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _COUNTED_REASON_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type COUNTED_REASON_CONTEXT = _COUNTED_REASON_CONTEXT; -pub type PCOUNTED_REASON_CONTEXT = *mut _COUNTED_REASON_CONTEXT; -pub type EXECUTION_STATE = ULONG; -pub type PEXECUTION_STATE = *mut ULONG; -pub mod LATENCY_TIME { - pub type Type = ::core::ffi::c_int; - pub const LT_DONT_CARE: Type = 0; - pub const LT_LOWEST_LATENCY: Type = 1; -} -pub mod _POWER_REQUEST_TYPE { - pub type Type = ::core::ffi::c_int; - pub const PowerRequestDisplayRequired: Type = 0; - pub const PowerRequestSystemRequired: Type = 1; - pub const PowerRequestAwayModeRequired: Type = 2; - pub const PowerRequestExecutionRequired: Type = 3; -} -pub use self::_POWER_REQUEST_TYPE::Type as POWER_REQUEST_TYPE; -pub type PPOWER_REQUEST_TYPE = *mut _POWER_REQUEST_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CM_Power_Data_s { - pub PD_Size: ULONG, - pub PD_MostRecentPowerState: DEVICE_POWER_STATE, - pub PD_Capabilities: ULONG, - pub PD_D1Latency: ULONG, - pub PD_D2Latency: ULONG, - pub PD_D3Latency: ULONG, - pub PD_PowerStateMapping: [DEVICE_POWER_STATE; 7usize], - pub PD_DeepestSystemWake: SYSTEM_POWER_STATE, -} -#[test] -fn bindgen_test_layout_CM_Power_Data_s() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CM_Power_Data_s)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CM_Power_Data_s)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PD_Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CM_Power_Data_s), - "::", - stringify!(PD_Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PD_MostRecentPowerState) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CM_Power_Data_s), - "::", - stringify!(PD_MostRecentPowerState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PD_Capabilities) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CM_Power_Data_s), - "::", - stringify!(PD_Capabilities), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PD_D1Latency) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CM_Power_Data_s), - "::", - stringify!(PD_D1Latency), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PD_D2Latency) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CM_Power_Data_s), - "::", - stringify!(PD_D2Latency), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PD_D3Latency) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CM_Power_Data_s), - "::", - stringify!(PD_D3Latency), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PD_PowerStateMapping) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CM_Power_Data_s), - "::", - stringify!(PD_PowerStateMapping), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PD_DeepestSystemWake) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(CM_Power_Data_s), - "::", - stringify!(PD_DeepestSystemWake), - ), - ); -} -impl Default for CM_Power_Data_s { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CM_POWER_DATA = CM_Power_Data_s; -pub type PCM_POWER_DATA = *mut CM_Power_Data_s; -pub mod POWER_INFORMATION_LEVEL { - pub type Type = ::core::ffi::c_int; - pub const SystemPowerPolicyAc: Type = 0; - pub const SystemPowerPolicyDc: Type = 1; - pub const VerifySystemPolicyAc: Type = 2; - pub const VerifySystemPolicyDc: Type = 3; - pub const SystemPowerCapabilities: Type = 4; - pub const SystemBatteryState: Type = 5; - pub const SystemPowerStateHandler: Type = 6; - pub const ProcessorStateHandler: Type = 7; - pub const SystemPowerPolicyCurrent: Type = 8; - pub const AdministratorPowerPolicy: Type = 9; - pub const SystemReserveHiberFile: Type = 10; - pub const ProcessorInformation: Type = 11; - pub const SystemPowerInformation: Type = 12; - pub const ProcessorStateHandler2: Type = 13; - pub const LastWakeTime: Type = 14; - pub const LastSleepTime: Type = 15; - pub const SystemExecutionState: Type = 16; - pub const SystemPowerStateNotifyHandler: Type = 17; - pub const ProcessorPowerPolicyAc: Type = 18; - pub const ProcessorPowerPolicyDc: Type = 19; - pub const VerifyProcessorPowerPolicyAc: Type = 20; - pub const VerifyProcessorPowerPolicyDc: Type = 21; - pub const ProcessorPowerPolicyCurrent: Type = 22; - pub const SystemPowerStateLogging: Type = 23; - pub const SystemPowerLoggingEntry: Type = 24; - pub const SetPowerSettingValue: Type = 25; - pub const NotifyUserPowerSetting: Type = 26; - pub const PowerInformationLevelUnused0: Type = 27; - pub const SystemMonitorHiberBootPowerOff: Type = 28; - pub const SystemVideoState: Type = 29; - pub const TraceApplicationPowerMessage: Type = 30; - pub const TraceApplicationPowerMessageEnd: Type = 31; - pub const ProcessorPerfStates: Type = 32; - pub const ProcessorIdleStates: Type = 33; - pub const ProcessorCap: Type = 34; - pub const SystemWakeSource: Type = 35; - pub const SystemHiberFileInformation: Type = 36; - pub const TraceServicePowerMessage: Type = 37; - pub const ProcessorLoad: Type = 38; - pub const PowerShutdownNotification: Type = 39; - pub const MonitorCapabilities: Type = 40; - pub const SessionPowerInit: Type = 41; - pub const SessionDisplayState: Type = 42; - pub const PowerRequestCreate: Type = 43; - pub const PowerRequestAction: Type = 44; - pub const GetPowerRequestList: Type = 45; - pub const ProcessorInformationEx: Type = 46; - pub const NotifyUserModeLegacyPowerEvent: Type = 47; - pub const GroupPark: Type = 48; - pub const ProcessorIdleDomains: Type = 49; - pub const WakeTimerList: Type = 50; - pub const SystemHiberFileSize: Type = 51; - pub const ProcessorIdleStatesHv: Type = 52; - pub const ProcessorPerfStatesHv: Type = 53; - pub const ProcessorPerfCapHv: Type = 54; - pub const ProcessorSetIdle: Type = 55; - pub const LogicalProcessorIdling: Type = 56; - pub const UserPresence: Type = 57; - pub const PowerSettingNotificationName: Type = 58; - pub const GetPowerSettingValue: Type = 59; - pub const IdleResiliency: Type = 60; - pub const SessionRITState: Type = 61; - pub const SessionConnectNotification: Type = 62; - pub const SessionPowerCleanup: Type = 63; - pub const SessionLockState: Type = 64; - pub const SystemHiberbootState: Type = 65; - pub const PlatformInformation: Type = 66; - pub const PdcInvocation: Type = 67; - pub const MonitorInvocation: Type = 68; - pub const FirmwareTableInformationRegistered: Type = 69; - pub const SetShutdownSelectedTime: Type = 70; - pub const SuspendResumeInvocation: Type = 71; - pub const PlmPowerRequestCreate: Type = 72; - pub const ScreenOff: Type = 73; - pub const CsDeviceNotification: Type = 74; - pub const PlatformRole: Type = 75; - pub const LastResumePerformance: Type = 76; - pub const DisplayBurst: Type = 77; - pub const ExitLatencySamplingPercentage: Type = 78; - pub const RegisterSpmPowerSettings: Type = 79; - pub const PlatformIdleStates: Type = 80; - pub const ProcessorIdleVeto: Type = 81; - pub const PlatformIdleVeto: Type = 82; - pub const SystemBatteryStatePrecise: Type = 83; - pub const ThermalEvent: Type = 84; - pub const PowerRequestActionInternal: Type = 85; - pub const BatteryDeviceState: Type = 86; - pub const PowerInformationInternal: Type = 87; - pub const ThermalStandby: Type = 88; - pub const SystemHiberFileType: Type = 89; - pub const PhysicalPowerButtonPress: Type = 90; - pub const QueryPotentialDripsConstraint: Type = 91; - pub const EnergyTrackerCreate: Type = 92; - pub const EnergyTrackerQuery: Type = 93; - pub const UpdateBlackBoxRecorder: Type = 94; - pub const SessionAllowExternalDmaDevices: Type = 95; - pub const SendSuspendResumeNotification: Type = 96; - pub const BlackBoxRecorderDirectAccessBuffer: Type = 97; - pub const PowerInformationLevelMaximum: Type = 98; -} -pub mod POWER_USER_PRESENCE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const UserNotPresent: Type = 0; - pub const UserPresent: Type = 1; - pub const UserUnknown: Type = 255; -} -pub type PPOWER_USER_PRESENCE_TYPE = *mut POWER_USER_PRESENCE_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _POWER_USER_PRESENCE { - pub UserPresence: POWER_USER_PRESENCE_TYPE::Type, -} -#[test] -fn bindgen_test_layout__POWER_USER_PRESENCE() { - const UNINIT: ::core::mem::MaybeUninit<_POWER_USER_PRESENCE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POWER_USER_PRESENCE>(), - 4usize, - concat!("Size of: ", stringify!(_POWER_USER_PRESENCE)), - ); - assert_eq!( - ::core::mem::align_of::<_POWER_USER_PRESENCE>(), - 4usize, - concat!("Alignment of ", stringify!(_POWER_USER_PRESENCE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserPresence) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_USER_PRESENCE), - "::", - stringify!(UserPresence), - ), - ); -} -impl Default for _POWER_USER_PRESENCE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type POWER_USER_PRESENCE = _POWER_USER_PRESENCE; -pub type PPOWER_USER_PRESENCE = *mut _POWER_USER_PRESENCE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _POWER_SESSION_CONNECT { - pub Connected: BOOLEAN, - pub Console: BOOLEAN, -} -#[test] -fn bindgen_test_layout__POWER_SESSION_CONNECT() { - const UNINIT: ::core::mem::MaybeUninit<_POWER_SESSION_CONNECT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POWER_SESSION_CONNECT>(), - 2usize, - concat!("Size of: ", stringify!(_POWER_SESSION_CONNECT)), - ); - assert_eq!( - ::core::mem::align_of::<_POWER_SESSION_CONNECT>(), - 1usize, - concat!("Alignment of ", stringify!(_POWER_SESSION_CONNECT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Connected) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_SESSION_CONNECT), - "::", - stringify!(Connected), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Console) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_POWER_SESSION_CONNECT), - "::", - stringify!(Console), - ), - ); -} -pub type POWER_SESSION_CONNECT = _POWER_SESSION_CONNECT; -pub type PPOWER_SESSION_CONNECT = *mut _POWER_SESSION_CONNECT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _POWER_SESSION_TIMEOUTS { - pub InputTimeout: ULONG, - pub DisplayTimeout: ULONG, -} -#[test] -fn bindgen_test_layout__POWER_SESSION_TIMEOUTS() { - const UNINIT: ::core::mem::MaybeUninit<_POWER_SESSION_TIMEOUTS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POWER_SESSION_TIMEOUTS>(), - 8usize, - concat!("Size of: ", stringify!(_POWER_SESSION_TIMEOUTS)), - ); - assert_eq!( - ::core::mem::align_of::<_POWER_SESSION_TIMEOUTS>(), - 4usize, - concat!("Alignment of ", stringify!(_POWER_SESSION_TIMEOUTS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InputTimeout) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_SESSION_TIMEOUTS), - "::", - stringify!(InputTimeout), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DisplayTimeout) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_POWER_SESSION_TIMEOUTS), - "::", - stringify!(DisplayTimeout), - ), - ); -} -pub type POWER_SESSION_TIMEOUTS = _POWER_SESSION_TIMEOUTS; -pub type PPOWER_SESSION_TIMEOUTS = *mut _POWER_SESSION_TIMEOUTS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _POWER_SESSION_RIT_STATE { - pub Active: BOOLEAN, - pub LastInputTime: ULONG64, -} -#[test] -fn bindgen_test_layout__POWER_SESSION_RIT_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_POWER_SESSION_RIT_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POWER_SESSION_RIT_STATE>(), - 16usize, - concat!("Size of: ", stringify!(_POWER_SESSION_RIT_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_POWER_SESSION_RIT_STATE>(), - 8usize, - concat!("Alignment of ", stringify!(_POWER_SESSION_RIT_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Active) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_SESSION_RIT_STATE), - "::", - stringify!(Active), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastInputTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_POWER_SESSION_RIT_STATE), - "::", - stringify!(LastInputTime), - ), - ); -} -pub type POWER_SESSION_RIT_STATE = _POWER_SESSION_RIT_STATE; -pub type PPOWER_SESSION_RIT_STATE = *mut _POWER_SESSION_RIT_STATE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _POWER_SESSION_WINLOGON { - pub SessionId: ULONG, - pub Console: BOOLEAN, - pub Locked: BOOLEAN, -} -#[test] -fn bindgen_test_layout__POWER_SESSION_WINLOGON() { - const UNINIT: ::core::mem::MaybeUninit<_POWER_SESSION_WINLOGON> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POWER_SESSION_WINLOGON>(), - 8usize, - concat!("Size of: ", stringify!(_POWER_SESSION_WINLOGON)), - ); - assert_eq!( - ::core::mem::align_of::<_POWER_SESSION_WINLOGON>(), - 4usize, - concat!("Alignment of ", stringify!(_POWER_SESSION_WINLOGON)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SessionId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_SESSION_WINLOGON), - "::", - stringify!(SessionId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Console) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_POWER_SESSION_WINLOGON), - "::", - stringify!(Console), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Locked) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_POWER_SESSION_WINLOGON), - "::", - stringify!(Locked), - ), - ); -} -pub type POWER_SESSION_WINLOGON = _POWER_SESSION_WINLOGON; -pub type PPOWER_SESSION_WINLOGON = *mut _POWER_SESSION_WINLOGON; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _POWER_SESSION_ALLOW_EXTERNAL_DMA_DEVICES { - pub IsAllowed: BOOLEAN, -} -#[test] -fn bindgen_test_layout__POWER_SESSION_ALLOW_EXTERNAL_DMA_DEVICES() { - const UNINIT: ::core::mem::MaybeUninit<_POWER_SESSION_ALLOW_EXTERNAL_DMA_DEVICES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POWER_SESSION_ALLOW_EXTERNAL_DMA_DEVICES>(), - 1usize, - concat!("Size of: ", stringify!(_POWER_SESSION_ALLOW_EXTERNAL_DMA_DEVICES)), - ); - assert_eq!( - ::core::mem::align_of::<_POWER_SESSION_ALLOW_EXTERNAL_DMA_DEVICES>(), - 1usize, - concat!("Alignment of ", stringify!(_POWER_SESSION_ALLOW_EXTERNAL_DMA_DEVICES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsAllowed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_SESSION_ALLOW_EXTERNAL_DMA_DEVICES), - "::", - stringify!(IsAllowed), - ), - ); -} -pub type POWER_SESSION_ALLOW_EXTERNAL_DMA_DEVICES = _POWER_SESSION_ALLOW_EXTERNAL_DMA_DEVICES; -pub type PPOWER_SESSION_ALLOW_EXTERNAL_DMA_DEVICES = *mut _POWER_SESSION_ALLOW_EXTERNAL_DMA_DEVICES; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _POWER_IDLE_RESILIENCY { - pub CoalescingTimeout: ULONG, - pub IdleResiliencyPeriod: ULONG, -} -#[test] -fn bindgen_test_layout__POWER_IDLE_RESILIENCY() { - const UNINIT: ::core::mem::MaybeUninit<_POWER_IDLE_RESILIENCY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POWER_IDLE_RESILIENCY>(), - 8usize, - concat!("Size of: ", stringify!(_POWER_IDLE_RESILIENCY)), - ); - assert_eq!( - ::core::mem::align_of::<_POWER_IDLE_RESILIENCY>(), - 4usize, - concat!("Alignment of ", stringify!(_POWER_IDLE_RESILIENCY)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CoalescingTimeout) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_IDLE_RESILIENCY), - "::", - stringify!(CoalescingTimeout), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IdleResiliencyPeriod) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_POWER_IDLE_RESILIENCY), - "::", - stringify!(IdleResiliencyPeriod), - ), - ); -} -pub type POWER_IDLE_RESILIENCY = _POWER_IDLE_RESILIENCY; -pub type PPOWER_IDLE_RESILIENCY = *mut _POWER_IDLE_RESILIENCY; -pub mod POWER_MONITOR_REQUEST_REASON { - pub type Type = ::core::ffi::c_int; - pub const MonitorRequestReasonUnknown: Type = 0; - pub const MonitorRequestReasonPowerButton: Type = 1; - pub const MonitorRequestReasonRemoteConnection: Type = 2; - pub const MonitorRequestReasonScMonitorpower: Type = 3; - pub const MonitorRequestReasonUserInput: Type = 4; - pub const MonitorRequestReasonAcDcDisplayBurst: Type = 5; - pub const MonitorRequestReasonUserDisplayBurst: Type = 6; - pub const MonitorRequestReasonPoSetSystemState: Type = 7; - pub const MonitorRequestReasonSetThreadExecutionState: Type = 8; - pub const MonitorRequestReasonFullWake: Type = 9; - pub const MonitorRequestReasonSessionUnlock: Type = 10; - pub const MonitorRequestReasonScreenOffRequest: Type = 11; - pub const MonitorRequestReasonIdleTimeout: Type = 12; - pub const MonitorRequestReasonPolicyChange: Type = 13; - pub const MonitorRequestReasonSleepButton: Type = 14; - pub const MonitorRequestReasonLid: Type = 15; - pub const MonitorRequestReasonBatteryCountChange: Type = 16; - pub const MonitorRequestReasonGracePeriod: Type = 17; - pub const MonitorRequestReasonPnP: Type = 18; - pub const MonitorRequestReasonDP: Type = 19; - pub const MonitorRequestReasonSxTransition: Type = 20; - pub const MonitorRequestReasonSystemIdle: Type = 21; - pub const MonitorRequestReasonNearProximity: Type = 22; - pub const MonitorRequestReasonThermalStandby: Type = 23; - pub const MonitorRequestReasonResumePdc: Type = 24; - pub const MonitorRequestReasonResumeS4: Type = 25; - pub const MonitorRequestReasonTerminal: Type = 26; - pub const MonitorRequestReasonPdcSignal: Type = 27; - pub const MonitorRequestReasonAcDcDisplayBurstSuppressed: Type = 28; - pub const MonitorRequestReasonSystemStateEntered: Type = 29; - pub const MonitorRequestReasonWinrt: Type = 30; - pub const MonitorRequestReasonUserInputKeyboard: Type = 31; - pub const MonitorRequestReasonUserInputMouse: Type = 32; - pub const MonitorRequestReasonUserInputTouchpad: Type = 33; - pub const MonitorRequestReasonUserInputPen: Type = 34; - pub const MonitorRequestReasonUserInputAccelerometer: Type = 35; - pub const MonitorRequestReasonUserInputHid: Type = 36; - pub const MonitorRequestReasonUserInputPoUserPresent: Type = 37; - pub const MonitorRequestReasonUserInputSessionSwitch: Type = 38; - pub const MonitorRequestReasonUserInputInitialization: Type = 39; - pub const MonitorRequestReasonPdcSignalWindowsMobilePwrNotif: Type = 40; - pub const MonitorRequestReasonPdcSignalWindowsMobileShell: Type = 41; - pub const MonitorRequestReasonPdcSignalHeyCortana: Type = 42; - pub const MonitorRequestReasonPdcSignalHolographicShell: Type = 43; - pub const MonitorRequestReasonPdcSignalFingerprint: Type = 44; - pub const MonitorRequestReasonDirectedDrips: Type = 45; - pub const MonitorRequestReasonDim: Type = 46; - pub const MonitorRequestReasonBuiltinPanel: Type = 47; - pub const MonitorRequestReasonDisplayRequiredUnDim: Type = 48; - pub const MonitorRequestReasonBatteryCountChangeSuppressed: Type = 49; - pub const MonitorRequestReasonResumeModernStandby: Type = 50; - pub const MonitorRequestReasonTerminalInit: Type = 51; - pub const MonitorRequestReasonPdcSignalSensorsHumanPresence: Type = 52; - pub const MonitorRequestReasonBatteryPreCritical: Type = 53; - pub const MonitorRequestReasonUserInputTouch: Type = 54; - pub const MonitorRequestReasonMax: Type = 55; -} -pub mod _POWER_MONITOR_REQUEST_TYPE { - pub type Type = ::core::ffi::c_int; - pub const MonitorRequestTypeOff: Type = 0; - pub const MonitorRequestTypeOnAndPresent: Type = 1; - pub const MonitorRequestTypeToggleOn: Type = 2; -} -pub use self::_POWER_MONITOR_REQUEST_TYPE::Type as POWER_MONITOR_REQUEST_TYPE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _POWER_MONITOR_INVOCATION { - pub Console: BOOLEAN, - pub RequestReason: POWER_MONITOR_REQUEST_REASON::Type, -} -#[test] -fn bindgen_test_layout__POWER_MONITOR_INVOCATION() { - const UNINIT: ::core::mem::MaybeUninit<_POWER_MONITOR_INVOCATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POWER_MONITOR_INVOCATION>(), - 8usize, - concat!("Size of: ", stringify!(_POWER_MONITOR_INVOCATION)), - ); - assert_eq!( - ::core::mem::align_of::<_POWER_MONITOR_INVOCATION>(), - 4usize, - concat!("Alignment of ", stringify!(_POWER_MONITOR_INVOCATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Console) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_MONITOR_INVOCATION), - "::", - stringify!(Console), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequestReason) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_POWER_MONITOR_INVOCATION), - "::", - stringify!(RequestReason), - ), - ); -} -impl Default for _POWER_MONITOR_INVOCATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type POWER_MONITOR_INVOCATION = _POWER_MONITOR_INVOCATION; -pub type PPOWER_MONITOR_INVOCATION = *mut _POWER_MONITOR_INVOCATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _RESUME_PERFORMANCE { - pub PostTimeMs: ULONG, - pub TotalResumeTimeMs: ULONGLONG, - pub ResumeCompleteTimestamp: ULONGLONG, -} -#[test] -fn bindgen_test_layout__RESUME_PERFORMANCE() { - const UNINIT: ::core::mem::MaybeUninit<_RESUME_PERFORMANCE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RESUME_PERFORMANCE>(), - 24usize, - concat!("Size of: ", stringify!(_RESUME_PERFORMANCE)), - ); - assert_eq!( - ::core::mem::align_of::<_RESUME_PERFORMANCE>(), - 8usize, - concat!("Alignment of ", stringify!(_RESUME_PERFORMANCE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PostTimeMs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RESUME_PERFORMANCE), - "::", - stringify!(PostTimeMs), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalResumeTimeMs) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RESUME_PERFORMANCE), - "::", - stringify!(TotalResumeTimeMs), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ResumeCompleteTimestamp) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_RESUME_PERFORMANCE), - "::", - stringify!(ResumeCompleteTimestamp), - ), - ); -} -pub type RESUME_PERFORMANCE = _RESUME_PERFORMANCE; -pub type PRESUME_PERFORMANCE = *mut _RESUME_PERFORMANCE; -pub mod SYSTEM_POWER_CONDITION { - pub type Type = ::core::ffi::c_int; - pub const PoAc: Type = 0; - pub const PoDc: Type = 1; - pub const PoHot: Type = 2; - pub const PoConditionMaximum: Type = 3; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SET_POWER_SETTING_VALUE { - pub Version: ULONG, - pub Guid: GUID, - pub PowerCondition: SYSTEM_POWER_CONDITION::Type, - pub DataLength: ULONG, - pub Data: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout_SET_POWER_SETTING_VALUE() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(SET_POWER_SETTING_VALUE)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(SET_POWER_SETTING_VALUE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(SET_POWER_SETTING_VALUE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Guid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(SET_POWER_SETTING_VALUE), - "::", - stringify!(Guid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PowerCondition) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(SET_POWER_SETTING_VALUE), - "::", - stringify!(PowerCondition), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(SET_POWER_SETTING_VALUE), - "::", - stringify!(DataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(SET_POWER_SETTING_VALUE), - "::", - stringify!(Data), - ), - ); -} -impl Default for SET_POWER_SETTING_VALUE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PSET_POWER_SETTING_VALUE = *mut SET_POWER_SETTING_VALUE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct NOTIFY_USER_POWER_SETTING { - pub Guid: GUID, -} -#[test] -fn bindgen_test_layout_NOTIFY_USER_POWER_SETTING() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(NOTIFY_USER_POWER_SETTING)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(NOTIFY_USER_POWER_SETTING)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Guid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(NOTIFY_USER_POWER_SETTING), - "::", - stringify!(Guid), - ), - ); -} -pub type PNOTIFY_USER_POWER_SETTING = *mut NOTIFY_USER_POWER_SETTING; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _APPLICATIONLAUNCH_SETTING_VALUE { - pub ActivationTime: LARGE_INTEGER, - pub Flags: ULONG, - pub ButtonInstanceID: ULONG, -} -#[test] -fn bindgen_test_layout__APPLICATIONLAUNCH_SETTING_VALUE() { - const UNINIT: ::core::mem::MaybeUninit<_APPLICATIONLAUNCH_SETTING_VALUE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_APPLICATIONLAUNCH_SETTING_VALUE>(), - 16usize, - concat!("Size of: ", stringify!(_APPLICATIONLAUNCH_SETTING_VALUE)), - ); - assert_eq!( - ::core::mem::align_of::<_APPLICATIONLAUNCH_SETTING_VALUE>(), - 8usize, - concat!("Alignment of ", stringify!(_APPLICATIONLAUNCH_SETTING_VALUE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ActivationTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_APPLICATIONLAUNCH_SETTING_VALUE), - "::", - stringify!(ActivationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_APPLICATIONLAUNCH_SETTING_VALUE), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ButtonInstanceID) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_APPLICATIONLAUNCH_SETTING_VALUE), - "::", - stringify!(ButtonInstanceID), - ), - ); -} -impl Default for _APPLICATIONLAUNCH_SETTING_VALUE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type APPLICATIONLAUNCH_SETTING_VALUE = _APPLICATIONLAUNCH_SETTING_VALUE; -pub type PAPPLICATIONLAUNCH_SETTING_VALUE = *mut _APPLICATIONLAUNCH_SETTING_VALUE; -pub mod _POWER_PLATFORM_ROLE { - pub type Type = ::core::ffi::c_int; - pub const PlatformRoleUnspecified: Type = 0; - pub const PlatformRoleDesktop: Type = 1; - pub const PlatformRoleMobile: Type = 2; - pub const PlatformRoleWorkstation: Type = 3; - pub const PlatformRoleEnterpriseServer: Type = 4; - pub const PlatformRoleSOHOServer: Type = 5; - pub const PlatformRoleAppliancePC: Type = 6; - pub const PlatformRolePerformanceServer: Type = 7; - pub const PlatformRoleSlate: Type = 8; - pub const PlatformRoleMaximum: Type = 9; -} -pub use self::_POWER_PLATFORM_ROLE::Type as POWER_PLATFORM_ROLE; -pub type PPOWER_PLATFORM_ROLE = *mut _POWER_PLATFORM_ROLE::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _POWER_PLATFORM_INFORMATION { - pub AoAc: BOOLEAN, -} -#[test] -fn bindgen_test_layout__POWER_PLATFORM_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_POWER_PLATFORM_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POWER_PLATFORM_INFORMATION>(), - 1usize, - concat!("Size of: ", stringify!(_POWER_PLATFORM_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_POWER_PLATFORM_INFORMATION>(), - 1usize, - concat!("Alignment of ", stringify!(_POWER_PLATFORM_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AoAc) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_PLATFORM_INFORMATION), - "::", - stringify!(AoAc), - ), - ); -} -pub type POWER_PLATFORM_INFORMATION = _POWER_PLATFORM_INFORMATION; -pub type PPOWER_PLATFORM_INFORMATION = *mut _POWER_PLATFORM_INFORMATION; -pub mod POWER_SETTING_ALTITUDE { - pub type Type = ::core::ffi::c_int; - pub const ALTITUDE_GROUP_POLICY: Type = 0; - pub const ALTITUDE_USER: Type = 1; - pub const ALTITUDE_RUNTIME_OVERRIDE: Type = 2; - pub const ALTITUDE_PROVISIONING: Type = 3; - pub const ALTITUDE_OEM_CUSTOMIZATION: Type = 4; - pub const ALTITUDE_INTERNAL_OVERRIDE: Type = 5; - pub const ALTITUDE_OS_DEFAULT: Type = 6; -} -pub type PPOWER_SETTING_ALTITUDE = *mut POWER_SETTING_ALTITUDE::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct BATTERY_REPORTING_SCALE { - pub Granularity: ULONG, - pub Capacity: ULONG, -} -#[test] -fn bindgen_test_layout_BATTERY_REPORTING_SCALE() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(BATTERY_REPORTING_SCALE)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(BATTERY_REPORTING_SCALE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Granularity) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(BATTERY_REPORTING_SCALE), - "::", - stringify!(Granularity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capacity) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(BATTERY_REPORTING_SCALE), - "::", - stringify!(Capacity), - ), - ); -} -pub type PBATTERY_REPORTING_SCALE = *mut BATTERY_REPORTING_SCALE; -pub mod _CM_SERVICE_NODE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const DriverType: Type = 1; - pub const FileSystemType: Type = 2; - pub const Win32ServiceOwnProcess: Type = 16; - pub const Win32ServiceShareProcess: Type = 32; - pub const AdapterType: Type = 4; - pub const RecognizerType: Type = 8; -} -pub use self::_CM_SERVICE_NODE_TYPE::Type as SERVICE_NODE_TYPE; -pub mod _CM_SERVICE_LOAD_TYPE { - pub type Type = ::core::ffi::c_int; - pub const BootLoad: Type = 0; - pub const SystemLoad: Type = 1; - pub const AutoLoad: Type = 2; - pub const DemandLoad: Type = 3; - pub const DisableLoad: Type = 4; -} -pub use self::_CM_SERVICE_LOAD_TYPE::Type as SERVICE_LOAD_TYPE; -pub mod _CM_ERROR_CONTROL_TYPE { - pub type Type = ::core::ffi::c_int; - pub const IgnoreError: Type = 0; - pub const NormalError: Type = 1; - pub const SevereError: Type = 2; - pub const CriticalError: Type = 3; -} -pub use self::_CM_ERROR_CONTROL_TYPE::Type as SERVICE_ERROR_TYPE; -pub type CM_RESOURCE_TYPE = ::core::ffi::c_int; -pub mod _CM_SHARE_DISPOSITION { - pub type Type = ::core::ffi::c_int; - pub const CmResourceShareUndetermined: Type = 0; - pub const CmResourceShareDeviceExclusive: Type = 1; - pub const CmResourceShareDriverExclusive: Type = 2; - pub const CmResourceShareShared: Type = 3; -} -pub use self::_CM_SHARE_DISPOSITION::Type as CM_SHARE_DISPOSITION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR { - pub Type: UCHAR, - pub ShareDisposition: UCHAR, - pub Flags: USHORT, - pub u: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1 { - pub Generic: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - pub Port: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2, - pub Interrupt: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3, - pub MessageInterrupt: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4, - pub Memory: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5, - pub Dma: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6, - pub DmaV3: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7, - pub DevicePrivate: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8, - pub BusNumber: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9, - pub DeviceSpecificData: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10, - pub Memory40: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11, - pub Memory48: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12, - pub Memory64: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13, - pub Connection: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14, -} -#[repr(C, packed(4))] -#[derive(Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1 { - pub Start: PHYSICAL_ADDRESS, - pub Length: ULONG, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - >(), - 12usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Start) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Start), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Length), - ), - ); -} -impl Default for _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C, packed(4))] -#[derive(Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2 { - pub Start: PHYSICAL_ADDRESS, - pub Length: ULONG, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2, - >(), - 12usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Start) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Start), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Length), - ), - ); -} -impl Default for _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C, packed(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3 { - pub Level: ULONG, - pub Vector: ULONG, - pub Affinity: KAFFINITY, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3, - >(), - 16usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Level) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Level), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Vector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Affinity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Affinity), - ), - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4 { - pub __bindgen_anon_1: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { - pub Raw: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, - pub Translated: _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C, packed(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { - pub Reserved: USHORT, - pub MessageCount: USHORT, - pub Vector: ULONG, - pub Affinity: KAFFINITY, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, - >(), - 16usize, - concat!( - "Size of: ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageCount) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(MessageCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(Vector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Affinity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(Affinity), - ), - ); -} -#[repr(C, packed(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2 { - pub Level: ULONG, - pub Vector: ULONG, - pub Affinity: KAFFINITY, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2, - >(), - 16usize, - concat!( - "Size of: ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Level) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(Level), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(Vector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Affinity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(Affinity), - ), - ); -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, - >(), - 16usize, - concat!( - "Size of: ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Raw) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 - ), - "::", - stringify!(Raw), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Translated) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 - ), - "::", - stringify!(Translated), - ), - ); -} -impl Default -for _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4() { - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4, - >(), - 16usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - ), - ); -} -impl Default for _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C, packed(4))] -#[derive(Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5 { - pub Start: PHYSICAL_ADDRESS, - pub Length: ULONG, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5, - >(), - 12usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Start) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(Start), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(Length), - ), - ); -} -impl Default for _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6 { - pub Channel: ULONG, - pub Port: ULONG, - pub Reserved1: ULONG, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6, - >(), - 12usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Channel) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(Channel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Port) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(Port), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(Reserved1), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7 { - pub Channel: ULONG, - pub RequestLine: ULONG, - pub TransferWidth: UCHAR, - pub Reserved1: UCHAR, - pub Reserved2: UCHAR, - pub Reserved3: UCHAR, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7, - >(), - 12usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Channel) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(Channel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequestLine) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(RequestLine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TransferWidth) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(TransferWidth), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved3) as usize - ptr as usize }, - 11usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(Reserved3), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8 { - pub Data: [ULONG; 3usize], -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8, - >(), - 12usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(Data), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9 { - pub Start: ULONG, - pub Length: ULONG, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9, - >(), - 12usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Start) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9), - "::", - stringify!(Start), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9), - "::", - stringify!(Reserved), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10 { - pub DataSize: ULONG, - pub Reserved1: ULONG, - pub Reserved2: ULONG, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10, - >(), - 12usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10), - "::", - stringify!(DataSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10), - "::", - stringify!(Reserved2), - ), - ); -} -#[repr(C, packed(4))] -#[derive(Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11 { - pub Start: PHYSICAL_ADDRESS, - pub Length40: ULONG, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11, - >(), - 12usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Start) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11), - "::", - stringify!(Start), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length40) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11), - "::", - stringify!(Length40), - ), - ); -} -impl Default for _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C, packed(4))] -#[derive(Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12 { - pub Start: PHYSICAL_ADDRESS, - pub Length48: ULONG, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12, - >(), - 12usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Start) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12), - "::", - stringify!(Start), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length48) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12), - "::", - stringify!(Length48), - ), - ); -} -impl Default for _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C, packed(4))] -#[derive(Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13 { - pub Start: PHYSICAL_ADDRESS, - pub Length64: ULONG, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13, - >(), - 12usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Start) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13), - "::", - stringify!(Start), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length64) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13), - "::", - stringify!(Length64), - ), - ); -} -impl Default for _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14 { - pub Class: UCHAR, - pub Type: UCHAR, - pub Reserved1: UCHAR, - pub Reserved2: UCHAR, - pub IdLowPart: ULONG, - pub IdHighPart: ULONG, -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14, - >(), - 12usize, - concat!( - "Size of: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14), - "::", - stringify!(Class), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdLowPart) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14), - "::", - stringify!(IdLowPart), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdHighPart) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_14), - "::", - stringify!(IdHighPart), - ), - ); -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Generic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Generic), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Port) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Port), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Interrupt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Interrupt), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MessageInterrupt) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(MessageInterrupt), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Memory) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Memory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dma) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Dma), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DmaV3) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(DmaV3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DevicePrivate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(DevicePrivate), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(BusNumber), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceSpecificData) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(DeviceSpecificData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Memory40) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Memory40), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Memory48) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Memory48), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Memory64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Memory64), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Connection) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Connection), - ), - ); -} -impl Default for _CM_PARTIAL_RESOURCE_DESCRIPTOR__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_CM_PARTIAL_RESOURCE_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_PARTIAL_RESOURCE_DESCRIPTOR>(), - 20usize, - concat!("Size of: ", stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_PARTIAL_RESOURCE_DESCRIPTOR>(), - 4usize, - concat!("Alignment of ", stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ShareDisposition) as usize - ptr as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR), - "::", - stringify!(ShareDisposition), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_DESCRIPTOR), - "::", - stringify!(u), - ), - ); -} -impl Default for _CM_PARTIAL_RESOURCE_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CM_PARTIAL_RESOURCE_DESCRIPTOR = _CM_PARTIAL_RESOURCE_DESCRIPTOR; -pub type PCM_PARTIAL_RESOURCE_DESCRIPTOR = *mut _CM_PARTIAL_RESOURCE_DESCRIPTOR; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CM_PARTIAL_RESOURCE_LIST { - pub Version: USHORT, - pub Revision: USHORT, - pub Count: ULONG, - pub PartialDescriptors: [CM_PARTIAL_RESOURCE_DESCRIPTOR; 1usize], -} -#[test] -fn bindgen_test_layout__CM_PARTIAL_RESOURCE_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_CM_PARTIAL_RESOURCE_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_PARTIAL_RESOURCE_LIST>(), - 28usize, - concat!("Size of: ", stringify!(_CM_PARTIAL_RESOURCE_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_PARTIAL_RESOURCE_LIST>(), - 4usize, - concat!("Alignment of ", stringify!(_CM_PARTIAL_RESOURCE_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_LIST), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_LIST), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_LIST), - "::", - stringify!(Count), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PartialDescriptors) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PARTIAL_RESOURCE_LIST), - "::", - stringify!(PartialDescriptors), - ), - ); -} -impl Default for _CM_PARTIAL_RESOURCE_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CM_PARTIAL_RESOURCE_LIST = _CM_PARTIAL_RESOURCE_LIST; -pub type PCM_PARTIAL_RESOURCE_LIST = *mut _CM_PARTIAL_RESOURCE_LIST; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CM_FULL_RESOURCE_DESCRIPTOR { - pub InterfaceType: INTERFACE_TYPE, - pub BusNumber: ULONG, - pub PartialResourceList: CM_PARTIAL_RESOURCE_LIST, -} -#[test] -fn bindgen_test_layout__CM_FULL_RESOURCE_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_CM_FULL_RESOURCE_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_FULL_RESOURCE_DESCRIPTOR>(), - 36usize, - concat!("Size of: ", stringify!(_CM_FULL_RESOURCE_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_FULL_RESOURCE_DESCRIPTOR>(), - 4usize, - concat!("Alignment of ", stringify!(_CM_FULL_RESOURCE_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterfaceType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_FULL_RESOURCE_DESCRIPTOR), - "::", - stringify!(InterfaceType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusNumber) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_FULL_RESOURCE_DESCRIPTOR), - "::", - stringify!(BusNumber), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PartialResourceList) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_FULL_RESOURCE_DESCRIPTOR), - "::", - stringify!(PartialResourceList), - ), - ); -} -impl Default for _CM_FULL_RESOURCE_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CM_FULL_RESOURCE_DESCRIPTOR = _CM_FULL_RESOURCE_DESCRIPTOR; -pub type PCM_FULL_RESOURCE_DESCRIPTOR = *mut _CM_FULL_RESOURCE_DESCRIPTOR; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CM_RESOURCE_LIST { - pub Count: ULONG, - pub List: [CM_FULL_RESOURCE_DESCRIPTOR; 1usize], -} -#[test] -fn bindgen_test_layout__CM_RESOURCE_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_CM_RESOURCE_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_RESOURCE_LIST>(), - 40usize, - concat!("Size of: ", stringify!(_CM_RESOURCE_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_RESOURCE_LIST>(), - 4usize, - concat!("Alignment of ", stringify!(_CM_RESOURCE_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_RESOURCE_LIST), - "::", - stringify!(Count), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).List) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_RESOURCE_LIST), - "::", - stringify!(List), - ), - ); -} -impl Default for _CM_RESOURCE_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CM_RESOURCE_LIST = _CM_RESOURCE_LIST; -pub type PCM_RESOURCE_LIST = *mut _CM_RESOURCE_LIST; -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DEVICE_FLAGS { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - pub __bindgen_padding_0: [u8; 3usize], -} -#[test] -fn bindgen_test_layout__DEVICE_FLAGS() { - assert_eq!( - ::core::mem::size_of::<_DEVICE_FLAGS>(), - 4usize, - concat!("Size of: ", stringify!(_DEVICE_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_FLAGS>(), - 4usize, - concat!("Alignment of ", stringify!(_DEVICE_FLAGS)), - ); -} -impl _DEVICE_FLAGS { - #[inline] - pub fn Failed(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_Failed(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReadOnly(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReadOnly(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Removable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_Removable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ConsoleIn(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_ConsoleIn(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn ConsoleOut(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_ConsoleOut(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Input(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_Input(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Output(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_Output(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Failed: ULONG, - ReadOnly: ULONG, - Removable: ULONG, - ConsoleIn: ULONG, - ConsoleOut: ULONG, - Input: ULONG, - Output: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Failed: u32 = unsafe { ::core::mem::transmute(Failed) }; - Failed as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ReadOnly: u32 = unsafe { ::core::mem::transmute(ReadOnly) }; - ReadOnly as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Removable: u32 = unsafe { ::core::mem::transmute(Removable) }; - Removable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ConsoleIn: u32 = unsafe { ::core::mem::transmute(ConsoleIn) }; - ConsoleIn as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let ConsoleOut: u32 = unsafe { ::core::mem::transmute(ConsoleOut) }; - ConsoleOut as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let Input: u32 = unsafe { ::core::mem::transmute(Input) }; - Input as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let Output: u32 = unsafe { ::core::mem::transmute(Output) }; - Output as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type DEVICE_FLAGS = _DEVICE_FLAGS; -pub type PDEVICE_FLAGS = *mut _DEVICE_FLAGS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_COMPONENT_INFORMATION { - pub Flags: DEVICE_FLAGS, - pub Version: ULONG, - pub Key: ULONG, - pub AffinityMask: KAFFINITY, -} -#[test] -fn bindgen_test_layout__CM_COMPONENT_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_CM_COMPONENT_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_COMPONENT_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_CM_COMPONENT_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_COMPONENT_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_CM_COMPONENT_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_COMPONENT_INFORMATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_COMPONENT_INFORMATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Key) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_COMPONENT_INFORMATION), - "::", - stringify!(Key), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AffinityMask) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CM_COMPONENT_INFORMATION), - "::", - stringify!(AffinityMask), - ), - ); -} -pub type CM_COMPONENT_INFORMATION = _CM_COMPONENT_INFORMATION; -pub type PCM_COMPONENT_INFORMATION = *mut _CM_COMPONENT_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_ROM_BLOCK { - pub Address: ULONG, - pub Size: ULONG, -} -#[test] -fn bindgen_test_layout__CM_ROM_BLOCK() { - const UNINIT: ::core::mem::MaybeUninit<_CM_ROM_BLOCK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_ROM_BLOCK>(), - 8usize, - concat!("Size of: ", stringify!(_CM_ROM_BLOCK)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_ROM_BLOCK>(), - 4usize, - concat!("Alignment of ", stringify!(_CM_ROM_BLOCK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_ROM_BLOCK), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_CM_ROM_BLOCK), "::", stringify!(Size)), - ); -} -pub type CM_ROM_BLOCK = _CM_ROM_BLOCK; -pub type PCM_ROM_BLOCK = *mut _CM_ROM_BLOCK; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_INT13_DRIVE_PARAMETER { - pub DriveSelect: USHORT, - pub MaxCylinders: ULONG, - pub SectorsPerTrack: USHORT, - pub MaxHeads: USHORT, - pub NumberDrives: USHORT, -} -#[test] -fn bindgen_test_layout__CM_INT13_DRIVE_PARAMETER() { - const UNINIT: ::core::mem::MaybeUninit<_CM_INT13_DRIVE_PARAMETER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_INT13_DRIVE_PARAMETER>(), - 12usize, - concat!("Size of: ", stringify!(_CM_INT13_DRIVE_PARAMETER)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_INT13_DRIVE_PARAMETER>(), - 1usize, - concat!("Alignment of ", stringify!(_CM_INT13_DRIVE_PARAMETER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriveSelect) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_INT13_DRIVE_PARAMETER), - "::", - stringify!(DriveSelect), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxCylinders) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_INT13_DRIVE_PARAMETER), - "::", - stringify!(MaxCylinders), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectorsPerTrack) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_CM_INT13_DRIVE_PARAMETER), - "::", - stringify!(SectorsPerTrack), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxHeads) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_INT13_DRIVE_PARAMETER), - "::", - stringify!(MaxHeads), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberDrives) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_CM_INT13_DRIVE_PARAMETER), - "::", - stringify!(NumberDrives), - ), - ); -} -pub type CM_INT13_DRIVE_PARAMETER = _CM_INT13_DRIVE_PARAMETER; -pub type PCM_INT13_DRIVE_PARAMETER = *mut _CM_INT13_DRIVE_PARAMETER; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_MCA_POS_DATA { - pub AdapterId: USHORT, - pub PosData1: UCHAR, - pub PosData2: UCHAR, - pub PosData3: UCHAR, - pub PosData4: UCHAR, -} -#[test] -fn bindgen_test_layout__CM_MCA_POS_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_CM_MCA_POS_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_MCA_POS_DATA>(), - 6usize, - concat!("Size of: ", stringify!(_CM_MCA_POS_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_MCA_POS_DATA>(), - 1usize, - concat!("Alignment of ", stringify!(_CM_MCA_POS_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AdapterId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_MCA_POS_DATA), - "::", - stringify!(AdapterId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PosData1) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_MCA_POS_DATA), - "::", - stringify!(PosData1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PosData2) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_CM_MCA_POS_DATA), - "::", - stringify!(PosData2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PosData3) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_MCA_POS_DATA), - "::", - stringify!(PosData3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PosData4) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_CM_MCA_POS_DATA), - "::", - stringify!(PosData4), - ), - ); -} -pub type CM_MCA_POS_DATA = _CM_MCA_POS_DATA; -pub type PCM_MCA_POS_DATA = *mut _CM_MCA_POS_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EISA_MEMORY_TYPE { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__EISA_MEMORY_TYPE() { - assert_eq!( - ::core::mem::size_of::<_EISA_MEMORY_TYPE>(), - 1usize, - concat!("Size of: ", stringify!(_EISA_MEMORY_TYPE)), - ); - assert_eq!( - ::core::mem::align_of::<_EISA_MEMORY_TYPE>(), - 1usize, - concat!("Alignment of ", stringify!(_EISA_MEMORY_TYPE)), - ); -} -impl _EISA_MEMORY_TYPE { - #[inline] - pub fn ReadWrite(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_ReadWrite(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Cached(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_Cached(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved0(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) } - } - #[inline] - pub fn set_Reserved0(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Type(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 2u8) as u8) } - } - #[inline] - pub fn set_Type(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 2u8, val as u64) - } - } - #[inline] - pub fn Shared(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) } - } - #[inline] - pub fn set_Shared(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn MoreEntries(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) } - } - #[inline] - pub fn set_MoreEntries(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ReadWrite: UCHAR, - Cached: UCHAR, - Reserved0: UCHAR, - Type: UCHAR, - Shared: UCHAR, - Reserved1: UCHAR, - MoreEntries: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ReadWrite: u8 = unsafe { ::core::mem::transmute(ReadWrite) }; - ReadWrite as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Cached: u8 = unsafe { ::core::mem::transmute(Cached) }; - Cached as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Reserved0: u8 = unsafe { ::core::mem::transmute(Reserved0) }; - Reserved0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 2u8, - { - let Type: u8 = unsafe { ::core::mem::transmute(Type) }; - Type as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let Shared: u8 = unsafe { ::core::mem::transmute(Shared) }; - Shared as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let Reserved1: u8 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let MoreEntries: u8 = unsafe { ::core::mem::transmute(MoreEntries) }; - MoreEntries as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type EISA_MEMORY_TYPE = _EISA_MEMORY_TYPE; -pub type PEISA_MEMORY_TYPE = *mut _EISA_MEMORY_TYPE; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EISA_MEMORY_CONFIGURATION { - pub ConfigurationByte: EISA_MEMORY_TYPE, - pub DataSize: UCHAR, - pub AddressLowWord: USHORT, - pub AddressHighByte: UCHAR, - pub MemorySize: USHORT, -} -#[test] -fn bindgen_test_layout__EISA_MEMORY_CONFIGURATION() { - const UNINIT: ::core::mem::MaybeUninit<_EISA_MEMORY_CONFIGURATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EISA_MEMORY_CONFIGURATION>(), - 7usize, - concat!("Size of: ", stringify!(_EISA_MEMORY_CONFIGURATION)), - ); - assert_eq!( - ::core::mem::align_of::<_EISA_MEMORY_CONFIGURATION>(), - 1usize, - concat!("Alignment of ", stringify!(_EISA_MEMORY_CONFIGURATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ConfigurationByte) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EISA_MEMORY_CONFIGURATION), - "::", - stringify!(ConfigurationByte), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataSize) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_EISA_MEMORY_CONFIGURATION), - "::", - stringify!(DataSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AddressLowWord) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_EISA_MEMORY_CONFIGURATION), - "::", - stringify!(AddressLowWord), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AddressHighByte) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_EISA_MEMORY_CONFIGURATION), - "::", - stringify!(AddressHighByte), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MemorySize) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_EISA_MEMORY_CONFIGURATION), - "::", - stringify!(MemorySize), - ), - ); -} -pub type EISA_MEMORY_CONFIGURATION = _EISA_MEMORY_CONFIGURATION; -pub type PEISA_MEMORY_CONFIGURATION = *mut _EISA_MEMORY_CONFIGURATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EISA_IRQ_DESCRIPTOR { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__EISA_IRQ_DESCRIPTOR() { - assert_eq!( - ::core::mem::size_of::<_EISA_IRQ_DESCRIPTOR>(), - 1usize, - concat!("Size of: ", stringify!(_EISA_IRQ_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_EISA_IRQ_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_EISA_IRQ_DESCRIPTOR)), - ); -} -impl _EISA_IRQ_DESCRIPTOR { - #[inline] - pub fn Interrupt(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } - } - #[inline] - pub fn set_Interrupt(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) } - } - #[inline] - pub fn set_Reserved(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn LevelTriggered(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) } - } - #[inline] - pub fn set_LevelTriggered(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Shared(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) } - } - #[inline] - pub fn set_Shared(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn MoreEntries(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) } - } - #[inline] - pub fn set_MoreEntries(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Interrupt: UCHAR, - Reserved: UCHAR, - LevelTriggered: UCHAR, - Shared: UCHAR, - MoreEntries: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let Interrupt: u8 = unsafe { ::core::mem::transmute(Interrupt) }; - Interrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let Reserved: u8 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let LevelTriggered: u8 = unsafe { - ::core::mem::transmute(LevelTriggered) - }; - LevelTriggered as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let Shared: u8 = unsafe { ::core::mem::transmute(Shared) }; - Shared as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let MoreEntries: u8 = unsafe { ::core::mem::transmute(MoreEntries) }; - MoreEntries as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type EISA_IRQ_DESCRIPTOR = _EISA_IRQ_DESCRIPTOR; -pub type PEISA_IRQ_DESCRIPTOR = *mut _EISA_IRQ_DESCRIPTOR; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EISA_IRQ_CONFIGURATION { - pub ConfigurationByte: EISA_IRQ_DESCRIPTOR, - pub Reserved: UCHAR, -} -#[test] -fn bindgen_test_layout__EISA_IRQ_CONFIGURATION() { - const UNINIT: ::core::mem::MaybeUninit<_EISA_IRQ_CONFIGURATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EISA_IRQ_CONFIGURATION>(), - 2usize, - concat!("Size of: ", stringify!(_EISA_IRQ_CONFIGURATION)), - ); - assert_eq!( - ::core::mem::align_of::<_EISA_IRQ_CONFIGURATION>(), - 1usize, - concat!("Alignment of ", stringify!(_EISA_IRQ_CONFIGURATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ConfigurationByte) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EISA_IRQ_CONFIGURATION), - "::", - stringify!(ConfigurationByte), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_EISA_IRQ_CONFIGURATION), - "::", - stringify!(Reserved), - ), - ); -} -pub type EISA_IRQ_CONFIGURATION = _EISA_IRQ_CONFIGURATION; -pub type PEISA_IRQ_CONFIGURATION = *mut _EISA_IRQ_CONFIGURATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DMA_CONFIGURATION_BYTE0 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__DMA_CONFIGURATION_BYTE0() { - assert_eq!( - ::core::mem::size_of::<_DMA_CONFIGURATION_BYTE0>(), - 1usize, - concat!("Size of: ", stringify!(_DMA_CONFIGURATION_BYTE0)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_CONFIGURATION_BYTE0>(), - 1usize, - concat!("Alignment of ", stringify!(_DMA_CONFIGURATION_BYTE0)), - ); -} -impl _DMA_CONFIGURATION_BYTE0 { - #[inline] - pub fn Channel(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u8) } - } - #[inline] - pub fn set_Channel(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 3u8) as u8) } - } - #[inline] - pub fn set_Reserved(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 3u8, val as u64) - } - } - #[inline] - pub fn Shared(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) } - } - #[inline] - pub fn set_Shared(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn MoreEntries(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) } - } - #[inline] - pub fn set_MoreEntries(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Channel: UCHAR, - Reserved: UCHAR, - Shared: UCHAR, - MoreEntries: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let Channel: u8 = unsafe { ::core::mem::transmute(Channel) }; - Channel as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 3u8, - { - let Reserved: u8 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let Shared: u8 = unsafe { ::core::mem::transmute(Shared) }; - Shared as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let MoreEntries: u8 = unsafe { ::core::mem::transmute(MoreEntries) }; - MoreEntries as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type DMA_CONFIGURATION_BYTE0 = _DMA_CONFIGURATION_BYTE0; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DMA_CONFIGURATION_BYTE1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__DMA_CONFIGURATION_BYTE1() { - assert_eq!( - ::core::mem::size_of::<_DMA_CONFIGURATION_BYTE1>(), - 1usize, - concat!("Size of: ", stringify!(_DMA_CONFIGURATION_BYTE1)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_CONFIGURATION_BYTE1>(), - 1usize, - concat!("Alignment of ", stringify!(_DMA_CONFIGURATION_BYTE1)), - ); -} -impl _DMA_CONFIGURATION_BYTE1 { - #[inline] - pub fn Reserved0(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u8) } - } - #[inline] - pub fn set_Reserved0(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 2u8, val as u64) - } - } - #[inline] - pub fn TransferSize(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u8) } - } - #[inline] - pub fn set_TransferSize(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 2u8, val as u64) - } - } - #[inline] - pub fn Timing(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u8) } - } - #[inline] - pub fn set_Timing(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 2u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u8) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 2u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Reserved0: UCHAR, - TransferSize: UCHAR, - Timing: UCHAR, - Reserved1: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 2u8, - { - let Reserved0: u8 = unsafe { ::core::mem::transmute(Reserved0) }; - Reserved0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 2u8, - { - let TransferSize: u8 = unsafe { - ::core::mem::transmute(TransferSize) - }; - TransferSize as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 2u8, - { - let Timing: u8 = unsafe { ::core::mem::transmute(Timing) }; - Timing as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 2u8, - { - let Reserved1: u8 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type DMA_CONFIGURATION_BYTE1 = _DMA_CONFIGURATION_BYTE1; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EISA_DMA_CONFIGURATION { - pub ConfigurationByte0: DMA_CONFIGURATION_BYTE0, - pub ConfigurationByte1: DMA_CONFIGURATION_BYTE1, -} -#[test] -fn bindgen_test_layout__EISA_DMA_CONFIGURATION() { - const UNINIT: ::core::mem::MaybeUninit<_EISA_DMA_CONFIGURATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EISA_DMA_CONFIGURATION>(), - 2usize, - concat!("Size of: ", stringify!(_EISA_DMA_CONFIGURATION)), - ); - assert_eq!( - ::core::mem::align_of::<_EISA_DMA_CONFIGURATION>(), - 1usize, - concat!("Alignment of ", stringify!(_EISA_DMA_CONFIGURATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ConfigurationByte0) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EISA_DMA_CONFIGURATION), - "::", - stringify!(ConfigurationByte0), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ConfigurationByte1) as usize - ptr as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_EISA_DMA_CONFIGURATION), - "::", - stringify!(ConfigurationByte1), - ), - ); -} -pub type EISA_DMA_CONFIGURATION = _EISA_DMA_CONFIGURATION; -pub type PEISA_DMA_CONFIGURATION = *mut _EISA_DMA_CONFIGURATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EISA_PORT_DESCRIPTOR { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__EISA_PORT_DESCRIPTOR() { - assert_eq!( - ::core::mem::size_of::<_EISA_PORT_DESCRIPTOR>(), - 1usize, - concat!("Size of: ", stringify!(_EISA_PORT_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_EISA_PORT_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_EISA_PORT_DESCRIPTOR)), - ); -} -impl _EISA_PORT_DESCRIPTOR { - #[inline] - pub fn NumberPorts(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u8) } - } - #[inline] - pub fn set_NumberPorts(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 5u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) } - } - #[inline] - pub fn set_Reserved(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Shared(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) } - } - #[inline] - pub fn set_Shared(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn MoreEntries(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) } - } - #[inline] - pub fn set_MoreEntries(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - NumberPorts: UCHAR, - Reserved: UCHAR, - Shared: UCHAR, - MoreEntries: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 5u8, - { - let NumberPorts: u8 = unsafe { ::core::mem::transmute(NumberPorts) }; - NumberPorts as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let Reserved: u8 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let Shared: u8 = unsafe { ::core::mem::transmute(Shared) }; - Shared as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let MoreEntries: u8 = unsafe { ::core::mem::transmute(MoreEntries) }; - MoreEntries as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type EISA_PORT_DESCRIPTOR = _EISA_PORT_DESCRIPTOR; -pub type PEISA_PORT_DESCRIPTOR = *mut _EISA_PORT_DESCRIPTOR; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EISA_PORT_CONFIGURATION { - pub Configuration: EISA_PORT_DESCRIPTOR, - pub PortAddress: USHORT, -} -#[test] -fn bindgen_test_layout__EISA_PORT_CONFIGURATION() { - const UNINIT: ::core::mem::MaybeUninit<_EISA_PORT_CONFIGURATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EISA_PORT_CONFIGURATION>(), - 3usize, - concat!("Size of: ", stringify!(_EISA_PORT_CONFIGURATION)), - ); - assert_eq!( - ::core::mem::align_of::<_EISA_PORT_CONFIGURATION>(), - 1usize, - concat!("Alignment of ", stringify!(_EISA_PORT_CONFIGURATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Configuration) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EISA_PORT_CONFIGURATION), - "::", - stringify!(Configuration), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PortAddress) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_EISA_PORT_CONFIGURATION), - "::", - stringify!(PortAddress), - ), - ); -} -pub type EISA_PORT_CONFIGURATION = _EISA_PORT_CONFIGURATION; -pub type PEISA_PORT_CONFIGURATION = *mut _EISA_PORT_CONFIGURATION; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_EISA_SLOT_INFORMATION { - pub ReturnCode: UCHAR, - pub ReturnFlags: UCHAR, - pub MajorRevision: UCHAR, - pub MinorRevision: UCHAR, - pub Checksum: USHORT, - pub NumberFunctions: UCHAR, - pub FunctionInformation: UCHAR, - pub CompressedId: ULONG, -} -#[test] -fn bindgen_test_layout__CM_EISA_SLOT_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_CM_EISA_SLOT_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_EISA_SLOT_INFORMATION>(), - 12usize, - concat!("Size of: ", stringify!(_CM_EISA_SLOT_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_EISA_SLOT_INFORMATION>(), - 1usize, - concat!("Alignment of ", stringify!(_CM_EISA_SLOT_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReturnCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_SLOT_INFORMATION), - "::", - stringify!(ReturnCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReturnFlags) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_SLOT_INFORMATION), - "::", - stringify!(ReturnFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorRevision) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_SLOT_INFORMATION), - "::", - stringify!(MajorRevision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorRevision) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_SLOT_INFORMATION), - "::", - stringify!(MinorRevision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Checksum) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_SLOT_INFORMATION), - "::", - stringify!(Checksum), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberFunctions) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_SLOT_INFORMATION), - "::", - stringify!(NumberFunctions), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FunctionInformation) as usize - ptr as usize - }, - 7usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_SLOT_INFORMATION), - "::", - stringify!(FunctionInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompressedId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_SLOT_INFORMATION), - "::", - stringify!(CompressedId), - ), - ); -} -pub type CM_EISA_SLOT_INFORMATION = _CM_EISA_SLOT_INFORMATION; -pub type PCM_EISA_SLOT_INFORMATION = *mut _CM_EISA_SLOT_INFORMATION; -#[repr(C, packed)] -#[derive(Debug, Copy, Clone)] -pub struct _CM_EISA_FUNCTION_INFORMATION { - pub CompressedId: ULONG, - pub IdSlotFlags1: UCHAR, - pub IdSlotFlags2: UCHAR, - pub MinorRevision: UCHAR, - pub MajorRevision: UCHAR, - pub Selections: [UCHAR; 26usize], - pub FunctionFlags: UCHAR, - pub TypeString: [UCHAR; 80usize], - pub EisaMemory: [EISA_MEMORY_CONFIGURATION; 9usize], - pub EisaIrq: [EISA_IRQ_CONFIGURATION; 7usize], - pub EisaDma: [EISA_DMA_CONFIGURATION; 4usize], - pub EisaPort: [EISA_PORT_CONFIGURATION; 20usize], - pub InitializationData: [UCHAR; 60usize], -} -#[test] -fn bindgen_test_layout__CM_EISA_FUNCTION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_CM_EISA_FUNCTION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_EISA_FUNCTION_INFORMATION>(), - 320usize, - concat!("Size of: ", stringify!(_CM_EISA_FUNCTION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_EISA_FUNCTION_INFORMATION>(), - 1usize, - concat!("Alignment of ", stringify!(_CM_EISA_FUNCTION_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompressedId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_FUNCTION_INFORMATION), - "::", - stringify!(CompressedId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdSlotFlags1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_FUNCTION_INFORMATION), - "::", - stringify!(IdSlotFlags1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdSlotFlags2) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_FUNCTION_INFORMATION), - "::", - stringify!(IdSlotFlags2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorRevision) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_FUNCTION_INFORMATION), - "::", - stringify!(MinorRevision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorRevision) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_FUNCTION_INFORMATION), - "::", - stringify!(MajorRevision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Selections) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_FUNCTION_INFORMATION), - "::", - stringify!(Selections), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FunctionFlags) as usize - ptr as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_FUNCTION_INFORMATION), - "::", - stringify!(FunctionFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TypeString) as usize - ptr as usize }, - 35usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_FUNCTION_INFORMATION), - "::", - stringify!(TypeString), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EisaMemory) as usize - ptr as usize }, - 115usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_FUNCTION_INFORMATION), - "::", - stringify!(EisaMemory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EisaIrq) as usize - ptr as usize }, - 178usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_FUNCTION_INFORMATION), - "::", - stringify!(EisaIrq), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EisaDma) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_FUNCTION_INFORMATION), - "::", - stringify!(EisaDma), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EisaPort) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_FUNCTION_INFORMATION), - "::", - stringify!(EisaPort), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InitializationData) as usize - ptr as usize - }, - 260usize, - concat!( - "Offset of field: ", - stringify!(_CM_EISA_FUNCTION_INFORMATION), - "::", - stringify!(InitializationData), - ), - ); -} -impl Default for _CM_EISA_FUNCTION_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CM_EISA_FUNCTION_INFORMATION = _CM_EISA_FUNCTION_INFORMATION; -pub type PCM_EISA_FUNCTION_INFORMATION = *mut _CM_EISA_FUNCTION_INFORMATION; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_PNP_BIOS_DEVICE_NODE { - pub Size: USHORT, - pub Node: UCHAR, - pub ProductId: ULONG, - pub DeviceType: [UCHAR; 3usize], - pub DeviceAttributes: USHORT, -} -#[test] -fn bindgen_test_layout__CM_PNP_BIOS_DEVICE_NODE() { - const UNINIT: ::core::mem::MaybeUninit<_CM_PNP_BIOS_DEVICE_NODE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_PNP_BIOS_DEVICE_NODE>(), - 12usize, - concat!("Size of: ", stringify!(_CM_PNP_BIOS_DEVICE_NODE)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_PNP_BIOS_DEVICE_NODE>(), - 1usize, - concat!("Alignment of ", stringify!(_CM_PNP_BIOS_DEVICE_NODE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_DEVICE_NODE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Node) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_DEVICE_NODE), - "::", - stringify!(Node), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProductId) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_DEVICE_NODE), - "::", - stringify!(ProductId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceType) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_DEVICE_NODE), - "::", - stringify!(DeviceType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceAttributes) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_DEVICE_NODE), - "::", - stringify!(DeviceAttributes), - ), - ); -} -pub type CM_PNP_BIOS_DEVICE_NODE = _CM_PNP_BIOS_DEVICE_NODE; -pub type PCM_PNP_BIOS_DEVICE_NODE = *mut _CM_PNP_BIOS_DEVICE_NODE; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_PNP_BIOS_INSTALLATION_CHECK { - pub Signature: [UCHAR; 4usize], - pub Revision: UCHAR, - pub Length: UCHAR, - pub ControlField: USHORT, - pub Checksum: UCHAR, - pub EventFlagAddress: ULONG, - pub RealModeEntryOffset: USHORT, - pub RealModeEntrySegment: USHORT, - pub ProtectedModeEntryOffset: USHORT, - pub ProtectedModeCodeBaseAddress: ULONG, - pub OemDeviceId: ULONG, - pub RealModeDataBaseAddress: USHORT, - pub ProtectedModeDataBaseAddress: ULONG, -} -#[test] -fn bindgen_test_layout__CM_PNP_BIOS_INSTALLATION_CHECK() { - const UNINIT: ::core::mem::MaybeUninit<_CM_PNP_BIOS_INSTALLATION_CHECK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_PNP_BIOS_INSTALLATION_CHECK>(), - 33usize, - concat!("Size of: ", stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_PNP_BIOS_INSTALLATION_CHECK>(), - 1usize, - concat!("Alignment of ", stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK), - "::", - stringify!(Signature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ControlField) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK), - "::", - stringify!(ControlField), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Checksum) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK), - "::", - stringify!(Checksum), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EventFlagAddress) as usize - ptr as usize - }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK), - "::", - stringify!(EventFlagAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RealModeEntryOffset) as usize - ptr as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK), - "::", - stringify!(RealModeEntryOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RealModeEntrySegment) as usize - ptr as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK), - "::", - stringify!(RealModeEntrySegment), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProtectedModeEntryOffset) as usize - - ptr as usize - }, - 17usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK), - "::", - stringify!(ProtectedModeEntryOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProtectedModeCodeBaseAddress) as usize - - ptr as usize - }, - 19usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK), - "::", - stringify!(ProtectedModeCodeBaseAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OemDeviceId) as usize - ptr as usize }, - 23usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK), - "::", - stringify!(OemDeviceId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RealModeDataBaseAddress) as usize - ptr as usize - }, - 27usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK), - "::", - stringify!(RealModeDataBaseAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProtectedModeDataBaseAddress) as usize - - ptr as usize - }, - 29usize, - concat!( - "Offset of field: ", - stringify!(_CM_PNP_BIOS_INSTALLATION_CHECK), - "::", - stringify!(ProtectedModeDataBaseAddress), - ), - ); -} -pub type CM_PNP_BIOS_INSTALLATION_CHECK = _CM_PNP_BIOS_INSTALLATION_CHECK; -pub type PCM_PNP_BIOS_INSTALLATION_CHECK = *mut _CM_PNP_BIOS_INSTALLATION_CHECK; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_SCSI_DEVICE_DATA { - pub Version: USHORT, - pub Revision: USHORT, - pub HostIdentifier: UCHAR, -} -#[test] -fn bindgen_test_layout__CM_SCSI_DEVICE_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_CM_SCSI_DEVICE_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_SCSI_DEVICE_DATA>(), - 6usize, - concat!("Size of: ", stringify!(_CM_SCSI_DEVICE_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_SCSI_DEVICE_DATA>(), - 2usize, - concat!("Alignment of ", stringify!(_CM_SCSI_DEVICE_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_SCSI_DEVICE_DATA), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_SCSI_DEVICE_DATA), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HostIdentifier) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_SCSI_DEVICE_DATA), - "::", - stringify!(HostIdentifier), - ), - ); -} -pub type CM_SCSI_DEVICE_DATA = _CM_SCSI_DEVICE_DATA; -pub type PCM_SCSI_DEVICE_DATA = *mut _CM_SCSI_DEVICE_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_VIDEO_DEVICE_DATA { - pub Version: USHORT, - pub Revision: USHORT, - pub VideoClock: ULONG, -} -#[test] -fn bindgen_test_layout__CM_VIDEO_DEVICE_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_CM_VIDEO_DEVICE_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_VIDEO_DEVICE_DATA>(), - 8usize, - concat!("Size of: ", stringify!(_CM_VIDEO_DEVICE_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_VIDEO_DEVICE_DATA>(), - 4usize, - concat!("Alignment of ", stringify!(_CM_VIDEO_DEVICE_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_VIDEO_DEVICE_DATA), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_VIDEO_DEVICE_DATA), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VideoClock) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_VIDEO_DEVICE_DATA), - "::", - stringify!(VideoClock), - ), - ); -} -pub type CM_VIDEO_DEVICE_DATA = _CM_VIDEO_DEVICE_DATA; -pub type PCM_VIDEO_DEVICE_DATA = *mut _CM_VIDEO_DEVICE_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_SONIC_DEVICE_DATA { - pub Version: USHORT, - pub Revision: USHORT, - pub DataConfigurationRegister: USHORT, - pub EthernetAddress: [UCHAR; 8usize], -} -#[test] -fn bindgen_test_layout__CM_SONIC_DEVICE_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_CM_SONIC_DEVICE_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_SONIC_DEVICE_DATA>(), - 14usize, - concat!("Size of: ", stringify!(_CM_SONIC_DEVICE_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_SONIC_DEVICE_DATA>(), - 2usize, - concat!("Alignment of ", stringify!(_CM_SONIC_DEVICE_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_SONIC_DEVICE_DATA), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_SONIC_DEVICE_DATA), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataConfigurationRegister) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_SONIC_DEVICE_DATA), - "::", - stringify!(DataConfigurationRegister), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EthernetAddress) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_CM_SONIC_DEVICE_DATA), - "::", - stringify!(EthernetAddress), - ), - ); -} -pub type CM_SONIC_DEVICE_DATA = _CM_SONIC_DEVICE_DATA; -pub type PCM_SONIC_DEVICE_DATA = *mut _CM_SONIC_DEVICE_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_SERIAL_DEVICE_DATA { - pub Version: USHORT, - pub Revision: USHORT, - pub BaudClock: ULONG, -} -#[test] -fn bindgen_test_layout__CM_SERIAL_DEVICE_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_CM_SERIAL_DEVICE_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_SERIAL_DEVICE_DATA>(), - 8usize, - concat!("Size of: ", stringify!(_CM_SERIAL_DEVICE_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_SERIAL_DEVICE_DATA>(), - 4usize, - concat!("Alignment of ", stringify!(_CM_SERIAL_DEVICE_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_SERIAL_DEVICE_DATA), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_SERIAL_DEVICE_DATA), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaudClock) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_SERIAL_DEVICE_DATA), - "::", - stringify!(BaudClock), - ), - ); -} -pub type CM_SERIAL_DEVICE_DATA = _CM_SERIAL_DEVICE_DATA; -pub type PCM_SERIAL_DEVICE_DATA = *mut _CM_SERIAL_DEVICE_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_MONITOR_DEVICE_DATA { - pub Version: USHORT, - pub Revision: USHORT, - pub HorizontalScreenSize: USHORT, - pub VerticalScreenSize: USHORT, - pub HorizontalResolution: USHORT, - pub VerticalResolution: USHORT, - pub HorizontalDisplayTimeLow: USHORT, - pub HorizontalDisplayTime: USHORT, - pub HorizontalDisplayTimeHigh: USHORT, - pub HorizontalBackPorchLow: USHORT, - pub HorizontalBackPorch: USHORT, - pub HorizontalBackPorchHigh: USHORT, - pub HorizontalFrontPorchLow: USHORT, - pub HorizontalFrontPorch: USHORT, - pub HorizontalFrontPorchHigh: USHORT, - pub HorizontalSyncLow: USHORT, - pub HorizontalSync: USHORT, - pub HorizontalSyncHigh: USHORT, - pub VerticalBackPorchLow: USHORT, - pub VerticalBackPorch: USHORT, - pub VerticalBackPorchHigh: USHORT, - pub VerticalFrontPorchLow: USHORT, - pub VerticalFrontPorch: USHORT, - pub VerticalFrontPorchHigh: USHORT, - pub VerticalSyncLow: USHORT, - pub VerticalSync: USHORT, - pub VerticalSyncHigh: USHORT, -} -#[test] -fn bindgen_test_layout__CM_MONITOR_DEVICE_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_CM_MONITOR_DEVICE_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_MONITOR_DEVICE_DATA>(), - 54usize, - concat!("Size of: ", stringify!(_CM_MONITOR_DEVICE_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_MONITOR_DEVICE_DATA>(), - 2usize, - concat!("Alignment of ", stringify!(_CM_MONITOR_DEVICE_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HorizontalScreenSize) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalScreenSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VerticalScreenSize) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(VerticalScreenSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HorizontalResolution) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalResolution), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VerticalResolution) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(VerticalResolution), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HorizontalDisplayTimeLow) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalDisplayTimeLow), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HorizontalDisplayTime) as usize - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalDisplayTime), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HorizontalDisplayTimeHigh) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalDisplayTimeHigh), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HorizontalBackPorchLow) as usize - ptr as usize - }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalBackPorchLow), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HorizontalBackPorch) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalBackPorch), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HorizontalBackPorchHigh) as usize - ptr as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalBackPorchHigh), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HorizontalFrontPorchLow) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalFrontPorchLow), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HorizontalFrontPorch) as usize - ptr as usize - }, - 26usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalFrontPorch), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HorizontalFrontPorchHigh) as usize - - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalFrontPorchHigh), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HorizontalSyncLow) as usize - ptr as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalSyncLow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HorizontalSync) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalSync), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HorizontalSyncHigh) as usize - ptr as usize - }, - 34usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(HorizontalSyncHigh), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VerticalBackPorchLow) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(VerticalBackPorchLow), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VerticalBackPorch) as usize - ptr as usize - }, - 38usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(VerticalBackPorch), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VerticalBackPorchHigh) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(VerticalBackPorchHigh), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VerticalFrontPorchLow) as usize - ptr as usize - }, - 42usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(VerticalFrontPorchLow), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VerticalFrontPorch) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(VerticalFrontPorch), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VerticalFrontPorchHigh) as usize - ptr as usize - }, - 46usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(VerticalFrontPorchHigh), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VerticalSyncLow) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(VerticalSyncLow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VerticalSync) as usize - ptr as usize }, - 50usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(VerticalSync), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VerticalSyncHigh) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_CM_MONITOR_DEVICE_DATA), - "::", - stringify!(VerticalSyncHigh), - ), - ); -} -pub type CM_MONITOR_DEVICE_DATA = _CM_MONITOR_DEVICE_DATA; -pub type PCM_MONITOR_DEVICE_DATA = *mut _CM_MONITOR_DEVICE_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_FLOPPY_DEVICE_DATA { - pub Version: USHORT, - pub Revision: USHORT, - pub Size: [CHAR; 8usize], - pub MaxDensity: ULONG, - pub MountDensity: ULONG, - pub StepRateHeadUnloadTime: UCHAR, - pub HeadLoadTime: UCHAR, - pub MotorOffTime: UCHAR, - pub SectorLengthCode: UCHAR, - pub SectorPerTrack: UCHAR, - pub ReadWriteGapLength: UCHAR, - pub DataTransferLength: UCHAR, - pub FormatGapLength: UCHAR, - pub FormatFillCharacter: UCHAR, - pub HeadSettleTime: UCHAR, - pub MotorSettleTime: UCHAR, - pub MaximumTrackValue: UCHAR, - pub DataTransferRate: UCHAR, -} -#[test] -fn bindgen_test_layout__CM_FLOPPY_DEVICE_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_CM_FLOPPY_DEVICE_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_FLOPPY_DEVICE_DATA>(), - 36usize, - concat!("Size of: ", stringify!(_CM_FLOPPY_DEVICE_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_FLOPPY_DEVICE_DATA>(), - 4usize, - concat!("Alignment of ", stringify!(_CM_FLOPPY_DEVICE_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxDensity) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(MaxDensity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MountDensity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(MountDensity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StepRateHeadUnloadTime) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(StepRateHeadUnloadTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HeadLoadTime) as usize - ptr as usize }, - 21usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(HeadLoadTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MotorOffTime) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(MotorOffTime), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SectorLengthCode) as usize - ptr as usize - }, - 23usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(SectorLengthCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectorPerTrack) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(SectorPerTrack), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadWriteGapLength) as usize - ptr as usize - }, - 25usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(ReadWriteGapLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataTransferLength) as usize - ptr as usize - }, - 26usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(DataTransferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FormatGapLength) as usize - ptr as usize }, - 27usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(FormatGapLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FormatFillCharacter) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(FormatFillCharacter), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HeadSettleTime) as usize - ptr as usize }, - 29usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(HeadSettleTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MotorSettleTime) as usize - ptr as usize }, - 30usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(MotorSettleTime), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumTrackValue) as usize - ptr as usize - }, - 31usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(MaximumTrackValue), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataTransferRate) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_CM_FLOPPY_DEVICE_DATA), - "::", - stringify!(DataTransferRate), - ), - ); -} -pub type CM_FLOPPY_DEVICE_DATA = _CM_FLOPPY_DEVICE_DATA; -pub type PCM_FLOPPY_DEVICE_DATA = *mut _CM_FLOPPY_DEVICE_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_KEYBOARD_DEVICE_DATA { - pub Version: USHORT, - pub Revision: USHORT, - pub Type: UCHAR, - pub Subtype: UCHAR, - pub KeyboardFlags: USHORT, -} -#[test] -fn bindgen_test_layout__CM_KEYBOARD_DEVICE_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_CM_KEYBOARD_DEVICE_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_KEYBOARD_DEVICE_DATA>(), - 8usize, - concat!("Size of: ", stringify!(_CM_KEYBOARD_DEVICE_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_KEYBOARD_DEVICE_DATA>(), - 2usize, - concat!("Alignment of ", stringify!(_CM_KEYBOARD_DEVICE_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_KEYBOARD_DEVICE_DATA), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_KEYBOARD_DEVICE_DATA), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_KEYBOARD_DEVICE_DATA), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Subtype) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_CM_KEYBOARD_DEVICE_DATA), - "::", - stringify!(Subtype), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyboardFlags) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_CM_KEYBOARD_DEVICE_DATA), - "::", - stringify!(KeyboardFlags), - ), - ); -} -pub type CM_KEYBOARD_DEVICE_DATA = _CM_KEYBOARD_DEVICE_DATA; -pub type PCM_KEYBOARD_DEVICE_DATA = *mut _CM_KEYBOARD_DEVICE_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_DISK_GEOMETRY_DEVICE_DATA { - pub BytesPerSector: ULONG, - pub NumberOfCylinders: ULONG, - pub SectorsPerTrack: ULONG, - pub NumberOfHeads: ULONG, -} -#[test] -fn bindgen_test_layout__CM_DISK_GEOMETRY_DEVICE_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_CM_DISK_GEOMETRY_DEVICE_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_DISK_GEOMETRY_DEVICE_DATA>(), - 16usize, - concat!("Size of: ", stringify!(_CM_DISK_GEOMETRY_DEVICE_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_DISK_GEOMETRY_DEVICE_DATA>(), - 4usize, - concat!("Alignment of ", stringify!(_CM_DISK_GEOMETRY_DEVICE_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesPerSector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_DISK_GEOMETRY_DEVICE_DATA), - "::", - stringify!(BytesPerSector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfCylinders) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_DISK_GEOMETRY_DEVICE_DATA), - "::", - stringify!(NumberOfCylinders), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectorsPerTrack) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_DISK_GEOMETRY_DEVICE_DATA), - "::", - stringify!(SectorsPerTrack), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfHeads) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CM_DISK_GEOMETRY_DEVICE_DATA), - "::", - stringify!(NumberOfHeads), - ), - ); -} -pub type CM_DISK_GEOMETRY_DEVICE_DATA = _CM_DISK_GEOMETRY_DEVICE_DATA; -pub type PCM_DISK_GEOMETRY_DEVICE_DATA = *mut _CM_DISK_GEOMETRY_DEVICE_DATA; -pub mod _IRQ_DEVICE_POLICY { - pub type Type = ::core::ffi::c_int; - pub const IrqPolicyMachineDefault: Type = 0; - pub const IrqPolicyAllCloseProcessors: Type = 1; - pub const IrqPolicyOneCloseProcessor: Type = 2; - pub const IrqPolicyAllProcessorsInMachine: Type = 3; - pub const IrqPolicySpecifiedProcessors: Type = 4; - pub const IrqPolicySpreadMessagesAcrossAllProcessors: Type = 5; - pub const IrqPolicyAllProcessorsInMachineWhenSteered: Type = 6; -} -pub use self::_IRQ_DEVICE_POLICY::Type as IRQ_DEVICE_POLICY; -pub type PIRQ_DEVICE_POLICY = *mut _IRQ_DEVICE_POLICY::Type; -pub mod _IRQ_PRIORITY { - pub type Type = ::core::ffi::c_int; - pub const IrqPriorityUndefined: Type = 0; - pub const IrqPriorityLow: Type = 1; - pub const IrqPriorityNormal: Type = 2; - pub const IrqPriorityHigh: Type = 3; -} -pub use self::_IRQ_PRIORITY::Type as IRQ_PRIORITY; -pub type PIRQ_PRIORITY = *mut _IRQ_PRIORITY::Type; -pub mod _IRQ_GROUP_POLICY { - pub type Type = ::core::ffi::c_int; - pub const GroupAffinityAllGroupZero: Type = 0; - pub const GroupAffinityDontCare: Type = 1; -} -pub use self::_IRQ_GROUP_POLICY::Type as IRQ_GROUP_POLICY; -pub type PIRQ_GROUP_POLICY = *mut _IRQ_GROUP_POLICY::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR { - pub Option: UCHAR, - pub Type: UCHAR, - pub ShareDisposition: UCHAR, - pub Spare1: UCHAR, - pub Flags: USHORT, - pub Spare2: USHORT, - pub u: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1 { - pub Port: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - pub Memory: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2, - pub Interrupt: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3, - pub Dma: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4, - pub DmaV3: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5, - pub Generic: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6, - pub DevicePrivate: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7, - pub BusNumber: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8, - pub ConfigData: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9, - pub Memory40: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10, - pub Memory48: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11, - pub Memory64: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12, - pub Connection: _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1 { - pub Length: ULONG, - pub Alignment: ULONG, - pub MinimumAddress: PHYSICAL_ADDRESS, - pub MaximumAddress: PHYSICAL_ADDRESS, -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1>(), - 24usize, - concat!( - "Size of: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Alignment) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Alignment), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinimumAddress) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(MinimumAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumAddress) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(MaximumAddress), - ), - ); -} -impl Default for _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2 { - pub Length: ULONG, - pub Alignment: ULONG, - pub MinimumAddress: PHYSICAL_ADDRESS, - pub MaximumAddress: PHYSICAL_ADDRESS, -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2>(), - 24usize, - concat!( - "Size of: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Alignment) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Alignment), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinimumAddress) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(MinimumAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumAddress) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(MaximumAddress), - ), - ); -} -impl Default for _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3 { - pub MinimumVector: ULONG, - pub MaximumVector: ULONG, - pub AffinityPolicy: IRQ_DEVICE_POLICY, - pub PriorityPolicy: IRQ_PRIORITY, - pub TargetedProcessors: KAFFINITY, -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3>(), - 24usize, - concat!( - "Size of: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinimumVector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(MinimumVector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumVector) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(MaximumVector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AffinityPolicy) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(AffinityPolicy), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PriorityPolicy) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(PriorityPolicy), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetedProcessors) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(TargetedProcessors), - ), - ); -} -impl Default for _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4 { - pub MinimumChannel: ULONG, - pub MaximumChannel: ULONG, -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4>(), - 8usize, - concat!( - "Size of: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinimumChannel) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(MinimumChannel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumChannel) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(MaximumChannel), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5 { - pub RequestLine: ULONG, - pub Reserved: ULONG, - pub Channel: ULONG, - pub TransferWidth: ULONG, -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5>(), - 16usize, - concat!( - "Size of: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequestLine) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(RequestLine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Channel) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(Channel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TransferWidth) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(TransferWidth), - ), - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6 { - pub Length: ULONG, - pub Alignment: ULONG, - pub MinimumAddress: PHYSICAL_ADDRESS, - pub MaximumAddress: PHYSICAL_ADDRESS, -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6>(), - 24usize, - concat!( - "Size of: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Alignment) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(Alignment), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinimumAddress) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(MinimumAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumAddress) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(MaximumAddress), - ), - ); -} -impl Default for _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7 { - pub Data: [ULONG; 3usize], -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7>(), - 12usize, - concat!( - "Size of: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(Data), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8 { - pub Length: ULONG, - pub MinBusNumber: ULONG, - pub MaxBusNumber: ULONG, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8>(), - 16usize, - concat!( - "Size of: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinBusNumber) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(MinBusNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxBusNumber) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(MaxBusNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(Reserved), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9 { - pub Priority: ULONG, - pub Reserved1: ULONG, - pub Reserved2: ULONG, -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9>(), - 12usize, - concat!( - "Size of: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Priority) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9), - "::", - stringify!(Priority), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_9), - "::", - stringify!(Reserved2), - ), - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10 { - pub Length40: ULONG, - pub Alignment40: ULONG, - pub MinimumAddress: PHYSICAL_ADDRESS, - pub MaximumAddress: PHYSICAL_ADDRESS, -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10>(), - 24usize, - concat!( - "Size of: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length40) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10), - "::", - stringify!(Length40), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Alignment40) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10), - "::", - stringify!(Alignment40), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinimumAddress) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10), - "::", - stringify!(MinimumAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumAddress) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10), - "::", - stringify!(MaximumAddress), - ), - ); -} -impl Default for _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_10 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11 { - pub Length48: ULONG, - pub Alignment48: ULONG, - pub MinimumAddress: PHYSICAL_ADDRESS, - pub MaximumAddress: PHYSICAL_ADDRESS, -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11>(), - 24usize, - concat!( - "Size of: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length48) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11), - "::", - stringify!(Length48), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Alignment48) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11), - "::", - stringify!(Alignment48), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinimumAddress) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11), - "::", - stringify!(MinimumAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumAddress) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11), - "::", - stringify!(MaximumAddress), - ), - ); -} -impl Default for _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_11 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12 { - pub Length64: ULONG, - pub Alignment64: ULONG, - pub MinimumAddress: PHYSICAL_ADDRESS, - pub MaximumAddress: PHYSICAL_ADDRESS, -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12>(), - 24usize, - concat!( - "Size of: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12), - "::", - stringify!(Length64), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Alignment64) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12), - "::", - stringify!(Alignment64), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinimumAddress) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12), - "::", - stringify!(MinimumAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumAddress) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12), - "::", - stringify!(MaximumAddress), - ), - ); -} -impl Default for _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_12 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13 { - pub Class: UCHAR, - pub Type: UCHAR, - pub Reserved1: UCHAR, - pub Reserved2: UCHAR, - pub IdLowPart: ULONG, - pub IdHighPart: ULONG, -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13>(), - 12usize, - concat!( - "Size of: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13), - "::", - stringify!(Class), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdLowPart) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13), - "::", - stringify!(IdLowPart), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdHighPart) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_13), - "::", - stringify!(IdHighPart), - ), - ); -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1>(), - 24usize, - concat!("Size of: ", stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Port) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Port), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Memory) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Memory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Interrupt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Interrupt), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dma) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Dma), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DmaV3) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(DmaV3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Generic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Generic), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DevicePrivate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(DevicePrivate), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(BusNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ConfigData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(ConfigData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Memory40) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Memory40), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Memory48) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Memory48), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Memory64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Memory64), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Connection) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Connection), - ), - ); -} -impl Default for _IO_RESOURCE_DESCRIPTOR__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_IO_RESOURCE_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_DESCRIPTOR>(), - 32usize, - concat!("Size of: ", stringify!(_IO_RESOURCE_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_DESCRIPTOR>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_RESOURCE_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Option) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR), - "::", - stringify!(Option), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ShareDisposition) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR), - "::", - stringify!(ShareDisposition), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spare1) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR), - "::", - stringify!(Spare1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spare2) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR), - "::", - stringify!(Spare2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_DESCRIPTOR), - "::", - stringify!(u), - ), - ); -} -impl Default for _IO_RESOURCE_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_RESOURCE_DESCRIPTOR = _IO_RESOURCE_DESCRIPTOR; -pub type PIO_RESOURCE_DESCRIPTOR = *mut _IO_RESOURCE_DESCRIPTOR; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_RESOURCE_LIST { - pub Version: USHORT, - pub Revision: USHORT, - pub Count: ULONG, - pub Descriptors: [IO_RESOURCE_DESCRIPTOR; 1usize], -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_IO_RESOURCE_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_LIST>(), - 40usize, - concat!("Size of: ", stringify!(_IO_RESOURCE_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_LIST>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_RESOURCE_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_LIST), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_LIST), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_LIST), - "::", - stringify!(Count), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Descriptors) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_LIST), - "::", - stringify!(Descriptors), - ), - ); -} -impl Default for _IO_RESOURCE_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_RESOURCE_LIST = _IO_RESOURCE_LIST; -pub type PIO_RESOURCE_LIST = *mut _IO_RESOURCE_LIST; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_RESOURCE_REQUIREMENTS_LIST { - pub ListSize: ULONG, - pub InterfaceType: INTERFACE_TYPE, - pub BusNumber: ULONG, - pub SlotNumber: ULONG, - pub Reserved: [ULONG; 3usize], - pub AlternativeLists: ULONG, - pub List: [IO_RESOURCE_LIST; 1usize], -} -#[test] -fn bindgen_test_layout__IO_RESOURCE_REQUIREMENTS_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_IO_RESOURCE_REQUIREMENTS_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_RESOURCE_REQUIREMENTS_LIST>(), - 72usize, - concat!("Size of: ", stringify!(_IO_RESOURCE_REQUIREMENTS_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_RESOURCE_REQUIREMENTS_LIST>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_RESOURCE_REQUIREMENTS_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ListSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_REQUIREMENTS_LIST), - "::", - stringify!(ListSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterfaceType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_REQUIREMENTS_LIST), - "::", - stringify!(InterfaceType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusNumber) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_REQUIREMENTS_LIST), - "::", - stringify!(BusNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SlotNumber) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_REQUIREMENTS_LIST), - "::", - stringify!(SlotNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_REQUIREMENTS_LIST), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AlternativeLists) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_REQUIREMENTS_LIST), - "::", - stringify!(AlternativeLists), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).List) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_RESOURCE_REQUIREMENTS_LIST), - "::", - stringify!(List), - ), - ); -} -impl Default for _IO_RESOURCE_REQUIREMENTS_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_RESOURCE_REQUIREMENTS_LIST = _IO_RESOURCE_REQUIREMENTS_LIST; -pub type PIO_RESOURCE_REQUIREMENTS_LIST = *mut _IO_RESOURCE_REQUIREMENTS_LIST; -#[repr(C)] -#[repr(align(16))] -#[derive(Debug, Copy, Clone)] -pub struct _SLIST_ENTRY { - pub Next: *mut _SLIST_ENTRY, -} -#[test] -fn bindgen_test_layout__SLIST_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_SLIST_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SLIST_ENTRY>(), - 16usize, - concat!("Size of: ", stringify!(_SLIST_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_SLIST_ENTRY>(), - 16usize, - concat!("Alignment of ", stringify!(_SLIST_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Next) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_SLIST_ENTRY), "::", stringify!(Next)), - ); -} -impl Default for _SLIST_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SLIST_ENTRY = _SLIST_ENTRY; -pub type PSLIST_ENTRY = *mut _SLIST_ENTRY; -#[repr(C)] -#[repr(align(16))] -#[derive(Copy, Clone)] -pub union _SLIST_HEADER { - pub __bindgen_anon_1: _SLIST_HEADER__bindgen_ty_1, - pub HeaderX64: _SLIST_HEADER__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SLIST_HEADER__bindgen_ty_1 { - pub Alignment: ULONGLONG, - pub Region: ULONGLONG, -} -#[test] -fn bindgen_test_layout__SLIST_HEADER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_SLIST_HEADER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SLIST_HEADER__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_SLIST_HEADER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_SLIST_HEADER__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_SLIST_HEADER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Alignment) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SLIST_HEADER__bindgen_ty_1), - "::", - stringify!(Alignment), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Region) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SLIST_HEADER__bindgen_ty_1), - "::", - stringify!(Region), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SLIST_HEADER__bindgen_ty_2 { - pub _bitfield_align_1: [u64; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>, -} -#[test] -fn bindgen_test_layout__SLIST_HEADER__bindgen_ty_2() { - assert_eq!( - ::core::mem::size_of::<_SLIST_HEADER__bindgen_ty_2>(), - 16usize, - concat!("Size of: ", stringify!(_SLIST_HEADER__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_SLIST_HEADER__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(_SLIST_HEADER__bindgen_ty_2)), - ); -} -impl _SLIST_HEADER__bindgen_ty_2 { - #[inline] - pub fn Depth(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u64) } - } - #[inline] - pub fn set_Depth(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn Sequence(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 48u8) as u64) } - } - #[inline] - pub fn set_Sequence(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 48u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(64usize, 4u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(64usize, 4u8, val as u64) - } - } - #[inline] - pub fn NextEntry(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(68usize, 60u8) as u64) } - } - #[inline] - pub fn set_NextEntry(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(68usize, 60u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Depth: ULONGLONG, - Sequence: ULONGLONG, - Reserved: ULONGLONG, - NextEntry: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 16usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 16usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 16u8, - { - let Depth: u64 = unsafe { ::core::mem::transmute(Depth) }; - Depth as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 48u8, - { - let Sequence: u64 = unsafe { ::core::mem::transmute(Sequence) }; - Sequence as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 64usize, - 4u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 68usize, - 60u8, - { - let NextEntry: u64 = unsafe { ::core::mem::transmute(NextEntry) }; - NextEntry as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__SLIST_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_SLIST_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SLIST_HEADER>(), - 16usize, - concat!("Size of: ", stringify!(_SLIST_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_SLIST_HEADER>(), - 16usize, - concat!("Alignment of ", stringify!(_SLIST_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HeaderX64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SLIST_HEADER), - "::", - stringify!(HeaderX64), - ), - ); -} -impl Default for _SLIST_HEADER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SLIST_HEADER = _SLIST_HEADER; -pub type PSLIST_HEADER = *mut _SLIST_HEADER; -pub type PRTL_QUERY_REGISTRY_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - arg1: PWSTR, - arg2: ULONG, - arg3: PVOID, - arg4: ULONG, - arg5: PVOID, - arg6: PVOID, - ) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RTL_QUERY_REGISTRY_TABLE { - pub QueryRoutine: PRTL_QUERY_REGISTRY_ROUTINE, - pub Flags: ULONG, - pub Name: PWSTR, - pub EntryContext: PVOID, - pub DefaultType: ULONG, - pub DefaultData: PVOID, - pub DefaultLength: ULONG, -} -#[test] -fn bindgen_test_layout__RTL_QUERY_REGISTRY_TABLE() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_QUERY_REGISTRY_TABLE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_QUERY_REGISTRY_TABLE>(), - 56usize, - concat!("Size of: ", stringify!(_RTL_QUERY_REGISTRY_TABLE)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_QUERY_REGISTRY_TABLE>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_QUERY_REGISTRY_TABLE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryRoutine) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_QUERY_REGISTRY_TABLE), - "::", - stringify!(QueryRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RTL_QUERY_REGISTRY_TABLE), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_RTL_QUERY_REGISTRY_TABLE), - "::", - stringify!(Name), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntryContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_RTL_QUERY_REGISTRY_TABLE), - "::", - stringify!(EntryContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DefaultType) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_RTL_QUERY_REGISTRY_TABLE), - "::", - stringify!(DefaultType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DefaultData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_RTL_QUERY_REGISTRY_TABLE), - "::", - stringify!(DefaultData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DefaultLength) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_RTL_QUERY_REGISTRY_TABLE), - "::", - stringify!(DefaultLength), - ), - ); -} -impl Default for _RTL_QUERY_REGISTRY_TABLE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_QUERY_REGISTRY_TABLE = _RTL_QUERY_REGISTRY_TABLE; -pub type PRTL_QUERY_REGISTRY_TABLE = *mut _RTL_QUERY_REGISTRY_TABLE; -pub type PDEBUG_PRINT_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Output: PSTRING, ComponentId: ULONG, Level: ULONG), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TIME_FIELDS { - pub Year: CSHORT, - pub Month: CSHORT, - pub Day: CSHORT, - pub Hour: CSHORT, - pub Minute: CSHORT, - pub Second: CSHORT, - pub Milliseconds: CSHORT, - pub Weekday: CSHORT, -} -#[test] -fn bindgen_test_layout__TIME_FIELDS() { - const UNINIT: ::core::mem::MaybeUninit<_TIME_FIELDS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TIME_FIELDS>(), - 16usize, - concat!("Size of: ", stringify!(_TIME_FIELDS)), - ); - assert_eq!( - ::core::mem::align_of::<_TIME_FIELDS>(), - 2usize, - concat!("Alignment of ", stringify!(_TIME_FIELDS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Year) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_TIME_FIELDS), "::", stringify!(Year)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Month) as usize - ptr as usize }, - 2usize, - concat!("Offset of field: ", stringify!(_TIME_FIELDS), "::", stringify!(Month)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Day) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_TIME_FIELDS), "::", stringify!(Day)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Hour) as usize - ptr as usize }, - 6usize, - concat!("Offset of field: ", stringify!(_TIME_FIELDS), "::", stringify!(Hour)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Minute) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_TIME_FIELDS), "::", stringify!(Minute)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Second) as usize - ptr as usize }, - 10usize, - concat!("Offset of field: ", stringify!(_TIME_FIELDS), "::", stringify!(Second)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Milliseconds) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_TIME_FIELDS), - "::", - stringify!(Milliseconds), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Weekday) as usize - ptr as usize }, - 14usize, - concat!("Offset of field: ", stringify!(_TIME_FIELDS), "::", stringify!(Weekday)), - ); -} -pub type TIME_FIELDS = _TIME_FIELDS; -pub type PTIME_FIELDS = *mut TIME_FIELDS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RTL_BITMAP { - pub SizeOfBitMap: ULONG, - pub Buffer: PULONG, -} -#[test] -fn bindgen_test_layout__RTL_BITMAP() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_BITMAP> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_BITMAP>(), - 16usize, - concat!("Size of: ", stringify!(_RTL_BITMAP)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_BITMAP>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_BITMAP)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SizeOfBitMap) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_BITMAP), - "::", - stringify!(SizeOfBitMap), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_RTL_BITMAP), "::", stringify!(Buffer)), - ); -} -impl Default for _RTL_BITMAP { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_BITMAP = _RTL_BITMAP; -pub type PRTL_BITMAP = *mut RTL_BITMAP; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _RTL_BITMAP_RUN { - pub StartingIndex: ULONG, - pub NumberOfBits: ULONG, -} -#[test] -fn bindgen_test_layout__RTL_BITMAP_RUN() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_BITMAP_RUN> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_BITMAP_RUN>(), - 8usize, - concat!("Size of: ", stringify!(_RTL_BITMAP_RUN)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_BITMAP_RUN>(), - 4usize, - concat!("Alignment of ", stringify!(_RTL_BITMAP_RUN)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingIndex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_BITMAP_RUN), - "::", - stringify!(StartingIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_RTL_BITMAP_RUN), - "::", - stringify!(NumberOfBits), - ), - ); -} -pub type RTL_BITMAP_RUN = _RTL_BITMAP_RUN; -pub type PRTL_BITMAP_RUN = *mut RTL_BITMAP_RUN; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OSVERSIONINFOA { - pub dwOSVersionInfoSize: ULONG, - pub dwMajorVersion: ULONG, - pub dwMinorVersion: ULONG, - pub dwBuildNumber: ULONG, - pub dwPlatformId: ULONG, - pub szCSDVersion: [CHAR; 128usize], -} -#[test] -fn bindgen_test_layout__OSVERSIONINFOA() { - const UNINIT: ::core::mem::MaybeUninit<_OSVERSIONINFOA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OSVERSIONINFOA>(), - 148usize, - concat!("Size of: ", stringify!(_OSVERSIONINFOA)), - ); - assert_eq!( - ::core::mem::align_of::<_OSVERSIONINFOA>(), - 4usize, - concat!("Alignment of ", stringify!(_OSVERSIONINFOA)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwOSVersionInfoSize) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOA), - "::", - stringify!(dwOSVersionInfoSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwMajorVersion) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOA), - "::", - stringify!(dwMajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwMinorVersion) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOA), - "::", - stringify!(dwMinorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwBuildNumber) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOA), - "::", - stringify!(dwBuildNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwPlatformId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOA), - "::", - stringify!(dwPlatformId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).szCSDVersion) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOA), - "::", - stringify!(szCSDVersion), - ), - ); -} -impl Default for _OSVERSIONINFOA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OSVERSIONINFOA = _OSVERSIONINFOA; -pub type POSVERSIONINFOA = *mut _OSVERSIONINFOA; -pub type LPOSVERSIONINFOA = *mut _OSVERSIONINFOA; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OSVERSIONINFOW { - pub dwOSVersionInfoSize: ULONG, - pub dwMajorVersion: ULONG, - pub dwMinorVersion: ULONG, - pub dwBuildNumber: ULONG, - pub dwPlatformId: ULONG, - pub szCSDVersion: [WCHAR; 128usize], -} -#[test] -fn bindgen_test_layout__OSVERSIONINFOW() { - const UNINIT: ::core::mem::MaybeUninit<_OSVERSIONINFOW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OSVERSIONINFOW>(), - 276usize, - concat!("Size of: ", stringify!(_OSVERSIONINFOW)), - ); - assert_eq!( - ::core::mem::align_of::<_OSVERSIONINFOW>(), - 4usize, - concat!("Alignment of ", stringify!(_OSVERSIONINFOW)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwOSVersionInfoSize) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOW), - "::", - stringify!(dwOSVersionInfoSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwMajorVersion) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOW), - "::", - stringify!(dwMajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwMinorVersion) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOW), - "::", - stringify!(dwMinorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwBuildNumber) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOW), - "::", - stringify!(dwBuildNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwPlatformId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOW), - "::", - stringify!(dwPlatformId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).szCSDVersion) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOW), - "::", - stringify!(szCSDVersion), - ), - ); -} -impl Default for _OSVERSIONINFOW { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OSVERSIONINFOW = _OSVERSIONINFOW; -pub type POSVERSIONINFOW = *mut _OSVERSIONINFOW; -pub type LPOSVERSIONINFOW = *mut _OSVERSIONINFOW; -pub type RTL_OSVERSIONINFOW = _OSVERSIONINFOW; -pub type PRTL_OSVERSIONINFOW = *mut _OSVERSIONINFOW; -pub type OSVERSIONINFO = OSVERSIONINFOA; -pub type POSVERSIONINFO = POSVERSIONINFOA; -pub type LPOSVERSIONINFO = LPOSVERSIONINFOA; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OSVERSIONINFOEXA { - pub dwOSVersionInfoSize: ULONG, - pub dwMajorVersion: ULONG, - pub dwMinorVersion: ULONG, - pub dwBuildNumber: ULONG, - pub dwPlatformId: ULONG, - pub szCSDVersion: [CHAR; 128usize], - pub wServicePackMajor: USHORT, - pub wServicePackMinor: USHORT, - pub wSuiteMask: USHORT, - pub wProductType: UCHAR, - pub wReserved: UCHAR, -} -#[test] -fn bindgen_test_layout__OSVERSIONINFOEXA() { - const UNINIT: ::core::mem::MaybeUninit<_OSVERSIONINFOEXA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OSVERSIONINFOEXA>(), - 156usize, - concat!("Size of: ", stringify!(_OSVERSIONINFOEXA)), - ); - assert_eq!( - ::core::mem::align_of::<_OSVERSIONINFOEXA>(), - 4usize, - concat!("Alignment of ", stringify!(_OSVERSIONINFOEXA)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwOSVersionInfoSize) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXA), - "::", - stringify!(dwOSVersionInfoSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwMajorVersion) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXA), - "::", - stringify!(dwMajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwMinorVersion) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXA), - "::", - stringify!(dwMinorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwBuildNumber) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXA), - "::", - stringify!(dwBuildNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwPlatformId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXA), - "::", - stringify!(dwPlatformId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).szCSDVersion) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXA), - "::", - stringify!(szCSDVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).wServicePackMajor) as usize - ptr as usize - }, - 148usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXA), - "::", - stringify!(wServicePackMajor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).wServicePackMinor) as usize - ptr as usize - }, - 150usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXA), - "::", - stringify!(wServicePackMinor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wSuiteMask) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXA), - "::", - stringify!(wSuiteMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wProductType) as usize - ptr as usize }, - 154usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXA), - "::", - stringify!(wProductType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wReserved) as usize - ptr as usize }, - 155usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXA), - "::", - stringify!(wReserved), - ), - ); -} -impl Default for _OSVERSIONINFOEXA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OSVERSIONINFOEXA = _OSVERSIONINFOEXA; -pub type POSVERSIONINFOEXA = *mut _OSVERSIONINFOEXA; -pub type LPOSVERSIONINFOEXA = *mut _OSVERSIONINFOEXA; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OSVERSIONINFOEXW { - pub dwOSVersionInfoSize: ULONG, - pub dwMajorVersion: ULONG, - pub dwMinorVersion: ULONG, - pub dwBuildNumber: ULONG, - pub dwPlatformId: ULONG, - pub szCSDVersion: [WCHAR; 128usize], - pub wServicePackMajor: USHORT, - pub wServicePackMinor: USHORT, - pub wSuiteMask: USHORT, - pub wProductType: UCHAR, - pub wReserved: UCHAR, -} -#[test] -fn bindgen_test_layout__OSVERSIONINFOEXW() { - const UNINIT: ::core::mem::MaybeUninit<_OSVERSIONINFOEXW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OSVERSIONINFOEXW>(), - 284usize, - concat!("Size of: ", stringify!(_OSVERSIONINFOEXW)), - ); - assert_eq!( - ::core::mem::align_of::<_OSVERSIONINFOEXW>(), - 4usize, - concat!("Alignment of ", stringify!(_OSVERSIONINFOEXW)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwOSVersionInfoSize) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXW), - "::", - stringify!(dwOSVersionInfoSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwMajorVersion) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXW), - "::", - stringify!(dwMajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwMinorVersion) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXW), - "::", - stringify!(dwMinorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwBuildNumber) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXW), - "::", - stringify!(dwBuildNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwPlatformId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXW), - "::", - stringify!(dwPlatformId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).szCSDVersion) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXW), - "::", - stringify!(szCSDVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).wServicePackMajor) as usize - ptr as usize - }, - 276usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXW), - "::", - stringify!(wServicePackMajor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).wServicePackMinor) as usize - ptr as usize - }, - 278usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXW), - "::", - stringify!(wServicePackMinor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wSuiteMask) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXW), - "::", - stringify!(wSuiteMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wProductType) as usize - ptr as usize }, - 282usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXW), - "::", - stringify!(wProductType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wReserved) as usize - ptr as usize }, - 283usize, - concat!( - "Offset of field: ", - stringify!(_OSVERSIONINFOEXW), - "::", - stringify!(wReserved), - ), - ); -} -impl Default for _OSVERSIONINFOEXW { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OSVERSIONINFOEXW = _OSVERSIONINFOEXW; -pub type POSVERSIONINFOEXW = *mut _OSVERSIONINFOEXW; -pub type LPOSVERSIONINFOEXW = *mut _OSVERSIONINFOEXW; -pub type RTL_OSVERSIONINFOEXW = _OSVERSIONINFOEXW; -pub type PRTL_OSVERSIONINFOEXW = *mut _OSVERSIONINFOEXW; -pub type OSVERSIONINFOEX = OSVERSIONINFOEXA; -pub type POSVERSIONINFOEX = POSVERSIONINFOEXA; -pub type LPOSVERSIONINFOEX = LPOSVERSIONINFOEXA; -pub type PFN_RTL_IS_NTDDI_VERSION_AVAILABLE = ::core::option::Option< - unsafe extern "C" fn(Version: ULONG) -> BOOLEAN, ->; -pub type PFN_RTL_IS_SERVICE_PACK_VERSION_INSTALLED = ::core::option::Option< - unsafe extern "C" fn(Version: ULONG) -> BOOLEAN, ->; -pub mod _DPFLTR_TYPE { - pub type Type = ::core::ffi::c_int; - pub const DPFLTR_SYSTEM_ID: Type = 0; - pub const DPFLTR_SMSS_ID: Type = 1; - pub const DPFLTR_SETUP_ID: Type = 2; - pub const DPFLTR_NTFS_ID: Type = 3; - pub const DPFLTR_FSTUB_ID: Type = 4; - pub const DPFLTR_CRASHDUMP_ID: Type = 5; - pub const DPFLTR_CDAUDIO_ID: Type = 6; - pub const DPFLTR_CDROM_ID: Type = 7; - pub const DPFLTR_CLASSPNP_ID: Type = 8; - pub const DPFLTR_DISK_ID: Type = 9; - pub const DPFLTR_REDBOOK_ID: Type = 10; - pub const DPFLTR_STORPROP_ID: Type = 11; - pub const DPFLTR_SCSIPORT_ID: Type = 12; - pub const DPFLTR_SCSIMINIPORT_ID: Type = 13; - pub const DPFLTR_CONFIG_ID: Type = 14; - pub const DPFLTR_I8042PRT_ID: Type = 15; - pub const DPFLTR_SERMOUSE_ID: Type = 16; - pub const DPFLTR_LSERMOUS_ID: Type = 17; - pub const DPFLTR_KBDHID_ID: Type = 18; - pub const DPFLTR_MOUHID_ID: Type = 19; - pub const DPFLTR_KBDCLASS_ID: Type = 20; - pub const DPFLTR_MOUCLASS_ID: Type = 21; - pub const DPFLTR_TWOTRACK_ID: Type = 22; - pub const DPFLTR_WMILIB_ID: Type = 23; - pub const DPFLTR_ACPI_ID: Type = 24; - pub const DPFLTR_AMLI_ID: Type = 25; - pub const DPFLTR_HALIA64_ID: Type = 26; - pub const DPFLTR_VIDEO_ID: Type = 27; - pub const DPFLTR_SVCHOST_ID: Type = 28; - pub const DPFLTR_VIDEOPRT_ID: Type = 29; - pub const DPFLTR_TCPIP_ID: Type = 30; - pub const DPFLTR_DMSYNTH_ID: Type = 31; - pub const DPFLTR_NTOSPNP_ID: Type = 32; - pub const DPFLTR_FASTFAT_ID: Type = 33; - pub const DPFLTR_SAMSS_ID: Type = 34; - pub const DPFLTR_PNPMGR_ID: Type = 35; - pub const DPFLTR_NETAPI_ID: Type = 36; - pub const DPFLTR_SCSERVER_ID: Type = 37; - pub const DPFLTR_SCCLIENT_ID: Type = 38; - pub const DPFLTR_SERIAL_ID: Type = 39; - pub const DPFLTR_SERENUM_ID: Type = 40; - pub const DPFLTR_UHCD_ID: Type = 41; - pub const DPFLTR_RPCPROXY_ID: Type = 42; - pub const DPFLTR_AUTOCHK_ID: Type = 43; - pub const DPFLTR_DCOMSS_ID: Type = 44; - pub const DPFLTR_UNIMODEM_ID: Type = 45; - pub const DPFLTR_SIS_ID: Type = 46; - pub const DPFLTR_FLTMGR_ID: Type = 47; - pub const DPFLTR_WMICORE_ID: Type = 48; - pub const DPFLTR_BURNENG_ID: Type = 49; - pub const DPFLTR_IMAPI_ID: Type = 50; - pub const DPFLTR_SXS_ID: Type = 51; - pub const DPFLTR_FUSION_ID: Type = 52; - pub const DPFLTR_IDLETASK_ID: Type = 53; - pub const DPFLTR_SOFTPCI_ID: Type = 54; - pub const DPFLTR_TAPE_ID: Type = 55; - pub const DPFLTR_MCHGR_ID: Type = 56; - pub const DPFLTR_IDEP_ID: Type = 57; - pub const DPFLTR_PCIIDE_ID: Type = 58; - pub const DPFLTR_FLOPPY_ID: Type = 59; - pub const DPFLTR_FDC_ID: Type = 60; - pub const DPFLTR_TERMSRV_ID: Type = 61; - pub const DPFLTR_W32TIME_ID: Type = 62; - pub const DPFLTR_PREFETCHER_ID: Type = 63; - pub const DPFLTR_RSFILTER_ID: Type = 64; - pub const DPFLTR_FCPORT_ID: Type = 65; - pub const DPFLTR_PCI_ID: Type = 66; - pub const DPFLTR_DMIO_ID: Type = 67; - pub const DPFLTR_DMCONFIG_ID: Type = 68; - pub const DPFLTR_DMADMIN_ID: Type = 69; - pub const DPFLTR_WSOCKTRANSPORT_ID: Type = 70; - pub const DPFLTR_VSS_ID: Type = 71; - pub const DPFLTR_PNPMEM_ID: Type = 72; - pub const DPFLTR_PROCESSOR_ID: Type = 73; - pub const DPFLTR_DMSERVER_ID: Type = 74; - pub const DPFLTR_SR_ID: Type = 75; - pub const DPFLTR_INFINIBAND_ID: Type = 76; - pub const DPFLTR_IHVDRIVER_ID: Type = 77; - pub const DPFLTR_IHVVIDEO_ID: Type = 78; - pub const DPFLTR_IHVAUDIO_ID: Type = 79; - pub const DPFLTR_IHVNETWORK_ID: Type = 80; - pub const DPFLTR_IHVSTREAMING_ID: Type = 81; - pub const DPFLTR_IHVBUS_ID: Type = 82; - pub const DPFLTR_HPS_ID: Type = 83; - pub const DPFLTR_RTLTHREADPOOL_ID: Type = 84; - pub const DPFLTR_LDR_ID: Type = 85; - pub const DPFLTR_TCPIP6_ID: Type = 86; - pub const DPFLTR_ISAPNP_ID: Type = 87; - pub const DPFLTR_SHPC_ID: Type = 88; - pub const DPFLTR_STORPORT_ID: Type = 89; - pub const DPFLTR_STORMINIPORT_ID: Type = 90; - pub const DPFLTR_PRINTSPOOLER_ID: Type = 91; - pub const DPFLTR_VSSDYNDISK_ID: Type = 92; - pub const DPFLTR_VERIFIER_ID: Type = 93; - pub const DPFLTR_VDS_ID: Type = 94; - pub const DPFLTR_VDSBAS_ID: Type = 95; - pub const DPFLTR_VDSDYN_ID: Type = 96; - pub const DPFLTR_VDSDYNDR_ID: Type = 97; - pub const DPFLTR_VDSLDR_ID: Type = 98; - pub const DPFLTR_VDSUTIL_ID: Type = 99; - pub const DPFLTR_DFRGIFC_ID: Type = 100; - pub const DPFLTR_DEFAULT_ID: Type = 101; - pub const DPFLTR_MM_ID: Type = 102; - pub const DPFLTR_DFSC_ID: Type = 103; - pub const DPFLTR_WOW64_ID: Type = 104; - pub const DPFLTR_ALPC_ID: Type = 105; - pub const DPFLTR_WDI_ID: Type = 106; - pub const DPFLTR_PERFLIB_ID: Type = 107; - pub const DPFLTR_KTM_ID: Type = 108; - pub const DPFLTR_IOSTRESS_ID: Type = 109; - pub const DPFLTR_HEAP_ID: Type = 110; - pub const DPFLTR_WHEA_ID: Type = 111; - pub const DPFLTR_USERGDI_ID: Type = 112; - pub const DPFLTR_MMCSS_ID: Type = 113; - pub const DPFLTR_TPM_ID: Type = 114; - pub const DPFLTR_THREADORDER_ID: Type = 115; - pub const DPFLTR_ENVIRON_ID: Type = 116; - pub const DPFLTR_EMS_ID: Type = 117; - pub const DPFLTR_WDT_ID: Type = 118; - pub const DPFLTR_FVEVOL_ID: Type = 119; - pub const DPFLTR_NDIS_ID: Type = 120; - pub const DPFLTR_NVCTRACE_ID: Type = 121; - pub const DPFLTR_LUAFV_ID: Type = 122; - pub const DPFLTR_APPCOMPAT_ID: Type = 123; - pub const DPFLTR_USBSTOR_ID: Type = 124; - pub const DPFLTR_SBP2PORT_ID: Type = 125; - pub const DPFLTR_COVERAGE_ID: Type = 126; - pub const DPFLTR_CACHEMGR_ID: Type = 127; - pub const DPFLTR_MOUNTMGR_ID: Type = 128; - pub const DPFLTR_CFR_ID: Type = 129; - pub const DPFLTR_TXF_ID: Type = 130; - pub const DPFLTR_KSECDD_ID: Type = 131; - pub const DPFLTR_FLTREGRESS_ID: Type = 132; - pub const DPFLTR_MPIO_ID: Type = 133; - pub const DPFLTR_MSDSM_ID: Type = 134; - pub const DPFLTR_UDFS_ID: Type = 135; - pub const DPFLTR_PSHED_ID: Type = 136; - pub const DPFLTR_STORVSP_ID: Type = 137; - pub const DPFLTR_LSASS_ID: Type = 138; - pub const DPFLTR_SSPICLI_ID: Type = 139; - pub const DPFLTR_CNG_ID: Type = 140; - pub const DPFLTR_EXFAT_ID: Type = 141; - pub const DPFLTR_FILETRACE_ID: Type = 142; - pub const DPFLTR_XSAVE_ID: Type = 143; - pub const DPFLTR_SE_ID: Type = 144; - pub const DPFLTR_DRIVEEXTENDER_ID: Type = 145; - pub const DPFLTR_POWER_ID: Type = 146; - pub const DPFLTR_CRASHDUMPXHCI_ID: Type = 147; - pub const DPFLTR_GPIO_ID: Type = 148; - pub const DPFLTR_REFS_ID: Type = 149; - pub const DPFLTR_WER_ID: Type = 150; - pub const DPFLTR_CAPIMG_ID: Type = 151; - pub const DPFLTR_VPCI_ID: Type = 152; - pub const DPFLTR_STORAGECLASSMEMORY_ID: Type = 153; - pub const DPFLTR_FSLIB_ID: Type = 154; - pub const DPFLTR_ENDOFTABLE_ID: Type = 155; -} -pub use self::_DPFLTR_TYPE::Type as DPFLTR_TYPE; -pub mod _OS_DEPLOYEMENT_STATE_VALUES { - pub type Type = ::core::ffi::c_int; - pub const OS_DEPLOYMENT_STANDARD: Type = 1; - pub const OS_DEPLOYMENT_COMPACT: Type = 2; -} -pub use self::_OS_DEPLOYEMENT_STATE_VALUES::Type as OS_DEPLOYEMENT_STATE_VALUES; -pub mod _IMAGE_POLICY_ENTRY_TYPE { - pub type Type = ::core::ffi::c_int; - pub const ImagePolicyEntryTypeNone: Type = 0; - pub const ImagePolicyEntryTypeBool: Type = 1; - pub const ImagePolicyEntryTypeInt8: Type = 2; - pub const ImagePolicyEntryTypeUInt8: Type = 3; - pub const ImagePolicyEntryTypeInt16: Type = 4; - pub const ImagePolicyEntryTypeUInt16: Type = 5; - pub const ImagePolicyEntryTypeInt32: Type = 6; - pub const ImagePolicyEntryTypeUInt32: Type = 7; - pub const ImagePolicyEntryTypeInt64: Type = 8; - pub const ImagePolicyEntryTypeUInt64: Type = 9; - pub const ImagePolicyEntryTypeAnsiString: Type = 10; - pub const ImagePolicyEntryTypeUnicodeString: Type = 11; - pub const ImagePolicyEntryTypeOverride: Type = 12; - pub const ImagePolicyEntryTypeMaximum: Type = 13; -} -pub use self::_IMAGE_POLICY_ENTRY_TYPE::Type as IMAGE_POLICY_ENTRY_TYPE; -pub mod _IMAGE_POLICY_ID { - pub type Type = ::core::ffi::c_int; - pub const ImagePolicyIdNone: Type = 0; - pub const ImagePolicyIdEtw: Type = 1; - pub const ImagePolicyIdDebug: Type = 2; - pub const ImagePolicyIdCrashDump: Type = 3; - pub const ImagePolicyIdCrashDumpKey: Type = 4; - pub const ImagePolicyIdCrashDumpKeyGuid: Type = 5; - pub const ImagePolicyIdParentSd: Type = 6; - pub const ImagePolicyIdParentSdRev: Type = 7; - pub const ImagePolicyIdSvn: Type = 8; - pub const ImagePolicyIdDeviceId: Type = 9; - pub const ImagePolicyIdCapability: Type = 10; - pub const ImagePolicyIdScenarioId: Type = 11; - pub const ImagePolicyIdMaximum: Type = 12; -} -pub use self::_IMAGE_POLICY_ID::Type as IMAGE_POLICY_ID; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IMAGE_POLICY_ENTRY { - pub Type: IMAGE_POLICY_ENTRY_TYPE, - pub PolicyId: IMAGE_POLICY_ID, - pub u: _IMAGE_POLICY_ENTRY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IMAGE_POLICY_ENTRY__bindgen_ty_1 { - pub None: *const ::core::ffi::c_void, - pub BoolValue: BOOLEAN, - pub Int8Value: INT8, - pub UInt8Value: UINT8, - pub Int16Value: INT16, - pub UInt16Value: UINT16, - pub Int32Value: INT32, - pub UInt32Value: UINT32, - pub Int64Value: INT64, - pub UInt64Value: UINT64, - pub AnsiStringValue: PCSTR, - pub UnicodeStringValue: PCWSTR, -} -#[test] -fn bindgen_test_layout__IMAGE_POLICY_ENTRY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_IMAGE_POLICY_ENTRY__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IMAGE_POLICY_ENTRY__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IMAGE_POLICY_ENTRY__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).None) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1), - "::", - stringify!(None), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BoolValue) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1), - "::", - stringify!(BoolValue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Int8Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1), - "::", - stringify!(Int8Value), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UInt8Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1), - "::", - stringify!(UInt8Value), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Int16Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1), - "::", - stringify!(Int16Value), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UInt16Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1), - "::", - stringify!(UInt16Value), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Int32Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1), - "::", - stringify!(Int32Value), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UInt32Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1), - "::", - stringify!(UInt32Value), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Int64Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1), - "::", - stringify!(Int64Value), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UInt64Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1), - "::", - stringify!(UInt64Value), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AnsiStringValue) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1), - "::", - stringify!(AnsiStringValue), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnicodeStringValue) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY__bindgen_ty_1), - "::", - stringify!(UnicodeStringValue), - ), - ); -} -impl Default for _IMAGE_POLICY_ENTRY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IMAGE_POLICY_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_IMAGE_POLICY_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IMAGE_POLICY_ENTRY>(), - 16usize, - concat!("Size of: ", stringify!(_IMAGE_POLICY_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_IMAGE_POLICY_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_IMAGE_POLICY_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PolicyId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY), - "::", - stringify!(PolicyId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_ENTRY), - "::", - stringify!(u), - ), - ); -} -impl Default for _IMAGE_POLICY_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IMAGE_POLICY_ENTRY = _IMAGE_POLICY_ENTRY; -pub type PCIMAGE_POLICY_ENTRY = *const IMAGE_POLICY_ENTRY; -#[repr(C)] -pub struct _IMAGE_POLICY_METADATA { - pub Version: UCHAR, - pub Reserved0: [UCHAR; 7usize], - pub ApplicationId: ULONGLONG, - pub Policies: __IncompleteArrayField, -} -#[test] -fn bindgen_test_layout__IMAGE_POLICY_METADATA() { - const UNINIT: ::core::mem::MaybeUninit<_IMAGE_POLICY_METADATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IMAGE_POLICY_METADATA>(), - 16usize, - concat!("Size of: ", stringify!(_IMAGE_POLICY_METADATA)), - ); - assert_eq!( - ::core::mem::align_of::<_IMAGE_POLICY_METADATA>(), - 8usize, - concat!("Alignment of ", stringify!(_IMAGE_POLICY_METADATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_METADATA), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved0) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_METADATA), - "::", - stringify!(Reserved0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ApplicationId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_METADATA), - "::", - stringify!(ApplicationId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Policies) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_POLICY_METADATA), - "::", - stringify!(Policies), - ), - ); -} -impl Default for _IMAGE_POLICY_METADATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IMAGE_POLICY_METADATA = _IMAGE_POLICY_METADATA; -pub type PCIMAGE_POLICY_METADATA = *const IMAGE_POLICY_METADATA; -pub type UOW = GUID; -pub type PUOW = *mut GUID; -pub type CRM_PROTOCOL_ID = GUID; -pub type PCRM_PROTOCOL_ID = *mut GUID; -pub type NOTIFICATION_MASK = ULONG; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _TRANSACTION_NOTIFICATION { - pub TransactionKey: PVOID, - pub TransactionNotification: ULONG, - pub TmVirtualClock: LARGE_INTEGER, - pub ArgumentLength: ULONG, -} -#[test] -fn bindgen_test_layout__TRANSACTION_NOTIFICATION() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSACTION_NOTIFICATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_NOTIFICATION>(), - 32usize, - concat!("Size of: ", stringify!(_TRANSACTION_NOTIFICATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_NOTIFICATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TRANSACTION_NOTIFICATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TransactionKey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION), - "::", - stringify!(TransactionKey), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TransactionNotification) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION), - "::", - stringify!(TransactionNotification), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TmVirtualClock) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION), - "::", - stringify!(TmVirtualClock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ArgumentLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION), - "::", - stringify!(ArgumentLength), - ), - ); -} -impl Default for _TRANSACTION_NOTIFICATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TRANSACTION_NOTIFICATION = _TRANSACTION_NOTIFICATION; -pub type PTRANSACTION_NOTIFICATION = *mut _TRANSACTION_NOTIFICATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT { - pub EnlistmentId: GUID, - pub UOW: UOW, -} -#[test] -fn bindgen_test_layout__TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT() { - const UNINIT: ::core::mem::MaybeUninit< - _TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT>(), - 32usize, - concat!("Size of: ", stringify!(_TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT>(), - 4usize, - concat!("Alignment of ", stringify!(_TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EnlistmentId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT), - "::", - stringify!(EnlistmentId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UOW) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT), - "::", - stringify!(UOW), - ), - ); -} -pub type TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT = _TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT; -pub type PTRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT = *mut _TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT { - pub TmIdentity: GUID, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT() { - const UNINIT: ::core::mem::MaybeUninit< - _TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT>(), - 20usize, - concat!("Size of: ", stringify!(_TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TmIdentity) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT), - "::", - stringify!(TmIdentity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT), - "::", - stringify!(Flags), - ), - ); -} -pub type TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT = _TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT; -pub type PTRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT = *mut _TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT; -pub type SAVEPOINT_ID = ULONG; -pub type PSAVEPOINT_ID = *mut ULONG; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT { - pub SavepointId: SAVEPOINT_ID, -} -#[test] -fn bindgen_test_layout__TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT() { - const UNINIT: ::core::mem::MaybeUninit< - _TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT>(), - 4usize, - concat!("Size of: ", stringify!(_TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SavepointId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT), - "::", - stringify!(SavepointId), - ), - ); -} -pub type TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT = _TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT; -pub type PTRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT = *mut _TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT { - pub PropagationCookie: ULONG, - pub UOW: GUID, - pub TmIdentity: GUID, - pub BufferLength: ULONG, -} -#[test] -fn bindgen_test_layout__TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT() { - const UNINIT: ::core::mem::MaybeUninit< - _TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT>(), - 40usize, - concat!("Size of: ", stringify!(_TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PropagationCookie) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT), - "::", - stringify!(PropagationCookie), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UOW) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT), - "::", - stringify!(UOW), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TmIdentity) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT), - "::", - stringify!(TmIdentity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BufferLength) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT), - "::", - stringify!(BufferLength), - ), - ); -} -pub type TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT = _TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT; -pub type PTRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT = *mut _TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT { - pub MarshalCookie: ULONG, - pub UOW: GUID, -} -#[test] -fn bindgen_test_layout__TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT>(), - 20usize, - concat!("Size of: ", stringify!(_TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT>(), - 4usize, - concat!("Alignment of ", stringify!(_TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MarshalCookie) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT), - "::", - stringify!(MarshalCookie), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UOW) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT), - "::", - stringify!(UOW), - ), - ); -} -pub type TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT = _TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT; -pub type PTRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT = *mut _TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT; -pub type TRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT = TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT; -pub type PTRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT = *mut TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KCRM_MARSHAL_HEADER { - pub VersionMajor: ULONG, - pub VersionMinor: ULONG, - pub NumProtocols: ULONG, - pub Unused: ULONG, -} -#[test] -fn bindgen_test_layout__KCRM_MARSHAL_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_KCRM_MARSHAL_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KCRM_MARSHAL_HEADER>(), - 16usize, - concat!("Size of: ", stringify!(_KCRM_MARSHAL_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_KCRM_MARSHAL_HEADER>(), - 4usize, - concat!("Alignment of ", stringify!(_KCRM_MARSHAL_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VersionMajor) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_MARSHAL_HEADER), - "::", - stringify!(VersionMajor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VersionMinor) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_MARSHAL_HEADER), - "::", - stringify!(VersionMinor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumProtocols) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_MARSHAL_HEADER), - "::", - stringify!(NumProtocols), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_MARSHAL_HEADER), - "::", - stringify!(Unused), - ), - ); -} -pub type KCRM_MARSHAL_HEADER = _KCRM_MARSHAL_HEADER; -pub type PKCRM_MARSHAL_HEADER = *mut _KCRM_MARSHAL_HEADER; -pub type PRKCRM_MARSHAL_HEADER = *mut _KCRM_MARSHAL_HEADER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KCRM_TRANSACTION_BLOB { - pub UOW: UOW, - pub TmIdentity: GUID, - pub IsolationLevel: ULONG, - pub IsolationFlags: ULONG, - pub Timeout: ULONG, - pub Description: [WCHAR; 64usize], -} -#[test] -fn bindgen_test_layout__KCRM_TRANSACTION_BLOB() { - const UNINIT: ::core::mem::MaybeUninit<_KCRM_TRANSACTION_BLOB> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KCRM_TRANSACTION_BLOB>(), - 172usize, - concat!("Size of: ", stringify!(_KCRM_TRANSACTION_BLOB)), - ); - assert_eq!( - ::core::mem::align_of::<_KCRM_TRANSACTION_BLOB>(), - 4usize, - concat!("Alignment of ", stringify!(_KCRM_TRANSACTION_BLOB)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UOW) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_TRANSACTION_BLOB), - "::", - stringify!(UOW), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TmIdentity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_TRANSACTION_BLOB), - "::", - stringify!(TmIdentity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsolationLevel) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_TRANSACTION_BLOB), - "::", - stringify!(IsolationLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsolationFlags) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_TRANSACTION_BLOB), - "::", - stringify!(IsolationFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Timeout) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_TRANSACTION_BLOB), - "::", - stringify!(Timeout), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Description) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_TRANSACTION_BLOB), - "::", - stringify!(Description), - ), - ); -} -impl Default for _KCRM_TRANSACTION_BLOB { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KCRM_TRANSACTION_BLOB = _KCRM_TRANSACTION_BLOB; -pub type PKCRM_TRANSACTION_BLOB = *mut _KCRM_TRANSACTION_BLOB; -pub type PRKCRM_TRANSACTION_BLOB = *mut _KCRM_TRANSACTION_BLOB; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KCRM_PROTOCOL_BLOB { - pub ProtocolId: CRM_PROTOCOL_ID, - pub StaticInfoLength: ULONG, - pub TransactionIdInfoLength: ULONG, - pub Unused1: ULONG, - pub Unused2: ULONG, -} -#[test] -fn bindgen_test_layout__KCRM_PROTOCOL_BLOB() { - const UNINIT: ::core::mem::MaybeUninit<_KCRM_PROTOCOL_BLOB> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KCRM_PROTOCOL_BLOB>(), - 32usize, - concat!("Size of: ", stringify!(_KCRM_PROTOCOL_BLOB)), - ); - assert_eq!( - ::core::mem::align_of::<_KCRM_PROTOCOL_BLOB>(), - 4usize, - concat!("Alignment of ", stringify!(_KCRM_PROTOCOL_BLOB)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProtocolId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_PROTOCOL_BLOB), - "::", - stringify!(ProtocolId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StaticInfoLength) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_PROTOCOL_BLOB), - "::", - stringify!(StaticInfoLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TransactionIdInfoLength) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_PROTOCOL_BLOB), - "::", - stringify!(TransactionIdInfoLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused1) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_PROTOCOL_BLOB), - "::", - stringify!(Unused1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused2) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_KCRM_PROTOCOL_BLOB), - "::", - stringify!(Unused2), - ), - ); -} -pub type KCRM_PROTOCOL_BLOB = _KCRM_PROTOCOL_BLOB; -pub type PKCRM_PROTOCOL_BLOB = *mut _KCRM_PROTOCOL_BLOB; -pub type PRKCRM_PROTOCOL_BLOB = *mut _KCRM_PROTOCOL_BLOB; -pub mod _TRANSACTION_OUTCOME { - pub type Type = ::core::ffi::c_int; - pub const TransactionOutcomeUndetermined: Type = 1; - pub const TransactionOutcomeCommitted: Type = 2; - pub const TransactionOutcomeAborted: Type = 3; -} -pub use self::_TRANSACTION_OUTCOME::Type as TRANSACTION_OUTCOME; -pub mod _TRANSACTION_STATE { - pub type Type = ::core::ffi::c_int; - pub const TransactionStateNormal: Type = 1; - pub const TransactionStateIndoubt: Type = 2; - pub const TransactionStateCommittedNotify: Type = 3; -} -pub use self::_TRANSACTION_STATE::Type as TRANSACTION_STATE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTION_BASIC_INFORMATION { - pub TransactionId: GUID, - pub State: ULONG, - pub Outcome: ULONG, -} -#[test] -fn bindgen_test_layout__TRANSACTION_BASIC_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSACTION_BASIC_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_BASIC_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_TRANSACTION_BASIC_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_BASIC_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_TRANSACTION_BASIC_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TransactionId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_BASIC_INFORMATION), - "::", - stringify!(TransactionId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).State) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_BASIC_INFORMATION), - "::", - stringify!(State), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Outcome) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_BASIC_INFORMATION), - "::", - stringify!(Outcome), - ), - ); -} -pub type TRANSACTION_BASIC_INFORMATION = _TRANSACTION_BASIC_INFORMATION; -pub type PTRANSACTION_BASIC_INFORMATION = *mut _TRANSACTION_BASIC_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _TRANSACTIONMANAGER_BASIC_INFORMATION { - pub TmIdentity: GUID, - pub VirtualClock: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__TRANSACTIONMANAGER_BASIC_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSACTIONMANAGER_BASIC_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTIONMANAGER_BASIC_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_TRANSACTIONMANAGER_BASIC_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTIONMANAGER_BASIC_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TRANSACTIONMANAGER_BASIC_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TmIdentity) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTIONMANAGER_BASIC_INFORMATION), - "::", - stringify!(TmIdentity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VirtualClock) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTIONMANAGER_BASIC_INFORMATION), - "::", - stringify!(VirtualClock), - ), - ); -} -impl Default for _TRANSACTIONMANAGER_BASIC_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TRANSACTIONMANAGER_BASIC_INFORMATION = _TRANSACTIONMANAGER_BASIC_INFORMATION; -pub type PTRANSACTIONMANAGER_BASIC_INFORMATION = *mut _TRANSACTIONMANAGER_BASIC_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTIONMANAGER_LOG_INFORMATION { - pub LogIdentity: GUID, -} -#[test] -fn bindgen_test_layout__TRANSACTIONMANAGER_LOG_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSACTIONMANAGER_LOG_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTIONMANAGER_LOG_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_TRANSACTIONMANAGER_LOG_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTIONMANAGER_LOG_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_TRANSACTIONMANAGER_LOG_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogIdentity) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTIONMANAGER_LOG_INFORMATION), - "::", - stringify!(LogIdentity), - ), - ); -} -pub type TRANSACTIONMANAGER_LOG_INFORMATION = _TRANSACTIONMANAGER_LOG_INFORMATION; -pub type PTRANSACTIONMANAGER_LOG_INFORMATION = *mut _TRANSACTIONMANAGER_LOG_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTIONMANAGER_LOGPATH_INFORMATION { - pub LogPathLength: ULONG, - pub LogPath: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__TRANSACTIONMANAGER_LOGPATH_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSACTIONMANAGER_LOGPATH_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTIONMANAGER_LOGPATH_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_TRANSACTIONMANAGER_LOGPATH_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTIONMANAGER_LOGPATH_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_TRANSACTIONMANAGER_LOGPATH_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogPathLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTIONMANAGER_LOGPATH_INFORMATION), - "::", - stringify!(LogPathLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogPath) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTIONMANAGER_LOGPATH_INFORMATION), - "::", - stringify!(LogPath), - ), - ); -} -pub type TRANSACTIONMANAGER_LOGPATH_INFORMATION = _TRANSACTIONMANAGER_LOGPATH_INFORMATION; -pub type PTRANSACTIONMANAGER_LOGPATH_INFORMATION = *mut _TRANSACTIONMANAGER_LOGPATH_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTIONMANAGER_RECOVERY_INFORMATION { - pub LastRecoveredLsn: ULONGLONG, -} -#[test] -fn bindgen_test_layout__TRANSACTIONMANAGER_RECOVERY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSACTIONMANAGER_RECOVERY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTIONMANAGER_RECOVERY_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_TRANSACTIONMANAGER_RECOVERY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTIONMANAGER_RECOVERY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TRANSACTIONMANAGER_RECOVERY_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastRecoveredLsn) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTIONMANAGER_RECOVERY_INFORMATION), - "::", - stringify!(LastRecoveredLsn), - ), - ); -} -pub type TRANSACTIONMANAGER_RECOVERY_INFORMATION = _TRANSACTIONMANAGER_RECOVERY_INFORMATION; -pub type PTRANSACTIONMANAGER_RECOVERY_INFORMATION = *mut _TRANSACTIONMANAGER_RECOVERY_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _TRANSACTION_PROPERTIES_INFORMATION { - pub IsolationLevel: ULONG, - pub IsolationFlags: ULONG, - pub Timeout: LARGE_INTEGER, - pub Outcome: ULONG, - pub DescriptionLength: ULONG, - pub Description: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__TRANSACTION_PROPERTIES_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSACTION_PROPERTIES_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_PROPERTIES_INFORMATION>(), - 32usize, - concat!("Size of: ", stringify!(_TRANSACTION_PROPERTIES_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_PROPERTIES_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TRANSACTION_PROPERTIES_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsolationLevel) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_PROPERTIES_INFORMATION), - "::", - stringify!(IsolationLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsolationFlags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_PROPERTIES_INFORMATION), - "::", - stringify!(IsolationFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Timeout) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_PROPERTIES_INFORMATION), - "::", - stringify!(Timeout), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Outcome) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_PROPERTIES_INFORMATION), - "::", - stringify!(Outcome), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DescriptionLength) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_PROPERTIES_INFORMATION), - "::", - stringify!(DescriptionLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Description) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_PROPERTIES_INFORMATION), - "::", - stringify!(Description), - ), - ); -} -impl Default for _TRANSACTION_PROPERTIES_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TRANSACTION_PROPERTIES_INFORMATION = _TRANSACTION_PROPERTIES_INFORMATION; -pub type PTRANSACTION_PROPERTIES_INFORMATION = *mut _TRANSACTION_PROPERTIES_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TRANSACTION_BIND_INFORMATION { - pub TmHandle: HANDLE, -} -#[test] -fn bindgen_test_layout__TRANSACTION_BIND_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSACTION_BIND_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_BIND_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_TRANSACTION_BIND_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_BIND_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TRANSACTION_BIND_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TmHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_BIND_INFORMATION), - "::", - stringify!(TmHandle), - ), - ); -} -impl Default for _TRANSACTION_BIND_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TRANSACTION_BIND_INFORMATION = _TRANSACTION_BIND_INFORMATION; -pub type PTRANSACTION_BIND_INFORMATION = *mut _TRANSACTION_BIND_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTION_ENLISTMENT_PAIR { - pub EnlistmentId: GUID, - pub ResourceManagerId: GUID, -} -#[test] -fn bindgen_test_layout__TRANSACTION_ENLISTMENT_PAIR() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSACTION_ENLISTMENT_PAIR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_ENLISTMENT_PAIR>(), - 32usize, - concat!("Size of: ", stringify!(_TRANSACTION_ENLISTMENT_PAIR)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_ENLISTMENT_PAIR>(), - 4usize, - concat!("Alignment of ", stringify!(_TRANSACTION_ENLISTMENT_PAIR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EnlistmentId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_ENLISTMENT_PAIR), - "::", - stringify!(EnlistmentId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ResourceManagerId) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_ENLISTMENT_PAIR), - "::", - stringify!(ResourceManagerId), - ), - ); -} -pub type TRANSACTION_ENLISTMENT_PAIR = _TRANSACTION_ENLISTMENT_PAIR; -pub type PTRANSACTION_ENLISTMENT_PAIR = *mut _TRANSACTION_ENLISTMENT_PAIR; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTION_ENLISTMENTS_INFORMATION { - pub NumberOfEnlistments: ULONG, - pub EnlistmentPair: [TRANSACTION_ENLISTMENT_PAIR; 1usize], -} -#[test] -fn bindgen_test_layout__TRANSACTION_ENLISTMENTS_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSACTION_ENLISTMENTS_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_ENLISTMENTS_INFORMATION>(), - 36usize, - concat!("Size of: ", stringify!(_TRANSACTION_ENLISTMENTS_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_ENLISTMENTS_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_TRANSACTION_ENLISTMENTS_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfEnlistments) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_ENLISTMENTS_INFORMATION), - "::", - stringify!(NumberOfEnlistments), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EnlistmentPair) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_ENLISTMENTS_INFORMATION), - "::", - stringify!(EnlistmentPair), - ), - ); -} -pub type TRANSACTION_ENLISTMENTS_INFORMATION = _TRANSACTION_ENLISTMENTS_INFORMATION; -pub type PTRANSACTION_ENLISTMENTS_INFORMATION = *mut _TRANSACTION_ENLISTMENTS_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION { - pub SuperiorEnlistmentPair: TRANSACTION_ENLISTMENT_PAIR, -} -#[test] -fn bindgen_test_layout__TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit< - _TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION>(), - 32usize, - concat!("Size of: ", stringify!(_TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SuperiorEnlistmentPair) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION), - "::", - stringify!(SuperiorEnlistmentPair), - ), - ); -} -pub type TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION = _TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION; -pub type PTRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION = *mut _TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _RESOURCEMANAGER_BASIC_INFORMATION { - pub ResourceManagerId: GUID, - pub DescriptionLength: ULONG, - pub Description: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__RESOURCEMANAGER_BASIC_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_RESOURCEMANAGER_BASIC_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RESOURCEMANAGER_BASIC_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_RESOURCEMANAGER_BASIC_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_RESOURCEMANAGER_BASIC_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_RESOURCEMANAGER_BASIC_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ResourceManagerId) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCEMANAGER_BASIC_INFORMATION), - "::", - stringify!(ResourceManagerId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DescriptionLength) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCEMANAGER_BASIC_INFORMATION), - "::", - stringify!(DescriptionLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Description) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCEMANAGER_BASIC_INFORMATION), - "::", - stringify!(Description), - ), - ); -} -pub type RESOURCEMANAGER_BASIC_INFORMATION = _RESOURCEMANAGER_BASIC_INFORMATION; -pub type PRESOURCEMANAGER_BASIC_INFORMATION = *mut _RESOURCEMANAGER_BASIC_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RESOURCEMANAGER_COMPLETION_INFORMATION { - pub IoCompletionPortHandle: HANDLE, - pub CompletionKey: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__RESOURCEMANAGER_COMPLETION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_RESOURCEMANAGER_COMPLETION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RESOURCEMANAGER_COMPLETION_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_RESOURCEMANAGER_COMPLETION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_RESOURCEMANAGER_COMPLETION_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_RESOURCEMANAGER_COMPLETION_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IoCompletionPortHandle) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCEMANAGER_COMPLETION_INFORMATION), - "::", - stringify!(IoCompletionPortHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompletionKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCEMANAGER_COMPLETION_INFORMATION), - "::", - stringify!(CompletionKey), - ), - ); -} -impl Default for _RESOURCEMANAGER_COMPLETION_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RESOURCEMANAGER_COMPLETION_INFORMATION = _RESOURCEMANAGER_COMPLETION_INFORMATION; -pub type PRESOURCEMANAGER_COMPLETION_INFORMATION = *mut _RESOURCEMANAGER_COMPLETION_INFORMATION; -pub mod _TRANSACTION_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const TransactionBasicInformation: Type = 0; - pub const TransactionPropertiesInformation: Type = 1; - pub const TransactionEnlistmentInformation: Type = 2; - pub const TransactionSuperiorEnlistmentInformation: Type = 3; -} -pub use self::_TRANSACTION_INFORMATION_CLASS::Type as TRANSACTION_INFORMATION_CLASS; -pub mod _TRANSACTIONMANAGER_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const TransactionManagerBasicInformation: Type = 0; - pub const TransactionManagerLogInformation: Type = 1; - pub const TransactionManagerLogPathInformation: Type = 2; - pub const TransactionManagerRecoveryInformation: Type = 4; -} -pub use self::_TRANSACTIONMANAGER_INFORMATION_CLASS::Type as TRANSACTIONMANAGER_INFORMATION_CLASS; -pub mod _RESOURCEMANAGER_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const ResourceManagerBasicInformation: Type = 0; - pub const ResourceManagerCompletionInformation: Type = 1; -} -pub use self::_RESOURCEMANAGER_INFORMATION_CLASS::Type as RESOURCEMANAGER_INFORMATION_CLASS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ENLISTMENT_BASIC_INFORMATION { - pub EnlistmentId: GUID, - pub TransactionId: GUID, - pub ResourceManagerId: GUID, -} -#[test] -fn bindgen_test_layout__ENLISTMENT_BASIC_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_ENLISTMENT_BASIC_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ENLISTMENT_BASIC_INFORMATION>(), - 48usize, - concat!("Size of: ", stringify!(_ENLISTMENT_BASIC_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_ENLISTMENT_BASIC_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_ENLISTMENT_BASIC_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EnlistmentId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ENLISTMENT_BASIC_INFORMATION), - "::", - stringify!(EnlistmentId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TransactionId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ENLISTMENT_BASIC_INFORMATION), - "::", - stringify!(TransactionId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ResourceManagerId) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_ENLISTMENT_BASIC_INFORMATION), - "::", - stringify!(ResourceManagerId), - ), - ); -} -pub type ENLISTMENT_BASIC_INFORMATION = _ENLISTMENT_BASIC_INFORMATION; -pub type PENLISTMENT_BASIC_INFORMATION = *mut _ENLISTMENT_BASIC_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ENLISTMENT_CRM_INFORMATION { - pub CrmTransactionManagerId: GUID, - pub CrmResourceManagerId: GUID, - pub CrmEnlistmentId: GUID, -} -#[test] -fn bindgen_test_layout__ENLISTMENT_CRM_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_ENLISTMENT_CRM_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ENLISTMENT_CRM_INFORMATION>(), - 48usize, - concat!("Size of: ", stringify!(_ENLISTMENT_CRM_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_ENLISTMENT_CRM_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_ENLISTMENT_CRM_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CrmTransactionManagerId) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ENLISTMENT_CRM_INFORMATION), - "::", - stringify!(CrmTransactionManagerId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CrmResourceManagerId) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ENLISTMENT_CRM_INFORMATION), - "::", - stringify!(CrmResourceManagerId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CrmEnlistmentId) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_ENLISTMENT_CRM_INFORMATION), - "::", - stringify!(CrmEnlistmentId), - ), - ); -} -pub type ENLISTMENT_CRM_INFORMATION = _ENLISTMENT_CRM_INFORMATION; -pub type PENLISTMENT_CRM_INFORMATION = *mut _ENLISTMENT_CRM_INFORMATION; -pub mod _ENLISTMENT_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const EnlistmentBasicInformation: Type = 0; - pub const EnlistmentRecoveryInformation: Type = 1; - pub const EnlistmentCrmInformation: Type = 2; -} -pub use self::_ENLISTMENT_INFORMATION_CLASS::Type as ENLISTMENT_INFORMATION_CLASS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTION_LIST_ENTRY { - pub UOW: UOW, -} -#[test] -fn bindgen_test_layout__TRANSACTION_LIST_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSACTION_LIST_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_LIST_ENTRY>(), - 16usize, - concat!("Size of: ", stringify!(_TRANSACTION_LIST_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_LIST_ENTRY>(), - 4usize, - concat!("Alignment of ", stringify!(_TRANSACTION_LIST_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UOW) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_LIST_ENTRY), - "::", - stringify!(UOW), - ), - ); -} -pub type TRANSACTION_LIST_ENTRY = _TRANSACTION_LIST_ENTRY; -pub type PTRANSACTION_LIST_ENTRY = *mut _TRANSACTION_LIST_ENTRY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TRANSACTION_LIST_INFORMATION { - pub NumberOfTransactions: ULONG, - pub TransactionInformation: [TRANSACTION_LIST_ENTRY; 1usize], -} -#[test] -fn bindgen_test_layout__TRANSACTION_LIST_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSACTION_LIST_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSACTION_LIST_INFORMATION>(), - 20usize, - concat!("Size of: ", stringify!(_TRANSACTION_LIST_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSACTION_LIST_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_TRANSACTION_LIST_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfTransactions) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_LIST_INFORMATION), - "::", - stringify!(NumberOfTransactions), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TransactionInformation) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_TRANSACTION_LIST_INFORMATION), - "::", - stringify!(TransactionInformation), - ), - ); -} -pub type TRANSACTION_LIST_INFORMATION = _TRANSACTION_LIST_INFORMATION; -pub type PTRANSACTION_LIST_INFORMATION = *mut _TRANSACTION_LIST_INFORMATION; -pub mod _KTMOBJECT_TYPE { - pub type Type = ::core::ffi::c_int; - pub const KTMOBJECT_TRANSACTION: Type = 0; - pub const KTMOBJECT_TRANSACTION_MANAGER: Type = 1; - pub const KTMOBJECT_RESOURCE_MANAGER: Type = 2; - pub const KTMOBJECT_ENLISTMENT: Type = 3; - pub const KTMOBJECT_INVALID: Type = 4; -} -pub use self::_KTMOBJECT_TYPE::Type as KTMOBJECT_TYPE; -pub type PKTMOBJECT_TYPE = *mut _KTMOBJECT_TYPE::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KTMOBJECT_CURSOR { - pub LastQuery: GUID, - pub ObjectIdCount: ULONG, - pub ObjectIds: [GUID; 1usize], -} -#[test] -fn bindgen_test_layout__KTMOBJECT_CURSOR() { - const UNINIT: ::core::mem::MaybeUninit<_KTMOBJECT_CURSOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KTMOBJECT_CURSOR>(), - 36usize, - concat!("Size of: ", stringify!(_KTMOBJECT_CURSOR)), - ); - assert_eq!( - ::core::mem::align_of::<_KTMOBJECT_CURSOR>(), - 4usize, - concat!("Alignment of ", stringify!(_KTMOBJECT_CURSOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastQuery) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KTMOBJECT_CURSOR), - "::", - stringify!(LastQuery), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectIdCount) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KTMOBJECT_CURSOR), - "::", - stringify!(ObjectIdCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectIds) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_KTMOBJECT_CURSOR), - "::", - stringify!(ObjectIds), - ), - ); -} -pub type KTMOBJECT_CURSOR = _KTMOBJECT_CURSOR; -pub type PKTMOBJECT_CURSOR = *mut _KTMOBJECT_CURSOR; -pub type PFN_NT_CREATE_TRANSACTION = ::core::option::Option< - unsafe extern "C" fn( - TransactionHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - Uow: LPGUID, - TmHandle: HANDLE, - CreateOptions: ULONG, - IsolationLevel: ULONG, - IsolationFlags: ULONG, - Timeout: PLARGE_INTEGER, - Description: PUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_NT_OPEN_TRANSACTION = ::core::option::Option< - unsafe extern "C" fn( - TransactionHandle: PHANDLE, - DesiredAccess: ACCESS_MASK, - ObjectAttributes: POBJECT_ATTRIBUTES, - Uow: LPGUID, - TmHandle: HANDLE, - ) -> NTSTATUS, ->; -pub type PFN_NT_QUERY_INFORMATION_TRANSACTION = ::core::option::Option< - unsafe extern "C" fn( - TransactionHandle: HANDLE, - TransactionInformationClass: TRANSACTION_INFORMATION_CLASS, - TransactionInformation: PVOID, - TransactionInformationLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS, ->; -pub type PFN_NT_SET_INFORMATION_TRANSACTION = ::core::option::Option< - unsafe extern "C" fn( - TransactionHandle: HANDLE, - TransactionInformationClass: TRANSACTION_INFORMATION_CLASS, - TransactionInformation: PVOID, - TransactionInformationLength: ULONG, - ) -> NTSTATUS, ->; -pub type PFN_NT_COMMIT_TRANSACTION = ::core::option::Option< - unsafe extern "C" fn(TransactionHandle: HANDLE, Wait: BOOLEAN) -> NTSTATUS, ->; -pub type PFN_NT_ROLLBACK_TRANSACTION = ::core::option::Option< - unsafe extern "C" fn(TransactionHandle: HANDLE, Wait: BOOLEAN) -> NTSTATUS, ->; -pub use self::_POOL_TYPE::Type as POOL_TYPE; -pub type POOL_FLAGS = ULONG64; -pub type ALLOCATE_FUNCTION = ::core::option::Option< - unsafe extern "C" fn(PoolType: POOL_TYPE, NumberOfBytes: SIZE_T, Tag: ULONG) -> PVOID, ->; -pub type PALLOCATE_FUNCTION = ALLOCATE_FUNCTION; -pub type FREE_FUNCTION = ::core::option::Option; -pub type PFREE_FUNCTION = FREE_FUNCTION; -pub type PLOOKASIDE_LIST_EX = *mut _LOOKASIDE_LIST_EX; -pub type ALLOCATE_FUNCTION_EX = ::core::option::Option< - unsafe extern "C" fn( - PoolType: POOL_TYPE, - NumberOfBytes: SIZE_T, - Tag: ULONG, - Lookaside: PLOOKASIDE_LIST_EX, - ) -> PVOID, ->; -pub type PALLOCATE_FUNCTION_EX = ALLOCATE_FUNCTION_EX; -pub type FREE_FUNCTION_EX = ::core::option::Option< - unsafe extern "C" fn(Buffer: PVOID, Lookaside: PLOOKASIDE_LIST_EX), ->; -pub type PFREE_FUNCTION_EX = FREE_FUNCTION_EX; -#[repr(C)] -#[repr(align(64))] -#[derive(Copy, Clone)] -pub struct _GENERAL_LOOKASIDE { - pub __bindgen_anon_1: _GENERAL_LOOKASIDE__bindgen_ty_1, - pub Depth: USHORT, - pub MaximumDepth: USHORT, - pub TotalAllocates: ULONG, - pub __bindgen_anon_2: _GENERAL_LOOKASIDE__bindgen_ty_2, - pub TotalFrees: ULONG, - pub __bindgen_anon_3: _GENERAL_LOOKASIDE__bindgen_ty_3, - pub Type: POOL_TYPE, - pub Tag: ULONG, - pub Size: ULONG, - pub __bindgen_anon_4: _GENERAL_LOOKASIDE__bindgen_ty_4, - pub __bindgen_anon_5: _GENERAL_LOOKASIDE__bindgen_ty_5, - pub ListEntry: LIST_ENTRY, - pub LastTotalAllocates: ULONG, - pub __bindgen_anon_6: _GENERAL_LOOKASIDE__bindgen_ty_6, - pub Future: [ULONG; 2usize], -} -#[repr(C)] -#[repr(align(16))] -#[derive(Copy, Clone)] -pub union _GENERAL_LOOKASIDE__bindgen_ty_1 { - pub ListHead: SLIST_HEADER, - pub SingleListHead: SINGLE_LIST_ENTRY, -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE__bindgen_ty_1>(), - 16usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ListHead) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE__bindgen_ty_1), - "::", - stringify!(ListHead), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SingleListHead) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE__bindgen_ty_1), - "::", - stringify!(SingleListHead), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _GENERAL_LOOKASIDE__bindgen_ty_2 { - pub AllocateMisses: ULONG, - pub AllocateHits: ULONG, -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE__bindgen_ty_2>(), - 4usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE__bindgen_ty_2>(), - 4usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocateMisses) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE__bindgen_ty_2), - "::", - stringify!(AllocateMisses), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocateHits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE__bindgen_ty_2), - "::", - stringify!(AllocateHits), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _GENERAL_LOOKASIDE__bindgen_ty_3 { - pub FreeMisses: ULONG, - pub FreeHits: ULONG, -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE__bindgen_ty_3> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE__bindgen_ty_3>(), - 4usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE__bindgen_ty_3>(), - 4usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE__bindgen_ty_3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeMisses) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE__bindgen_ty_3), - "::", - stringify!(FreeMisses), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeHits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE__bindgen_ty_3), - "::", - stringify!(FreeHits), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _GENERAL_LOOKASIDE__bindgen_ty_4 { - pub AllocateEx: PALLOCATE_FUNCTION_EX, - pub Allocate: PALLOCATE_FUNCTION, -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE__bindgen_ty_4> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE__bindgen_ty_4>(), - 8usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE__bindgen_ty_4)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE__bindgen_ty_4>(), - 8usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE__bindgen_ty_4)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocateEx) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE__bindgen_ty_4), - "::", - stringify!(AllocateEx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Allocate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE__bindgen_ty_4), - "::", - stringify!(Allocate), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE__bindgen_ty_4 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _GENERAL_LOOKASIDE__bindgen_ty_5 { - pub FreeEx: PFREE_FUNCTION_EX, - pub Free: PFREE_FUNCTION, -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE__bindgen_ty_5> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE__bindgen_ty_5>(), - 8usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE__bindgen_ty_5)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE__bindgen_ty_5>(), - 8usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE__bindgen_ty_5)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeEx) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE__bindgen_ty_5), - "::", - stringify!(FreeEx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Free) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE__bindgen_ty_5), - "::", - stringify!(Free), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE__bindgen_ty_5 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _GENERAL_LOOKASIDE__bindgen_ty_6 { - pub LastAllocateMisses: ULONG, - pub LastAllocateHits: ULONG, -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE__bindgen_ty_6() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE__bindgen_ty_6> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE__bindgen_ty_6>(), - 4usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE__bindgen_ty_6)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE__bindgen_ty_6>(), - 4usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE__bindgen_ty_6)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastAllocateMisses) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE__bindgen_ty_6), - "::", - stringify!(LastAllocateMisses), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastAllocateHits) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE__bindgen_ty_6), - "::", - stringify!(LastAllocateHits), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE__bindgen_ty_6 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE>(), - 128usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE>(), - 64usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Depth) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE), - "::", - stringify!(Depth), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumDepth) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE), - "::", - stringify!(MaximumDepth), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalAllocates) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE), - "::", - stringify!(TotalAllocates), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalFrees) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE), - "::", - stringify!(TotalFrees), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Tag) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE), - "::", - stringify!(Tag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ListEntry) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE), - "::", - stringify!(ListEntry), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastTotalAllocates) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE), - "::", - stringify!(LastTotalAllocates), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Future) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE), - "::", - stringify!(Future), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type GENERAL_LOOKASIDE = _GENERAL_LOOKASIDE; -pub type PGENERAL_LOOKASIDE = *mut GENERAL_LOOKASIDE; -#[repr(C)] -#[repr(align(16))] -#[derive(Copy, Clone)] -pub struct _GENERAL_LOOKASIDE_POOL { - pub __bindgen_anon_1: _GENERAL_LOOKASIDE_POOL__bindgen_ty_1, - pub Depth: USHORT, - pub MaximumDepth: USHORT, - pub TotalAllocates: ULONG, - pub __bindgen_anon_2: _GENERAL_LOOKASIDE_POOL__bindgen_ty_2, - pub TotalFrees: ULONG, - pub __bindgen_anon_3: _GENERAL_LOOKASIDE_POOL__bindgen_ty_3, - pub Type: POOL_TYPE, - pub Tag: ULONG, - pub Size: ULONG, - pub __bindgen_anon_4: _GENERAL_LOOKASIDE_POOL__bindgen_ty_4, - pub __bindgen_anon_5: _GENERAL_LOOKASIDE_POOL__bindgen_ty_5, - pub ListEntry: LIST_ENTRY, - pub LastTotalAllocates: ULONG, - pub __bindgen_anon_6: _GENERAL_LOOKASIDE_POOL__bindgen_ty_6, - pub Future: [ULONG; 2usize], -} -#[repr(C)] -#[repr(align(16))] -#[derive(Copy, Clone)] -pub union _GENERAL_LOOKASIDE_POOL__bindgen_ty_1 { - pub ListHead: SLIST_HEADER, - pub SingleListHead: SINGLE_LIST_ENTRY, -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE_POOL__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE_POOL__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE_POOL__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE_POOL__bindgen_ty_1>(), - 16usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ListHead) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_1), - "::", - stringify!(ListHead), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SingleListHead) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_1), - "::", - stringify!(SingleListHead), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE_POOL__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _GENERAL_LOOKASIDE_POOL__bindgen_ty_2 { - pub AllocateMisses: ULONG, - pub AllocateHits: ULONG, -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE_POOL__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE_POOL__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE_POOL__bindgen_ty_2>(), - 4usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE_POOL__bindgen_ty_2>(), - 4usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocateMisses) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_2), - "::", - stringify!(AllocateMisses), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocateHits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_2), - "::", - stringify!(AllocateHits), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE_POOL__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _GENERAL_LOOKASIDE_POOL__bindgen_ty_3 { - pub FreeMisses: ULONG, - pub FreeHits: ULONG, -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE_POOL__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE_POOL__bindgen_ty_3> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE_POOL__bindgen_ty_3>(), - 4usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE_POOL__bindgen_ty_3>(), - 4usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeMisses) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_3), - "::", - stringify!(FreeMisses), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeHits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_3), - "::", - stringify!(FreeHits), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE_POOL__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _GENERAL_LOOKASIDE_POOL__bindgen_ty_4 { - pub AllocateEx: PALLOCATE_FUNCTION_EX, - pub Allocate: PALLOCATE_FUNCTION, -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE_POOL__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE_POOL__bindgen_ty_4> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE_POOL__bindgen_ty_4>(), - 8usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_4)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE_POOL__bindgen_ty_4>(), - 8usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_4)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocateEx) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_4), - "::", - stringify!(AllocateEx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Allocate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_4), - "::", - stringify!(Allocate), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE_POOL__bindgen_ty_4 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _GENERAL_LOOKASIDE_POOL__bindgen_ty_5 { - pub FreeEx: PFREE_FUNCTION_EX, - pub Free: PFREE_FUNCTION, -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE_POOL__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE_POOL__bindgen_ty_5> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE_POOL__bindgen_ty_5>(), - 8usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_5)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE_POOL__bindgen_ty_5>(), - 8usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_5)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeEx) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_5), - "::", - stringify!(FreeEx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Free) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_5), - "::", - stringify!(Free), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE_POOL__bindgen_ty_5 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _GENERAL_LOOKASIDE_POOL__bindgen_ty_6 { - pub LastAllocateMisses: ULONG, - pub LastAllocateHits: ULONG, -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE_POOL__bindgen_ty_6() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE_POOL__bindgen_ty_6> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE_POOL__bindgen_ty_6>(), - 4usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_6)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE_POOL__bindgen_ty_6>(), - 4usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_6)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastAllocateMisses) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_6), - "::", - stringify!(LastAllocateMisses), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastAllocateHits) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL__bindgen_ty_6), - "::", - stringify!(LastAllocateHits), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE_POOL__bindgen_ty_6 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__GENERAL_LOOKASIDE_POOL() { - const UNINIT: ::core::mem::MaybeUninit<_GENERAL_LOOKASIDE_POOL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERAL_LOOKASIDE_POOL>(), - 96usize, - concat!("Size of: ", stringify!(_GENERAL_LOOKASIDE_POOL)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERAL_LOOKASIDE_POOL>(), - 16usize, - concat!("Alignment of ", stringify!(_GENERAL_LOOKASIDE_POOL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Depth) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL), - "::", - stringify!(Depth), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumDepth) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL), - "::", - stringify!(MaximumDepth), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalAllocates) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL), - "::", - stringify!(TotalAllocates), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalFrees) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL), - "::", - stringify!(TotalFrees), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Tag) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL), - "::", - stringify!(Tag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ListEntry) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL), - "::", - stringify!(ListEntry), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastTotalAllocates) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL), - "::", - stringify!(LastTotalAllocates), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Future) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_GENERAL_LOOKASIDE_POOL), - "::", - stringify!(Future), - ), - ); -} -impl Default for _GENERAL_LOOKASIDE_POOL { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type GENERAL_LOOKASIDE_POOL = _GENERAL_LOOKASIDE_POOL; -pub type PGENERAL_LOOKASIDE_POOL = *mut _GENERAL_LOOKASIDE_POOL; -pub type KPROCESSOR_MODE = CCHAR; -pub mod _MODE { - pub type Type = ::core::ffi::c_int; - pub const KernelMode: Type = 0; - pub const UserMode: Type = 1; - pub const MaximumMode: Type = 2; -} -pub use self::_MODE::Type as MODE; -pub type KSYNCHRONIZE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(SynchronizeContext: PVOID) -> BOOLEAN, ->; -pub type PKSYNCHRONIZE_ROUTINE = KSYNCHRONIZE_ROUTINE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KAPC { - pub Type: UCHAR, - pub AllFlags: UCHAR, - pub Size: UCHAR, - pub SpareByte1: UCHAR, - pub SpareLong0: ULONG, - pub Thread: *mut _KTHREAD, - pub ApcListEntry: LIST_ENTRY, - pub Reserved: [PVOID; 3usize], - pub NormalContext: PVOID, - pub SystemArgument1: PVOID, - pub SystemArgument2: PVOID, - pub ApcStateIndex: CCHAR, - pub ApcMode: KPROCESSOR_MODE, - pub Inserted: BOOLEAN, -} -#[test] -fn bindgen_test_layout__KAPC() { - const UNINIT: ::core::mem::MaybeUninit<_KAPC> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KAPC>(), - 88usize, - concat!("Size of: ", stringify!(_KAPC)), - ); - assert_eq!( - ::core::mem::align_of::<_KAPC>(), - 8usize, - concat!("Alignment of ", stringify!(_KAPC)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_KAPC), "::", stringify!(Type)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllFlags) as usize - ptr as usize }, - 1usize, - concat!("Offset of field: ", stringify!(_KAPC), "::", stringify!(AllFlags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!("Offset of field: ", stringify!(_KAPC), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SpareByte1) as usize - ptr as usize }, - 3usize, - concat!("Offset of field: ", stringify!(_KAPC), "::", stringify!(SpareByte1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SpareLong0) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_KAPC), "::", stringify!(SpareLong0)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Thread) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_KAPC), "::", stringify!(Thread)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ApcListEntry) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_KAPC), "::", stringify!(ApcListEntry)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 32usize, - concat!("Offset of field: ", stringify!(_KAPC), "::", stringify!(Reserved)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NormalContext) as usize - ptr as usize }, - 56usize, - concat!("Offset of field: ", stringify!(_KAPC), "::", stringify!(NormalContext)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SystemArgument1) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_KAPC), - "::", - stringify!(SystemArgument1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SystemArgument2) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_KAPC), - "::", - stringify!(SystemArgument2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ApcStateIndex) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(_KAPC), "::", stringify!(ApcStateIndex)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ApcMode) as usize - ptr as usize }, - 81usize, - concat!("Offset of field: ", stringify!(_KAPC), "::", stringify!(ApcMode)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Inserted) as usize - ptr as usize }, - 82usize, - concat!("Offset of field: ", stringify!(_KAPC), "::", stringify!(Inserted)), - ); -} -impl Default for _KAPC { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KAPC = _KAPC; -pub type PKAPC = *mut _KAPC; -pub type PRKAPC = *mut _KAPC; -pub type KDEFERRED_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - Dpc: *mut _KDPC, - DeferredContext: PVOID, - SystemArgument1: PVOID, - SystemArgument2: PVOID, - ), ->; -pub type PKDEFERRED_ROUTINE = KDEFERRED_ROUTINE; -pub mod _KDPC_IMPORTANCE { - pub type Type = ::core::ffi::c_int; - pub const LowImportance: Type = 0; - pub const MediumImportance: Type = 1; - pub const HighImportance: Type = 2; - pub const MediumHighImportance: Type = 3; -} -pub use self::_KDPC_IMPORTANCE::Type as KDPC_IMPORTANCE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KDPC { - pub __bindgen_anon_1: _KDPC__bindgen_ty_1, - pub DpcListEntry: SINGLE_LIST_ENTRY, - pub ProcessorHistory: KAFFINITY, - pub DeferredRoutine: PKDEFERRED_ROUTINE, - pub DeferredContext: PVOID, - pub SystemArgument1: PVOID, - pub SystemArgument2: PVOID, - pub DpcData: PVOID, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KDPC__bindgen_ty_1 { - pub TargetInfoAsUlong: ULONG, - pub __bindgen_anon_1: _KDPC__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KDPC__bindgen_ty_1__bindgen_ty_1 { - pub Type: UCHAR, - pub Importance: UCHAR, - pub Number: USHORT, -} -#[test] -fn bindgen_test_layout__KDPC__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KDPC__bindgen_ty_1__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KDPC__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_KDPC__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KDPC__bindgen_ty_1__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_KDPC__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KDPC__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Importance) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_KDPC__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Importance), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Number) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_KDPC__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Number), - ), - ); -} -#[test] -fn bindgen_test_layout__KDPC__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KDPC__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KDPC__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_KDPC__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KDPC__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_KDPC__bindgen_ty_1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetInfoAsUlong) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KDPC__bindgen_ty_1), - "::", - stringify!(TargetInfoAsUlong), - ), - ); -} -impl Default for _KDPC__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__KDPC() { - const UNINIT: ::core::mem::MaybeUninit<_KDPC> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KDPC>(), - 64usize, - concat!("Size of: ", stringify!(_KDPC)), - ); - assert_eq!( - ::core::mem::align_of::<_KDPC>(), - 8usize, - concat!("Alignment of ", stringify!(_KDPC)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DpcListEntry) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_KDPC), "::", stringify!(DpcListEntry)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProcessorHistory) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KDPC), - "::", - stringify!(ProcessorHistory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeferredRoutine) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KDPC), - "::", - stringify!(DeferredRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeferredContext) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KDPC), - "::", - stringify!(DeferredContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SystemArgument1) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KDPC), - "::", - stringify!(SystemArgument1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SystemArgument2) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_KDPC), - "::", - stringify!(SystemArgument2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DpcData) as usize - ptr as usize }, - 56usize, - concat!("Offset of field: ", stringify!(_KDPC), "::", stringify!(DpcData)), - ); -} -impl Default for _KDPC { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KDPC = _KDPC; -pub type PKDPC = *mut _KDPC; -pub type PRKDPC = *mut _KDPC; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MDL { - pub Next: *mut _MDL, - pub Size: CSHORT, - pub MdlFlags: CSHORT, - pub Process: *mut _EPROCESS, - pub MappedSystemVa: PVOID, - pub StartVa: PVOID, - pub ByteCount: ULONG, - pub ByteOffset: ULONG, -} -#[test] -fn bindgen_test_layout__MDL() { - const UNINIT: ::core::mem::MaybeUninit<_MDL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MDL>(), - 48usize, - concat!("Size of: ", stringify!(_MDL)), - ); - assert_eq!( - ::core::mem::align_of::<_MDL>(), - 8usize, - concat!("Alignment of ", stringify!(_MDL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Next) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_MDL), "::", stringify!(Next)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_MDL), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MdlFlags) as usize - ptr as usize }, - 10usize, - concat!("Offset of field: ", stringify!(_MDL), "::", stringify!(MdlFlags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Process) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_MDL), "::", stringify!(Process)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MappedSystemVa) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_MDL), "::", stringify!(MappedSystemVa)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartVa) as usize - ptr as usize }, - 32usize, - concat!("Offset of field: ", stringify!(_MDL), "::", stringify!(StartVa)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteCount) as usize - ptr as usize }, - 40usize, - concat!("Offset of field: ", stringify!(_MDL), "::", stringify!(ByteCount)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteOffset) as usize - ptr as usize }, - 44usize, - concat!("Offset of field: ", stringify!(_MDL), "::", stringify!(ByteOffset)), - ); -} -impl Default for _MDL { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MDL = _MDL; -pub type PMDL = *mut _MDL; -pub type PMDLX = *mut MDL; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DISPATCHER_HEADER { - pub __bindgen_anon_1: _DISPATCHER_HEADER__bindgen_ty_1, - pub SignalState: LONG, - pub WaitListHead: LIST_ENTRY, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DISPATCHER_HEADER__bindgen_ty_1 { - pub __bindgen_anon_1: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_1, - pub __bindgen_anon_2: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_2, - pub __bindgen_anon_3: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3, - pub __bindgen_anon_4: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4, - pub __bindgen_anon_5: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5, - pub __bindgen_anon_6: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6, - pub __bindgen_anon_7: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_7, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_1 { - pub Lock: LONG, - pub LockNV: LONG, -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lock) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Lock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LockNV) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(LockNV), - ), - ); -} -impl Default for _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_2 { - pub Type: UCHAR, - pub Signalling: UCHAR, - pub Size: UCHAR, - pub Reserved1: UCHAR, -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_2>(), - 4usize, - concat!("Size of: ", stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_2>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signalling) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Signalling), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Reserved1), - ), - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3 { - pub TimerType: UCHAR, - pub __bindgen_anon_1: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1, - pub Hand: UCHAR, - pub __bindgen_anon_2: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1 { - pub TimerControlFlags: UCHAR, - pub __bindgen_anon_1: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!( - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!( - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn Absolute(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_Absolute(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Wake(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_Wake(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn EncodedTolerableDelay(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u8) } - } - #[inline] - pub fn set_EncodedTolerableDelay(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 6u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Absolute: UCHAR, - Wake: UCHAR, - EncodedTolerableDelay: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Absolute: u8 = unsafe { ::core::mem::transmute(Absolute) }; - Absolute as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Wake: u8 = unsafe { ::core::mem::transmute(Wake) }; - Wake as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 6u8, - { - let EncodedTolerableDelay: u8 = unsafe { - ::core::mem::transmute(EncodedTolerableDelay) - }; - EncodedTolerableDelay as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TimerControlFlags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(TimerControlFlags), - ), - ); -} -impl Default for _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2 { - pub TimerMiscFlags: UCHAR, - pub __bindgen_anon_1: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!( - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!( - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2__bindgen_ty_1 - ), - ), - ); -} -impl _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2__bindgen_ty_1 { - #[inline] - pub fn Index(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 6u8) as u8) } - } - #[inline] - pub fn set_Index(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 6u8, val as u64) - } - } - #[inline] - pub fn Inserted(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) } - } - #[inline] - pub fn set_Inserted(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn Expired(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) } - } - #[inline] - pub fn set_Expired(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Index: UCHAR, - Inserted: UCHAR, - Expired: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 6u8, - { - let Index: u8 = unsafe { ::core::mem::transmute(Index) }; - Index as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let Inserted: u8 = unsafe { ::core::mem::transmute(Inserted) }; - Inserted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let Expired: u8 = unsafe { ::core::mem::transmute(Expired) }; - Expired as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2, - >(), - 1usize, - concat!( - "Size of: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimerMiscFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2), - "::", - stringify!(TimerMiscFlags), - ), - ); -} -impl Default for _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3>(), - 4usize, - concat!("Size of: ", stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimerType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(TimerType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Hand) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Hand), - ), - ); -} -impl Default for _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4 { - pub Timer2Type: UCHAR, - pub __bindgen_anon_1: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, - pub Timer2ComponentId: UCHAR, - pub Timer2RelativeId: UCHAR, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { - pub Timer2Flags: UCHAR, - pub __bindgen_anon_1: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!( - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!( - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn Timer2Inserted(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_Timer2Inserted(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Timer2Expiring(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_Timer2Expiring(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Timer2CancelPending(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) } - } - #[inline] - pub fn set_Timer2CancelPending(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Timer2SetPending(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) } - } - #[inline] - pub fn set_Timer2SetPending(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Timer2Running(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) } - } - #[inline] - pub fn set_Timer2Running(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Timer2Disabled(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) } - } - #[inline] - pub fn set_Timer2Disabled(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Timer2ReservedFlags(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u8) } - } - #[inline] - pub fn set_Timer2ReservedFlags(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 2u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Timer2Inserted: UCHAR, - Timer2Expiring: UCHAR, - Timer2CancelPending: UCHAR, - Timer2SetPending: UCHAR, - Timer2Running: UCHAR, - Timer2Disabled: UCHAR, - Timer2ReservedFlags: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Timer2Inserted: u8 = unsafe { - ::core::mem::transmute(Timer2Inserted) - }; - Timer2Inserted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Timer2Expiring: u8 = unsafe { - ::core::mem::transmute(Timer2Expiring) - }; - Timer2Expiring as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Timer2CancelPending: u8 = unsafe { - ::core::mem::transmute(Timer2CancelPending) - }; - Timer2CancelPending as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let Timer2SetPending: u8 = unsafe { - ::core::mem::transmute(Timer2SetPending) - }; - Timer2SetPending as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let Timer2Running: u8 = unsafe { - ::core::mem::transmute(Timer2Running) - }; - Timer2Running as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let Timer2Disabled: u8 = unsafe { - ::core::mem::transmute(Timer2Disabled) - }; - Timer2Disabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 2u8, - { - let Timer2ReservedFlags: u8 = unsafe { - ::core::mem::transmute(Timer2ReservedFlags) - }; - Timer2ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Timer2Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1), - "::", - stringify!(Timer2Flags), - ), - ); -} -impl Default for _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4>(), - 4usize, - concat!("Size of: ", stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4)), - ); - assert_eq!( - ::core::mem::align_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Timer2Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(Timer2Type), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Timer2ComponentId) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(Timer2ComponentId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Timer2RelativeId) as usize - ptr as usize - }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(Timer2RelativeId), - ), - ); -} -impl Default for _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_4 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5 { - pub QueueType: UCHAR, - pub __bindgen_anon_1: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1, - pub QueueSize: UCHAR, - pub QueueReserved: UCHAR, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 { - pub QueueControlFlags: UCHAR, - pub __bindgen_anon_1: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!( - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!( - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn Abandoned(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_Abandoned(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn DisableIncrement(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_DisableIncrement(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn QueueReservedControlFlags(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u8) } - } - #[inline] - pub fn set_QueueReservedControlFlags(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 6u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Abandoned: UCHAR, - DisableIncrement: UCHAR, - QueueReservedControlFlags: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Abandoned: u8 = unsafe { ::core::mem::transmute(Abandoned) }; - Abandoned as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let DisableIncrement: u8 = unsafe { - ::core::mem::transmute(DisableIncrement) - }; - DisableIncrement as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 6u8, - { - let QueueReservedControlFlags: u8 = unsafe { - ::core::mem::transmute(QueueReservedControlFlags) - }; - QueueReservedControlFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueueControlFlags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(QueueControlFlags), - ), - ); -} -impl Default for _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5>(), - 4usize, - concat!("Size of: ", stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5)), - ); - assert_eq!( - ::core::mem::align_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueueType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(QueueType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueueSize) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(QueueSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueueReserved) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(QueueReserved), - ), - ); -} -impl Default for _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_5 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6 { - pub ThreadType: UCHAR, - pub ThreadReserved: UCHAR, - pub __bindgen_anon_1: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1, - pub __bindgen_anon_2: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1 { - pub ThreadControlFlags: UCHAR, - pub __bindgen_anon_1: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!( - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!( - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn CycleProfiling(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_CycleProfiling(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn CounterProfiling(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_CounterProfiling(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn GroupScheduling(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) } - } - #[inline] - pub fn set_GroupScheduling(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AffinitySet(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) } - } - #[inline] - pub fn set_AffinitySet(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Tagged(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) } - } - #[inline] - pub fn set_Tagged(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnergyProfiling(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) } - } - #[inline] - pub fn set_EnergyProfiling(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn SchedulerAssist(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) } - } - #[inline] - pub fn set_SchedulerAssist(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn ThreadReservedControlFlags(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) } - } - #[inline] - pub fn set_ThreadReservedControlFlags(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CycleProfiling: UCHAR, - CounterProfiling: UCHAR, - GroupScheduling: UCHAR, - AffinitySet: UCHAR, - Tagged: UCHAR, - EnergyProfiling: UCHAR, - SchedulerAssist: UCHAR, - ThreadReservedControlFlags: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CycleProfiling: u8 = unsafe { - ::core::mem::transmute(CycleProfiling) - }; - CycleProfiling as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let CounterProfiling: u8 = unsafe { - ::core::mem::transmute(CounterProfiling) - }; - CounterProfiling as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let GroupScheduling: u8 = unsafe { - ::core::mem::transmute(GroupScheduling) - }; - GroupScheduling as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AffinitySet: u8 = unsafe { ::core::mem::transmute(AffinitySet) }; - AffinitySet as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let Tagged: u8 = unsafe { ::core::mem::transmute(Tagged) }; - Tagged as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let EnergyProfiling: u8 = unsafe { - ::core::mem::transmute(EnergyProfiling) - }; - EnergyProfiling as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let SchedulerAssist: u8 = unsafe { - ::core::mem::transmute(SchedulerAssist) - }; - SchedulerAssist as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let ThreadReservedControlFlags: u8 = unsafe { - ::core::mem::transmute(ThreadReservedControlFlags) - }; - ThreadReservedControlFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ThreadControlFlags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1), - "::", - stringify!(ThreadControlFlags), - ), - ); -} -impl Default for _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2 { - pub DebugActive: UCHAR, - pub __bindgen_anon_1: _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!( - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!( - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2__bindgen_ty_1 - ), - ), - ); -} -impl _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2__bindgen_ty_1 { - #[inline] - pub fn ActiveDR7(&self) -> BOOLEAN { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_ActiveDR7(&mut self, val: BOOLEAN) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Instrumented(&self) -> BOOLEAN { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_Instrumented(&mut self, val: BOOLEAN) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Minimal(&self) -> BOOLEAN { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) } - } - #[inline] - pub fn set_Minimal(&mut self, val: BOOLEAN) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved4(&self) -> BOOLEAN { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 2u8) as u8) } - } - #[inline] - pub fn set_Reserved4(&mut self, val: BOOLEAN) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 2u8, val as u64) - } - } - #[inline] - pub fn AltSyscall(&self) -> BOOLEAN { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) } - } - #[inline] - pub fn set_AltSyscall(&mut self, val: BOOLEAN) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Emulation(&self) -> BOOLEAN { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) } - } - #[inline] - pub fn set_Emulation(&mut self, val: BOOLEAN) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved5(&self) -> BOOLEAN { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) } - } - #[inline] - pub fn set_Reserved5(&mut self, val: BOOLEAN) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ActiveDR7: BOOLEAN, - Instrumented: BOOLEAN, - Minimal: BOOLEAN, - Reserved4: BOOLEAN, - AltSyscall: BOOLEAN, - Emulation: BOOLEAN, - Reserved5: BOOLEAN, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ActiveDR7: u8 = unsafe { ::core::mem::transmute(ActiveDR7) }; - ActiveDR7 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Instrumented: u8 = unsafe { - ::core::mem::transmute(Instrumented) - }; - Instrumented as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Minimal: u8 = unsafe { ::core::mem::transmute(Minimal) }; - Minimal as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 2u8, - { - let Reserved4: u8 = unsafe { ::core::mem::transmute(Reserved4) }; - Reserved4 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let AltSyscall: u8 = unsafe { ::core::mem::transmute(AltSyscall) }; - AltSyscall as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let Emulation: u8 = unsafe { ::core::mem::transmute(Emulation) }; - Emulation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let Reserved5: u8 = unsafe { ::core::mem::transmute(Reserved5) }; - Reserved5 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2, - >(), - 1usize, - concat!( - "Size of: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DebugActive) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2), - "::", - stringify!(DebugActive), - ), - ); -} -impl Default for _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6() { - const UNINIT: ::core::mem::MaybeUninit< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6>(), - 4usize, - concat!("Size of: ", stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6)), - ); - assert_eq!( - ::core::mem::align_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ThreadType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(ThreadType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ThreadReserved) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(ThreadReserved), - ), - ); -} -impl Default for _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_6 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_7 { - pub MutantType: UCHAR, - pub MutantSize: UCHAR, - pub DpcActive: BOOLEAN, - pub MutantReserved: UCHAR, -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_7() { - const UNINIT: ::core::mem::MaybeUninit< - _DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_7, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_7>(), - 4usize, - concat!("Size of: ", stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_7)), - ); - assert_eq!( - ::core::mem::align_of::<_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_7>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_7), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MutantType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(MutantType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MutantSize) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(MutantSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DpcActive) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(DpcActive), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MutantReserved) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(MutantReserved), - ), - ); -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_DISPATCHER_HEADER__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_DISPATCHER_HEADER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_DISPATCHER_HEADER__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_DISPATCHER_HEADER__bindgen_ty_1)), - ); -} -impl Default for _DISPATCHER_HEADER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DISPATCHER_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_DISPATCHER_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DISPATCHER_HEADER>(), - 24usize, - concat!("Size of: ", stringify!(_DISPATCHER_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_DISPATCHER_HEADER>(), - 8usize, - concat!("Alignment of ", stringify!(_DISPATCHER_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SignalState) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER), - "::", - stringify!(SignalState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WaitListHead) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DISPATCHER_HEADER), - "::", - stringify!(WaitListHead), - ), - ); -} -impl Default for _DISPATCHER_HEADER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DISPATCHER_HEADER = _DISPATCHER_HEADER; -pub type PDISPATCHER_HEADER = *mut _DISPATCHER_HEADER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KEVENT { - pub Header: DISPATCHER_HEADER, -} -#[test] -fn bindgen_test_layout__KEVENT() { - const UNINIT: ::core::mem::MaybeUninit<_KEVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEVENT>(), - 24usize, - concat!("Size of: ", stringify!(_KEVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_KEVENT>(), - 8usize, - concat!("Alignment of ", stringify!(_KEVENT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_KEVENT), "::", stringify!(Header)), - ); -} -impl Default for _KEVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KEVENT = _KEVENT; -pub type PKEVENT = *mut _KEVENT; -pub type PRKEVENT = *mut _KEVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KGATE { - pub Header: DISPATCHER_HEADER, -} -#[test] -fn bindgen_test_layout__KGATE() { - const UNINIT: ::core::mem::MaybeUninit<_KGATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KGATE>(), - 24usize, - concat!("Size of: ", stringify!(_KGATE)), - ); - assert_eq!( - ::core::mem::align_of::<_KGATE>(), - 8usize, - concat!("Alignment of ", stringify!(_KGATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_KGATE), "::", stringify!(Header)), - ); -} -impl Default for _KGATE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KGATE = _KGATE; -pub type PKGATE = *mut _KGATE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KTIMER { - pub Header: DISPATCHER_HEADER, - pub DueTime: ULARGE_INTEGER, - pub TimerListEntry: LIST_ENTRY, - pub Dpc: *mut _KDPC, - pub Processor: USHORT, - pub TimerType: USHORT, - pub Period: ULONG, -} -#[test] -fn bindgen_test_layout__KTIMER() { - const UNINIT: ::core::mem::MaybeUninit<_KTIMER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KTIMER>(), - 64usize, - concat!("Size of: ", stringify!(_KTIMER)), - ); - assert_eq!( - ::core::mem::align_of::<_KTIMER>(), - 8usize, - concat!("Alignment of ", stringify!(_KTIMER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_KTIMER), "::", stringify!(Header)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DueTime) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_KTIMER), "::", stringify!(DueTime)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimerListEntry) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KTIMER), - "::", - stringify!(TimerListEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dpc) as usize - ptr as usize }, - 48usize, - concat!("Offset of field: ", stringify!(_KTIMER), "::", stringify!(Dpc)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Processor) as usize - ptr as usize }, - 56usize, - concat!("Offset of field: ", stringify!(_KTIMER), "::", stringify!(Processor)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimerType) as usize - ptr as usize }, - 58usize, - concat!("Offset of field: ", stringify!(_KTIMER), "::", stringify!(TimerType)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Period) as usize - ptr as usize }, - 60usize, - concat!("Offset of field: ", stringify!(_KTIMER), "::", stringify!(Period)), - ); -} -impl Default for _KTIMER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KTIMER = _KTIMER; -pub type PKTIMER = *mut _KTIMER; -pub type PRKTIMER = *mut _KTIMER; -pub mod _LOCK_OPERATION { - pub type Type = ::core::ffi::c_int; - pub const IoReadAccess: Type = 0; - pub const IoWriteAccess: Type = 1; - pub const IoModifyAccess: Type = 2; -} -pub use self::_LOCK_OPERATION::Type as LOCK_OPERATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FAST_MUTEX { - pub Count: LONG, - pub Owner: PVOID, - pub Contention: ULONG, - pub Event: KEVENT, - pub OldIrql: ULONG, -} -#[test] -fn bindgen_test_layout__FAST_MUTEX() { - const UNINIT: ::core::mem::MaybeUninit<_FAST_MUTEX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FAST_MUTEX>(), - 56usize, - concat!("Size of: ", stringify!(_FAST_MUTEX)), - ); - assert_eq!( - ::core::mem::align_of::<_FAST_MUTEX>(), - 8usize, - concat!("Alignment of ", stringify!(_FAST_MUTEX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_FAST_MUTEX), "::", stringify!(Count)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Owner) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_FAST_MUTEX), "::", stringify!(Owner)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Contention) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FAST_MUTEX), - "::", - stringify!(Contention), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Event) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_FAST_MUTEX), "::", stringify!(Event)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OldIrql) as usize - ptr as usize }, - 48usize, - concat!("Offset of field: ", stringify!(_FAST_MUTEX), "::", stringify!(OldIrql)), - ); -} -impl Default for _FAST_MUTEX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FAST_MUTEX = _FAST_MUTEX; -pub type PFAST_MUTEX = *mut _FAST_MUTEX; -pub type KGUARDED_MUTEX = _FAST_MUTEX; -pub type PKGUARDED_MUTEX = *mut _FAST_MUTEX; -pub type PFN_COUNT = ULONG; -pub type SPFN_NUMBER = LONG64; -pub type PSPFN_NUMBER = *mut LONG64; -pub type PFN_NUMBER = ULONG64; -pub type PPFN_NUMBER = *mut ULONG64; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KFLOATING_SAVE { - pub Dummy: ULONG, -} -#[test] -fn bindgen_test_layout__KFLOATING_SAVE() { - const UNINIT: ::core::mem::MaybeUninit<_KFLOATING_SAVE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KFLOATING_SAVE>(), - 4usize, - concat!("Size of: ", stringify!(_KFLOATING_SAVE)), - ); - assert_eq!( - ::core::mem::align_of::<_KFLOATING_SAVE>(), - 4usize, - concat!("Alignment of ", stringify!(_KFLOATING_SAVE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dummy) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KFLOATING_SAVE), - "::", - stringify!(Dummy), - ), - ); -} -pub type KFLOATING_SAVE = _KFLOATING_SAVE; -pub type PKFLOATING_SAVE = *mut _KFLOATING_SAVE; -pub mod _FIRMWARE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const FirmwareTypeUnknown: Type = 0; - pub const FirmwareTypeBios: Type = 1; - pub const FirmwareTypeUefi: Type = 2; - pub const FirmwareTypeMax: Type = 3; -} -pub use self::_FIRMWARE_TYPE::Type as FIRMWARE_TYPE; -pub type PFIRMWARE_TYPE = *mut _FIRMWARE_TYPE::Type; -pub mod _LOGICAL_PROCESSOR_RELATIONSHIP { - pub type Type = ::core::ffi::c_int; - pub const RelationProcessorCore: Type = 0; - pub const RelationNumaNode: Type = 1; - pub const RelationCache: Type = 2; - pub const RelationProcessorPackage: Type = 3; - pub const RelationGroup: Type = 4; - pub const RelationProcessorDie: Type = 5; - pub const RelationNumaNodeEx: Type = 6; - pub const RelationProcessorModule: Type = 7; - pub const RelationAll: Type = 65535; -} -pub use self::_LOGICAL_PROCESSOR_RELATIONSHIP::Type as LOGICAL_PROCESSOR_RELATIONSHIP; -pub mod _PROCESSOR_CACHE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const CacheUnified: Type = 0; - pub const CacheInstruction: Type = 1; - pub const CacheData: Type = 2; - pub const CacheTrace: Type = 3; -} -pub use self::_PROCESSOR_CACHE_TYPE::Type as PROCESSOR_CACHE_TYPE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CACHE_DESCRIPTOR { - pub Level: UCHAR, - pub Associativity: UCHAR, - pub LineSize: USHORT, - pub Size: ULONG, - pub Type: PROCESSOR_CACHE_TYPE, -} -#[test] -fn bindgen_test_layout__CACHE_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_CACHE_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CACHE_DESCRIPTOR>(), - 12usize, - concat!("Size of: ", stringify!(_CACHE_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_CACHE_DESCRIPTOR>(), - 4usize, - concat!("Alignment of ", stringify!(_CACHE_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Level) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_DESCRIPTOR), - "::", - stringify!(Level), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Associativity) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_DESCRIPTOR), - "::", - stringify!(Associativity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LineSize) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_DESCRIPTOR), - "::", - stringify!(LineSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_DESCRIPTOR), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); -} -impl Default for _CACHE_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CACHE_DESCRIPTOR = _CACHE_DESCRIPTOR; -pub type PCACHE_DESCRIPTOR = *mut _CACHE_DESCRIPTOR; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION { - pub ProcessorMask: ULONG_PTR, - pub Relationship: LOGICAL_PROCESSOR_RELATIONSHIP, - pub __bindgen_anon_1: _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1 { - pub ProcessorCore: _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_1, - pub NumaNode: _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_2, - pub Cache: CACHE_DESCRIPTOR, - pub Reserved: [ULONGLONG; 2usize], -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - pub Flags: UCHAR, -} -#[test] -fn bindgen_test_layout__SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(Flags), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_2 { - pub NodeNumber: ULONG, -} -#[test] -fn bindgen_test_layout__SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NodeNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(NodeNumber), - ), - ); -} -#[test] -fn bindgen_test_layout__SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1>(), - 16usize, - concat!( - "Size of: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProcessorCore) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1), - "::", - stringify!(ProcessorCore), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumaNode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1), - "::", - stringify!(NumaNode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cache) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1), - "::", - stringify!(Cache), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _SYSTEM_LOGICAL_PROCESSOR_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__SYSTEM_LOGICAL_PROCESSOR_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_LOGICAL_PROCESSOR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_LOGICAL_PROCESSOR_INFORMATION>(), - 32usize, - concat!("Size of: ", stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_LOGICAL_PROCESSOR_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProcessorMask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION), - "::", - stringify!(ProcessorMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Relationship) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION), - "::", - stringify!(Relationship), - ), - ); -} -impl Default for _SYSTEM_LOGICAL_PROCESSOR_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SYSTEM_LOGICAL_PROCESSOR_INFORMATION = _SYSTEM_LOGICAL_PROCESSOR_INFORMATION; -pub type PSYSTEM_LOGICAL_PROCESSOR_INFORMATION = *mut _SYSTEM_LOGICAL_PROCESSOR_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESSOR_RELATIONSHIP { - pub Flags: UCHAR, - pub EfficiencyClass: UCHAR, - pub Reserved: [UCHAR; 20usize], - pub GroupCount: USHORT, - pub GroupMask: [GROUP_AFFINITY; 1usize], -} -#[test] -fn bindgen_test_layout__PROCESSOR_RELATIONSHIP() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESSOR_RELATIONSHIP> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESSOR_RELATIONSHIP>(), - 40usize, - concat!("Size of: ", stringify!(_PROCESSOR_RELATIONSHIP)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESSOR_RELATIONSHIP>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESSOR_RELATIONSHIP)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESSOR_RELATIONSHIP), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EfficiencyClass) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_PROCESSOR_RELATIONSHIP), - "::", - stringify!(EfficiencyClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PROCESSOR_RELATIONSHIP), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GroupCount) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_PROCESSOR_RELATIONSHIP), - "::", - stringify!(GroupCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GroupMask) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PROCESSOR_RELATIONSHIP), - "::", - stringify!(GroupMask), - ), - ); -} -pub type PROCESSOR_RELATIONSHIP = _PROCESSOR_RELATIONSHIP; -pub type PPROCESSOR_RELATIONSHIP = *mut _PROCESSOR_RELATIONSHIP; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _NUMA_NODE_RELATIONSHIP { - pub NodeNumber: ULONG, - pub Reserved: [UCHAR; 18usize], - pub GroupCount: USHORT, - pub __bindgen_anon_1: _NUMA_NODE_RELATIONSHIP__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _NUMA_NODE_RELATIONSHIP__bindgen_ty_1 { - pub GroupMask: GROUP_AFFINITY, - pub GroupMasks: [GROUP_AFFINITY; 1usize], -} -#[test] -fn bindgen_test_layout__NUMA_NODE_RELATIONSHIP__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_NUMA_NODE_RELATIONSHIP__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NUMA_NODE_RELATIONSHIP__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_NUMA_NODE_RELATIONSHIP__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_NUMA_NODE_RELATIONSHIP__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_NUMA_NODE_RELATIONSHIP__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GroupMask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NUMA_NODE_RELATIONSHIP__bindgen_ty_1), - "::", - stringify!(GroupMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GroupMasks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NUMA_NODE_RELATIONSHIP__bindgen_ty_1), - "::", - stringify!(GroupMasks), - ), - ); -} -impl Default for _NUMA_NODE_RELATIONSHIP__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__NUMA_NODE_RELATIONSHIP() { - const UNINIT: ::core::mem::MaybeUninit<_NUMA_NODE_RELATIONSHIP> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NUMA_NODE_RELATIONSHIP>(), - 40usize, - concat!("Size of: ", stringify!(_NUMA_NODE_RELATIONSHIP)), - ); - assert_eq!( - ::core::mem::align_of::<_NUMA_NODE_RELATIONSHIP>(), - 8usize, - concat!("Alignment of ", stringify!(_NUMA_NODE_RELATIONSHIP)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NodeNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NUMA_NODE_RELATIONSHIP), - "::", - stringify!(NodeNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NUMA_NODE_RELATIONSHIP), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GroupCount) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_NUMA_NODE_RELATIONSHIP), - "::", - stringify!(GroupCount), - ), - ); -} -impl Default for _NUMA_NODE_RELATIONSHIP { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type NUMA_NODE_RELATIONSHIP = _NUMA_NODE_RELATIONSHIP; -pub type PNUMA_NODE_RELATIONSHIP = *mut _NUMA_NODE_RELATIONSHIP; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CACHE_RELATIONSHIP { - pub Level: UCHAR, - pub Associativity: UCHAR, - pub LineSize: USHORT, - pub CacheSize: ULONG, - pub Type: PROCESSOR_CACHE_TYPE, - pub Reserved: [UCHAR; 18usize], - pub GroupCount: USHORT, - pub __bindgen_anon_1: _CACHE_RELATIONSHIP__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _CACHE_RELATIONSHIP__bindgen_ty_1 { - pub GroupMask: GROUP_AFFINITY, - pub GroupMasks: [GROUP_AFFINITY; 1usize], -} -#[test] -fn bindgen_test_layout__CACHE_RELATIONSHIP__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_CACHE_RELATIONSHIP__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CACHE_RELATIONSHIP__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_CACHE_RELATIONSHIP__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_CACHE_RELATIONSHIP__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_CACHE_RELATIONSHIP__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GroupMask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_RELATIONSHIP__bindgen_ty_1), - "::", - stringify!(GroupMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GroupMasks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_RELATIONSHIP__bindgen_ty_1), - "::", - stringify!(GroupMasks), - ), - ); -} -impl Default for _CACHE_RELATIONSHIP__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__CACHE_RELATIONSHIP() { - const UNINIT: ::core::mem::MaybeUninit<_CACHE_RELATIONSHIP> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CACHE_RELATIONSHIP>(), - 48usize, - concat!("Size of: ", stringify!(_CACHE_RELATIONSHIP)), - ); - assert_eq!( - ::core::mem::align_of::<_CACHE_RELATIONSHIP>(), - 8usize, - concat!("Alignment of ", stringify!(_CACHE_RELATIONSHIP)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Level) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_RELATIONSHIP), - "::", - stringify!(Level), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Associativity) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_RELATIONSHIP), - "::", - stringify!(Associativity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LineSize) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_RELATIONSHIP), - "::", - stringify!(LineSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CacheSize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_RELATIONSHIP), - "::", - stringify!(CacheSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_RELATIONSHIP), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_RELATIONSHIP), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GroupCount) as usize - ptr as usize }, - 30usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_RELATIONSHIP), - "::", - stringify!(GroupCount), - ), - ); -} -impl Default for _CACHE_RELATIONSHIP { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CACHE_RELATIONSHIP = _CACHE_RELATIONSHIP; -pub type PCACHE_RELATIONSHIP = *mut _CACHE_RELATIONSHIP; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PROCESSOR_GROUP_INFO { - pub MaximumProcessorCount: UCHAR, - pub ActiveProcessorCount: UCHAR, - pub Reserved: [UCHAR; 38usize], - pub ActiveProcessorMask: KAFFINITY, -} -#[test] -fn bindgen_test_layout__PROCESSOR_GROUP_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESSOR_GROUP_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESSOR_GROUP_INFO>(), - 48usize, - concat!("Size of: ", stringify!(_PROCESSOR_GROUP_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESSOR_GROUP_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESSOR_GROUP_INFO)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumProcessorCount) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESSOR_GROUP_INFO), - "::", - stringify!(MaximumProcessorCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ActiveProcessorCount) as usize - ptr as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_PROCESSOR_GROUP_INFO), - "::", - stringify!(ActiveProcessorCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PROCESSOR_GROUP_INFO), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ActiveProcessorMask) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PROCESSOR_GROUP_INFO), - "::", - stringify!(ActiveProcessorMask), - ), - ); -} -impl Default for _PROCESSOR_GROUP_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESSOR_GROUP_INFO = _PROCESSOR_GROUP_INFO; -pub type PPROCESSOR_GROUP_INFO = *mut _PROCESSOR_GROUP_INFO; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _GROUP_RELATIONSHIP { - pub MaximumGroupCount: USHORT, - pub ActiveGroupCount: USHORT, - pub Reserved: [UCHAR; 20usize], - pub GroupInfo: [PROCESSOR_GROUP_INFO; 1usize], -} -#[test] -fn bindgen_test_layout__GROUP_RELATIONSHIP() { - const UNINIT: ::core::mem::MaybeUninit<_GROUP_RELATIONSHIP> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GROUP_RELATIONSHIP>(), - 72usize, - concat!("Size of: ", stringify!(_GROUP_RELATIONSHIP)), - ); - assert_eq!( - ::core::mem::align_of::<_GROUP_RELATIONSHIP>(), - 8usize, - concat!("Alignment of ", stringify!(_GROUP_RELATIONSHIP)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumGroupCount) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GROUP_RELATIONSHIP), - "::", - stringify!(MaximumGroupCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ActiveGroupCount) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_GROUP_RELATIONSHIP), - "::", - stringify!(ActiveGroupCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_GROUP_RELATIONSHIP), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GroupInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GROUP_RELATIONSHIP), - "::", - stringify!(GroupInfo), - ), - ); -} -impl Default for _GROUP_RELATIONSHIP { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type GROUP_RELATIONSHIP = _GROUP_RELATIONSHIP; -pub type PGROUP_RELATIONSHIP = *mut _GROUP_RELATIONSHIP; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX { - pub Relationship: LOGICAL_PROCESSOR_RELATIONSHIP, - pub Size: ULONG, - pub __bindgen_anon_1: _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX__bindgen_ty_1 { - pub Processor: PROCESSOR_RELATIONSHIP, - pub NumaNode: NUMA_NODE_RELATIONSHIP, - pub Cache: CACHE_RELATIONSHIP, - pub Group: GROUP_RELATIONSHIP, -} -#[test] -fn bindgen_test_layout__SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX__bindgen_ty_1>(), - 72usize, - concat!( - "Size of: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Processor) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX__bindgen_ty_1), - "::", - stringify!(Processor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumaNode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX__bindgen_ty_1), - "::", - stringify!(NumaNode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cache) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX__bindgen_ty_1), - "::", - stringify!(Cache), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Group) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX__bindgen_ty_1), - "::", - stringify!(Group), - ), - ); -} -impl Default for _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>(), - 80usize, - concat!("Size of: ", stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Relationship) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX), - "::", - stringify!(Relationship), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX), - "::", - stringify!(Size), - ), - ); -} -impl Default for _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX = _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX; -pub type PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX = *mut _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX; -pub mod _CPU_SET_INFORMATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const CpuSetInformation: Type = 0; -} -pub use self::_CPU_SET_INFORMATION_TYPE::Type as CPU_SET_INFORMATION_TYPE; -pub type PCPU_SET_INFORMATION_TYPE = *mut _CPU_SET_INFORMATION_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _SYSTEM_CPU_SET_INFORMATION { - pub Size: ULONG, - pub Type: CPU_SET_INFORMATION_TYPE, - pub __bindgen_anon_1: _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1 { - pub CpuSet: _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - pub Id: ULONG, - pub Group: USHORT, - pub LogicalProcessorIndex: UCHAR, - pub CoreIndex: UCHAR, - pub LastLevelCacheIndex: UCHAR, - pub NumaNodeIndex: UCHAR, - pub EfficiencyClass: UCHAR, - pub __bindgen_anon_1: _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - pub __bindgen_anon_2: _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2, - pub AllocationTag: ULONG64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { - pub AllFlags: UCHAR, - pub __bindgen_anon_1: _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!( - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!( - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn Parked(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_Parked(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Allocated(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_Allocated(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn AllocatedToTargetProcess(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) } - } - #[inline] - pub fn set_AllocatedToTargetProcess(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn RealTime(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) } - } - #[inline] - pub fn set_RealTime(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 4u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Parked: UCHAR, - Allocated: UCHAR, - AllocatedToTargetProcess: UCHAR, - RealTime: UCHAR, - ReservedFlags: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Parked: u8 = unsafe { ::core::mem::transmute(Parked) }; - Parked as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Allocated: u8 = unsafe { ::core::mem::transmute(Allocated) }; - Allocated as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let AllocatedToTargetProcess: u8 = unsafe { - ::core::mem::transmute(AllocatedToTargetProcess) - }; - AllocatedToTargetProcess as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let RealTime: u8 = unsafe { ::core::mem::transmute(RealTime) }; - RealTime as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 4u8, - { - let ReservedFlags: u8 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!( - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!( - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(AllFlags), - ), - ); -} -impl Default for _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 { - pub Reserved: ULONG, - pub SchedulingClass: UCHAR, -} -#[test] -fn bindgen_test_layout__SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SchedulingClass) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(SchedulingClass), - ), - ); -} -impl Default for _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 24usize, - concat!( - "Size of: ", - stringify!(_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Id), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Group) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Group), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogicalProcessorIndex) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(LogicalProcessorIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CoreIndex) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(CoreIndex), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastLevelCacheIndex) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(LastLevelCacheIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumaNodeIndex) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(NumaNodeIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EfficiencyClass) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(EfficiencyClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationTag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AllocationTag), - ), - ); -} -impl Default for _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1>(), - 24usize, - concat!("Size of: ", stringify!(_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CpuSet) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1), - "::", - stringify!(CpuSet), - ), - ); -} -impl Default for _SYSTEM_CPU_SET_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__SYSTEM_CPU_SET_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_CPU_SET_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_CPU_SET_INFORMATION>(), - 32usize, - concat!("Size of: ", stringify!(_SYSTEM_CPU_SET_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_CPU_SET_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_SYSTEM_CPU_SET_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_CPU_SET_INFORMATION), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_CPU_SET_INFORMATION), - "::", - stringify!(Type), - ), - ); -} -impl Default for _SYSTEM_CPU_SET_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SYSTEM_CPU_SET_INFORMATION = _SYSTEM_CPU_SET_INFORMATION; -pub type PSYSTEM_CPU_SET_INFORMATION = *mut _SYSTEM_CPU_SET_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SYSTEM_POOL_ZEROING_INFORMATION { - pub PoolZeroingSupportPresent: BOOLEAN, -} -#[test] -fn bindgen_test_layout__SYSTEM_POOL_ZEROING_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_POOL_ZEROING_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_POOL_ZEROING_INFORMATION>(), - 1usize, - concat!("Size of: ", stringify!(_SYSTEM_POOL_ZEROING_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_POOL_ZEROING_INFORMATION>(), - 1usize, - concat!("Alignment of ", stringify!(_SYSTEM_POOL_ZEROING_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PoolZeroingSupportPresent) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_POOL_ZEROING_INFORMATION), - "::", - stringify!(PoolZeroingSupportPresent), - ), - ); -} -pub type SYSTEM_POOL_ZEROING_INFORMATION = _SYSTEM_POOL_ZEROING_INFORMATION; -pub type PSYSTEM_POOL_ZEROING_INFORMATION = *mut _SYSTEM_POOL_ZEROING_INFORMATION; -pub mod _ALTERNATIVE_ARCHITECTURE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const StandardDesign: Type = 0; - pub const NEC98x86: Type = 1; - pub const EndAlternatives: Type = 2; -} -pub use self::_ALTERNATIVE_ARCHITECTURE_TYPE::Type as ALTERNATIVE_ARCHITECTURE_TYPE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _EXCEPTION_RECORD { - pub ExceptionCode: NTSTATUS, - pub ExceptionFlags: ULONG, - pub ExceptionRecord: *mut _EXCEPTION_RECORD, - pub ExceptionAddress: PVOID, - pub NumberParameters: ULONG, - pub ExceptionInformation: [ULONG_PTR; 15usize], -} -#[test] -fn bindgen_test_layout__EXCEPTION_RECORD() { - const UNINIT: ::core::mem::MaybeUninit<_EXCEPTION_RECORD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EXCEPTION_RECORD>(), - 152usize, - concat!("Size of: ", stringify!(_EXCEPTION_RECORD)), - ); - assert_eq!( - ::core::mem::align_of::<_EXCEPTION_RECORD>(), - 8usize, - concat!("Alignment of ", stringify!(_EXCEPTION_RECORD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD), - "::", - stringify!(ExceptionCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionFlags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD), - "::", - stringify!(ExceptionFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionRecord) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD), - "::", - stringify!(ExceptionRecord), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExceptionAddress) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD), - "::", - stringify!(ExceptionAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberParameters) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD), - "::", - stringify!(NumberParameters), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExceptionInformation) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD), - "::", - stringify!(ExceptionInformation), - ), - ); -} -impl Default for _EXCEPTION_RECORD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type EXCEPTION_RECORD = _EXCEPTION_RECORD; -pub type PEXCEPTION_RECORD = *mut EXCEPTION_RECORD; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EXCEPTION_RECORD32 { - pub ExceptionCode: NTSTATUS, - pub ExceptionFlags: ULONG, - pub ExceptionRecord: ULONG, - pub ExceptionAddress: ULONG, - pub NumberParameters: ULONG, - pub ExceptionInformation: [ULONG; 15usize], -} -#[test] -fn bindgen_test_layout__EXCEPTION_RECORD32() { - const UNINIT: ::core::mem::MaybeUninit<_EXCEPTION_RECORD32> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EXCEPTION_RECORD32>(), - 80usize, - concat!("Size of: ", stringify!(_EXCEPTION_RECORD32)), - ); - assert_eq!( - ::core::mem::align_of::<_EXCEPTION_RECORD32>(), - 4usize, - concat!("Alignment of ", stringify!(_EXCEPTION_RECORD32)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD32), - "::", - stringify!(ExceptionCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionFlags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD32), - "::", - stringify!(ExceptionFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionRecord) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD32), - "::", - stringify!(ExceptionRecord), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExceptionAddress) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD32), - "::", - stringify!(ExceptionAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberParameters) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD32), - "::", - stringify!(NumberParameters), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExceptionInformation) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD32), - "::", - stringify!(ExceptionInformation), - ), - ); -} -pub type EXCEPTION_RECORD32 = _EXCEPTION_RECORD32; -pub type PEXCEPTION_RECORD32 = *mut _EXCEPTION_RECORD32; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EXCEPTION_RECORD64 { - pub ExceptionCode: NTSTATUS, - pub ExceptionFlags: ULONG, - pub ExceptionRecord: ULONG64, - pub ExceptionAddress: ULONG64, - pub NumberParameters: ULONG, - pub __unusedAlignment: ULONG, - pub ExceptionInformation: [ULONG64; 15usize], -} -#[test] -fn bindgen_test_layout__EXCEPTION_RECORD64() { - const UNINIT: ::core::mem::MaybeUninit<_EXCEPTION_RECORD64> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EXCEPTION_RECORD64>(), - 152usize, - concat!("Size of: ", stringify!(_EXCEPTION_RECORD64)), - ); - assert_eq!( - ::core::mem::align_of::<_EXCEPTION_RECORD64>(), - 8usize, - concat!("Alignment of ", stringify!(_EXCEPTION_RECORD64)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD64), - "::", - stringify!(ExceptionCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionFlags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD64), - "::", - stringify!(ExceptionFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionRecord) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD64), - "::", - stringify!(ExceptionRecord), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExceptionAddress) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD64), - "::", - stringify!(ExceptionAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberParameters) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD64), - "::", - stringify!(NumberParameters), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).__unusedAlignment) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD64), - "::", - stringify!(__unusedAlignment), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExceptionInformation) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_RECORD64), - "::", - stringify!(ExceptionInformation), - ), - ); -} -pub type EXCEPTION_RECORD64 = _EXCEPTION_RECORD64; -pub type PEXCEPTION_RECORD64 = *mut _EXCEPTION_RECORD64; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _EXCEPTION_POINTERS { - pub ExceptionRecord: PEXCEPTION_RECORD, - pub ContextRecord: PCONTEXT, -} -#[test] -fn bindgen_test_layout__EXCEPTION_POINTERS() { - const UNINIT: ::core::mem::MaybeUninit<_EXCEPTION_POINTERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EXCEPTION_POINTERS>(), - 16usize, - concat!("Size of: ", stringify!(_EXCEPTION_POINTERS)), - ); - assert_eq!( - ::core::mem::align_of::<_EXCEPTION_POINTERS>(), - 8usize, - concat!("Alignment of ", stringify!(_EXCEPTION_POINTERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionRecord) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_POINTERS), - "::", - stringify!(ExceptionRecord), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContextRecord) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_POINTERS), - "::", - stringify!(ContextRecord), - ), - ); -} -impl Default for _EXCEPTION_POINTERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type EXCEPTION_POINTERS = _EXCEPTION_POINTERS; -pub type PEXCEPTION_POINTERS = *mut _EXCEPTION_POINTERS; -pub mod _KINTERRUPT_MODE { - pub type Type = ::core::ffi::c_int; - pub const LevelSensitive: Type = 0; - pub const Latched: Type = 1; -} -pub use self::_KINTERRUPT_MODE::Type as KINTERRUPT_MODE; -pub mod _KINTERRUPT_POLARITY { - pub type Type = ::core::ffi::c_int; - pub const InterruptPolarityUnknown: Type = 0; - pub const InterruptActiveHigh: Type = 1; - pub const InterruptRisingEdge: Type = 1; - pub const InterruptActiveLow: Type = 2; - pub const InterruptFallingEdge: Type = 2; - pub const InterruptActiveBoth: Type = 3; - pub const InterruptActiveBothTriggerLow: Type = 3; - pub const InterruptActiveBothTriggerHigh: Type = 4; -} -pub use self::_KINTERRUPT_POLARITY::Type as KINTERRUPT_POLARITY; -pub type PKINTERRUPT_POLARITY = *mut _KINTERRUPT_POLARITY::Type; -pub mod _KWAIT_REASON { - pub type Type = ::core::ffi::c_int; - pub const Executive: Type = 0; - pub const FreePage: Type = 1; - pub const PageIn: Type = 2; - pub const PoolAllocation: Type = 3; - pub const DelayExecution: Type = 4; - pub const Suspended: Type = 5; - pub const UserRequest: Type = 6; - pub const WrExecutive: Type = 7; - pub const WrFreePage: Type = 8; - pub const WrPageIn: Type = 9; - pub const WrPoolAllocation: Type = 10; - pub const WrDelayExecution: Type = 11; - pub const WrSuspended: Type = 12; - pub const WrUserRequest: Type = 13; - pub const WrSpare0: Type = 14; - pub const WrQueue: Type = 15; - pub const WrLpcReceive: Type = 16; - pub const WrLpcReply: Type = 17; - pub const WrVirtualMemory: Type = 18; - pub const WrPageOut: Type = 19; - pub const WrRendezvous: Type = 20; - pub const WrKeyedEvent: Type = 21; - pub const WrTerminated: Type = 22; - pub const WrProcessInSwap: Type = 23; - pub const WrCpuRateControl: Type = 24; - pub const WrCalloutStack: Type = 25; - pub const WrKernel: Type = 26; - pub const WrResource: Type = 27; - pub const WrPushLock: Type = 28; - pub const WrMutex: Type = 29; - pub const WrQuantumEnd: Type = 30; - pub const WrDispatchInt: Type = 31; - pub const WrPreempted: Type = 32; - pub const WrYieldExecution: Type = 33; - pub const WrFastMutex: Type = 34; - pub const WrGuardedMutex: Type = 35; - pub const WrRundown: Type = 36; - pub const WrAlertByThreadId: Type = 37; - pub const WrDeferredPreempt: Type = 38; - pub const WrPhysicalFault: Type = 39; - pub const WrIoRing: Type = 40; - pub const WrMdlCache: Type = 41; - pub const MaximumWaitReason: Type = 42; -} -pub use self::_KWAIT_REASON::Type as KWAIT_REASON; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KWAIT_BLOCK { - pub WaitListEntry: LIST_ENTRY, - pub WaitType: UCHAR, - pub BlockState: UCHAR, - pub WaitKey: USHORT, - pub SpareLong: LONG, - pub __bindgen_anon_1: _KWAIT_BLOCK__bindgen_ty_1, - pub Object: PVOID, - pub SparePtr: PVOID, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KWAIT_BLOCK__bindgen_ty_1 { - pub Thread: *mut _KTHREAD, - pub NotificationQueue: *mut _KQUEUE, - pub Dpc: *mut _KDPC, -} -#[test] -fn bindgen_test_layout__KWAIT_BLOCK__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KWAIT_BLOCK__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KWAIT_BLOCK__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_KWAIT_BLOCK__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KWAIT_BLOCK__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_KWAIT_BLOCK__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Thread) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KWAIT_BLOCK__bindgen_ty_1), - "::", - stringify!(Thread), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NotificationQueue) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KWAIT_BLOCK__bindgen_ty_1), - "::", - stringify!(NotificationQueue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dpc) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KWAIT_BLOCK__bindgen_ty_1), - "::", - stringify!(Dpc), - ), - ); -} -impl Default for _KWAIT_BLOCK__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__KWAIT_BLOCK() { - const UNINIT: ::core::mem::MaybeUninit<_KWAIT_BLOCK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KWAIT_BLOCK>(), - 48usize, - concat!("Size of: ", stringify!(_KWAIT_BLOCK)), - ); - assert_eq!( - ::core::mem::align_of::<_KWAIT_BLOCK>(), - 8usize, - concat!("Alignment of ", stringify!(_KWAIT_BLOCK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WaitListEntry) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KWAIT_BLOCK), - "::", - stringify!(WaitListEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WaitType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KWAIT_BLOCK), - "::", - stringify!(WaitType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BlockState) as usize - ptr as usize }, - 17usize, - concat!( - "Offset of field: ", - stringify!(_KWAIT_BLOCK), - "::", - stringify!(BlockState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WaitKey) as usize - ptr as usize }, - 18usize, - concat!("Offset of field: ", stringify!(_KWAIT_BLOCK), "::", stringify!(WaitKey)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SpareLong) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_KWAIT_BLOCK), - "::", - stringify!(SpareLong), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 32usize, - concat!("Offset of field: ", stringify!(_KWAIT_BLOCK), "::", stringify!(Object)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SparePtr) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KWAIT_BLOCK), - "::", - stringify!(SparePtr), - ), - ); -} -impl Default for _KWAIT_BLOCK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KWAIT_BLOCK = _KWAIT_BLOCK; -pub type PKWAIT_BLOCK = *mut _KWAIT_BLOCK; -pub type PRKWAIT_BLOCK = *mut _KWAIT_BLOCK; -pub type KSTART_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(StartContext: PVOID), ->; -pub type PKSTART_ROUTINE = KSTART_ROUTINE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KDEVICE_QUEUE { - pub Type: CSHORT, - pub Size: CSHORT, - pub DeviceListHead: LIST_ENTRY, - pub Lock: KSPIN_LOCK, - pub __bindgen_anon_1: _KDEVICE_QUEUE__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KDEVICE_QUEUE__bindgen_ty_1 { - pub Busy: BOOLEAN, - pub __bindgen_anon_1: _KDEVICE_QUEUE__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KDEVICE_QUEUE__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u64; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__KDEVICE_QUEUE__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_KDEVICE_QUEUE__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_KDEVICE_QUEUE__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KDEVICE_QUEUE__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_KDEVICE_QUEUE__bindgen_ty_1__bindgen_ty_1)), - ); -} -impl _KDEVICE_QUEUE__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn Reserved(&self) -> LONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: LONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn Hint(&self) -> LONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 56u8) as u64) } - } - #[inline] - pub fn set_Hint(&mut self, val: LONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 56u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Reserved: LONG64, - Hint: LONG64, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 56u8, - { - let Hint: u64 = unsafe { ::core::mem::transmute(Hint) }; - Hint as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__KDEVICE_QUEUE__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KDEVICE_QUEUE__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KDEVICE_QUEUE__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_KDEVICE_QUEUE__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KDEVICE_QUEUE__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_KDEVICE_QUEUE__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Busy) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KDEVICE_QUEUE__bindgen_ty_1), - "::", - stringify!(Busy), - ), - ); -} -impl Default for _KDEVICE_QUEUE__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__KDEVICE_QUEUE() { - const UNINIT: ::core::mem::MaybeUninit<_KDEVICE_QUEUE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KDEVICE_QUEUE>(), - 40usize, - concat!("Size of: ", stringify!(_KDEVICE_QUEUE)), - ); - assert_eq!( - ::core::mem::align_of::<_KDEVICE_QUEUE>(), - 8usize, - concat!("Alignment of ", stringify!(_KDEVICE_QUEUE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_KDEVICE_QUEUE), "::", stringify!(Type)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!("Offset of field: ", stringify!(_KDEVICE_QUEUE), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceListHead) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KDEVICE_QUEUE), - "::", - stringify!(DeviceListHead), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lock) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_KDEVICE_QUEUE), "::", stringify!(Lock)), - ); -} -impl Default for _KDEVICE_QUEUE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KDEVICE_QUEUE = _KDEVICE_QUEUE; -pub type PKDEVICE_QUEUE = *mut _KDEVICE_QUEUE; -pub type PRKDEVICE_QUEUE = *mut _KDEVICE_QUEUE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KDEVICE_QUEUE_ENTRY { - pub DeviceListEntry: LIST_ENTRY, - pub SortKey: ULONG, - pub Inserted: BOOLEAN, -} -#[test] -fn bindgen_test_layout__KDEVICE_QUEUE_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_KDEVICE_QUEUE_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KDEVICE_QUEUE_ENTRY>(), - 24usize, - concat!("Size of: ", stringify!(_KDEVICE_QUEUE_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_KDEVICE_QUEUE_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_KDEVICE_QUEUE_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceListEntry) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KDEVICE_QUEUE_ENTRY), - "::", - stringify!(DeviceListEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SortKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KDEVICE_QUEUE_ENTRY), - "::", - stringify!(SortKey), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Inserted) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_KDEVICE_QUEUE_ENTRY), - "::", - stringify!(Inserted), - ), - ); -} -impl Default for _KDEVICE_QUEUE_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KDEVICE_QUEUE_ENTRY = _KDEVICE_QUEUE_ENTRY; -pub type PKDEVICE_QUEUE_ENTRY = *mut _KDEVICE_QUEUE_ENTRY; -pub type PRKDEVICE_QUEUE_ENTRY = *mut _KDEVICE_QUEUE_ENTRY; -pub type KSERVICE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(Interrupt: *mut _KINTERRUPT, ServiceContext: PVOID) -> BOOLEAN, ->; -pub type PKSERVICE_ROUTINE = KSERVICE_ROUTINE; -pub type KMESSAGE_SERVICE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - Interrupt: *mut _KINTERRUPT, - ServiceContext: PVOID, - MessageID: ULONG, - ) -> BOOLEAN, ->; -pub type PKMESSAGE_SERVICE_ROUTINE = KMESSAGE_SERVICE_ROUTINE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KMUTANT { - pub Header: DISPATCHER_HEADER, - pub MutantListEntry: LIST_ENTRY, - pub OwnerThread: *mut _KTHREAD, - pub __bindgen_anon_1: _KMUTANT__bindgen_ty_1, - pub ApcDisable: UCHAR, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KMUTANT__bindgen_ty_1 { - pub MutantFlags: UCHAR, - pub __bindgen_anon_1: _KMUTANT__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KMUTANT__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__KMUTANT__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_KMUTANT__bindgen_ty_1__bindgen_ty_1>(), - 1usize, - concat!("Size of: ", stringify!(_KMUTANT__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KMUTANT__bindgen_ty_1__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_KMUTANT__bindgen_ty_1__bindgen_ty_1)), - ); -} -impl _KMUTANT__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn Abandoned(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_Abandoned(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Spare1(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 7u8) as u8) } - } - #[inline] - pub fn set_Spare1(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 7u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Abandoned: UCHAR, - Spare1: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Abandoned: u8 = unsafe { ::core::mem::transmute(Abandoned) }; - Abandoned as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 7u8, - { - let Spare1: u8 = unsafe { ::core::mem::transmute(Spare1) }; - Spare1 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__KMUTANT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KMUTANT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KMUTANT__bindgen_ty_1>(), - 1usize, - concat!("Size of: ", stringify!(_KMUTANT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KMUTANT__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_KMUTANT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MutantFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KMUTANT__bindgen_ty_1), - "::", - stringify!(MutantFlags), - ), - ); -} -impl Default for _KMUTANT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__KMUTANT() { - const UNINIT: ::core::mem::MaybeUninit<_KMUTANT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KMUTANT>(), - 56usize, - concat!("Size of: ", stringify!(_KMUTANT)), - ); - assert_eq!( - ::core::mem::align_of::<_KMUTANT>(), - 8usize, - concat!("Alignment of ", stringify!(_KMUTANT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_KMUTANT), "::", stringify!(Header)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MutantListEntry) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KMUTANT), - "::", - stringify!(MutantListEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OwnerThread) as usize - ptr as usize }, - 40usize, - concat!("Offset of field: ", stringify!(_KMUTANT), "::", stringify!(OwnerThread)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ApcDisable) as usize - ptr as usize }, - 49usize, - concat!("Offset of field: ", stringify!(_KMUTANT), "::", stringify!(ApcDisable)), - ); -} -impl Default for _KMUTANT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KMUTANT = _KMUTANT; -pub type PKMUTANT = *mut _KMUTANT; -pub type PRKMUTANT = *mut _KMUTANT; -pub type KMUTEX = _KMUTANT; -pub type PKMUTEX = *mut _KMUTANT; -pub type PRKMUTEX = *mut _KMUTANT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KSEMAPHORE { - pub Header: DISPATCHER_HEADER, - pub Limit: LONG, -} -#[test] -fn bindgen_test_layout__KSEMAPHORE() { - const UNINIT: ::core::mem::MaybeUninit<_KSEMAPHORE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KSEMAPHORE>(), - 32usize, - concat!("Size of: ", stringify!(_KSEMAPHORE)), - ); - assert_eq!( - ::core::mem::align_of::<_KSEMAPHORE>(), - 8usize, - concat!("Alignment of ", stringify!(_KSEMAPHORE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_KSEMAPHORE), "::", stringify!(Header)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Limit) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_KSEMAPHORE), "::", stringify!(Limit)), - ); -} -impl Default for _KSEMAPHORE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KSEMAPHORE = _KSEMAPHORE; -pub type PKSEMAPHORE = *mut _KSEMAPHORE; -pub type PRKSEMAPHORE = *mut _KSEMAPHORE; -pub type KIPI_BROADCAST_WORKER = ::core::option::Option< - unsafe extern "C" fn(Argument: ULONG_PTR) -> ULONG_PTR, ->; -pub type PKIPI_BROADCAST_WORKER = KIPI_BROADCAST_WORKER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KDPC_WATCHDOG_INFORMATION { - pub DpcTimeLimit: ULONG, - pub DpcTimeCount: ULONG, - pub DpcWatchdogLimit: ULONG, - pub DpcWatchdogCount: ULONG, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__KDPC_WATCHDOG_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_KDPC_WATCHDOG_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KDPC_WATCHDOG_INFORMATION>(), - 20usize, - concat!("Size of: ", stringify!(_KDPC_WATCHDOG_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KDPC_WATCHDOG_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_KDPC_WATCHDOG_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DpcTimeLimit) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KDPC_WATCHDOG_INFORMATION), - "::", - stringify!(DpcTimeLimit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DpcTimeCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_KDPC_WATCHDOG_INFORMATION), - "::", - stringify!(DpcTimeCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DpcWatchdogLimit) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KDPC_WATCHDOG_INFORMATION), - "::", - stringify!(DpcWatchdogLimit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DpcWatchdogCount) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KDPC_WATCHDOG_INFORMATION), - "::", - stringify!(DpcWatchdogCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KDPC_WATCHDOG_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -pub type KDPC_WATCHDOG_INFORMATION = _KDPC_WATCHDOG_INFORMATION; -pub type PKDPC_WATCHDOG_INFORMATION = *mut _KDPC_WATCHDOG_INFORMATION; -pub mod _KBUGCHECK_BUFFER_DUMP_STATE { - pub type Type = ::core::ffi::c_int; - pub const BufferEmpty: Type = 0; - pub const BufferInserted: Type = 1; - pub const BufferStarted: Type = 2; - pub const BufferFinished: Type = 3; - pub const BufferIncomplete: Type = 4; -} -pub use self::_KBUGCHECK_BUFFER_DUMP_STATE::Type as KBUGCHECK_BUFFER_DUMP_STATE; -pub type KBUGCHECK_CALLBACK_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(Buffer: PVOID, Length: ULONG), ->; -pub type PKBUGCHECK_CALLBACK_ROUTINE = KBUGCHECK_CALLBACK_ROUTINE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KBUGCHECK_CALLBACK_RECORD { - pub Entry: LIST_ENTRY, - pub CallbackRoutine: PKBUGCHECK_CALLBACK_ROUTINE, - pub Buffer: PVOID, - pub Length: ULONG, - pub Component: PUCHAR, - pub Checksum: ULONG_PTR, - pub State: UCHAR, -} -#[test] -fn bindgen_test_layout__KBUGCHECK_CALLBACK_RECORD() { - const UNINIT: ::core::mem::MaybeUninit<_KBUGCHECK_CALLBACK_RECORD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KBUGCHECK_CALLBACK_RECORD>(), - 64usize, - concat!("Size of: ", stringify!(_KBUGCHECK_CALLBACK_RECORD)), - ); - assert_eq!( - ::core::mem::align_of::<_KBUGCHECK_CALLBACK_RECORD>(), - 8usize, - concat!("Alignment of ", stringify!(_KBUGCHECK_CALLBACK_RECORD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Entry) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_CALLBACK_RECORD), - "::", - stringify!(Entry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallbackRoutine) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_CALLBACK_RECORD), - "::", - stringify!(CallbackRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_CALLBACK_RECORD), - "::", - stringify!(Buffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_CALLBACK_RECORD), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Component) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_CALLBACK_RECORD), - "::", - stringify!(Component), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Checksum) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_CALLBACK_RECORD), - "::", - stringify!(Checksum), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).State) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_CALLBACK_RECORD), - "::", - stringify!(State), - ), - ); -} -impl Default for _KBUGCHECK_CALLBACK_RECORD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KBUGCHECK_CALLBACK_RECORD = _KBUGCHECK_CALLBACK_RECORD; -pub type PKBUGCHECK_CALLBACK_RECORD = *mut _KBUGCHECK_CALLBACK_RECORD; -pub mod _KBUGCHECK_CALLBACK_REASON { - pub type Type = ::core::ffi::c_int; - pub const KbCallbackInvalid: Type = 0; - pub const KbCallbackReserved1: Type = 1; - pub const KbCallbackSecondaryDumpData: Type = 2; - pub const KbCallbackDumpIo: Type = 3; - pub const KbCallbackAddPages: Type = 4; - pub const KbCallbackSecondaryMultiPartDumpData: Type = 5; - pub const KbCallbackRemovePages: Type = 6; - pub const KbCallbackTriageDumpData: Type = 7; - pub const KbCallbackReserved2: Type = 8; -} -pub use self::_KBUGCHECK_CALLBACK_REASON::Type as KBUGCHECK_CALLBACK_REASON; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KBUGCHECK_REASON_CALLBACK_RECORD { - _unused: [u8; 0], -} -pub type KBUGCHECK_REASON_CALLBACK_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - Reason: KBUGCHECK_CALLBACK_REASON, - Record: *mut _KBUGCHECK_REASON_CALLBACK_RECORD, - ReasonSpecificData: PVOID, - ReasonSpecificDataLength: ULONG, - ), ->; -pub type PKBUGCHECK_REASON_CALLBACK_ROUTINE = KBUGCHECK_REASON_CALLBACK_ROUTINE; -pub type KBUGCHECK_REASON_CALLBACK_RECORD = _KBUGCHECK_REASON_CALLBACK_RECORD; -pub type PKBUGCHECK_REASON_CALLBACK_RECORD = *mut _KBUGCHECK_REASON_CALLBACK_RECORD; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KBUGCHECK_SECONDARY_DUMP_DATA { - pub InBuffer: PVOID, - pub InBufferLength: ULONG, - pub MaximumAllowed: ULONG, - pub Guid: GUID, - pub OutBuffer: PVOID, - pub OutBufferLength: ULONG, -} -#[test] -fn bindgen_test_layout__KBUGCHECK_SECONDARY_DUMP_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_KBUGCHECK_SECONDARY_DUMP_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KBUGCHECK_SECONDARY_DUMP_DATA>(), - 48usize, - concat!("Size of: ", stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_KBUGCHECK_SECONDARY_DUMP_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InBuffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA), - "::", - stringify!(InBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InBufferLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA), - "::", - stringify!(InBufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumAllowed) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA), - "::", - stringify!(MaximumAllowed), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Guid) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA), - "::", - stringify!(Guid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OutBuffer) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA), - "::", - stringify!(OutBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OutBufferLength) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA), - "::", - stringify!(OutBufferLength), - ), - ); -} -impl Default for _KBUGCHECK_SECONDARY_DUMP_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KBUGCHECK_SECONDARY_DUMP_DATA = _KBUGCHECK_SECONDARY_DUMP_DATA; -pub type PKBUGCHECK_SECONDARY_DUMP_DATA = *mut _KBUGCHECK_SECONDARY_DUMP_DATA; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KBUGCHECK_SECONDARY_DUMP_DATA_EX { - pub InBuffer: PVOID, - pub InBufferLength: ULONG, - pub MaximumAllowed: ULONG, - pub Guid: GUID, - pub OutBuffer: PVOID, - pub OutBufferLength: ULONG, - pub Context: PVOID, - pub Flags: ULONG, - pub DumpType: ULONG, - pub BugCheckCode: ULONG, - pub BugCheckParameter1: ULONG_PTR, - pub BugCheckParameter2: ULONG_PTR, - pub BugCheckParameter3: ULONG_PTR, - pub BugCheckParameter4: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__KBUGCHECK_SECONDARY_DUMP_DATA_EX() { - const UNINIT: ::core::mem::MaybeUninit<_KBUGCHECK_SECONDARY_DUMP_DATA_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KBUGCHECK_SECONDARY_DUMP_DATA_EX>(), - 104usize, - concat!("Size of: ", stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_KBUGCHECK_SECONDARY_DUMP_DATA_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InBuffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(InBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InBufferLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(InBufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumAllowed) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(MaximumAllowed), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Guid) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(Guid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OutBuffer) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(OutBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OutBufferLength) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(OutBufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DumpType) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(DumpType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BugCheckCode) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(BugCheckCode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BugCheckParameter1) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(BugCheckParameter1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BugCheckParameter2) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(BugCheckParameter2), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BugCheckParameter3) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(BugCheckParameter3), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BugCheckParameter4) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_SECONDARY_DUMP_DATA_EX), - "::", - stringify!(BugCheckParameter4), - ), - ); -} -impl Default for _KBUGCHECK_SECONDARY_DUMP_DATA_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KBUGCHECK_SECONDARY_DUMP_DATA_EX = _KBUGCHECK_SECONDARY_DUMP_DATA_EX; -pub type PKBUGCHECK_SECONDARY_DUMP_DATA_EX = *mut _KBUGCHECK_SECONDARY_DUMP_DATA_EX; -pub mod _KBUGCHECK_DUMP_IO_TYPE { - pub type Type = ::core::ffi::c_int; - pub const KbDumpIoInvalid: Type = 0; - pub const KbDumpIoHeader: Type = 1; - pub const KbDumpIoBody: Type = 2; - pub const KbDumpIoSecondaryData: Type = 3; - pub const KbDumpIoComplete: Type = 4; -} -pub use self::_KBUGCHECK_DUMP_IO_TYPE::Type as KBUGCHECK_DUMP_IO_TYPE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KBUGCHECK_DUMP_IO { - pub Offset: ULONG64, - pub Buffer: PVOID, - pub BufferLength: ULONG, - pub Type: KBUGCHECK_DUMP_IO_TYPE, -} -#[test] -fn bindgen_test_layout__KBUGCHECK_DUMP_IO() { - const UNINIT: ::core::mem::MaybeUninit<_KBUGCHECK_DUMP_IO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KBUGCHECK_DUMP_IO>(), - 24usize, - concat!("Size of: ", stringify!(_KBUGCHECK_DUMP_IO)), - ); - assert_eq!( - ::core::mem::align_of::<_KBUGCHECK_DUMP_IO>(), - 8usize, - concat!("Alignment of ", stringify!(_KBUGCHECK_DUMP_IO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_DUMP_IO), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_DUMP_IO), - "::", - stringify!(Buffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BufferLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_DUMP_IO), - "::", - stringify!(BufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_DUMP_IO), - "::", - stringify!(Type), - ), - ); -} -impl Default for _KBUGCHECK_DUMP_IO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KBUGCHECK_DUMP_IO = _KBUGCHECK_DUMP_IO; -pub type PKBUGCHECK_DUMP_IO = *mut _KBUGCHECK_DUMP_IO; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KBUGCHECK_ADD_PAGES { - pub Context: PVOID, - pub Flags: ULONG, - pub BugCheckCode: ULONG, - pub Address: ULONG_PTR, - pub Count: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__KBUGCHECK_ADD_PAGES() { - const UNINIT: ::core::mem::MaybeUninit<_KBUGCHECK_ADD_PAGES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KBUGCHECK_ADD_PAGES>(), - 32usize, - concat!("Size of: ", stringify!(_KBUGCHECK_ADD_PAGES)), - ); - assert_eq!( - ::core::mem::align_of::<_KBUGCHECK_ADD_PAGES>(), - 8usize, - concat!("Alignment of ", stringify!(_KBUGCHECK_ADD_PAGES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_ADD_PAGES), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_ADD_PAGES), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BugCheckCode) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_ADD_PAGES), - "::", - stringify!(BugCheckCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_ADD_PAGES), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_ADD_PAGES), - "::", - stringify!(Count), - ), - ); -} -impl Default for _KBUGCHECK_ADD_PAGES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KBUGCHECK_ADD_PAGES = _KBUGCHECK_ADD_PAGES; -pub type PKBUGCHECK_ADD_PAGES = *mut _KBUGCHECK_ADD_PAGES; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KBUGCHECK_REMOVE_PAGES { - pub Context: PVOID, - pub Flags: ULONG, - pub BugCheckCode: ULONG, - pub Address: ULONG_PTR, - pub Count: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__KBUGCHECK_REMOVE_PAGES() { - const UNINIT: ::core::mem::MaybeUninit<_KBUGCHECK_REMOVE_PAGES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KBUGCHECK_REMOVE_PAGES>(), - 32usize, - concat!("Size of: ", stringify!(_KBUGCHECK_REMOVE_PAGES)), - ); - assert_eq!( - ::core::mem::align_of::<_KBUGCHECK_REMOVE_PAGES>(), - 8usize, - concat!("Alignment of ", stringify!(_KBUGCHECK_REMOVE_PAGES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_REMOVE_PAGES), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_REMOVE_PAGES), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BugCheckCode) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_REMOVE_PAGES), - "::", - stringify!(BugCheckCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_REMOVE_PAGES), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_REMOVE_PAGES), - "::", - stringify!(Count), - ), - ); -} -impl Default for _KBUGCHECK_REMOVE_PAGES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KBUGCHECK_REMOVE_PAGES = _KBUGCHECK_REMOVE_PAGES; -pub type PKBUGCHECK_REMOVE_PAGES = *mut _KBUGCHECK_REMOVE_PAGES; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KADDRESS_RANGE { - pub Address: PVOID, - pub Size: SIZE_T, -} -#[test] -fn bindgen_test_layout__KADDRESS_RANGE() { - const UNINIT: ::core::mem::MaybeUninit<_KADDRESS_RANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KADDRESS_RANGE>(), - 16usize, - concat!("Size of: ", stringify!(_KADDRESS_RANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_KADDRESS_RANGE>(), - 8usize, - concat!("Alignment of ", stringify!(_KADDRESS_RANGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KADDRESS_RANGE), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_KADDRESS_RANGE), "::", stringify!(Size)), - ); -} -impl Default for _KADDRESS_RANGE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KADDRESS_RANGE = _KADDRESS_RANGE; -pub type PKADDRESS_RANGE = *mut _KADDRESS_RANGE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KADDRESS_RANGE_DESCRIPTOR { - pub AddressRanges: *const KADDRESS_RANGE, - pub AddressRangeCount: SIZE_T, -} -#[test] -fn bindgen_test_layout__KADDRESS_RANGE_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_KADDRESS_RANGE_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KADDRESS_RANGE_DESCRIPTOR>(), - 16usize, - concat!("Size of: ", stringify!(_KADDRESS_RANGE_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_KADDRESS_RANGE_DESCRIPTOR>(), - 8usize, - concat!("Alignment of ", stringify!(_KADDRESS_RANGE_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AddressRanges) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KADDRESS_RANGE_DESCRIPTOR), - "::", - stringify!(AddressRanges), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AddressRangeCount) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KADDRESS_RANGE_DESCRIPTOR), - "::", - stringify!(AddressRangeCount), - ), - ); -} -impl Default for _KADDRESS_RANGE_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KADDRESS_RANGE_DESCRIPTOR = _KADDRESS_RANGE_DESCRIPTOR; -pub type PKADDRESS_RANGE_DESCRIPTOR = *mut _KADDRESS_RANGE_DESCRIPTOR; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KTRIAGE_DUMP_DATA_ARRAY { - pub List: LIST_ENTRY, - pub NumBlocksUsed: ULONG, - pub NumBlocksTotal: ULONG, - pub DataSize: ULONG, - pub MaxDataSize: ULONG, - pub ComponentNameBufferLength: ULONG, - pub ComponentName: PUCHAR, - pub Blocks: [KADDRESS_RANGE; 1usize], -} -#[test] -fn bindgen_test_layout__KTRIAGE_DUMP_DATA_ARRAY() { - const UNINIT: ::core::mem::MaybeUninit<_KTRIAGE_DUMP_DATA_ARRAY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KTRIAGE_DUMP_DATA_ARRAY>(), - 64usize, - concat!("Size of: ", stringify!(_KTRIAGE_DUMP_DATA_ARRAY)), - ); - assert_eq!( - ::core::mem::align_of::<_KTRIAGE_DUMP_DATA_ARRAY>(), - 8usize, - concat!("Alignment of ", stringify!(_KTRIAGE_DUMP_DATA_ARRAY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).List) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KTRIAGE_DUMP_DATA_ARRAY), - "::", - stringify!(List), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumBlocksUsed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KTRIAGE_DUMP_DATA_ARRAY), - "::", - stringify!(NumBlocksUsed), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumBlocksTotal) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_KTRIAGE_DUMP_DATA_ARRAY), - "::", - stringify!(NumBlocksTotal), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataSize) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KTRIAGE_DUMP_DATA_ARRAY), - "::", - stringify!(DataSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxDataSize) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_KTRIAGE_DUMP_DATA_ARRAY), - "::", - stringify!(MaxDataSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ComponentNameBufferLength) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KTRIAGE_DUMP_DATA_ARRAY), - "::", - stringify!(ComponentNameBufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ComponentName) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KTRIAGE_DUMP_DATA_ARRAY), - "::", - stringify!(ComponentName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Blocks) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_KTRIAGE_DUMP_DATA_ARRAY), - "::", - stringify!(Blocks), - ), - ); -} -impl Default for _KTRIAGE_DUMP_DATA_ARRAY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KTRIAGE_DUMP_DATA_ARRAY = _KTRIAGE_DUMP_DATA_ARRAY; -pub type PKTRIAGE_DUMP_DATA_ARRAY = *mut _KTRIAGE_DUMP_DATA_ARRAY; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KBUGCHECK_TRIAGE_DUMP_DATA { - pub DataArray: PKTRIAGE_DUMP_DATA_ARRAY, - pub Flags: ULONG, - pub MaxVirtMemSize: ULONG, - pub BugCheckCode: ULONG, - pub BugCheckParameter1: ULONG_PTR, - pub BugCheckParameter2: ULONG_PTR, - pub BugCheckParameter3: ULONG_PTR, - pub BugCheckParameter4: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__KBUGCHECK_TRIAGE_DUMP_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_KBUGCHECK_TRIAGE_DUMP_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KBUGCHECK_TRIAGE_DUMP_DATA>(), - 56usize, - concat!("Size of: ", stringify!(_KBUGCHECK_TRIAGE_DUMP_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_KBUGCHECK_TRIAGE_DUMP_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_KBUGCHECK_TRIAGE_DUMP_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataArray) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_TRIAGE_DUMP_DATA), - "::", - stringify!(DataArray), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_TRIAGE_DUMP_DATA), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxVirtMemSize) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_TRIAGE_DUMP_DATA), - "::", - stringify!(MaxVirtMemSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BugCheckCode) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_TRIAGE_DUMP_DATA), - "::", - stringify!(BugCheckCode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BugCheckParameter1) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_TRIAGE_DUMP_DATA), - "::", - stringify!(BugCheckParameter1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BugCheckParameter2) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_TRIAGE_DUMP_DATA), - "::", - stringify!(BugCheckParameter2), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BugCheckParameter3) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_TRIAGE_DUMP_DATA), - "::", - stringify!(BugCheckParameter3), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BugCheckParameter4) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_KBUGCHECK_TRIAGE_DUMP_DATA), - "::", - stringify!(BugCheckParameter4), - ), - ); -} -impl Default for _KBUGCHECK_TRIAGE_DUMP_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KBUGCHECK_TRIAGE_DUMP_DATA = _KBUGCHECK_TRIAGE_DUMP_DATA; -pub type PKBUGCHECK_TRIAGE_DUMP_DATA = *mut _KBUGCHECK_TRIAGE_DUMP_DATA; -pub type NMI_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Handled: BOOLEAN) -> BOOLEAN, ->; -pub type PNMI_CALLBACK = NMI_CALLBACK; -pub mod _BOUND_CALLBACK_STATUS { - pub type Type = ::core::ffi::c_int; - pub const BoundExceptionContinueSearch: Type = 0; - pub const BoundExceptionHandled: Type = 1; - pub const BoundExceptionError: Type = 2; - pub const BoundExceptionMaximum: Type = 3; -} -pub use self::_BOUND_CALLBACK_STATUS::Type as BOUND_CALLBACK_STATUS; -pub type PBOUND_CALLBACK_STATUS = *mut _BOUND_CALLBACK_STATUS::Type; -pub type BOUND_CALLBACK = ::core::option::Option< - unsafe extern "C" fn() -> BOUND_CALLBACK_STATUS, ->; -pub type PBOUND_CALLBACK = BOUND_CALLBACK; -pub mod _MEMORY_CACHING_TYPE_ORIG { - pub type Type = ::core::ffi::c_int; - pub const MmFrameBufferCached: Type = 2; -} -pub use self::_MEMORY_CACHING_TYPE_ORIG::Type as MEMORY_CACHING_TYPE_ORIG; -pub mod _MEMORY_CACHING_TYPE { - pub type Type = ::core::ffi::c_int; - pub const MmNonCached: Type = 0; - pub const MmCached: Type = 1; - pub const MmWriteCombined: Type = 2; - pub const MmHardwareCoherentCached: Type = 3; - pub const MmNonCachedUnordered: Type = 4; - pub const MmUSWCCached: Type = 5; - pub const MmMaximumCacheType: Type = 6; - pub const MmNotMapped: Type = -1; -} -pub use self::_MEMORY_CACHING_TYPE::Type as MEMORY_CACHING_TYPE; -pub mod KE_PROCESSOR_CHANGE_NOTIFY_STATE { - pub type Type = ::core::ffi::c_int; - pub const KeProcessorAddStartNotify: Type = 0; - pub const KeProcessorAddCompleteNotify: Type = 1; - pub const KeProcessorAddFailureNotify: Type = 2; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT { - pub State: KE_PROCESSOR_CHANGE_NOTIFY_STATE::Type, - pub NtNumber: ULONG, - pub Status: NTSTATUS, - pub ProcNumber: PROCESSOR_NUMBER, -} -#[test] -fn bindgen_test_layout__KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT>(), - 16usize, - concat!("Size of: ", stringify!(_KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT>(), - 4usize, - concat!("Alignment of ", stringify!(_KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).State) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT), - "::", - stringify!(State), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NtNumber) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT), - "::", - stringify!(NtNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProcNumber) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT), - "::", - stringify!(ProcNumber), - ), - ); -} -impl Default for _KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT = _KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT; -pub type PKE_PROCESSOR_CHANGE_NOTIFY_CONTEXT = *mut _KE_PROCESSOR_CHANGE_NOTIFY_CONTEXT; -pub type PROCESSOR_CALLBACK_FUNCTION = ::core::option::Option< - unsafe extern "C" fn( - CallbackContext: PVOID, - ChangeContext: PKE_PROCESSOR_CHANGE_NOTIFY_CONTEXT, - OperationStatus: PNTSTATUS, - ), ->; -pub type PPROCESSOR_CALLBACK_FUNCTION = PROCESSOR_CALLBACK_FUNCTION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XSTATE_SAVE { - pub Prev: *mut _XSTATE_SAVE, - pub Thread: *mut _KTHREAD, - pub Level: UCHAR, - pub XStateContext: XSTATE_CONTEXT, -} -#[test] -fn bindgen_test_layout__XSTATE_SAVE() { - const UNINIT: ::core::mem::MaybeUninit<_XSTATE_SAVE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_XSTATE_SAVE>(), - 56usize, - concat!("Size of: ", stringify!(_XSTATE_SAVE)), - ); - assert_eq!( - ::core::mem::align_of::<_XSTATE_SAVE>(), - 8usize, - concat!("Alignment of ", stringify!(_XSTATE_SAVE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Prev) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_XSTATE_SAVE), "::", stringify!(Prev)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Thread) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_XSTATE_SAVE), "::", stringify!(Thread)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Level) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_XSTATE_SAVE), "::", stringify!(Level)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).XStateContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_SAVE), - "::", - stringify!(XStateContext), - ), - ); -} -impl Default for _XSTATE_SAVE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type XSTATE_SAVE = _XSTATE_SAVE; -pub type PXSTATE_SAVE = *mut _XSTATE_SAVE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EXT_SET_PARAMETERS_V0 { - pub Version: ULONG, - pub Reserved: ULONG, - pub NoWakeTolerance: LONGLONG, -} -#[test] -fn bindgen_test_layout__EXT_SET_PARAMETERS_V0() { - const UNINIT: ::core::mem::MaybeUninit<_EXT_SET_PARAMETERS_V0> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EXT_SET_PARAMETERS_V0>(), - 16usize, - concat!("Size of: ", stringify!(_EXT_SET_PARAMETERS_V0)), - ); - assert_eq!( - ::core::mem::align_of::<_EXT_SET_PARAMETERS_V0>(), - 8usize, - concat!("Alignment of ", stringify!(_EXT_SET_PARAMETERS_V0)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EXT_SET_PARAMETERS_V0), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_EXT_SET_PARAMETERS_V0), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NoWakeTolerance) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EXT_SET_PARAMETERS_V0), - "::", - stringify!(NoWakeTolerance), - ), - ); -} -pub type EXT_SET_PARAMETERS = _EXT_SET_PARAMETERS_V0; -pub type PEXT_SET_PARAMETERS = *mut _EXT_SET_PARAMETERS_V0; -pub type KT2_SET_PARAMETERS = EXT_SET_PARAMETERS; -pub type PKT2_SET_PARAMETERS = *mut EXT_SET_PARAMETERS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KWAIT_CHAIN { - pub Head: PVOID, -} -#[test] -fn bindgen_test_layout__KWAIT_CHAIN() { - const UNINIT: ::core::mem::MaybeUninit<_KWAIT_CHAIN> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KWAIT_CHAIN>(), - 8usize, - concat!("Size of: ", stringify!(_KWAIT_CHAIN)), - ); - assert_eq!( - ::core::mem::align_of::<_KWAIT_CHAIN>(), - 8usize, - concat!("Alignment of ", stringify!(_KWAIT_CHAIN)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Head) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_KWAIT_CHAIN), "::", stringify!(Head)), - ); -} -impl Default for _KWAIT_CHAIN { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KWAIT_CHAIN = _KWAIT_CHAIN; -pub type PKWAIT_CHAIN = *mut _KWAIT_CHAIN; -pub mod _KD_OPTION { - pub type Type = ::core::ffi::c_int; - pub const KD_OPTION_SET_BLOCK_ENABLE: Type = 0; -} -pub use self::_KD_OPTION::Type as KD_OPTION; -pub mod _POOL_TYPE { - pub type Type = ::core::ffi::c_int; - pub const NonPagedPool: Type = 0; - pub const NonPagedPoolExecute: Type = 0; - pub const PagedPool: Type = 1; - pub const NonPagedPoolMustSucceed: Type = 2; - pub const DontUseThisType: Type = 3; - pub const NonPagedPoolCacheAligned: Type = 4; - pub const PagedPoolCacheAligned: Type = 5; - pub const NonPagedPoolCacheAlignedMustS: Type = 6; - pub const MaxPoolType: Type = 7; - pub const NonPagedPoolBase: Type = 0; - pub const NonPagedPoolBaseMustSucceed: Type = 2; - pub const NonPagedPoolBaseCacheAligned: Type = 4; - pub const NonPagedPoolBaseCacheAlignedMustS: Type = 6; - pub const NonPagedPoolSession: Type = 32; - pub const PagedPoolSession: Type = 33; - pub const NonPagedPoolMustSucceedSession: Type = 34; - pub const DontUseThisTypeSession: Type = 35; - pub const NonPagedPoolCacheAlignedSession: Type = 36; - pub const PagedPoolCacheAlignedSession: Type = 37; - pub const NonPagedPoolCacheAlignedMustSSession: Type = 38; - pub const NonPagedPoolNx: Type = 512; - pub const NonPagedPoolNxCacheAligned: Type = 516; - pub const NonPagedPoolSessionNx: Type = 544; -} -pub mod _EX_POOL_PRIORITY { - pub type Type = ::core::ffi::c_int; - pub const LowPoolPriority: Type = 0; - pub const LowPoolPrioritySpecialPoolOverrun: Type = 8; - pub const LowPoolPrioritySpecialPoolUnderrun: Type = 9; - pub const NormalPoolPriority: Type = 16; - pub const NormalPoolPrioritySpecialPoolOverrun: Type = 24; - pub const NormalPoolPrioritySpecialPoolUnderrun: Type = 25; - pub const HighPoolPriority: Type = 32; - pub const HighPoolPrioritySpecialPoolOverrun: Type = 40; - pub const HighPoolPrioritySpecialPoolUnderrun: Type = 41; -} -pub use self::_EX_POOL_PRIORITY::Type as EX_POOL_PRIORITY; -pub mod POOL_EXTENDED_PARAMETER_TYPE { - pub type Type = ::core::ffi::c_int; - pub const PoolExtendedParameterInvalidType: Type = 0; - pub const PoolExtendedParameterPriority: Type = 1; - pub const PoolExtendedParameterSecurePool: Type = 2; - pub const PoolExtendedParameterNumaNode: Type = 3; - pub const PoolExtendedParameterMax: Type = 4; -} -pub type PPOOL_EXTENDED_PARAMETER_TYPE = *mut POOL_EXTENDED_PARAMETER_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _POOL_EXTENDED_PARAMS_SECURE_POOL { - pub SecurePoolHandle: HANDLE, - pub Buffer: PVOID, - pub Cookie: ULONG_PTR, - pub SecurePoolFlags: ULONG, -} -#[test] -fn bindgen_test_layout__POOL_EXTENDED_PARAMS_SECURE_POOL() { - const UNINIT: ::core::mem::MaybeUninit<_POOL_EXTENDED_PARAMS_SECURE_POOL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POOL_EXTENDED_PARAMS_SECURE_POOL>(), - 32usize, - concat!("Size of: ", stringify!(_POOL_EXTENDED_PARAMS_SECURE_POOL)), - ); - assert_eq!( - ::core::mem::align_of::<_POOL_EXTENDED_PARAMS_SECURE_POOL>(), - 8usize, - concat!("Alignment of ", stringify!(_POOL_EXTENDED_PARAMS_SECURE_POOL)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurePoolHandle) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POOL_EXTENDED_PARAMS_SECURE_POOL), - "::", - stringify!(SecurePoolHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_POOL_EXTENDED_PARAMS_SECURE_POOL), - "::", - stringify!(Buffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cookie) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_POOL_EXTENDED_PARAMS_SECURE_POOL), - "::", - stringify!(Cookie), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecurePoolFlags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_POOL_EXTENDED_PARAMS_SECURE_POOL), - "::", - stringify!(SecurePoolFlags), - ), - ); -} -impl Default for _POOL_EXTENDED_PARAMS_SECURE_POOL { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type POOL_EXTENDED_PARAMS_SECURE_POOL = _POOL_EXTENDED_PARAMS_SECURE_POOL; -pub type POOL_NODE_REQUIREMENT = ULONG; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _POOL_EXTENDED_PARAMETER { - pub __bindgen_anon_1: _POOL_EXTENDED_PARAMETER__bindgen_ty_1, - pub __bindgen_anon_2: _POOL_EXTENDED_PARAMETER__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _POOL_EXTENDED_PARAMETER__bindgen_ty_1 { - pub _bitfield_align_1: [u64; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__POOL_EXTENDED_PARAMETER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_POOL_EXTENDED_PARAMETER__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_POOL_EXTENDED_PARAMETER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_POOL_EXTENDED_PARAMETER__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_POOL_EXTENDED_PARAMETER__bindgen_ty_1)), - ); -} -impl _POOL_EXTENDED_PARAMETER__bindgen_ty_1 { - #[inline] - pub fn Type(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u64) } - } - #[inline] - pub fn set_Type(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn Optional(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } - } - #[inline] - pub fn set_Optional(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 55u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 55u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Type: ULONG64, - Optional: ULONG64, - Reserved: ULONG64, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let Type: u64 = unsafe { ::core::mem::transmute(Type) }; - Type as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let Optional: u64 = unsafe { ::core::mem::transmute(Optional) }; - Optional as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 55u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _POOL_EXTENDED_PARAMETER__bindgen_ty_2 { - pub Reserved2: ULONG64, - pub Reserved3: PVOID, - pub Priority: EX_POOL_PRIORITY, - pub SecurePoolParams: *mut POOL_EXTENDED_PARAMS_SECURE_POOL, - pub PreferredNode: POOL_NODE_REQUIREMENT, -} -#[test] -fn bindgen_test_layout__POOL_EXTENDED_PARAMETER__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_POOL_EXTENDED_PARAMETER__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POOL_EXTENDED_PARAMETER__bindgen_ty_2>(), - 8usize, - concat!("Size of: ", stringify!(_POOL_EXTENDED_PARAMETER__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_POOL_EXTENDED_PARAMETER__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(_POOL_EXTENDED_PARAMETER__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POOL_EXTENDED_PARAMETER__bindgen_ty_2), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved3) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POOL_EXTENDED_PARAMETER__bindgen_ty_2), - "::", - stringify!(Reserved3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Priority) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POOL_EXTENDED_PARAMETER__bindgen_ty_2), - "::", - stringify!(Priority), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurePoolParams) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POOL_EXTENDED_PARAMETER__bindgen_ty_2), - "::", - stringify!(SecurePoolParams), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PreferredNode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POOL_EXTENDED_PARAMETER__bindgen_ty_2), - "::", - stringify!(PreferredNode), - ), - ); -} -impl Default for _POOL_EXTENDED_PARAMETER__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__POOL_EXTENDED_PARAMETER() { - assert_eq!( - ::core::mem::size_of::<_POOL_EXTENDED_PARAMETER>(), - 16usize, - concat!("Size of: ", stringify!(_POOL_EXTENDED_PARAMETER)), - ); - assert_eq!( - ::core::mem::align_of::<_POOL_EXTENDED_PARAMETER>(), - 8usize, - concat!("Alignment of ", stringify!(_POOL_EXTENDED_PARAMETER)), - ); -} -impl Default for _POOL_EXTENDED_PARAMETER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type POOL_EXTENDED_PARAMETER = _POOL_EXTENDED_PARAMETER; -pub type PPOOL_EXTENDED_PARAMETER = *mut _POOL_EXTENDED_PARAMETER; -pub type PCPOOL_EXTENDED_PARAMETER = *const POOL_EXTENDED_PARAMETER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _POOL_CREATE_EXTENDED_PARAMS { - pub Version: ULONG, -} -#[test] -fn bindgen_test_layout__POOL_CREATE_EXTENDED_PARAMS() { - const UNINIT: ::core::mem::MaybeUninit<_POOL_CREATE_EXTENDED_PARAMS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POOL_CREATE_EXTENDED_PARAMS>(), - 4usize, - concat!("Size of: ", stringify!(_POOL_CREATE_EXTENDED_PARAMS)), - ); - assert_eq!( - ::core::mem::align_of::<_POOL_CREATE_EXTENDED_PARAMS>(), - 4usize, - concat!("Alignment of ", stringify!(_POOL_CREATE_EXTENDED_PARAMS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POOL_CREATE_EXTENDED_PARAMS), - "::", - stringify!(Version), - ), - ); -} -pub type POOL_CREATE_EXTENDED_PARAMS = _POOL_CREATE_EXTENDED_PARAMS; -pub type PPOOL_CREATE_EXTENDED_PARAMS = *mut _POOL_CREATE_EXTENDED_PARAMS; -#[repr(C)] -#[repr(align(16))] -#[derive(Copy, Clone)] -pub struct _LOOKASIDE_LIST_EX { - pub L: GENERAL_LOOKASIDE_POOL, -} -#[test] -fn bindgen_test_layout__LOOKASIDE_LIST_EX() { - const UNINIT: ::core::mem::MaybeUninit<_LOOKASIDE_LIST_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LOOKASIDE_LIST_EX>(), - 96usize, - concat!("Size of: ", stringify!(_LOOKASIDE_LIST_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_LOOKASIDE_LIST_EX>(), - 16usize, - concat!("Alignment of ", stringify!(_LOOKASIDE_LIST_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).L) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_LOOKASIDE_LIST_EX), "::", stringify!(L)), - ); -} -impl Default for _LOOKASIDE_LIST_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type LOOKASIDE_LIST_EX = _LOOKASIDE_LIST_EX; -#[repr(C)] -#[repr(align(64))] -#[derive(Copy, Clone)] -pub struct _NPAGED_LOOKASIDE_LIST { - pub L: GENERAL_LOOKASIDE, -} -#[test] -fn bindgen_test_layout__NPAGED_LOOKASIDE_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_NPAGED_LOOKASIDE_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NPAGED_LOOKASIDE_LIST>(), - 128usize, - concat!("Size of: ", stringify!(_NPAGED_LOOKASIDE_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_NPAGED_LOOKASIDE_LIST>(), - 64usize, - concat!("Alignment of ", stringify!(_NPAGED_LOOKASIDE_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).L) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NPAGED_LOOKASIDE_LIST), - "::", - stringify!(L), - ), - ); -} -impl Default for _NPAGED_LOOKASIDE_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type NPAGED_LOOKASIDE_LIST = _NPAGED_LOOKASIDE_LIST; -pub type PNPAGED_LOOKASIDE_LIST = *mut _NPAGED_LOOKASIDE_LIST; -#[repr(C)] -#[repr(align(64))] -#[derive(Copy, Clone)] -pub struct _PAGED_LOOKASIDE_LIST { - pub L: GENERAL_LOOKASIDE, -} -#[test] -fn bindgen_test_layout__PAGED_LOOKASIDE_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_PAGED_LOOKASIDE_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PAGED_LOOKASIDE_LIST>(), - 128usize, - concat!("Size of: ", stringify!(_PAGED_LOOKASIDE_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_PAGED_LOOKASIDE_LIST>(), - 64usize, - concat!("Alignment of ", stringify!(_PAGED_LOOKASIDE_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).L) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PAGED_LOOKASIDE_LIST), - "::", - stringify!(L), - ), - ); -} -impl Default for _PAGED_LOOKASIDE_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PAGED_LOOKASIDE_LIST = _PAGED_LOOKASIDE_LIST; -pub type PPAGED_LOOKASIDE_LIST = *mut _PAGED_LOOKASIDE_LIST; -pub mod _WORK_QUEUE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const CriticalWorkQueue: Type = 0; - pub const DelayedWorkQueue: Type = 1; - pub const HyperCriticalWorkQueue: Type = 2; - pub const NormalWorkQueue: Type = 3; - pub const BackgroundWorkQueue: Type = 4; - pub const RealTimeWorkQueue: Type = 5; - pub const SuperCriticalWorkQueue: Type = 6; - pub const MaximumWorkQueue: Type = 7; - pub const CustomPriorityWorkQueue: Type = 32; -} -pub use self::_WORK_QUEUE_TYPE::Type as WORK_QUEUE_TYPE; -pub type WORKER_THREAD_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(Parameter: PVOID), ->; -pub type PWORKER_THREAD_ROUTINE = WORKER_THREAD_ROUTINE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WORK_QUEUE_ITEM { - pub List: LIST_ENTRY, - pub WorkerRoutine: PWORKER_THREAD_ROUTINE, - pub Parameter: PVOID, -} -#[test] -fn bindgen_test_layout__WORK_QUEUE_ITEM() { - const UNINIT: ::core::mem::MaybeUninit<_WORK_QUEUE_ITEM> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WORK_QUEUE_ITEM>(), - 32usize, - concat!("Size of: ", stringify!(_WORK_QUEUE_ITEM)), - ); - assert_eq!( - ::core::mem::align_of::<_WORK_QUEUE_ITEM>(), - 8usize, - concat!("Alignment of ", stringify!(_WORK_QUEUE_ITEM)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).List) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WORK_QUEUE_ITEM), - "::", - stringify!(List), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WorkerRoutine) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WORK_QUEUE_ITEM), - "::", - stringify!(WorkerRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameter) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WORK_QUEUE_ITEM), - "::", - stringify!(Parameter), - ), - ); -} -impl Default for _WORK_QUEUE_ITEM { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WORK_QUEUE_ITEM = _WORK_QUEUE_ITEM; -pub type PWORK_QUEUE_ITEM = *mut _WORK_QUEUE_ITEM; -pub type ERESOURCE_THREAD = ULONG_PTR; -pub type PERESOURCE_THREAD = *mut ERESOURCE_THREAD; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _OWNER_ENTRY { - pub OwnerThread: ERESOURCE_THREAD, - pub __bindgen_anon_1: _OWNER_ENTRY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _OWNER_ENTRY__bindgen_ty_1 { - pub __bindgen_anon_1: _OWNER_ENTRY__bindgen_ty_1__bindgen_ty_1, - pub TableSize: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _OWNER_ENTRY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__OWNER_ENTRY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_OWNER_ENTRY__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_OWNER_ENTRY__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_OWNER_ENTRY__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_OWNER_ENTRY__bindgen_ty_1__bindgen_ty_1)), - ); -} -impl _OWNER_ENTRY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn IoPriorityBoosted(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoPriorityBoosted(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn OwnerReferenced(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_OwnerReferenced(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoQoSPriorityBoosted(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoQoSPriorityBoosted(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn OwnerCount(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } - } - #[inline] - pub fn set_OwnerCount(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 29u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - IoPriorityBoosted: ULONG, - OwnerReferenced: ULONG, - IoQoSPriorityBoosted: ULONG, - OwnerCount: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let IoPriorityBoosted: u32 = unsafe { - ::core::mem::transmute(IoPriorityBoosted) - }; - IoPriorityBoosted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let OwnerReferenced: u32 = unsafe { - ::core::mem::transmute(OwnerReferenced) - }; - OwnerReferenced as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let IoQoSPriorityBoosted: u32 = unsafe { - ::core::mem::transmute(IoQoSPriorityBoosted) - }; - IoQoSPriorityBoosted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 29u8, - { - let OwnerCount: u32 = unsafe { ::core::mem::transmute(OwnerCount) }; - OwnerCount as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__OWNER_ENTRY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_OWNER_ENTRY__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OWNER_ENTRY__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_OWNER_ENTRY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_OWNER_ENTRY__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_OWNER_ENTRY__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TableSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OWNER_ENTRY__bindgen_ty_1), - "::", - stringify!(TableSize), - ), - ); -} -impl Default for _OWNER_ENTRY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__OWNER_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_OWNER_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OWNER_ENTRY>(), - 16usize, - concat!("Size of: ", stringify!(_OWNER_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_OWNER_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_OWNER_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OwnerThread) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OWNER_ENTRY), - "::", - stringify!(OwnerThread), - ), - ); -} -impl Default for _OWNER_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OWNER_ENTRY = _OWNER_ENTRY; -pub type POWNER_ENTRY = *mut _OWNER_ENTRY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _ERESOURCE { - pub SystemResourcesList: LIST_ENTRY, - pub OwnerTable: POWNER_ENTRY, - pub ActiveCount: SHORT, - pub __bindgen_anon_1: _ERESOURCE__bindgen_ty_1, - pub SharedWaiters: PVOID, - pub ExclusiveWaiters: PVOID, - pub OwnerEntry: OWNER_ENTRY, - pub ActiveEntries: ULONG, - pub ContentionCount: ULONG, - pub NumberOfSharedWaiters: ULONG, - pub NumberOfExclusiveWaiters: ULONG, - pub Reserved2: PVOID, - pub __bindgen_anon_2: _ERESOURCE__bindgen_ty_2, - pub SpinLock: KSPIN_LOCK, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _ERESOURCE__bindgen_ty_1 { - pub Flag: USHORT, - pub __bindgen_anon_1: _ERESOURCE__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ERESOURCE__bindgen_ty_1__bindgen_ty_1 { - pub ReservedLowFlags: UCHAR, - pub WaiterPriority: UCHAR, -} -#[test] -fn bindgen_test_layout__ERESOURCE__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_ERESOURCE__bindgen_ty_1__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ERESOURCE__bindgen_ty_1__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_ERESOURCE__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_ERESOURCE__bindgen_ty_1__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_ERESOURCE__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReservedLowFlags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ReservedLowFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WaiterPriority) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(WaiterPriority), - ), - ); -} -#[test] -fn bindgen_test_layout__ERESOURCE__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_ERESOURCE__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ERESOURCE__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_ERESOURCE__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_ERESOURCE__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_ERESOURCE__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE__bindgen_ty_1), - "::", - stringify!(Flag), - ), - ); -} -impl Default for _ERESOURCE__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _ERESOURCE__bindgen_ty_2 { - pub Address: PVOID, - pub CreatorBackTraceIndex: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__ERESOURCE__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_ERESOURCE__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ERESOURCE__bindgen_ty_2>(), - 8usize, - concat!("Size of: ", stringify!(_ERESOURCE__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_ERESOURCE__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(_ERESOURCE__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE__bindgen_ty_2), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CreatorBackTraceIndex) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE__bindgen_ty_2), - "::", - stringify!(CreatorBackTraceIndex), - ), - ); -} -impl Default for _ERESOURCE__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__ERESOURCE() { - const UNINIT: ::core::mem::MaybeUninit<_ERESOURCE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ERESOURCE>(), - 104usize, - concat!("Size of: ", stringify!(_ERESOURCE)), - ); - assert_eq!( - ::core::mem::align_of::<_ERESOURCE>(), - 8usize, - concat!("Alignment of ", stringify!(_ERESOURCE)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SystemResourcesList) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE), - "::", - stringify!(SystemResourcesList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OwnerTable) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE), - "::", - stringify!(OwnerTable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ActiveCount) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE), - "::", - stringify!(ActiveCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SharedWaiters) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE), - "::", - stringify!(SharedWaiters), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExclusiveWaiters) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE), - "::", - stringify!(ExclusiveWaiters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OwnerEntry) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE), - "::", - stringify!(OwnerEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ActiveEntries) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE), - "::", - stringify!(ActiveEntries), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContentionCount) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE), - "::", - stringify!(ContentionCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfSharedWaiters) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE), - "::", - stringify!(NumberOfSharedWaiters), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfExclusiveWaiters) as usize - - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_ERESOURCE), - "::", - stringify!(NumberOfExclusiveWaiters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(_ERESOURCE), "::", stringify!(Reserved2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SpinLock) as usize - ptr as usize }, - 96usize, - concat!("Offset of field: ", stringify!(_ERESOURCE), "::", stringify!(SpinLock)), - ); -} -impl Default for _ERESOURCE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ERESOURCE = _ERESOURCE; -pub type PERESOURCE = *mut _ERESOURCE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RESOURCE_HASH_ENTRY { - pub ListEntry: LIST_ENTRY, - pub Address: PVOID, - pub ContentionCount: ULONG, - pub Number: ULONG, -} -#[test] -fn bindgen_test_layout__RESOURCE_HASH_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_RESOURCE_HASH_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RESOURCE_HASH_ENTRY>(), - 32usize, - concat!("Size of: ", stringify!(_RESOURCE_HASH_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_RESOURCE_HASH_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_RESOURCE_HASH_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ListEntry) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_HASH_ENTRY), - "::", - stringify!(ListEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_HASH_ENTRY), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContentionCount) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_HASH_ENTRY), - "::", - stringify!(ContentionCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Number) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_HASH_ENTRY), - "::", - stringify!(Number), - ), - ); -} -impl Default for _RESOURCE_HASH_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RESOURCE_HASH_ENTRY = _RESOURCE_HASH_ENTRY; -pub type PRESOURCE_HASH_ENTRY = *mut _RESOURCE_HASH_ENTRY; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RESOURCE_PERFORMANCE_DATA { - pub ActiveResourceCount: ULONG, - pub TotalResourceCount: ULONG, - pub ExclusiveAcquire: ULONG, - pub SharedFirstLevel: ULONG, - pub SharedSecondLevel: ULONG, - pub StarveFirstLevel: ULONG, - pub StarveSecondLevel: ULONG, - pub WaitForExclusive: ULONG, - pub OwnerTableExpands: ULONG, - pub MaximumTableExpand: ULONG, - pub HashTable: [LIST_ENTRY; 64usize], -} -#[test] -fn bindgen_test_layout__RESOURCE_PERFORMANCE_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_RESOURCE_PERFORMANCE_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RESOURCE_PERFORMANCE_DATA>(), - 1064usize, - concat!("Size of: ", stringify!(_RESOURCE_PERFORMANCE_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_RESOURCE_PERFORMANCE_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_RESOURCE_PERFORMANCE_DATA)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ActiveResourceCount) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_PERFORMANCE_DATA), - "::", - stringify!(ActiveResourceCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalResourceCount) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_PERFORMANCE_DATA), - "::", - stringify!(TotalResourceCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExclusiveAcquire) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_PERFORMANCE_DATA), - "::", - stringify!(ExclusiveAcquire), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SharedFirstLevel) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_PERFORMANCE_DATA), - "::", - stringify!(SharedFirstLevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SharedSecondLevel) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_PERFORMANCE_DATA), - "::", - stringify!(SharedSecondLevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StarveFirstLevel) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_PERFORMANCE_DATA), - "::", - stringify!(StarveFirstLevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StarveSecondLevel) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_PERFORMANCE_DATA), - "::", - stringify!(StarveSecondLevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WaitForExclusive) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_PERFORMANCE_DATA), - "::", - stringify!(WaitForExclusive), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OwnerTableExpands) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_PERFORMANCE_DATA), - "::", - stringify!(OwnerTableExpands), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumTableExpand) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_PERFORMANCE_DATA), - "::", - stringify!(MaximumTableExpand), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HashTable) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_RESOURCE_PERFORMANCE_DATA), - "::", - stringify!(HashTable), - ), - ); -} -impl Default for _RESOURCE_PERFORMANCE_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RESOURCE_PERFORMANCE_DATA = _RESOURCE_PERFORMANCE_DATA; -pub type PRESOURCE_PERFORMANCE_DATA = *mut _RESOURCE_PERFORMANCE_DATA; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _EX_RUNDOWN_REF { - pub __bindgen_anon_1: _EX_RUNDOWN_REF__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _EX_RUNDOWN_REF__bindgen_ty_1 { - pub Count: ULONG_PTR, - pub Ptr: PVOID, -} -#[test] -fn bindgen_test_layout__EX_RUNDOWN_REF__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_EX_RUNDOWN_REF__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EX_RUNDOWN_REF__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_EX_RUNDOWN_REF__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_EX_RUNDOWN_REF__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_EX_RUNDOWN_REF__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EX_RUNDOWN_REF__bindgen_ty_1), - "::", - stringify!(Count), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EX_RUNDOWN_REF__bindgen_ty_1), - "::", - stringify!(Ptr), - ), - ); -} -impl Default for _EX_RUNDOWN_REF__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__EX_RUNDOWN_REF() { - assert_eq!( - ::core::mem::size_of::<_EX_RUNDOWN_REF>(), - 8usize, - concat!("Size of: ", stringify!(_EX_RUNDOWN_REF)), - ); - assert_eq!( - ::core::mem::align_of::<_EX_RUNDOWN_REF>(), - 8usize, - concat!("Alignment of ", stringify!(_EX_RUNDOWN_REF)), - ); -} -impl Default for _EX_RUNDOWN_REF { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type EX_RUNDOWN_REF = _EX_RUNDOWN_REF; -pub type PEX_RUNDOWN_REF = *mut _EX_RUNDOWN_REF; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _EX_RUNDOWN_REF_CACHE_AWARE { - _unused: [u8; 0], -} -pub type PEX_RUNDOWN_REF_CACHE_AWARE = *mut _EX_RUNDOWN_REF_CACHE_AWARE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _EX_TIMER { - _unused: [u8; 0], -} -pub type PEX_TIMER = *mut _EX_TIMER; -pub type EXT_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Timer: PEX_TIMER, Context: PVOID), ->; -pub type PEXT_CALLBACK = EXT_CALLBACK; -pub type EXT_DELETE_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID), ->; -pub type PEXT_DELETE_CALLBACK = EXT_DELETE_CALLBACK; -pub type PEXT_CANCEL_PARAMETERS = PVOID; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _EXT_DELETE_PARAMETERS { - pub Version: ULONG, - pub Reserved: ULONG, - pub DeleteCallback: PEXT_DELETE_CALLBACK, - pub DeleteContext: PVOID, -} -#[test] -fn bindgen_test_layout__EXT_DELETE_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_EXT_DELETE_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EXT_DELETE_PARAMETERS>(), - 24usize, - concat!("Size of: ", stringify!(_EXT_DELETE_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_EXT_DELETE_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_EXT_DELETE_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EXT_DELETE_PARAMETERS), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_EXT_DELETE_PARAMETERS), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeleteCallback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EXT_DELETE_PARAMETERS), - "::", - stringify!(DeleteCallback), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeleteContext) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_EXT_DELETE_PARAMETERS), - "::", - stringify!(DeleteContext), - ), - ); -} -impl Default for _EXT_DELETE_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type EXT_DELETE_PARAMETERS = _EXT_DELETE_PARAMETERS; -pub type PEXT_DELETE_PARAMETERS = *mut _EXT_DELETE_PARAMETERS; -pub type CALLBACK_FUNCTION = ::core::option::Option< - unsafe extern "C" fn(CallbackContext: PVOID, Argument1: PVOID, Argument2: PVOID), ->; -pub type PCALLBACK_FUNCTION = CALLBACK_FUNCTION; -pub type EX_SPIN_LOCK = LONG; -pub type PEX_SPIN_LOCK = *mut LONG; -pub type EX_CALLBACK_FUNCTION = ::core::option::Option< - unsafe extern "C" fn( - CallbackContext: PVOID, - Argument1: PVOID, - Argument2: PVOID, - ) -> NTSTATUS, ->; -pub type PEX_CALLBACK_FUNCTION = EX_CALLBACK_FUNCTION; -pub mod _REG_NOTIFY_CLASS { - pub type Type = ::core::ffi::c_int; - pub const RegNtDeleteKey: Type = 0; - pub const RegNtPreDeleteKey: Type = 0; - pub const RegNtSetValueKey: Type = 1; - pub const RegNtPreSetValueKey: Type = 1; - pub const RegNtDeleteValueKey: Type = 2; - pub const RegNtPreDeleteValueKey: Type = 2; - pub const RegNtSetInformationKey: Type = 3; - pub const RegNtPreSetInformationKey: Type = 3; - pub const RegNtRenameKey: Type = 4; - pub const RegNtPreRenameKey: Type = 4; - pub const RegNtEnumerateKey: Type = 5; - pub const RegNtPreEnumerateKey: Type = 5; - pub const RegNtEnumerateValueKey: Type = 6; - pub const RegNtPreEnumerateValueKey: Type = 6; - pub const RegNtQueryKey: Type = 7; - pub const RegNtPreQueryKey: Type = 7; - pub const RegNtQueryValueKey: Type = 8; - pub const RegNtPreQueryValueKey: Type = 8; - pub const RegNtQueryMultipleValueKey: Type = 9; - pub const RegNtPreQueryMultipleValueKey: Type = 9; - pub const RegNtPreCreateKey: Type = 10; - pub const RegNtPostCreateKey: Type = 11; - pub const RegNtPreOpenKey: Type = 12; - pub const RegNtPostOpenKey: Type = 13; - pub const RegNtKeyHandleClose: Type = 14; - pub const RegNtPreKeyHandleClose: Type = 14; - pub const RegNtPostDeleteKey: Type = 15; - pub const RegNtPostSetValueKey: Type = 16; - pub const RegNtPostDeleteValueKey: Type = 17; - pub const RegNtPostSetInformationKey: Type = 18; - pub const RegNtPostRenameKey: Type = 19; - pub const RegNtPostEnumerateKey: Type = 20; - pub const RegNtPostEnumerateValueKey: Type = 21; - pub const RegNtPostQueryKey: Type = 22; - pub const RegNtPostQueryValueKey: Type = 23; - pub const RegNtPostQueryMultipleValueKey: Type = 24; - pub const RegNtPostKeyHandleClose: Type = 25; - pub const RegNtPreCreateKeyEx: Type = 26; - pub const RegNtPostCreateKeyEx: Type = 27; - pub const RegNtPreOpenKeyEx: Type = 28; - pub const RegNtPostOpenKeyEx: Type = 29; - pub const RegNtPreFlushKey: Type = 30; - pub const RegNtPostFlushKey: Type = 31; - pub const RegNtPreLoadKey: Type = 32; - pub const RegNtPostLoadKey: Type = 33; - pub const RegNtPreUnLoadKey: Type = 34; - pub const RegNtPostUnLoadKey: Type = 35; - pub const RegNtPreQueryKeySecurity: Type = 36; - pub const RegNtPostQueryKeySecurity: Type = 37; - pub const RegNtPreSetKeySecurity: Type = 38; - pub const RegNtPostSetKeySecurity: Type = 39; - pub const RegNtCallbackObjectContextCleanup: Type = 40; - pub const RegNtPreRestoreKey: Type = 41; - pub const RegNtPostRestoreKey: Type = 42; - pub const RegNtPreSaveKey: Type = 43; - pub const RegNtPostSaveKey: Type = 44; - pub const RegNtPreReplaceKey: Type = 45; - pub const RegNtPostReplaceKey: Type = 46; - pub const RegNtPreQueryKeyName: Type = 47; - pub const RegNtPostQueryKeyName: Type = 48; - pub const RegNtPreSaveMergedKey: Type = 49; - pub const RegNtPostSaveMergedKey: Type = 50; - pub const MaxRegNtNotifyClass: Type = 51; -} -pub use self::_REG_NOTIFY_CLASS::Type as REG_NOTIFY_CLASS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_DELETE_KEY_INFORMATION { - pub Object: PVOID, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_DELETE_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_DELETE_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_DELETE_KEY_INFORMATION>(), - 32usize, - concat!("Size of: ", stringify!(_REG_DELETE_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_DELETE_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_DELETE_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_DELETE_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_DELETE_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_DELETE_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_DELETE_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_DELETE_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_DELETE_KEY_INFORMATION = _REG_DELETE_KEY_INFORMATION; -pub type PREG_DELETE_KEY_INFORMATION = *mut _REG_DELETE_KEY_INFORMATION; -pub type REG_FLUSH_KEY_INFORMATION = _REG_DELETE_KEY_INFORMATION; -pub type PREG_FLUSH_KEY_INFORMATION = *mut _REG_DELETE_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_SET_VALUE_KEY_INFORMATION { - pub Object: PVOID, - pub ValueName: PUNICODE_STRING, - pub TitleIndex: ULONG, - pub Type: ULONG, - pub Data: PVOID, - pub DataSize: ULONG, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_SET_VALUE_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_SET_VALUE_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_SET_VALUE_KEY_INFORMATION>(), - 64usize, - concat!("Size of: ", stringify!(_REG_SET_VALUE_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_SET_VALUE_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_SET_VALUE_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_VALUE_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValueName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_VALUE_KEY_INFORMATION), - "::", - stringify!(ValueName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TitleIndex) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_VALUE_KEY_INFORMATION), - "::", - stringify!(TitleIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_VALUE_KEY_INFORMATION), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_VALUE_KEY_INFORMATION), - "::", - stringify!(Data), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataSize) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_VALUE_KEY_INFORMATION), - "::", - stringify!(DataSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_VALUE_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_VALUE_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_VALUE_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_SET_VALUE_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_SET_VALUE_KEY_INFORMATION = _REG_SET_VALUE_KEY_INFORMATION; -pub type PREG_SET_VALUE_KEY_INFORMATION = *mut _REG_SET_VALUE_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_DELETE_VALUE_KEY_INFORMATION { - pub Object: PVOID, - pub ValueName: PUNICODE_STRING, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_DELETE_VALUE_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_DELETE_VALUE_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_DELETE_VALUE_KEY_INFORMATION>(), - 40usize, - concat!("Size of: ", stringify!(_REG_DELETE_VALUE_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_DELETE_VALUE_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_DELETE_VALUE_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_DELETE_VALUE_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValueName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_DELETE_VALUE_KEY_INFORMATION), - "::", - stringify!(ValueName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_DELETE_VALUE_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_DELETE_VALUE_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_DELETE_VALUE_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_DELETE_VALUE_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_DELETE_VALUE_KEY_INFORMATION = _REG_DELETE_VALUE_KEY_INFORMATION; -pub type PREG_DELETE_VALUE_KEY_INFORMATION = *mut _REG_DELETE_VALUE_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_SET_INFORMATION_KEY_INFORMATION { - pub Object: PVOID, - pub KeySetInformationClass: KEY_SET_INFORMATION_CLASS, - pub KeySetInformation: PVOID, - pub KeySetInformationLength: ULONG, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_SET_INFORMATION_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_SET_INFORMATION_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_SET_INFORMATION_KEY_INFORMATION>(), - 56usize, - concat!("Size of: ", stringify!(_REG_SET_INFORMATION_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_SET_INFORMATION_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_SET_INFORMATION_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_INFORMATION_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KeySetInformationClass) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_INFORMATION_KEY_INFORMATION), - "::", - stringify!(KeySetInformationClass), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KeySetInformation) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_INFORMATION_KEY_INFORMATION), - "::", - stringify!(KeySetInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KeySetInformationLength) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_INFORMATION_KEY_INFORMATION), - "::", - stringify!(KeySetInformationLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_INFORMATION_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_INFORMATION_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_INFORMATION_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_SET_INFORMATION_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_SET_INFORMATION_KEY_INFORMATION = _REG_SET_INFORMATION_KEY_INFORMATION; -pub type PREG_SET_INFORMATION_KEY_INFORMATION = *mut _REG_SET_INFORMATION_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_ENUMERATE_KEY_INFORMATION { - pub Object: PVOID, - pub Index: ULONG, - pub KeyInformationClass: KEY_INFORMATION_CLASS, - pub KeyInformation: PVOID, - pub Length: ULONG, - pub ResultLength: PULONG, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_ENUMERATE_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_ENUMERATE_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_ENUMERATE_KEY_INFORMATION>(), - 64usize, - concat!("Size of: ", stringify!(_REG_ENUMERATE_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_ENUMERATE_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_ENUMERATE_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Index) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_KEY_INFORMATION), - "::", - stringify!(Index), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KeyInformationClass) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_KEY_INFORMATION), - "::", - stringify!(KeyInformationClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyInformation) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_KEY_INFORMATION), - "::", - stringify!(KeyInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_KEY_INFORMATION), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResultLength) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_KEY_INFORMATION), - "::", - stringify!(ResultLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_ENUMERATE_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_ENUMERATE_KEY_INFORMATION = _REG_ENUMERATE_KEY_INFORMATION; -pub type PREG_ENUMERATE_KEY_INFORMATION = *mut _REG_ENUMERATE_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_ENUMERATE_VALUE_KEY_INFORMATION { - pub Object: PVOID, - pub Index: ULONG, - pub KeyValueInformationClass: KEY_VALUE_INFORMATION_CLASS, - pub KeyValueInformation: PVOID, - pub Length: ULONG, - pub ResultLength: PULONG, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_ENUMERATE_VALUE_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_ENUMERATE_VALUE_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_ENUMERATE_VALUE_KEY_INFORMATION>(), - 64usize, - concat!("Size of: ", stringify!(_REG_ENUMERATE_VALUE_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_ENUMERATE_VALUE_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_ENUMERATE_VALUE_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_VALUE_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Index) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_VALUE_KEY_INFORMATION), - "::", - stringify!(Index), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KeyValueInformationClass) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_VALUE_KEY_INFORMATION), - "::", - stringify!(KeyValueInformationClass), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KeyValueInformation) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_VALUE_KEY_INFORMATION), - "::", - stringify!(KeyValueInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_VALUE_KEY_INFORMATION), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResultLength) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_VALUE_KEY_INFORMATION), - "::", - stringify!(ResultLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_VALUE_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_VALUE_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_REG_ENUMERATE_VALUE_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_ENUMERATE_VALUE_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_ENUMERATE_VALUE_KEY_INFORMATION = _REG_ENUMERATE_VALUE_KEY_INFORMATION; -pub type PREG_ENUMERATE_VALUE_KEY_INFORMATION = *mut _REG_ENUMERATE_VALUE_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_QUERY_KEY_INFORMATION { - pub Object: PVOID, - pub KeyInformationClass: KEY_INFORMATION_CLASS, - pub KeyInformation: PVOID, - pub Length: ULONG, - pub ResultLength: PULONG, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_QUERY_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_QUERY_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_QUERY_KEY_INFORMATION>(), - 64usize, - concat!("Size of: ", stringify!(_REG_QUERY_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_QUERY_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_QUERY_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KeyInformationClass) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_INFORMATION), - "::", - stringify!(KeyInformationClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyInformation) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_INFORMATION), - "::", - stringify!(KeyInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_INFORMATION), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResultLength) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_INFORMATION), - "::", - stringify!(ResultLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_QUERY_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_QUERY_KEY_INFORMATION = _REG_QUERY_KEY_INFORMATION; -pub type PREG_QUERY_KEY_INFORMATION = *mut _REG_QUERY_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_QUERY_VALUE_KEY_INFORMATION { - pub Object: PVOID, - pub ValueName: PUNICODE_STRING, - pub KeyValueInformationClass: KEY_VALUE_INFORMATION_CLASS, - pub KeyValueInformation: PVOID, - pub Length: ULONG, - pub ResultLength: PULONG, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_QUERY_VALUE_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_QUERY_VALUE_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_QUERY_VALUE_KEY_INFORMATION>(), - 72usize, - concat!("Size of: ", stringify!(_REG_QUERY_VALUE_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_QUERY_VALUE_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_QUERY_VALUE_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_VALUE_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValueName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_VALUE_KEY_INFORMATION), - "::", - stringify!(ValueName), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KeyValueInformationClass) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_VALUE_KEY_INFORMATION), - "::", - stringify!(KeyValueInformationClass), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KeyValueInformation) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_VALUE_KEY_INFORMATION), - "::", - stringify!(KeyValueInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_VALUE_KEY_INFORMATION), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResultLength) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_VALUE_KEY_INFORMATION), - "::", - stringify!(ResultLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_VALUE_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_VALUE_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_VALUE_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_QUERY_VALUE_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_QUERY_VALUE_KEY_INFORMATION = _REG_QUERY_VALUE_KEY_INFORMATION; -pub type PREG_QUERY_VALUE_KEY_INFORMATION = *mut _REG_QUERY_VALUE_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION { - pub Object: PVOID, - pub ValueEntries: PKEY_VALUE_ENTRY, - pub EntryCount: ULONG, - pub ValueBuffer: PVOID, - pub BufferLength: PULONG, - pub RequiredBufferLength: PULONG, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION>(), - 72usize, - concat!("Size of: ", stringify!(_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValueEntries) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION), - "::", - stringify!(ValueEntries), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntryCount) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION), - "::", - stringify!(EntryCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValueBuffer) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION), - "::", - stringify!(ValueBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BufferLength) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION), - "::", - stringify!(BufferLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RequiredBufferLength) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION), - "::", - stringify!(RequiredBufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION = _REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION; -pub type PREG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION = *mut _REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_RENAME_KEY_INFORMATION { - pub Object: PVOID, - pub NewName: PUNICODE_STRING, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_RENAME_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_RENAME_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_RENAME_KEY_INFORMATION>(), - 40usize, - concat!("Size of: ", stringify!(_REG_RENAME_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_RENAME_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_RENAME_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_RENAME_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NewName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_RENAME_KEY_INFORMATION), - "::", - stringify!(NewName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_RENAME_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_RENAME_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_RENAME_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_RENAME_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_RENAME_KEY_INFORMATION = _REG_RENAME_KEY_INFORMATION; -pub type PREG_RENAME_KEY_INFORMATION = *mut _REG_RENAME_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_KEY_HANDLE_CLOSE_INFORMATION { - pub Object: PVOID, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_KEY_HANDLE_CLOSE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_KEY_HANDLE_CLOSE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_KEY_HANDLE_CLOSE_INFORMATION>(), - 32usize, - concat!("Size of: ", stringify!(_REG_KEY_HANDLE_CLOSE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_KEY_HANDLE_CLOSE_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_KEY_HANDLE_CLOSE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_KEY_HANDLE_CLOSE_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_KEY_HANDLE_CLOSE_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_KEY_HANDLE_CLOSE_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_KEY_HANDLE_CLOSE_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_KEY_HANDLE_CLOSE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_KEY_HANDLE_CLOSE_INFORMATION = _REG_KEY_HANDLE_CLOSE_INFORMATION; -pub type PREG_KEY_HANDLE_CLOSE_INFORMATION = *mut _REG_KEY_HANDLE_CLOSE_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_CREATE_KEY_INFORMATION { - pub CompleteName: PUNICODE_STRING, - pub RootObject: PVOID, - pub ObjectType: PVOID, - pub CreateOptions: ULONG, - pub Class: PUNICODE_STRING, - pub SecurityDescriptor: PVOID, - pub SecurityQualityOfService: PVOID, - pub DesiredAccess: ACCESS_MASK, - pub GrantedAccess: ACCESS_MASK, - pub Disposition: PULONG, - pub ResultObject: *mut PVOID, - pub CallContext: PVOID, - pub RootObjectContext: PVOID, - pub Transaction: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_CREATE_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_CREATE_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_CREATE_KEY_INFORMATION>(), - 112usize, - concat!("Size of: ", stringify!(_REG_CREATE_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_CREATE_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_CREATE_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompleteName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(CompleteName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootObject) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(RootObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(ObjectType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateOptions) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(CreateOptions), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Class) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(Class), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityDescriptor) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(SecurityDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityQualityOfService) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(SecurityQualityOfService), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DesiredAccess) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(DesiredAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GrantedAccess) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(GrantedAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Disposition) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(Disposition), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResultObject) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(ResultObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RootObjectContext) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(RootObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Transaction) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(Transaction), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_CREATE_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_CREATE_KEY_INFORMATION = _REG_CREATE_KEY_INFORMATION; -pub type REG_OPEN_KEY_INFORMATION = _REG_CREATE_KEY_INFORMATION; -pub type PREG_CREATE_KEY_INFORMATION = *mut _REG_CREATE_KEY_INFORMATION; -pub type PREG_OPEN_KEY_INFORMATION = *mut _REG_CREATE_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_CREATE_KEY_INFORMATION_V1 { - pub CompleteName: PUNICODE_STRING, - pub RootObject: PVOID, - pub ObjectType: PVOID, - pub Options: ULONG, - pub Class: PUNICODE_STRING, - pub SecurityDescriptor: PVOID, - pub SecurityQualityOfService: PVOID, - pub DesiredAccess: ACCESS_MASK, - pub GrantedAccess: ACCESS_MASK, - pub Disposition: PULONG, - pub ResultObject: *mut PVOID, - pub CallContext: PVOID, - pub RootObjectContext: PVOID, - pub Transaction: PVOID, - pub Version: ULONG_PTR, - pub RemainingName: PUNICODE_STRING, - pub Wow64Flags: ULONG, - pub Attributes: ULONG, - pub CheckAccessMode: KPROCESSOR_MODE, -} -#[test] -fn bindgen_test_layout__REG_CREATE_KEY_INFORMATION_V1() { - const UNINIT: ::core::mem::MaybeUninit<_REG_CREATE_KEY_INFORMATION_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_CREATE_KEY_INFORMATION_V1>(), - 136usize, - concat!("Size of: ", stringify!(_REG_CREATE_KEY_INFORMATION_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_CREATE_KEY_INFORMATION_V1>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_CREATE_KEY_INFORMATION_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompleteName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(CompleteName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootObject) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(RootObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(ObjectType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Options) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(Options), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Class) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(Class), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityDescriptor) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(SecurityDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityQualityOfService) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(SecurityQualityOfService), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DesiredAccess) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(DesiredAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GrantedAccess) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(GrantedAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Disposition) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(Disposition), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResultObject) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(ResultObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RootObjectContext) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(RootObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Transaction) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(Transaction), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RemainingName) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(RemainingName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Wow64Flags) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(Wow64Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Attributes) as usize - ptr as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(Attributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CheckAccessMode) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_REG_CREATE_KEY_INFORMATION_V1), - "::", - stringify!(CheckAccessMode), - ), - ); -} -impl Default for _REG_CREATE_KEY_INFORMATION_V1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_CREATE_KEY_INFORMATION_V1 = _REG_CREATE_KEY_INFORMATION_V1; -pub type REG_OPEN_KEY_INFORMATION_V1 = _REG_CREATE_KEY_INFORMATION_V1; -pub type PREG_CREATE_KEY_INFORMATION_V1 = *mut _REG_CREATE_KEY_INFORMATION_V1; -pub type PREG_OPEN_KEY_INFORMATION_V1 = *mut _REG_CREATE_KEY_INFORMATION_V1; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_POST_OPERATION_INFORMATION { - pub Object: PVOID, - pub Status: NTSTATUS, - pub PreInformation: PVOID, - pub ReturnStatus: NTSTATUS, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_POST_OPERATION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_POST_OPERATION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_POST_OPERATION_INFORMATION>(), - 56usize, - concat!("Size of: ", stringify!(_REG_POST_OPERATION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_POST_OPERATION_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_POST_OPERATION_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_POST_OPERATION_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_POST_OPERATION_INFORMATION), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PreInformation) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_POST_OPERATION_INFORMATION), - "::", - stringify!(PreInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReturnStatus) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_POST_OPERATION_INFORMATION), - "::", - stringify!(ReturnStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_POST_OPERATION_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_POST_OPERATION_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_POST_OPERATION_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_POST_OPERATION_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_POST_OPERATION_INFORMATION = _REG_POST_OPERATION_INFORMATION; -pub type PREG_POST_OPERATION_INFORMATION = *mut _REG_POST_OPERATION_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_PRE_CREATE_KEY_INFORMATION { - pub CompleteName: PUNICODE_STRING, -} -#[test] -fn bindgen_test_layout__REG_PRE_CREATE_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_PRE_CREATE_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_PRE_CREATE_KEY_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_REG_PRE_CREATE_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_PRE_CREATE_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_PRE_CREATE_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompleteName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_PRE_CREATE_KEY_INFORMATION), - "::", - stringify!(CompleteName), - ), - ); -} -impl Default for _REG_PRE_CREATE_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_PRE_CREATE_KEY_INFORMATION = _REG_PRE_CREATE_KEY_INFORMATION; -pub type REG_PRE_OPEN_KEY_INFORMATION = _REG_PRE_CREATE_KEY_INFORMATION; -pub type PREG_PRE_CREATE_KEY_INFORMATION = *mut _REG_PRE_CREATE_KEY_INFORMATION; -pub type PREG_PRE_OPEN_KEY_INFORMATION = *mut _REG_PRE_CREATE_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_POST_CREATE_KEY_INFORMATION { - pub CompleteName: PUNICODE_STRING, - pub Object: PVOID, - pub Status: NTSTATUS, -} -#[test] -fn bindgen_test_layout__REG_POST_CREATE_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_POST_CREATE_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_POST_CREATE_KEY_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_REG_POST_CREATE_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_POST_CREATE_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_POST_CREATE_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompleteName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_POST_CREATE_KEY_INFORMATION), - "::", - stringify!(CompleteName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_POST_CREATE_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_POST_CREATE_KEY_INFORMATION), - "::", - stringify!(Status), - ), - ); -} -impl Default for _REG_POST_CREATE_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_POST_CREATE_KEY_INFORMATION = _REG_POST_CREATE_KEY_INFORMATION; -pub type REG_POST_OPEN_KEY_INFORMATION = _REG_POST_CREATE_KEY_INFORMATION; -pub type PREG_POST_CREATE_KEY_INFORMATION = *mut _REG_POST_CREATE_KEY_INFORMATION; -pub type PREG_POST_OPEN_KEY_INFORMATION = *mut _REG_POST_CREATE_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_LOAD_KEY_INFORMATION { - pub Object: PVOID, - pub KeyName: PUNICODE_STRING, - pub SourceFile: PUNICODE_STRING, - pub Flags: ULONG, - pub TrustClassObject: PVOID, - pub UserEvent: PVOID, - pub DesiredAccess: ACCESS_MASK, - pub RootHandle: PHANDLE, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_LOAD_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_LOAD_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_LOAD_KEY_INFORMATION>(), - 88usize, - concat!("Size of: ", stringify!(_REG_LOAD_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_LOAD_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_LOAD_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION), - "::", - stringify!(KeyName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceFile) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION), - "::", - stringify!(SourceFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TrustClassObject) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION), - "::", - stringify!(TrustClassObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserEvent) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION), - "::", - stringify!(UserEvent), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DesiredAccess) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION), - "::", - stringify!(DesiredAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootHandle) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION), - "::", - stringify!(RootHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_LOAD_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_LOAD_KEY_INFORMATION = _REG_LOAD_KEY_INFORMATION; -pub type PREG_LOAD_KEY_INFORMATION = *mut _REG_LOAD_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_UNLOAD_KEY_INFORMATION { - pub Object: PVOID, - pub UserEvent: PVOID, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_UNLOAD_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_UNLOAD_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_UNLOAD_KEY_INFORMATION>(), - 40usize, - concat!("Size of: ", stringify!(_REG_UNLOAD_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_UNLOAD_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_UNLOAD_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_UNLOAD_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserEvent) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_UNLOAD_KEY_INFORMATION), - "::", - stringify!(UserEvent), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_UNLOAD_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_UNLOAD_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_UNLOAD_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_UNLOAD_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_UNLOAD_KEY_INFORMATION = _REG_UNLOAD_KEY_INFORMATION; -pub type PREG_UNLOAD_KEY_INFORMATION = *mut _REG_UNLOAD_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION { - pub Object: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION = _REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION; -pub type PREG_CALLBACK_CONTEXT_CLEANUP_INFORMATION = *mut _REG_CALLBACK_CONTEXT_CLEANUP_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_QUERY_KEY_SECURITY_INFORMATION { - pub Object: PVOID, - pub SecurityInformation: PSECURITY_INFORMATION, - pub SecurityDescriptor: PSECURITY_DESCRIPTOR, - pub Length: PULONG, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_QUERY_KEY_SECURITY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_QUERY_KEY_SECURITY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_QUERY_KEY_SECURITY_INFORMATION>(), - 56usize, - concat!("Size of: ", stringify!(_REG_QUERY_KEY_SECURITY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_QUERY_KEY_SECURITY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_QUERY_KEY_SECURITY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_SECURITY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityInformation) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_SECURITY_INFORMATION), - "::", - stringify!(SecurityInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityDescriptor) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_SECURITY_INFORMATION), - "::", - stringify!(SecurityDescriptor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_SECURITY_INFORMATION), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_SECURITY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_SECURITY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_SECURITY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_QUERY_KEY_SECURITY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_QUERY_KEY_SECURITY_INFORMATION = _REG_QUERY_KEY_SECURITY_INFORMATION; -pub type PREG_QUERY_KEY_SECURITY_INFORMATION = *mut _REG_QUERY_KEY_SECURITY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_SET_KEY_SECURITY_INFORMATION { - pub Object: PVOID, - pub SecurityInformation: PSECURITY_INFORMATION, - pub SecurityDescriptor: PSECURITY_DESCRIPTOR, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_SET_KEY_SECURITY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_SET_KEY_SECURITY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_SET_KEY_SECURITY_INFORMATION>(), - 48usize, - concat!("Size of: ", stringify!(_REG_SET_KEY_SECURITY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_SET_KEY_SECURITY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_SET_KEY_SECURITY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_KEY_SECURITY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityInformation) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_KEY_SECURITY_INFORMATION), - "::", - stringify!(SecurityInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityDescriptor) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_KEY_SECURITY_INFORMATION), - "::", - stringify!(SecurityDescriptor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_KEY_SECURITY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_KEY_SECURITY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_SET_KEY_SECURITY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_SET_KEY_SECURITY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_SET_KEY_SECURITY_INFORMATION = _REG_SET_KEY_SECURITY_INFORMATION; -pub type PREG_SET_KEY_SECURITY_INFORMATION = *mut _REG_SET_KEY_SECURITY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_RESTORE_KEY_INFORMATION { - pub Object: PVOID, - pub FileHandle: HANDLE, - pub Flags: ULONG, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_RESTORE_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_RESTORE_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_RESTORE_KEY_INFORMATION>(), - 48usize, - concat!("Size of: ", stringify!(_REG_RESTORE_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_RESTORE_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_RESTORE_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_RESTORE_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileHandle) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_RESTORE_KEY_INFORMATION), - "::", - stringify!(FileHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_RESTORE_KEY_INFORMATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_RESTORE_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_RESTORE_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_RESTORE_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_RESTORE_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_RESTORE_KEY_INFORMATION = _REG_RESTORE_KEY_INFORMATION; -pub type PREG_RESTORE_KEY_INFORMATION = *mut _REG_RESTORE_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_SAVE_KEY_INFORMATION { - pub Object: PVOID, - pub FileHandle: HANDLE, - pub Format: ULONG, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_SAVE_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_SAVE_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_SAVE_KEY_INFORMATION>(), - 48usize, - concat!("Size of: ", stringify!(_REG_SAVE_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_SAVE_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_SAVE_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_SAVE_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileHandle) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_SAVE_KEY_INFORMATION), - "::", - stringify!(FileHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Format) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_SAVE_KEY_INFORMATION), - "::", - stringify!(Format), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_SAVE_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_SAVE_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_SAVE_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_SAVE_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_SAVE_KEY_INFORMATION = _REG_SAVE_KEY_INFORMATION; -pub type PREG_SAVE_KEY_INFORMATION = *mut _REG_SAVE_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_REPLACE_KEY_INFORMATION { - pub Object: PVOID, - pub OldFileName: PUNICODE_STRING, - pub NewFileName: PUNICODE_STRING, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_REPLACE_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_REPLACE_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_REPLACE_KEY_INFORMATION>(), - 48usize, - concat!("Size of: ", stringify!(_REG_REPLACE_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_REPLACE_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_REPLACE_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_REPLACE_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OldFileName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_REPLACE_KEY_INFORMATION), - "::", - stringify!(OldFileName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NewFileName) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_REPLACE_KEY_INFORMATION), - "::", - stringify!(NewFileName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_REPLACE_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_REPLACE_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_REPLACE_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_REPLACE_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_REPLACE_KEY_INFORMATION = _REG_REPLACE_KEY_INFORMATION; -pub type PREG_REPLACE_KEY_INFORMATION = *mut _REG_REPLACE_KEY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_QUERY_KEY_NAME { - pub Object: PVOID, - pub ObjectNameInfo: POBJECT_NAME_INFORMATION, - pub Length: ULONG, - pub ReturnLength: PULONG, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_QUERY_KEY_NAME() { - const UNINIT: ::core::mem::MaybeUninit<_REG_QUERY_KEY_NAME> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_QUERY_KEY_NAME>(), - 56usize, - concat!("Size of: ", stringify!(_REG_QUERY_KEY_NAME)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_QUERY_KEY_NAME>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_QUERY_KEY_NAME)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_NAME), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectNameInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_NAME), - "::", - stringify!(ObjectNameInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_NAME), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReturnLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_NAME), - "::", - stringify!(ReturnLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_NAME), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_NAME), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_QUERY_KEY_NAME), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_QUERY_KEY_NAME { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_QUERY_KEY_NAME = _REG_QUERY_KEY_NAME; -pub type PREG_QUERY_KEY_NAME = *mut _REG_QUERY_KEY_NAME; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_LOAD_KEY_INFORMATION_V2 { - pub Object: PVOID, - pub KeyName: PUNICODE_STRING, - pub SourceFile: PUNICODE_STRING, - pub Flags: ULONG, - pub TrustClassObject: PVOID, - pub UserEvent: PVOID, - pub DesiredAccess: ACCESS_MASK, - pub RootHandle: PHANDLE, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Version: ULONG_PTR, - pub FileAccessToken: PVOID, -} -#[test] -fn bindgen_test_layout__REG_LOAD_KEY_INFORMATION_V2() { - const UNINIT: ::core::mem::MaybeUninit<_REG_LOAD_KEY_INFORMATION_V2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_LOAD_KEY_INFORMATION_V2>(), - 96usize, - concat!("Size of: ", stringify!(_REG_LOAD_KEY_INFORMATION_V2)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_LOAD_KEY_INFORMATION_V2>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_LOAD_KEY_INFORMATION_V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION_V2), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION_V2), - "::", - stringify!(KeyName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceFile) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION_V2), - "::", - stringify!(SourceFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION_V2), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TrustClassObject) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION_V2), - "::", - stringify!(TrustClassObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserEvent) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION_V2), - "::", - stringify!(UserEvent), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DesiredAccess) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION_V2), - "::", - stringify!(DesiredAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootHandle) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION_V2), - "::", - stringify!(RootHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION_V2), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION_V2), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION_V2), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAccessToken) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_REG_LOAD_KEY_INFORMATION_V2), - "::", - stringify!(FileAccessToken), - ), - ); -} -impl Default for _REG_LOAD_KEY_INFORMATION_V2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_LOAD_KEY_INFORMATION_V2 = _REG_LOAD_KEY_INFORMATION_V2; -pub type PREG_LOAD_KEY_INFORMATION_V2 = *mut _REG_LOAD_KEY_INFORMATION_V2; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REG_SAVE_MERGED_KEY_INFORMATION { - pub Object: PVOID, - pub FileHandle: HANDLE, - pub HighKeyObject: PVOID, - pub LowKeyObject: PVOID, - pub CallContext: PVOID, - pub ObjectContext: PVOID, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__REG_SAVE_MERGED_KEY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_REG_SAVE_MERGED_KEY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REG_SAVE_MERGED_KEY_INFORMATION>(), - 56usize, - concat!("Size of: ", stringify!(_REG_SAVE_MERGED_KEY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_REG_SAVE_MERGED_KEY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_REG_SAVE_MERGED_KEY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REG_SAVE_MERGED_KEY_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileHandle) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REG_SAVE_MERGED_KEY_INFORMATION), - "::", - stringify!(FileHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HighKeyObject) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REG_SAVE_MERGED_KEY_INFORMATION), - "::", - stringify!(HighKeyObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowKeyObject) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REG_SAVE_MERGED_KEY_INFORMATION), - "::", - stringify!(LowKeyObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REG_SAVE_MERGED_KEY_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REG_SAVE_MERGED_KEY_INFORMATION), - "::", - stringify!(ObjectContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REG_SAVE_MERGED_KEY_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REG_SAVE_MERGED_KEY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REG_SAVE_MERGED_KEY_INFORMATION = _REG_SAVE_MERGED_KEY_INFORMATION; -pub type PREG_SAVE_MERGED_KEY_INFORMATION = *mut _REG_SAVE_MERGED_KEY_INFORMATION; -pub mod _MM_SYSTEM_SIZE { - pub type Type = ::core::ffi::c_int; - pub const MmSmallSystem: Type = 0; - pub const MmMediumSystem: Type = 1; - pub const MmLargeSystem: Type = 2; -} -pub use self::_MM_SYSTEM_SIZE::Type as MM_SYSTEMSIZE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _MM_PHYSICAL_ADDRESS_LIST { - pub PhysicalAddress: PHYSICAL_ADDRESS, - pub NumberOfBytes: SIZE_T, -} -#[test] -fn bindgen_test_layout__MM_PHYSICAL_ADDRESS_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_MM_PHYSICAL_ADDRESS_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MM_PHYSICAL_ADDRESS_LIST>(), - 16usize, - concat!("Size of: ", stringify!(_MM_PHYSICAL_ADDRESS_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_MM_PHYSICAL_ADDRESS_LIST>(), - 8usize, - concat!("Alignment of ", stringify!(_MM_PHYSICAL_ADDRESS_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PhysicalAddress) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MM_PHYSICAL_ADDRESS_LIST), - "::", - stringify!(PhysicalAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfBytes) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MM_PHYSICAL_ADDRESS_LIST), - "::", - stringify!(NumberOfBytes), - ), - ); -} -impl Default for _MM_PHYSICAL_ADDRESS_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MM_PHYSICAL_ADDRESS_LIST = _MM_PHYSICAL_ADDRESS_LIST; -pub type PMM_PHYSICAL_ADDRESS_LIST = *mut _MM_PHYSICAL_ADDRESS_LIST; -pub type MM_MDL_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(DriverContext: PVOID, MappedVa: PVOID), ->; -pub type PMM_MDL_ROUTINE = MM_MDL_ROUTINE; -pub type PMM_GET_SYSTEM_ROUTINE_ADDRESS_EX = ::core::option::Option< - unsafe extern "C" fn(ModuleName: PUNICODE_STRING, FunctionName: PSTR) -> PVOID, ->; -pub mod _MM_PAGE_PRIORITY { - pub type Type = ::core::ffi::c_int; - pub const LowPagePriority: Type = 0; - pub const NormalPagePriority: Type = 16; - pub const HighPagePriority: Type = 32; -} -pub use self::_MM_PAGE_PRIORITY::Type as MM_PAGE_PRIORITY; -pub type MM_NODE_NUMBER_ZERO_BASED = ULONG; -pub type MM_NODE_NUMBER_ONE_BASED = ULONG; -pub type NODE_REQUIREMENT = ULONG; -pub mod _MM_MDL_PAGE_CONTENTS_STATE { - pub type Type = ::core::ffi::c_int; - pub const MmMdlPageContentsDynamic: Type = 0; - pub const MmMdlPageContentsInvariant: Type = 1; - pub const MmMdlPageContentsQuery: Type = 2; -} -pub use self::_MM_MDL_PAGE_CONTENTS_STATE::Type as MM_MDL_PAGE_CONTENTS_STATE; -pub use self::_MM_MDL_PAGE_CONTENTS_STATE::Type as PMM_MDL_PAGE_CONTENTS_STATE; -pub type PMM_DLL_INITIALIZE = ::core::option::Option< - unsafe extern "C" fn(RegistryPath: PUNICODE_STRING) -> NTSTATUS, ->; -pub type PMM_DLL_UNLOAD = ::core::option::Option NTSTATUS>; -pub mod _SECURITY_OPERATION_CODE { - pub type Type = ::core::ffi::c_int; - pub const SetSecurityDescriptor: Type = 0; - pub const QuerySecurityDescriptor: Type = 1; - pub const DeleteSecurityDescriptor: Type = 2; - pub const AssignSecurityDescriptor: Type = 3; -} -pub use self::_SECURITY_OPERATION_CODE::Type as SECURITY_OPERATION_CODE; -pub type PSECURITY_OPERATION_CODE = *mut _SECURITY_OPERATION_CODE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SECURITY_SUBJECT_CONTEXT { - pub ClientToken: PACCESS_TOKEN, - pub ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, - pub PrimaryToken: PACCESS_TOKEN, - pub ProcessAuditId: PVOID, -} -#[test] -fn bindgen_test_layout__SECURITY_SUBJECT_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_SECURITY_SUBJECT_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SECURITY_SUBJECT_CONTEXT>(), - 32usize, - concat!("Size of: ", stringify!(_SECURITY_SUBJECT_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_SECURITY_SUBJECT_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_SECURITY_SUBJECT_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClientToken) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_SUBJECT_CONTEXT), - "::", - stringify!(ClientToken), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ImpersonationLevel) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_SUBJECT_CONTEXT), - "::", - stringify!(ImpersonationLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrimaryToken) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_SUBJECT_CONTEXT), - "::", - stringify!(PrimaryToken), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProcessAuditId) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_SUBJECT_CONTEXT), - "::", - stringify!(ProcessAuditId), - ), - ); -} -impl Default for _SECURITY_SUBJECT_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SECURITY_SUBJECT_CONTEXT = _SECURITY_SUBJECT_CONTEXT; -pub type PSECURITY_SUBJECT_CONTEXT = *mut _SECURITY_SUBJECT_CONTEXT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _INITIAL_PRIVILEGE_SET { - pub PrivilegeCount: ULONG, - pub Control: ULONG, - pub Privilege: [LUID_AND_ATTRIBUTES; 3usize], -} -#[test] -fn bindgen_test_layout__INITIAL_PRIVILEGE_SET() { - const UNINIT: ::core::mem::MaybeUninit<_INITIAL_PRIVILEGE_SET> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_INITIAL_PRIVILEGE_SET>(), - 44usize, - concat!("Size of: ", stringify!(_INITIAL_PRIVILEGE_SET)), - ); - assert_eq!( - ::core::mem::align_of::<_INITIAL_PRIVILEGE_SET>(), - 4usize, - concat!("Alignment of ", stringify!(_INITIAL_PRIVILEGE_SET)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrivilegeCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_INITIAL_PRIVILEGE_SET), - "::", - stringify!(PrivilegeCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_INITIAL_PRIVILEGE_SET), - "::", - stringify!(Control), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Privilege) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_INITIAL_PRIVILEGE_SET), - "::", - stringify!(Privilege), - ), - ); -} -pub type INITIAL_PRIVILEGE_SET = _INITIAL_PRIVILEGE_SET; -pub type PINITIAL_PRIVILEGE_SET = *mut _INITIAL_PRIVILEGE_SET; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _ACCESS_STATE { - pub OperationID: LUID, - pub SecurityEvaluated: BOOLEAN, - pub GenerateAudit: BOOLEAN, - pub GenerateOnClose: BOOLEAN, - pub PrivilegesAllocated: BOOLEAN, - pub Flags: ULONG, - pub RemainingDesiredAccess: ACCESS_MASK, - pub PreviouslyGrantedAccess: ACCESS_MASK, - pub OriginalDesiredAccess: ACCESS_MASK, - pub SubjectSecurityContext: SECURITY_SUBJECT_CONTEXT, - pub SecurityDescriptor: PSECURITY_DESCRIPTOR, - pub AuxData: PVOID, - pub Privileges: _ACCESS_STATE__bindgen_ty_1, - pub AuditPrivileges: BOOLEAN, - pub ObjectName: UNICODE_STRING, - pub ObjectTypeName: UNICODE_STRING, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _ACCESS_STATE__bindgen_ty_1 { - pub InitialPrivilegeSet: INITIAL_PRIVILEGE_SET, - pub PrivilegeSet: PRIVILEGE_SET, -} -#[test] -fn bindgen_test_layout__ACCESS_STATE__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_ACCESS_STATE__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ACCESS_STATE__bindgen_ty_1>(), - 44usize, - concat!("Size of: ", stringify!(_ACCESS_STATE__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_ACCESS_STATE__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_ACCESS_STATE__bindgen_ty_1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InitialPrivilegeSet) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE__bindgen_ty_1), - "::", - stringify!(InitialPrivilegeSet), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrivilegeSet) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE__bindgen_ty_1), - "::", - stringify!(PrivilegeSet), - ), - ); -} -impl Default for _ACCESS_STATE__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__ACCESS_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_ACCESS_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ACCESS_STATE>(), - 160usize, - concat!("Size of: ", stringify!(_ACCESS_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_ACCESS_STATE>(), - 8usize, - concat!("Alignment of ", stringify!(_ACCESS_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OperationID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(OperationID), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityEvaluated) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(SecurityEvaluated), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GenerateAudit) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(GenerateAudit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GenerateOnClose) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(GenerateOnClose), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PrivilegesAllocated) as usize - ptr as usize - }, - 11usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(PrivilegesAllocated), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 12usize, - concat!("Offset of field: ", stringify!(_ACCESS_STATE), "::", stringify!(Flags)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RemainingDesiredAccess) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(RemainingDesiredAccess), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PreviouslyGrantedAccess) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(PreviouslyGrantedAccess), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OriginalDesiredAccess) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(OriginalDesiredAccess), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SubjectSecurityContext) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(SubjectSecurityContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityDescriptor) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(SecurityDescriptor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AuxData) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(AuxData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Privileges) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(Privileges), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AuditPrivileges) as usize - ptr as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(AuditPrivileges), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectName) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(ObjectName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectTypeName) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_STATE), - "::", - stringify!(ObjectTypeName), - ), - ); -} -impl Default for _ACCESS_STATE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ACCESS_STATE = _ACCESS_STATE; -pub type NTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR = ::core::option::Option< - unsafe extern "C" fn(Vcb: PVOID, SecurityDescriptor: PSECURITY_DESCRIPTOR), ->; -pub type PNTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR = NTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR; -pub mod _SE_IMAGE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const SeImageTypeElamDriver: Type = 0; - pub const SeImageTypeDriver: Type = 1; - pub const SeImageTypePlatformSecureFile: Type = 2; - pub const SeImageTypeDynamicCodeFile: Type = 3; - pub const SeImageTypeMax: Type = 4; -} -pub use self::_SE_IMAGE_TYPE::Type as SE_IMAGE_TYPE; -pub type PSE_IMAGE_TYPE = *mut _SE_IMAGE_TYPE::Type; -pub type PBDCB_IMAGE_INFORMATION = *mut _BDCB_IMAGE_INFORMATION; -pub type SE_IMAGE_VERIFICATION_CALLBACK_FUNCTION = ::core::option::Option< - unsafe extern "C" fn( - CallbackContext: PVOID, - ImageType: SE_IMAGE_TYPE, - ImageInformation: PBDCB_IMAGE_INFORMATION, - ), ->; -pub type PSE_IMAGE_VERIFICATION_CALLBACK_FUNCTION = SE_IMAGE_VERIFICATION_CALLBACK_FUNCTION; -pub mod _SE_IMAGE_VERIFICATION_CALLBACK_TYPE { - pub type Type = ::core::ffi::c_int; - pub const SeImageVerificationCallbackInformational: Type = 0; -} -pub use self::_SE_IMAGE_VERIFICATION_CALLBACK_TYPE::Type as SE_IMAGE_VERIFICATION_CALLBACK_TYPE; -pub type PSE_IMAGE_VERIFICATION_CALLBACK_TYPE = *mut _SE_IMAGE_VERIFICATION_CALLBACK_TYPE::Type; -pub type SE_IMAGE_VERIFICATION_CALLBACK_TOKEN = PVOID; -pub type PSE_IMAGE_VERIFICATION_CALLBACK_TOKEN = *mut PVOID; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _AFFINITY_TOKEN { - _unused: [u8; 0], -} -pub type PAFFINITY_TOKEN = *mut _AFFINITY_TOKEN; -pub mod _CREATE_FILE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const CreateFileTypeNone: Type = 0; - pub const CreateFileTypeNamedPipe: Type = 1; - pub const CreateFileTypeMailslot: Type = 2; -} -pub use self::_CREATE_FILE_TYPE::Type as CREATE_FILE_TYPE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _NAMED_PIPE_CREATE_PARAMETERS { - pub NamedPipeType: ULONG, - pub ReadMode: ULONG, - pub CompletionMode: ULONG, - pub MaximumInstances: ULONG, - pub InboundQuota: ULONG, - pub OutboundQuota: ULONG, - pub DefaultTimeout: LARGE_INTEGER, - pub TimeoutSpecified: BOOLEAN, -} -#[test] -fn bindgen_test_layout__NAMED_PIPE_CREATE_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_NAMED_PIPE_CREATE_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NAMED_PIPE_CREATE_PARAMETERS>(), - 40usize, - concat!("Size of: ", stringify!(_NAMED_PIPE_CREATE_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_NAMED_PIPE_CREATE_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_NAMED_PIPE_CREATE_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NamedPipeType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NAMED_PIPE_CREATE_PARAMETERS), - "::", - stringify!(NamedPipeType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadMode) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NAMED_PIPE_CREATE_PARAMETERS), - "::", - stringify!(ReadMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompletionMode) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NAMED_PIPE_CREATE_PARAMETERS), - "::", - stringify!(CompletionMode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumInstances) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_NAMED_PIPE_CREATE_PARAMETERS), - "::", - stringify!(MaximumInstances), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InboundQuota) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_NAMED_PIPE_CREATE_PARAMETERS), - "::", - stringify!(InboundQuota), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OutboundQuota) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_NAMED_PIPE_CREATE_PARAMETERS), - "::", - stringify!(OutboundQuota), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DefaultTimeout) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_NAMED_PIPE_CREATE_PARAMETERS), - "::", - stringify!(DefaultTimeout), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TimeoutSpecified) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_NAMED_PIPE_CREATE_PARAMETERS), - "::", - stringify!(TimeoutSpecified), - ), - ); -} -impl Default for _NAMED_PIPE_CREATE_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type NAMED_PIPE_CREATE_PARAMETERS = _NAMED_PIPE_CREATE_PARAMETERS; -pub type PNAMED_PIPE_CREATE_PARAMETERS = *mut _NAMED_PIPE_CREATE_PARAMETERS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _MAILSLOT_CREATE_PARAMETERS { - pub MailslotQuota: ULONG, - pub MaximumMessageSize: ULONG, - pub ReadTimeout: LARGE_INTEGER, - pub TimeoutSpecified: BOOLEAN, -} -#[test] -fn bindgen_test_layout__MAILSLOT_CREATE_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_MAILSLOT_CREATE_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MAILSLOT_CREATE_PARAMETERS>(), - 24usize, - concat!("Size of: ", stringify!(_MAILSLOT_CREATE_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_MAILSLOT_CREATE_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_MAILSLOT_CREATE_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MailslotQuota) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MAILSLOT_CREATE_PARAMETERS), - "::", - stringify!(MailslotQuota), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumMessageSize) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MAILSLOT_CREATE_PARAMETERS), - "::", - stringify!(MaximumMessageSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadTimeout) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MAILSLOT_CREATE_PARAMETERS), - "::", - stringify!(ReadTimeout), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TimeoutSpecified) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MAILSLOT_CREATE_PARAMETERS), - "::", - stringify!(TimeoutSpecified), - ), - ); -} -impl Default for _MAILSLOT_CREATE_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MAILSLOT_CREATE_PARAMETERS = _MAILSLOT_CREATE_PARAMETERS; -pub type PMAILSLOT_CREATE_PARAMETERS = *mut _MAILSLOT_CREATE_PARAMETERS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DRIVE_LAYOUT_INFORMATION { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DISK_PARTITION { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SCSI_REQUEST_BLOCK { - _unused: [u8; 0], -} -pub type IO_DPC_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - Dpc: PKDPC, - DeviceObject: *mut _DEVICE_OBJECT, - Irp: *mut _IRP, - Context: PVOID, - ), ->; -pub type PIO_DPC_ROUTINE = IO_DPC_ROUTINE; -pub type IO_TIMER_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(DeviceObject: *mut _DEVICE_OBJECT, Context: PVOID), ->; -pub type PIO_TIMER_ROUTINE = IO_TIMER_ROUTINE; -pub type DRIVER_INITIALIZE = ::core::option::Option< - unsafe extern "C" fn( - DriverObject: *mut _DRIVER_OBJECT, - RegistryPath: PUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PDRIVER_INITIALIZE = DRIVER_INITIALIZE; -pub type DRIVER_CANCEL = ::core::option::Option< - unsafe extern "C" fn(DeviceObject: *mut _DEVICE_OBJECT, Irp: *mut _IRP), ->; -pub type PDRIVER_CANCEL = DRIVER_CANCEL; -pub type DRIVER_DISPATCH = ::core::option::Option< - unsafe extern "C" fn(DeviceObject: *mut _DEVICE_OBJECT, Irp: *mut _IRP) -> NTSTATUS, ->; -pub type PDRIVER_DISPATCH = DRIVER_DISPATCH; -pub type DRIVER_DISPATCH_RAISED = DRIVER_DISPATCH; -pub type DRIVER_DISPATCH_PAGED = ::core::option::Option< - unsafe extern "C" fn(DeviceObject: *mut _DEVICE_OBJECT, Irp: *mut _IRP) -> NTSTATUS, ->; -pub type PDRIVER_DISPATCH_PAGED = DRIVER_DISPATCH_PAGED; -pub type DRIVER_STARTIO = ::core::option::Option< - unsafe extern "C" fn(DeviceObject: *mut _DEVICE_OBJECT, Irp: *mut _IRP), ->; -pub type PDRIVER_STARTIO = DRIVER_STARTIO; -pub type DRIVER_UNLOAD = ::core::option::Option< - unsafe extern "C" fn(DriverObject: *mut _DRIVER_OBJECT), ->; -pub type PDRIVER_UNLOAD = DRIVER_UNLOAD; -pub type DRIVER_ADD_DEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverObject: *mut _DRIVER_OBJECT, - PhysicalDeviceObject: *mut _DEVICE_OBJECT, - ) -> NTSTATUS, ->; -pub type PDRIVER_ADD_DEVICE = DRIVER_ADD_DEVICE; -pub type FAST_IO_CHECK_IF_POSSIBLE = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Wait: BOOLEAN, - LockKey: ULONG, - CheckForReadOperation: BOOLEAN, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_CHECK_IF_POSSIBLE = FAST_IO_CHECK_IF_POSSIBLE; -pub type FAST_IO_READ = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Wait: BOOLEAN, - LockKey: ULONG, - Buffer: PVOID, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_READ = FAST_IO_READ; -pub type FAST_IO_WRITE = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - Wait: BOOLEAN, - LockKey: ULONG, - Buffer: PVOID, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_WRITE = FAST_IO_WRITE; -pub type FAST_IO_QUERY_BASIC_INFO = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - Wait: BOOLEAN, - Buffer: PFILE_BASIC_INFORMATION, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_QUERY_BASIC_INFO = FAST_IO_QUERY_BASIC_INFO; -pub type FAST_IO_QUERY_STANDARD_INFO = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - Wait: BOOLEAN, - Buffer: PFILE_STANDARD_INFORMATION, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_QUERY_STANDARD_INFO = FAST_IO_QUERY_STANDARD_INFO; -pub type FAST_IO_LOCK = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: PLARGE_INTEGER, - ProcessId: PEPROCESS, - Key: ULONG, - FailImmediately: BOOLEAN, - ExclusiveLock: BOOLEAN, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_LOCK = FAST_IO_LOCK; -pub type FAST_IO_UNLOCK_SINGLE = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: PLARGE_INTEGER, - ProcessId: PEPROCESS, - Key: ULONG, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_UNLOCK_SINGLE = FAST_IO_UNLOCK_SINGLE; -pub type FAST_IO_UNLOCK_ALL = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - ProcessId: PEPROCESS, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_UNLOCK_ALL = FAST_IO_UNLOCK_ALL; -pub type FAST_IO_UNLOCK_ALL_BY_KEY = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - ProcessId: PVOID, - Key: ULONG, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_UNLOCK_ALL_BY_KEY = FAST_IO_UNLOCK_ALL_BY_KEY; -pub type FAST_IO_DEVICE_CONTROL = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - Wait: BOOLEAN, - InputBuffer: PVOID, - InputBufferLength: ULONG, - OutputBuffer: PVOID, - OutputBufferLength: ULONG, - IoControlCode: ULONG, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_DEVICE_CONTROL = FAST_IO_DEVICE_CONTROL; -pub type FAST_IO_ACQUIRE_FILE = ::core::option::Option< - unsafe extern "C" fn(FileObject: *mut _FILE_OBJECT), ->; -pub type PFAST_IO_ACQUIRE_FILE = FAST_IO_ACQUIRE_FILE; -pub type FAST_IO_RELEASE_FILE = ::core::option::Option< - unsafe extern "C" fn(FileObject: *mut _FILE_OBJECT), ->; -pub type PFAST_IO_RELEASE_FILE = FAST_IO_RELEASE_FILE; -pub type FAST_IO_DETACH_DEVICE = ::core::option::Option< - unsafe extern "C" fn( - SourceDevice: *mut _DEVICE_OBJECT, - TargetDevice: *mut _DEVICE_OBJECT, - ), ->; -pub type PFAST_IO_DETACH_DEVICE = FAST_IO_DETACH_DEVICE; -pub type FAST_IO_QUERY_NETWORK_OPEN_INFO = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - Wait: BOOLEAN, - Buffer: *mut _FILE_NETWORK_OPEN_INFORMATION, - IoStatus: *mut _IO_STATUS_BLOCK, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_QUERY_NETWORK_OPEN_INFO = FAST_IO_QUERY_NETWORK_OPEN_INFO; -pub type FAST_IO_MDL_READ = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - LockKey: ULONG, - MdlChain: *mut PMDL, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_MDL_READ = FAST_IO_MDL_READ; -pub type FAST_IO_MDL_READ_COMPLETE = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - MdlChain: PMDL, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_MDL_READ_COMPLETE = FAST_IO_MDL_READ_COMPLETE; -pub type FAST_IO_PREPARE_MDL_WRITE = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - LockKey: ULONG, - MdlChain: *mut PMDL, - IoStatus: PIO_STATUS_BLOCK, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_PREPARE_MDL_WRITE = FAST_IO_PREPARE_MDL_WRITE; -pub type FAST_IO_MDL_WRITE_COMPLETE = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - FileOffset: PLARGE_INTEGER, - MdlChain: PMDL, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_MDL_WRITE_COMPLETE = FAST_IO_MDL_WRITE_COMPLETE; -pub type FAST_IO_ACQUIRE_FOR_MOD_WRITE = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - EndingOffset: PLARGE_INTEGER, - ResourceToRelease: *mut *mut _ERESOURCE, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> NTSTATUS, ->; -pub type PFAST_IO_ACQUIRE_FOR_MOD_WRITE = FAST_IO_ACQUIRE_FOR_MOD_WRITE; -pub type FAST_IO_RELEASE_FOR_MOD_WRITE = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - ResourceToRelease: *mut _ERESOURCE, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> NTSTATUS, ->; -pub type PFAST_IO_RELEASE_FOR_MOD_WRITE = FAST_IO_RELEASE_FOR_MOD_WRITE; -pub type FAST_IO_ACQUIRE_FOR_CCFLUSH = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> NTSTATUS, ->; -pub type PFAST_IO_ACQUIRE_FOR_CCFLUSH = FAST_IO_ACQUIRE_FOR_CCFLUSH; -pub type FAST_IO_RELEASE_FOR_CCFLUSH = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> NTSTATUS, ->; -pub type PFAST_IO_RELEASE_FOR_CCFLUSH = FAST_IO_RELEASE_FOR_CCFLUSH; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _COMPRESSED_DATA_INFO { - _unused: [u8; 0], -} -pub type FAST_IO_READ_COMPRESSED = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - LockKey: ULONG, - Buffer: PVOID, - MdlChain: *mut PMDL, - IoStatus: PIO_STATUS_BLOCK, - CompressedDataInfo: *mut _COMPRESSED_DATA_INFO, - CompressedDataInfoLength: ULONG, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_READ_COMPRESSED = FAST_IO_READ_COMPRESSED; -pub type FAST_IO_WRITE_COMPRESSED = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - LockKey: ULONG, - Buffer: PVOID, - MdlChain: *mut PMDL, - IoStatus: PIO_STATUS_BLOCK, - CompressedDataInfo: *mut _COMPRESSED_DATA_INFO, - CompressedDataInfoLength: ULONG, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_WRITE_COMPRESSED = FAST_IO_WRITE_COMPRESSED; -pub type FAST_IO_MDL_READ_COMPLETE_COMPRESSED = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - MdlChain: PMDL, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_MDL_READ_COMPLETE_COMPRESSED = FAST_IO_MDL_READ_COMPLETE_COMPRESSED; -pub type FAST_IO_MDL_WRITE_COMPLETE_COMPRESSED = ::core::option::Option< - unsafe extern "C" fn( - FileObject: *mut _FILE_OBJECT, - FileOffset: PLARGE_INTEGER, - MdlChain: PMDL, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_MDL_WRITE_COMPLETE_COMPRESSED = FAST_IO_MDL_WRITE_COMPLETE_COMPRESSED; -pub type FAST_IO_QUERY_OPEN = ::core::option::Option< - unsafe extern "C" fn( - Irp: *mut _IRP, - NetworkInformation: PFILE_NETWORK_OPEN_INFORMATION, - DeviceObject: *mut _DEVICE_OBJECT, - ) -> BOOLEAN, ->; -pub type PFAST_IO_QUERY_OPEN = FAST_IO_QUERY_OPEN; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FAST_IO_DISPATCH { - pub SizeOfFastIoDispatch: ULONG, - pub FastIoCheckIfPossible: PFAST_IO_CHECK_IF_POSSIBLE, - pub FastIoRead: PFAST_IO_READ, - pub FastIoWrite: PFAST_IO_WRITE, - pub FastIoQueryBasicInfo: PFAST_IO_QUERY_BASIC_INFO, - pub FastIoQueryStandardInfo: PFAST_IO_QUERY_STANDARD_INFO, - pub FastIoLock: PFAST_IO_LOCK, - pub FastIoUnlockSingle: PFAST_IO_UNLOCK_SINGLE, - pub FastIoUnlockAll: PFAST_IO_UNLOCK_ALL, - pub FastIoUnlockAllByKey: PFAST_IO_UNLOCK_ALL_BY_KEY, - pub FastIoDeviceControl: PFAST_IO_DEVICE_CONTROL, - pub AcquireFileForNtCreateSection: PFAST_IO_ACQUIRE_FILE, - pub ReleaseFileForNtCreateSection: PFAST_IO_RELEASE_FILE, - pub FastIoDetachDevice: PFAST_IO_DETACH_DEVICE, - pub FastIoQueryNetworkOpenInfo: PFAST_IO_QUERY_NETWORK_OPEN_INFO, - pub AcquireForModWrite: PFAST_IO_ACQUIRE_FOR_MOD_WRITE, - pub MdlRead: PFAST_IO_MDL_READ, - pub MdlReadComplete: PFAST_IO_MDL_READ_COMPLETE, - pub PrepareMdlWrite: PFAST_IO_PREPARE_MDL_WRITE, - pub MdlWriteComplete: PFAST_IO_MDL_WRITE_COMPLETE, - pub FastIoReadCompressed: PFAST_IO_READ_COMPRESSED, - pub FastIoWriteCompressed: PFAST_IO_WRITE_COMPRESSED, - pub MdlReadCompleteCompressed: PFAST_IO_MDL_READ_COMPLETE_COMPRESSED, - pub MdlWriteCompleteCompressed: PFAST_IO_MDL_WRITE_COMPLETE_COMPRESSED, - pub FastIoQueryOpen: PFAST_IO_QUERY_OPEN, - pub ReleaseForModWrite: PFAST_IO_RELEASE_FOR_MOD_WRITE, - pub AcquireForCcFlush: PFAST_IO_ACQUIRE_FOR_CCFLUSH, - pub ReleaseForCcFlush: PFAST_IO_RELEASE_FOR_CCFLUSH, -} -#[test] -fn bindgen_test_layout__FAST_IO_DISPATCH() { - const UNINIT: ::core::mem::MaybeUninit<_FAST_IO_DISPATCH> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FAST_IO_DISPATCH>(), - 224usize, - concat!("Size of: ", stringify!(_FAST_IO_DISPATCH)), - ); - assert_eq!( - ::core::mem::align_of::<_FAST_IO_DISPATCH>(), - 8usize, - concat!("Alignment of ", stringify!(_FAST_IO_DISPATCH)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SizeOfFastIoDispatch) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(SizeOfFastIoDispatch), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastIoCheckIfPossible) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoCheckIfPossible), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FastIoRead) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoRead), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FastIoWrite) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoWrite), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastIoQueryBasicInfo) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoQueryBasicInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastIoQueryStandardInfo) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoQueryStandardInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FastIoLock) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoLock), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastIoUnlockSingle) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoUnlockSingle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FastIoUnlockAll) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoUnlockAll), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastIoUnlockAllByKey) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoUnlockAllByKey), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastIoDeviceControl) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoDeviceControl), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AcquireFileForNtCreateSection) as usize - - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(AcquireFileForNtCreateSection), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReleaseFileForNtCreateSection) as usize - - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(ReleaseFileForNtCreateSection), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastIoDetachDevice) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoDetachDevice), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastIoQueryNetworkOpenInfo) as usize - - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoQueryNetworkOpenInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AcquireForModWrite) as usize - ptr as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(AcquireForModWrite), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MdlRead) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(MdlRead), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MdlReadComplete) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(MdlReadComplete), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrepareMdlWrite) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(PrepareMdlWrite), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MdlWriteComplete) as usize - ptr as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(MdlWriteComplete), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastIoReadCompressed) as usize - ptr as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoReadCompressed), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastIoWriteCompressed) as usize - ptr as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoWriteCompressed), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MdlReadCompleteCompressed) as usize - - ptr as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(MdlReadCompleteCompressed), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MdlWriteCompleteCompressed) as usize - - ptr as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(MdlWriteCompleteCompressed), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FastIoQueryOpen) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(FastIoQueryOpen), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReleaseForModWrite) as usize - ptr as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(ReleaseForModWrite), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AcquireForCcFlush) as usize - ptr as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(AcquireForCcFlush), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReleaseForCcFlush) as usize - ptr as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_FAST_IO_DISPATCH), - "::", - stringify!(ReleaseForCcFlush), - ), - ); -} -pub type FAST_IO_DISPATCH = _FAST_IO_DISPATCH; -pub type PFAST_IO_DISPATCH = *mut _FAST_IO_DISPATCH; -pub mod _IO_ALLOCATION_ACTION { - pub type Type = ::core::ffi::c_int; - pub const KeepObject: Type = 1; - pub const DeallocateObject: Type = 2; - pub const DeallocateObjectKeepRegisters: Type = 3; -} -pub use self::_IO_ALLOCATION_ACTION::Type as IO_ALLOCATION_ACTION; -pub type PIO_ALLOCATION_ACTION = *mut _IO_ALLOCATION_ACTION::Type; -pub type DRIVER_CONTROL = ::core::option::Option< - unsafe extern "C" fn( - DeviceObject: *mut _DEVICE_OBJECT, - Irp: *mut _IRP, - MapRegisterBase: PVOID, - Context: PVOID, - ) -> IO_ALLOCATION_ACTION, ->; -pub type PDRIVER_CONTROL = DRIVER_CONTROL; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_SECURITY_CONTEXT { - pub SecurityQos: PSECURITY_QUALITY_OF_SERVICE, - pub AccessState: PACCESS_STATE, - pub DesiredAccess: ACCESS_MASK, - pub FullCreateOptions: ULONG, -} -#[test] -fn bindgen_test_layout__IO_SECURITY_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_IO_SECURITY_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_SECURITY_CONTEXT>(), - 24usize, - concat!("Size of: ", stringify!(_IO_SECURITY_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_SECURITY_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_SECURITY_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecurityQos) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_SECURITY_CONTEXT), - "::", - stringify!(SecurityQos), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AccessState) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_SECURITY_CONTEXT), - "::", - stringify!(AccessState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DesiredAccess) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_SECURITY_CONTEXT), - "::", - stringify!(DesiredAccess), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FullCreateOptions) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_IO_SECURITY_CONTEXT), - "::", - stringify!(FullCreateOptions), - ), - ); -} -impl Default for _IO_SECURITY_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_SECURITY_CONTEXT = _IO_SECURITY_CONTEXT; -pub type PIO_SECURITY_CONTEXT = *mut _IO_SECURITY_CONTEXT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _VPB { - pub Type: CSHORT, - pub Size: CSHORT, - pub Flags: USHORT, - pub VolumeLabelLength: USHORT, - pub DeviceObject: *mut _DEVICE_OBJECT, - pub RealDevice: *mut _DEVICE_OBJECT, - pub SerialNumber: ULONG, - pub ReferenceCount: ULONG, - pub VolumeLabel: [WCHAR; 32usize], -} -#[test] -fn bindgen_test_layout__VPB() { - const UNINIT: ::core::mem::MaybeUninit<_VPB> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VPB>(), - 96usize, - concat!("Size of: ", stringify!(_VPB)), - ); - assert_eq!( - ::core::mem::align_of::<_VPB>(), - 8usize, - concat!("Alignment of ", stringify!(_VPB)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_VPB), "::", stringify!(Type)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!("Offset of field: ", stringify!(_VPB), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_VPB), "::", stringify!(Flags)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeLabelLength) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_VPB), - "::", - stringify!(VolumeLabelLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceObject) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_VPB), "::", stringify!(DeviceObject)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RealDevice) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_VPB), "::", stringify!(RealDevice)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SerialNumber) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_VPB), "::", stringify!(SerialNumber)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReferenceCount) as usize - ptr as usize }, - 28usize, - concat!("Offset of field: ", stringify!(_VPB), "::", stringify!(ReferenceCount)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeLabel) as usize - ptr as usize }, - 32usize, - concat!("Offset of field: ", stringify!(_VPB), "::", stringify!(VolumeLabel)), - ); -} -impl Default for _VPB { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type VPB = _VPB; -pub type PADAPTER_OBJECT = *mut _DMA_ADAPTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WAIT_CONTEXT_BLOCK { - pub __bindgen_anon_1: _WAIT_CONTEXT_BLOCK__bindgen_ty_1, - pub DeviceRoutine: PDRIVER_CONTROL, - pub DeviceContext: PVOID, - pub NumberOfMapRegisters: ULONG, - pub DeviceObject: PVOID, - pub CurrentIrp: PVOID, - pub BufferChainingDpc: PKDPC, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WAIT_CONTEXT_BLOCK__bindgen_ty_1 { - pub WaitQueueEntry: KDEVICE_QUEUE_ENTRY, - pub __bindgen_anon_1: _WAIT_CONTEXT_BLOCK__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WAIT_CONTEXT_BLOCK__bindgen_ty_1__bindgen_ty_1 { - pub DmaWaitEntry: LIST_ENTRY, - pub NumberOfChannels: ULONG, - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__WAIT_CONTEXT_BLOCK__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WAIT_CONTEXT_BLOCK__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WAIT_CONTEXT_BLOCK__bindgen_ty_1__bindgen_ty_1>(), - 24usize, - concat!("Size of: ", stringify!(_WAIT_CONTEXT_BLOCK__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WAIT_CONTEXT_BLOCK__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WAIT_CONTEXT_BLOCK__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DmaWaitEntry) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WAIT_CONTEXT_BLOCK__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(DmaWaitEntry), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfChannels) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WAIT_CONTEXT_BLOCK__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(NumberOfChannels), - ), - ); -} -impl Default for _WAIT_CONTEXT_BLOCK__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -impl _WAIT_CONTEXT_BLOCK__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn SyncCallback(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_SyncCallback(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn DmaContext(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_DmaContext(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ZeroMapRegisters(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_ZeroMapRegisters(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 9u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 9u8, val as u64) - } - } - #[inline] - pub fn NumberOfRemapPages(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 20u8) as u32) } - } - #[inline] - pub fn set_NumberOfRemapPages(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 20u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - SyncCallback: ULONG, - DmaContext: ULONG, - ZeroMapRegisters: ULONG, - Reserved: ULONG, - NumberOfRemapPages: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let SyncCallback: u32 = unsafe { - ::core::mem::transmute(SyncCallback) - }; - SyncCallback as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let DmaContext: u32 = unsafe { ::core::mem::transmute(DmaContext) }; - DmaContext as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let ZeroMapRegisters: u32 = unsafe { - ::core::mem::transmute(ZeroMapRegisters) - }; - ZeroMapRegisters as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 9u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 20u8, - { - let NumberOfRemapPages: u32 = unsafe { - ::core::mem::transmute(NumberOfRemapPages) - }; - NumberOfRemapPages as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WAIT_CONTEXT_BLOCK__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WAIT_CONTEXT_BLOCK__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WAIT_CONTEXT_BLOCK__bindgen_ty_1>(), - 24usize, - concat!("Size of: ", stringify!(_WAIT_CONTEXT_BLOCK__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WAIT_CONTEXT_BLOCK__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_WAIT_CONTEXT_BLOCK__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WaitQueueEntry) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WAIT_CONTEXT_BLOCK__bindgen_ty_1), - "::", - stringify!(WaitQueueEntry), - ), - ); -} -impl Default for _WAIT_CONTEXT_BLOCK__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WAIT_CONTEXT_BLOCK() { - const UNINIT: ::core::mem::MaybeUninit<_WAIT_CONTEXT_BLOCK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WAIT_CONTEXT_BLOCK>(), - 72usize, - concat!("Size of: ", stringify!(_WAIT_CONTEXT_BLOCK)), - ); - assert_eq!( - ::core::mem::align_of::<_WAIT_CONTEXT_BLOCK>(), - 8usize, - concat!("Alignment of ", stringify!(_WAIT_CONTEXT_BLOCK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceRoutine) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WAIT_CONTEXT_BLOCK), - "::", - stringify!(DeviceRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceContext) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WAIT_CONTEXT_BLOCK), - "::", - stringify!(DeviceContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfMapRegisters) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WAIT_CONTEXT_BLOCK), - "::", - stringify!(NumberOfMapRegisters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceObject) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WAIT_CONTEXT_BLOCK), - "::", - stringify!(DeviceObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentIrp) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WAIT_CONTEXT_BLOCK), - "::", - stringify!(CurrentIrp), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BufferChainingDpc) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WAIT_CONTEXT_BLOCK), - "::", - stringify!(BufferChainingDpc), - ), - ); -} -impl Default for _WAIT_CONTEXT_BLOCK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WAIT_CONTEXT_BLOCK = _WAIT_CONTEXT_BLOCK; -pub type PWAIT_CONTEXT_BLOCK = *mut _WAIT_CONTEXT_BLOCK; -#[repr(C)] -#[repr(align(16))] -#[derive(Copy, Clone)] -pub struct _DEVICE_OBJECT { - pub Type: CSHORT, - pub Size: USHORT, - pub ReferenceCount: LONG, - pub DriverObject: *mut _DRIVER_OBJECT, - pub NextDevice: *mut _DEVICE_OBJECT, - pub AttachedDevice: *mut _DEVICE_OBJECT, - pub CurrentIrp: *mut _IRP, - pub Timer: PIO_TIMER, - pub Flags: ULONG, - pub Characteristics: ULONG, - pub Vpb: PVPB, - pub DeviceExtension: PVOID, - pub DeviceType: ULONG, - pub StackSize: CCHAR, - pub Queue: _DEVICE_OBJECT__bindgen_ty_1, - pub AlignmentRequirement: ULONG, - pub DeviceQueue: KDEVICE_QUEUE, - pub Dpc: KDPC, - pub ActiveThreadCount: ULONG, - pub SecurityDescriptor: PSECURITY_DESCRIPTOR, - pub DeviceLock: KEVENT, - pub SectorSize: USHORT, - pub Spare1: USHORT, - pub DeviceObjectExtension: *mut _DEVOBJ_EXTENSION, - pub Reserved: PVOID, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DEVICE_OBJECT__bindgen_ty_1 { - pub ListEntry: LIST_ENTRY, - pub Wcb: WAIT_CONTEXT_BLOCK, -} -#[test] -fn bindgen_test_layout__DEVICE_OBJECT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_DEVICE_OBJECT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVICE_OBJECT__bindgen_ty_1>(), - 72usize, - concat!("Size of: ", stringify!(_DEVICE_OBJECT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_OBJECT__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_DEVICE_OBJECT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ListEntry) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT__bindgen_ty_1), - "::", - stringify!(ListEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Wcb) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT__bindgen_ty_1), - "::", - stringify!(Wcb), - ), - ); -} -impl Default for _DEVICE_OBJECT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DEVICE_OBJECT() { - const UNINIT: ::core::mem::MaybeUninit<_DEVICE_OBJECT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVICE_OBJECT>(), - 336usize, - concat!("Size of: ", stringify!(_DEVICE_OBJECT)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_OBJECT>(), - 16usize, - concat!("Alignment of ", stringify!(_DEVICE_OBJECT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_DEVICE_OBJECT), "::", stringify!(Type)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!("Offset of field: ", stringify!(_DEVICE_OBJECT), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReferenceCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(ReferenceCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverObject) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(DriverObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextDevice) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(NextDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AttachedDevice) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(AttachedDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentIrp) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(CurrentIrp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Timer) as usize - ptr as usize }, - 40usize, - concat!("Offset of field: ", stringify!(_DEVICE_OBJECT), "::", stringify!(Timer)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 48usize, - concat!("Offset of field: ", stringify!(_DEVICE_OBJECT), "::", stringify!(Flags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Characteristics) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(Characteristics), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vpb) as usize - ptr as usize }, - 56usize, - concat!("Offset of field: ", stringify!(_DEVICE_OBJECT), "::", stringify!(Vpb)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceExtension) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(DeviceExtension), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceType) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(DeviceType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StackSize) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(StackSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Queue) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(_DEVICE_OBJECT), "::", stringify!(Queue)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AlignmentRequirement) as usize - ptr as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(AlignmentRequirement), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceQueue) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(DeviceQueue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dpc) as usize - ptr as usize }, - 200usize, - concat!("Offset of field: ", stringify!(_DEVICE_OBJECT), "::", stringify!(Dpc)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ActiveThreadCount) as usize - ptr as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(ActiveThreadCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityDescriptor) as usize - ptr as usize - }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(SecurityDescriptor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceLock) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(DeviceLock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectorSize) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(SectorSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spare1) as usize - ptr as usize }, - 306usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(Spare1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceObjectExtension) as usize - ptr as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(DeviceObjectExtension), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_OBJECT), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _DEVICE_OBJECT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEVICE_OBJECT = _DEVICE_OBJECT; -pub type PDEVICE_OBJECT = *mut _DEVICE_OBJECT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DEVICE_OBJECT_POWER_EXTENSION { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DEVOBJ_EXTENSION { - pub Type: CSHORT, - pub Size: USHORT, - pub DeviceObject: PDEVICE_OBJECT, - pub PowerFlags: ULONG, - pub Dope: *mut _DEVICE_OBJECT_POWER_EXTENSION, - pub ExtensionFlags: ULONG, - pub DeviceNode: PVOID, - pub AttachedTo: PDEVICE_OBJECT, - pub StartIoCount: LONG, - pub StartIoKey: LONG, - pub StartIoFlags: ULONG, - pub Vpb: PVPB, - pub DependencyNode: PVOID, - pub InterruptContext: PVOID, - pub InterruptCount: LONG, - pub VerifierContext: PVOID, -} -#[test] -fn bindgen_test_layout__DEVOBJ_EXTENSION() { - const UNINIT: ::core::mem::MaybeUninit<_DEVOBJ_EXTENSION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVOBJ_EXTENSION>(), - 112usize, - concat!("Size of: ", stringify!(_DEVOBJ_EXTENSION)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVOBJ_EXTENSION>(), - 8usize, - concat!("Alignment of ", stringify!(_DEVOBJ_EXTENSION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceObject) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(DeviceObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PowerFlags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(PowerFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dope) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(Dope), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtensionFlags) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(ExtensionFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceNode) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(DeviceNode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AttachedTo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(AttachedTo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartIoCount) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(StartIoCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartIoKey) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(StartIoKey), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartIoFlags) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(StartIoFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vpb) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(Vpb), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DependencyNode) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(DependencyNode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterruptContext) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(InterruptContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptCount) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(InterruptCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VerifierContext) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DEVOBJ_EXTENSION), - "::", - stringify!(VerifierContext), - ), - ); -} -impl Default for _DEVOBJ_EXTENSION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEVOBJ_EXTENSION = _DEVOBJ_EXTENSION; -pub type PDEVOBJ_EXTENSION = *mut _DEVOBJ_EXTENSION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DRIVER_EXTENSION { - pub DriverObject: *mut _DRIVER_OBJECT, - pub AddDevice: PDRIVER_ADD_DEVICE, - pub Count: ULONG, - pub ServiceKeyName: UNICODE_STRING, -} -#[test] -fn bindgen_test_layout__DRIVER_EXTENSION() { - const UNINIT: ::core::mem::MaybeUninit<_DRIVER_EXTENSION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DRIVER_EXTENSION>(), - 40usize, - concat!("Size of: ", stringify!(_DRIVER_EXTENSION)), - ); - assert_eq!( - ::core::mem::align_of::<_DRIVER_EXTENSION>(), - 8usize, - concat!("Alignment of ", stringify!(_DRIVER_EXTENSION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverObject) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_EXTENSION), - "::", - stringify!(DriverObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AddDevice) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_EXTENSION), - "::", - stringify!(AddDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_EXTENSION), - "::", - stringify!(Count), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ServiceKeyName) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_EXTENSION), - "::", - stringify!(ServiceKeyName), - ), - ); -} -impl Default for _DRIVER_EXTENSION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DRIVER_EXTENSION = _DRIVER_EXTENSION; -pub type PDRIVER_EXTENSION = *mut _DRIVER_EXTENSION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DRIVER_OBJECT { - pub Type: CSHORT, - pub Size: CSHORT, - pub DeviceObject: PDEVICE_OBJECT, - pub Flags: ULONG, - pub DriverStart: PVOID, - pub DriverSize: ULONG, - pub DriverSection: PVOID, - pub DriverExtension: PDRIVER_EXTENSION, - pub DriverName: UNICODE_STRING, - pub HardwareDatabase: PUNICODE_STRING, - pub FastIoDispatch: PFAST_IO_DISPATCH, - pub DriverInit: PDRIVER_INITIALIZE, - pub DriverStartIo: PDRIVER_STARTIO, - pub DriverUnload: PDRIVER_UNLOAD, - pub MajorFunction: [PDRIVER_DISPATCH; 28usize], -} -#[test] -fn bindgen_test_layout__DRIVER_OBJECT() { - const UNINIT: ::core::mem::MaybeUninit<_DRIVER_OBJECT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DRIVER_OBJECT>(), - 336usize, - concat!("Size of: ", stringify!(_DRIVER_OBJECT)), - ); - assert_eq!( - ::core::mem::align_of::<_DRIVER_OBJECT>(), - 8usize, - concat!("Alignment of ", stringify!(_DRIVER_OBJECT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_DRIVER_OBJECT), "::", stringify!(Type)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!("Offset of field: ", stringify!(_DRIVER_OBJECT), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceObject) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_OBJECT), - "::", - stringify!(DeviceObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_DRIVER_OBJECT), "::", stringify!(Flags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverStart) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_OBJECT), - "::", - stringify!(DriverStart), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverSize) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_OBJECT), - "::", - stringify!(DriverSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverSection) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_OBJECT), - "::", - stringify!(DriverSection), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverExtension) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_OBJECT), - "::", - stringify!(DriverExtension), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverName) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_OBJECT), - "::", - stringify!(DriverName), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HardwareDatabase) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_OBJECT), - "::", - stringify!(HardwareDatabase), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FastIoDispatch) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_OBJECT), - "::", - stringify!(FastIoDispatch), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverInit) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_OBJECT), - "::", - stringify!(DriverInit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverStartIo) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_OBJECT), - "::", - stringify!(DriverStartIo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverUnload) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_OBJECT), - "::", - stringify!(DriverUnload), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorFunction) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_OBJECT), - "::", - stringify!(MajorFunction), - ), - ); -} -impl Default for _DRIVER_OBJECT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DRIVER_OBJECT = _DRIVER_OBJECT; -pub type PDRIVER_OBJECT = *mut _DRIVER_OBJECT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SECTION_OBJECT_POINTERS { - pub DataSectionObject: PVOID, - pub SharedCacheMap: PVOID, - pub ImageSectionObject: PVOID, -} -#[test] -fn bindgen_test_layout__SECTION_OBJECT_POINTERS() { - const UNINIT: ::core::mem::MaybeUninit<_SECTION_OBJECT_POINTERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SECTION_OBJECT_POINTERS>(), - 24usize, - concat!("Size of: ", stringify!(_SECTION_OBJECT_POINTERS)), - ); - assert_eq!( - ::core::mem::align_of::<_SECTION_OBJECT_POINTERS>(), - 8usize, - concat!("Alignment of ", stringify!(_SECTION_OBJECT_POINTERS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataSectionObject) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SECTION_OBJECT_POINTERS), - "::", - stringify!(DataSectionObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SharedCacheMap) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SECTION_OBJECT_POINTERS), - "::", - stringify!(SharedCacheMap), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ImageSectionObject) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SECTION_OBJECT_POINTERS), - "::", - stringify!(ImageSectionObject), - ), - ); -} -impl Default for _SECTION_OBJECT_POINTERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SECTION_OBJECT_POINTERS = _SECTION_OBJECT_POINTERS; -pub type PSECTION_OBJECT_POINTERS = *mut SECTION_OBJECT_POINTERS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_COMPLETION_CONTEXT { - pub Port: PVOID, - pub Key: PVOID, - pub UsageCount: LONG_PTR, -} -#[test] -fn bindgen_test_layout__IO_COMPLETION_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_IO_COMPLETION_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_COMPLETION_CONTEXT>(), - 24usize, - concat!("Size of: ", stringify!(_IO_COMPLETION_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_COMPLETION_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_COMPLETION_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Port) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_COMPLETION_CONTEXT), - "::", - stringify!(Port), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Key) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_COMPLETION_CONTEXT), - "::", - stringify!(Key), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UsageCount) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_COMPLETION_CONTEXT), - "::", - stringify!(UsageCount), - ), - ); -} -impl Default for _IO_COMPLETION_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_COMPLETION_CONTEXT = _IO_COMPLETION_CONTEXT; -pub type PIO_COMPLETION_CONTEXT = *mut _IO_COMPLETION_CONTEXT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_OBJECT { - pub Type: CSHORT, - pub Size: CSHORT, - pub DeviceObject: PDEVICE_OBJECT, - pub Vpb: PVPB, - pub FsContext: PVOID, - pub FsContext2: PVOID, - pub SectionObjectPointer: PSECTION_OBJECT_POINTERS, - pub PrivateCacheMap: PVOID, - pub FinalStatus: NTSTATUS, - pub RelatedFileObject: *mut _FILE_OBJECT, - pub LockOperation: BOOLEAN, - pub DeletePending: BOOLEAN, - pub ReadAccess: BOOLEAN, - pub WriteAccess: BOOLEAN, - pub DeleteAccess: BOOLEAN, - pub SharedRead: BOOLEAN, - pub SharedWrite: BOOLEAN, - pub SharedDelete: BOOLEAN, - pub Flags: ULONG, - pub FileName: UNICODE_STRING, - pub CurrentByteOffset: LARGE_INTEGER, - pub Waiters: ULONG, - pub Busy: ULONG, - pub LastLock: PVOID, - pub Lock: KEVENT, - pub Event: KEVENT, - pub CompletionContext: PIO_COMPLETION_CONTEXT, - pub IrpListLock: KSPIN_LOCK, - pub IrpList: LIST_ENTRY, - pub FileObjectExtension: PVOID, -} -#[test] -fn bindgen_test_layout__FILE_OBJECT() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_OBJECT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_OBJECT>(), - 216usize, - concat!("Size of: ", stringify!(_FILE_OBJECT)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_OBJECT>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_OBJECT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_FILE_OBJECT), "::", stringify!(Type)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!("Offset of field: ", stringify!(_FILE_OBJECT), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceObject) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(DeviceObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vpb) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_FILE_OBJECT), "::", stringify!(Vpb)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FsContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(FsContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FsContext2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(FsContext2), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SectionObjectPointer) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(SectionObjectPointer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrivateCacheMap) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(PrivateCacheMap), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FinalStatus) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(FinalStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RelatedFileObject) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(RelatedFileObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LockOperation) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(LockOperation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeletePending) as usize - ptr as usize }, - 73usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(DeletePending), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadAccess) as usize - ptr as usize }, - 74usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(ReadAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WriteAccess) as usize - ptr as usize }, - 75usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(WriteAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeleteAccess) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(DeleteAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SharedRead) as usize - ptr as usize }, - 77usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(SharedRead), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SharedWrite) as usize - ptr as usize }, - 78usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(SharedWrite), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SharedDelete) as usize - ptr as usize }, - 79usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(SharedDelete), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(_FILE_OBJECT), "::", stringify!(Flags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(FileName), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CurrentByteOffset) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(CurrentByteOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Waiters) as usize - ptr as usize }, - 112usize, - concat!("Offset of field: ", stringify!(_FILE_OBJECT), "::", stringify!(Waiters)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Busy) as usize - ptr as usize }, - 116usize, - concat!("Offset of field: ", stringify!(_FILE_OBJECT), "::", stringify!(Busy)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastLock) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(LastLock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lock) as usize - ptr as usize }, - 128usize, - concat!("Offset of field: ", stringify!(_FILE_OBJECT), "::", stringify!(Lock)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Event) as usize - ptr as usize }, - 152usize, - concat!("Offset of field: ", stringify!(_FILE_OBJECT), "::", stringify!(Event)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompletionContext) as usize - ptr as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(CompletionContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IrpListLock) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(IrpListLock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IrpList) as usize - ptr as usize }, - 192usize, - concat!("Offset of field: ", stringify!(_FILE_OBJECT), "::", stringify!(IrpList)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileObjectExtension) as usize - ptr as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECT), - "::", - stringify!(FileObjectExtension), - ), - ); -} -impl Default for _FILE_OBJECT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_OBJECT = _FILE_OBJECT; -pub type PFILE_OBJECT = *mut _FILE_OBJECT; -#[repr(C)] -#[repr(align(16))] -#[derive(Copy, Clone)] -pub struct _IRP { - pub Type: CSHORT, - pub Size: USHORT, - pub MdlAddress: PMDL, - pub Flags: ULONG, - pub AssociatedIrp: _IRP__bindgen_ty_1, - pub ThreadListEntry: LIST_ENTRY, - pub IoStatus: IO_STATUS_BLOCK, - pub RequestorMode: KPROCESSOR_MODE, - pub PendingReturned: BOOLEAN, - pub StackCount: CHAR, - pub CurrentLocation: CHAR, - pub Cancel: BOOLEAN, - pub CancelIrql: KIRQL, - pub ApcEnvironment: CCHAR, - pub AllocationFlags: UCHAR, - pub __bindgen_anon_1: _IRP__bindgen_ty_2, - pub UserEvent: PKEVENT, - pub Overlay: _IRP__bindgen_ty_3, - pub CancelRoutine: PDRIVER_CANCEL, - pub UserBuffer: PVOID, - pub Tail: _IRP__bindgen_ty_4, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IRP__bindgen_ty_1 { - pub MasterIrp: *mut _IRP, - pub IrpCount: LONG, - pub SystemBuffer: PVOID, -} -#[test] -fn bindgen_test_layout__IRP__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_IRP__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IRP__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_IRP__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IRP__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_IRP__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MasterIrp) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_1), - "::", - stringify!(MasterIrp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IrpCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_1), - "::", - stringify!(IrpCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SystemBuffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_1), - "::", - stringify!(SystemBuffer), - ), - ); -} -impl Default for _IRP__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IRP__bindgen_ty_2 { - pub UserIosb: PIO_STATUS_BLOCK, - pub IoRingContext: PVOID, -} -#[test] -fn bindgen_test_layout__IRP__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_IRP__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IRP__bindgen_ty_2>(), - 8usize, - concat!("Size of: ", stringify!(_IRP__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_IRP__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(_IRP__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserIosb) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_2), - "::", - stringify!(UserIosb), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoRingContext) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_2), - "::", - stringify!(IoRingContext), - ), - ); -} -impl Default for _IRP__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IRP__bindgen_ty_3 { - pub AsynchronousParameters: _IRP__bindgen_ty_3__bindgen_ty_1, - pub AllocationSize: LARGE_INTEGER, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IRP__bindgen_ty_3__bindgen_ty_1 { - pub __bindgen_anon_1: _IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1, - pub __bindgen_anon_2: _IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1 { - pub UserApcRoutine: PIO_APC_ROUTINE, - pub IssuingProcess: PVOID, -} -#[test] -fn bindgen_test_layout__IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserApcRoutine) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(UserApcRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IssuingProcess) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(IssuingProcess), - ), - ); -} -impl Default for _IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_2 { - pub UserApcContext: PVOID, - pub IoRing: *mut _IORING_OBJECT, -} -#[test] -fn bindgen_test_layout__IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_2>(), - 8usize, - concat!("Size of: ", stringify!(_IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_2>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserApcContext) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(UserApcContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoRing) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(IoRing), - ), - ); -} -impl Default for _IRP__bindgen_ty_3__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IRP__bindgen_ty_3__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_IRP__bindgen_ty_3__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_IRP__bindgen_ty_3__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IRP__bindgen_ty_3__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_IRP__bindgen_ty_3__bindgen_ty_1)), - ); -} -impl Default for _IRP__bindgen_ty_3__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IRP__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit<_IRP__bindgen_ty_3> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IRP__bindgen_ty_3>(), - 16usize, - concat!("Size of: ", stringify!(_IRP__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_IRP__bindgen_ty_3>(), - 8usize, - concat!("Alignment of ", stringify!(_IRP__bindgen_ty_3)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AsynchronousParameters) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_3), - "::", - stringify!(AsynchronousParameters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_3), - "::", - stringify!(AllocationSize), - ), - ); -} -impl Default for _IRP__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IRP__bindgen_ty_4 { - pub Overlay: _IRP__bindgen_ty_4__bindgen_ty_1, - pub Apc: KAPC, - pub CompletionKey: PVOID, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IRP__bindgen_ty_4__bindgen_ty_1 { - pub __bindgen_anon_1: _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, - pub Thread: PETHREAD, - pub AuxiliaryBuffer: PCHAR, - pub __bindgen_anon_2: _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2, - pub OriginalFileObject: PFILE_OBJECT, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { - pub DeviceQueueEntry: KDEVICE_QUEUE_ENTRY, - pub __bindgen_anon_1: _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { - pub DriverContext: [PVOID; 4usize], -} -#[test] -fn bindgen_test_layout__IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - >(), - 32usize, - concat!( - "Size of: ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverContext) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(DriverContext), - ), - ); -} -impl Default for _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1>(), - 32usize, - concat!("Size of: ", stringify!(_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceQueueEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(DeviceQueueEntry), - ), - ); -} -impl Default for _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2 { - pub ListEntry: LIST_ENTRY, - pub __bindgen_anon_1: _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 { - pub CurrentStackLocation: *mut _IO_STACK_LOCATION, - pub PacketType: ULONG, -} -#[test] -fn bindgen_test_layout__IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CurrentStackLocation) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(CurrentStackLocation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PacketType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(PacketType), - ), - ); -} -impl Default for _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2>(), - 24usize, - concat!("Size of: ", stringify!(_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ListEntry) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(ListEntry), - ), - ); -} -impl Default for _IRP__bindgen_ty_4__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IRP__bindgen_ty_4__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_IRP__bindgen_ty_4__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IRP__bindgen_ty_4__bindgen_ty_1>(), - 80usize, - concat!("Size of: ", stringify!(_IRP__bindgen_ty_4__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IRP__bindgen_ty_4__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_IRP__bindgen_ty_4__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Thread) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1), - "::", - stringify!(Thread), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AuxiliaryBuffer) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1), - "::", - stringify!(AuxiliaryBuffer), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OriginalFileObject) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_4__bindgen_ty_1), - "::", - stringify!(OriginalFileObject), - ), - ); -} -impl Default for _IRP__bindgen_ty_4__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IRP__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit<_IRP__bindgen_ty_4> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IRP__bindgen_ty_4>(), - 88usize, - concat!("Size of: ", stringify!(_IRP__bindgen_ty_4)), - ); - assert_eq!( - ::core::mem::align_of::<_IRP__bindgen_ty_4>(), - 8usize, - concat!("Alignment of ", stringify!(_IRP__bindgen_ty_4)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Overlay) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_4), - "::", - stringify!(Overlay), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Apc) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_4), - "::", - stringify!(Apc), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompletionKey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IRP__bindgen_ty_4), - "::", - stringify!(CompletionKey), - ), - ); -} -impl Default for _IRP__bindgen_ty_4 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IRP() { - const UNINIT: ::core::mem::MaybeUninit<_IRP> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IRP>(), - 208usize, - concat!("Size of: ", stringify!(_IRP)), - ); - assert_eq!( - ::core::mem::align_of::<_IRP>(), - 16usize, - concat!("Alignment of ", stringify!(_IRP)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(Type)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MdlAddress) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(MdlAddress)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(Flags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AssociatedIrp) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(AssociatedIrp)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ThreadListEntry) as usize - ptr as usize }, - 32usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(ThreadListEntry)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoStatus) as usize - ptr as usize }, - 48usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(IoStatus)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequestorMode) as usize - ptr as usize }, - 64usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(RequestorMode)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PendingReturned) as usize - ptr as usize }, - 65usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(PendingReturned)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StackCount) as usize - ptr as usize }, - 66usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(StackCount)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentLocation) as usize - ptr as usize }, - 67usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(CurrentLocation)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cancel) as usize - ptr as usize }, - 68usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(Cancel)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CancelIrql) as usize - ptr as usize }, - 69usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(CancelIrql)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ApcEnvironment) as usize - ptr as usize }, - 70usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(ApcEnvironment)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationFlags) as usize - ptr as usize }, - 71usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(AllocationFlags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserEvent) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(UserEvent)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Overlay) as usize - ptr as usize }, - 88usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(Overlay)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CancelRoutine) as usize - ptr as usize }, - 104usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(CancelRoutine)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserBuffer) as usize - ptr as usize }, - 112usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(UserBuffer)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Tail) as usize - ptr as usize }, - 120usize, - concat!("Offset of field: ", stringify!(_IRP), "::", stringify!(Tail)), - ); -} -impl Default for _IRP { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IRP = _IRP; -pub type PIRP = *mut IRP; -pub type IO_COMPLETION_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - DeviceObject: PDEVICE_OBJECT, - Irp: PIRP, - Context: PVOID, - ) -> NTSTATUS, ->; -pub type PIO_COMPLETION_ROUTINE = IO_COMPLETION_ROUTINE; -pub mod _DEVICE_RELATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const BusRelations: Type = 0; - pub const EjectionRelations: Type = 1; - pub const PowerRelations: Type = 2; - pub const RemovalRelations: Type = 3; - pub const TargetDeviceRelation: Type = 4; - pub const SingleBusRelations: Type = 5; - pub const TransportRelations: Type = 6; -} -pub use self::_DEVICE_RELATION_TYPE::Type as DEVICE_RELATION_TYPE; -pub type PDEVICE_RELATION_TYPE = *mut _DEVICE_RELATION_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DEVICE_RELATIONS { - pub Count: ULONG, - pub Objects: [PDEVICE_OBJECT; 1usize], -} -#[test] -fn bindgen_test_layout__DEVICE_RELATIONS() { - const UNINIT: ::core::mem::MaybeUninit<_DEVICE_RELATIONS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVICE_RELATIONS>(), - 16usize, - concat!("Size of: ", stringify!(_DEVICE_RELATIONS)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_RELATIONS>(), - 8usize, - concat!("Alignment of ", stringify!(_DEVICE_RELATIONS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RELATIONS), - "::", - stringify!(Count), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Objects) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RELATIONS), - "::", - stringify!(Objects), - ), - ); -} -impl Default for _DEVICE_RELATIONS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEVICE_RELATIONS = _DEVICE_RELATIONS; -pub type PDEVICE_RELATIONS = *mut _DEVICE_RELATIONS; -pub mod _DEVICE_USAGE_NOTIFICATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const DeviceUsageTypeUndefined: Type = 0; - pub const DeviceUsageTypePaging: Type = 1; - pub const DeviceUsageTypeHibernation: Type = 2; - pub const DeviceUsageTypeDumpFile: Type = 3; - pub const DeviceUsageTypeBoot: Type = 4; - pub const DeviceUsageTypePostDisplay: Type = 5; - pub const DeviceUsageTypeGuestAssigned: Type = 6; -} -pub use self::_DEVICE_USAGE_NOTIFICATION_TYPE::Type as DEVICE_USAGE_NOTIFICATION_TYPE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, -} -#[test] -fn bindgen_test_layout__INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_INTERFACE>(), - 32usize, - concat!("Size of: ", stringify!(_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_INTERFACE), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!("Offset of field: ", stringify!(_INTERFACE), "::", stringify!(Version)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_INTERFACE), "::", stringify!(Context)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); -} -impl Default for _INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type INTERFACE = _INTERFACE; -pub type PINTERFACE = *mut _INTERFACE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DEVICE_CAPABILITIES { - pub Size: USHORT, - pub Version: USHORT, - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, - pub Address: ULONG, - pub UINumber: ULONG, - pub DeviceState: [DEVICE_POWER_STATE; 7usize], - pub SystemWake: SYSTEM_POWER_STATE, - pub DeviceWake: DEVICE_POWER_STATE, - pub D1Latency: ULONG, - pub D2Latency: ULONG, - pub D3Latency: ULONG, -} -#[test] -fn bindgen_test_layout__DEVICE_CAPABILITIES() { - const UNINIT: ::core::mem::MaybeUninit<_DEVICE_CAPABILITIES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVICE_CAPABILITIES>(), - 64usize, - concat!("Size of: ", stringify!(_DEVICE_CAPABILITIES)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_CAPABILITIES>(), - 4usize, - concat!("Alignment of ", stringify!(_DEVICE_CAPABILITIES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_CAPABILITIES), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_CAPABILITIES), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_CAPABILITIES), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UINumber) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_CAPABILITIES), - "::", - stringify!(UINumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceState) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_CAPABILITIES), - "::", - stringify!(DeviceState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SystemWake) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_CAPABILITIES), - "::", - stringify!(SystemWake), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceWake) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_CAPABILITIES), - "::", - stringify!(DeviceWake), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).D1Latency) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_CAPABILITIES), - "::", - stringify!(D1Latency), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).D2Latency) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_CAPABILITIES), - "::", - stringify!(D2Latency), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).D3Latency) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_CAPABILITIES), - "::", - stringify!(D3Latency), - ), - ); -} -impl Default for _DEVICE_CAPABILITIES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -impl _DEVICE_CAPABILITIES { - #[inline] - pub fn DeviceD1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_DeviceD1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn DeviceD2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_DeviceD2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn LockSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_LockSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn EjectSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_EjectSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Removable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_Removable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn DockDevice(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_DockDevice(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn UniqueID(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_UniqueID(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn SilentInstall(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_SilentInstall(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn RawDeviceOK(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_RawDeviceOK(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn SurpriseRemovalOK(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_SurpriseRemovalOK(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn WakeFromD0(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_WakeFromD0(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn WakeFromD1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } - } - #[inline] - pub fn set_WakeFromD1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn WakeFromD2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } - } - #[inline] - pub fn set_WakeFromD2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn WakeFromD3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } - } - #[inline] - pub fn set_WakeFromD3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 1u8, val as u64) - } - } - #[inline] - pub fn HardwareDisabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } - } - #[inline] - pub fn set_HardwareDisabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn NonDynamic(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } - } - #[inline] - pub fn set_NonDynamic(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn WarmEjectSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_WarmEjectSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn NoDisplayInUI(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_NoDisplayInUI(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn WakeFromInterrupt(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } - } - #[inline] - pub fn set_WakeFromInterrupt(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 1u8, val as u64) - } - } - #[inline] - pub fn SecureDevice(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } - } - #[inline] - pub fn set_SecureDevice(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 1u8, val as u64) - } - } - #[inline] - pub fn ChildOfVgaEnabledBridge(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } - } - #[inline] - pub fn set_ChildOfVgaEnabledBridge(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 1u8, val as u64) - } - } - #[inline] - pub fn DecodeIoOnBoot(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u32) } - } - #[inline] - pub fn set_DecodeIoOnBoot(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 9u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(23usize, 9u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - DeviceD1: ULONG, - DeviceD2: ULONG, - LockSupported: ULONG, - EjectSupported: ULONG, - Removable: ULONG, - DockDevice: ULONG, - UniqueID: ULONG, - SilentInstall: ULONG, - RawDeviceOK: ULONG, - SurpriseRemovalOK: ULONG, - WakeFromD0: ULONG, - WakeFromD1: ULONG, - WakeFromD2: ULONG, - WakeFromD3: ULONG, - HardwareDisabled: ULONG, - NonDynamic: ULONG, - WarmEjectSupported: ULONG, - NoDisplayInUI: ULONG, - Reserved1: ULONG, - WakeFromInterrupt: ULONG, - SecureDevice: ULONG, - ChildOfVgaEnabledBridge: ULONG, - DecodeIoOnBoot: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let DeviceD1: u32 = unsafe { ::core::mem::transmute(DeviceD1) }; - DeviceD1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let DeviceD2: u32 = unsafe { ::core::mem::transmute(DeviceD2) }; - DeviceD2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let LockSupported: u32 = unsafe { - ::core::mem::transmute(LockSupported) - }; - LockSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let EjectSupported: u32 = unsafe { - ::core::mem::transmute(EjectSupported) - }; - EjectSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let Removable: u32 = unsafe { ::core::mem::transmute(Removable) }; - Removable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let DockDevice: u32 = unsafe { ::core::mem::transmute(DockDevice) }; - DockDevice as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let UniqueID: u32 = unsafe { ::core::mem::transmute(UniqueID) }; - UniqueID as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let SilentInstall: u32 = unsafe { - ::core::mem::transmute(SilentInstall) - }; - SilentInstall as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let RawDeviceOK: u32 = unsafe { - ::core::mem::transmute(RawDeviceOK) - }; - RawDeviceOK as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let SurpriseRemovalOK: u32 = unsafe { - ::core::mem::transmute(SurpriseRemovalOK) - }; - SurpriseRemovalOK as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let WakeFromD0: u32 = unsafe { ::core::mem::transmute(WakeFromD0) }; - WakeFromD0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let WakeFromD1: u32 = unsafe { ::core::mem::transmute(WakeFromD1) }; - WakeFromD1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let WakeFromD2: u32 = unsafe { ::core::mem::transmute(WakeFromD2) }; - WakeFromD2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 1u8, - { - let WakeFromD3: u32 = unsafe { ::core::mem::transmute(WakeFromD3) }; - WakeFromD3 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 1u8, - { - let HardwareDisabled: u32 = unsafe { - ::core::mem::transmute(HardwareDisabled) - }; - HardwareDisabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let NonDynamic: u32 = unsafe { ::core::mem::transmute(NonDynamic) }; - NonDynamic as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let WarmEjectSupported: u32 = unsafe { - ::core::mem::transmute(WarmEjectSupported) - }; - WarmEjectSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let NoDisplayInUI: u32 = unsafe { - ::core::mem::transmute(NoDisplayInUI) - }; - NoDisplayInUI as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 1u8, - { - let WakeFromInterrupt: u32 = unsafe { - ::core::mem::transmute(WakeFromInterrupt) - }; - WakeFromInterrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 1u8, - { - let SecureDevice: u32 = unsafe { - ::core::mem::transmute(SecureDevice) - }; - SecureDevice as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 1u8, - { - let ChildOfVgaEnabledBridge: u32 = unsafe { - ::core::mem::transmute(ChildOfVgaEnabledBridge) - }; - ChildOfVgaEnabledBridge as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 1u8, - { - let DecodeIoOnBoot: u32 = unsafe { - ::core::mem::transmute(DecodeIoOnBoot) - }; - DecodeIoOnBoot as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 23usize, - 9u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type DEVICE_CAPABILITIES = _DEVICE_CAPABILITIES; -pub type PDEVICE_CAPABILITIES = *mut _DEVICE_CAPABILITIES; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _POWER_SEQUENCE { - pub SequenceD1: ULONG, - pub SequenceD2: ULONG, - pub SequenceD3: ULONG, -} -#[test] -fn bindgen_test_layout__POWER_SEQUENCE() { - const UNINIT: ::core::mem::MaybeUninit<_POWER_SEQUENCE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POWER_SEQUENCE>(), - 12usize, - concat!("Size of: ", stringify!(_POWER_SEQUENCE)), - ); - assert_eq!( - ::core::mem::align_of::<_POWER_SEQUENCE>(), - 4usize, - concat!("Alignment of ", stringify!(_POWER_SEQUENCE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SequenceD1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_SEQUENCE), - "::", - stringify!(SequenceD1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SequenceD2) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_POWER_SEQUENCE), - "::", - stringify!(SequenceD2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SequenceD3) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_POWER_SEQUENCE), - "::", - stringify!(SequenceD3), - ), - ); -} -pub type POWER_SEQUENCE = _POWER_SEQUENCE; -pub type PPOWER_SEQUENCE = *mut _POWER_SEQUENCE; -pub mod BUS_QUERY_ID_TYPE { - pub type Type = ::core::ffi::c_int; - pub const BusQueryDeviceID: Type = 0; - pub const BusQueryHardwareIDs: Type = 1; - pub const BusQueryCompatibleIDs: Type = 2; - pub const BusQueryInstanceID: Type = 3; - pub const BusQueryDeviceSerialNumber: Type = 4; - pub const BusQueryContainerID: Type = 5; -} -pub type PBUS_QUERY_ID_TYPE = *mut BUS_QUERY_ID_TYPE::Type; -pub type PNP_DEVICE_STATE = ULONG; -pub type PPNP_DEVICE_STATE = *mut ULONG; -pub mod DEVICE_TEXT_TYPE { - pub type Type = ::core::ffi::c_int; - pub const DeviceTextDescription: Type = 0; - pub const DeviceTextLocationInformation: Type = 1; -} -pub type PDEVICE_TEXT_TYPE = *mut DEVICE_TEXT_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_STACK_LOCATION { - pub MajorFunction: UCHAR, - pub MinorFunction: UCHAR, - pub Flags: UCHAR, - pub Control: UCHAR, - pub Parameters: _IO_STACK_LOCATION__bindgen_ty_1, - pub DeviceObject: PDEVICE_OBJECT, - pub FileObject: PFILE_OBJECT, - pub CompletionRoutine: PIO_COMPLETION_ROUTINE, - pub Context: PVOID, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IO_STACK_LOCATION__bindgen_ty_1 { - pub Create: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1, - pub CreatePipe: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2, - pub CreateMailslot: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3, - pub Read: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_4, - pub Write: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_5, - pub QueryDirectory: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_6, - pub NotifyDirectory: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_7, - pub NotifyDirectoryEx: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_8, - pub QueryFile: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_9, - pub SetFile: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10, - pub QueryEa: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_11, - pub SetEa: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_12, - pub QueryVolume: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_13, - pub SetVolume: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_14, - pub FileSystemControl: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_15, - pub LockControl: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_16, - pub DeviceIoControl: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_17, - pub QuerySecurity: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_18, - pub SetSecurity: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_19, - pub MountVolume: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20, - pub VerifyVolume: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_21, - pub Scsi: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_22, - pub QueryQuota: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_23, - pub SetQuota: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_24, - pub QueryDeviceRelations: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_25, - pub QueryInterface: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26, - pub DeviceCapabilities: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_27, - pub FilterResourceRequirements: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_28, - pub ReadWriteConfig: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_29, - pub SetLock: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_30, - pub QueryId: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_31, - pub QueryDeviceText: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_32, - pub UsageNotification: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_33, - pub WaitWake: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_34, - pub PowerSequence: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_35, - pub Power: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36, - pub StartDevice: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_37, - pub WMI: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_38, - pub Others: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_39, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1 { - pub SecurityContext: PIO_SECURITY_CONTEXT, - pub Options: ULONG, - pub __bindgen_padding_0: [u16; 2usize], - pub FileAttributes: USHORT, - pub ShareAccess: USHORT, - pub __bindgen_padding_1: u32, - pub EaLength: ULONG, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecurityContext) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(SecurityContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Options) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Options), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShareAccess) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ShareAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(EaLength), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2 { - pub SecurityContext: PIO_SECURITY_CONTEXT, - pub Options: ULONG, - pub __bindgen_padding_0: [u16; 2usize], - pub Reserved: USHORT, - pub ShareAccess: USHORT, - pub Parameters: PNAMED_PIPE_CREATE_PARAMETERS, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecurityContext) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(SecurityContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Options) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Options), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShareAccess) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(ShareAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Parameters), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3 { - pub SecurityContext: PIO_SECURITY_CONTEXT, - pub Options: ULONG, - pub __bindgen_padding_0: [u16; 2usize], - pub Reserved: USHORT, - pub ShareAccess: USHORT, - pub Parameters: PMAILSLOT_CREATE_PARAMETERS, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecurityContext) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(SecurityContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Options) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Options), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShareAccess) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(ShareAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Parameters), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_4 { - pub Length: ULONG, - pub __bindgen_padding_0: u32, - pub Key: ULONG, - pub Flags: ULONG, - pub ByteOffset: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_4, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_4>(), - 24usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_4)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_4>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Key) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(Key), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteOffset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(ByteOffset), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_4 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_5 { - pub Length: ULONG, - pub __bindgen_padding_0: u32, - pub Key: ULONG, - pub Flags: ULONG, - pub ByteOffset: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_5, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_5>(), - 24usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_5)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_5>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_5), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Key) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(Key), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteOffset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(ByteOffset), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_5 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_6 { - pub Length: ULONG, - pub FileName: PUNICODE_STRING, - pub FileInformationClass: FILE_INFORMATION_CLASS, - pub __bindgen_padding_0: u32, - pub FileIndex: ULONG, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_6() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_6, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_6>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_6)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_6>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(FileName), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileInformationClass) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(FileInformationClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(FileIndex), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_6 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[repr(align(8))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_7 { - pub Length: ULONG, - pub __bindgen_padding_0: u32, - pub CompletionFilter: ULONG, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_7() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_7, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_7>(), - 16usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_7)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_7>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_7), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompletionFilter) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(CompletionFilter), - ), - ); -} -#[repr(C)] -#[repr(align(8))] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_8 { - pub Length: ULONG, - pub __bindgen_padding_0: u32, - pub CompletionFilter: ULONG, - pub __bindgen_padding_1: u32, - pub DirectoryNotifyInformationClass: DIRECTORY_NOTIFY_INFORMATION_CLASS, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_8() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_8, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_8>(), - 24usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_8)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_8>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_8), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompletionFilter) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(CompletionFilter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DirectoryNotifyInformationClass) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(DirectoryNotifyInformationClass), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_8 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[repr(align(8))] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_9 { - pub Length: ULONG, - pub __bindgen_padding_0: u32, - pub FileInformationClass: FILE_INFORMATION_CLASS, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_9() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_9, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_9>(), - 16usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_9)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_9>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_9), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_9), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileInformationClass) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_9), - "::", - stringify!(FileInformationClass), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_9 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10 { - pub Length: ULONG, - pub __bindgen_padding_0: u32, - pub FileInformationClass: FILE_INFORMATION_CLASS, - pub FileObject: PFILE_OBJECT, - pub __bindgen_anon_1: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1 { - pub __bindgen_anon_1: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1, - pub ClusterCount: ULONG, - pub DeleteHandle: HANDLE, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1 { - pub ReplaceIfExists: BOOLEAN, - pub AdvanceOnly: BOOLEAN, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1, - >(), - 2usize, - concat!( - "Size of: ", - stringify!( - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!( - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReplaceIfExists) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(ReplaceIfExists), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AdvanceOnly) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!( - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(AdvanceOnly), - ), - ); -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClusterCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1), - "::", - stringify!(ClusterCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeleteHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1), - "::", - stringify!(DeleteHandle), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileInformationClass) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10), - "::", - stringify!(FileInformationClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileObject) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10), - "::", - stringify!(FileObject), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_10 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_11 { - pub Length: ULONG, - pub EaList: PVOID, - pub EaListLength: ULONG, - pub __bindgen_padding_0: u32, - pub EaIndex: ULONG, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_11() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_11, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_11>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_11)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_11>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_11), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_11), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaList) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_11), - "::", - stringify!(EaList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaListLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_11), - "::", - stringify!(EaListLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaIndex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_11), - "::", - stringify!(EaIndex), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_11 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_12 { - pub Length: ULONG, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_12() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_12, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_12>(), - 4usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_12)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_12>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_12), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_12), - "::", - stringify!(Length), - ), - ); -} -#[repr(C)] -#[repr(align(8))] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_13 { - pub Length: ULONG, - pub __bindgen_padding_0: u32, - pub FsInformationClass: FS_INFORMATION_CLASS, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_13() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_13, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_13>(), - 16usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_13)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_13>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_13), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_13), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FsInformationClass) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_13), - "::", - stringify!(FsInformationClass), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_13 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[repr(align(8))] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_14 { - pub Length: ULONG, - pub __bindgen_padding_0: u32, - pub FsInformationClass: FS_INFORMATION_CLASS, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_14() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_14, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_14>(), - 16usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_14)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_14>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_14), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_14), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FsInformationClass) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_14), - "::", - stringify!(FsInformationClass), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_14 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_15 { - pub OutputBufferLength: ULONG, - pub __bindgen_padding_0: u32, - pub InputBufferLength: ULONG, - pub __bindgen_padding_1: u32, - pub FsControlCode: ULONG, - pub Type3InputBuffer: PVOID, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_15() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_15, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_15>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_15)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_15>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_15), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OutputBufferLength) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_15), - "::", - stringify!(OutputBufferLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InputBufferLength) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_15), - "::", - stringify!(InputBufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FsControlCode) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_15), - "::", - stringify!(FsControlCode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Type3InputBuffer) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_15), - "::", - stringify!(Type3InputBuffer), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_15 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_16 { - pub Length: PLARGE_INTEGER, - pub Key: ULONG, - pub ByteOffset: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_16() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_16, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_16>(), - 24usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_16)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_16>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_16), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_16), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Key) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_16), - "::", - stringify!(Key), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteOffset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_16), - "::", - stringify!(ByteOffset), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_16 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_17 { - pub OutputBufferLength: ULONG, - pub __bindgen_padding_0: u32, - pub InputBufferLength: ULONG, - pub __bindgen_padding_1: u32, - pub IoControlCode: ULONG, - pub Type3InputBuffer: PVOID, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_17() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_17, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_17>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_17)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_17>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_17), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OutputBufferLength) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_17), - "::", - stringify!(OutputBufferLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InputBufferLength) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_17), - "::", - stringify!(InputBufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoControlCode) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_17), - "::", - stringify!(IoControlCode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Type3InputBuffer) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_17), - "::", - stringify!(Type3InputBuffer), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_17 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[repr(align(8))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_18 { - pub SecurityInformation: SECURITY_INFORMATION, - pub __bindgen_padding_0: u32, - pub Length: ULONG, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_18() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_18, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_18>(), - 16usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_18)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_18>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_18), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityInformation) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_18), - "::", - stringify!(SecurityInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_18), - "::", - stringify!(Length), - ), - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_19 { - pub SecurityInformation: SECURITY_INFORMATION, - pub SecurityDescriptor: PSECURITY_DESCRIPTOR, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_19() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_19, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_19>(), - 16usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_19)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_19>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_19), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityInformation) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_19), - "::", - stringify!(SecurityInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityDescriptor) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_19), - "::", - stringify!(SecurityDescriptor), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_19 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20 { - pub Vpb: PVPB, - pub DeviceObject: PDEVICE_OBJECT, - pub OutputBufferLength: ULONG, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20>(), - 24usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vpb) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20), - "::", - stringify!(Vpb), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceObject) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20), - "::", - stringify!(DeviceObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OutputBufferLength) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20), - "::", - stringify!(OutputBufferLength), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_21 { - pub Vpb: PVPB, - pub DeviceObject: PDEVICE_OBJECT, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_21() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_21, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_21>(), - 16usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_21)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_21>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_21), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vpb) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_21), - "::", - stringify!(Vpb), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceObject) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_21), - "::", - stringify!(DeviceObject), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_21 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_22 { - pub Srb: *mut _SCSI_REQUEST_BLOCK, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_22() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_22, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_22>(), - 8usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_22)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_22>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_22), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Srb) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_22), - "::", - stringify!(Srb), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_22 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_23 { - pub Length: ULONG, - pub StartSid: PSID, - pub SidList: PFILE_GET_QUOTA_INFORMATION, - pub SidListLength: ULONG, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_23() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_23, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_23>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_23)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_23>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_23), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_23), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartSid) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_23), - "::", - stringify!(StartSid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_23), - "::", - stringify!(SidList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidListLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_23), - "::", - stringify!(SidListLength), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_23 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_24 { - pub Length: ULONG, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_24() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_24, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_24>(), - 4usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_24)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_24>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_24), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_24), - "::", - stringify!(Length), - ), - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_25 { - pub Type: DEVICE_RELATION_TYPE, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_25() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_25, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_25>(), - 4usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_25)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_25>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_25), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_25), - "::", - stringify!(Type), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_25 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26 { - pub InterfaceType: *const GUID, - pub Size: USHORT, - pub Version: USHORT, - pub Interface: PINTERFACE, - pub InterfaceSpecificData: PVOID, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterfaceType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26), - "::", - stringify!(InterfaceType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Interface) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26), - "::", - stringify!(Interface), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceSpecificData) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26), - "::", - stringify!(InterfaceSpecificData), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_26 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_27 { - pub Capabilities: PDEVICE_CAPABILITIES, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_27() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_27, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_27>(), - 8usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_27)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_27>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_27), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capabilities) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_27), - "::", - stringify!(Capabilities), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_27 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_28 { - pub IoResourceRequirementList: PIO_RESOURCE_REQUIREMENTS_LIST, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_28() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_28, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_28>(), - 8usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_28)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_28>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_28), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IoResourceRequirementList) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_28), - "::", - stringify!(IoResourceRequirementList), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_28 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_29 { - pub WhichSpace: ULONG, - pub Buffer: PVOID, - pub Offset: ULONG, - pub __bindgen_padding_0: u32, - pub Length: ULONG, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_29() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_29, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_29>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_29)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_29>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_29), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WhichSpace) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_29), - "::", - stringify!(WhichSpace), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_29), - "::", - stringify!(Buffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_29), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_29), - "::", - stringify!(Length), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_29 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_30 { - pub Lock: BOOLEAN, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_30() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_30, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_30>(), - 1usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_30)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_30>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_30), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lock) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_30), - "::", - stringify!(Lock), - ), - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_31 { - pub IdType: BUS_QUERY_ID_TYPE::Type, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_31() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_31, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_31>(), - 4usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_31)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_31>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_31), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_31), - "::", - stringify!(IdType), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_31 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[repr(align(8))] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_32 { - pub DeviceTextType: DEVICE_TEXT_TYPE::Type, - pub __bindgen_padding_0: u32, - pub LocaleId: LCID, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_32() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_32, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_32>(), - 16usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_32)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_32>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_32), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceTextType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_32), - "::", - stringify!(DeviceTextType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LocaleId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_32), - "::", - stringify!(LocaleId), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_32 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[repr(align(8))] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_33 { - pub InPath: BOOLEAN, - pub Reserved: [BOOLEAN; 3usize], - pub __bindgen_padding_0: u32, - pub Type: DEVICE_USAGE_NOTIFICATION_TYPE, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_33() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_33, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_33>(), - 16usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_33)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_33>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_33), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InPath) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_33), - "::", - stringify!(InPath), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_33), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_33), - "::", - stringify!(Type), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_33 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_34 { - pub PowerState: SYSTEM_POWER_STATE, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_34() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_34, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_34>(), - 4usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_34)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_34>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_34), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PowerState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_34), - "::", - stringify!(PowerState), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_34 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_35 { - pub PowerSequence: PPOWER_SEQUENCE, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_35() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_35, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_35>(), - 8usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_35)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_35>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_35), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PowerSequence) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_35), - "::", - stringify!(PowerSequence), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_35 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[repr(align(8))] -#[derive(Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36 { - pub __bindgen_anon_1: _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36__bindgen_ty_1, - pub __bindgen_padding_0: u32, - pub Type: POWER_STATE_TYPE, - pub __bindgen_padding_1: u32, - pub State: POWER_STATE, - pub __bindgen_padding_2: u32, - pub ShutdownType: POWER_ACTION::Type, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36__bindgen_ty_1 { - pub SystemContext: ULONG, - pub SystemPowerStateContext: SYSTEM_POWER_STATE_CONTEXT, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SystemContext) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36__bindgen_ty_1), - "::", - stringify!(SystemContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SystemPowerStateContext) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36__bindgen_ty_1), - "::", - stringify!(SystemPowerStateContext), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).State) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36), - "::", - stringify!(State), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShutdownType) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36), - "::", - stringify!(ShutdownType), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_36 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_37 { - pub AllocatedResources: PCM_RESOURCE_LIST, - pub AllocatedResourcesTranslated: PCM_RESOURCE_LIST, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_37() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_37, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_37>(), - 16usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_37)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_37>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_37), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocatedResources) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_37), - "::", - stringify!(AllocatedResources), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocatedResourcesTranslated) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_37), - "::", - stringify!(AllocatedResourcesTranslated), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_37 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_38 { - pub ProviderId: ULONG_PTR, - pub DataPath: PVOID, - pub BufferSize: ULONG, - pub Buffer: PVOID, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_38() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_38, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_38>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_38)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_38>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_38), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProviderId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_38), - "::", - stringify!(ProviderId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataPath) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_38), - "::", - stringify!(DataPath), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BufferSize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_38), - "::", - stringify!(BufferSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_38), - "::", - stringify!(Buffer), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_38 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_39 { - pub Argument1: PVOID, - pub Argument2: PVOID, - pub Argument3: PVOID, - pub Argument4: PVOID, -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_39() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_39, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_39>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_39)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_39>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_39), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Argument1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_39), - "::", - stringify!(Argument1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Argument2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_39), - "::", - stringify!(Argument2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Argument3) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_39), - "::", - stringify!(Argument3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Argument4) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_39), - "::", - stringify!(Argument4), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_39 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_IO_STACK_LOCATION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1>(), - 32usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Create) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(Create), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreatePipe) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(CreatePipe), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateMailslot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(CreateMailslot), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Read) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(Read), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Write) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(Write), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryDirectory) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(QueryDirectory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NotifyDirectory) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(NotifyDirectory), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NotifyDirectoryEx) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(NotifyDirectoryEx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryFile) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(QueryFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetFile) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(SetFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryEa) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(QueryEa), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetEa) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(SetEa), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryVolume) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(QueryVolume), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetVolume) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(SetVolume), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileSystemControl) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(FileSystemControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LockControl) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(LockControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceIoControl) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(DeviceIoControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QuerySecurity) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(QuerySecurity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetSecurity) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(SetSecurity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MountVolume) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(MountVolume), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VerifyVolume) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(VerifyVolume), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Scsi) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(Scsi), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryQuota) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(QueryQuota), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetQuota) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(SetQuota), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryDeviceRelations) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(QueryDeviceRelations), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryInterface) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(QueryInterface), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceCapabilities) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(DeviceCapabilities), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FilterResourceRequirements) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(FilterResourceRequirements), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadWriteConfig) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(ReadWriteConfig), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetLock) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(SetLock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(QueryId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryDeviceText) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(QueryDeviceText), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UsageNotification) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(UsageNotification), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WaitWake) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(WaitWake), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PowerSequence) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(PowerSequence), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Power) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(Power), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartDevice) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(StartDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WMI) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(WMI), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Others) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION__bindgen_ty_1), - "::", - stringify!(Others), - ), - ); -} -impl Default for _IO_STACK_LOCATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IO_STACK_LOCATION() { - const UNINIT: ::core::mem::MaybeUninit<_IO_STACK_LOCATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STACK_LOCATION>(), - 72usize, - concat!("Size of: ", stringify!(_IO_STACK_LOCATION)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STACK_LOCATION>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_STACK_LOCATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorFunction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION), - "::", - stringify!(MajorFunction), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorFunction) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION), - "::", - stringify!(MinorFunction), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION), - "::", - stringify!(Control), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION), - "::", - stringify!(Parameters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceObject) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION), - "::", - stringify!(DeviceObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileObject) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION), - "::", - stringify!(FileObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompletionRoutine) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION), - "::", - stringify!(CompletionRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_STACK_LOCATION), - "::", - stringify!(Context), - ), - ); -} -impl Default for _IO_STACK_LOCATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_STACK_LOCATION = _IO_STACK_LOCATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SHARE_ACCESS { - pub OpenCount: ULONG, - pub Readers: ULONG, - pub Writers: ULONG, - pub Deleters: ULONG, - pub SharedRead: ULONG, - pub SharedWrite: ULONG, - pub SharedDelete: ULONG, -} -#[test] -fn bindgen_test_layout__SHARE_ACCESS() { - const UNINIT: ::core::mem::MaybeUninit<_SHARE_ACCESS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SHARE_ACCESS>(), - 28usize, - concat!("Size of: ", stringify!(_SHARE_ACCESS)), - ); - assert_eq!( - ::core::mem::align_of::<_SHARE_ACCESS>(), - 4usize, - concat!("Alignment of ", stringify!(_SHARE_ACCESS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OpenCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SHARE_ACCESS), - "::", - stringify!(OpenCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Readers) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SHARE_ACCESS), - "::", - stringify!(Readers), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Writers) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SHARE_ACCESS), - "::", - stringify!(Writers), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Deleters) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SHARE_ACCESS), - "::", - stringify!(Deleters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SharedRead) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SHARE_ACCESS), - "::", - stringify!(SharedRead), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SharedWrite) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_SHARE_ACCESS), - "::", - stringify!(SharedWrite), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SharedDelete) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SHARE_ACCESS), - "::", - stringify!(SharedDelete), - ), - ); -} -pub type SHARE_ACCESS = _SHARE_ACCESS; -pub type PSHARE_ACCESS = *mut _SHARE_ACCESS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _LINK_SHARE_ACCESS { - pub OpenCount: ULONG, - pub Deleters: ULONG, - pub SharedDelete: ULONG, -} -#[test] -fn bindgen_test_layout__LINK_SHARE_ACCESS() { - const UNINIT: ::core::mem::MaybeUninit<_LINK_SHARE_ACCESS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LINK_SHARE_ACCESS>(), - 12usize, - concat!("Size of: ", stringify!(_LINK_SHARE_ACCESS)), - ); - assert_eq!( - ::core::mem::align_of::<_LINK_SHARE_ACCESS>(), - 4usize, - concat!("Alignment of ", stringify!(_LINK_SHARE_ACCESS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OpenCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LINK_SHARE_ACCESS), - "::", - stringify!(OpenCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Deleters) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_LINK_SHARE_ACCESS), - "::", - stringify!(Deleters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SharedDelete) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_LINK_SHARE_ACCESS), - "::", - stringify!(SharedDelete), - ), - ); -} -pub type LINK_SHARE_ACCESS = _LINK_SHARE_ACCESS; -pub type PLINK_SHARE_ACCESS = *mut _LINK_SHARE_ACCESS; -pub mod _IO_PAGING_PRIORITY { - pub type Type = ::core::ffi::c_int; - pub const IoPagingPriorityInvalid: Type = 0; - pub const IoPagingPriorityNormal: Type = 1; - pub const IoPagingPriorityHigh: Type = 2; - pub const IoPagingPriorityReserved1: Type = 3; - pub const IoPagingPriorityReserved2: Type = 4; -} -pub use self::_IO_PAGING_PRIORITY::Type as IO_PAGING_PRIORITY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _BOOTDISK_INFORMATION { - pub BootPartitionOffset: LONGLONG, - pub SystemPartitionOffset: LONGLONG, - pub BootDeviceSignature: ULONG, - pub SystemDeviceSignature: ULONG, -} -#[test] -fn bindgen_test_layout__BOOTDISK_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_BOOTDISK_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_BOOTDISK_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_BOOTDISK_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_BOOTDISK_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_BOOTDISK_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BootPartitionOffset) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION), - "::", - stringify!(BootPartitionOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SystemPartitionOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION), - "::", - stringify!(SystemPartitionOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BootDeviceSignature) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION), - "::", - stringify!(BootDeviceSignature), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SystemDeviceSignature) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION), - "::", - stringify!(SystemDeviceSignature), - ), - ); -} -pub type BOOTDISK_INFORMATION = _BOOTDISK_INFORMATION; -pub type PBOOTDISK_INFORMATION = *mut _BOOTDISK_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _BOOTDISK_INFORMATION_EX { - pub BootPartitionOffset: LONGLONG, - pub SystemPartitionOffset: LONGLONG, - pub BootDeviceSignature: ULONG, - pub SystemDeviceSignature: ULONG, - pub BootDeviceGuid: GUID, - pub SystemDeviceGuid: GUID, - pub BootDeviceIsGpt: BOOLEAN, - pub SystemDeviceIsGpt: BOOLEAN, -} -#[test] -fn bindgen_test_layout__BOOTDISK_INFORMATION_EX() { - const UNINIT: ::core::mem::MaybeUninit<_BOOTDISK_INFORMATION_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_BOOTDISK_INFORMATION_EX>(), - 64usize, - concat!("Size of: ", stringify!(_BOOTDISK_INFORMATION_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_BOOTDISK_INFORMATION_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_BOOTDISK_INFORMATION_EX)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BootPartitionOffset) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION_EX), - "::", - stringify!(BootPartitionOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SystemPartitionOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION_EX), - "::", - stringify!(SystemPartitionOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BootDeviceSignature) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION_EX), - "::", - stringify!(BootDeviceSignature), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SystemDeviceSignature) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION_EX), - "::", - stringify!(SystemDeviceSignature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BootDeviceGuid) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION_EX), - "::", - stringify!(BootDeviceGuid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SystemDeviceGuid) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION_EX), - "::", - stringify!(SystemDeviceGuid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BootDeviceIsGpt) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION_EX), - "::", - stringify!(BootDeviceIsGpt), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SystemDeviceIsGpt) as usize - ptr as usize - }, - 57usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION_EX), - "::", - stringify!(SystemDeviceIsGpt), - ), - ); -} -pub type BOOTDISK_INFORMATION_EX = _BOOTDISK_INFORMATION_EX; -pub type PBOOTDISK_INFORMATION_EX = *mut _BOOTDISK_INFORMATION_EX; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _LOADER_PARTITION_INFORMATION_EX { - pub PartitionStyle: ULONG, - pub PartitionNumber: ULONG, - pub __bindgen_anon_1: _LOADER_PARTITION_INFORMATION_EX__bindgen_ty_1, - pub Flags: ULONG, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _LOADER_PARTITION_INFORMATION_EX__bindgen_ty_1 { - pub Signature: ULONG, - pub DeviceId: GUID, -} -#[test] -fn bindgen_test_layout__LOADER_PARTITION_INFORMATION_EX__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _LOADER_PARTITION_INFORMATION_EX__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LOADER_PARTITION_INFORMATION_EX__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_LOADER_PARTITION_INFORMATION_EX__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_LOADER_PARTITION_INFORMATION_EX__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_LOADER_PARTITION_INFORMATION_EX__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LOADER_PARTITION_INFORMATION_EX__bindgen_ty_1), - "::", - stringify!(Signature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LOADER_PARTITION_INFORMATION_EX__bindgen_ty_1), - "::", - stringify!(DeviceId), - ), - ); -} -impl Default for _LOADER_PARTITION_INFORMATION_EX__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__LOADER_PARTITION_INFORMATION_EX() { - const UNINIT: ::core::mem::MaybeUninit<_LOADER_PARTITION_INFORMATION_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LOADER_PARTITION_INFORMATION_EX>(), - 28usize, - concat!("Size of: ", stringify!(_LOADER_PARTITION_INFORMATION_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_LOADER_PARTITION_INFORMATION_EX>(), - 4usize, - concat!("Alignment of ", stringify!(_LOADER_PARTITION_INFORMATION_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PartitionStyle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LOADER_PARTITION_INFORMATION_EX), - "::", - stringify!(PartitionStyle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PartitionNumber) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_LOADER_PARTITION_INFORMATION_EX), - "::", - stringify!(PartitionNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_LOADER_PARTITION_INFORMATION_EX), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _LOADER_PARTITION_INFORMATION_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type LOADER_PARTITION_INFORMATION_EX = _LOADER_PARTITION_INFORMATION_EX; -pub type PLOADER_PARTITION_INFORMATION_EX = *mut _LOADER_PARTITION_INFORMATION_EX; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _BOOTDISK_INFORMATION_LITE { - pub NumberEntries: ULONG, - pub Entries: [LOADER_PARTITION_INFORMATION_EX; 1usize], -} -#[test] -fn bindgen_test_layout__BOOTDISK_INFORMATION_LITE() { - const UNINIT: ::core::mem::MaybeUninit<_BOOTDISK_INFORMATION_LITE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_BOOTDISK_INFORMATION_LITE>(), - 32usize, - concat!("Size of: ", stringify!(_BOOTDISK_INFORMATION_LITE)), - ); - assert_eq!( - ::core::mem::align_of::<_BOOTDISK_INFORMATION_LITE>(), - 4usize, - concat!("Alignment of ", stringify!(_BOOTDISK_INFORMATION_LITE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberEntries) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION_LITE), - "::", - stringify!(NumberEntries), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Entries) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_BOOTDISK_INFORMATION_LITE), - "::", - stringify!(Entries), - ), - ); -} -impl Default for _BOOTDISK_INFORMATION_LITE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type BOOTDISK_INFORMATION_LITE = _BOOTDISK_INFORMATION_LITE; -pub type PBOOTDISK_INFORMATION_LITE = *mut _BOOTDISK_INFORMATION_LITE; -pub mod _IO_COMPLETION_ROUTINE_RESULT { - pub type Type = ::core::ffi::c_int; - pub const ContinueCompletion: Type = 0; - pub const StopCompletion: Type = -1073741802; -} -pub use self::_IO_COMPLETION_ROUTINE_RESULT::Type as IO_COMPLETION_ROUTINE_RESULT; -pub type PIO_COMPLETION_ROUTINE_RESULT = *mut _IO_COMPLETION_ROUTINE_RESULT::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_INTERRUPT_MESSAGE_INFO_ENTRY { - pub MessageAddress: PHYSICAL_ADDRESS, - pub TargetProcessorSet: KAFFINITY, - pub InterruptObject: PKINTERRUPT, - pub MessageData: ULONG, - pub Vector: ULONG, - pub Irql: KIRQL, - pub Mode: KINTERRUPT_MODE, - pub Polarity: KINTERRUPT_POLARITY, -} -#[test] -fn bindgen_test_layout__IO_INTERRUPT_MESSAGE_INFO_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_IO_INTERRUPT_MESSAGE_INFO_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_INTERRUPT_MESSAGE_INFO_ENTRY>(), - 48usize, - concat!("Size of: ", stringify!(_IO_INTERRUPT_MESSAGE_INFO_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_INTERRUPT_MESSAGE_INFO_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_INTERRUPT_MESSAGE_INFO_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageAddress) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_INTERRUPT_MESSAGE_INFO_ENTRY), - "::", - stringify!(MessageAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetProcessorSet) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_INTERRUPT_MESSAGE_INFO_ENTRY), - "::", - stringify!(TargetProcessorSet), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptObject) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_INTERRUPT_MESSAGE_INFO_ENTRY), - "::", - stringify!(InterruptObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_INTERRUPT_MESSAGE_INFO_ENTRY), - "::", - stringify!(MessageData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_IO_INTERRUPT_MESSAGE_INFO_ENTRY), - "::", - stringify!(Vector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Irql) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_INTERRUPT_MESSAGE_INFO_ENTRY), - "::", - stringify!(Irql), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mode) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_IO_INTERRUPT_MESSAGE_INFO_ENTRY), - "::", - stringify!(Mode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Polarity) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_INTERRUPT_MESSAGE_INFO_ENTRY), - "::", - stringify!(Polarity), - ), - ); -} -impl Default for _IO_INTERRUPT_MESSAGE_INFO_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_INTERRUPT_MESSAGE_INFO_ENTRY = _IO_INTERRUPT_MESSAGE_INFO_ENTRY; -pub type PIO_INTERRUPT_MESSAGE_INFO_ENTRY = *mut _IO_INTERRUPT_MESSAGE_INFO_ENTRY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_INTERRUPT_MESSAGE_INFO { - pub UnifiedIrql: KIRQL, - pub MessageCount: ULONG, - pub MessageInfo: [IO_INTERRUPT_MESSAGE_INFO_ENTRY; 1usize], -} -#[test] -fn bindgen_test_layout__IO_INTERRUPT_MESSAGE_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_IO_INTERRUPT_MESSAGE_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_INTERRUPT_MESSAGE_INFO>(), - 56usize, - concat!("Size of: ", stringify!(_IO_INTERRUPT_MESSAGE_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_INTERRUPT_MESSAGE_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_INTERRUPT_MESSAGE_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UnifiedIrql) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_INTERRUPT_MESSAGE_INFO), - "::", - stringify!(UnifiedIrql), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_INTERRUPT_MESSAGE_INFO), - "::", - stringify!(MessageCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_INTERRUPT_MESSAGE_INFO), - "::", - stringify!(MessageInfo), - ), - ); -} -impl Default for _IO_INTERRUPT_MESSAGE_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_INTERRUPT_MESSAGE_INFO = _IO_INTERRUPT_MESSAGE_INFO; -pub type PIO_INTERRUPT_MESSAGE_INFO = *mut _IO_INTERRUPT_MESSAGE_INFO; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS { - pub PhysicalDeviceObject: PDEVICE_OBJECT, - pub InterruptObject: *mut PKINTERRUPT, - pub ServiceRoutine: PKSERVICE_ROUTINE, - pub ServiceContext: PVOID, - pub SpinLock: PKSPIN_LOCK, - pub SynchronizeIrql: KIRQL, - pub FloatingSave: BOOLEAN, - pub ShareVector: BOOLEAN, - pub Vector: ULONG, - pub Irql: KIRQL, - pub InterruptMode: KINTERRUPT_MODE, - pub ProcessorEnableMask: KAFFINITY, - pub Group: USHORT, -} -#[test] -fn bindgen_test_layout__IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS>(), - 72usize, - concat!( - "Size of: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PhysicalDeviceObject) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - "::", - stringify!(PhysicalDeviceObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptObject) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - "::", - stringify!(InterruptObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ServiceRoutine) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - "::", - stringify!(ServiceRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ServiceContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - "::", - stringify!(ServiceContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SpinLock) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - "::", - stringify!(SpinLock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SynchronizeIrql) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - "::", - stringify!(SynchronizeIrql), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FloatingSave) as usize - ptr as usize }, - 41usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - "::", - stringify!(FloatingSave), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShareVector) as usize - ptr as usize }, - 42usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - "::", - stringify!(ShareVector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - "::", - stringify!(Vector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Irql) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - "::", - stringify!(Irql), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptMode) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - "::", - stringify!(InterruptMode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProcessorEnableMask) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - "::", - stringify!(ProcessorEnableMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Group) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS), - "::", - stringify!(Group), - ), - ); -} -impl Default for _IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS = _IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS; -pub type PIO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS = *mut _IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS { - pub PhysicalDeviceObject: PDEVICE_OBJECT, - pub InterruptObject: *mut PKINTERRUPT, - pub ServiceRoutine: PKSERVICE_ROUTINE, - pub ServiceContext: PVOID, - pub SpinLock: PKSPIN_LOCK, - pub SynchronizeIrql: KIRQL, - pub FloatingSave: BOOLEAN, -} -#[test] -fn bindgen_test_layout__IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS>(), - 48usize, - concat!("Size of: ", stringify!(_IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PhysicalDeviceObject) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS), - "::", - stringify!(PhysicalDeviceObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptObject) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS), - "::", - stringify!(InterruptObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ServiceRoutine) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS), - "::", - stringify!(ServiceRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ServiceContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS), - "::", - stringify!(ServiceContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SpinLock) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS), - "::", - stringify!(SpinLock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SynchronizeIrql) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS), - "::", - stringify!(SynchronizeIrql), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FloatingSave) as usize - ptr as usize }, - 41usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS), - "::", - stringify!(FloatingSave), - ), - ); -} -impl Default for _IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS = _IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS; -pub type PIO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS = *mut _IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS { - pub PhysicalDeviceObject: PDEVICE_OBJECT, - pub ConnectionContext: _IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS__bindgen_ty_1, - pub MessageServiceRoutine: PKMESSAGE_SERVICE_ROUTINE, - pub ServiceContext: PVOID, - pub SpinLock: PKSPIN_LOCK, - pub SynchronizeIrql: KIRQL, - pub FloatingSave: BOOLEAN, - pub FallBackServiceRoutine: PKSERVICE_ROUTINE, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS__bindgen_ty_1 { - pub Generic: *mut PVOID, - pub InterruptMessageTable: *mut PIO_INTERRUPT_MESSAGE_INFO, - pub InterruptObject: *mut PKINTERRUPT, -} -#[test] -fn bindgen_test_layout__IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Generic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS__bindgen_ty_1), - "::", - stringify!(Generic), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterruptMessageTable) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS__bindgen_ty_1), - "::", - stringify!(InterruptMessageTable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptObject) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS__bindgen_ty_1), - "::", - stringify!(InterruptObject), - ), - ); -} -impl Default for _IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS>(), - 56usize, - concat!("Size of: ", stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PhysicalDeviceObject) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS), - "::", - stringify!(PhysicalDeviceObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ConnectionContext) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS), - "::", - stringify!(ConnectionContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MessageServiceRoutine) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS), - "::", - stringify!(MessageServiceRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ServiceContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS), - "::", - stringify!(ServiceContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SpinLock) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS), - "::", - stringify!(SpinLock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SynchronizeIrql) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS), - "::", - stringify!(SynchronizeIrql), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FloatingSave) as usize - ptr as usize }, - 41usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS), - "::", - stringify!(FloatingSave), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FallBackServiceRoutine) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS), - "::", - stringify!(FallBackServiceRoutine), - ), - ); -} -impl Default for _IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS = _IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS; -pub type PIO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS = *mut _IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_CONNECT_INTERRUPT_PARAMETERS { - pub Version: ULONG, - pub __bindgen_anon_1: _IO_CONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IO_CONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1 { - pub FullySpecified: IO_CONNECT_INTERRUPT_FULLY_SPECIFIED_PARAMETERS, - pub LineBased: IO_CONNECT_INTERRUPT_LINE_BASED_PARAMETERS, - pub MessageBased: IO_CONNECT_INTERRUPT_MESSAGE_BASED_PARAMETERS, -} -#[test] -fn bindgen_test_layout__IO_CONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_CONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_CONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1>(), - 72usize, - concat!("Size of: ", stringify!(_IO_CONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_CONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_CONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FullySpecified) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1), - "::", - stringify!(FullySpecified), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LineBased) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1), - "::", - stringify!(LineBased), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageBased) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1), - "::", - stringify!(MessageBased), - ), - ); -} -impl Default for _IO_CONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IO_CONNECT_INTERRUPT_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_IO_CONNECT_INTERRUPT_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_CONNECT_INTERRUPT_PARAMETERS>(), - 80usize, - concat!("Size of: ", stringify!(_IO_CONNECT_INTERRUPT_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_CONNECT_INTERRUPT_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_CONNECT_INTERRUPT_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_CONNECT_INTERRUPT_PARAMETERS), - "::", - stringify!(Version), - ), - ); -} -impl Default for _IO_CONNECT_INTERRUPT_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_CONNECT_INTERRUPT_PARAMETERS = _IO_CONNECT_INTERRUPT_PARAMETERS; -pub type PIO_CONNECT_INTERRUPT_PARAMETERS = *mut _IO_CONNECT_INTERRUPT_PARAMETERS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_DISCONNECT_INTERRUPT_PARAMETERS { - pub Version: ULONG, - pub ConnectionContext: _IO_DISCONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IO_DISCONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1 { - pub Generic: PVOID, - pub InterruptObject: PKINTERRUPT, - pub InterruptMessageTable: PIO_INTERRUPT_MESSAGE_INFO, -} -#[test] -fn bindgen_test_layout__IO_DISCONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_DISCONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_DISCONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(_IO_DISCONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_DISCONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_DISCONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Generic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_DISCONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1), - "::", - stringify!(Generic), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptObject) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_DISCONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1), - "::", - stringify!(InterruptObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterruptMessageTable) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_DISCONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1), - "::", - stringify!(InterruptMessageTable), - ), - ); -} -impl Default for _IO_DISCONNECT_INTERRUPT_PARAMETERS__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IO_DISCONNECT_INTERRUPT_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_IO_DISCONNECT_INTERRUPT_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_DISCONNECT_INTERRUPT_PARAMETERS>(), - 16usize, - concat!("Size of: ", stringify!(_IO_DISCONNECT_INTERRUPT_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_DISCONNECT_INTERRUPT_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_DISCONNECT_INTERRUPT_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_DISCONNECT_INTERRUPT_PARAMETERS), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ConnectionContext) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_DISCONNECT_INTERRUPT_PARAMETERS), - "::", - stringify!(ConnectionContext), - ), - ); -} -impl Default for _IO_DISCONNECT_INTERRUPT_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_DISCONNECT_INTERRUPT_PARAMETERS = _IO_DISCONNECT_INTERRUPT_PARAMETERS; -pub type PIO_DISCONNECT_INTERRUPT_PARAMETERS = *mut _IO_DISCONNECT_INTERRUPT_PARAMETERS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS { - pub Version: ULONG, - pub ConnectionContext: _IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS__bindgen_ty_1 { - pub Generic: PVOID, - pub InterruptObject: PKINTERRUPT, - pub InterruptMessageTable: PIO_INTERRUPT_MESSAGE_INFO, -} -#[test] -fn bindgen_test_layout__IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Generic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS__bindgen_ty_1), - "::", - stringify!(Generic), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptObject) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS__bindgen_ty_1), - "::", - stringify!(InterruptObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterruptMessageTable) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS__bindgen_ty_1), - "::", - stringify!(InterruptMessageTable), - ), - ); -} -impl Default for _IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS>(), - 16usize, - concat!("Size of: ", stringify!(_IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ConnectionContext) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS), - "::", - stringify!(ConnectionContext), - ), - ); -} -impl Default for _IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS = _IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS; -pub type PIO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS = *mut _IO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS; -pub type DMA_IOMMU_INTERFACE = _DMA_IOMMU_INTERFACE; -pub type PDMA_IOMMU_INTERFACE = *mut _DMA_IOMMU_INTERFACE; -pub type DMA_IOMMU_INTERFACE_EX = _DMA_IOMMU_INTERFACE_EX; -pub type PDMA_IOMMU_INTERFACE_EX = *mut _DMA_IOMMU_INTERFACE_EX; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_REMOVE_LOCK_TRACKING_BLOCK { - _unused: [u8; 0], -} -pub type PIO_REMOVE_LOCK_TRACKING_BLOCK = *mut _IO_REMOVE_LOCK_TRACKING_BLOCK; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_REMOVE_LOCK_COMMON_BLOCK { - pub Removed: BOOLEAN, - pub Reserved: [BOOLEAN; 3usize], - pub IoCount: LONG, - pub RemoveEvent: KEVENT, -} -#[test] -fn bindgen_test_layout__IO_REMOVE_LOCK_COMMON_BLOCK() { - const UNINIT: ::core::mem::MaybeUninit<_IO_REMOVE_LOCK_COMMON_BLOCK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_REMOVE_LOCK_COMMON_BLOCK>(), - 32usize, - concat!("Size of: ", stringify!(_IO_REMOVE_LOCK_COMMON_BLOCK)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_REMOVE_LOCK_COMMON_BLOCK>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_REMOVE_LOCK_COMMON_BLOCK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Removed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_COMMON_BLOCK), - "::", - stringify!(Removed), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_COMMON_BLOCK), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_COMMON_BLOCK), - "::", - stringify!(IoCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RemoveEvent) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_COMMON_BLOCK), - "::", - stringify!(RemoveEvent), - ), - ); -} -impl Default for _IO_REMOVE_LOCK_COMMON_BLOCK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_REMOVE_LOCK_COMMON_BLOCK = _IO_REMOVE_LOCK_COMMON_BLOCK; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_REMOVE_LOCK_DBG_BLOCK { - pub Signature: LONG, - pub HighWatermark: ULONG, - pub MaxLockedTicks: LONGLONG, - pub AllocateTag: LONG, - pub LockList: LIST_ENTRY, - pub Spin: KSPIN_LOCK, - pub LowMemoryCount: LONG, - pub Reserved1: [ULONG; 4usize], - pub Reserved2: PVOID, - pub Blocks: PIO_REMOVE_LOCK_TRACKING_BLOCK, -} -#[test] -fn bindgen_test_layout__IO_REMOVE_LOCK_DBG_BLOCK() { - const UNINIT: ::core::mem::MaybeUninit<_IO_REMOVE_LOCK_DBG_BLOCK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_REMOVE_LOCK_DBG_BLOCK>(), - 88usize, - concat!("Size of: ", stringify!(_IO_REMOVE_LOCK_DBG_BLOCK)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_REMOVE_LOCK_DBG_BLOCK>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_REMOVE_LOCK_DBG_BLOCK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_DBG_BLOCK), - "::", - stringify!(Signature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HighWatermark) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_DBG_BLOCK), - "::", - stringify!(HighWatermark), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxLockedTicks) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_DBG_BLOCK), - "::", - stringify!(MaxLockedTicks), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocateTag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_DBG_BLOCK), - "::", - stringify!(AllocateTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LockList) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_DBG_BLOCK), - "::", - stringify!(LockList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spin) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_DBG_BLOCK), - "::", - stringify!(Spin), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowMemoryCount) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_DBG_BLOCK), - "::", - stringify!(LowMemoryCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_DBG_BLOCK), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_DBG_BLOCK), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Blocks) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK_DBG_BLOCK), - "::", - stringify!(Blocks), - ), - ); -} -impl Default for _IO_REMOVE_LOCK_DBG_BLOCK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_REMOVE_LOCK_DBG_BLOCK = _IO_REMOVE_LOCK_DBG_BLOCK; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_REMOVE_LOCK { - pub Common: IO_REMOVE_LOCK_COMMON_BLOCK, -} -#[test] -fn bindgen_test_layout__IO_REMOVE_LOCK() { - const UNINIT: ::core::mem::MaybeUninit<_IO_REMOVE_LOCK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_REMOVE_LOCK>(), - 32usize, - concat!("Size of: ", stringify!(_IO_REMOVE_LOCK)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_REMOVE_LOCK>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_REMOVE_LOCK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Common) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_REMOVE_LOCK), - "::", - stringify!(Common), - ), - ); -} -impl Default for _IO_REMOVE_LOCK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_REMOVE_LOCK = _IO_REMOVE_LOCK; -pub type PIO_REMOVE_LOCK = *mut _IO_REMOVE_LOCK; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_WORKITEM { - _unused: [u8; 0], -} -pub type PIO_WORKITEM = *mut _IO_WORKITEM; -pub type IO_WORKITEM_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(DeviceObject: PDEVICE_OBJECT, Context: PVOID), ->; -pub type PIO_WORKITEM_ROUTINE = IO_WORKITEM_ROUTINE; -pub type IO_WORKITEM_ROUTINE_EX = ::core::option::Option< - unsafe extern "C" fn(IoObject: PVOID, Context: PVOID, IoWorkItem: PIO_WORKITEM), ->; -pub type PIO_WORKITEM_ROUTINE_EX = IO_WORKITEM_ROUTINE_EX; -pub type FWMI_NOTIFICATION_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Wnode: PVOID, Context: PVOID), ->; -pub type WMI_NOTIFICATION_CALLBACK = FWMI_NOTIFICATION_CALLBACK; -pub type IO_CSQ = _IO_CSQ; -pub type PIO_CSQ = *mut _IO_CSQ; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_CSQ_IRP_CONTEXT { - pub Type: ULONG, - pub Irp: PIRP, - pub Csq: PIO_CSQ, -} -#[test] -fn bindgen_test_layout__IO_CSQ_IRP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_IO_CSQ_IRP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_CSQ_IRP_CONTEXT>(), - 24usize, - concat!("Size of: ", stringify!(_IO_CSQ_IRP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_CSQ_IRP_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_CSQ_IRP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_CSQ_IRP_CONTEXT), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Irp) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_CSQ_IRP_CONTEXT), - "::", - stringify!(Irp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Csq) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_CSQ_IRP_CONTEXT), - "::", - stringify!(Csq), - ), - ); -} -impl Default for _IO_CSQ_IRP_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_CSQ_IRP_CONTEXT = _IO_CSQ_IRP_CONTEXT; -pub type PIO_CSQ_IRP_CONTEXT = *mut _IO_CSQ_IRP_CONTEXT; -pub type IO_CSQ_INSERT_IRP = ::core::option::Option< - unsafe extern "C" fn(Csq: *mut _IO_CSQ, Irp: PIRP), ->; -pub type PIO_CSQ_INSERT_IRP = IO_CSQ_INSERT_IRP; -pub type IO_CSQ_INSERT_IRP_EX = ::core::option::Option< - unsafe extern "C" fn(Csq: *mut _IO_CSQ, Irp: PIRP, InsertContext: PVOID) -> NTSTATUS, ->; -pub type PIO_CSQ_INSERT_IRP_EX = IO_CSQ_INSERT_IRP_EX; -pub type IO_CSQ_REMOVE_IRP = ::core::option::Option< - unsafe extern "C" fn(Csq: PIO_CSQ, Irp: PIRP), ->; -pub type PIO_CSQ_REMOVE_IRP = IO_CSQ_REMOVE_IRP; -pub type IO_CSQ_PEEK_NEXT_IRP = ::core::option::Option< - unsafe extern "C" fn(Csq: PIO_CSQ, Irp: PIRP, PeekContext: PVOID) -> PIRP, ->; -pub type PIO_CSQ_PEEK_NEXT_IRP = IO_CSQ_PEEK_NEXT_IRP; -pub type IO_CSQ_ACQUIRE_LOCK = ::core::option::Option< - unsafe extern "C" fn(Csq: PIO_CSQ, Irql: PKIRQL), ->; -pub type PIO_CSQ_ACQUIRE_LOCK = IO_CSQ_ACQUIRE_LOCK; -pub type IO_CSQ_RELEASE_LOCK = ::core::option::Option< - unsafe extern "C" fn(Csq: PIO_CSQ, Irql: KIRQL), ->; -pub type PIO_CSQ_RELEASE_LOCK = IO_CSQ_RELEASE_LOCK; -pub type IO_CSQ_COMPLETE_CANCELED_IRP = ::core::option::Option< - unsafe extern "C" fn(Csq: PIO_CSQ, Irp: PIRP), ->; -pub type PIO_CSQ_COMPLETE_CANCELED_IRP = IO_CSQ_COMPLETE_CANCELED_IRP; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_CSQ { - pub Type: ULONG, - pub CsqInsertIrp: PIO_CSQ_INSERT_IRP, - pub CsqRemoveIrp: PIO_CSQ_REMOVE_IRP, - pub CsqPeekNextIrp: PIO_CSQ_PEEK_NEXT_IRP, - pub CsqAcquireLock: PIO_CSQ_ACQUIRE_LOCK, - pub CsqReleaseLock: PIO_CSQ_RELEASE_LOCK, - pub CsqCompleteCanceledIrp: PIO_CSQ_COMPLETE_CANCELED_IRP, - pub ReservePointer: PVOID, -} -#[test] -fn bindgen_test_layout__IO_CSQ() { - const UNINIT: ::core::mem::MaybeUninit<_IO_CSQ> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_CSQ>(), - 64usize, - concat!("Size of: ", stringify!(_IO_CSQ)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_CSQ>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_CSQ)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_IO_CSQ), "::", stringify!(Type)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CsqInsertIrp) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_IO_CSQ), "::", stringify!(CsqInsertIrp)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CsqRemoveIrp) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_IO_CSQ), "::", stringify!(CsqRemoveIrp)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CsqPeekNextIrp) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_CSQ), - "::", - stringify!(CsqPeekNextIrp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CsqAcquireLock) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_CSQ), - "::", - stringify!(CsqAcquireLock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CsqReleaseLock) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_CSQ), - "::", - stringify!(CsqReleaseLock), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CsqCompleteCanceledIrp) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_CSQ), - "::", - stringify!(CsqCompleteCanceledIrp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReservePointer) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_CSQ), - "::", - stringify!(ReservePointer), - ), - ); -} -impl Default for _IO_CSQ { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_ATTRIBUTION_INFORMATION { - pub Version: ULONG, - pub Flags: _IO_ATTRIBUTION_INFORMATION__bindgen_ty_1, - pub Length: ULONG, - pub ServiceStartTime: ULONGLONG, - pub CurrentTime: ULONGLONG, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IO_ATTRIBUTION_INFORMATION__bindgen_ty_1 { - pub __bindgen_anon_1: _IO_ATTRIBUTION_INFORMATION__bindgen_ty_1__bindgen_ty_1, - pub AllFlags: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_ATTRIBUTION_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__IO_ATTRIBUTION_INFORMATION__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _IO_ATTRIBUTION_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_IO_ATTRIBUTION_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _IO_ATTRIBUTION_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_ATTRIBUTION_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _IO_ATTRIBUTION_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn MajorCode(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set_MajorCode(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn IoStart(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoStart(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn QueueOnly(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_QueueOnly(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoFailed(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoFailed(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn VirtualDevice(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } - } - #[inline] - pub fn set_VirtualDevice(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn Spare(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 20u8) as u32) } - } - #[inline] - pub fn set_Spare(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 20u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MajorCode: ULONG, - IoStart: ULONG, - QueueOnly: ULONG, - IoFailed: ULONG, - VirtualDevice: ULONG, - Spare: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let MajorCode: u32 = unsafe { ::core::mem::transmute(MajorCode) }; - MajorCode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let IoStart: u32 = unsafe { ::core::mem::transmute(IoStart) }; - IoStart as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let QueueOnly: u32 = unsafe { ::core::mem::transmute(QueueOnly) }; - QueueOnly as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let IoFailed: u32 = unsafe { ::core::mem::transmute(IoFailed) }; - IoFailed as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let VirtualDevice: u32 = unsafe { - ::core::mem::transmute(VirtualDevice) - }; - VirtualDevice as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 20u8, - { - let Spare: u32 = unsafe { ::core::mem::transmute(Spare) }; - Spare as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__IO_ATTRIBUTION_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_IO_ATTRIBUTION_INFORMATION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_ATTRIBUTION_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_IO_ATTRIBUTION_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_ATTRIBUTION_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_IO_ATTRIBUTION_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_ATTRIBUTION_INFORMATION__bindgen_ty_1), - "::", - stringify!(AllFlags), - ), - ); -} -impl Default for _IO_ATTRIBUTION_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IO_ATTRIBUTION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_IO_ATTRIBUTION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_ATTRIBUTION_INFORMATION>(), - 32usize, - concat!("Size of: ", stringify!(_IO_ATTRIBUTION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_ATTRIBUTION_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_ATTRIBUTION_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_ATTRIBUTION_INFORMATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_ATTRIBUTION_INFORMATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_ATTRIBUTION_INFORMATION), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ServiceStartTime) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_ATTRIBUTION_INFORMATION), - "::", - stringify!(ServiceStartTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_ATTRIBUTION_INFORMATION), - "::", - stringify!(CurrentTime), - ), - ); -} -impl Default for _IO_ATTRIBUTION_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_ATTRIBUTION_INFORMATION = _IO_ATTRIBUTION_INFORMATION; -pub type PIO_ATTRIBUTION_INFORMATION = *mut _IO_ATTRIBUTION_INFORMATION; -pub mod _IO_ACCESS_TYPE { - pub type Type = ::core::ffi::c_int; - pub const ReadAccess: Type = 0; - pub const WriteAccess: Type = 1; - pub const ModifyAccess: Type = 2; -} -pub use self::_IO_ACCESS_TYPE::Type as IO_ACCESS_TYPE; -pub mod _IO_ACCESS_MODE { - pub type Type = ::core::ffi::c_int; - pub const SequentialAccess: Type = 0; - pub const RandomAccess: Type = 1; -} -pub use self::_IO_ACCESS_MODE::Type as IO_ACCESS_MODE; -pub mod _IO_CONTAINER_NOTIFICATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const IoSessionStateNotification: Type = 0; - pub const IoMaxContainerNotificationClass: Type = 1; -} -pub use self::_IO_CONTAINER_NOTIFICATION_CLASS::Type as IO_CONTAINER_NOTIFICATION_CLASS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_SESSION_STATE_NOTIFICATION { - pub Size: ULONG, - pub Flags: ULONG, - pub IoObject: PVOID, - pub EventMask: ULONG, - pub Context: PVOID, -} -#[test] -fn bindgen_test_layout__IO_SESSION_STATE_NOTIFICATION() { - const UNINIT: ::core::mem::MaybeUninit<_IO_SESSION_STATE_NOTIFICATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_SESSION_STATE_NOTIFICATION>(), - 32usize, - concat!("Size of: ", stringify!(_IO_SESSION_STATE_NOTIFICATION)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_SESSION_STATE_NOTIFICATION>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_SESSION_STATE_NOTIFICATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_SESSION_STATE_NOTIFICATION), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_SESSION_STATE_NOTIFICATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoObject) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_SESSION_STATE_NOTIFICATION), - "::", - stringify!(IoObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EventMask) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_SESSION_STATE_NOTIFICATION), - "::", - stringify!(EventMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_SESSION_STATE_NOTIFICATION), - "::", - stringify!(Context), - ), - ); -} -impl Default for _IO_SESSION_STATE_NOTIFICATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_SESSION_STATE_NOTIFICATION = _IO_SESSION_STATE_NOTIFICATION; -pub type PIO_SESSION_STATE_NOTIFICATION = *mut _IO_SESSION_STATE_NOTIFICATION; -pub mod _IO_CONTAINER_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const IoSessionStateInformation: Type = 0; - pub const IoMaxContainerInformationClass: Type = 1; -} -pub use self::_IO_CONTAINER_INFORMATION_CLASS::Type as IO_CONTAINER_INFORMATION_CLASS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_SESSION_STATE_INFORMATION { - pub SessionId: ULONG, - pub SessionState: IO_SESSION_STATE, - pub LocalSession: BOOLEAN, -} -#[test] -fn bindgen_test_layout__IO_SESSION_STATE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_IO_SESSION_STATE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_SESSION_STATE_INFORMATION>(), - 12usize, - concat!("Size of: ", stringify!(_IO_SESSION_STATE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_SESSION_STATE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_IO_SESSION_STATE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SessionId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_SESSION_STATE_INFORMATION), - "::", - stringify!(SessionId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SessionState) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_SESSION_STATE_INFORMATION), - "::", - stringify!(SessionState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LocalSession) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_SESSION_STATE_INFORMATION), - "::", - stringify!(LocalSession), - ), - ); -} -impl Default for _IO_SESSION_STATE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_SESSION_STATE_INFORMATION = _IO_SESSION_STATE_INFORMATION; -pub type PIO_SESSION_STATE_INFORMATION = *mut _IO_SESSION_STATE_INFORMATION; -pub type PIO_CONTAINER_NOTIFICATION_FUNCTION = ::core::option::Option< - unsafe extern "C" fn() -> NTSTATUS, ->; -pub type IO_SESSION_NOTIFICATION_FUNCTION = ::core::option::Option< - unsafe extern "C" fn( - SessionObject: PVOID, - IoObject: PVOID, - Event: ULONG, - Context: PVOID, - NotificationPayload: PVOID, - PayloadLength: ULONG, - ) -> NTSTATUS, ->; -pub type PIO_SESSION_NOTIFICATION_FUNCTION = IO_SESSION_NOTIFICATION_FUNCTION; -pub type IO_PERSISTED_MEMORY_ENUMERATION_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - DriverObject: PDRIVER_OBJECT, - PhysicalDeviceObject: PDEVICE_OBJECT, - PhysicalDeviceId: PUNICODE_STRING, - DataTag: PUSHORT, - DataVersion: PULONG, - Context: PVOID, - ) -> NTSTATUS, ->; -pub type PIO_PERSISTED_MEMORY_ENUMERATION_CALLBACK = IO_PERSISTED_MEMORY_ENUMERATION_CALLBACK; -pub type TRACEHANDLE = ULONG64; -pub type PTRACEHANDLE = *mut ULONG64; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ETW_TRACE_SESSION_SETTINGS { - pub Version: ULONG, - pub BufferSize: ULONG, - pub MinimumBuffers: ULONG, - pub MaximumBuffers: ULONG, - pub LoggerMode: ULONG, - pub FlushTimer: ULONG, - pub FlushThreshold: ULONG, - pub ClockType: ULONG, -} -#[test] -fn bindgen_test_layout__ETW_TRACE_SESSION_SETTINGS() { - const UNINIT: ::core::mem::MaybeUninit<_ETW_TRACE_SESSION_SETTINGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ETW_TRACE_SESSION_SETTINGS>(), - 32usize, - concat!("Size of: ", stringify!(_ETW_TRACE_SESSION_SETTINGS)), - ); - assert_eq!( - ::core::mem::align_of::<_ETW_TRACE_SESSION_SETTINGS>(), - 4usize, - concat!("Alignment of ", stringify!(_ETW_TRACE_SESSION_SETTINGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ETW_TRACE_SESSION_SETTINGS), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BufferSize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ETW_TRACE_SESSION_SETTINGS), - "::", - stringify!(BufferSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinimumBuffers) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ETW_TRACE_SESSION_SETTINGS), - "::", - stringify!(MinimumBuffers), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumBuffers) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_ETW_TRACE_SESSION_SETTINGS), - "::", - stringify!(MaximumBuffers), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LoggerMode) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ETW_TRACE_SESSION_SETTINGS), - "::", - stringify!(LoggerMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FlushTimer) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_ETW_TRACE_SESSION_SETTINGS), - "::", - stringify!(FlushTimer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FlushThreshold) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ETW_TRACE_SESSION_SETTINGS), - "::", - stringify!(FlushThreshold), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClockType) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_ETW_TRACE_SESSION_SETTINGS), - "::", - stringify!(ClockType), - ), - ); -} -pub type ETW_TRACE_SESSION_SETTINGS = _ETW_TRACE_SESSION_SETTINGS; -pub type PETW_TRACE_SESSION_SETTINGS = *mut _ETW_TRACE_SESSION_SETTINGS; -pub mod _TRACE_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const TraceIdClass: Type = 0; - pub const TraceHandleClass: Type = 1; - pub const TraceEnableFlagsClass: Type = 2; - pub const TraceEnableLevelClass: Type = 3; - pub const GlobalLoggerHandleClass: Type = 4; - pub const EventLoggerHandleClass: Type = 5; - pub const AllLoggerHandlesClass: Type = 6; - pub const TraceHandleByNameClass: Type = 7; - pub const LoggerEventsLostClass: Type = 8; - pub const TraceSessionSettingsClass: Type = 9; - pub const LoggerEventsLoggedClass: Type = 10; - pub const DiskIoNotifyRoutinesClass: Type = 11; - pub const TraceInformationClassReserved1: Type = 12; - pub const FltIoNotifyRoutinesClass: Type = 13; - pub const TraceInformationClassReserved2: Type = 14; - pub const WdfNotifyRoutinesClass: Type = 15; - pub const MaxTraceInformationClass: Type = 16; -} -pub use self::_TRACE_INFORMATION_CLASS::Type as TRACE_INFORMATION_CLASS; -pub type REGHANDLE = ULONGLONG; -pub type PREGHANDLE = *mut ULONGLONG; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _EVENT_DATA_DESCRIPTOR { - pub Ptr: ULONGLONG, - pub Size: ULONG, - pub __bindgen_anon_1: _EVENT_DATA_DESCRIPTOR__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _EVENT_DATA_DESCRIPTOR__bindgen_ty_1 { - pub Reserved: ULONG, - pub __bindgen_anon_1: _EVENT_DATA_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EVENT_DATA_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1 { - pub Type: UCHAR, - pub Reserved1: UCHAR, - pub Reserved2: USHORT, -} -#[test] -fn bindgen_test_layout__EVENT_DATA_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _EVENT_DATA_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EVENT_DATA_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_EVENT_DATA_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_EVENT_DATA_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_EVENT_DATA_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_DATA_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_DATA_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_DATA_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Reserved2), - ), - ); -} -#[test] -fn bindgen_test_layout__EVENT_DATA_DESCRIPTOR__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_EVENT_DATA_DESCRIPTOR__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EVENT_DATA_DESCRIPTOR__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_EVENT_DATA_DESCRIPTOR__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_EVENT_DATA_DESCRIPTOR__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_EVENT_DATA_DESCRIPTOR__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_DATA_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _EVENT_DATA_DESCRIPTOR__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__EVENT_DATA_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_EVENT_DATA_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EVENT_DATA_DESCRIPTOR>(), - 16usize, - concat!("Size of: ", stringify!(_EVENT_DATA_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_EVENT_DATA_DESCRIPTOR>(), - 8usize, - concat!("Alignment of ", stringify!(_EVENT_DATA_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_DATA_DESCRIPTOR), - "::", - stringify!(Ptr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_DATA_DESCRIPTOR), - "::", - stringify!(Size), - ), - ); -} -impl Default for _EVENT_DATA_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type EVENT_DATA_DESCRIPTOR = _EVENT_DATA_DESCRIPTOR; -pub type PEVENT_DATA_DESCRIPTOR = *mut _EVENT_DATA_DESCRIPTOR; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EVENT_DESCRIPTOR { - pub Id: USHORT, - pub Version: UCHAR, - pub Channel: UCHAR, - pub Level: UCHAR, - pub Opcode: UCHAR, - pub Task: USHORT, - pub Keyword: ULONGLONG, -} -#[test] -fn bindgen_test_layout__EVENT_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_EVENT_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EVENT_DESCRIPTOR>(), - 16usize, - concat!("Size of: ", stringify!(_EVENT_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_EVENT_DESCRIPTOR>(), - 8usize, - concat!("Alignment of ", stringify!(_EVENT_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Id) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_EVENT_DESCRIPTOR), "::", stringify!(Id)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_DESCRIPTOR), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Channel) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_DESCRIPTOR), - "::", - stringify!(Channel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Level) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_DESCRIPTOR), - "::", - stringify!(Level), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Opcode) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_DESCRIPTOR), - "::", - stringify!(Opcode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Task) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_DESCRIPTOR), - "::", - stringify!(Task), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Keyword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_DESCRIPTOR), - "::", - stringify!(Keyword), - ), - ); -} -pub type EVENT_DESCRIPTOR = _EVENT_DESCRIPTOR; -pub type PEVENT_DESCRIPTOR = *mut _EVENT_DESCRIPTOR; -pub type PCEVENT_DESCRIPTOR = *const EVENT_DESCRIPTOR; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EVENT_FILTER_DESCRIPTOR { - pub Ptr: ULONGLONG, - pub Size: ULONG, - pub Type: ULONG, -} -#[test] -fn bindgen_test_layout__EVENT_FILTER_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_EVENT_FILTER_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EVENT_FILTER_DESCRIPTOR>(), - 16usize, - concat!("Size of: ", stringify!(_EVENT_FILTER_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_EVENT_FILTER_DESCRIPTOR>(), - 8usize, - concat!("Alignment of ", stringify!(_EVENT_FILTER_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_DESCRIPTOR), - "::", - stringify!(Ptr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_DESCRIPTOR), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); -} -pub type EVENT_FILTER_DESCRIPTOR = _EVENT_FILTER_DESCRIPTOR; -pub type PEVENT_FILTER_DESCRIPTOR = *mut _EVENT_FILTER_DESCRIPTOR; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EVENT_FILTER_HEADER { - pub Id: USHORT, - pub Version: UCHAR, - pub Reserved: [UCHAR; 5usize], - pub InstanceId: ULONGLONG, - pub Size: ULONG, - pub NextOffset: ULONG, -} -#[test] -fn bindgen_test_layout__EVENT_FILTER_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_EVENT_FILTER_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EVENT_FILTER_HEADER>(), - 24usize, - concat!("Size of: ", stringify!(_EVENT_FILTER_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_EVENT_FILTER_HEADER>(), - 8usize, - concat!("Alignment of ", stringify!(_EVENT_FILTER_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_HEADER), - "::", - stringify!(Id), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_HEADER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_HEADER), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InstanceId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_HEADER), - "::", - stringify!(InstanceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_HEADER), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextOffset) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_HEADER), - "::", - stringify!(NextOffset), - ), - ); -} -pub type EVENT_FILTER_HEADER = _EVENT_FILTER_HEADER; -pub type PEVENT_FILTER_HEADER = *mut _EVENT_FILTER_HEADER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EVENT_FILTER_EVENT_ID { - pub FilterIn: BOOLEAN, - pub Reserved: UCHAR, - pub Count: USHORT, - pub Events: [USHORT; 1usize], -} -#[test] -fn bindgen_test_layout__EVENT_FILTER_EVENT_ID() { - const UNINIT: ::core::mem::MaybeUninit<_EVENT_FILTER_EVENT_ID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EVENT_FILTER_EVENT_ID>(), - 6usize, - concat!("Size of: ", stringify!(_EVENT_FILTER_EVENT_ID)), - ); - assert_eq!( - ::core::mem::align_of::<_EVENT_FILTER_EVENT_ID>(), - 2usize, - concat!("Alignment of ", stringify!(_EVENT_FILTER_EVENT_ID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FilterIn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_EVENT_ID), - "::", - stringify!(FilterIn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_EVENT_ID), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_EVENT_ID), - "::", - stringify!(Count), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Events) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_EVENT_ID), - "::", - stringify!(Events), - ), - ); -} -pub type EVENT_FILTER_EVENT_ID = _EVENT_FILTER_EVENT_ID; -pub type PEVENT_FILTER_EVENT_ID = *mut _EVENT_FILTER_EVENT_ID; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EVENT_FILTER_EVENT_NAME { - pub MatchAnyKeyword: ULONGLONG, - pub MatchAllKeyword: ULONGLONG, - pub Level: UCHAR, - pub FilterIn: BOOLEAN, - pub NameCount: USHORT, - pub Names: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__EVENT_FILTER_EVENT_NAME() { - const UNINIT: ::core::mem::MaybeUninit<_EVENT_FILTER_EVENT_NAME> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EVENT_FILTER_EVENT_NAME>(), - 24usize, - concat!("Size of: ", stringify!(_EVENT_FILTER_EVENT_NAME)), - ); - assert_eq!( - ::core::mem::align_of::<_EVENT_FILTER_EVENT_NAME>(), - 8usize, - concat!("Alignment of ", stringify!(_EVENT_FILTER_EVENT_NAME)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MatchAnyKeyword) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_EVENT_NAME), - "::", - stringify!(MatchAnyKeyword), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MatchAllKeyword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_EVENT_NAME), - "::", - stringify!(MatchAllKeyword), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Level) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_EVENT_NAME), - "::", - stringify!(Level), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FilterIn) as usize - ptr as usize }, - 17usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_EVENT_NAME), - "::", - stringify!(FilterIn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameCount) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_EVENT_NAME), - "::", - stringify!(NameCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Names) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_EVENT_NAME), - "::", - stringify!(Names), - ), - ); -} -pub type EVENT_FILTER_EVENT_NAME = _EVENT_FILTER_EVENT_NAME; -pub type PEVENT_FILTER_EVENT_NAME = *mut _EVENT_FILTER_EVENT_NAME; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EVENT_FILTER_LEVEL_KW { - pub MatchAnyKeyword: ULONGLONG, - pub MatchAllKeyword: ULONGLONG, - pub Level: UCHAR, - pub FilterIn: BOOLEAN, -} -#[test] -fn bindgen_test_layout__EVENT_FILTER_LEVEL_KW() { - const UNINIT: ::core::mem::MaybeUninit<_EVENT_FILTER_LEVEL_KW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EVENT_FILTER_LEVEL_KW>(), - 24usize, - concat!("Size of: ", stringify!(_EVENT_FILTER_LEVEL_KW)), - ); - assert_eq!( - ::core::mem::align_of::<_EVENT_FILTER_LEVEL_KW>(), - 8usize, - concat!("Alignment of ", stringify!(_EVENT_FILTER_LEVEL_KW)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MatchAnyKeyword) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_LEVEL_KW), - "::", - stringify!(MatchAnyKeyword), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MatchAllKeyword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_LEVEL_KW), - "::", - stringify!(MatchAllKeyword), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Level) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_LEVEL_KW), - "::", - stringify!(Level), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FilterIn) as usize - ptr as usize }, - 17usize, - concat!( - "Offset of field: ", - stringify!(_EVENT_FILTER_LEVEL_KW), - "::", - stringify!(FilterIn), - ), - ); -} -pub type EVENT_FILTER_LEVEL_KW = _EVENT_FILTER_LEVEL_KW; -pub type PEVENT_FILTER_LEVEL_KW = *mut _EVENT_FILTER_LEVEL_KW; -pub mod _EVENT_INFO_CLASS { - pub type Type = ::core::ffi::c_int; - pub const EventProviderBinaryTrackInfo: Type = 0; - pub const EventProviderSetReserved1: Type = 1; - pub const EventProviderSetTraits: Type = 2; - pub const EventProviderUseDescriptorType: Type = 3; - pub const MaxEventInfo: Type = 4; -} -pub use self::_EVENT_INFO_CLASS::Type as EVENT_INFO_CLASS; -pub type PETWENABLECALLBACK = ::core::option::Option< - unsafe extern "C" fn( - arg1: LPCGUID, - arg2: ULONG, - arg3: UCHAR, - arg4: ULONGLONG, - arg5: ULONGLONG, - arg6: PEVENT_FILTER_DESCRIPTOR, - arg7: PVOID, - ), ->; -pub mod DEVICE_REGISTRY_PROPERTY { - pub type Type = ::core::ffi::c_int; - pub const DevicePropertyDeviceDescription: Type = 0; - pub const DevicePropertyHardwareID: Type = 1; - pub const DevicePropertyCompatibleIDs: Type = 2; - pub const DevicePropertyBootConfiguration: Type = 3; - pub const DevicePropertyBootConfigurationTranslated: Type = 4; - pub const DevicePropertyClassName: Type = 5; - pub const DevicePropertyClassGuid: Type = 6; - pub const DevicePropertyDriverKeyName: Type = 7; - pub const DevicePropertyManufacturer: Type = 8; - pub const DevicePropertyFriendlyName: Type = 9; - pub const DevicePropertyLocationInformation: Type = 10; - pub const DevicePropertyPhysicalDeviceObjectName: Type = 11; - pub const DevicePropertyBusTypeGuid: Type = 12; - pub const DevicePropertyLegacyBusType: Type = 13; - pub const DevicePropertyBusNumber: Type = 14; - pub const DevicePropertyEnumeratorName: Type = 15; - pub const DevicePropertyAddress: Type = 16; - pub const DevicePropertyUINumber: Type = 17; - pub const DevicePropertyInstallState: Type = 18; - pub const DevicePropertyRemovalPolicy: Type = 19; - pub const DevicePropertyResourceRequirements: Type = 20; - pub const DevicePropertyAllocatedResources: Type = 21; - pub const DevicePropertyContainerID: Type = 22; -} -pub type TRANSLATE_BUS_ADDRESS = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - BusAddress: PHYSICAL_ADDRESS, - Length: ULONG, - AddressSpace: PULONG, - TranslatedAddress: PPHYSICAL_ADDRESS, - ) -> BOOLEAN, ->; -pub type PTRANSLATE_BUS_ADDRESS = TRANSLATE_BUS_ADDRESS; -pub type GET_DMA_ADAPTER = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - DeviceDescriptor: *mut _DEVICE_DESCRIPTION, - NumberOfMapRegisters: PULONG, - ) -> *mut _DMA_ADAPTER, ->; -pub type PGET_DMA_ADAPTER = GET_DMA_ADAPTER; -pub type GET_SET_DEVICE_DATA = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - DataType: ULONG, - Buffer: PVOID, - Offset: ULONG, - Length: ULONG, - ) -> ULONG, ->; -pub type PGET_SET_DEVICE_DATA = GET_SET_DEVICE_DATA; -pub mod _DEVICE_INSTALL_STATE { - pub type Type = ::core::ffi::c_int; - pub const InstallStateInstalled: Type = 0; - pub const InstallStateNeedsReinstall: Type = 1; - pub const InstallStateFailedInstall: Type = 2; - pub const InstallStateFinishInstall: Type = 3; -} -pub use self::_DEVICE_INSTALL_STATE::Type as DEVICE_INSTALL_STATE; -pub type PDEVICE_INSTALL_STATE = *mut _DEVICE_INSTALL_STATE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PNP_BUS_INFORMATION { - pub BusTypeGuid: GUID, - pub LegacyBusType: INTERFACE_TYPE, - pub BusNumber: ULONG, -} -#[test] -fn bindgen_test_layout__PNP_BUS_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PNP_BUS_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PNP_BUS_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_PNP_BUS_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PNP_BUS_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_PNP_BUS_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusTypeGuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PNP_BUS_INFORMATION), - "::", - stringify!(BusTypeGuid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LegacyBusType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PNP_BUS_INFORMATION), - "::", - stringify!(LegacyBusType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusNumber) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PNP_BUS_INFORMATION), - "::", - stringify!(BusNumber), - ), - ); -} -impl Default for _PNP_BUS_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PNP_BUS_INFORMATION = _PNP_BUS_INFORMATION; -pub type PPNP_BUS_INFORMATION = *mut _PNP_BUS_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _LEGACY_BUS_INFORMATION { - pub BusTypeGuid: GUID, - pub LegacyBusType: INTERFACE_TYPE, - pub BusNumber: ULONG, -} -#[test] -fn bindgen_test_layout__LEGACY_BUS_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_LEGACY_BUS_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LEGACY_BUS_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_LEGACY_BUS_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_LEGACY_BUS_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_LEGACY_BUS_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusTypeGuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LEGACY_BUS_INFORMATION), - "::", - stringify!(BusTypeGuid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LegacyBusType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_LEGACY_BUS_INFORMATION), - "::", - stringify!(LegacyBusType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusNumber) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_LEGACY_BUS_INFORMATION), - "::", - stringify!(BusNumber), - ), - ); -} -impl Default for _LEGACY_BUS_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type LEGACY_BUS_INFORMATION = _LEGACY_BUS_INFORMATION; -pub type PLEGACY_BUS_INFORMATION = *mut _LEGACY_BUS_INFORMATION; -pub mod _DEVICE_REMOVAL_POLICY { - pub type Type = ::core::ffi::c_int; - pub const RemovalPolicyExpectNoRemoval: Type = 1; - pub const RemovalPolicyExpectOrderlyRemoval: Type = 2; - pub const RemovalPolicyExpectSurpriseRemoval: Type = 3; -} -pub use self::_DEVICE_REMOVAL_POLICY::Type as DEVICE_REMOVAL_POLICY; -pub type PDEVICE_REMOVAL_POLICY = *mut _DEVICE_REMOVAL_POLICY::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _BUS_INTERFACE_STANDARD { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub TranslateBusAddress: PTRANSLATE_BUS_ADDRESS, - pub GetDmaAdapter: PGET_DMA_ADAPTER, - pub SetBusData: PGET_SET_DEVICE_DATA, - pub GetBusData: PGET_SET_DEVICE_DATA, -} -#[test] -fn bindgen_test_layout__BUS_INTERFACE_STANDARD() { - const UNINIT: ::core::mem::MaybeUninit<_BUS_INTERFACE_STANDARD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_BUS_INTERFACE_STANDARD>(), - 64usize, - concat!("Size of: ", stringify!(_BUS_INTERFACE_STANDARD)), - ); - assert_eq!( - ::core::mem::align_of::<_BUS_INTERFACE_STANDARD>(), - 8usize, - concat!("Alignment of ", stringify!(_BUS_INTERFACE_STANDARD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_BUS_INTERFACE_STANDARD), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_BUS_INTERFACE_STANDARD), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_BUS_INTERFACE_STANDARD), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_BUS_INTERFACE_STANDARD), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_BUS_INTERFACE_STANDARD), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TranslateBusAddress) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_BUS_INTERFACE_STANDARD), - "::", - stringify!(TranslateBusAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GetDmaAdapter) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_BUS_INTERFACE_STANDARD), - "::", - stringify!(GetDmaAdapter), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetBusData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_BUS_INTERFACE_STANDARD), - "::", - stringify!(SetBusData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GetBusData) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_BUS_INTERFACE_STANDARD), - "::", - stringify!(GetBusData), - ), - ); -} -impl Default for _BUS_INTERFACE_STANDARD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type BUS_INTERFACE_STANDARD = _BUS_INTERFACE_STANDARD; -pub type PBUS_INTERFACE_STANDARD = *mut _BUS_INTERFACE_STANDARD; -pub type GET_VIRTUAL_DEVICE_DATA = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - VirtualFunction: USHORT, - Buffer: PVOID, - Offset: ULONG, - Length: ULONG, - ) -> ULONG, ->; -pub type PGET_VIRTUAL_DEVICE_DATA = GET_VIRTUAL_DEVICE_DATA; -pub type SET_VIRTUAL_DEVICE_DATA = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - VirtualFunction: USHORT, - Buffer: PVOID, - Offset: ULONG, - Length: ULONG, - ) -> ULONG, ->; -pub type PSET_VIRTUAL_DEVICE_DATA = SET_VIRTUAL_DEVICE_DATA; -pub type GET_VIRTUAL_DEVICE_LOCATION = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - VirtualFunction: USHORT, - SegmentNumber: PUINT16, - BusNumber: PUINT8, - FunctionNumber: PUINT8, - ) -> NTSTATUS, ->; -pub type PGET_VIRTUAL_DEVICE_LOCATION = GET_VIRTUAL_DEVICE_LOCATION; -pub type GET_VIRTUAL_DEVICE_RESOURCES = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, CapturedBusNumbers: PUINT8), ->; -pub type PGET_VIRTUAL_DEVICE_RESOURCES = GET_VIRTUAL_DEVICE_RESOURCES; -pub type ENABLE_VIRTUALIZATION = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - NumVFs: UINT16, - EnableVfMigration: BOOLEAN, - EnableMigrationInterrupt: BOOLEAN, - EnableVirtualization: BOOLEAN, - ) -> NTSTATUS, ->; -pub type PENABLE_VIRTUALIZATION = ENABLE_VIRTUALIZATION; -pub type GET_VIRTUAL_FUNCTION_PROBED_BARS = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, BaseRegisterValues: PULONG) -> NTSTATUS, ->; -pub type PGET_VIRTUAL_FUNCTION_PROBED_BARS = GET_VIRTUAL_FUNCTION_PROBED_BARS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCI_VIRTUALIZATION_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub SetVirtualFunctionData: PSET_VIRTUAL_DEVICE_DATA, - pub GetVirtualFunctionData: PGET_VIRTUAL_DEVICE_DATA, - pub GetLocation: PGET_VIRTUAL_DEVICE_LOCATION, - pub GetResources: PGET_VIRTUAL_DEVICE_RESOURCES, - pub EnableVirtualization: PENABLE_VIRTUALIZATION, - pub GetVirtualFunctionProbedBars: PGET_VIRTUAL_FUNCTION_PROBED_BARS, -} -#[test] -fn bindgen_test_layout__PCI_VIRTUALIZATION_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_VIRTUALIZATION_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_VIRTUALIZATION_INTERFACE>(), - 80usize, - concat!("Size of: ", stringify!(_PCI_VIRTUALIZATION_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_VIRTUALIZATION_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_PCI_VIRTUALIZATION_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VIRTUALIZATION_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VIRTUALIZATION_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VIRTUALIZATION_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VIRTUALIZATION_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VIRTUALIZATION_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetVirtualFunctionData) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VIRTUALIZATION_INTERFACE), - "::", - stringify!(SetVirtualFunctionData), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetVirtualFunctionData) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VIRTUALIZATION_INTERFACE), - "::", - stringify!(GetVirtualFunctionData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GetLocation) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VIRTUALIZATION_INTERFACE), - "::", - stringify!(GetLocation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GetResources) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VIRTUALIZATION_INTERFACE), - "::", - stringify!(GetResources), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EnableVirtualization) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VIRTUALIZATION_INTERFACE), - "::", - stringify!(EnableVirtualization), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetVirtualFunctionProbedBars) as usize - - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VIRTUALIZATION_INTERFACE), - "::", - stringify!(GetVirtualFunctionProbedBars), - ), - ); -} -impl Default for _PCI_VIRTUALIZATION_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_VIRTUALIZATION_INTERFACE = _PCI_VIRTUALIZATION_INTERFACE; -pub type PPCI_VIRTUALIZATION_INTERFACE = *mut _PCI_VIRTUALIZATION_INTERFACE; -pub mod _PCI_ACS_BIT { - pub type Type = ::core::ffi::c_int; - pub const PciAcsReserved: Type = 0; - pub const PciAcsBitEnable: Type = 1; - pub const PciAcsBitDisable: Type = 2; - pub const PciAcsBitDontCare: Type = 3; -} -pub use self::_PCI_ACS_BIT::Type as PCI_ACS_BIT; -pub type PPCI_ACS_BIT = *mut _PCI_ACS_BIT::Type; -pub type PCI_SET_ACS = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - EnableSourceValidation: PCI_ACS_BIT, - EnableTranslationBlocking: PCI_ACS_BIT, - EnableP2PRequestRedirect: PCI_ACS_BIT, - EnableCompletionRedirect: PCI_ACS_BIT, - EnableUpstreamForwarding: PCI_ACS_BIT, - EnableEgressControl: PCI_ACS_BIT, - EnableDirectTranslatedP2P: PCI_ACS_BIT, - ) -> NTSTATUS, ->; -pub type PPCI_SET_ACS = PCI_SET_ACS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCI_SECURITY_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub SetAccessControlServices: PPCI_SET_ACS, -} -#[test] -fn bindgen_test_layout__PCI_SECURITY_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_SECURITY_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_SECURITY_INTERFACE>(), - 40usize, - concat!("Size of: ", stringify!(_PCI_SECURITY_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_SECURITY_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_PCI_SECURITY_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetAccessControlServices) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE), - "::", - stringify!(SetAccessControlServices), - ), - ); -} -impl Default for _PCI_SECURITY_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_SECURITY_INTERFACE = _PCI_SECURITY_INTERFACE; -pub type PPCI_SECURITY_INTERFACE = *mut _PCI_SECURITY_INTERFACE; -pub type PCI_SET_ACS2 = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - ScenariosToModify: ULONG, - ScenarioState: ULONG, - ) -> NTSTATUS, ->; -pub type PPCI_SET_ACS2 = PCI_SET_ACS2; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCI_SECURITY_INTERFACE2 { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub Flags: ULONG, - pub SupportedScenarios: ULONG, - pub SetAccessControlServices: PPCI_SET_ACS2, -} -#[test] -fn bindgen_test_layout__PCI_SECURITY_INTERFACE2() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_SECURITY_INTERFACE2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_SECURITY_INTERFACE2>(), - 48usize, - concat!("Size of: ", stringify!(_PCI_SECURITY_INTERFACE2)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_SECURITY_INTERFACE2>(), - 8usize, - concat!("Alignment of ", stringify!(_PCI_SECURITY_INTERFACE2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE2), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE2), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE2), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE2), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE2), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE2), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SupportedScenarios) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE2), - "::", - stringify!(SupportedScenarios), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetAccessControlServices) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SECURITY_INTERFACE2), - "::", - stringify!(SetAccessControlServices), - ), - ); -} -impl Default for _PCI_SECURITY_INTERFACE2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_SECURITY_INTERFACE2 = _PCI_SECURITY_INTERFACE2; -pub type PPCI_SECURITY_INTERFACE2 = *mut _PCI_SECURITY_INTERFACE2; -pub type PCI_SET_ATS = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, EnableAts: BOOLEAN) -> NTSTATUS, ->; -pub type PPCI_SET_ATS = PCI_SET_ATS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCI_ATS_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub SetAddressTranslationServices: PPCI_SET_ATS, - pub InvalidateQueueDepth: UCHAR, -} -#[test] -fn bindgen_test_layout__PCI_ATS_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_ATS_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_ATS_INTERFACE>(), - 48usize, - concat!("Size of: ", stringify!(_PCI_ATS_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_ATS_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_PCI_ATS_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ATS_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ATS_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ATS_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ATS_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ATS_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetAddressTranslationServices) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ATS_INTERFACE), - "::", - stringify!(SetAddressTranslationServices), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InvalidateQueueDepth) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ATS_INTERFACE), - "::", - stringify!(InvalidateQueueDepth), - ), - ); -} -impl Default for _PCI_ATS_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_ATS_INTERFACE = _PCI_ATS_INTERFACE; -pub type PPCI_ATS_INTERFACE = *mut _PCI_ATS_INTERFACE; -pub type PREENUMERATE_SELF = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REENUMERATE_SELF_INTERFACE_STANDARD { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub SurpriseRemoveAndReenumerateSelf: PREENUMERATE_SELF, -} -#[test] -fn bindgen_test_layout__REENUMERATE_SELF_INTERFACE_STANDARD() { - const UNINIT: ::core::mem::MaybeUninit<_REENUMERATE_SELF_INTERFACE_STANDARD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REENUMERATE_SELF_INTERFACE_STANDARD>(), - 40usize, - concat!("Size of: ", stringify!(_REENUMERATE_SELF_INTERFACE_STANDARD)), - ); - assert_eq!( - ::core::mem::align_of::<_REENUMERATE_SELF_INTERFACE_STANDARD>(), - 8usize, - concat!("Alignment of ", stringify!(_REENUMERATE_SELF_INTERFACE_STANDARD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REENUMERATE_SELF_INTERFACE_STANDARD), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_REENUMERATE_SELF_INTERFACE_STANDARD), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REENUMERATE_SELF_INTERFACE_STANDARD), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REENUMERATE_SELF_INTERFACE_STANDARD), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REENUMERATE_SELF_INTERFACE_STANDARD), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SurpriseRemoveAndReenumerateSelf) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REENUMERATE_SELF_INTERFACE_STANDARD), - "::", - stringify!(SurpriseRemoveAndReenumerateSelf), - ), - ); -} -impl Default for _REENUMERATE_SELF_INTERFACE_STANDARD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REENUMERATE_SELF_INTERFACE_STANDARD = _REENUMERATE_SELF_INTERFACE_STANDARD; -pub type PREENUMERATE_SELF_INTERFACE_STANDARD = *mut _REENUMERATE_SELF_INTERFACE_STANDARD; -pub type PQUERYEXTENDEDADDRESS = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, ExtendedAddress: PULONG64), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PNP_EXTENDED_ADDRESS_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub QueryExtendedAddress: PQUERYEXTENDEDADDRESS, -} -#[test] -fn bindgen_test_layout__PNP_EXTENDED_ADDRESS_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_PNP_EXTENDED_ADDRESS_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PNP_EXTENDED_ADDRESS_INTERFACE>(), - 40usize, - concat!("Size of: ", stringify!(_PNP_EXTENDED_ADDRESS_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_PNP_EXTENDED_ADDRESS_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_PNP_EXTENDED_ADDRESS_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PNP_EXTENDED_ADDRESS_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PNP_EXTENDED_ADDRESS_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PNP_EXTENDED_ADDRESS_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PNP_EXTENDED_ADDRESS_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PNP_EXTENDED_ADDRESS_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryExtendedAddress) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PNP_EXTENDED_ADDRESS_INTERFACE), - "::", - stringify!(QueryExtendedAddress), - ), - ); -} -impl Default for _PNP_EXTENDED_ADDRESS_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PNP_EXTENDED_ADDRESS_INTERFACE = _PNP_EXTENDED_ADDRESS_INTERFACE; -pub type PPNP_EXTENDED_ADDRESS_INTERFACE = *mut _PNP_EXTENDED_ADDRESS_INTERFACE; -pub type SET_D3COLD_SUPPORT = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, D3ColdSupport: BOOLEAN), ->; -pub type PSET_D3COLD_SUPPORT = SET_D3COLD_SUPPORT; -pub mod _DEVICE_WAKE_DEPTH { - pub type Type = ::core::ffi::c_int; - pub const DeviceWakeDepthNotWakeable: Type = 0; - pub const DeviceWakeDepthD0: Type = 1; - pub const DeviceWakeDepthD1: Type = 2; - pub const DeviceWakeDepthD2: Type = 3; - pub const DeviceWakeDepthD3hot: Type = 4; - pub const DeviceWakeDepthD3cold: Type = 5; - pub const DeviceWakeDepthMaximum: Type = 6; -} -pub use self::_DEVICE_WAKE_DEPTH::Type as DEVICE_WAKE_DEPTH; -pub type PDEVICE_WAKE_DEPTH = *mut _DEVICE_WAKE_DEPTH::Type; -pub type GET_IDLE_WAKE_INFO = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - SystemPowerState: SYSTEM_POWER_STATE, - DeepestWakeableDstate: PDEVICE_WAKE_DEPTH, - ) -> NTSTATUS, ->; -pub type PGET_IDLE_WAKE_INFO = GET_IDLE_WAKE_INFO; -pub type GET_D3COLD_CAPABILITY = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, D3ColdSupported: PBOOLEAN) -> NTSTATUS, ->; -pub type PGET_D3COLD_CAPABILITY = GET_D3COLD_CAPABILITY; -pub mod _D3COLD_LAST_TRANSITION_STATUS { - pub type Type = ::core::ffi::c_int; - pub const LastDStateTransitionStatusUnknown: Type = 0; - pub const LastDStateTransitionD3hot: Type = 1; - pub const LastDStateTransitionD3cold: Type = 2; -} -pub use self::_D3COLD_LAST_TRANSITION_STATUS::Type as D3COLD_LAST_TRANSITION_STATUS; -pub type PD3COLD_LAST_TRANSITION_STATUS = *mut _D3COLD_LAST_TRANSITION_STATUS::Type; -pub type GET_D3COLD_LAST_TRANSITION_STATUS = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - LastTransitionStatus: PD3COLD_LAST_TRANSITION_STATUS, - ), ->; -pub type PGET_D3COLD_LAST_TRANSITION_STATUS = GET_D3COLD_LAST_TRANSITION_STATUS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _D3COLD_SUPPORT_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub SetD3ColdSupport: PSET_D3COLD_SUPPORT, - pub GetIdleWakeInfo: PGET_IDLE_WAKE_INFO, - pub GetD3ColdCapability: PGET_D3COLD_CAPABILITY, - pub GetBusDriverD3ColdSupport: PGET_D3COLD_CAPABILITY, - pub GetLastTransitionStatus: PGET_D3COLD_LAST_TRANSITION_STATUS, -} -#[test] -fn bindgen_test_layout__D3COLD_SUPPORT_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_D3COLD_SUPPORT_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_D3COLD_SUPPORT_INTERFACE>(), - 72usize, - concat!("Size of: ", stringify!(_D3COLD_SUPPORT_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_D3COLD_SUPPORT_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_D3COLD_SUPPORT_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_SUPPORT_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_SUPPORT_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_SUPPORT_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_SUPPORT_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_SUPPORT_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetD3ColdSupport) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_SUPPORT_INTERFACE), - "::", - stringify!(SetD3ColdSupport), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GetIdleWakeInfo) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_SUPPORT_INTERFACE), - "::", - stringify!(GetIdleWakeInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetD3ColdCapability) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_SUPPORT_INTERFACE), - "::", - stringify!(GetD3ColdCapability), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetBusDriverD3ColdSupport) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_SUPPORT_INTERFACE), - "::", - stringify!(GetBusDriverD3ColdSupport), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetLastTransitionStatus) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_SUPPORT_INTERFACE), - "::", - stringify!(GetLastTransitionStatus), - ), - ); -} -impl Default for _D3COLD_SUPPORT_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type D3COLD_SUPPORT_INTERFACE = _D3COLD_SUPPORT_INTERFACE; -pub type PD3COLD_SUPPORT_INTERFACE = *mut _D3COLD_SUPPORT_INTERFACE; -pub type D3COLD_REQUEST_CORE_POWER_RAIL = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, CorePowerRailNeeded: BOOLEAN), ->; -pub type PD3COLD_REQUEST_CORE_POWER_RAIL = D3COLD_REQUEST_CORE_POWER_RAIL; -pub type D3COLD_REQUEST_AUX_POWER = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - AuxPowerInMilliWatts: ULONG, - RetryInSeconds: PULONG, - ) -> NTSTATUS, ->; -pub type PD3COLD_REQUEST_AUX_POWER = D3COLD_REQUEST_AUX_POWER; -pub type D3COLD_REQUEST_PERST_DELAY = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, DelayInMicroSeconds: ULONG) -> NTSTATUS, ->; -pub type PD3COLD_REQUEST_PERST_DELAY = D3COLD_REQUEST_PERST_DELAY; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _D3COLD_AUX_POWER_AND_TIMING_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub RequestCorePowerRail: PD3COLD_REQUEST_CORE_POWER_RAIL, - pub RequestAuxPower: PD3COLD_REQUEST_AUX_POWER, - pub RequestPerstDelay: PD3COLD_REQUEST_PERST_DELAY, -} -#[test] -fn bindgen_test_layout__D3COLD_AUX_POWER_AND_TIMING_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_D3COLD_AUX_POWER_AND_TIMING_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_D3COLD_AUX_POWER_AND_TIMING_INTERFACE>(), - 56usize, - concat!("Size of: ", stringify!(_D3COLD_AUX_POWER_AND_TIMING_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_D3COLD_AUX_POWER_AND_TIMING_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_D3COLD_AUX_POWER_AND_TIMING_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_AUX_POWER_AND_TIMING_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_AUX_POWER_AND_TIMING_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_AUX_POWER_AND_TIMING_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_AUX_POWER_AND_TIMING_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_AUX_POWER_AND_TIMING_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RequestCorePowerRail) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_AUX_POWER_AND_TIMING_INTERFACE), - "::", - stringify!(RequestCorePowerRail), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequestAuxPower) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_AUX_POWER_AND_TIMING_INTERFACE), - "::", - stringify!(RequestAuxPower), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RequestPerstDelay) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_D3COLD_AUX_POWER_AND_TIMING_INTERFACE), - "::", - stringify!(RequestPerstDelay), - ), - ); -} -impl Default for _D3COLD_AUX_POWER_AND_TIMING_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type D3COLD_AUX_POWER_AND_TIMING_INTERFACE = _D3COLD_AUX_POWER_AND_TIMING_INTERFACE; -pub type PD3COLD_AUX_POWER_AND_TIMING_INTERFACE = *mut _D3COLD_AUX_POWER_AND_TIMING_INTERFACE; -pub type FPGA_BUS_SCAN = ::core::option::Option; -pub type PFPGA_BUS_SCAN = FPGA_BUS_SCAN; -pub type FPGA_CONTROL_LINK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Enable: BOOLEAN) -> NTSTATUS, ->; -pub type PFPGA_CONTROL_LINK = FPGA_CONTROL_LINK; -pub type FPGA_CONTROL_CONFIG_SPACE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Enable: BOOLEAN) -> NTSTATUS, ->; -pub type PFPGA_CONTROL_CONFIG_SPACE = FPGA_CONTROL_CONFIG_SPACE; -pub type FPGA_CONTROL_ERROR_REPORTING = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - UncorrectableMask: ULONG, - CorrectableMask: ULONG, - DisableErrorReporting: BOOLEAN, - ) -> NTSTATUS, ->; -pub type PFPGA_CONTROL_ERROR_REPORTING = FPGA_CONTROL_ERROR_REPORTING; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FPGA_CONTROL_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub BusScan: PFPGA_BUS_SCAN, - pub ControlLink: PFPGA_CONTROL_LINK, - pub ControlConfigSpace: PFPGA_CONTROL_CONFIG_SPACE, - pub ControlErrorReporting: PFPGA_CONTROL_ERROR_REPORTING, -} -#[test] -fn bindgen_test_layout__FPGA_CONTROL_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_FPGA_CONTROL_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FPGA_CONTROL_INTERFACE>(), - 64usize, - concat!("Size of: ", stringify!(_FPGA_CONTROL_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_FPGA_CONTROL_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_FPGA_CONTROL_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FPGA_CONTROL_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_FPGA_CONTROL_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FPGA_CONTROL_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FPGA_CONTROL_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FPGA_CONTROL_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusScan) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FPGA_CONTROL_INTERFACE), - "::", - stringify!(BusScan), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ControlLink) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FPGA_CONTROL_INTERFACE), - "::", - stringify!(ControlLink), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ControlConfigSpace) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FPGA_CONTROL_INTERFACE), - "::", - stringify!(ControlConfigSpace), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ControlErrorReporting) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FPGA_CONTROL_INTERFACE), - "::", - stringify!(ControlErrorReporting), - ), - ); -} -impl Default for _FPGA_CONTROL_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FPGA_CONTROL_INTERFACE = _FPGA_CONTROL_INTERFACE; -pub type PFPGA_CONTROL_INTERFACE = *mut _FPGA_CONTROL_INTERFACE; -pub type PTM_DEVICE_QUERY_GRANULARITY = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Granularity: PUCHAR) -> NTSTATUS, ->; -pub type PPTM_DEVICE_QUERY_GRANULARITY = PTM_DEVICE_QUERY_GRANULARITY; -pub type PTM_DEVICE_QUERY_TIME_SOURCE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, TimeSource: PULONG) -> NTSTATUS, ->; -pub type PPTM_DEVICE_QUERY_TIME_SOURCE = PTM_DEVICE_QUERY_TIME_SOURCE; -pub type PTM_DEVICE_ENABLE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID) -> NTSTATUS, ->; -pub type PPTM_DEVICE_ENABLE = PTM_DEVICE_ENABLE; -pub type PTM_DEVICE_DISABLE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID) -> NTSTATUS, ->; -pub type PPTM_DEVICE_DISABLE = PTM_DEVICE_DISABLE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PTM_CONTROL_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub QueryGranularity: PPTM_DEVICE_QUERY_GRANULARITY, - pub QueryTimeSource: PPTM_DEVICE_QUERY_TIME_SOURCE, - pub Enable: PPTM_DEVICE_ENABLE, - pub Disable: PPTM_DEVICE_DISABLE, -} -#[test] -fn bindgen_test_layout__PTM_CONTROL_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_PTM_CONTROL_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PTM_CONTROL_INTERFACE>(), - 64usize, - concat!("Size of: ", stringify!(_PTM_CONTROL_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_PTM_CONTROL_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_PTM_CONTROL_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PTM_CONTROL_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PTM_CONTROL_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PTM_CONTROL_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PTM_CONTROL_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PTM_CONTROL_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryGranularity) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PTM_CONTROL_INTERFACE), - "::", - stringify!(QueryGranularity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryTimeSource) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PTM_CONTROL_INTERFACE), - "::", - stringify!(QueryTimeSource), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enable) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PTM_CONTROL_INTERFACE), - "::", - stringify!(Enable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Disable) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_PTM_CONTROL_INTERFACE), - "::", - stringify!(Disable), - ), - ); -} -impl Default for _PTM_CONTROL_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PTM_CONTROL_INTERFACE = _PTM_CONTROL_INTERFACE; -pub type PPTM_CONTROL_INTERFACE = *mut _PTM_CONTROL_INTERFACE; -pub type GET_UPDATED_BUS_RESOURCE = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - UpdatedResourceList: *mut PCM_RESOURCE_LIST, - UpdatedTranslatedResourceList: *mut PCM_RESOURCE_LIST, - ) -> NTSTATUS, ->; -pub type PGET_UPDATED_BUS_RESOURCE = GET_UPDATED_BUS_RESOURCE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _BUS_RESOURCE_UPDATE_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub GetUpdatedBusResource: PGET_UPDATED_BUS_RESOURCE, -} -#[test] -fn bindgen_test_layout__BUS_RESOURCE_UPDATE_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_BUS_RESOURCE_UPDATE_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_BUS_RESOURCE_UPDATE_INTERFACE>(), - 40usize, - concat!("Size of: ", stringify!(_BUS_RESOURCE_UPDATE_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_BUS_RESOURCE_UPDATE_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_BUS_RESOURCE_UPDATE_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_BUS_RESOURCE_UPDATE_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_BUS_RESOURCE_UPDATE_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_BUS_RESOURCE_UPDATE_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_BUS_RESOURCE_UPDATE_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_BUS_RESOURCE_UPDATE_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetUpdatedBusResource) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_BUS_RESOURCE_UPDATE_INTERFACE), - "::", - stringify!(GetUpdatedBusResource), - ), - ); -} -impl Default for _BUS_RESOURCE_UPDATE_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type BUS_RESOURCE_UPDATE_INTERFACE = _BUS_RESOURCE_UPDATE_INTERFACE; -pub type PBUS_RESOURCE_UPDATE_INTERFACE = *mut _BUS_RESOURCE_UPDATE_INTERFACE; -pub mod _NPEM_CONTROL_STANDARD_CONTROL_BIT { - pub type Type = ::core::ffi::c_int; - pub const InitiateReset: Type = 1; - pub const OkControl: Type = 2; - pub const LocateControl: Type = 3; - pub const FailControl: Type = 4; - pub const RebuildControl: Type = 5; - pub const PFAControl: Type = 6; - pub const HotSpareControl: Type = 7; - pub const InACriticalArrayControl: Type = 8; - pub const InAFailedArrayControl: Type = 9; - pub const InvalidDeviceTypeControl: Type = 10; - pub const DisabledControl: Type = 11; -} -pub use self::_NPEM_CONTROL_STANDARD_CONTROL_BIT::Type as NPEM_CONTROL_STANDARD_CONTROL_BIT; -pub type PNPEM_CONTROL_STANDARD_CONTROL_BIT = *mut _NPEM_CONTROL_STANDARD_CONTROL_BIT::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _NPEM_CAPABILITY_STANDARD { - pub __bindgen_anon_1: _NPEM_CAPABILITY_STANDARD__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NPEM_CAPABILITY_STANDARD__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__NPEM_CAPABILITY_STANDARD__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_NPEM_CAPABILITY_STANDARD__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_NPEM_CAPABILITY_STANDARD__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_NPEM_CAPABILITY_STANDARD__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_NPEM_CAPABILITY_STANDARD__bindgen_ty_1)), - ); -} -impl _NPEM_CAPABILITY_STANDARD__bindgen_ty_1 { - #[inline] - pub fn Capable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_Capable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ResetCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_ResetCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn OkCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_OkCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn LocateCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_LocateCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn FailCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_FailCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn RebuildCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_RebuildCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn PFACapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_PFACapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn HotSpareCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_HotSpareCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn InACriticalArrayCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_InACriticalArrayCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn InAFailedArrayCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_InAFailedArrayCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn InvalidDeviceTypeCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_InvalidDeviceTypeCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn DisabledCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } - } - #[inline] - pub fn set_DisabledCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 20u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 20u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Capable: ULONG, - ResetCapable: ULONG, - OkCapable: ULONG, - LocateCapable: ULONG, - FailCapable: ULONG, - RebuildCapable: ULONG, - PFACapable: ULONG, - HotSpareCapable: ULONG, - InACriticalArrayCapable: ULONG, - InAFailedArrayCapable: ULONG, - InvalidDeviceTypeCapable: ULONG, - DisabledCapable: ULONG, - Rsvd: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Capable: u32 = unsafe { ::core::mem::transmute(Capable) }; - Capable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ResetCapable: u32 = unsafe { - ::core::mem::transmute(ResetCapable) - }; - ResetCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let OkCapable: u32 = unsafe { ::core::mem::transmute(OkCapable) }; - OkCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let LocateCapable: u32 = unsafe { - ::core::mem::transmute(LocateCapable) - }; - LocateCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let FailCapable: u32 = unsafe { - ::core::mem::transmute(FailCapable) - }; - FailCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let RebuildCapable: u32 = unsafe { - ::core::mem::transmute(RebuildCapable) - }; - RebuildCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let PFACapable: u32 = unsafe { ::core::mem::transmute(PFACapable) }; - PFACapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let HotSpareCapable: u32 = unsafe { - ::core::mem::transmute(HotSpareCapable) - }; - HotSpareCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let InACriticalArrayCapable: u32 = unsafe { - ::core::mem::transmute(InACriticalArrayCapable) - }; - InACriticalArrayCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let InAFailedArrayCapable: u32 = unsafe { - ::core::mem::transmute(InAFailedArrayCapable) - }; - InAFailedArrayCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let InvalidDeviceTypeCapable: u32 = unsafe { - ::core::mem::transmute(InvalidDeviceTypeCapable) - }; - InvalidDeviceTypeCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let DisabledCapable: u32 = unsafe { - ::core::mem::transmute(DisabledCapable) - }; - DisabledCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 20u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__NPEM_CAPABILITY_STANDARD() { - const UNINIT: ::core::mem::MaybeUninit<_NPEM_CAPABILITY_STANDARD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NPEM_CAPABILITY_STANDARD>(), - 4usize, - concat!("Size of: ", stringify!(_NPEM_CAPABILITY_STANDARD)), - ); - assert_eq!( - ::core::mem::align_of::<_NPEM_CAPABILITY_STANDARD>(), - 4usize, - concat!("Alignment of ", stringify!(_NPEM_CAPABILITY_STANDARD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NPEM_CAPABILITY_STANDARD), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _NPEM_CAPABILITY_STANDARD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type NPEM_CAPABILITY_STANDARD = _NPEM_CAPABILITY_STANDARD; -pub type PNPEM_CAPABILITY_STANDARD = *mut _NPEM_CAPABILITY_STANDARD; -pub type NPEM_CONTROL_ENABLE_DISABLE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, EnableNpem: BOOLEAN) -> NTSTATUS, ->; -pub type PNPEM_CONTROL_ENABLE_DISABLE = NPEM_CONTROL_ENABLE_DISABLE; -pub type NPEM_CONTROL_QUERY_STANDARD_CAPABILITIES = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - StandardCapabilities: PNPEM_CAPABILITY_STANDARD, - ) -> NTSTATUS, ->; -pub type PNPEM_CONTROL_QUERY_STANDARD_CAPABILITIES = NPEM_CONTROL_QUERY_STANDARD_CAPABILITIES; -pub type NPEM_CONTROL_SET_STANDARD_CONTROL = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - StandardControl: NPEM_CONTROL_STANDARD_CONTROL_BIT, - Set: BOOLEAN, - ) -> NTSTATUS, ->; -pub type PNPEM_CONTROL_SET_STANDARD_CONTROL = NPEM_CONTROL_SET_STANDARD_CONTROL; -pub type NPEM_CONTROL_QUERY_CONTROL = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID) -> ULONG, ->; -pub type PNPEM_CONTROL_QUERY_CONTROL = NPEM_CONTROL_QUERY_CONTROL; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _NPEM_CONTROL_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub SetNpemSupportState: PNPEM_CONTROL_ENABLE_DISABLE, - pub QueryStandardCapabilities: PNPEM_CONTROL_QUERY_STANDARD_CAPABILITIES, - pub SetStandardControl: PNPEM_CONTROL_SET_STANDARD_CONTROL, - pub QueryNpemControl: PNPEM_CONTROL_QUERY_CONTROL, -} -#[test] -fn bindgen_test_layout__NPEM_CONTROL_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_NPEM_CONTROL_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NPEM_CONTROL_INTERFACE>(), - 64usize, - concat!("Size of: ", stringify!(_NPEM_CONTROL_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_NPEM_CONTROL_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_NPEM_CONTROL_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NPEM_CONTROL_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_NPEM_CONTROL_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NPEM_CONTROL_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_NPEM_CONTROL_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_NPEM_CONTROL_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetNpemSupportState) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_NPEM_CONTROL_INTERFACE), - "::", - stringify!(SetNpemSupportState), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryStandardCapabilities) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_NPEM_CONTROL_INTERFACE), - "::", - stringify!(QueryStandardCapabilities), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetStandardControl) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_NPEM_CONTROL_INTERFACE), - "::", - stringify!(SetStandardControl), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryNpemControl) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_NPEM_CONTROL_INTERFACE), - "::", - stringify!(QueryNpemControl), - ), - ); -} -impl Default for _NPEM_CONTROL_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type NPEM_CONTROL_INTERFACE = _NPEM_CONTROL_INTERFACE; -pub type PNPEM_CONTROL_INTERFACE = *mut _NPEM_CONTROL_INTERFACE; -pub type PGPE_SERVICE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(arg1: PVOID, arg2: PVOID) -> BOOLEAN, ->; -pub type PGPE_CONNECT_VECTOR = ::core::option::Option< - unsafe extern "C" fn( - arg1: PDEVICE_OBJECT, - arg2: ULONG, - arg3: KINTERRUPT_MODE, - arg4: BOOLEAN, - arg5: PGPE_SERVICE_ROUTINE, - arg6: PVOID, - arg7: PVOID, - ) -> NTSTATUS, ->; -pub type PGPE_DISCONNECT_VECTOR = ::core::option::Option< - unsafe extern "C" fn(arg1: PVOID) -> NTSTATUS, ->; -pub type PGPE_ENABLE_EVENT = ::core::option::Option< - unsafe extern "C" fn(arg1: PDEVICE_OBJECT, arg2: PVOID) -> NTSTATUS, ->; -pub type PGPE_DISABLE_EVENT = ::core::option::Option< - unsafe extern "C" fn(arg1: PDEVICE_OBJECT, arg2: PVOID) -> NTSTATUS, ->; -pub type PGPE_CLEAR_STATUS = ::core::option::Option< - unsafe extern "C" fn(arg1: PDEVICE_OBJECT, arg2: PVOID) -> NTSTATUS, ->; -pub type PDEVICE_NOTIFY_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(arg1: PVOID, arg2: ULONG), ->; -pub type PREGISTER_FOR_DEVICE_NOTIFICATIONS = ::core::option::Option< - unsafe extern "C" fn( - arg1: PDEVICE_OBJECT, - arg2: PDEVICE_NOTIFY_CALLBACK, - arg3: PVOID, - ) -> NTSTATUS, ->; -pub type PUNREGISTER_FOR_DEVICE_NOTIFICATIONS = ::core::option::Option< - unsafe extern "C" fn(arg1: PDEVICE_OBJECT, arg2: PDEVICE_NOTIFY_CALLBACK), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ACPI_INTERFACE_STANDARD { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub GpeConnectVector: PGPE_CONNECT_VECTOR, - pub GpeDisconnectVector: PGPE_DISCONNECT_VECTOR, - pub GpeEnableEvent: PGPE_ENABLE_EVENT, - pub GpeDisableEvent: PGPE_DISABLE_EVENT, - pub GpeClearStatus: PGPE_CLEAR_STATUS, - pub RegisterForDeviceNotifications: PREGISTER_FOR_DEVICE_NOTIFICATIONS, - pub UnregisterForDeviceNotifications: PUNREGISTER_FOR_DEVICE_NOTIFICATIONS, -} -#[test] -fn bindgen_test_layout__ACPI_INTERFACE_STANDARD() { - const UNINIT: ::core::mem::MaybeUninit<_ACPI_INTERFACE_STANDARD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ACPI_INTERFACE_STANDARD>(), - 88usize, - concat!("Size of: ", stringify!(_ACPI_INTERFACE_STANDARD)), - ); - assert_eq!( - ::core::mem::align_of::<_ACPI_INTERFACE_STANDARD>(), - 8usize, - concat!("Alignment of ", stringify!(_ACPI_INTERFACE_STANDARD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_INTERFACE_STANDARD), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_INTERFACE_STANDARD), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_INTERFACE_STANDARD), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_INTERFACE_STANDARD), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_INTERFACE_STANDARD), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GpeConnectVector) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_INTERFACE_STANDARD), - "::", - stringify!(GpeConnectVector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GpeDisconnectVector) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_INTERFACE_STANDARD), - "::", - stringify!(GpeDisconnectVector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GpeEnableEvent) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_INTERFACE_STANDARD), - "::", - stringify!(GpeEnableEvent), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GpeDisableEvent) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_INTERFACE_STANDARD), - "::", - stringify!(GpeDisableEvent), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GpeClearStatus) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_INTERFACE_STANDARD), - "::", - stringify!(GpeClearStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RegisterForDeviceNotifications) as usize - - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_INTERFACE_STANDARD), - "::", - stringify!(RegisterForDeviceNotifications), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnregisterForDeviceNotifications) as usize - - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_INTERFACE_STANDARD), - "::", - stringify!(UnregisterForDeviceNotifications), - ), - ); -} -impl Default for _ACPI_INTERFACE_STANDARD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ACPI_INTERFACE_STANDARD = _ACPI_INTERFACE_STANDARD; -pub type PACPI_INTERFACE_STANDARD = *mut _ACPI_INTERFACE_STANDARD; -pub type PGPE_SERVICE_ROUTINE2 = ::core::option::Option< - unsafe extern "C" fn(ObjectContext: PVOID, ServiceContext: PVOID) -> BOOLEAN, ->; -pub type PGPE_CONNECT_VECTOR2 = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - GpeNumber: ULONG, - Mode: KINTERRUPT_MODE, - Shareable: BOOLEAN, - ServiceRoutine: PGPE_SERVICE_ROUTINE, - ServiceContext: PVOID, - ObjectContext: *mut PVOID, - ) -> NTSTATUS, ->; -pub type PGPE_DISCONNECT_VECTOR2 = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, ObjectContext: PVOID) -> NTSTATUS, ->; -pub type PGPE_ENABLE_EVENT2 = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, ObjectContext: PVOID) -> NTSTATUS, ->; -pub type PGPE_DISABLE_EVENT2 = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, ObjectContext: PVOID) -> NTSTATUS, ->; -pub type PGPE_CLEAR_STATUS2 = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, ObjectContext: PVOID) -> NTSTATUS, ->; -pub type PDEVICE_NOTIFY_CALLBACK2 = ::core::option::Option< - unsafe extern "C" fn(NotificationContext: PVOID, NotifyCode: ULONG), ->; -pub type PREGISTER_FOR_DEVICE_NOTIFICATIONS2 = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - NotificationHandler: PDEVICE_NOTIFY_CALLBACK2, - NotificationContext: PVOID, - ) -> NTSTATUS, ->; -pub type PUNREGISTER_FOR_DEVICE_NOTIFICATIONS2 = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ACPI_INTERFACE_STANDARD2 { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub GpeConnectVector: PGPE_CONNECT_VECTOR2, - pub GpeDisconnectVector: PGPE_DISCONNECT_VECTOR2, - pub GpeEnableEvent: PGPE_ENABLE_EVENT2, - pub GpeDisableEvent: PGPE_DISABLE_EVENT2, - pub GpeClearStatus: PGPE_CLEAR_STATUS2, - pub RegisterForDeviceNotifications: PREGISTER_FOR_DEVICE_NOTIFICATIONS2, - pub UnregisterForDeviceNotifications: PUNREGISTER_FOR_DEVICE_NOTIFICATIONS2, -} -#[test] -fn bindgen_test_layout_ACPI_INTERFACE_STANDARD2() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(ACPI_INTERFACE_STANDARD2)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ACPI_INTERFACE_STANDARD2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ACPI_INTERFACE_STANDARD2), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(ACPI_INTERFACE_STANDARD2), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ACPI_INTERFACE_STANDARD2), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ACPI_INTERFACE_STANDARD2), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(ACPI_INTERFACE_STANDARD2), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GpeConnectVector) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ACPI_INTERFACE_STANDARD2), - "::", - stringify!(GpeConnectVector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GpeDisconnectVector) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ACPI_INTERFACE_STANDARD2), - "::", - stringify!(GpeDisconnectVector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GpeEnableEvent) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(ACPI_INTERFACE_STANDARD2), - "::", - stringify!(GpeEnableEvent), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GpeDisableEvent) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(ACPI_INTERFACE_STANDARD2), - "::", - stringify!(GpeDisableEvent), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GpeClearStatus) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(ACPI_INTERFACE_STANDARD2), - "::", - stringify!(GpeClearStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RegisterForDeviceNotifications) as usize - - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(ACPI_INTERFACE_STANDARD2), - "::", - stringify!(RegisterForDeviceNotifications), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnregisterForDeviceNotifications) as usize - - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(ACPI_INTERFACE_STANDARD2), - "::", - stringify!(UnregisterForDeviceNotifications), - ), - ); -} -impl Default for ACPI_INTERFACE_STANDARD2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PACPI_INTERFACE_STANDARD2 = *mut ACPI_INTERFACE_STANDARD2; -pub type PIO_DEVICE_EJECT_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Status: NTSTATUS, Context: PVOID), ->; -pub mod _IO_NOTIFICATION_EVENT_CATEGORY { - pub type Type = ::core::ffi::c_int; - pub const EventCategoryReserved: Type = 0; - pub const EventCategoryHardwareProfileChange: Type = 1; - pub const EventCategoryDeviceInterfaceChange: Type = 2; - pub const EventCategoryTargetDeviceChange: Type = 3; - pub const EventCategoryKernelSoftRestart: Type = 4; -} -pub use self::_IO_NOTIFICATION_EVENT_CATEGORY::Type as IO_NOTIFICATION_EVENT_CATEGORY; -pub type DRIVER_NOTIFICATION_CALLBACK_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(NotificationStructure: PVOID, Context: PVOID) -> NTSTATUS, ->; -pub type PDRIVER_NOTIFICATION_CALLBACK_ROUTINE = DRIVER_NOTIFICATION_CALLBACK_ROUTINE; -pub type DEVICE_CHANGE_COMPLETE_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID), ->; -pub type PDEVICE_CHANGE_COMPLETE_CALLBACK = DEVICE_CHANGE_COMPLETE_CALLBACK; -pub mod _DRIVER_DIRECTORY_TYPE { - pub type Type = ::core::ffi::c_int; - pub const DriverDirectoryImage: Type = 0; - pub const DriverDirectoryData: Type = 1; - pub const DriverDirectorySharedData: Type = 2; -} -pub use self::_DRIVER_DIRECTORY_TYPE::Type as DRIVER_DIRECTORY_TYPE; -pub type PDRIVER_DIRECTORY_TYPE = *mut _DRIVER_DIRECTORY_TYPE::Type; -pub mod _DEVICE_DIRECTORY_TYPE { - pub type Type = ::core::ffi::c_int; - pub const DeviceDirectoryData: Type = 0; -} -pub use self::_DEVICE_DIRECTORY_TYPE::Type as DEVICE_DIRECTORY_TYPE; -pub type PDEVICE_DIRECTORY_TYPE = *mut _DEVICE_DIRECTORY_TYPE::Type; -pub mod _DRIVER_REGKEY_TYPE { - pub type Type = ::core::ffi::c_int; - pub const DriverRegKeyParameters: Type = 0; - pub const DriverRegKeyPersistentState: Type = 1; - pub const DriverRegKeySharedPersistentState: Type = 2; -} -pub use self::_DRIVER_REGKEY_TYPE::Type as DRIVER_REGKEY_TYPE; -pub type PDRIVER_REGKEY_TYPE = *mut _DRIVER_REGKEY_TYPE::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PLUGPLAY_NOTIFICATION_HEADER { - pub Version: USHORT, - pub Size: USHORT, - pub Event: GUID, -} -#[test] -fn bindgen_test_layout__PLUGPLAY_NOTIFICATION_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_PLUGPLAY_NOTIFICATION_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PLUGPLAY_NOTIFICATION_HEADER>(), - 20usize, - concat!("Size of: ", stringify!(_PLUGPLAY_NOTIFICATION_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_PLUGPLAY_NOTIFICATION_HEADER>(), - 4usize, - concat!("Alignment of ", stringify!(_PLUGPLAY_NOTIFICATION_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PLUGPLAY_NOTIFICATION_HEADER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PLUGPLAY_NOTIFICATION_HEADER), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Event) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PLUGPLAY_NOTIFICATION_HEADER), - "::", - stringify!(Event), - ), - ); -} -pub type PLUGPLAY_NOTIFICATION_HEADER = _PLUGPLAY_NOTIFICATION_HEADER; -pub type PPLUGPLAY_NOTIFICATION_HEADER = *mut _PLUGPLAY_NOTIFICATION_HEADER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _HWPROFILE_CHANGE_NOTIFICATION { - pub Version: USHORT, - pub Size: USHORT, - pub Event: GUID, -} -#[test] -fn bindgen_test_layout__HWPROFILE_CHANGE_NOTIFICATION() { - const UNINIT: ::core::mem::MaybeUninit<_HWPROFILE_CHANGE_NOTIFICATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_HWPROFILE_CHANGE_NOTIFICATION>(), - 20usize, - concat!("Size of: ", stringify!(_HWPROFILE_CHANGE_NOTIFICATION)), - ); - assert_eq!( - ::core::mem::align_of::<_HWPROFILE_CHANGE_NOTIFICATION>(), - 4usize, - concat!("Alignment of ", stringify!(_HWPROFILE_CHANGE_NOTIFICATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_HWPROFILE_CHANGE_NOTIFICATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_HWPROFILE_CHANGE_NOTIFICATION), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Event) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_HWPROFILE_CHANGE_NOTIFICATION), - "::", - stringify!(Event), - ), - ); -} -pub type HWPROFILE_CHANGE_NOTIFICATION = _HWPROFILE_CHANGE_NOTIFICATION; -pub type PHWPROFILE_CHANGE_NOTIFICATION = *mut _HWPROFILE_CHANGE_NOTIFICATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DEVICE_INTERFACE_CHANGE_NOTIFICATION { - pub Version: USHORT, - pub Size: USHORT, - pub Event: GUID, - pub InterfaceClassGuid: GUID, - pub SymbolicLinkName: PUNICODE_STRING, -} -#[test] -fn bindgen_test_layout__DEVICE_INTERFACE_CHANGE_NOTIFICATION() { - const UNINIT: ::core::mem::MaybeUninit<_DEVICE_INTERFACE_CHANGE_NOTIFICATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVICE_INTERFACE_CHANGE_NOTIFICATION>(), - 48usize, - concat!("Size of: ", stringify!(_DEVICE_INTERFACE_CHANGE_NOTIFICATION)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_INTERFACE_CHANGE_NOTIFICATION>(), - 8usize, - concat!("Alignment of ", stringify!(_DEVICE_INTERFACE_CHANGE_NOTIFICATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_INTERFACE_CHANGE_NOTIFICATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_INTERFACE_CHANGE_NOTIFICATION), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Event) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_INTERFACE_CHANGE_NOTIFICATION), - "::", - stringify!(Event), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceClassGuid) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_INTERFACE_CHANGE_NOTIFICATION), - "::", - stringify!(InterfaceClassGuid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SymbolicLinkName) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_INTERFACE_CHANGE_NOTIFICATION), - "::", - stringify!(SymbolicLinkName), - ), - ); -} -impl Default for _DEVICE_INTERFACE_CHANGE_NOTIFICATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEVICE_INTERFACE_CHANGE_NOTIFICATION = _DEVICE_INTERFACE_CHANGE_NOTIFICATION; -pub type PDEVICE_INTERFACE_CHANGE_NOTIFICATION = *mut _DEVICE_INTERFACE_CHANGE_NOTIFICATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TARGET_DEVICE_REMOVAL_NOTIFICATION { - pub Version: USHORT, - pub Size: USHORT, - pub Event: GUID, - pub FileObject: PFILE_OBJECT, -} -#[test] -fn bindgen_test_layout__TARGET_DEVICE_REMOVAL_NOTIFICATION() { - const UNINIT: ::core::mem::MaybeUninit<_TARGET_DEVICE_REMOVAL_NOTIFICATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TARGET_DEVICE_REMOVAL_NOTIFICATION>(), - 32usize, - concat!("Size of: ", stringify!(_TARGET_DEVICE_REMOVAL_NOTIFICATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TARGET_DEVICE_REMOVAL_NOTIFICATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TARGET_DEVICE_REMOVAL_NOTIFICATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TARGET_DEVICE_REMOVAL_NOTIFICATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_TARGET_DEVICE_REMOVAL_NOTIFICATION), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Event) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_TARGET_DEVICE_REMOVAL_NOTIFICATION), - "::", - stringify!(Event), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileObject) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TARGET_DEVICE_REMOVAL_NOTIFICATION), - "::", - stringify!(FileObject), - ), - ); -} -impl Default for _TARGET_DEVICE_REMOVAL_NOTIFICATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TARGET_DEVICE_REMOVAL_NOTIFICATION = _TARGET_DEVICE_REMOVAL_NOTIFICATION; -pub type PTARGET_DEVICE_REMOVAL_NOTIFICATION = *mut _TARGET_DEVICE_REMOVAL_NOTIFICATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KERNEL_SOFT_RESTART_NOTIFICATION { - pub Version: USHORT, - pub Size: USHORT, - pub Event: GUID, -} -#[test] -fn bindgen_test_layout__KERNEL_SOFT_RESTART_NOTIFICATION() { - const UNINIT: ::core::mem::MaybeUninit<_KERNEL_SOFT_RESTART_NOTIFICATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KERNEL_SOFT_RESTART_NOTIFICATION>(), - 20usize, - concat!("Size of: ", stringify!(_KERNEL_SOFT_RESTART_NOTIFICATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KERNEL_SOFT_RESTART_NOTIFICATION>(), - 4usize, - concat!("Alignment of ", stringify!(_KERNEL_SOFT_RESTART_NOTIFICATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KERNEL_SOFT_RESTART_NOTIFICATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_KERNEL_SOFT_RESTART_NOTIFICATION), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Event) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_KERNEL_SOFT_RESTART_NOTIFICATION), - "::", - stringify!(Event), - ), - ); -} -pub type KERNEL_SOFT_RESTART_NOTIFICATION = _KERNEL_SOFT_RESTART_NOTIFICATION; -pub type PKERNEL_SOFT_RESTART_NOTIFICATION = *mut _KERNEL_SOFT_RESTART_NOTIFICATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TARGET_DEVICE_CUSTOM_NOTIFICATION { - pub Version: USHORT, - pub Size: USHORT, - pub Event: GUID, - pub FileObject: PFILE_OBJECT, - pub NameBufferOffset: LONG, - pub CustomDataBuffer: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__TARGET_DEVICE_CUSTOM_NOTIFICATION() { - const UNINIT: ::core::mem::MaybeUninit<_TARGET_DEVICE_CUSTOM_NOTIFICATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TARGET_DEVICE_CUSTOM_NOTIFICATION>(), - 40usize, - concat!("Size of: ", stringify!(_TARGET_DEVICE_CUSTOM_NOTIFICATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TARGET_DEVICE_CUSTOM_NOTIFICATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TARGET_DEVICE_CUSTOM_NOTIFICATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TARGET_DEVICE_CUSTOM_NOTIFICATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_TARGET_DEVICE_CUSTOM_NOTIFICATION), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Event) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_TARGET_DEVICE_CUSTOM_NOTIFICATION), - "::", - stringify!(Event), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileObject) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TARGET_DEVICE_CUSTOM_NOTIFICATION), - "::", - stringify!(FileObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NameBufferOffset) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_TARGET_DEVICE_CUSTOM_NOTIFICATION), - "::", - stringify!(NameBufferOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CustomDataBuffer) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_TARGET_DEVICE_CUSTOM_NOTIFICATION), - "::", - stringify!(CustomDataBuffer), - ), - ); -} -impl Default for _TARGET_DEVICE_CUSTOM_NOTIFICATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TARGET_DEVICE_CUSTOM_NOTIFICATION = _TARGET_DEVICE_CUSTOM_NOTIFICATION; -pub type PTARGET_DEVICE_CUSTOM_NOTIFICATION = *mut _TARGET_DEVICE_CUSTOM_NOTIFICATION; -pub type DEVPROPTYPE = ULONG; -pub type PDEVPROPTYPE = *mut ULONG; -pub type DEVPROP_BOOLEAN = CHAR; -pub type PDEVPROP_BOOLEAN = *mut CHAR; -pub type DEVPROPGUID = GUID; -pub type PDEVPROPGUID = *mut GUID; -pub type DEVPROPID = ULONG; -pub type PDEVPROPID = *mut ULONG; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DEVPROPKEY { - pub fmtid: DEVPROPGUID, - pub pid: DEVPROPID, -} -#[test] -fn bindgen_test_layout__DEVPROPKEY() { - const UNINIT: ::core::mem::MaybeUninit<_DEVPROPKEY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVPROPKEY>(), - 20usize, - concat!("Size of: ", stringify!(_DEVPROPKEY)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVPROPKEY>(), - 4usize, - concat!("Alignment of ", stringify!(_DEVPROPKEY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).fmtid) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_DEVPROPKEY), "::", stringify!(fmtid)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pid) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_DEVPROPKEY), "::", stringify!(pid)), - ); -} -pub type DEVPROPKEY = _DEVPROPKEY; -pub type PDEVPROPKEY = *mut _DEVPROPKEY; -pub mod _DEVPROPSTORE { - pub type Type = ::core::ffi::c_int; - pub const DEVPROP_STORE_SYSTEM: Type = 0; - pub const DEVPROP_STORE_USER: Type = 1; -} -pub use self::_DEVPROPSTORE::Type as DEVPROPSTORE; -pub type PDEVPROPSTORE = *mut _DEVPROPSTORE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DEVPROPCOMPKEY { - pub Key: DEVPROPKEY, - pub Store: DEVPROPSTORE, - pub LocaleName: PCWSTR, -} -#[test] -fn bindgen_test_layout__DEVPROPCOMPKEY() { - const UNINIT: ::core::mem::MaybeUninit<_DEVPROPCOMPKEY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVPROPCOMPKEY>(), - 32usize, - concat!("Size of: ", stringify!(_DEVPROPCOMPKEY)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVPROPCOMPKEY>(), - 8usize, - concat!("Alignment of ", stringify!(_DEVPROPCOMPKEY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Key) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_DEVPROPCOMPKEY), "::", stringify!(Key)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Store) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_DEVPROPCOMPKEY), - "::", - stringify!(Store), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LocaleName) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DEVPROPCOMPKEY), - "::", - stringify!(LocaleName), - ), - ); -} -impl Default for _DEVPROPCOMPKEY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEVPROPCOMPKEY = _DEVPROPCOMPKEY; -pub type PDEVPROPCOMPKEY = *mut _DEVPROPCOMPKEY; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DEVPROPERTY { - pub CompKey: DEVPROPCOMPKEY, - pub Type: DEVPROPTYPE, - pub BufferSize: ULONG, - pub Buffer: PVOID, -} -#[test] -fn bindgen_test_layout__DEVPROPERTY() { - const UNINIT: ::core::mem::MaybeUninit<_DEVPROPERTY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVPROPERTY>(), - 48usize, - concat!("Size of: ", stringify!(_DEVPROPERTY)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVPROPERTY>(), - 8usize, - concat!("Alignment of ", stringify!(_DEVPROPERTY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompKey) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_DEVPROPERTY), "::", stringify!(CompKey)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 32usize, - concat!("Offset of field: ", stringify!(_DEVPROPERTY), "::", stringify!(Type)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BufferSize) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_DEVPROPERTY), - "::", - stringify!(BufferSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 40usize, - concat!("Offset of field: ", stringify!(_DEVPROPERTY), "::", stringify!(Buffer)), - ); -} -impl Default for _DEVPROPERTY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEVPROPERTY = _DEVPROPERTY; -pub type PDEVPROPERTY = *mut _DEVPROPERTY; -pub type PPNP_REPLACE_DRIVER_INTERFACE = *mut _PNP_REPLACE_DRIVER_INTERFACE; -pub type PREPLACE_DRIVER_INIT = ::core::option::Option< - unsafe extern "C" fn( - Interface: PPNP_REPLACE_DRIVER_INTERFACE, - Unused: PVOID, - ) -> NTSTATUS, ->; -pub type PREPLACE_MAP_MEMORY = ::core::option::Option< - unsafe extern "C" fn( - TargetPhysicalAddress: PHYSICAL_ADDRESS, - SparePhysicalAddress: PHYSICAL_ADDRESS, - NumberOfBytes: PLARGE_INTEGER, - TargetAddress: *mut PVOID, - SpareAddress: *mut PVOID, - ) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PNP_REPLACE_MEMORY_LIST { - pub AllocatedCount: ULONG, - pub Count: ULONG, - pub TotalLength: ULONGLONG, - pub Ranges: [_PNP_REPLACE_MEMORY_LIST__bindgen_ty_1; 1usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PNP_REPLACE_MEMORY_LIST__bindgen_ty_1 { - pub Address: PHYSICAL_ADDRESS, - pub Length: ULONGLONG, -} -#[test] -fn bindgen_test_layout__PNP_REPLACE_MEMORY_LIST__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_PNP_REPLACE_MEMORY_LIST__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PNP_REPLACE_MEMORY_LIST__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_PNP_REPLACE_MEMORY_LIST__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PNP_REPLACE_MEMORY_LIST__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_PNP_REPLACE_MEMORY_LIST__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_MEMORY_LIST__bindgen_ty_1), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_MEMORY_LIST__bindgen_ty_1), - "::", - stringify!(Length), - ), - ); -} -impl Default for _PNP_REPLACE_MEMORY_LIST__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PNP_REPLACE_MEMORY_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_PNP_REPLACE_MEMORY_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PNP_REPLACE_MEMORY_LIST>(), - 32usize, - concat!("Size of: ", stringify!(_PNP_REPLACE_MEMORY_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_PNP_REPLACE_MEMORY_LIST>(), - 8usize, - concat!("Alignment of ", stringify!(_PNP_REPLACE_MEMORY_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocatedCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_MEMORY_LIST), - "::", - stringify!(AllocatedCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_MEMORY_LIST), - "::", - stringify!(Count), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_MEMORY_LIST), - "::", - stringify!(TotalLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ranges) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_MEMORY_LIST), - "::", - stringify!(Ranges), - ), - ); -} -impl Default for _PNP_REPLACE_MEMORY_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PNP_REPLACE_MEMORY_LIST = _PNP_REPLACE_MEMORY_LIST; -pub type PPNP_REPLACE_MEMORY_LIST = *mut _PNP_REPLACE_MEMORY_LIST; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PNP_REPLACE_PROCESSOR_LIST { - pub Affinity: PKAFFINITY, - pub GroupCount: ULONG, - pub AllocatedCount: ULONG, - pub Count: ULONG, - pub ApicIds: [ULONG; 1usize], -} -#[test] -fn bindgen_test_layout__PNP_REPLACE_PROCESSOR_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_PNP_REPLACE_PROCESSOR_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PNP_REPLACE_PROCESSOR_LIST>(), - 24usize, - concat!("Size of: ", stringify!(_PNP_REPLACE_PROCESSOR_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_PNP_REPLACE_PROCESSOR_LIST>(), - 8usize, - concat!("Alignment of ", stringify!(_PNP_REPLACE_PROCESSOR_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Affinity) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PROCESSOR_LIST), - "::", - stringify!(Affinity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GroupCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PROCESSOR_LIST), - "::", - stringify!(GroupCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocatedCount) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PROCESSOR_LIST), - "::", - stringify!(AllocatedCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PROCESSOR_LIST), - "::", - stringify!(Count), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ApicIds) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PROCESSOR_LIST), - "::", - stringify!(ApicIds), - ), - ); -} -impl Default for _PNP_REPLACE_PROCESSOR_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PNP_REPLACE_PROCESSOR_LIST = _PNP_REPLACE_PROCESSOR_LIST; -pub type PPNP_REPLACE_PROCESSOR_LIST = *mut _PNP_REPLACE_PROCESSOR_LIST; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PNP_REPLACE_PROCESSOR_LIST_V1 { - pub AffinityMask: KAFFINITY, - pub AllocatedCount: ULONG, - pub Count: ULONG, - pub ApicIds: [ULONG; 1usize], -} -#[test] -fn bindgen_test_layout__PNP_REPLACE_PROCESSOR_LIST_V1() { - const UNINIT: ::core::mem::MaybeUninit<_PNP_REPLACE_PROCESSOR_LIST_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PNP_REPLACE_PROCESSOR_LIST_V1>(), - 24usize, - concat!("Size of: ", stringify!(_PNP_REPLACE_PROCESSOR_LIST_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_PNP_REPLACE_PROCESSOR_LIST_V1>(), - 8usize, - concat!("Alignment of ", stringify!(_PNP_REPLACE_PROCESSOR_LIST_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AffinityMask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PROCESSOR_LIST_V1), - "::", - stringify!(AffinityMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocatedCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PROCESSOR_LIST_V1), - "::", - stringify!(AllocatedCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PROCESSOR_LIST_V1), - "::", - stringify!(Count), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ApicIds) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PROCESSOR_LIST_V1), - "::", - stringify!(ApicIds), - ), - ); -} -pub type PNP_REPLACE_PROCESSOR_LIST_V1 = _PNP_REPLACE_PROCESSOR_LIST_V1; -pub type PPNP_REPLACE_PROCESSOR_LIST_V1 = *mut _PNP_REPLACE_PROCESSOR_LIST_V1; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PNP_REPLACE_PARAMETERS { - pub Size: ULONG, - pub Version: ULONG, - pub Target: ULONG64, - pub Spare: ULONG64, - pub TargetProcessors: PPNP_REPLACE_PROCESSOR_LIST, - pub SpareProcessors: PPNP_REPLACE_PROCESSOR_LIST, - pub TargetMemory: PPNP_REPLACE_MEMORY_LIST, - pub SpareMemory: PPNP_REPLACE_MEMORY_LIST, - pub MapMemory: PREPLACE_MAP_MEMORY, -} -#[test] -fn bindgen_test_layout__PNP_REPLACE_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_PNP_REPLACE_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PNP_REPLACE_PARAMETERS>(), - 64usize, - concat!("Size of: ", stringify!(_PNP_REPLACE_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_PNP_REPLACE_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_PNP_REPLACE_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PARAMETERS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PARAMETERS), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Target) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PARAMETERS), - "::", - stringify!(Target), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spare) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PARAMETERS), - "::", - stringify!(Spare), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetProcessors) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PARAMETERS), - "::", - stringify!(TargetProcessors), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SpareProcessors) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PARAMETERS), - "::", - stringify!(SpareProcessors), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TargetMemory) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PARAMETERS), - "::", - stringify!(TargetMemory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SpareMemory) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PARAMETERS), - "::", - stringify!(SpareMemory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MapMemory) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_PARAMETERS), - "::", - stringify!(MapMemory), - ), - ); -} -impl Default for _PNP_REPLACE_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PNP_REPLACE_PARAMETERS = _PNP_REPLACE_PARAMETERS; -pub type PPNP_REPLACE_PARAMETERS = *mut _PNP_REPLACE_PARAMETERS; -pub type PREPLACE_UNLOAD = ::core::option::Option; -pub type PREPLACE_BEGIN = ::core::option::Option< - unsafe extern "C" fn( - Parameters: PPNP_REPLACE_PARAMETERS, - Context: *mut PVOID, - ) -> NTSTATUS, ->; -pub type PREPLACE_END = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID) -> NTSTATUS, ->; -pub type PREPLACE_MIRROR_PHYSICAL_MEMORY = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - PhysicalAddress: PHYSICAL_ADDRESS, - ByteCount: LARGE_INTEGER, - ) -> NTSTATUS, ->; -pub type PREPLACE_SET_PROCESSOR_ID = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, ApicId: ULONG, Target: BOOLEAN) -> NTSTATUS, ->; -pub type PREPLACE_SWAP = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID) -> NTSTATUS, ->; -pub type PREPLACE_INITIATE_HARDWARE_MIRROR = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID) -> NTSTATUS, ->; -pub type PREPLACE_MIRROR_PLATFORM_MEMORY = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID) -> NTSTATUS, ->; -pub type PREPLACE_GET_MEMORY_DESTINATION = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - SourceAddress: PHYSICAL_ADDRESS, - DestinationAddress: PPHYSICAL_ADDRESS, - ) -> NTSTATUS, ->; -pub type PREPLACE_ENABLE_DISABLE_HARDWARE_QUIESCE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Enable: BOOLEAN) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PNP_REPLACE_DRIVER_INTERFACE { - pub Size: ULONG, - pub Version: ULONG, - pub Flags: ULONG, - pub Unload: PREPLACE_UNLOAD, - pub BeginReplace: PREPLACE_BEGIN, - pub EndReplace: PREPLACE_END, - pub MirrorPhysicalMemory: PREPLACE_MIRROR_PHYSICAL_MEMORY, - pub SetProcessorId: PREPLACE_SET_PROCESSOR_ID, - pub Swap: PREPLACE_SWAP, - pub InitiateHardwareMirror: PREPLACE_INITIATE_HARDWARE_MIRROR, - pub MirrorPlatformMemory: PREPLACE_MIRROR_PLATFORM_MEMORY, - pub GetMemoryDestination: PREPLACE_GET_MEMORY_DESTINATION, - pub EnableDisableHardwareQuiesce: PREPLACE_ENABLE_DISABLE_HARDWARE_QUIESCE, -} -#[test] -fn bindgen_test_layout__PNP_REPLACE_DRIVER_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_PNP_REPLACE_DRIVER_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PNP_REPLACE_DRIVER_INTERFACE>(), - 96usize, - concat!("Size of: ", stringify!(_PNP_REPLACE_DRIVER_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_PNP_REPLACE_DRIVER_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_PNP_REPLACE_DRIVER_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_DRIVER_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_DRIVER_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_DRIVER_INTERFACE), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unload) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_DRIVER_INTERFACE), - "::", - stringify!(Unload), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BeginReplace) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_DRIVER_INTERFACE), - "::", - stringify!(BeginReplace), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndReplace) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_DRIVER_INTERFACE), - "::", - stringify!(EndReplace), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MirrorPhysicalMemory) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_DRIVER_INTERFACE), - "::", - stringify!(MirrorPhysicalMemory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetProcessorId) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_DRIVER_INTERFACE), - "::", - stringify!(SetProcessorId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Swap) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_DRIVER_INTERFACE), - "::", - stringify!(Swap), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InitiateHardwareMirror) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_DRIVER_INTERFACE), - "::", - stringify!(InitiateHardwareMirror), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MirrorPlatformMemory) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_DRIVER_INTERFACE), - "::", - stringify!(MirrorPlatformMemory), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetMemoryDestination) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_DRIVER_INTERFACE), - "::", - stringify!(GetMemoryDestination), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EnableDisableHardwareQuiesce) as usize - - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_PNP_REPLACE_DRIVER_INTERFACE), - "::", - stringify!(EnableDisableHardwareQuiesce), - ), - ); -} -pub type PNP_REPLACE_DRIVER_INTERFACE = _PNP_REPLACE_DRIVER_INTERFACE; -pub type PCRASHDUMP_POWER_ON = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CRASHDUMP_FUNCTIONS_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub PowerOn: PCRASHDUMP_POWER_ON, -} -#[test] -fn bindgen_test_layout__CRASHDUMP_FUNCTIONS_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_CRASHDUMP_FUNCTIONS_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CRASHDUMP_FUNCTIONS_INTERFACE>(), - 40usize, - concat!("Size of: ", stringify!(_CRASHDUMP_FUNCTIONS_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_CRASHDUMP_FUNCTIONS_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_CRASHDUMP_FUNCTIONS_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CRASHDUMP_FUNCTIONS_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CRASHDUMP_FUNCTIONS_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CRASHDUMP_FUNCTIONS_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CRASHDUMP_FUNCTIONS_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CRASHDUMP_FUNCTIONS_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PowerOn) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_CRASHDUMP_FUNCTIONS_INTERFACE), - "::", - stringify!(PowerOn), - ), - ); -} -impl Default for _CRASHDUMP_FUNCTIONS_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CRASHDUMP_FUNCTIONS_INTERFACE = _CRASHDUMP_FUNCTIONS_INTERFACE; -pub type PCRASHDUMP_FUNCTIONS_INTERFACE = *mut _CRASHDUMP_FUNCTIONS_INTERFACE; -pub mod _DEVICE_RESET_TYPE { - pub type Type = ::core::ffi::c_int; - pub const FunctionLevelDeviceReset: Type = 0; - pub const PlatformLevelDeviceReset: Type = 1; -} -pub use self::_DEVICE_RESET_TYPE::Type as DEVICE_RESET_TYPE; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DEVICE_BUS_SPECIFIC_RESET_TYPE { - pub Pci: _DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_1, - pub Acpi: _DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_2, - pub AsULONGLONG: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_1 { - pub _bitfield_align_1: [u64; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_1), - ), - ); -} -impl _DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_1 { - #[inline] - pub fn FunctionLevelDeviceReset(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_FunctionLevelDeviceReset(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn PlatformLevelDeviceReset(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_PlatformLevelDeviceReset(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn SecondaryBusReset(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_SecondaryBusReset(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 61u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 61u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - FunctionLevelDeviceReset: ULONGLONG, - PlatformLevelDeviceReset: ULONGLONG, - SecondaryBusReset: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let FunctionLevelDeviceReset: u64 = unsafe { - ::core::mem::transmute(FunctionLevelDeviceReset) - }; - FunctionLevelDeviceReset as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let PlatformLevelDeviceReset: u64 = unsafe { - ::core::mem::transmute(PlatformLevelDeviceReset) - }; - PlatformLevelDeviceReset as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let SecondaryBusReset: u64 = unsafe { - ::core::mem::transmute(SecondaryBusReset) - }; - SecondaryBusReset as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 61u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_2 { - pub _bitfield_align_1: [u64; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_2() { - assert_eq!( - ::core::mem::size_of::<_DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_2>(), - 8usize, - concat!("Size of: ", stringify!(_DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_2>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_2), - ), - ); -} -impl _DEVICE_BUS_SPECIFIC_RESET_TYPE__bindgen_ty_2 { - #[inline] - pub fn FunctionLevelDeviceReset(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_FunctionLevelDeviceReset(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn PlatformLevelDeviceReset(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_PlatformLevelDeviceReset(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 62u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 62u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - FunctionLevelDeviceReset: ULONGLONG, - PlatformLevelDeviceReset: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let FunctionLevelDeviceReset: u64 = unsafe { - ::core::mem::transmute(FunctionLevelDeviceReset) - }; - FunctionLevelDeviceReset as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let PlatformLevelDeviceReset: u64 = unsafe { - ::core::mem::transmute(PlatformLevelDeviceReset) - }; - PlatformLevelDeviceReset as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 62u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__DEVICE_BUS_SPECIFIC_RESET_TYPE() { - const UNINIT: ::core::mem::MaybeUninit<_DEVICE_BUS_SPECIFIC_RESET_TYPE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVICE_BUS_SPECIFIC_RESET_TYPE>(), - 8usize, - concat!("Size of: ", stringify!(_DEVICE_BUS_SPECIFIC_RESET_TYPE)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_BUS_SPECIFIC_RESET_TYPE>(), - 8usize, - concat!("Alignment of ", stringify!(_DEVICE_BUS_SPECIFIC_RESET_TYPE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Pci) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_BUS_SPECIFIC_RESET_TYPE), - "::", - stringify!(Pci), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Acpi) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_BUS_SPECIFIC_RESET_TYPE), - "::", - stringify!(Acpi), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONGLONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_BUS_SPECIFIC_RESET_TYPE), - "::", - stringify!(AsULONGLONG), - ), - ); -} -impl Default for _DEVICE_BUS_SPECIFIC_RESET_TYPE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEVICE_BUS_SPECIFIC_RESET_TYPE = _DEVICE_BUS_SPECIFIC_RESET_TYPE; -pub type PDEVICE_BUS_SPECIFIC_RESET_TYPE = *mut _DEVICE_BUS_SPECIFIC_RESET_TYPE; -pub type DEVICE_RESET_COMPLETION = ::core::option::Option< - unsafe extern "C" fn(Status: NTSTATUS, Context: PVOID), ->; -pub type PDEVICE_RESET_COMPLETION = DEVICE_RESET_COMPLETION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS { - pub Size: ULONG, - pub DeviceResetCompletion: PDEVICE_RESET_COMPLETION, - pub CompletionContext: PVOID, -} -#[test] -fn bindgen_test_layout__FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS>(), - 24usize, - concat!("Size of: ", stringify!(_FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceResetCompletion) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS), - "::", - stringify!(DeviceResetCompletion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompletionContext) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS), - "::", - stringify!(CompletionContext), - ), - ); -} -impl Default for _FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS = _FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS; -pub type PFUNCTION_LEVEL_DEVICE_RESET_PARAMETERS = *mut _FUNCTION_LEVEL_DEVICE_RESET_PARAMETERS; -pub type DEVICE_RESET_HANDLER = ::core::option::Option< - unsafe extern "C" fn( - InterfaceContext: PVOID, - ResetType: DEVICE_RESET_TYPE, - Flags: ULONG, - ResetParameters: PVOID, - ) -> NTSTATUS, ->; -pub type PDEVICE_RESET_HANDLER = DEVICE_RESET_HANDLER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DEVICE_BUS_SPECIFIC_RESET_INFO { - pub BusTypeGuid: GUID, - pub ResetTypeSupported: DEVICE_BUS_SPECIFIC_RESET_TYPE, -} -#[test] -fn bindgen_test_layout__DEVICE_BUS_SPECIFIC_RESET_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_DEVICE_BUS_SPECIFIC_RESET_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVICE_BUS_SPECIFIC_RESET_INFO>(), - 24usize, - concat!("Size of: ", stringify!(_DEVICE_BUS_SPECIFIC_RESET_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_BUS_SPECIFIC_RESET_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_DEVICE_BUS_SPECIFIC_RESET_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusTypeGuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_BUS_SPECIFIC_RESET_INFO), - "::", - stringify!(BusTypeGuid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ResetTypeSupported) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_BUS_SPECIFIC_RESET_INFO), - "::", - stringify!(ResetTypeSupported), - ), - ); -} -impl Default for _DEVICE_BUS_SPECIFIC_RESET_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEVICE_BUS_SPECIFIC_RESET_INFO = _DEVICE_BUS_SPECIFIC_RESET_INFO; -pub type PDEVICE_BUS_SPECIFIC_RESET_INFO = *mut _DEVICE_BUS_SPECIFIC_RESET_INFO; -pub type DEVICE_QUERY_BUS_SPECIFIC_RESET_HANDLER = ::core::option::Option< - unsafe extern "C" fn( - InterfaceContext: PVOID, - ResetInfoCount: PULONG, - ResetInfoSupported: PDEVICE_BUS_SPECIFIC_RESET_INFO, - ) -> NTSTATUS, ->; -pub type PDEVICE_QUERY_BUS_SPECIFIC_RESET_HANDLER = DEVICE_QUERY_BUS_SPECIFIC_RESET_HANDLER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _BUS_SPECIFIC_RESET_FLAGS { - pub u: _BUS_SPECIFIC_RESET_FLAGS__bindgen_ty_1, - pub AsUlonglong: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _BUS_SPECIFIC_RESET_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u64; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__BUS_SPECIFIC_RESET_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_BUS_SPECIFIC_RESET_FLAGS__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_BUS_SPECIFIC_RESET_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_BUS_SPECIFIC_RESET_FLAGS__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_BUS_SPECIFIC_RESET_FLAGS__bindgen_ty_1)), - ); -} -impl _BUS_SPECIFIC_RESET_FLAGS__bindgen_ty_1 { - #[inline] - pub fn KeepStackReset(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_KeepStackReset(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 63u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 63u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - KeepStackReset: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let KeepStackReset: u64 = unsafe { - ::core::mem::transmute(KeepStackReset) - }; - KeepStackReset as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 63u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__BUS_SPECIFIC_RESET_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_BUS_SPECIFIC_RESET_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_BUS_SPECIFIC_RESET_FLAGS>(), - 8usize, - concat!("Size of: ", stringify!(_BUS_SPECIFIC_RESET_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_BUS_SPECIFIC_RESET_FLAGS>(), - 8usize, - concat!("Alignment of ", stringify!(_BUS_SPECIFIC_RESET_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_BUS_SPECIFIC_RESET_FLAGS), - "::", - stringify!(u), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUlonglong) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_BUS_SPECIFIC_RESET_FLAGS), - "::", - stringify!(AsUlonglong), - ), - ); -} -impl Default for _BUS_SPECIFIC_RESET_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type BUS_SPECIFIC_RESET_FLAGS = _BUS_SPECIFIC_RESET_FLAGS; -pub type PBUS_SPECIFIC_RESET_FLAGS = *mut _BUS_SPECIFIC_RESET_FLAGS; -pub type DEVICE_BUS_SPECIFIC_RESET_HANDLER = ::core::option::Option< - unsafe extern "C" fn( - InterfaceContext: PVOID, - BusType: *const GUID, - ResetTypeSelected: DEVICE_BUS_SPECIFIC_RESET_TYPE, - Flags: PBUS_SPECIFIC_RESET_FLAGS, - ResetParameters: PVOID, - ) -> NTSTATUS, ->; -pub type PDEVICE_BUS_SPECIFIC_RESET_HANDLER = DEVICE_BUS_SPECIFIC_RESET_HANDLER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DEVICE_RESET_STATUS_FLAGS { - pub u: _DEVICE_RESET_STATUS_FLAGS__bindgen_ty_1, - pub AsUlonglong: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DEVICE_RESET_STATUS_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u64; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__DEVICE_RESET_STATUS_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_DEVICE_RESET_STATUS_FLAGS__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_DEVICE_RESET_STATUS_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_RESET_STATUS_FLAGS__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_DEVICE_RESET_STATUS_FLAGS__bindgen_ty_1)), - ); -} -impl _DEVICE_RESET_STATUS_FLAGS__bindgen_ty_1 { - #[inline] - pub fn KeepStackReset(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_KeepStackReset(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn RecoveringFromBusError(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_RecoveringFromBusError(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 62u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 62u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - KeepStackReset: ULONGLONG, - RecoveringFromBusError: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let KeepStackReset: u64 = unsafe { - ::core::mem::transmute(KeepStackReset) - }; - KeepStackReset as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let RecoveringFromBusError: u64 = unsafe { - ::core::mem::transmute(RecoveringFromBusError) - }; - RecoveringFromBusError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 62u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__DEVICE_RESET_STATUS_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_DEVICE_RESET_STATUS_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVICE_RESET_STATUS_FLAGS>(), - 8usize, - concat!("Size of: ", stringify!(_DEVICE_RESET_STATUS_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_RESET_STATUS_FLAGS>(), - 8usize, - concat!("Alignment of ", stringify!(_DEVICE_RESET_STATUS_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RESET_STATUS_FLAGS), - "::", - stringify!(u), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUlonglong) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RESET_STATUS_FLAGS), - "::", - stringify!(AsUlonglong), - ), - ); -} -impl Default for _DEVICE_RESET_STATUS_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEVICE_RESET_STATUS_FLAGS = _DEVICE_RESET_STATUS_FLAGS; -pub type PDEVICE_RESET_STATUS_FLAGS = *mut _DEVICE_RESET_STATUS_FLAGS; -pub type GET_DEVICE_RESET_STATUS = ::core::option::Option< - unsafe extern "C" fn( - InterfaceContext: PVOID, - IsResetting: PBOOLEAN, - ResetTypeSelected: PDEVICE_BUS_SPECIFIC_RESET_TYPE, - Flags: PDEVICE_RESET_STATUS_FLAGS, - ) -> NTSTATUS, ->; -pub type PGET_DEVICE_RESET_STATUS = GET_DEVICE_RESET_STATUS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DEVICE_RESET_INTERFACE_STANDARD { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub DeviceReset: PDEVICE_RESET_HANDLER, - pub SupportedResetTypes: ULONG, - pub Reserved: PVOID, - pub QueryBusSpecificResetInfo: PDEVICE_QUERY_BUS_SPECIFIC_RESET_HANDLER, - pub DeviceBusSpecificReset: PDEVICE_BUS_SPECIFIC_RESET_HANDLER, - pub GetDeviceResetStatus: PGET_DEVICE_RESET_STATUS, -} -#[test] -fn bindgen_test_layout__DEVICE_RESET_INTERFACE_STANDARD() { - const UNINIT: ::core::mem::MaybeUninit<_DEVICE_RESET_INTERFACE_STANDARD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVICE_RESET_INTERFACE_STANDARD>(), - 80usize, - concat!("Size of: ", stringify!(_DEVICE_RESET_INTERFACE_STANDARD)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_RESET_INTERFACE_STANDARD>(), - 8usize, - concat!("Alignment of ", stringify!(_DEVICE_RESET_INTERFACE_STANDARD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RESET_INTERFACE_STANDARD), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RESET_INTERFACE_STANDARD), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RESET_INTERFACE_STANDARD), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RESET_INTERFACE_STANDARD), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RESET_INTERFACE_STANDARD), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceReset) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RESET_INTERFACE_STANDARD), - "::", - stringify!(DeviceReset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SupportedResetTypes) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RESET_INTERFACE_STANDARD), - "::", - stringify!(SupportedResetTypes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RESET_INTERFACE_STANDARD), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryBusSpecificResetInfo) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RESET_INTERFACE_STANDARD), - "::", - stringify!(QueryBusSpecificResetInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceBusSpecificReset) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RESET_INTERFACE_STANDARD), - "::", - stringify!(DeviceBusSpecificReset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetDeviceResetStatus) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_RESET_INTERFACE_STANDARD), - "::", - stringify!(GetDeviceResetStatus), - ), - ); -} -impl Default for _DEVICE_RESET_INTERFACE_STANDARD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEVICE_RESET_INTERFACE_STANDARD = _DEVICE_RESET_INTERFACE_STANDARD; -pub type PDEVICE_RESET_INTERFACE_STANDARD = *mut _DEVICE_RESET_INTERFACE_STANDARD; -pub type SECURE_DRIVER_PROCESS_REFERENCE = ::core::option::Option< - unsafe extern "C" fn(InterfaceContext: PVOID) -> PEPROCESS, ->; -pub type PSECURE_DRIVER_PROCESS_REFERENCE = SECURE_DRIVER_PROCESS_REFERENCE; -pub type SECURE_DRIVER_PROCESS_DEREFERENCE = ::core::option::Option< - unsafe extern "C" fn(InterfaceContext: PVOID, Process: PEPROCESS), ->; -pub type PSECURE_DRIVER_PROCESS_DEREFERENCE = SECURE_DRIVER_PROCESS_DEREFERENCE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SECURE_DRIVER_INTERFACE { - pub InterfaceHeader: INTERFACE, - pub ProcessReference: PSECURE_DRIVER_PROCESS_REFERENCE, - pub ProcessDereference: PSECURE_DRIVER_PROCESS_DEREFERENCE, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__SECURE_DRIVER_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_SECURE_DRIVER_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SECURE_DRIVER_INTERFACE>(), - 56usize, - concat!("Size of: ", stringify!(_SECURE_DRIVER_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_SECURE_DRIVER_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_SECURE_DRIVER_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterfaceHeader) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SECURE_DRIVER_INTERFACE), - "::", - stringify!(InterfaceHeader), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProcessReference) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SECURE_DRIVER_INTERFACE), - "::", - stringify!(ProcessReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProcessDereference) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_SECURE_DRIVER_INTERFACE), - "::", - stringify!(ProcessDereference), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_SECURE_DRIVER_INTERFACE), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _SECURE_DRIVER_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SECURE_DRIVER_INTERFACE = _SECURE_DRIVER_INTERFACE; -pub type PSECURE_DRIVER_INTERFACE = *mut _SECURE_DRIVER_INTERFACE; -pub type GET_SDEV_IDENTIFIER = ::core::option::Option< - unsafe extern "C" fn(InterfaceContext: PVOID) -> ULONGLONG, ->; -pub type PGET_SDEV_IDENTIFIER = GET_SDEV_IDENTIFIER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SDEV_IDENTIFIER_INTERFACE { - pub InterfaceHeader: INTERFACE, - pub GetIdentifier: PGET_SDEV_IDENTIFIER, -} -#[test] -fn bindgen_test_layout__SDEV_IDENTIFIER_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_SDEV_IDENTIFIER_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SDEV_IDENTIFIER_INTERFACE>(), - 40usize, - concat!("Size of: ", stringify!(_SDEV_IDENTIFIER_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_SDEV_IDENTIFIER_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_SDEV_IDENTIFIER_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterfaceHeader) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SDEV_IDENTIFIER_INTERFACE), - "::", - stringify!(InterfaceHeader), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GetIdentifier) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SDEV_IDENTIFIER_INTERFACE), - "::", - stringify!(GetIdentifier), - ), - ); -} -impl Default for _SDEV_IDENTIFIER_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SDEV_IDENTIFIER_INTERFACE = _SDEV_IDENTIFIER_INTERFACE; -pub type PSDEV_IDENTIFIER_INTERFACE = *mut _SDEV_IDENTIFIER_INTERFACE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DEVICE_DESCRIPTION { - pub Version: ULONG, - pub Master: BOOLEAN, - pub ScatterGather: BOOLEAN, - pub DemandMode: BOOLEAN, - pub AutoInitialize: BOOLEAN, - pub Dma32BitAddresses: BOOLEAN, - pub IgnoreCount: BOOLEAN, - pub Reserved1: BOOLEAN, - pub Dma64BitAddresses: BOOLEAN, - pub BusNumber: ULONG, - pub DmaChannel: ULONG, - pub InterfaceType: INTERFACE_TYPE, - pub DmaWidth: DMA_WIDTH, - pub DmaSpeed: DMA_SPEED, - pub MaximumLength: ULONG, - pub DmaPort: ULONG, - pub DmaAddressWidth: ULONG, - pub DmaControllerInstance: ULONG, - pub DmaRequestLine: ULONG, - pub DeviceAddress: PHYSICAL_ADDRESS, -} -#[test] -fn bindgen_test_layout__DEVICE_DESCRIPTION() { - const UNINIT: ::core::mem::MaybeUninit<_DEVICE_DESCRIPTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVICE_DESCRIPTION>(), - 64usize, - concat!("Size of: ", stringify!(_DEVICE_DESCRIPTION)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_DESCRIPTION>(), - 8usize, - concat!("Alignment of ", stringify!(_DEVICE_DESCRIPTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Master) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(Master), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ScatterGather) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(ScatterGather), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DemandMode) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(DemandMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AutoInitialize) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(AutoInitialize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Dma32BitAddresses) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(Dma32BitAddresses), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IgnoreCount) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(IgnoreCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Dma64BitAddresses) as usize - ptr as usize - }, - 11usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(Dma64BitAddresses), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusNumber) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(BusNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DmaChannel) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(DmaChannel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterfaceType) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(InterfaceType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DmaWidth) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(DmaWidth), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DmaSpeed) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(DmaSpeed), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumLength) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(MaximumLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DmaPort) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(DmaPort), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DmaAddressWidth) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(DmaAddressWidth), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DmaControllerInstance) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(DmaControllerInstance), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DmaRequestLine) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(DmaRequestLine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceAddress) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_DESCRIPTION), - "::", - stringify!(DeviceAddress), - ), - ); -} -impl Default for _DEVICE_DESCRIPTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEVICE_DESCRIPTION = _DEVICE_DESCRIPTION; -pub type PDEVICE_DESCRIPTION = *mut _DEVICE_DESCRIPTION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DMA_ADAPTER_INFO_V1 { - pub ReadDmaCounterAvailable: ULONG, - pub ScatterGatherLimit: ULONG, - pub DmaAddressWidth: ULONG, - pub Flags: ULONG, - pub MinimumTransferUnit: ULONG, -} -#[test] -fn bindgen_test_layout__DMA_ADAPTER_INFO_V1() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_ADAPTER_INFO_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_ADAPTER_INFO_V1>(), - 20usize, - concat!("Size of: ", stringify!(_DMA_ADAPTER_INFO_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_ADAPTER_INFO_V1>(), - 4usize, - concat!("Alignment of ", stringify!(_DMA_ADAPTER_INFO_V1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadDmaCounterAvailable) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_ADAPTER_INFO_V1), - "::", - stringify!(ReadDmaCounterAvailable), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ScatterGatherLimit) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DMA_ADAPTER_INFO_V1), - "::", - stringify!(ScatterGatherLimit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DmaAddressWidth) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DMA_ADAPTER_INFO_V1), - "::", - stringify!(DmaAddressWidth), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_DMA_ADAPTER_INFO_V1), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MinimumTransferUnit) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DMA_ADAPTER_INFO_V1), - "::", - stringify!(MinimumTransferUnit), - ), - ); -} -pub type DMA_ADAPTER_INFO_V1 = _DMA_ADAPTER_INFO_V1; -pub type PDMA_ADAPTER_INFO_V1 = *mut _DMA_ADAPTER_INFO_V1; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DMA_ADAPTER_INFO_CRASHDUMP { - pub DeviceDescription: DEVICE_DESCRIPTION, - pub DeviceIdSize: SIZE_T, - pub DeviceId: PVOID, -} -#[test] -fn bindgen_test_layout__DMA_ADAPTER_INFO_CRASHDUMP() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_ADAPTER_INFO_CRASHDUMP> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_ADAPTER_INFO_CRASHDUMP>(), - 80usize, - concat!("Size of: ", stringify!(_DMA_ADAPTER_INFO_CRASHDUMP)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_ADAPTER_INFO_CRASHDUMP>(), - 8usize, - concat!("Alignment of ", stringify!(_DMA_ADAPTER_INFO_CRASHDUMP)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceDescription) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_ADAPTER_INFO_CRASHDUMP), - "::", - stringify!(DeviceDescription), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceIdSize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DMA_ADAPTER_INFO_CRASHDUMP), - "::", - stringify!(DeviceIdSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceId) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DMA_ADAPTER_INFO_CRASHDUMP), - "::", - stringify!(DeviceId), - ), - ); -} -impl Default for _DMA_ADAPTER_INFO_CRASHDUMP { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DMA_ADAPTER_INFO_CRASHDUMP = _DMA_ADAPTER_INFO_CRASHDUMP; -pub type PDMA_ADAPTER_INFO_CRASHDUMP = *mut _DMA_ADAPTER_INFO_CRASHDUMP; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DMA_ADAPTER_INFO { - pub Version: ULONG, - pub __bindgen_anon_1: _DMA_ADAPTER_INFO__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DMA_ADAPTER_INFO__bindgen_ty_1 { - pub V1: DMA_ADAPTER_INFO_V1, - pub Crashdump: DMA_ADAPTER_INFO_CRASHDUMP, -} -#[test] -fn bindgen_test_layout__DMA_ADAPTER_INFO__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_ADAPTER_INFO__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_ADAPTER_INFO__bindgen_ty_1>(), - 80usize, - concat!("Size of: ", stringify!(_DMA_ADAPTER_INFO__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_ADAPTER_INFO__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_DMA_ADAPTER_INFO__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).V1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_ADAPTER_INFO__bindgen_ty_1), - "::", - stringify!(V1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Crashdump) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_ADAPTER_INFO__bindgen_ty_1), - "::", - stringify!(Crashdump), - ), - ); -} -impl Default for _DMA_ADAPTER_INFO__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DMA_ADAPTER_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_ADAPTER_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_ADAPTER_INFO>(), - 88usize, - concat!("Size of: ", stringify!(_DMA_ADAPTER_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_ADAPTER_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_DMA_ADAPTER_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_ADAPTER_INFO), - "::", - stringify!(Version), - ), - ); -} -impl Default for _DMA_ADAPTER_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DMA_ADAPTER_INFO = _DMA_ADAPTER_INFO; -pub type PDMA_ADAPTER_INFO = *mut _DMA_ADAPTER_INFO; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DMA_TRANSFER_INFO_V1 { - pub MapRegisterCount: ULONG, - pub ScatterGatherElementCount: ULONG, - pub ScatterGatherListSize: ULONG, -} -#[test] -fn bindgen_test_layout__DMA_TRANSFER_INFO_V1() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_TRANSFER_INFO_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_TRANSFER_INFO_V1>(), - 12usize, - concat!("Size of: ", stringify!(_DMA_TRANSFER_INFO_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_TRANSFER_INFO_V1>(), - 4usize, - concat!("Alignment of ", stringify!(_DMA_TRANSFER_INFO_V1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MapRegisterCount) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_TRANSFER_INFO_V1), - "::", - stringify!(MapRegisterCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ScatterGatherElementCount) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DMA_TRANSFER_INFO_V1), - "::", - stringify!(ScatterGatherElementCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ScatterGatherListSize) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DMA_TRANSFER_INFO_V1), - "::", - stringify!(ScatterGatherListSize), - ), - ); -} -pub type DMA_TRANSFER_INFO_V1 = _DMA_TRANSFER_INFO_V1; -pub type PDMA_TRANSFER_INFO_V1 = *mut _DMA_TRANSFER_INFO_V1; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DMA_TRANSFER_INFO_V2 { - pub MapRegisterCount: ULONG, - pub ScatterGatherElementCount: ULONG, - pub ScatterGatherListSize: ULONG, - pub LogicalPageCount: ULONG, -} -#[test] -fn bindgen_test_layout__DMA_TRANSFER_INFO_V2() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_TRANSFER_INFO_V2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_TRANSFER_INFO_V2>(), - 16usize, - concat!("Size of: ", stringify!(_DMA_TRANSFER_INFO_V2)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_TRANSFER_INFO_V2>(), - 4usize, - concat!("Alignment of ", stringify!(_DMA_TRANSFER_INFO_V2)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MapRegisterCount) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_TRANSFER_INFO_V2), - "::", - stringify!(MapRegisterCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ScatterGatherElementCount) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DMA_TRANSFER_INFO_V2), - "::", - stringify!(ScatterGatherElementCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ScatterGatherListSize) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DMA_TRANSFER_INFO_V2), - "::", - stringify!(ScatterGatherListSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogicalPageCount) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_DMA_TRANSFER_INFO_V2), - "::", - stringify!(LogicalPageCount), - ), - ); -} -pub type DMA_TRANSFER_INFO_V2 = _DMA_TRANSFER_INFO_V2; -pub type PDMA_TRANSFER_INFO_V2 = *mut _DMA_TRANSFER_INFO_V2; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DMA_TRANSFER_INFO { - pub Version: ULONG, - pub __bindgen_anon_1: _DMA_TRANSFER_INFO__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DMA_TRANSFER_INFO__bindgen_ty_1 { - pub V1: DMA_TRANSFER_INFO_V1, - pub V2: DMA_TRANSFER_INFO_V2, -} -#[test] -fn bindgen_test_layout__DMA_TRANSFER_INFO__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_TRANSFER_INFO__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_TRANSFER_INFO__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_DMA_TRANSFER_INFO__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_TRANSFER_INFO__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_DMA_TRANSFER_INFO__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).V1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_TRANSFER_INFO__bindgen_ty_1), - "::", - stringify!(V1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).V2) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_TRANSFER_INFO__bindgen_ty_1), - "::", - stringify!(V2), - ), - ); -} -impl Default for _DMA_TRANSFER_INFO__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DMA_TRANSFER_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_TRANSFER_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_TRANSFER_INFO>(), - 20usize, - concat!("Size of: ", stringify!(_DMA_TRANSFER_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_TRANSFER_INFO>(), - 4usize, - concat!("Alignment of ", stringify!(_DMA_TRANSFER_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_TRANSFER_INFO), - "::", - stringify!(Version), - ), - ); -} -impl Default for _DMA_TRANSFER_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DMA_TRANSFER_INFO = _DMA_TRANSFER_INFO; -pub type PDMA_TRANSFER_INFO = *mut _DMA_TRANSFER_INFO; -pub type PROCESSOR_HALT_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID) -> NTSTATUS, ->; -pub type PPROCESSOR_HALT_ROUTINE = PROCESSOR_HALT_ROUTINE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IOMMU_DMA_DEVICE { - _unused: [u8; 0], -} -pub type IOMMU_DMA_DEVICE = _IOMMU_DMA_DEVICE; -pub type PIOMMU_DMA_DEVICE = *mut _IOMMU_DMA_DEVICE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _SCATTER_GATHER_ELEMENT { - pub Address: PHYSICAL_ADDRESS, - pub Length: ULONG, - pub Reserved: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__SCATTER_GATHER_ELEMENT() { - const UNINIT: ::core::mem::MaybeUninit<_SCATTER_GATHER_ELEMENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SCATTER_GATHER_ELEMENT>(), - 24usize, - concat!("Size of: ", stringify!(_SCATTER_GATHER_ELEMENT)), - ); - assert_eq!( - ::core::mem::align_of::<_SCATTER_GATHER_ELEMENT>(), - 8usize, - concat!("Alignment of ", stringify!(_SCATTER_GATHER_ELEMENT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SCATTER_GATHER_ELEMENT), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SCATTER_GATHER_ELEMENT), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SCATTER_GATHER_ELEMENT), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _SCATTER_GATHER_ELEMENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SCATTER_GATHER_ELEMENT = _SCATTER_GATHER_ELEMENT; -pub type PSCATTER_GATHER_ELEMENT = *mut _SCATTER_GATHER_ELEMENT; -#[repr(C)] -pub struct _SCATTER_GATHER_LIST { - pub NumberOfElements: ULONG, - pub Reserved: ULONG_PTR, - pub Elements: __IncompleteArrayField, -} -#[test] -fn bindgen_test_layout__SCATTER_GATHER_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_SCATTER_GATHER_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SCATTER_GATHER_LIST>(), - 16usize, - concat!("Size of: ", stringify!(_SCATTER_GATHER_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_SCATTER_GATHER_LIST>(), - 8usize, - concat!("Alignment of ", stringify!(_SCATTER_GATHER_LIST)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfElements) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SCATTER_GATHER_LIST), - "::", - stringify!(NumberOfElements), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SCATTER_GATHER_LIST), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Elements) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SCATTER_GATHER_LIST), - "::", - stringify!(Elements), - ), - ); -} -impl Default for _SCATTER_GATHER_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SCATTER_GATHER_LIST = _SCATTER_GATHER_LIST; -pub type PSCATTER_GATHER_LIST = *mut _SCATTER_GATHER_LIST; -pub type PDMA_OPERATIONS = *mut _DMA_OPERATIONS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DMA_ADAPTER { - pub Version: USHORT, - pub Size: USHORT, - pub DmaOperations: PDMA_OPERATIONS, -} -#[test] -fn bindgen_test_layout__DMA_ADAPTER() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_ADAPTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_ADAPTER>(), - 16usize, - concat!("Size of: ", stringify!(_DMA_ADAPTER)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_ADAPTER>(), - 8usize, - concat!("Alignment of ", stringify!(_DMA_ADAPTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_DMA_ADAPTER), "::", stringify!(Version)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!("Offset of field: ", stringify!(_DMA_ADAPTER), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DmaOperations) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DMA_ADAPTER), - "::", - stringify!(DmaOperations), - ), - ); -} -impl Default for _DMA_ADAPTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DMA_ADAPTER = _DMA_ADAPTER; -pub type PDMA_ADAPTER = *mut _DMA_ADAPTER; -pub mod DMA_COMPLETION_STATUS { - pub type Type = ::core::ffi::c_int; - pub const DmaComplete: Type = 0; - pub const DmaAborted: Type = 1; - pub const DmaError: Type = 2; - pub const DmaCancelled: Type = 3; -} -pub mod _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const CommonBufferConfigTypeLogicalAddressLimits: Type = 0; - pub const CommonBufferConfigTypeSubSection: Type = 1; - pub const CommonBufferConfigTypeHardwareAccessPermissions: Type = 2; - pub const CommonBufferConfigTypeMax: Type = 3; -} -pub use self::_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_TYPE::Type as DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_TYPE; -pub type PDMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_TYPE = *mut _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_TYPE::Type; -pub mod _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_ACCESS_TYPE { - pub type Type = ::core::ffi::c_int; - pub const CommonBufferHardwareAccessReadOnly: Type = 0; - pub const CommonBufferHardwareAccessWriteOnly: Type = 1; - pub const CommonBufferHardwareAccessReadWrite: Type = 2; - pub const CommonBufferHardwareAccessMax: Type = 3; -} -pub use self::_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_ACCESS_TYPE::Type as DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_ACCESS_TYPE; -pub type PDMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_ACCESS_TYPE = *mut _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_ACCESS_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION { - pub ConfigType: DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_TYPE, - pub __bindgen_anon_1: _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1 { - pub LogicalAddressLimits: _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_1, - pub SubSection: _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_2, - pub HardwareAccessType: DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_ACCESS_TYPE, - pub Reserved: [ULONGLONG; 4usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_1 { - pub MinimumAddress: PHYSICAL_ADDRESS, - pub MaximumAddress: PHYSICAL_ADDRESS, -} -#[test] -fn bindgen_test_layout__DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_1, - >(), - 16usize, - concat!( - "Size of: ", - stringify!( - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!( - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinimumAddress) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(MinimumAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumAddress) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!( - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(MaximumAddress), - ), - ); -} -impl Default for _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_2 { - pub Offset: ULONGLONG, - pub Length: ULONG, -} -#[test] -fn bindgen_test_layout__DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_2, - >(), - 16usize, - concat!( - "Size of: ", - stringify!( - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_2, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!( - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!( - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(Length), - ), - ); -} -#[test] -fn bindgen_test_layout__DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1, - >(), - 32usize, - concat!( - "Size of: ", - stringify!(_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogicalAddressLimits) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1), - "::", - stringify!(LogicalAddressLimits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubSection) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1), - "::", - stringify!(SubSection), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HardwareAccessType) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1), - "::", - stringify!(HardwareAccessType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION>(), - 40usize, - concat!("Size of: ", stringify!(_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION>(), - 8usize, - concat!("Alignment of ", stringify!(_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ConfigType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION), - "::", - stringify!(ConfigType), - ), - ); -} -impl Default for _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION = _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION; -pub type PDMA_COMMON_BUFFER_EXTENDED_CONFIGURATION = *mut _DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION; -pub type PPUT_DMA_ADAPTER = ::core::option::Option< - unsafe extern "C" fn(DmaAdapter: PDMA_ADAPTER), ->; -pub type PALLOCATE_COMMON_BUFFER = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - Length: ULONG, - LogicalAddress: PPHYSICAL_ADDRESS, - CacheEnabled: BOOLEAN, - ) -> PVOID, ->; -pub type PFREE_COMMON_BUFFER = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - Length: ULONG, - LogicalAddress: PHYSICAL_ADDRESS, - VirtualAddress: PVOID, - CacheEnabled: BOOLEAN, - ), ->; -pub type PALLOCATE_ADAPTER_CHANNEL = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - DeviceObject: PDEVICE_OBJECT, - NumberOfMapRegisters: ULONG, - ExecutionRoutine: PDRIVER_CONTROL, - Context: PVOID, - ) -> NTSTATUS, ->; -pub type PFLUSH_ADAPTER_BUFFERS = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - Mdl: PMDL, - MapRegisterBase: PVOID, - CurrentVa: PVOID, - Length: ULONG, - WriteToDevice: BOOLEAN, - ) -> BOOLEAN, ->; -pub type PFREE_ADAPTER_CHANNEL = ::core::option::Option< - unsafe extern "C" fn(DmaAdapter: PDMA_ADAPTER), ->; -pub type PFREE_ADAPTER_OBJECT = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - AllocationAction: IO_ALLOCATION_ACTION, - ), ->; -pub type PFREE_MAP_REGISTERS = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - MapRegisterBase: PVOID, - NumberOfMapRegisters: ULONG, - ), ->; -pub type PMAP_TRANSFER = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - Mdl: PMDL, - MapRegisterBase: PVOID, - CurrentVa: PVOID, - Length: PULONG, - WriteToDevice: BOOLEAN, - ) -> PHYSICAL_ADDRESS, ->; -pub type PGET_DMA_ALIGNMENT = ::core::option::Option< - unsafe extern "C" fn(DmaAdapter: PDMA_ADAPTER) -> ULONG, ->; -pub type PREAD_DMA_COUNTER = ::core::option::Option< - unsafe extern "C" fn(DmaAdapter: PDMA_ADAPTER) -> ULONG, ->; -pub type DRIVER_LIST_CONTROL = ::core::option::Option< - unsafe extern "C" fn( - DeviceObject: *mut _DEVICE_OBJECT, - Irp: *mut _IRP, - ScatterGather: PSCATTER_GATHER_LIST, - Context: PVOID, - ), ->; -pub type PDRIVER_LIST_CONTROL = DRIVER_LIST_CONTROL; -pub type PGET_SCATTER_GATHER_LIST = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - DeviceObject: PDEVICE_OBJECT, - Mdl: PMDL, - CurrentVa: PVOID, - Length: ULONG, - ExecutionRoutine: PDRIVER_LIST_CONTROL, - Context: PVOID, - WriteToDevice: BOOLEAN, - ) -> NTSTATUS, ->; -pub type PPUT_SCATTER_GATHER_LIST = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - ScatterGather: PSCATTER_GATHER_LIST, - WriteToDevice: BOOLEAN, - ), ->; -pub type PCALCULATE_SCATTER_GATHER_LIST_SIZE = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - Mdl: PMDL, - CurrentVa: PVOID, - Length: ULONG, - ScatterGatherListSize: PULONG, - pNumberOfMapRegisters: PULONG, - ) -> NTSTATUS, ->; -pub type PBUILD_SCATTER_GATHER_LIST = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - DeviceObject: PDEVICE_OBJECT, - Mdl: PMDL, - CurrentVa: PVOID, - Length: ULONG, - ExecutionRoutine: PDRIVER_LIST_CONTROL, - Context: PVOID, - WriteToDevice: BOOLEAN, - ScatterGatherBuffer: PVOID, - ScatterGatherLength: ULONG, - ) -> NTSTATUS, ->; -pub type PBUILD_MDL_FROM_SCATTER_GATHER_LIST = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - ScatterGather: PSCATTER_GATHER_LIST, - OriginalMdl: PMDL, - TargetMdl: *mut PMDL, - ) -> NTSTATUS, ->; -pub type PGET_DMA_ADAPTER_INFO = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - AdapterInfo: PDMA_ADAPTER_INFO, - ) -> NTSTATUS, ->; -pub type PGET_DMA_TRANSFER_INFO = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - Mdl: PMDL, - Offset: ULONGLONG, - Length: ULONG, - WriteOnly: BOOLEAN, - TransferInfo: PDMA_TRANSFER_INFO, - ) -> NTSTATUS, ->; -pub type PCONFIGURE_ADAPTER_CHANNEL = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - FunctionNumber: ULONG, - Context: PVOID, - ) -> NTSTATUS, ->; -pub type PINITIALIZE_DMA_TRANSFER_CONTEXT = ::core::option::Option< - unsafe extern "C" fn(DmaAdapter: PDMA_ADAPTER, DmaTransferContext: PVOID) -> NTSTATUS, ->; -pub type PALLOCATE_COMMON_BUFFER_EX = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - MaximumAddress: PPHYSICAL_ADDRESS, - Length: ULONG, - LogicalAddress: PPHYSICAL_ADDRESS, - CacheEnabled: BOOLEAN, - PreferredNode: NODE_REQUIREMENT, - ) -> PVOID, ->; -pub type PALLOCATE_ADAPTER_CHANNEL_EX = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - DeviceObject: PDEVICE_OBJECT, - DmaTransferContext: PVOID, - NumberOfMapRegisters: ULONG, - Flags: ULONG, - ExecutionRoutine: PDRIVER_CONTROL, - ExecutionContext: PVOID, - MapRegisterBase: *mut PVOID, - ) -> NTSTATUS, ->; -pub type DMA_COMPLETION_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - DeviceObject: PDEVICE_OBJECT, - CompletionContext: PVOID, - Status: DMA_COMPLETION_STATUS::Type, - ), ->; -pub type PDMA_COMPLETION_ROUTINE = DMA_COMPLETION_ROUTINE; -pub type PMAP_TRANSFER_EX = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - Mdl: PMDL, - MapRegisterBase: PVOID, - Offset: ULONGLONG, - DeviceOffset: ULONG, - Length: PULONG, - WriteToDevice: BOOLEAN, - ScatterGatherBuffer: PSCATTER_GATHER_LIST, - ScatterGatherBufferLength: ULONG, - DmaCompletionRoutine: PDMA_COMPLETION_ROUTINE, - CompletionContext: PVOID, - ) -> NTSTATUS, ->; -pub type PCANCEL_ADAPTER_CHANNEL = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - DeviceObject: PDEVICE_OBJECT, - DmaTransferContext: PVOID, - ) -> BOOLEAN, ->; -pub type PCANCEL_MAPPED_TRANSFER = ::core::option::Option< - unsafe extern "C" fn(DmaAdapter: PDMA_ADAPTER, DmaTransferContext: PVOID) -> NTSTATUS, ->; -pub type PFLUSH_ADAPTER_BUFFERS_EX = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - Mdl: PMDL, - MapRegisterBase: PVOID, - Offset: ULONGLONG, - Length: ULONG, - WriteToDevice: BOOLEAN, - ) -> NTSTATUS, ->; -pub type PGET_SCATTER_GATHER_LIST_EX = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - DeviceObject: PDEVICE_OBJECT, - DmaTransferContext: PVOID, - Mdl: PMDL, - Offset: ULONGLONG, - Length: ULONG, - Flags: ULONG, - ExecutionRoutine: PDRIVER_LIST_CONTROL, - Context: PVOID, - WriteToDevice: BOOLEAN, - DmaCompletionRoutine: PDMA_COMPLETION_ROUTINE, - CompletionContext: PVOID, - ScatterGatherList: *mut PSCATTER_GATHER_LIST, - ) -> NTSTATUS, ->; -pub type PBUILD_SCATTER_GATHER_LIST_EX = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - DeviceObject: PDEVICE_OBJECT, - DmaTransferContext: PVOID, - Mdl: PMDL, - Offset: ULONGLONG, - Length: ULONG, - Flags: ULONG, - ExecutionRoutine: PDRIVER_LIST_CONTROL, - Context: PVOID, - WriteToDevice: BOOLEAN, - ScatterGatherBuffer: PVOID, - ScatterGatherLength: ULONG, - DmaCompletionRoutine: PDMA_COMPLETION_ROUTINE, - CompletionContext: PVOID, - ScatterGatherList: PVOID, - ) -> NTSTATUS, ->; -pub type PALLOCATE_DOMAIN_COMMON_BUFFER = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - DomainHandle: HANDLE, - MaximumAddress: PPHYSICAL_ADDRESS, - Length: ULONG, - Flags: ULONG, - CacheType: *mut MEMORY_CACHING_TYPE, - PreferredNode: NODE_REQUIREMENT, - LogicalAddress: PPHYSICAL_ADDRESS, - VirtualAddress: *mut PVOID, - ) -> NTSTATUS, ->; -pub type PALLOCATE_COMMON_BUFFER_WITH_BOUNDS = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - MinimumAddress: PPHYSICAL_ADDRESS, - MaximumAddress: PPHYSICAL_ADDRESS, - Length: ULONG, - Flags: ULONG, - CacheType: *mut MEMORY_CACHING_TYPE, - PreferredNode: NODE_REQUIREMENT, - LogicalAddress: PPHYSICAL_ADDRESS, - ) -> PVOID, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DMA_COMMON_BUFFER_VECTOR { - _unused: [u8; 0], -} -pub type DMA_COMMON_BUFFER_VECTOR = _DMA_COMMON_BUFFER_VECTOR; -pub type PDMA_COMMON_BUFFER_VECTOR = *mut _DMA_COMMON_BUFFER_VECTOR; -pub type PALLOCATE_COMMON_BUFFER_VECTOR = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - LowAddress: PHYSICAL_ADDRESS, - HighAddress: PHYSICAL_ADDRESS, - CacheType: MEMORY_CACHING_TYPE, - IdealNode: NODE_REQUIREMENT, - Flags: ULONG, - NumberOfElements: ULONG, - SizeOfElements: ULONGLONG, - VectorOut: *mut PDMA_COMMON_BUFFER_VECTOR, - ) -> NTSTATUS, ->; -pub type PGET_COMMON_BUFFER_FROM_VECTOR_BY_INDEX = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - Vector: PDMA_COMMON_BUFFER_VECTOR, - Index: ULONG, - VirtualAddressOut: *mut PVOID, - LogicalAddressOut: PPHYSICAL_ADDRESS, - ), ->; -pub type PFREE_COMMON_BUFFER_FROM_VECTOR = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - Vector: PDMA_COMMON_BUFFER_VECTOR, - Index: ULONG, - ), ->; -pub type PFREE_COMMON_BUFFER_VECTOR = ::core::option::Option< - unsafe extern "C" fn(DmaAdapter: PDMA_ADAPTER, Vector: PDMA_COMMON_BUFFER_VECTOR), ->; -pub type PCREATE_COMMON_BUFFER_FROM_MDL = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - Mdl: PMDL, - ExtendedConfigs: PDMA_COMMON_BUFFER_EXTENDED_CONFIGURATION, - ExtendedConfigsCount: ULONG, - LogicalAddress: PPHYSICAL_ADDRESS, - ) -> NTSTATUS, ->; -pub type PFLUSH_DMA_BUFFER = ::core::option::Option< - unsafe extern "C" fn( - DmaAdapter: PDMA_ADAPTER, - Mdl: PMDL, - ReadOperation: BOOLEAN, - ) -> NTSTATUS, ->; -pub type PJOIN_DMA_DOMAIN = ::core::option::Option< - unsafe extern "C" fn(DmaAdapter: PDMA_ADAPTER, DomainHandle: HANDLE) -> NTSTATUS, ->; -pub type PLEAVE_DMA_DOMAIN = ::core::option::Option< - unsafe extern "C" fn(DmaAdapter: PDMA_ADAPTER) -> NTSTATUS, ->; -pub type PGET_DMA_DOMAIN = ::core::option::Option< - unsafe extern "C" fn(DmaAdapter: PDMA_ADAPTER) -> HANDLE, ->; -#[repr(C)] -#[derive(Default, Copy, Clone)] -pub struct _DMA_OPERATIONS { - pub Size: ULONG, - pub PutDmaAdapter: PPUT_DMA_ADAPTER, - pub AllocateCommonBuffer: PALLOCATE_COMMON_BUFFER, - pub FreeCommonBuffer: PFREE_COMMON_BUFFER, - pub AllocateAdapterChannel: PALLOCATE_ADAPTER_CHANNEL, - pub FlushAdapterBuffers: PFLUSH_ADAPTER_BUFFERS, - pub FreeAdapterChannel: PFREE_ADAPTER_CHANNEL, - pub FreeMapRegisters: PFREE_MAP_REGISTERS, - pub MapTransfer: PMAP_TRANSFER, - pub GetDmaAlignment: PGET_DMA_ALIGNMENT, - pub ReadDmaCounter: PREAD_DMA_COUNTER, - pub GetScatterGatherList: PGET_SCATTER_GATHER_LIST, - pub PutScatterGatherList: PPUT_SCATTER_GATHER_LIST, - pub CalculateScatterGatherList: PCALCULATE_SCATTER_GATHER_LIST_SIZE, - pub BuildScatterGatherList: PBUILD_SCATTER_GATHER_LIST, - pub BuildMdlFromScatterGatherList: PBUILD_MDL_FROM_SCATTER_GATHER_LIST, - pub GetDmaAdapterInfo: PGET_DMA_ADAPTER_INFO, - pub GetDmaTransferInfo: PGET_DMA_TRANSFER_INFO, - pub InitializeDmaTransferContext: PINITIALIZE_DMA_TRANSFER_CONTEXT, - pub AllocateCommonBufferEx: PALLOCATE_COMMON_BUFFER_EX, - pub AllocateAdapterChannelEx: PALLOCATE_ADAPTER_CHANNEL_EX, - pub ConfigureAdapterChannel: PCONFIGURE_ADAPTER_CHANNEL, - pub CancelAdapterChannel: PCANCEL_ADAPTER_CHANNEL, - pub MapTransferEx: PMAP_TRANSFER_EX, - pub GetScatterGatherListEx: PGET_SCATTER_GATHER_LIST_EX, - pub BuildScatterGatherListEx: PBUILD_SCATTER_GATHER_LIST_EX, - pub FlushAdapterBuffersEx: PFLUSH_ADAPTER_BUFFERS_EX, - pub FreeAdapterObject: PFREE_ADAPTER_OBJECT, - pub CancelMappedTransfer: PCANCEL_MAPPED_TRANSFER, - pub AllocateDomainCommonBuffer: PALLOCATE_DOMAIN_COMMON_BUFFER, - pub FlushDmaBuffer: PFLUSH_DMA_BUFFER, - pub JoinDmaDomain: PJOIN_DMA_DOMAIN, - pub LeaveDmaDomain: PLEAVE_DMA_DOMAIN, - pub GetDmaDomain: PGET_DMA_DOMAIN, - pub AllocateCommonBufferWithBounds: PALLOCATE_COMMON_BUFFER_WITH_BOUNDS, - pub AllocateCommonBufferVector: PALLOCATE_COMMON_BUFFER_VECTOR, - pub GetCommonBufferFromVectorByIndex: PGET_COMMON_BUFFER_FROM_VECTOR_BY_INDEX, - pub FreeCommonBufferFromVector: PFREE_COMMON_BUFFER_FROM_VECTOR, - pub FreeCommonBufferVector: PFREE_COMMON_BUFFER_VECTOR, - pub CreateCommonBufferFromMdl: PCREATE_COMMON_BUFFER_FROM_MDL, -} -#[test] -fn bindgen_test_layout__DMA_OPERATIONS() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_OPERATIONS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_OPERATIONS>(), - 320usize, - concat!("Size of: ", stringify!(_DMA_OPERATIONS)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_OPERATIONS>(), - 8usize, - concat!("Alignment of ", stringify!(_DMA_OPERATIONS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_DMA_OPERATIONS), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PutDmaAdapter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(PutDmaAdapter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocateCommonBuffer) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(AllocateCommonBuffer), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeCommonBuffer) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(FreeCommonBuffer), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocateAdapterChannel) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(AllocateAdapterChannel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FlushAdapterBuffers) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(FlushAdapterBuffers), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeAdapterChannel) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(FreeAdapterChannel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeMapRegisters) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(FreeMapRegisters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MapTransfer) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(MapTransfer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GetDmaAlignment) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(GetDmaAlignment), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadDmaCounter) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(ReadDmaCounter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetScatterGatherList) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(GetScatterGatherList), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PutScatterGatherList) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(PutScatterGatherList), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CalculateScatterGatherList) as usize - - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(CalculateScatterGatherList), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BuildScatterGatherList) as usize - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(BuildScatterGatherList), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BuildMdlFromScatterGatherList) as usize - - ptr as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(BuildMdlFromScatterGatherList), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetDmaAdapterInfo) as usize - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(GetDmaAdapterInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetDmaTransferInfo) as usize - ptr as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(GetDmaTransferInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InitializeDmaTransferContext) as usize - - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(InitializeDmaTransferContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocateCommonBufferEx) as usize - ptr as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(AllocateCommonBufferEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocateAdapterChannelEx) as usize - - ptr as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(AllocateAdapterChannelEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ConfigureAdapterChannel) as usize - ptr as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(ConfigureAdapterChannel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CancelAdapterChannel) as usize - ptr as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(CancelAdapterChannel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MapTransferEx) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(MapTransferEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetScatterGatherListEx) as usize - ptr as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(GetScatterGatherListEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BuildScatterGatherListEx) as usize - - ptr as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(BuildScatterGatherListEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FlushAdapterBuffersEx) as usize - ptr as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(FlushAdapterBuffersEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeAdapterObject) as usize - ptr as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(FreeAdapterObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CancelMappedTransfer) as usize - ptr as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(CancelMappedTransfer), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocateDomainCommonBuffer) as usize - - ptr as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(AllocateDomainCommonBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FlushDmaBuffer) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(FlushDmaBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).JoinDmaDomain) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(JoinDmaDomain), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LeaveDmaDomain) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(LeaveDmaDomain), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GetDmaDomain) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(GetDmaDomain), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocateCommonBufferWithBounds) as usize - - ptr as usize - }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(AllocateCommonBufferWithBounds), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocateCommonBufferVector) as usize - - ptr as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(AllocateCommonBufferVector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetCommonBufferFromVectorByIndex) as usize - - ptr as usize - }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(GetCommonBufferFromVectorByIndex), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeCommonBufferFromVector) as usize - - ptr as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(FreeCommonBufferFromVector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeCommonBufferVector) as usize - ptr as usize - }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(FreeCommonBufferVector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CreateCommonBufferFromMdl) as usize - - ptr as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_DMA_OPERATIONS), - "::", - stringify!(CreateCommonBufferFromMdl), - ), - ); -} -pub type DMA_OPERATIONS = _DMA_OPERATIONS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IOMMU_DMA_DOMAIN { - _unused: [u8; 0], -} -pub type IOMMU_DMA_DOMAIN = _IOMMU_DMA_DOMAIN; -pub type PIOMMU_DMA_DOMAIN = *mut _IOMMU_DMA_DOMAIN; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IOMMU_DMA_PASID_DEVICE { - _unused: [u8; 0], -} -pub type IOMMU_DMA_PASID_DEVICE = _IOMMU_DMA_PASID_DEVICE; -pub type PIOMMU_DMA_PASID_DEVICE = *mut _IOMMU_DMA_PASID_DEVICE; -pub mod _FAULT_INFORMATION_ARCH { - pub type Type = ::core::ffi::c_int; - pub const FaultInformationInvalid: Type = 0; - pub const FaultInformationArm64: Type = 1; - pub const FaultInformationX64: Type = 2; -} -pub use self::_FAULT_INFORMATION_ARCH::Type as FAULT_INFORMATION_ARCH; -pub type PFAULT_INFORMATION_ARCH = *mut _FAULT_INFORMATION_ARCH::Type; -pub mod _FAULT_INFORMATION_ARM64_TYPE { - pub type Type = ::core::ffi::c_int; - pub const UnsupportedUpstreamTransaction: Type = 0; - pub const AddressSizeFault: Type = 1; - pub const TlbMatchConflict: Type = 2; - pub const ExternalFault: Type = 3; - pub const PermissionFault: Type = 4; - pub const AccessFlagFault: Type = 5; - pub const TranslationFault: Type = 6; - pub const MaxFaultType: Type = 7; -} -pub use self::_FAULT_INFORMATION_ARM64_TYPE::Type as FAULT_INFORMATION_ARM64_TYPE; -pub type PFAULT_INFORMATION_ARM64_TYPE = *mut _FAULT_INFORMATION_ARM64_TYPE::Type; -pub use self::_FAULT_INFORMATION_ARM64_TYPE::Type as FAULT_INFORMATION_X64_TYPE; -pub type PFAULT_INFORMATION_X64_TYPE = *mut _FAULT_INFORMATION_ARM64_TYPE::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FAULT_INFORMATION_X64_FLAGS { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__FAULT_INFORMATION_X64_FLAGS() { - assert_eq!( - ::core::mem::size_of::<_FAULT_INFORMATION_X64_FLAGS>(), - 4usize, - concat!("Size of: ", stringify!(_FAULT_INFORMATION_X64_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_FAULT_INFORMATION_X64_FLAGS>(), - 4usize, - concat!("Alignment of ", stringify!(_FAULT_INFORMATION_X64_FLAGS)), - ); -} -impl _FAULT_INFORMATION_X64_FLAGS { - #[inline] - pub fn FaultAddressValid(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_FaultAddressValid(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 31u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - FaultAddressValid: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let FaultAddressValid: u32 = unsafe { - ::core::mem::transmute(FaultAddressValid) - }; - FaultAddressValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 31u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type FAULT_INFORMATION_X64_FLAGS = _FAULT_INFORMATION_X64_FLAGS; -pub type PFAULT_INFORMATION_X64_FLAGS = *mut _FAULT_INFORMATION_X64_FLAGS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FAULT_INFORMATION_ARM64_FLAGS { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__FAULT_INFORMATION_ARM64_FLAGS() { - assert_eq!( - ::core::mem::size_of::<_FAULT_INFORMATION_ARM64_FLAGS>(), - 4usize, - concat!("Size of: ", stringify!(_FAULT_INFORMATION_ARM64_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_FAULT_INFORMATION_ARM64_FLAGS>(), - 4usize, - concat!("Alignment of ", stringify!(_FAULT_INFORMATION_ARM64_FLAGS)), - ); -} -impl _FAULT_INFORMATION_ARM64_FLAGS { - #[inline] - pub fn WriteNotRead(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_WriteNotRead(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn InstructionNotData(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_InstructionNotData(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Privileged(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_Privileged(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn FaultAddressValid(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_FaultAddressValid(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 28u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - WriteNotRead: ULONG, - InstructionNotData: ULONG, - Privileged: ULONG, - FaultAddressValid: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let WriteNotRead: u32 = unsafe { - ::core::mem::transmute(WriteNotRead) - }; - WriteNotRead as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let InstructionNotData: u32 = unsafe { - ::core::mem::transmute(InstructionNotData) - }; - InstructionNotData as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Privileged: u32 = unsafe { ::core::mem::transmute(Privileged) }; - Privileged as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let FaultAddressValid: u32 = unsafe { - ::core::mem::transmute(FaultAddressValid) - }; - FaultAddressValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 28u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type FAULT_INFORMATION_ARM64_FLAGS = _FAULT_INFORMATION_ARM64_FLAGS; -pub type PFAULT_INFORMATION_ARM64_FLAGS = *mut _FAULT_INFORMATION_ARM64_FLAGS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FAULT_INFORMATION_X64 { - pub DomainHandle: PVOID, - pub FaultAddress: PVOID, - pub Flags: FAULT_INFORMATION_X64_FLAGS, - pub Type: FAULT_INFORMATION_X64_TYPE, - pub IommuBaseAddress: ULONG64, - pub PciSegment: ULONG, -} -#[test] -fn bindgen_test_layout__FAULT_INFORMATION_X64() { - const UNINIT: ::core::mem::MaybeUninit<_FAULT_INFORMATION_X64> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FAULT_INFORMATION_X64>(), - 40usize, - concat!("Size of: ", stringify!(_FAULT_INFORMATION_X64)), - ); - assert_eq!( - ::core::mem::align_of::<_FAULT_INFORMATION_X64>(), - 8usize, - concat!("Alignment of ", stringify!(_FAULT_INFORMATION_X64)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DomainHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION_X64), - "::", - stringify!(DomainHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FaultAddress) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION_X64), - "::", - stringify!(FaultAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION_X64), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION_X64), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IommuBaseAddress) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION_X64), - "::", - stringify!(IommuBaseAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PciSegment) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION_X64), - "::", - stringify!(PciSegment), - ), - ); -} -impl Default for _FAULT_INFORMATION_X64 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FAULT_INFORMATION_X64 = _FAULT_INFORMATION_X64; -pub type PFAULT_INFORMATION_X64 = *mut _FAULT_INFORMATION_X64; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FAULT_INFORMATION_ARM64 { - pub DomainHandle: PVOID, - pub FaultAddress: PVOID, - pub PhysicalDeviceObject: PDEVICE_OBJECT, - pub InputMappingId: ULONG, - pub Flags: FAULT_INFORMATION_ARM64_FLAGS, - pub Type: FAULT_INFORMATION_ARM64_TYPE, - pub IommuBaseAddress: ULONG64, -} -#[test] -fn bindgen_test_layout__FAULT_INFORMATION_ARM64() { - const UNINIT: ::core::mem::MaybeUninit<_FAULT_INFORMATION_ARM64> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FAULT_INFORMATION_ARM64>(), - 48usize, - concat!("Size of: ", stringify!(_FAULT_INFORMATION_ARM64)), - ); - assert_eq!( - ::core::mem::align_of::<_FAULT_INFORMATION_ARM64>(), - 8usize, - concat!("Alignment of ", stringify!(_FAULT_INFORMATION_ARM64)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DomainHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION_ARM64), - "::", - stringify!(DomainHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FaultAddress) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION_ARM64), - "::", - stringify!(FaultAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PhysicalDeviceObject) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION_ARM64), - "::", - stringify!(PhysicalDeviceObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InputMappingId) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION_ARM64), - "::", - stringify!(InputMappingId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION_ARM64), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION_ARM64), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IommuBaseAddress) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION_ARM64), - "::", - stringify!(IommuBaseAddress), - ), - ); -} -impl Default for _FAULT_INFORMATION_ARM64 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FAULT_INFORMATION_ARM64 = _FAULT_INFORMATION_ARM64; -pub type PFAULT_INFORMATION_ARM64 = *mut _FAULT_INFORMATION_ARM64; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FAULT_INFORMATION { - pub Type: FAULT_INFORMATION_ARCH, - pub IsStage1: BOOLEAN, - pub __bindgen_anon_1: _FAULT_INFORMATION__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FAULT_INFORMATION__bindgen_ty_1 { - pub Arm64: FAULT_INFORMATION_ARM64, - pub X64: FAULT_INFORMATION_X64, -} -#[test] -fn bindgen_test_layout__FAULT_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_FAULT_INFORMATION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FAULT_INFORMATION__bindgen_ty_1>(), - 48usize, - concat!("Size of: ", stringify!(_FAULT_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FAULT_INFORMATION__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_FAULT_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Arm64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION__bindgen_ty_1), - "::", - stringify!(Arm64), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION__bindgen_ty_1), - "::", - stringify!(X64), - ), - ); -} -impl Default for _FAULT_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FAULT_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FAULT_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FAULT_INFORMATION>(), - 56usize, - concat!("Size of: ", stringify!(_FAULT_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FAULT_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FAULT_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsStage1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FAULT_INFORMATION), - "::", - stringify!(IsStage1), - ), - ); -} -impl Default for _FAULT_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FAULT_INFORMATION = _FAULT_INFORMATION; -pub type PFAULT_INFORMATION = *mut _FAULT_INFORMATION; -pub mod _DOMAIN_CONFIGURATION_ARCH { - pub type Type = ::core::ffi::c_int; - pub const DomainConfigurationArm64: Type = 0; - pub const DomainConfigurationX64: Type = 1; - pub const DomainConfigurationInvalid: Type = 2; -} -pub use self::_DOMAIN_CONFIGURATION_ARCH::Type as DOMAIN_CONFIGURATION_ARCH; -pub type PDOMAIN_CONFIGURATION_ARCH = *mut _DOMAIN_CONFIGURATION_ARCH::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DOMAIN_CONFIGURATION_ARM64 { - pub Ttbr0: PHYSICAL_ADDRESS, - pub Ttbr1: PHYSICAL_ADDRESS, - pub Mair0: ULONG, - pub Mair1: ULONG, - pub InputSize0: UCHAR, - pub InputSize1: UCHAR, - pub CoherentTableWalks: BOOLEAN, - pub TranslationEnabled: BOOLEAN, -} -#[test] -fn bindgen_test_layout__DOMAIN_CONFIGURATION_ARM64() { - const UNINIT: ::core::mem::MaybeUninit<_DOMAIN_CONFIGURATION_ARM64> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DOMAIN_CONFIGURATION_ARM64>(), - 32usize, - concat!("Size of: ", stringify!(_DOMAIN_CONFIGURATION_ARM64)), - ); - assert_eq!( - ::core::mem::align_of::<_DOMAIN_CONFIGURATION_ARM64>(), - 8usize, - concat!("Alignment of ", stringify!(_DOMAIN_CONFIGURATION_ARM64)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ttbr0) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DOMAIN_CONFIGURATION_ARM64), - "::", - stringify!(Ttbr0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ttbr1) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DOMAIN_CONFIGURATION_ARM64), - "::", - stringify!(Ttbr1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mair0) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DOMAIN_CONFIGURATION_ARM64), - "::", - stringify!(Mair0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mair1) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_DOMAIN_CONFIGURATION_ARM64), - "::", - stringify!(Mair1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InputSize0) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DOMAIN_CONFIGURATION_ARM64), - "::", - stringify!(InputSize0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InputSize1) as usize - ptr as usize }, - 25usize, - concat!( - "Offset of field: ", - stringify!(_DOMAIN_CONFIGURATION_ARM64), - "::", - stringify!(InputSize1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CoherentTableWalks) as usize - ptr as usize - }, - 26usize, - concat!( - "Offset of field: ", - stringify!(_DOMAIN_CONFIGURATION_ARM64), - "::", - stringify!(CoherentTableWalks), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TranslationEnabled) as usize - ptr as usize - }, - 27usize, - concat!( - "Offset of field: ", - stringify!(_DOMAIN_CONFIGURATION_ARM64), - "::", - stringify!(TranslationEnabled), - ), - ); -} -impl Default for _DOMAIN_CONFIGURATION_ARM64 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DOMAIN_CONFIGURATION_ARM64 = _DOMAIN_CONFIGURATION_ARM64; -pub type PDOMAIN_CONFIGURATION_ARM64 = *mut _DOMAIN_CONFIGURATION_ARM64; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DOMAIN_CONFIGURATION_X64 { - pub FirstLevelPageTableRoot: PHYSICAL_ADDRESS, - pub TranslationEnabled: BOOLEAN, -} -#[test] -fn bindgen_test_layout__DOMAIN_CONFIGURATION_X64() { - const UNINIT: ::core::mem::MaybeUninit<_DOMAIN_CONFIGURATION_X64> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DOMAIN_CONFIGURATION_X64>(), - 16usize, - concat!("Size of: ", stringify!(_DOMAIN_CONFIGURATION_X64)), - ); - assert_eq!( - ::core::mem::align_of::<_DOMAIN_CONFIGURATION_X64>(), - 8usize, - concat!("Alignment of ", stringify!(_DOMAIN_CONFIGURATION_X64)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FirstLevelPageTableRoot) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DOMAIN_CONFIGURATION_X64), - "::", - stringify!(FirstLevelPageTableRoot), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TranslationEnabled) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DOMAIN_CONFIGURATION_X64), - "::", - stringify!(TranslationEnabled), - ), - ); -} -impl Default for _DOMAIN_CONFIGURATION_X64 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DOMAIN_CONFIGURATION_X64 = _DOMAIN_CONFIGURATION_X64; -pub type PDOMAIN_CONFIGURATION_X64 = *mut _DOMAIN_CONFIGURATION_X64; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DOMAIN_CONFIGURATION { - pub Type: DOMAIN_CONFIGURATION_ARCH, - pub __bindgen_anon_1: _DOMAIN_CONFIGURATION__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DOMAIN_CONFIGURATION__bindgen_ty_1 { - pub Arm64: DOMAIN_CONFIGURATION_ARM64, - pub X64: DOMAIN_CONFIGURATION_X64, -} -#[test] -fn bindgen_test_layout__DOMAIN_CONFIGURATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_DOMAIN_CONFIGURATION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DOMAIN_CONFIGURATION__bindgen_ty_1>(), - 32usize, - concat!("Size of: ", stringify!(_DOMAIN_CONFIGURATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_DOMAIN_CONFIGURATION__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_DOMAIN_CONFIGURATION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Arm64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DOMAIN_CONFIGURATION__bindgen_ty_1), - "::", - stringify!(Arm64), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DOMAIN_CONFIGURATION__bindgen_ty_1), - "::", - stringify!(X64), - ), - ); -} -impl Default for _DOMAIN_CONFIGURATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DOMAIN_CONFIGURATION() { - const UNINIT: ::core::mem::MaybeUninit<_DOMAIN_CONFIGURATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DOMAIN_CONFIGURATION>(), - 40usize, - concat!("Size of: ", stringify!(_DOMAIN_CONFIGURATION)), - ); - assert_eq!( - ::core::mem::align_of::<_DOMAIN_CONFIGURATION>(), - 8usize, - concat!("Alignment of ", stringify!(_DOMAIN_CONFIGURATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DOMAIN_CONFIGURATION), - "::", - stringify!(Type), - ), - ); -} -impl Default for _DOMAIN_CONFIGURATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DOMAIN_CONFIGURATION = _DOMAIN_CONFIGURATION; -pub type PDOMAIN_CONFIGURATION = *mut _DOMAIN_CONFIGURATION; -pub type IOMMU_DEVICE_FAULT_HANDLER = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, FaultInformation: PFAULT_INFORMATION), ->; -pub type PIOMMU_DEVICE_FAULT_HANDLER = IOMMU_DEVICE_FAULT_HANDLER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DEVICE_FAULT_CONFIGURATION { - pub FaultHandler: PIOMMU_DEVICE_FAULT_HANDLER, - pub FaultContext: PVOID, -} -#[test] -fn bindgen_test_layout__DEVICE_FAULT_CONFIGURATION() { - const UNINIT: ::core::mem::MaybeUninit<_DEVICE_FAULT_CONFIGURATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEVICE_FAULT_CONFIGURATION>(), - 16usize, - concat!("Size of: ", stringify!(_DEVICE_FAULT_CONFIGURATION)), - ); - assert_eq!( - ::core::mem::align_of::<_DEVICE_FAULT_CONFIGURATION>(), - 8usize, - concat!("Alignment of ", stringify!(_DEVICE_FAULT_CONFIGURATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FaultHandler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_FAULT_CONFIGURATION), - "::", - stringify!(FaultHandler), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FaultContext) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DEVICE_FAULT_CONFIGURATION), - "::", - stringify!(FaultContext), - ), - ); -} -impl Default for _DEVICE_FAULT_CONFIGURATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEVICE_FAULT_CONFIGURATION = _DEVICE_FAULT_CONFIGURATION; -pub type PDEVICE_FAULT_CONFIGURATION = *mut _DEVICE_FAULT_CONFIGURATION; -pub type IOMMU_DMA_LOGICAL_ADDRESS = ULONGLONG; -pub type PIOMMU_DMA_LOGICAL_ADDRESS = *mut ULONGLONG; -pub mod _IOMMU_DMA_DOMAIN_TYPE { - pub type Type = ::core::ffi::c_int; - pub const DomainTypeTranslate: Type = 0; - pub const DomainTypePassThrough: Type = 1; - pub const DomainTypeUnmanaged: Type = 2; - pub const DomainTypeTranslateS1: Type = 3; - pub const DomainTypeMax: Type = 4; -} -pub use self::_IOMMU_DMA_DOMAIN_TYPE::Type as IOMMU_DMA_DOMAIN_TYPE; -pub type PIOMMU_DMA_DOMAIN_TYPE = *mut _IOMMU_DMA_DOMAIN_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IOMMU_DMA_DOMAIN_CREATION_FLAGS { - pub __bindgen_anon_1: _IOMMU_DMA_DOMAIN_CREATION_FLAGS__bindgen_ty_1, - pub AsUlonglong: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IOMMU_DMA_DOMAIN_CREATION_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u64; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__IOMMU_DMA_DOMAIN_CREATION_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_IOMMU_DMA_DOMAIN_CREATION_FLAGS__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_IOMMU_DMA_DOMAIN_CREATION_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_DMA_DOMAIN_CREATION_FLAGS__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IOMMU_DMA_DOMAIN_CREATION_FLAGS__bindgen_ty_1), - ), - ); -} -impl _IOMMU_DMA_DOMAIN_CREATION_FLAGS__bindgen_ty_1 { - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 64u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 64u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1(Reserved: ULONGLONG) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 64u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__IOMMU_DMA_DOMAIN_CREATION_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_IOMMU_DMA_DOMAIN_CREATION_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_DMA_DOMAIN_CREATION_FLAGS>(), - 8usize, - concat!("Size of: ", stringify!(_IOMMU_DMA_DOMAIN_CREATION_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_DMA_DOMAIN_CREATION_FLAGS>(), - 8usize, - concat!("Alignment of ", stringify!(_IOMMU_DMA_DOMAIN_CREATION_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUlonglong) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_DOMAIN_CREATION_FLAGS), - "::", - stringify!(AsUlonglong), - ), - ); -} -impl Default for _IOMMU_DMA_DOMAIN_CREATION_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IOMMU_DMA_DOMAIN_CREATION_FLAGS = _IOMMU_DMA_DOMAIN_CREATION_FLAGS; -pub type PIOMMU_DMA_DOMAIN_CREATION_FLAGS = *mut _IOMMU_DMA_DOMAIN_CREATION_FLAGS; -pub mod _IOMMU_DEVICE_CREATION_CONFIGURATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const IommuDeviceCreationConfigTypeNone: Type = 0; - pub const IommuDeviceCreationConfigTypeAcpi: Type = 1; - pub const IommuDeviceCreationConfigTypeDeviceId: Type = 2; - pub const IommuDeviceCreationConfigTypePasid: Type = 3; - pub const IommuDeviceCreationConfigTypeMax: Type = 4; -} -pub use self::_IOMMU_DEVICE_CREATION_CONFIGURATION_TYPE::Type as IOMMU_DEVICE_CREATION_CONFIGURATION_TYPE; -pub type PIOMMU_DEVICE_CREATION_CONFIGURATION_TYPE = *mut _IOMMU_DEVICE_CREATION_CONFIGURATION_TYPE::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI { - pub InputMappingBase: UINT32, - pub MappingsCount: UINT32, -} -#[test] -fn bindgen_test_layout__IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI() { - const UNINIT: ::core::mem::MaybeUninit<_IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI>(), - 8usize, - concat!("Size of: ", stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI>(), - 4usize, - concat!("Alignment of ", stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InputMappingBase) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI), - "::", - stringify!(InputMappingBase), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MappingsCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI), - "::", - stringify!(MappingsCount), - ), - ); -} -pub type IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI = _IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI; -pub type PIOMMU_DEVICE_CREATION_CONFIGURATION_ACPI = *mut _IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI; -pub mod _IOMMU_PASID_CONFIGURATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const PasidConfigTypeDefaultPasidOnly: Type = 0; - pub const PasidConfigTypePasidTaggedDma: Type = 1; - pub const PasidConfigTypeMax: Type = 2; -} -pub use self::_IOMMU_PASID_CONFIGURATION_TYPE::Type as IOMMU_PASID_CONFIGURATION_TYPE; -pub type PIOMMU_PASID_CONFIGURATION_TYPE = *mut _IOMMU_PASID_CONFIGURATION_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IOMMU_DEVICE_CREATION_CONFIGURATION_PASID { - pub ConfigType: IOMMU_PASID_CONFIGURATION_TYPE, - pub SuppressPasidFaults: BOOLEAN, -} -#[test] -fn bindgen_test_layout__IOMMU_DEVICE_CREATION_CONFIGURATION_PASID() { - const UNINIT: ::core::mem::MaybeUninit<_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID>(), - 8usize, - concat!("Size of: ", stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID>(), - 4usize, - concat!("Alignment of ", stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ConfigType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID), - "::", - stringify!(ConfigType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SuppressPasidFaults) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID), - "::", - stringify!(SuppressPasidFaults), - ), - ); -} -impl Default for _IOMMU_DEVICE_CREATION_CONFIGURATION_PASID { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IOMMU_DEVICE_CREATION_CONFIGURATION_PASID = _IOMMU_DEVICE_CREATION_CONFIGURATION_PASID; -pub type PIOMMU_DEVICE_CREATION_CONFIGURATION_PASID = *mut _IOMMU_DEVICE_CREATION_CONFIGURATION_PASID; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IOMMU_DEVICE_CREATION_CONFIGURATION { - pub NextConfiguration: LIST_ENTRY, - pub ConfigType: IOMMU_DEVICE_CREATION_CONFIGURATION_TYPE, - pub __bindgen_anon_1: _IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1 { - pub Acpi: IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI, - pub DeviceId: PVOID, - pub Pasid: IOMMU_DEVICE_CREATION_CONFIGURATION_PASID, -} -#[test] -fn bindgen_test_layout__IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Acpi) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1), - "::", - stringify!(Acpi), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1), - "::", - stringify!(DeviceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Pasid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1), - "::", - stringify!(Pasid), - ), - ); -} -impl Default for _IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IOMMU_DEVICE_CREATION_CONFIGURATION() { - const UNINIT: ::core::mem::MaybeUninit<_IOMMU_DEVICE_CREATION_CONFIGURATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_DEVICE_CREATION_CONFIGURATION>(), - 32usize, - concat!("Size of: ", stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_DEVICE_CREATION_CONFIGURATION>(), - 8usize, - concat!("Alignment of ", stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NextConfiguration) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION), - "::", - stringify!(NextConfiguration), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ConfigType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION), - "::", - stringify!(ConfigType), - ), - ); -} -impl Default for _IOMMU_DEVICE_CREATION_CONFIGURATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IOMMU_DEVICE_CREATION_CONFIGURATION = _IOMMU_DEVICE_CREATION_CONFIGURATION; -pub type PIOMMU_DEVICE_CREATION_CONFIGURATION = *mut _IOMMU_DEVICE_CREATION_CONFIGURATION; -pub mod _IOMMU_MAP_PHYSICAL_ADDRESS_TYPE { - pub type Type = ::core::ffi::c_int; - pub const MapPhysicalAddressTypeMdl: Type = 0; - pub const MapPhysicalAddressTypeContiguousRange: Type = 1; - pub const MapPhysicalAddressTypePfn: Type = 2; - pub const MapPhysicalAddressTypeMax: Type = 3; -} -pub use self::_IOMMU_MAP_PHYSICAL_ADDRESS_TYPE::Type as IOMMU_MAP_PHYSICAL_ADDRESS_TYPE; -pub type PIOMMU_MAP_PHYSICAL_ADDRESS_TYPE = *mut _IOMMU_MAP_PHYSICAL_ADDRESS_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IOMMU_MAP_PHYSICAL_ADDRESS { - pub MapType: IOMMU_MAP_PHYSICAL_ADDRESS_TYPE, - pub __bindgen_anon_1: _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1 { - pub Mdl: _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_1, - pub ContiguousRange: _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_2, - pub PfnArray: _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_3, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_1 { - pub Mdl: PMDL, -} -#[test] -fn bindgen_test_layout__IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mdl) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Mdl), - ), - ); -} -impl Default for _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_2 { - pub Base: PHYSICAL_ADDRESS, - pub Size: SIZE_T, -} -#[test] -fn bindgen_test_layout__IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_2, - >(), - 16usize, - concat!( - "Size of: ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_2, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Base) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Base), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Size), - ), - ); -} -impl Default for _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_3 { - pub PageFrame: PPFN_NUMBER, - pub NumberOfPages: SIZE_T, -} -#[test] -fn bindgen_test_layout__IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_3, - >(), - 16usize, - concat!( - "Size of: ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_3, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PageFrame) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(PageFrame), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfPages) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(NumberOfPages), - ), - ); -} -impl Default for _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mdl) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1), - "::", - stringify!(Mdl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContiguousRange) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1), - "::", - stringify!(ContiguousRange), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PfnArray) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1), - "::", - stringify!(PfnArray), - ), - ); -} -impl Default for _IOMMU_MAP_PHYSICAL_ADDRESS__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IOMMU_MAP_PHYSICAL_ADDRESS() { - const UNINIT: ::core::mem::MaybeUninit<_IOMMU_MAP_PHYSICAL_ADDRESS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_MAP_PHYSICAL_ADDRESS>(), - 24usize, - concat!("Size of: ", stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_MAP_PHYSICAL_ADDRESS>(), - 8usize, - concat!("Alignment of ", stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MapType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_MAP_PHYSICAL_ADDRESS), - "::", - stringify!(MapType), - ), - ); -} -impl Default for _IOMMU_MAP_PHYSICAL_ADDRESS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IOMMU_MAP_PHYSICAL_ADDRESS = _IOMMU_MAP_PHYSICAL_ADDRESS; -pub type PIOMMU_MAP_PHYSICAL_ADDRESS = *mut _IOMMU_MAP_PHYSICAL_ADDRESS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IOMMU_DMA_RESERVED_REGION { - pub RegionNext: *mut _IOMMU_DMA_RESERVED_REGION, - pub Base: IOMMU_DMA_LOGICAL_ADDRESS, - pub NumberOfPages: SIZE_T, - pub ShouldMap: BOOLEAN, -} -#[test] -fn bindgen_test_layout__IOMMU_DMA_RESERVED_REGION() { - const UNINIT: ::core::mem::MaybeUninit<_IOMMU_DMA_RESERVED_REGION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_DMA_RESERVED_REGION>(), - 32usize, - concat!("Size of: ", stringify!(_IOMMU_DMA_RESERVED_REGION)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_DMA_RESERVED_REGION>(), - 8usize, - concat!("Alignment of ", stringify!(_IOMMU_DMA_RESERVED_REGION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RegionNext) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_RESERVED_REGION), - "::", - stringify!(RegionNext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Base) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_RESERVED_REGION), - "::", - stringify!(Base), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfPages) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_RESERVED_REGION), - "::", - stringify!(NumberOfPages), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShouldMap) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_RESERVED_REGION), - "::", - stringify!(ShouldMap), - ), - ); -} -impl Default for _IOMMU_DMA_RESERVED_REGION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IOMMU_DMA_RESERVED_REGION = _IOMMU_DMA_RESERVED_REGION; -pub type PIOMMU_DMA_RESERVED_REGION = *mut _IOMMU_DMA_RESERVED_REGION; -pub mod _IOMMU_DMA_LOGICAL_ALLOCATOR_TYPE { - pub type Type = ::core::ffi::c_int; - pub const IommuDmaLogicalAllocatorNone: Type = 0; - pub const IommuDmaLogicalAllocatorBuddy: Type = 1; - pub const IommuDmaLogicalAllocatorMax: Type = 2; -} -pub use self::_IOMMU_DMA_LOGICAL_ALLOCATOR_TYPE::Type as IOMMU_DMA_LOGICAL_ALLOCATOR_TYPE; -pub type PIOMMU_DMA_LOGICAL_ALLOCATOR_TYPE = *mut _IOMMU_DMA_LOGICAL_ALLOCATOR_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG { - pub LogicalAllocatorType: IOMMU_DMA_LOGICAL_ALLOCATOR_TYPE, - pub __bindgen_anon_1: _IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1 { - pub BuddyAllocatorConfig: _IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1__bindgen_ty_1 { - pub AddressWidth: ULONG, -} -#[test] -fn bindgen_test_layout__IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AddressWidth) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AddressWidth), - ), - ); -} -#[test] -fn bindgen_test_layout__IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BuddyAllocatorConfig) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1), - "::", - stringify!(BuddyAllocatorConfig), - ), - ); -} -impl Default for _IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG>(), - 8usize, - concat!("Size of: ", stringify!(_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG>(), - 4usize, - concat!("Alignment of ", stringify!(_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogicalAllocatorType) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG), - "::", - stringify!(LogicalAllocatorType), - ), - ); -} -impl Default for _IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG = _IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG; -pub type PIOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG = *mut _IOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IOMMU_DMA_LOGICAL_ADDRESS_TOKEN { - pub LogicalAddressBase: IOMMU_DMA_LOGICAL_ADDRESS, - pub Size: SIZE_T, -} -#[test] -fn bindgen_test_layout__IOMMU_DMA_LOGICAL_ADDRESS_TOKEN() { - const UNINIT: ::core::mem::MaybeUninit<_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN>(), - 16usize, - concat!("Size of: ", stringify!(_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN>(), - 8usize, - concat!("Alignment of ", stringify!(_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogicalAddressBase) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN), - "::", - stringify!(LogicalAddressBase), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN), - "::", - stringify!(Size), - ), - ); -} -pub type IOMMU_DMA_LOGICAL_ADDRESS_TOKEN = _IOMMU_DMA_LOGICAL_ADDRESS_TOKEN; -pub type PIOMMU_DMA_LOGICAL_ADDRESS_TOKEN = *mut _IOMMU_DMA_LOGICAL_ADDRESS_TOKEN; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT { - pub OwningToken: PIOMMU_DMA_LOGICAL_ADDRESS_TOKEN, - pub Offset: SIZE_T, - pub Size: SIZE_T, -} -#[test] -fn bindgen_test_layout__IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT() { - const UNINIT: ::core::mem::MaybeUninit< - _IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT>(), - 24usize, - concat!("Size of: ", stringify!(_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OwningToken) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT), - "::", - stringify!(OwningToken), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT), - "::", - stringify!(Size), - ), - ); -} -impl Default for _IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT = _IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT; -pub type PIOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT = *mut _IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IOMMU_INTERFACE_STATE_CHANGE_FIELDS { - pub __bindgen_anon_1: _IOMMU_INTERFACE_STATE_CHANGE_FIELDS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IOMMU_INTERFACE_STATE_CHANGE_FIELDS__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__IOMMU_INTERFACE_STATE_CHANGE_FIELDS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_IOMMU_INTERFACE_STATE_CHANGE_FIELDS__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_IOMMU_INTERFACE_STATE_CHANGE_FIELDS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_INTERFACE_STATE_CHANGE_FIELDS__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IOMMU_INTERFACE_STATE_CHANGE_FIELDS__bindgen_ty_1), - ), - ); -} -impl _IOMMU_INTERFACE_STATE_CHANGE_FIELDS__bindgen_ty_1 { - #[inline] - pub fn AvailableDomainTypes(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_AvailableDomainTypes(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 31u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - AvailableDomainTypes: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let AvailableDomainTypes: u32 = unsafe { - ::core::mem::transmute(AvailableDomainTypes) - }; - AvailableDomainTypes as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 31u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__IOMMU_INTERFACE_STATE_CHANGE_FIELDS() { - const UNINIT: ::core::mem::MaybeUninit<_IOMMU_INTERFACE_STATE_CHANGE_FIELDS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_INTERFACE_STATE_CHANGE_FIELDS>(), - 4usize, - concat!("Size of: ", stringify!(_IOMMU_INTERFACE_STATE_CHANGE_FIELDS)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_INTERFACE_STATE_CHANGE_FIELDS>(), - 4usize, - concat!("Alignment of ", stringify!(_IOMMU_INTERFACE_STATE_CHANGE_FIELDS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_INTERFACE_STATE_CHANGE_FIELDS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _IOMMU_INTERFACE_STATE_CHANGE_FIELDS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IOMMU_INTERFACE_STATE_CHANGE_FIELDS = _IOMMU_INTERFACE_STATE_CHANGE_FIELDS; -pub type PIOMMU_INTERFACE_STATE_CHANGE_FIELDS = *mut _IOMMU_INTERFACE_STATE_CHANGE_FIELDS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IOMMU_INTERFACE_STATE_CHANGE { - pub PresentFields: IOMMU_INTERFACE_STATE_CHANGE_FIELDS, - pub AvailableDomainTypes: ULONG, -} -#[test] -fn bindgen_test_layout__IOMMU_INTERFACE_STATE_CHANGE() { - const UNINIT: ::core::mem::MaybeUninit<_IOMMU_INTERFACE_STATE_CHANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_INTERFACE_STATE_CHANGE>(), - 8usize, - concat!("Size of: ", stringify!(_IOMMU_INTERFACE_STATE_CHANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_INTERFACE_STATE_CHANGE>(), - 4usize, - concat!("Alignment of ", stringify!(_IOMMU_INTERFACE_STATE_CHANGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PresentFields) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_INTERFACE_STATE_CHANGE), - "::", - stringify!(PresentFields), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AvailableDomainTypes) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_INTERFACE_STATE_CHANGE), - "::", - stringify!(AvailableDomainTypes), - ), - ); -} -impl Default for _IOMMU_INTERFACE_STATE_CHANGE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IOMMU_INTERFACE_STATE_CHANGE = _IOMMU_INTERFACE_STATE_CHANGE; -pub type PIOMMU_INTERFACE_STATE_CHANGE = *mut _IOMMU_INTERFACE_STATE_CHANGE; -pub type IOMMU_INTERFACE_STATE_CHANGE_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(StateChange: PIOMMU_INTERFACE_STATE_CHANGE, Context: PVOID), ->; -pub type PIOMMU_INTERFACE_STATE_CHANGE_CALLBACK = IOMMU_INTERFACE_STATE_CHANGE_CALLBACK; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IOMMU_DMA_DEVICE_INFORMATION { - pub DefaultPasidEnabled: BOOLEAN, - pub PasidTaggedDmaEnabled: BOOLEAN, - pub PasidFaultsSuppressed: BOOLEAN, -} -#[test] -fn bindgen_test_layout__IOMMU_DMA_DEVICE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_IOMMU_DMA_DEVICE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IOMMU_DMA_DEVICE_INFORMATION>(), - 3usize, - concat!("Size of: ", stringify!(_IOMMU_DMA_DEVICE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_IOMMU_DMA_DEVICE_INFORMATION>(), - 1usize, - concat!("Alignment of ", stringify!(_IOMMU_DMA_DEVICE_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DefaultPasidEnabled) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_DEVICE_INFORMATION), - "::", - stringify!(DefaultPasidEnabled), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PasidTaggedDmaEnabled) as usize - ptr as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_DEVICE_INFORMATION), - "::", - stringify!(PasidTaggedDmaEnabled), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PasidFaultsSuppressed) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_IOMMU_DMA_DEVICE_INFORMATION), - "::", - stringify!(PasidFaultsSuppressed), - ), - ); -} -pub type IOMMU_DMA_DEVICE_INFORMATION = _IOMMU_DMA_DEVICE_INFORMATION; -pub type PIOMMU_DMA_DEVICE_INFORMATION = *mut _IOMMU_DMA_DEVICE_INFORMATION; -pub type IOMMU_DOMAIN_CREATE = ::core::option::Option< - unsafe extern "C" fn( - OsManagedPageTable: BOOLEAN, - DomainOut: *mut PIOMMU_DMA_DOMAIN, - ) -> NTSTATUS, ->; -pub type PIOMMU_DOMAIN_CREATE = IOMMU_DOMAIN_CREATE; -pub type IOMMU_DOMAIN_DELETE = ::core::option::Option< - unsafe extern "C" fn(Domain: PIOMMU_DMA_DOMAIN) -> NTSTATUS, ->; -pub type PIOMMU_DOMAIN_DELETE = IOMMU_DOMAIN_DELETE; -pub type IOMMU_DOMAIN_ATTACH_DEVICE = ::core::option::Option< - unsafe extern "C" fn( - Domain: PIOMMU_DMA_DOMAIN, - PhysicalDeviceObject: PDEVICE_OBJECT, - InputMappingIdBase: ULONG, - MappingCount: ULONG, - ) -> NTSTATUS, ->; -pub type PIOMMU_DOMAIN_ATTACH_DEVICE = IOMMU_DOMAIN_ATTACH_DEVICE; -pub type IOMMU_DOMAIN_DETACH_DEVICE = ::core::option::Option< - unsafe extern "C" fn( - Domain: PIOMMU_DMA_DOMAIN, - PhysicalDeviceObject: PDEVICE_OBJECT, - InputMappingId: ULONG, - ) -> NTSTATUS, ->; -pub type PIOMMU_DOMAIN_DETACH_DEVICE = IOMMU_DOMAIN_DETACH_DEVICE; -pub type IOMMU_SET_DEVICE_FAULT_REPORTING = ::core::option::Option< - unsafe extern "C" fn( - PhysicalDeviceObject: PDEVICE_OBJECT, - InputMappingIdBase: ULONG, - Enable: BOOLEAN, - FaultConfig: PDEVICE_FAULT_CONFIGURATION, - ) -> NTSTATUS, ->; -pub type PIOMMU_SET_DEVICE_FAULT_REPORTING = IOMMU_SET_DEVICE_FAULT_REPORTING; -pub type IOMMU_DOMAIN_CONFIGURE = ::core::option::Option< - unsafe extern "C" fn( - Domain: PIOMMU_DMA_DOMAIN, - Configuration: PDOMAIN_CONFIGURATION, - ) -> NTSTATUS, ->; -pub type PIOMMU_DOMAIN_CONFIGURE = IOMMU_DOMAIN_CONFIGURE; -pub type IOMMU_FLUSH_DOMAIN = ::core::option::Option< - unsafe extern "C" fn(Domain: PIOMMU_DMA_DOMAIN) -> NTSTATUS, ->; -pub type PIOMMU_FLUSH_DOMAIN = IOMMU_FLUSH_DOMAIN; -pub type IOMMU_FLUSH_DOMAIN_VA_LIST = ::core::option::Option< - unsafe extern "C" fn( - Domain: PIOMMU_DMA_DOMAIN, - LastLevel: BOOLEAN, - Number: ULONG, - VaList: PVOID, - ) -> NTSTATUS, ->; -pub type PIOMMU_FLUSH_DOMAIN_VA_LIST = IOMMU_FLUSH_DOMAIN_VA_LIST; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _INPUT_MAPPING_ELEMENT { - pub InputMappingId: ULONG, -} -#[test] -fn bindgen_test_layout__INPUT_MAPPING_ELEMENT() { - const UNINIT: ::core::mem::MaybeUninit<_INPUT_MAPPING_ELEMENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_INPUT_MAPPING_ELEMENT>(), - 4usize, - concat!("Size of: ", stringify!(_INPUT_MAPPING_ELEMENT)), - ); - assert_eq!( - ::core::mem::align_of::<_INPUT_MAPPING_ELEMENT>(), - 4usize, - concat!("Alignment of ", stringify!(_INPUT_MAPPING_ELEMENT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InputMappingId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_INPUT_MAPPING_ELEMENT), - "::", - stringify!(InputMappingId), - ), - ); -} -pub type INPUT_MAPPING_ELEMENT = _INPUT_MAPPING_ELEMENT; -pub type PINPUT_MAPPING_ELEMENT = *mut _INPUT_MAPPING_ELEMENT; -pub type IOMMU_QUERY_INPUT_MAPPINGS = ::core::option::Option< - unsafe extern "C" fn( - PhysicalDeviceObject: PDEVICE_OBJECT, - Buffer: PINPUT_MAPPING_ELEMENT, - BufferLength: ULONG, - ReturnLength: PULONG, - ) -> NTSTATUS, ->; -pub type PIOMMU_QUERY_INPUT_MAPPINGS = IOMMU_QUERY_INPUT_MAPPINGS; -pub type IOMMU_MAP_LOGICAL_RANGE = ::core::option::Option< - unsafe extern "C" fn( - Domain: PIOMMU_DMA_DOMAIN, - Permissions: ULONG, - Mdl: PMDL, - LogicalAddress: ULONGLONG, - ) -> NTSTATUS, ->; -pub type PIOMMU_MAP_LOGICAL_RANGE = IOMMU_MAP_LOGICAL_RANGE; -pub type IOMMU_UNMAP_LOGICAL_RANGE = ::core::option::Option< - unsafe extern "C" fn( - Domain: PIOMMU_DMA_DOMAIN, - LogicalAddress: ULONGLONG, - NumberOfPages: ULONGLONG, - ) -> NTSTATUS, ->; -pub type PIOMMU_UNMAP_LOGICAL_RANGE = IOMMU_UNMAP_LOGICAL_RANGE; -pub type IOMMU_MAP_IDENTITY_RANGE = ::core::option::Option< - unsafe extern "C" fn( - Domain: PIOMMU_DMA_DOMAIN, - Permissions: ULONG, - Mdl: PMDL, - ) -> NTSTATUS, ->; -pub type PIOMMU_MAP_IDENTITY_RANGE = IOMMU_MAP_IDENTITY_RANGE; -pub type IOMMU_UNMAP_IDENTITY_RANGE = ::core::option::Option< - unsafe extern "C" fn(Domain: PIOMMU_DMA_DOMAIN, Mdl: PMDL) -> NTSTATUS, ->; -pub type PIOMMU_UNMAP_IDENTITY_RANGE = IOMMU_UNMAP_IDENTITY_RANGE; -pub type IOMMU_DOMAIN_CREATE_EX = ::core::option::Option< - unsafe extern "C" fn( - DomainType: IOMMU_DMA_DOMAIN_TYPE, - Flags: IOMMU_DMA_DOMAIN_CREATION_FLAGS, - LogicalAllocatorConfig: PIOMMU_DMA_LOGICAL_ALLOCATOR_CONFIG, - ReservedRegions: PIOMMU_DMA_RESERVED_REGION, - DomainOut: *mut PIOMMU_DMA_DOMAIN, - ) -> NTSTATUS, ->; -pub type PIOMMU_DOMAIN_CREATE_EX = IOMMU_DOMAIN_CREATE_EX; -pub type IOMMU_DOMAIN_ATTACH_DEVICE_EX = ::core::option::Option< - unsafe extern "C" fn( - Domain: PIOMMU_DMA_DOMAIN, - DmaDevice: PIOMMU_DMA_DEVICE, - ) -> NTSTATUS, ->; -pub type PIOMMU_DOMAIN_ATTACH_DEVICE_EX = IOMMU_DOMAIN_ATTACH_DEVICE_EX; -pub type IOMMU_DOMAIN_DETACH_DEVICE_EX = ::core::option::Option< - unsafe extern "C" fn(DmaDevice: PIOMMU_DMA_DEVICE) -> NTSTATUS, ->; -pub type PIOMMU_DOMAIN_DETACH_DEVICE_EX = IOMMU_DOMAIN_DETACH_DEVICE_EX; -pub type IOMMU_MAP_LOGICAL_RANGE_EX = ::core::option::Option< - unsafe extern "C" fn( - Domain: PIOMMU_DMA_DOMAIN, - Permissions: ULONG, - PhysicalAddressToMap: PIOMMU_MAP_PHYSICAL_ADDRESS, - ExplicitLogicalAddress: PIOMMU_DMA_LOGICAL_ADDRESS, - MinLogicalAddress: PIOMMU_DMA_LOGICAL_ADDRESS, - MaxLogicalAddress: PIOMMU_DMA_LOGICAL_ADDRESS, - LogicalAddressOut: PIOMMU_DMA_LOGICAL_ADDRESS, - ) -> NTSTATUS, ->; -pub type PIOMMU_MAP_LOGICAL_RANGE_EX = IOMMU_MAP_LOGICAL_RANGE_EX; -pub type IOMMU_MAP_IDENTITY_RANGE_EX = ::core::option::Option< - unsafe extern "C" fn( - Domain: PIOMMU_DMA_DOMAIN, - Permissions: ULONG, - PhysicalAddressToMap: PIOMMU_MAP_PHYSICAL_ADDRESS, - ) -> NTSTATUS, ->; -pub type PIOMMU_MAP_IDENTITY_RANGE_EX = IOMMU_MAP_IDENTITY_RANGE_EX; -pub type IOMMU_UNMAP_IDENTITY_RANGE_EX = ::core::option::Option< - unsafe extern "C" fn( - Domain: PIOMMU_DMA_DOMAIN, - MappedPhysicalAddress: PIOMMU_MAP_PHYSICAL_ADDRESS, - ) -> NTSTATUS, ->; -pub type PIOMMU_UNMAP_IDENTITY_RANGE_EX = IOMMU_UNMAP_IDENTITY_RANGE_EX; -pub type IOMMU_DEVICE_QUERY_DOMAIN_TYPES = ::core::option::Option< - unsafe extern "C" fn(DmaDevice: PIOMMU_DMA_DEVICE, AvailableDomains: PULONG), ->; -pub type PIOMMU_DEVICE_QUERY_DOMAIN_TYPES = IOMMU_DEVICE_QUERY_DOMAIN_TYPES; -pub type IOMMU_REGISTER_INTERFACE_STATE_CHANGE_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - StateChangeCallback: PIOMMU_INTERFACE_STATE_CHANGE_CALLBACK, - Context: PVOID, - DmaDevice: PIOMMU_DMA_DEVICE, - StateFields: PIOMMU_INTERFACE_STATE_CHANGE_FIELDS, - ) -> NTSTATUS, ->; -pub type PIOMMU_REGISTER_INTERFACE_STATE_CHANGE_CALLBACK = IOMMU_REGISTER_INTERFACE_STATE_CHANGE_CALLBACK; -pub type IOMMU_UNREGISTER_INTERFACE_STATE_CHANGE_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - StateChangeCallback: PIOMMU_INTERFACE_STATE_CHANGE_CALLBACK, - DmaDevice: PIOMMU_DMA_DEVICE, - ) -> NTSTATUS, ->; -pub type PIOMMU_UNREGISTER_INTERFACE_STATE_CHANGE_CALLBACK = IOMMU_UNREGISTER_INTERFACE_STATE_CHANGE_CALLBACK; -pub type IOMMU_RESERVE_LOGICAL_ADDRESS_RANGE = ::core::option::Option< - unsafe extern "C" fn( - Domain: PIOMMU_DMA_DOMAIN, - Size: SIZE_T, - ExplicitLogicalAddress: PIOMMU_DMA_LOGICAL_ADDRESS, - MinLogicalAddress: PIOMMU_DMA_LOGICAL_ADDRESS, - MaxLogicalAddress: PIOMMU_DMA_LOGICAL_ADDRESS, - LogicalAddressToken: *mut PIOMMU_DMA_LOGICAL_ADDRESS_TOKEN, - ) -> NTSTATUS, ->; -pub type PIOMMU_RESERVE_LOGICAL_ADDRESS_RANGE = IOMMU_RESERVE_LOGICAL_ADDRESS_RANGE; -pub type IOMMU_FREE_RESERVED_LOGICAL_ADDRESS_RANGE = ::core::option::Option< - unsafe extern "C" fn( - LogicalAddressToken: PIOMMU_DMA_LOGICAL_ADDRESS_TOKEN, - ) -> NTSTATUS, ->; -pub type PIOMMU_FREE_RESERVED_LOGICAL_ADDRESS_RANGE = IOMMU_FREE_RESERVED_LOGICAL_ADDRESS_RANGE; -pub type IOMMU_MAP_RESERVED_LOGICAL_RANGE = ::core::option::Option< - unsafe extern "C" fn( - LogicalAddressToken: PIOMMU_DMA_LOGICAL_ADDRESS_TOKEN, - Offset: SIZE_T, - Permissions: ULONG, - PhysicalAddressToMap: PIOMMU_MAP_PHYSICAL_ADDRESS, - MappedSegment: PIOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT, - ) -> NTSTATUS, ->; -pub type PIOMMU_MAP_RESERVED_LOGICAL_RANGE = IOMMU_MAP_RESERVED_LOGICAL_RANGE; -pub type IOMMU_UNMAP_RESERVED_LOGICAL_RANGE = ::core::option::Option< - unsafe extern "C" fn( - MappedSegment: PIOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT, - ) -> NTSTATUS, ->; -pub type PIOMMU_UNMAP_RESERVED_LOGICAL_RANGE = IOMMU_UNMAP_RESERVED_LOGICAL_RANGE; -pub type IOMMU_DEVICE_CREATE = ::core::option::Option< - unsafe extern "C" fn( - DeviceObject: PDEVICE_OBJECT, - DeviceConfig: PIOMMU_DEVICE_CREATION_CONFIGURATION, - DmaDeviceOut: *mut PIOMMU_DMA_DEVICE, - ) -> NTSTATUS, ->; -pub type PIOMMU_DEVICE_CREATE = IOMMU_DEVICE_CREATE; -pub type IOMMU_DEVICE_DELETE = ::core::option::Option< - unsafe extern "C" fn(DmaDevice: PIOMMU_DMA_DEVICE) -> NTSTATUS, ->; -pub type PIOMMU_DEVICE_DELETE = IOMMU_DEVICE_DELETE; -pub type IOMMU_SET_DEVICE_FAULT_REPORTING_EX = ::core::option::Option< - unsafe extern "C" fn( - DmaDevice: PIOMMU_DMA_DEVICE, - InputMappingIdBase: ULONG, - Enable: BOOLEAN, - FaultConfig: PDEVICE_FAULT_CONFIGURATION, - ) -> NTSTATUS, ->; -pub type PIOMMU_SET_DEVICE_FAULT_REPORTING_EX = IOMMU_SET_DEVICE_FAULT_REPORTING_EX; -pub type IOMMU_PASID_DEVICE_CREATE = ::core::option::Option< - unsafe extern "C" fn( - DmaDevice: PIOMMU_DMA_DEVICE, - PasidDeviceOut: *mut PIOMMU_DMA_PASID_DEVICE, - AsidOut: PULONG, - ) -> NTSTATUS, ->; -pub type PIOMMU_PASID_DEVICE_CREATE = IOMMU_PASID_DEVICE_CREATE; -pub type IOMMU_PASID_DEVICE_DELETE = ::core::option::Option< - unsafe extern "C" fn(PasidDevice: PIOMMU_DMA_PASID_DEVICE) -> NTSTATUS, ->; -pub type PIOMMU_PASID_DEVICE_DELETE = IOMMU_PASID_DEVICE_DELETE; -pub type IOMMU_DOMAIN_ATTACH_PASID_DEVICE = ::core::option::Option< - unsafe extern "C" fn( - Domain: PIOMMU_DMA_DOMAIN, - PasidDevice: PIOMMU_DMA_PASID_DEVICE, - ) -> NTSTATUS, ->; -pub type PIOMMU_DOMAIN_ATTACH_PASID_DEVICE = IOMMU_DOMAIN_ATTACH_PASID_DEVICE; -pub type IOMMU_DOMAIN_DETACH_PASID_DEVICE = ::core::option::Option< - unsafe extern "C" fn(PasidDevice: PIOMMU_DMA_PASID_DEVICE) -> NTSTATUS, ->; -pub type PIOMMU_DOMAIN_DETACH_PASID_DEVICE = IOMMU_DOMAIN_DETACH_PASID_DEVICE; -pub type IOMMU_DEVICE_QUERY_INFORMATION = ::core::option::Option< - unsafe extern "C" fn( - DmaDevice: PIOMMU_DMA_DEVICE, - Size: ULONG, - BytesWritten: PULONG, - Buffer: PIOMMU_DMA_DEVICE_INFORMATION, - ) -> NTSTATUS, ->; -pub type PIOMMU_DEVICE_QUERY_INFORMATION = IOMMU_DEVICE_QUERY_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DMA_IOMMU_INTERFACE { - pub Version: ULONG, - pub CreateDomain: PIOMMU_DOMAIN_CREATE, - pub DeleteDomain: PIOMMU_DOMAIN_DELETE, - pub AttachDevice: PIOMMU_DOMAIN_ATTACH_DEVICE, - pub DetachDevice: PIOMMU_DOMAIN_DETACH_DEVICE, - pub FlushDomain: PIOMMU_FLUSH_DOMAIN, - pub FlushDomainByVaList: PIOMMU_FLUSH_DOMAIN_VA_LIST, - pub QueryInputMappings: PIOMMU_QUERY_INPUT_MAPPINGS, - pub MapLogicalRange: PIOMMU_MAP_LOGICAL_RANGE, - pub UnmapLogicalRange: PIOMMU_UNMAP_LOGICAL_RANGE, - pub MapIdentityRange: PIOMMU_MAP_IDENTITY_RANGE, - pub UnmapIdentityRange: PIOMMU_UNMAP_IDENTITY_RANGE, - pub SetDeviceFaultReporting: PIOMMU_SET_DEVICE_FAULT_REPORTING, - pub ConfigureDomain: PIOMMU_DOMAIN_CONFIGURE, -} -#[test] -fn bindgen_test_layout__DMA_IOMMU_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_IOMMU_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_IOMMU_INTERFACE>(), - 112usize, - concat!("Size of: ", stringify!(_DMA_IOMMU_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_IOMMU_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_DMA_IOMMU_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateDomain) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(CreateDomain), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeleteDomain) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(DeleteDomain), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AttachDevice) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(AttachDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DetachDevice) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(DetachDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FlushDomain) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(FlushDomain), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FlushDomainByVaList) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(FlushDomainByVaList), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryInputMappings) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(QueryInputMappings), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MapLogicalRange) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(MapLogicalRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnmapLogicalRange) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(UnmapLogicalRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MapIdentityRange) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(MapIdentityRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnmapIdentityRange) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(UnmapIdentityRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetDeviceFaultReporting) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(SetDeviceFaultReporting), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ConfigureDomain) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE), - "::", - stringify!(ConfigureDomain), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DMA_IOMMU_INTERFACE_V1 { - pub CreateDomain: PIOMMU_DOMAIN_CREATE, - pub DeleteDomain: PIOMMU_DOMAIN_DELETE, - pub AttachDevice: PIOMMU_DOMAIN_ATTACH_DEVICE, - pub DetachDevice: PIOMMU_DOMAIN_DETACH_DEVICE, - pub FlushDomain: PIOMMU_FLUSH_DOMAIN, - pub FlushDomainByVaList: PIOMMU_FLUSH_DOMAIN_VA_LIST, - pub QueryInputMappings: PIOMMU_QUERY_INPUT_MAPPINGS, - pub MapLogicalRange: PIOMMU_MAP_LOGICAL_RANGE, - pub UnmapLogicalRange: PIOMMU_UNMAP_LOGICAL_RANGE, - pub MapIdentityRange: PIOMMU_MAP_IDENTITY_RANGE, - pub UnmapIdentityRange: PIOMMU_UNMAP_IDENTITY_RANGE, - pub SetDeviceFaultReporting: PIOMMU_SET_DEVICE_FAULT_REPORTING, - pub ConfigureDomain: PIOMMU_DOMAIN_CONFIGURE, -} -#[test] -fn bindgen_test_layout__DMA_IOMMU_INTERFACE_V1() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_IOMMU_INTERFACE_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_IOMMU_INTERFACE_V1>(), - 104usize, - concat!("Size of: ", stringify!(_DMA_IOMMU_INTERFACE_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_IOMMU_INTERFACE_V1>(), - 8usize, - concat!("Alignment of ", stringify!(_DMA_IOMMU_INTERFACE_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateDomain) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V1), - "::", - stringify!(CreateDomain), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeleteDomain) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V1), - "::", - stringify!(DeleteDomain), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AttachDevice) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V1), - "::", - stringify!(AttachDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DetachDevice) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V1), - "::", - stringify!(DetachDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FlushDomain) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V1), - "::", - stringify!(FlushDomain), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FlushDomainByVaList) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V1), - "::", - stringify!(FlushDomainByVaList), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryInputMappings) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V1), - "::", - stringify!(QueryInputMappings), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MapLogicalRange) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V1), - "::", - stringify!(MapLogicalRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnmapLogicalRange) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V1), - "::", - stringify!(UnmapLogicalRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MapIdentityRange) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V1), - "::", - stringify!(MapIdentityRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnmapIdentityRange) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V1), - "::", - stringify!(UnmapIdentityRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetDeviceFaultReporting) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V1), - "::", - stringify!(SetDeviceFaultReporting), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ConfigureDomain) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V1), - "::", - stringify!(ConfigureDomain), - ), - ); -} -pub type DMA_IOMMU_INTERFACE_V1 = _DMA_IOMMU_INTERFACE_V1; -pub type PDMA_IOMMU_INTERFACE_V1 = *mut _DMA_IOMMU_INTERFACE_V1; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DMA_IOMMU_INTERFACE_V2 { - pub CreateDomainEx: PIOMMU_DOMAIN_CREATE_EX, - pub DeleteDomain: PIOMMU_DOMAIN_DELETE, - pub AttachDeviceEx: PIOMMU_DOMAIN_ATTACH_DEVICE_EX, - pub DetachDeviceEx: PIOMMU_DOMAIN_DETACH_DEVICE_EX, - pub FlushDomain: PIOMMU_FLUSH_DOMAIN, - pub FlushDomainByVaList: PIOMMU_FLUSH_DOMAIN_VA_LIST, - pub QueryInputMappings: PIOMMU_QUERY_INPUT_MAPPINGS, - pub MapLogicalRangeEx: PIOMMU_MAP_LOGICAL_RANGE_EX, - pub UnmapLogicalRange: PIOMMU_UNMAP_LOGICAL_RANGE, - pub MapIdentityRangeEx: PIOMMU_MAP_IDENTITY_RANGE_EX, - pub UnmapIdentityRangeEx: PIOMMU_UNMAP_IDENTITY_RANGE_EX, - pub SetDeviceFaultReportingEx: PIOMMU_SET_DEVICE_FAULT_REPORTING_EX, - pub ConfigureDomain: PIOMMU_DOMAIN_CONFIGURE, - pub QueryAvailableDomainTypes: PIOMMU_DEVICE_QUERY_DOMAIN_TYPES, - pub RegisterInterfaceStateChangeCallback: PIOMMU_REGISTER_INTERFACE_STATE_CHANGE_CALLBACK, - pub UnregisterInterfaceStateChangeCallback: PIOMMU_UNREGISTER_INTERFACE_STATE_CHANGE_CALLBACK, - pub ReserveLogicalAddressRange: PIOMMU_RESERVE_LOGICAL_ADDRESS_RANGE, - pub FreeReservedLogicalAddressRange: PIOMMU_FREE_RESERVED_LOGICAL_ADDRESS_RANGE, - pub MapReservedLogicalRange: PIOMMU_MAP_RESERVED_LOGICAL_RANGE, - pub UnmapReservedLogicalRange: PIOMMU_UNMAP_RESERVED_LOGICAL_RANGE, - pub CreateDevice: PIOMMU_DEVICE_CREATE, - pub DeleteDevice: PIOMMU_DEVICE_DELETE, -} -#[test] -fn bindgen_test_layout__DMA_IOMMU_INTERFACE_V2() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_IOMMU_INTERFACE_V2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_IOMMU_INTERFACE_V2>(), - 176usize, - concat!("Size of: ", stringify!(_DMA_IOMMU_INTERFACE_V2)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_IOMMU_INTERFACE_V2>(), - 8usize, - concat!("Alignment of ", stringify!(_DMA_IOMMU_INTERFACE_V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateDomainEx) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(CreateDomainEx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeleteDomain) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(DeleteDomain), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AttachDeviceEx) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(AttachDeviceEx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DetachDeviceEx) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(DetachDeviceEx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FlushDomain) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(FlushDomain), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FlushDomainByVaList) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(FlushDomainByVaList), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryInputMappings) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(QueryInputMappings), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MapLogicalRangeEx) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(MapLogicalRangeEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnmapLogicalRange) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(UnmapLogicalRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MapIdentityRangeEx) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(MapIdentityRangeEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnmapIdentityRangeEx) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(UnmapIdentityRangeEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetDeviceFaultReportingEx) as usize - - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(SetDeviceFaultReportingEx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ConfigureDomain) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(ConfigureDomain), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryAvailableDomainTypes) as usize - - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(QueryAvailableDomainTypes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RegisterInterfaceStateChangeCallback) as usize - - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(RegisterInterfaceStateChangeCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnregisterInterfaceStateChangeCallback) as usize - - ptr as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(UnregisterInterfaceStateChangeCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReserveLogicalAddressRange) as usize - - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(ReserveLogicalAddressRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeReservedLogicalAddressRange) as usize - - ptr as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(FreeReservedLogicalAddressRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MapReservedLogicalRange) as usize - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(MapReservedLogicalRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnmapReservedLogicalRange) as usize - - ptr as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(UnmapReservedLogicalRange), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateDevice) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(CreateDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeleteDevice) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V2), - "::", - stringify!(DeleteDevice), - ), - ); -} -pub type DMA_IOMMU_INTERFACE_V2 = _DMA_IOMMU_INTERFACE_V2; -pub type PDMA_IOMMU_INTERFACE_V2 = *mut _DMA_IOMMU_INTERFACE_V2; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DMA_IOMMU_INTERFACE_V3 { - pub CreateDomainEx: PIOMMU_DOMAIN_CREATE_EX, - pub DeleteDomain: PIOMMU_DOMAIN_DELETE, - pub AttachDeviceEx: PIOMMU_DOMAIN_ATTACH_DEVICE_EX, - pub DetachDeviceEx: PIOMMU_DOMAIN_DETACH_DEVICE_EX, - pub FlushDomain: PIOMMU_FLUSH_DOMAIN, - pub FlushDomainByVaList: PIOMMU_FLUSH_DOMAIN_VA_LIST, - pub QueryInputMappings: PIOMMU_QUERY_INPUT_MAPPINGS, - pub MapLogicalRangeEx: PIOMMU_MAP_LOGICAL_RANGE_EX, - pub UnmapLogicalRange: PIOMMU_UNMAP_LOGICAL_RANGE, - pub MapIdentityRangeEx: PIOMMU_MAP_IDENTITY_RANGE_EX, - pub UnmapIdentityRangeEx: PIOMMU_UNMAP_IDENTITY_RANGE_EX, - pub SetDeviceFaultReportingEx: PIOMMU_SET_DEVICE_FAULT_REPORTING_EX, - pub ConfigureDomain: PIOMMU_DOMAIN_CONFIGURE, - pub QueryAvailableDomainTypes: PIOMMU_DEVICE_QUERY_DOMAIN_TYPES, - pub RegisterInterfaceStateChangeCallback: PIOMMU_REGISTER_INTERFACE_STATE_CHANGE_CALLBACK, - pub UnregisterInterfaceStateChangeCallback: PIOMMU_UNREGISTER_INTERFACE_STATE_CHANGE_CALLBACK, - pub ReserveLogicalAddressRange: PIOMMU_RESERVE_LOGICAL_ADDRESS_RANGE, - pub FreeReservedLogicalAddressRange: PIOMMU_FREE_RESERVED_LOGICAL_ADDRESS_RANGE, - pub MapReservedLogicalRange: PIOMMU_MAP_RESERVED_LOGICAL_RANGE, - pub UnmapReservedLogicalRange: PIOMMU_UNMAP_RESERVED_LOGICAL_RANGE, - pub CreateDevice: PIOMMU_DEVICE_CREATE, - pub DeleteDevice: PIOMMU_DEVICE_DELETE, - pub CreatePasidDevice: PIOMMU_PASID_DEVICE_CREATE, - pub DeletePasidDevice: PIOMMU_PASID_DEVICE_DELETE, - pub AttachPasidDevice: PIOMMU_DOMAIN_ATTACH_PASID_DEVICE, - pub DetachPasidDevice: PIOMMU_DOMAIN_DETACH_PASID_DEVICE, - pub QueryDeviceInfo: PIOMMU_DEVICE_QUERY_INFORMATION, -} -#[test] -fn bindgen_test_layout__DMA_IOMMU_INTERFACE_V3() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_IOMMU_INTERFACE_V3> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_IOMMU_INTERFACE_V3>(), - 216usize, - concat!("Size of: ", stringify!(_DMA_IOMMU_INTERFACE_V3)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_IOMMU_INTERFACE_V3>(), - 8usize, - concat!("Alignment of ", stringify!(_DMA_IOMMU_INTERFACE_V3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateDomainEx) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(CreateDomainEx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeleteDomain) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(DeleteDomain), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AttachDeviceEx) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(AttachDeviceEx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DetachDeviceEx) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(DetachDeviceEx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FlushDomain) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(FlushDomain), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FlushDomainByVaList) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(FlushDomainByVaList), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryInputMappings) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(QueryInputMappings), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MapLogicalRangeEx) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(MapLogicalRangeEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnmapLogicalRange) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(UnmapLogicalRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MapIdentityRangeEx) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(MapIdentityRangeEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnmapIdentityRangeEx) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(UnmapIdentityRangeEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetDeviceFaultReportingEx) as usize - - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(SetDeviceFaultReportingEx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ConfigureDomain) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(ConfigureDomain), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryAvailableDomainTypes) as usize - - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(QueryAvailableDomainTypes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RegisterInterfaceStateChangeCallback) as usize - - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(RegisterInterfaceStateChangeCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnregisterInterfaceStateChangeCallback) as usize - - ptr as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(UnregisterInterfaceStateChangeCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReserveLogicalAddressRange) as usize - - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(ReserveLogicalAddressRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeReservedLogicalAddressRange) as usize - - ptr as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(FreeReservedLogicalAddressRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MapReservedLogicalRange) as usize - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(MapReservedLogicalRange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnmapReservedLogicalRange) as usize - - ptr as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(UnmapReservedLogicalRange), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateDevice) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(CreateDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeleteDevice) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(DeleteDevice), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CreatePasidDevice) as usize - ptr as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(CreatePasidDevice), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeletePasidDevice) as usize - ptr as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(DeletePasidDevice), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AttachPasidDevice) as usize - ptr as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(AttachPasidDevice), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DetachPasidDevice) as usize - ptr as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(DetachPasidDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryDeviceInfo) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_V3), - "::", - stringify!(QueryDeviceInfo), - ), - ); -} -pub type DMA_IOMMU_INTERFACE_V3 = _DMA_IOMMU_INTERFACE_V3; -pub type PDMA_IOMMU_INTERFACE_V3 = *mut _DMA_IOMMU_INTERFACE_V3; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DMA_IOMMU_INTERFACE_EX { - pub Size: SIZE_T, - pub Version: ULONG, - pub __bindgen_anon_1: _DMA_IOMMU_INTERFACE_EX__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DMA_IOMMU_INTERFACE_EX__bindgen_ty_1 { - pub V1: DMA_IOMMU_INTERFACE_V1, - pub V2: DMA_IOMMU_INTERFACE_V2, - pub V3: DMA_IOMMU_INTERFACE_V3, -} -#[test] -fn bindgen_test_layout__DMA_IOMMU_INTERFACE_EX__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_IOMMU_INTERFACE_EX__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_IOMMU_INTERFACE_EX__bindgen_ty_1>(), - 216usize, - concat!("Size of: ", stringify!(_DMA_IOMMU_INTERFACE_EX__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_IOMMU_INTERFACE_EX__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_DMA_IOMMU_INTERFACE_EX__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).V1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_EX__bindgen_ty_1), - "::", - stringify!(V1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).V2) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_EX__bindgen_ty_1), - "::", - stringify!(V2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).V3) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_EX__bindgen_ty_1), - "::", - stringify!(V3), - ), - ); -} -impl Default for _DMA_IOMMU_INTERFACE_EX__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DMA_IOMMU_INTERFACE_EX() { - const UNINIT: ::core::mem::MaybeUninit<_DMA_IOMMU_INTERFACE_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DMA_IOMMU_INTERFACE_EX>(), - 232usize, - concat!("Size of: ", stringify!(_DMA_IOMMU_INTERFACE_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_DMA_IOMMU_INTERFACE_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_DMA_IOMMU_INTERFACE_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_EX), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DMA_IOMMU_INTERFACE_EX), - "::", - stringify!(Version), - ), - ); -} -impl Default for _DMA_IOMMU_INTERFACE_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REQUEST_POWER_COMPLETE = ::core::option::Option< - unsafe extern "C" fn( - DeviceObject: PDEVICE_OBJECT, - MinorFunction: UCHAR, - PowerState: POWER_STATE, - Context: PVOID, - IoStatus: PIO_STATUS_BLOCK, - ), ->; -pub type PREQUEST_POWER_COMPLETE = REQUEST_POWER_COMPLETE; -pub type POWER_SETTING_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - SettingGuid: LPCGUID, - Value: PVOID, - ValueLength: ULONG, - Context: PVOID, - ) -> NTSTATUS, ->; -pub type PPOWER_SETTING_CALLBACK = POWER_SETTING_CALLBACK; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct POHANDLE__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_POHANDLE__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(POHANDLE__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(POHANDLE__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(POHANDLE__), "::", stringify!(unused)), - ); -} -pub type POHANDLE = *mut POHANDLE__; -pub type PO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Component: ULONG), ->; -pub type PPO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK = PO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK; -pub type PO_FX_COMPONENT_IDLE_CONDITION_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Component: ULONG), ->; -pub type PPO_FX_COMPONENT_IDLE_CONDITION_CALLBACK = PO_FX_COMPONENT_IDLE_CONDITION_CALLBACK; -pub type PO_FX_COMPONENT_IDLE_STATE_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Component: ULONG, State: ULONG), ->; -pub type PPO_FX_COMPONENT_IDLE_STATE_CALLBACK = PO_FX_COMPONENT_IDLE_STATE_CALLBACK; -pub type PO_FX_DEVICE_POWER_REQUIRED_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID), ->; -pub type PPO_FX_DEVICE_POWER_REQUIRED_CALLBACK = PO_FX_DEVICE_POWER_REQUIRED_CALLBACK; -pub type PO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID), ->; -pub type PPO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK = PO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK; -pub type PO_FX_POWER_CONTROL_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - DeviceContext: PVOID, - PowerControlCode: LPCGUID, - InBuffer: PVOID, - InBufferSize: SIZE_T, - OutBuffer: PVOID, - OutBufferSize: SIZE_T, - BytesReturned: PSIZE_T, - ) -> NTSTATUS, ->; -pub type PPO_FX_POWER_CONTROL_CALLBACK = PO_FX_POWER_CONTROL_CALLBACK; -pub type PO_FX_COMPONENT_CRITICAL_TRANSITION_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Component: ULONG, Active: BOOLEAN), ->; -pub type PPO_FX_COMPONENT_CRITICAL_TRANSITION_CALLBACK = PO_FX_COMPONENT_CRITICAL_TRANSITION_CALLBACK; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PO_FX_COMPONENT_IDLE_STATE { - pub TransitionLatency: ULONGLONG, - pub ResidencyRequirement: ULONGLONG, - pub NominalPower: ULONG, -} -#[test] -fn bindgen_test_layout__PO_FX_COMPONENT_IDLE_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_PO_FX_COMPONENT_IDLE_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_COMPONENT_IDLE_STATE>(), - 24usize, - concat!("Size of: ", stringify!(_PO_FX_COMPONENT_IDLE_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_COMPONENT_IDLE_STATE>(), - 8usize, - concat!("Alignment of ", stringify!(_PO_FX_COMPONENT_IDLE_STATE)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TransitionLatency) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_IDLE_STATE), - "::", - stringify!(TransitionLatency), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ResidencyRequirement) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_IDLE_STATE), - "::", - stringify!(ResidencyRequirement), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NominalPower) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_IDLE_STATE), - "::", - stringify!(NominalPower), - ), - ); -} -pub type PO_FX_COMPONENT_IDLE_STATE = _PO_FX_COMPONENT_IDLE_STATE; -pub type PPO_FX_COMPONENT_IDLE_STATE = *mut _PO_FX_COMPONENT_IDLE_STATE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PO_FX_COMPONENT_V1 { - pub Id: GUID, - pub IdleStateCount: ULONG, - pub DeepestWakeableIdleState: ULONG, - pub IdleStates: PPO_FX_COMPONENT_IDLE_STATE, -} -#[test] -fn bindgen_test_layout__PO_FX_COMPONENT_V1() { - const UNINIT: ::core::mem::MaybeUninit<_PO_FX_COMPONENT_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_COMPONENT_V1>(), - 32usize, - concat!("Size of: ", stringify!(_PO_FX_COMPONENT_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_COMPONENT_V1>(), - 8usize, - concat!("Alignment of ", stringify!(_PO_FX_COMPONENT_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_V1), - "::", - stringify!(Id), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdleStateCount) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_V1), - "::", - stringify!(IdleStateCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeepestWakeableIdleState) as usize - - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_V1), - "::", - stringify!(DeepestWakeableIdleState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdleStates) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_V1), - "::", - stringify!(IdleStates), - ), - ); -} -impl Default for _PO_FX_COMPONENT_V1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PO_FX_COMPONENT_V1 = _PO_FX_COMPONENT_V1; -pub type PPO_FX_COMPONENT_V1 = *mut _PO_FX_COMPONENT_V1; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PO_FX_DEVICE_V1 { - pub Version: ULONG, - pub ComponentCount: ULONG, - pub ComponentActiveConditionCallback: PPO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK, - pub ComponentIdleConditionCallback: PPO_FX_COMPONENT_IDLE_CONDITION_CALLBACK, - pub ComponentIdleStateCallback: PPO_FX_COMPONENT_IDLE_STATE_CALLBACK, - pub DevicePowerRequiredCallback: PPO_FX_DEVICE_POWER_REQUIRED_CALLBACK, - pub DevicePowerNotRequiredCallback: PPO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK, - pub PowerControlCallback: PPO_FX_POWER_CONTROL_CALLBACK, - pub DeviceContext: PVOID, - pub Components: [PO_FX_COMPONENT_V1; 1usize], -} -#[test] -fn bindgen_test_layout__PO_FX_DEVICE_V1() { - const UNINIT: ::core::mem::MaybeUninit<_PO_FX_DEVICE_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_DEVICE_V1>(), - 96usize, - concat!("Size of: ", stringify!(_PO_FX_DEVICE_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_DEVICE_V1>(), - 8usize, - concat!("Alignment of ", stringify!(_PO_FX_DEVICE_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V1), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ComponentCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V1), - "::", - stringify!(ComponentCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ComponentActiveConditionCallback) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V1), - "::", - stringify!(ComponentActiveConditionCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ComponentIdleConditionCallback) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V1), - "::", - stringify!(ComponentIdleConditionCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ComponentIdleStateCallback) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V1), - "::", - stringify!(ComponentIdleStateCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DevicePowerRequiredCallback) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V1), - "::", - stringify!(DevicePowerRequiredCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DevicePowerNotRequiredCallback) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V1), - "::", - stringify!(DevicePowerNotRequiredCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PowerControlCallback) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V1), - "::", - stringify!(PowerControlCallback), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceContext) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V1), - "::", - stringify!(DeviceContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Components) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V1), - "::", - stringify!(Components), - ), - ); -} -impl Default for _PO_FX_DEVICE_V1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PO_FX_DEVICE_V1 = _PO_FX_DEVICE_V1; -pub type PPO_FX_DEVICE_V1 = *mut _PO_FX_DEVICE_V1; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PO_FX_COMPONENT_V2 { - pub Id: GUID, - pub Flags: ULONGLONG, - pub DeepestWakeableIdleState: ULONG, - pub IdleStateCount: ULONG, - pub IdleStates: PPO_FX_COMPONENT_IDLE_STATE, - pub ProviderCount: ULONG, - pub Providers: PULONG, -} -#[test] -fn bindgen_test_layout__PO_FX_COMPONENT_V2() { - const UNINIT: ::core::mem::MaybeUninit<_PO_FX_COMPONENT_V2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_COMPONENT_V2>(), - 56usize, - concat!("Size of: ", stringify!(_PO_FX_COMPONENT_V2)), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_COMPONENT_V2>(), - 8usize, - concat!("Alignment of ", stringify!(_PO_FX_COMPONENT_V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_V2), - "::", - stringify!(Id), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_V2), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeepestWakeableIdleState) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_V2), - "::", - stringify!(DeepestWakeableIdleState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdleStateCount) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_V2), - "::", - stringify!(IdleStateCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdleStates) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_V2), - "::", - stringify!(IdleStates), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProviderCount) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_V2), - "::", - stringify!(ProviderCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Providers) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_V2), - "::", - stringify!(Providers), - ), - ); -} -impl Default for _PO_FX_COMPONENT_V2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PO_FX_COMPONENT_V2 = _PO_FX_COMPONENT_V2; -pub type PPO_FX_COMPONENT_V2 = *mut _PO_FX_COMPONENT_V2; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PO_FX_DEVICE_V2 { - pub Version: ULONG, - pub Flags: ULONGLONG, - pub ComponentActiveConditionCallback: PPO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK, - pub ComponentIdleConditionCallback: PPO_FX_COMPONENT_IDLE_CONDITION_CALLBACK, - pub ComponentIdleStateCallback: PPO_FX_COMPONENT_IDLE_STATE_CALLBACK, - pub DevicePowerRequiredCallback: PPO_FX_DEVICE_POWER_REQUIRED_CALLBACK, - pub DevicePowerNotRequiredCallback: PPO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK, - pub PowerControlCallback: PPO_FX_POWER_CONTROL_CALLBACK, - pub DeviceContext: PVOID, - pub ComponentCount: ULONG, - pub Components: [PO_FX_COMPONENT_V2; 1usize], -} -#[test] -fn bindgen_test_layout__PO_FX_DEVICE_V2() { - const UNINIT: ::core::mem::MaybeUninit<_PO_FX_DEVICE_V2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_DEVICE_V2>(), - 136usize, - concat!("Size of: ", stringify!(_PO_FX_DEVICE_V2)), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_DEVICE_V2>(), - 8usize, - concat!("Alignment of ", stringify!(_PO_FX_DEVICE_V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V2), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V2), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ComponentActiveConditionCallback) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V2), - "::", - stringify!(ComponentActiveConditionCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ComponentIdleConditionCallback) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V2), - "::", - stringify!(ComponentIdleConditionCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ComponentIdleStateCallback) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V2), - "::", - stringify!(ComponentIdleStateCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DevicePowerRequiredCallback) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V2), - "::", - stringify!(DevicePowerRequiredCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DevicePowerNotRequiredCallback) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V2), - "::", - stringify!(DevicePowerNotRequiredCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PowerControlCallback) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V2), - "::", - stringify!(PowerControlCallback), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceContext) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V2), - "::", - stringify!(DeviceContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ComponentCount) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V2), - "::", - stringify!(ComponentCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Components) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V2), - "::", - stringify!(Components), - ), - ); -} -impl Default for _PO_FX_DEVICE_V2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PO_FX_DEVICE_V2 = _PO_FX_DEVICE_V2; -pub type PPO_FX_DEVICE_V2 = *mut _PO_FX_DEVICE_V2; -pub type PO_FX_DIRECTED_POWER_UP_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Flags: ULONG), ->; -pub type PPO_FX_DIRECTED_POWER_UP_CALLBACK = PO_FX_DIRECTED_POWER_UP_CALLBACK; -pub type PO_FX_DIRECTED_POWER_DOWN_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Flags: ULONG), ->; -pub type PPO_FX_DIRECTED_POWER_DOWN_CALLBACK = PO_FX_DIRECTED_POWER_DOWN_CALLBACK; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PO_FX_DEVICE_V3 { - pub Version: ULONG, - pub Flags: ULONGLONG, - pub ComponentActiveConditionCallback: PPO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK, - pub ComponentIdleConditionCallback: PPO_FX_COMPONENT_IDLE_CONDITION_CALLBACK, - pub ComponentIdleStateCallback: PPO_FX_COMPONENT_IDLE_STATE_CALLBACK, - pub DevicePowerRequiredCallback: PPO_FX_DEVICE_POWER_REQUIRED_CALLBACK, - pub DevicePowerNotRequiredCallback: PPO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK, - pub PowerControlCallback: PPO_FX_POWER_CONTROL_CALLBACK, - pub DirectedPowerUpCallback: PPO_FX_DIRECTED_POWER_UP_CALLBACK, - pub DirectedPowerDownCallback: PPO_FX_DIRECTED_POWER_DOWN_CALLBACK, - pub DirectedFxTimeoutInSeconds: ULONG, - pub DeviceContext: PVOID, - pub ComponentCount: ULONG, - pub Components: [PO_FX_COMPONENT_V2; 1usize], -} -#[test] -fn bindgen_test_layout__PO_FX_DEVICE_V3() { - const UNINIT: ::core::mem::MaybeUninit<_PO_FX_DEVICE_V3> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_DEVICE_V3>(), - 160usize, - concat!("Size of: ", stringify!(_PO_FX_DEVICE_V3)), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_DEVICE_V3>(), - 8usize, - concat!("Alignment of ", stringify!(_PO_FX_DEVICE_V3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ComponentActiveConditionCallback) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(ComponentActiveConditionCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ComponentIdleConditionCallback) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(ComponentIdleConditionCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ComponentIdleStateCallback) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(ComponentIdleStateCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DevicePowerRequiredCallback) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(DevicePowerRequiredCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DevicePowerNotRequiredCallback) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(DevicePowerNotRequiredCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PowerControlCallback) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(PowerControlCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DirectedPowerUpCallback) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(DirectedPowerUpCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DirectedPowerDownCallback) as usize - - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(DirectedPowerDownCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DirectedFxTimeoutInSeconds) as usize - - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(DirectedFxTimeoutInSeconds), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceContext) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(DeviceContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ComponentCount) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(ComponentCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Components) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_DEVICE_V3), - "::", - stringify!(Components), - ), - ); -} -impl Default for _PO_FX_DEVICE_V3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PO_FX_DEVICE_V3 = _PO_FX_DEVICE_V3; -pub type PPO_FX_DEVICE_V3 = *mut _PO_FX_DEVICE_V3; -pub type PO_FX_COMPONENT = PO_FX_COMPONENT_V1; -pub type PPO_FX_COMPONENT = *mut PO_FX_COMPONENT_V1; -pub type PO_FX_DEVICE = PO_FX_DEVICE_V1; -pub type PPO_FX_DEVICE = *mut PO_FX_DEVICE_V1; -pub mod _PO_FX_PERF_STATE_UNIT { - pub type Type = ::core::ffi::c_int; - pub const PoFxPerfStateUnitOther: Type = 0; - pub const PoFxPerfStateUnitFrequency: Type = 1; - pub const PoFxPerfStateUnitBandwidth: Type = 2; - pub const PoFxPerfStateUnitMaximum: Type = 3; -} -pub use self::_PO_FX_PERF_STATE_UNIT::Type as PO_FX_PERF_STATE_UNIT; -pub type PPO_FX_PERF_STATE_UNIT = *mut _PO_FX_PERF_STATE_UNIT::Type; -pub mod _PO_FX_PERF_STATE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const PoFxPerfStateTypeDiscrete: Type = 0; - pub const PoFxPerfStateTypeRange: Type = 1; - pub const PoFxPerfStateTypeMaximum: Type = 2; -} -pub use self::_PO_FX_PERF_STATE_TYPE::Type as PO_FX_PERF_STATE_TYPE; -pub type PPO_FX_PERF_STATE_TYPE = *mut _PO_FX_PERF_STATE_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PO_FX_PERF_STATE { - pub Value: ULONGLONG, - pub Context: PVOID, -} -#[test] -fn bindgen_test_layout__PO_FX_PERF_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_PO_FX_PERF_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_PERF_STATE>(), - 16usize, - concat!("Size of: ", stringify!(_PO_FX_PERF_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_PERF_STATE>(), - 8usize, - concat!("Alignment of ", stringify!(_PO_FX_PERF_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_PERF_STATE), - "::", - stringify!(Value), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_PERF_STATE), - "::", - stringify!(Context), - ), - ); -} -impl Default for _PO_FX_PERF_STATE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PO_FX_PERF_STATE = _PO_FX_PERF_STATE; -pub type PPO_FX_PERF_STATE = *mut _PO_FX_PERF_STATE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PO_FX_COMPONENT_PERF_SET { - pub Name: UNICODE_STRING, - pub Flags: ULONGLONG, - pub Unit: PO_FX_PERF_STATE_UNIT, - pub Type: PO_FX_PERF_STATE_TYPE, - pub __bindgen_anon_1: _PO_FX_COMPONENT_PERF_SET__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PO_FX_COMPONENT_PERF_SET__bindgen_ty_1 { - pub Discrete: _PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_1, - pub Range: _PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_1 { - pub Count: ULONG, - pub States: PPO_FX_PERF_STATE, -} -#[test] -fn bindgen_test_layout__PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_1>(), - 16usize, - concat!( - "Size of: ", - stringify!(_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Count), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).States) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(States), - ), - ); -} -impl Default for _PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_2 { - pub Minimum: ULONGLONG, - pub Maximum: ULONGLONG, -} -#[test] -fn bindgen_test_layout__PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_2>(), - 16usize, - concat!( - "Size of: ", - stringify!(_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_2>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Minimum) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Minimum), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Maximum) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Maximum), - ), - ); -} -#[test] -fn bindgen_test_layout__PO_FX_COMPONENT_PERF_SET__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Discrete) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1), - "::", - stringify!(Discrete), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Range) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_PERF_SET__bindgen_ty_1), - "::", - stringify!(Range), - ), - ); -} -impl Default for _PO_FX_COMPONENT_PERF_SET__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PO_FX_COMPONENT_PERF_SET() { - const UNINIT: ::core::mem::MaybeUninit<_PO_FX_COMPONENT_PERF_SET> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_COMPONENT_PERF_SET>(), - 48usize, - concat!("Size of: ", stringify!(_PO_FX_COMPONENT_PERF_SET)), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_COMPONENT_PERF_SET>(), - 8usize, - concat!("Alignment of ", stringify!(_PO_FX_COMPONENT_PERF_SET)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_PERF_SET), - "::", - stringify!(Name), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_PERF_SET), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unit) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_PERF_SET), - "::", - stringify!(Unit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_PERF_SET), - "::", - stringify!(Type), - ), - ); -} -impl Default for _PO_FX_COMPONENT_PERF_SET { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PO_FX_COMPONENT_PERF_SET = _PO_FX_COMPONENT_PERF_SET; -pub type PPO_FX_COMPONENT_PERF_SET = *mut _PO_FX_COMPONENT_PERF_SET; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PO_FX_COMPONENT_PERF_INFO { - pub PerfStateSetsCount: ULONG, - pub PerfStateSets: [PO_FX_COMPONENT_PERF_SET; 1usize], -} -#[test] -fn bindgen_test_layout__PO_FX_COMPONENT_PERF_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_PO_FX_COMPONENT_PERF_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_COMPONENT_PERF_INFO>(), - 56usize, - concat!("Size of: ", stringify!(_PO_FX_COMPONENT_PERF_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_COMPONENT_PERF_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_PO_FX_COMPONENT_PERF_INFO)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PerfStateSetsCount) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_PERF_INFO), - "::", - stringify!(PerfStateSetsCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PerfStateSets) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_COMPONENT_PERF_INFO), - "::", - stringify!(PerfStateSets), - ), - ); -} -impl Default for _PO_FX_COMPONENT_PERF_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PO_FX_COMPONENT_PERF_INFO = _PO_FX_COMPONENT_PERF_INFO; -pub type PPO_FX_COMPONENT_PERF_INFO = *mut _PO_FX_COMPONENT_PERF_INFO; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PO_FX_PERF_STATE_CHANGE { - pub Set: ULONG, - pub __bindgen_anon_1: _PO_FX_PERF_STATE_CHANGE__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PO_FX_PERF_STATE_CHANGE__bindgen_ty_1 { - pub StateIndex: ULONG, - pub StateValue: ULONGLONG, -} -#[test] -fn bindgen_test_layout__PO_FX_PERF_STATE_CHANGE__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_PO_FX_PERF_STATE_CHANGE__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_PERF_STATE_CHANGE__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_PO_FX_PERF_STATE_CHANGE__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_PERF_STATE_CHANGE__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_PO_FX_PERF_STATE_CHANGE__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StateIndex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_PERF_STATE_CHANGE__bindgen_ty_1), - "::", - stringify!(StateIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StateValue) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_PERF_STATE_CHANGE__bindgen_ty_1), - "::", - stringify!(StateValue), - ), - ); -} -impl Default for _PO_FX_PERF_STATE_CHANGE__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PO_FX_PERF_STATE_CHANGE() { - const UNINIT: ::core::mem::MaybeUninit<_PO_FX_PERF_STATE_CHANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PO_FX_PERF_STATE_CHANGE>(), - 16usize, - concat!("Size of: ", stringify!(_PO_FX_PERF_STATE_CHANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_PO_FX_PERF_STATE_CHANGE>(), - 8usize, - concat!("Alignment of ", stringify!(_PO_FX_PERF_STATE_CHANGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Set) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PO_FX_PERF_STATE_CHANGE), - "::", - stringify!(Set), - ), - ); -} -impl Default for _PO_FX_PERF_STATE_CHANGE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PO_FX_PERF_STATE_CHANGE = _PO_FX_PERF_STATE_CHANGE; -pub type PPO_FX_PERF_STATE_CHANGE = *mut _PO_FX_PERF_STATE_CHANGE; -pub type PO_FX_COMPONENT_PERF_STATE_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - Component: ULONG, - Succeeded: BOOLEAN, - RequestContext: PVOID, - ), ->; -pub type PPO_FX_COMPONENT_PERF_STATE_CALLBACK = PO_FX_COMPONENT_PERF_STATE_CALLBACK; -pub mod _PO_THERMAL_REQUEST_TYPE { - pub type Type = ::core::ffi::c_int; - pub const PoThermalRequestPassive: Type = 0; - pub const PoThermalRequestActive: Type = 1; -} -pub use self::_PO_THERMAL_REQUEST_TYPE::Type as PO_THERMAL_REQUEST_TYPE; -pub type PPO_THERMAL_REQUEST_TYPE = *mut _PO_THERMAL_REQUEST_TYPE::Type; -pub type PO_FX_DRIPS_WATCHDOG_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - PhysicalDeviceObject: PDEVICE_OBJECT, - UniqueId: ULONG, - ), ->; -pub type PPO_FX_DRIPS_WATCHDOG_CALLBACK = PO_FX_DRIPS_WATCHDOG_CALLBACK; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _OBJECT_HANDLE_INFORMATION { - pub HandleAttributes: ULONG, - pub GrantedAccess: ACCESS_MASK, -} -#[test] -fn bindgen_test_layout__OBJECT_HANDLE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_OBJECT_HANDLE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OBJECT_HANDLE_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_OBJECT_HANDLE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_OBJECT_HANDLE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_OBJECT_HANDLE_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HandleAttributes) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_HANDLE_INFORMATION), - "::", - stringify!(HandleAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GrantedAccess) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_HANDLE_INFORMATION), - "::", - stringify!(GrantedAccess), - ), - ); -} -pub type OBJECT_HANDLE_INFORMATION = _OBJECT_HANDLE_INFORMATION; -pub type POBJECT_HANDLE_INFORMATION = *mut _OBJECT_HANDLE_INFORMATION; -pub type OB_OPERATION = ULONG; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _OB_PRE_CREATE_HANDLE_INFORMATION { - pub DesiredAccess: ACCESS_MASK, - pub OriginalDesiredAccess: ACCESS_MASK, -} -#[test] -fn bindgen_test_layout__OB_PRE_CREATE_HANDLE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_OB_PRE_CREATE_HANDLE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OB_PRE_CREATE_HANDLE_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_OB_PRE_CREATE_HANDLE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_OB_PRE_CREATE_HANDLE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_OB_PRE_CREATE_HANDLE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DesiredAccess) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_CREATE_HANDLE_INFORMATION), - "::", - stringify!(DesiredAccess), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OriginalDesiredAccess) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_CREATE_HANDLE_INFORMATION), - "::", - stringify!(OriginalDesiredAccess), - ), - ); -} -pub type OB_PRE_CREATE_HANDLE_INFORMATION = _OB_PRE_CREATE_HANDLE_INFORMATION; -pub type POB_PRE_CREATE_HANDLE_INFORMATION = *mut _OB_PRE_CREATE_HANDLE_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OB_PRE_DUPLICATE_HANDLE_INFORMATION { - pub DesiredAccess: ACCESS_MASK, - pub OriginalDesiredAccess: ACCESS_MASK, - pub SourceProcess: PVOID, - pub TargetProcess: PVOID, -} -#[test] -fn bindgen_test_layout__OB_PRE_DUPLICATE_HANDLE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_OB_PRE_DUPLICATE_HANDLE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OB_PRE_DUPLICATE_HANDLE_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_OB_PRE_DUPLICATE_HANDLE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_OB_PRE_DUPLICATE_HANDLE_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_OB_PRE_DUPLICATE_HANDLE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DesiredAccess) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_DUPLICATE_HANDLE_INFORMATION), - "::", - stringify!(DesiredAccess), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OriginalDesiredAccess) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_DUPLICATE_HANDLE_INFORMATION), - "::", - stringify!(OriginalDesiredAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceProcess) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_DUPLICATE_HANDLE_INFORMATION), - "::", - stringify!(SourceProcess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TargetProcess) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_DUPLICATE_HANDLE_INFORMATION), - "::", - stringify!(TargetProcess), - ), - ); -} -impl Default for _OB_PRE_DUPLICATE_HANDLE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OB_PRE_DUPLICATE_HANDLE_INFORMATION = _OB_PRE_DUPLICATE_HANDLE_INFORMATION; -pub type POB_PRE_DUPLICATE_HANDLE_INFORMATION = *mut _OB_PRE_DUPLICATE_HANDLE_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _OB_PRE_OPERATION_PARAMETERS { - pub CreateHandleInformation: OB_PRE_CREATE_HANDLE_INFORMATION, - pub DuplicateHandleInformation: OB_PRE_DUPLICATE_HANDLE_INFORMATION, -} -#[test] -fn bindgen_test_layout__OB_PRE_OPERATION_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_OB_PRE_OPERATION_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OB_PRE_OPERATION_PARAMETERS>(), - 24usize, - concat!("Size of: ", stringify!(_OB_PRE_OPERATION_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_OB_PRE_OPERATION_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_OB_PRE_OPERATION_PARAMETERS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CreateHandleInformation) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_OPERATION_PARAMETERS), - "::", - stringify!(CreateHandleInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DuplicateHandleInformation) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_OPERATION_PARAMETERS), - "::", - stringify!(DuplicateHandleInformation), - ), - ); -} -impl Default for _OB_PRE_OPERATION_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OB_PRE_OPERATION_PARAMETERS = _OB_PRE_OPERATION_PARAMETERS; -pub type POB_PRE_OPERATION_PARAMETERS = *mut _OB_PRE_OPERATION_PARAMETERS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _OB_PRE_OPERATION_INFORMATION { - pub Operation: OB_OPERATION, - pub __bindgen_anon_1: _OB_PRE_OPERATION_INFORMATION__bindgen_ty_1, - pub Object: PVOID, - pub ObjectType: POBJECT_TYPE, - pub CallContext: PVOID, - pub Parameters: POB_PRE_OPERATION_PARAMETERS, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _OB_PRE_OPERATION_INFORMATION__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _OB_PRE_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _OB_PRE_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__OB_PRE_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _OB_PRE_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_OB_PRE_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _OB_PRE_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_OB_PRE_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _OB_PRE_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn KernelHandle(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_KernelHandle(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 31u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - KernelHandle: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let KernelHandle: u32 = unsafe { - ::core::mem::transmute(KernelHandle) - }; - KernelHandle as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 31u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__OB_PRE_OPERATION_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _OB_PRE_OPERATION_INFORMATION__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OB_PRE_OPERATION_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_OB_PRE_OPERATION_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_OB_PRE_OPERATION_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_OB_PRE_OPERATION_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_OPERATION_INFORMATION__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _OB_PRE_OPERATION_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__OB_PRE_OPERATION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_OB_PRE_OPERATION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OB_PRE_OPERATION_INFORMATION>(), - 40usize, - concat!("Size of: ", stringify!(_OB_PRE_OPERATION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_OB_PRE_OPERATION_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_OB_PRE_OPERATION_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Operation) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_OPERATION_INFORMATION), - "::", - stringify!(Operation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_OPERATION_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_OPERATION_INFORMATION), - "::", - stringify!(ObjectType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_OPERATION_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_OB_PRE_OPERATION_INFORMATION), - "::", - stringify!(Parameters), - ), - ); -} -impl Default for _OB_PRE_OPERATION_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OB_PRE_OPERATION_INFORMATION = _OB_PRE_OPERATION_INFORMATION; -pub type POB_PRE_OPERATION_INFORMATION = *mut _OB_PRE_OPERATION_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _OB_POST_CREATE_HANDLE_INFORMATION { - pub GrantedAccess: ACCESS_MASK, -} -#[test] -fn bindgen_test_layout__OB_POST_CREATE_HANDLE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_OB_POST_CREATE_HANDLE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OB_POST_CREATE_HANDLE_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_OB_POST_CREATE_HANDLE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_OB_POST_CREATE_HANDLE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_OB_POST_CREATE_HANDLE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GrantedAccess) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_POST_CREATE_HANDLE_INFORMATION), - "::", - stringify!(GrantedAccess), - ), - ); -} -pub type OB_POST_CREATE_HANDLE_INFORMATION = _OB_POST_CREATE_HANDLE_INFORMATION; -pub type POB_POST_CREATE_HANDLE_INFORMATION = *mut _OB_POST_CREATE_HANDLE_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _OB_POST_DUPLICATE_HANDLE_INFORMATION { - pub GrantedAccess: ACCESS_MASK, -} -#[test] -fn bindgen_test_layout__OB_POST_DUPLICATE_HANDLE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_OB_POST_DUPLICATE_HANDLE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OB_POST_DUPLICATE_HANDLE_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_OB_POST_DUPLICATE_HANDLE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_OB_POST_DUPLICATE_HANDLE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_OB_POST_DUPLICATE_HANDLE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GrantedAccess) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_POST_DUPLICATE_HANDLE_INFORMATION), - "::", - stringify!(GrantedAccess), - ), - ); -} -pub type OB_POST_DUPLICATE_HANDLE_INFORMATION = _OB_POST_DUPLICATE_HANDLE_INFORMATION; -pub type POB_POST_DUPLICATE_HANDLE_INFORMATION = *mut _OB_POST_DUPLICATE_HANDLE_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _OB_POST_OPERATION_PARAMETERS { - pub CreateHandleInformation: OB_POST_CREATE_HANDLE_INFORMATION, - pub DuplicateHandleInformation: OB_POST_DUPLICATE_HANDLE_INFORMATION, -} -#[test] -fn bindgen_test_layout__OB_POST_OPERATION_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_OB_POST_OPERATION_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OB_POST_OPERATION_PARAMETERS>(), - 4usize, - concat!("Size of: ", stringify!(_OB_POST_OPERATION_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_OB_POST_OPERATION_PARAMETERS>(), - 4usize, - concat!("Alignment of ", stringify!(_OB_POST_OPERATION_PARAMETERS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CreateHandleInformation) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_POST_OPERATION_PARAMETERS), - "::", - stringify!(CreateHandleInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DuplicateHandleInformation) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_POST_OPERATION_PARAMETERS), - "::", - stringify!(DuplicateHandleInformation), - ), - ); -} -impl Default for _OB_POST_OPERATION_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OB_POST_OPERATION_PARAMETERS = _OB_POST_OPERATION_PARAMETERS; -pub type POB_POST_OPERATION_PARAMETERS = *mut _OB_POST_OPERATION_PARAMETERS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _OB_POST_OPERATION_INFORMATION { - pub Operation: OB_OPERATION, - pub __bindgen_anon_1: _OB_POST_OPERATION_INFORMATION__bindgen_ty_1, - pub Object: PVOID, - pub ObjectType: POBJECT_TYPE, - pub CallContext: PVOID, - pub ReturnStatus: NTSTATUS, - pub Parameters: POB_POST_OPERATION_PARAMETERS, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _OB_POST_OPERATION_INFORMATION__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _OB_POST_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _OB_POST_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__OB_POST_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _OB_POST_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_OB_POST_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _OB_POST_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_OB_POST_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _OB_POST_OPERATION_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn KernelHandle(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_KernelHandle(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 31u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - KernelHandle: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let KernelHandle: u32 = unsafe { - ::core::mem::transmute(KernelHandle) - }; - KernelHandle as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 31u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__OB_POST_OPERATION_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _OB_POST_OPERATION_INFORMATION__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OB_POST_OPERATION_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_OB_POST_OPERATION_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_OB_POST_OPERATION_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_OB_POST_OPERATION_INFORMATION__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_POST_OPERATION_INFORMATION__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _OB_POST_OPERATION_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__OB_POST_OPERATION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_OB_POST_OPERATION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OB_POST_OPERATION_INFORMATION>(), - 48usize, - concat!("Size of: ", stringify!(_OB_POST_OPERATION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_OB_POST_OPERATION_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_OB_POST_OPERATION_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Operation) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_POST_OPERATION_INFORMATION), - "::", - stringify!(Operation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Object) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OB_POST_OPERATION_INFORMATION), - "::", - stringify!(Object), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OB_POST_OPERATION_INFORMATION), - "::", - stringify!(ObjectType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_OB_POST_OPERATION_INFORMATION), - "::", - stringify!(CallContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReturnStatus) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_OB_POST_OPERATION_INFORMATION), - "::", - stringify!(ReturnStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_OB_POST_OPERATION_INFORMATION), - "::", - stringify!(Parameters), - ), - ); -} -impl Default for _OB_POST_OPERATION_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OB_POST_OPERATION_INFORMATION = _OB_POST_OPERATION_INFORMATION; -pub type POB_POST_OPERATION_INFORMATION = *mut _OB_POST_OPERATION_INFORMATION; -pub mod _OB_PREOP_CALLBACK_STATUS { - pub type Type = ::core::ffi::c_int; - pub const OB_PREOP_SUCCESS: Type = 0; -} -pub use self::_OB_PREOP_CALLBACK_STATUS::Type as OB_PREOP_CALLBACK_STATUS; -pub type POB_PREOP_CALLBACK_STATUS = *mut _OB_PREOP_CALLBACK_STATUS::Type; -pub type POB_PRE_OPERATION_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - RegistrationContext: PVOID, - OperationInformation: POB_PRE_OPERATION_INFORMATION, - ) -> OB_PREOP_CALLBACK_STATUS, ->; -pub type POB_POST_OPERATION_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - RegistrationContext: PVOID, - OperationInformation: POB_POST_OPERATION_INFORMATION, - ), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OB_OPERATION_REGISTRATION { - pub ObjectType: *mut POBJECT_TYPE, - pub Operations: OB_OPERATION, - pub PreOperation: POB_PRE_OPERATION_CALLBACK, - pub PostOperation: POB_POST_OPERATION_CALLBACK, -} -#[test] -fn bindgen_test_layout__OB_OPERATION_REGISTRATION() { - const UNINIT: ::core::mem::MaybeUninit<_OB_OPERATION_REGISTRATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OB_OPERATION_REGISTRATION>(), - 32usize, - concat!("Size of: ", stringify!(_OB_OPERATION_REGISTRATION)), - ); - assert_eq!( - ::core::mem::align_of::<_OB_OPERATION_REGISTRATION>(), - 8usize, - concat!("Alignment of ", stringify!(_OB_OPERATION_REGISTRATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_OPERATION_REGISTRATION), - "::", - stringify!(ObjectType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Operations) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OB_OPERATION_REGISTRATION), - "::", - stringify!(Operations), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PreOperation) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OB_OPERATION_REGISTRATION), - "::", - stringify!(PreOperation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PostOperation) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_OB_OPERATION_REGISTRATION), - "::", - stringify!(PostOperation), - ), - ); -} -impl Default for _OB_OPERATION_REGISTRATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OB_OPERATION_REGISTRATION = _OB_OPERATION_REGISTRATION; -pub type POB_OPERATION_REGISTRATION = *mut _OB_OPERATION_REGISTRATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OB_CALLBACK_REGISTRATION { - pub Version: USHORT, - pub OperationRegistrationCount: USHORT, - pub Altitude: UNICODE_STRING, - pub RegistrationContext: PVOID, - pub OperationRegistration: *mut OB_OPERATION_REGISTRATION, -} -#[test] -fn bindgen_test_layout__OB_CALLBACK_REGISTRATION() { - const UNINIT: ::core::mem::MaybeUninit<_OB_CALLBACK_REGISTRATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OB_CALLBACK_REGISTRATION>(), - 40usize, - concat!("Size of: ", stringify!(_OB_CALLBACK_REGISTRATION)), - ); - assert_eq!( - ::core::mem::align_of::<_OB_CALLBACK_REGISTRATION>(), - 8usize, - concat!("Alignment of ", stringify!(_OB_CALLBACK_REGISTRATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OB_CALLBACK_REGISTRATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OperationRegistrationCount) as usize - - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_OB_CALLBACK_REGISTRATION), - "::", - stringify!(OperationRegistrationCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Altitude) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OB_CALLBACK_REGISTRATION), - "::", - stringify!(Altitude), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RegistrationContext) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_OB_CALLBACK_REGISTRATION), - "::", - stringify!(RegistrationContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OperationRegistration) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_OB_CALLBACK_REGISTRATION), - "::", - stringify!(OperationRegistration), - ), - ); -} -impl Default for _OB_CALLBACK_REGISTRATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OB_CALLBACK_REGISTRATION = _OB_CALLBACK_REGISTRATION; -pub type POB_CALLBACK_REGISTRATION = *mut _OB_CALLBACK_REGISTRATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_SEGMENT_BUS_NUMBER { - pub u: _PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1 { - pub bits: _PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn BusNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set_BusNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn SegmentNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 16u8) as u32) } - } - #[inline] - pub fn set_SegmentNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 16u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - BusNumber: ULONG, - SegmentNumber: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let BusNumber: u32 = unsafe { ::core::mem::transmute(BusNumber) }; - BusNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 16u8, - { - let SegmentNumber: u32 = unsafe { - ::core::mem::transmute(SegmentNumber) - }; - SegmentNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1), - "::", - stringify!(bits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_SEGMENT_BUS_NUMBER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PCI_SEGMENT_BUS_NUMBER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_SEGMENT_BUS_NUMBER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_SEGMENT_BUS_NUMBER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_SEGMENT_BUS_NUMBER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_SEGMENT_BUS_NUMBER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_SEGMENT_BUS_NUMBER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SEGMENT_BUS_NUMBER), - "::", - stringify!(u), - ), - ); -} -impl Default for _PCI_SEGMENT_BUS_NUMBER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_SEGMENT_BUS_NUMBER = _PCI_SEGMENT_BUS_NUMBER; -pub type PPCI_SEGMENT_BUS_NUMBER = *mut _PCI_SEGMENT_BUS_NUMBER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_SLOT_NUMBER { - pub u: _PCI_SLOT_NUMBER__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_SLOT_NUMBER__bindgen_ty_1 { - pub bits: _PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn DeviceNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u32) } - } - #[inline] - pub fn set_DeviceNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 5u8, val as u64) - } - } - #[inline] - pub fn FunctionNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u32) } - } - #[inline] - pub fn set_FunctionNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 3u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 24u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 24u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - DeviceNumber: ULONG, - FunctionNumber: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 5u8, - { - let DeviceNumber: u32 = unsafe { - ::core::mem::transmute(DeviceNumber) - }; - DeviceNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 3u8, - { - let FunctionNumber: u32 = unsafe { - ::core::mem::transmute(FunctionNumber) - }; - FunctionNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 24u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_SLOT_NUMBER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_SLOT_NUMBER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_SLOT_NUMBER__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_SLOT_NUMBER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_SLOT_NUMBER__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_SLOT_NUMBER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SLOT_NUMBER__bindgen_ty_1), - "::", - stringify!(bits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SLOT_NUMBER__bindgen_ty_1), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_SLOT_NUMBER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PCI_SLOT_NUMBER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_SLOT_NUMBER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_SLOT_NUMBER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_SLOT_NUMBER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_SLOT_NUMBER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_SLOT_NUMBER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_PCI_SLOT_NUMBER), "::", stringify!(u)), - ); -} -impl Default for _PCI_SLOT_NUMBER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_SLOT_NUMBER = _PCI_SLOT_NUMBER; -pub type PPCI_SLOT_NUMBER = *mut _PCI_SLOT_NUMBER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_COMMON_HEADER { - pub VendorID: USHORT, - pub DeviceID: USHORT, - pub Command: USHORT, - pub Status: USHORT, - pub RevisionID: UCHAR, - pub ProgIf: UCHAR, - pub SubClass: UCHAR, - pub BaseClass: UCHAR, - pub CacheLineSize: UCHAR, - pub LatencyTimer: UCHAR, - pub HeaderType: UCHAR, - pub BIST: UCHAR, - pub u: _PCI_COMMON_HEADER__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_COMMON_HEADER__bindgen_ty_1 { - pub type0: _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0, - pub type1: _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1, - pub type2: _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0 { - pub BaseAddresses: [ULONG; 6usize], - pub CIS: ULONG, - pub SubVendorID: USHORT, - pub SubSystemID: USHORT, - pub ROMBaseAddress: ULONG, - pub CapabilitiesPtr: UCHAR, - pub Reserved1: [UCHAR; 3usize], - pub Reserved2: ULONG, - pub InterruptLine: UCHAR, - pub InterruptPin: UCHAR, - pub MinimumGrant: UCHAR, - pub MaximumLatency: UCHAR, -} -#[test] -fn bindgen_test_layout__PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0>(), - 48usize, - concat!( - "Size of: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseAddresses) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - "::", - stringify!(BaseAddresses), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CIS) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - "::", - stringify!(CIS), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubVendorID) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - "::", - stringify!(SubVendorID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubSystemID) as usize - ptr as usize }, - 30usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - "::", - stringify!(SubSystemID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ROMBaseAddress) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - "::", - stringify!(ROMBaseAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CapabilitiesPtr) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - "::", - stringify!(CapabilitiesPtr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 37usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptLine) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - "::", - stringify!(InterruptLine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptPin) as usize - ptr as usize }, - 45usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - "::", - stringify!(InterruptPin), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinimumGrant) as usize - ptr as usize }, - 46usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - "::", - stringify!(MinimumGrant), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumLatency) as usize - ptr as usize }, - 47usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_0), - "::", - stringify!(MaximumLatency), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1 { - pub BaseAddresses: [ULONG; 2usize], - pub PrimaryBus: UCHAR, - pub SecondaryBus: UCHAR, - pub SubordinateBus: UCHAR, - pub SecondaryLatency: UCHAR, - pub IOBase: UCHAR, - pub IOLimit: UCHAR, - pub SecondaryStatus: USHORT, - pub MemoryBase: USHORT, - pub MemoryLimit: USHORT, - pub PrefetchBase: USHORT, - pub PrefetchLimit: USHORT, - pub PrefetchBaseUpper32: ULONG, - pub PrefetchLimitUpper32: ULONG, - pub IOBaseUpper16: USHORT, - pub IOLimitUpper16: USHORT, - pub CapabilitiesPtr: UCHAR, - pub Reserved1: [UCHAR; 3usize], - pub ROMBaseAddress: ULONG, - pub InterruptLine: UCHAR, - pub InterruptPin: UCHAR, - pub BridgeControl: USHORT, -} -#[test] -fn bindgen_test_layout__PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1>(), - 48usize, - concat!( - "Size of: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseAddresses) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(BaseAddresses), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrimaryBus) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(PrimaryBus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecondaryBus) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(SecondaryBus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubordinateBus) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(SubordinateBus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecondaryLatency) as usize - ptr as usize - }, - 11usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(SecondaryLatency), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IOBase) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(IOBase), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IOLimit) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(IOLimit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecondaryStatus) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(SecondaryStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MemoryBase) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(MemoryBase), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MemoryLimit) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(MemoryLimit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrefetchBase) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(PrefetchBase), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrefetchLimit) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(PrefetchLimit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PrefetchBaseUpper32) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(PrefetchBaseUpper32), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PrefetchLimitUpper32) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(PrefetchLimitUpper32), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IOBaseUpper16) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(IOBaseUpper16), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IOLimitUpper16) as usize - ptr as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(IOLimitUpper16), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CapabilitiesPtr) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(CapabilitiesPtr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 37usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ROMBaseAddress) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(ROMBaseAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptLine) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(InterruptLine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptPin) as usize - ptr as usize }, - 45usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(InterruptPin), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BridgeControl) as usize - ptr as usize }, - 46usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_1), - "::", - stringify!(BridgeControl), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2 { - pub SocketRegistersBaseAddress: ULONG, - pub CapabilitiesPtr: UCHAR, - pub Reserved: UCHAR, - pub SecondaryStatus: USHORT, - pub PrimaryBus: UCHAR, - pub SecondaryBus: UCHAR, - pub SubordinateBus: UCHAR, - pub SecondaryLatency: UCHAR, - pub Range: [_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2__bindgen_ty_1; 4usize], - pub InterruptLine: UCHAR, - pub InterruptPin: UCHAR, - pub BridgeControl: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2__bindgen_ty_1 { - pub Base: ULONG, - pub Limit: ULONG, -} -#[test] -fn bindgen_test_layout__PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Base) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2__bindgen_ty_1 - ), - "::", - stringify!(Base), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Limit) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!( - _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2__bindgen_ty_1 - ), - "::", - stringify!(Limit), - ), - ); -} -#[test] -fn bindgen_test_layout__PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2>(), - 48usize, - concat!( - "Size of: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SocketRegistersBaseAddress) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - "::", - stringify!(SocketRegistersBaseAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CapabilitiesPtr) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - "::", - stringify!(CapabilitiesPtr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecondaryStatus) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - "::", - stringify!(SecondaryStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrimaryBus) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - "::", - stringify!(PrimaryBus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecondaryBus) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - "::", - stringify!(SecondaryBus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubordinateBus) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - "::", - stringify!(SubordinateBus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecondaryLatency) as usize - ptr as usize - }, - 11usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - "::", - stringify!(SecondaryLatency), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Range) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - "::", - stringify!(Range), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptLine) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - "::", - stringify!(InterruptLine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptPin) as usize - ptr as usize }, - 45usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - "::", - stringify!(InterruptPin), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BridgeControl) as usize - ptr as usize }, - 46usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1__PCI_HEADER_TYPE_2), - "::", - stringify!(BridgeControl), - ), - ); -} -#[test] -fn bindgen_test_layout__PCI_COMMON_HEADER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_COMMON_HEADER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_COMMON_HEADER__bindgen_ty_1>(), - 48usize, - concat!("Size of: ", stringify!(_PCI_COMMON_HEADER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_COMMON_HEADER__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_COMMON_HEADER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).type0) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1), - "::", - stringify!(type0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).type1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1), - "::", - stringify!(type1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).type2) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER__bindgen_ty_1), - "::", - stringify!(type2), - ), - ); -} -impl Default for _PCI_COMMON_HEADER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PCI_COMMON_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_COMMON_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_COMMON_HEADER>(), - 64usize, - concat!("Size of: ", stringify!(_PCI_COMMON_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_COMMON_HEADER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_COMMON_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VendorID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER), - "::", - stringify!(VendorID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceID) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER), - "::", - stringify!(DeviceID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Command) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER), - "::", - stringify!(Command), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RevisionID) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER), - "::", - stringify!(RevisionID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProgIf) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER), - "::", - stringify!(ProgIf), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubClass) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER), - "::", - stringify!(SubClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseClass) as usize - ptr as usize }, - 11usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER), - "::", - stringify!(BaseClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CacheLineSize) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER), - "::", - stringify!(CacheLineSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LatencyTimer) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER), - "::", - stringify!(LatencyTimer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HeaderType) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER), - "::", - stringify!(HeaderType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BIST) as usize - ptr as usize }, - 15usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_HEADER), - "::", - stringify!(BIST), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_PCI_COMMON_HEADER), "::", stringify!(u)), - ); -} -impl Default for _PCI_COMMON_HEADER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_COMMON_HEADER = _PCI_COMMON_HEADER; -pub type PPCI_COMMON_HEADER = *mut _PCI_COMMON_HEADER; -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct _PCI_COMMON_CONFIG { - pub __bindgen_padding_0: [u8; 64usize], - pub DeviceSpecific: [UCHAR; 192usize], -} -#[test] -fn bindgen_test_layout__PCI_COMMON_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_COMMON_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_COMMON_CONFIG>(), - 256usize, - concat!("Size of: ", stringify!(_PCI_COMMON_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_COMMON_CONFIG>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_COMMON_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceSpecific) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_PCI_COMMON_CONFIG), - "::", - stringify!(DeviceSpecific), - ), - ); -} -impl Default for _PCI_COMMON_CONFIG { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_COMMON_CONFIG = _PCI_COMMON_CONFIG; -pub type PPCI_COMMON_CONFIG = *mut _PCI_COMMON_CONFIG; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_CAPABILITIES_HEADER { - pub CapabilityID: UCHAR, - pub Next: UCHAR, -} -#[test] -fn bindgen_test_layout__PCI_CAPABILITIES_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_CAPABILITIES_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_CAPABILITIES_HEADER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_CAPABILITIES_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_CAPABILITIES_HEADER>(), - 1usize, - concat!("Alignment of ", stringify!(_PCI_CAPABILITIES_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CapabilityID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_CAPABILITIES_HEADER), - "::", - stringify!(CapabilityID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Next) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_PCI_CAPABILITIES_HEADER), - "::", - stringify!(Next), - ), - ); -} -pub type PCI_CAPABILITIES_HEADER = _PCI_CAPABILITIES_HEADER; -pub type PPCI_CAPABILITIES_HEADER = *mut _PCI_CAPABILITIES_HEADER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_PMC { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - pub Support: _PCI_PMC__PM_SUPPORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_PMC__PM_SUPPORT { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__PCI_PMC__PM_SUPPORT() { - assert_eq!( - ::core::mem::size_of::<_PCI_PMC__PM_SUPPORT>(), - 1usize, - concat!("Size of: ", stringify!(_PCI_PMC__PM_SUPPORT)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_PMC__PM_SUPPORT>(), - 1usize, - concat!("Alignment of ", stringify!(_PCI_PMC__PM_SUPPORT)), - ); -} -impl _PCI_PMC__PM_SUPPORT { - #[inline] - pub fn Rsvd2(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn D1(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_D1(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn D2(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) } - } - #[inline] - pub fn set_D2(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn PMED0(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) } - } - #[inline] - pub fn set_PMED0(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn PMED1(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) } - } - #[inline] - pub fn set_PMED1(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn PMED2(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) } - } - #[inline] - pub fn set_PMED2(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn PMED3Hot(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) } - } - #[inline] - pub fn set_PMED3Hot(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn PMED3Cold(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) } - } - #[inline] - pub fn set_PMED3Cold(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Rsvd2: UCHAR, - D1: UCHAR, - D2: UCHAR, - PMED0: UCHAR, - PMED1: UCHAR, - PMED2: UCHAR, - PMED3Hot: UCHAR, - PMED3Cold: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Rsvd2: u8 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let D1: u8 = unsafe { ::core::mem::transmute(D1) }; - D1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let D2: u8 = unsafe { ::core::mem::transmute(D2) }; - D2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let PMED0: u8 = unsafe { ::core::mem::transmute(PMED0) }; - PMED0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let PMED1: u8 = unsafe { ::core::mem::transmute(PMED1) }; - PMED1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let PMED2: u8 = unsafe { ::core::mem::transmute(PMED2) }; - PMED2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let PMED3Hot: u8 = unsafe { ::core::mem::transmute(PMED3Hot) }; - PMED3Hot as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let PMED3Cold: u8 = unsafe { ::core::mem::transmute(PMED3Cold) }; - PMED3Cold as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_PMC() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_PMC> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_PMC>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_PMC)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_PMC>(), - 1usize, - concat!("Alignment of ", stringify!(_PCI_PMC)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Support) as usize - ptr as usize }, - 1usize, - concat!("Offset of field: ", stringify!(_PCI_PMC), "::", stringify!(Support)), - ); -} -impl _PCI_PMC { - #[inline] - pub fn Version(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u8) } - } - #[inline] - pub fn set_Version(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn PMEClock(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) } - } - #[inline] - pub fn set_PMEClock(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn DeviceSpecificInitialization(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) } - } - #[inline] - pub fn set_DeviceSpecificInitialization(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u8) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 2u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Version: UCHAR, - PMEClock: UCHAR, - Rsvd1: UCHAR, - DeviceSpecificInitialization: UCHAR, - Rsvd2: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let Version: u8 = unsafe { ::core::mem::transmute(Version) }; - Version as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let PMEClock: u8 = unsafe { ::core::mem::transmute(PMEClock) }; - PMEClock as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let Rsvd1: u8 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let DeviceSpecificInitialization: u8 = unsafe { - ::core::mem::transmute(DeviceSpecificInitialization) - }; - DeviceSpecificInitialization as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 2u8, - { - let Rsvd2: u8 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type PCI_PMC = _PCI_PMC; -pub type PPCI_PMC = *mut _PCI_PMC; -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_PMCSR { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_PMCSR() { - assert_eq!( - ::core::mem::size_of::<_PCI_PMCSR>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_PMCSR)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_PMCSR>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_PMCSR)), - ); -} -impl _PCI_PMCSR { - #[inline] - pub fn PowerState(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u16) } - } - #[inline] - pub fn set_PowerState(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 2u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn NoSoftReset(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_NoSoftReset(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 4u8, val as u64) - } - } - #[inline] - pub fn PMEEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } - } - #[inline] - pub fn set_PMEEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn DataSelect(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 4u8) as u16) } - } - #[inline] - pub fn set_DataSelect(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 4u8, val as u64) - } - } - #[inline] - pub fn DataScale(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 2u8) as u16) } - } - #[inline] - pub fn set_DataScale(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 2u8, val as u64) - } - } - #[inline] - pub fn PMEStatus(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } - } - #[inline] - pub fn set_PMEStatus(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PowerState: USHORT, - Rsvd1: USHORT, - NoSoftReset: USHORT, - Rsvd2: USHORT, - PMEEnable: USHORT, - DataSelect: USHORT, - DataScale: USHORT, - PMEStatus: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 2u8, - { - let PowerState: u16 = unsafe { ::core::mem::transmute(PowerState) }; - PowerState as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Rsvd1: u16 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let NoSoftReset: u16 = unsafe { - ::core::mem::transmute(NoSoftReset) - }; - NoSoftReset as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 4u8, - { - let Rsvd2: u16 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let PMEEnable: u16 = unsafe { ::core::mem::transmute(PMEEnable) }; - PMEEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 4u8, - { - let DataSelect: u16 = unsafe { ::core::mem::transmute(DataSelect) }; - DataSelect as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 2u8, - { - let DataScale: u16 = unsafe { ::core::mem::transmute(DataScale) }; - DataScale as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let PMEStatus: u16 = unsafe { ::core::mem::transmute(PMEStatus) }; - PMEStatus as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type PCI_PMCSR = _PCI_PMCSR; -pub type PPCI_PMCSR = *mut _PCI_PMCSR; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_PMCSR_BSE { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__PCI_PMCSR_BSE() { - assert_eq!( - ::core::mem::size_of::<_PCI_PMCSR_BSE>(), - 1usize, - concat!("Size of: ", stringify!(_PCI_PMCSR_BSE)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_PMCSR_BSE>(), - 1usize, - concat!("Alignment of ", stringify!(_PCI_PMCSR_BSE)), - ); -} -impl _PCI_PMCSR_BSE { - #[inline] - pub fn Rsvd1(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 6u8) as u8) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 6u8, val as u64) - } - } - #[inline] - pub fn D3HotSupportsStopClock(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) } - } - #[inline] - pub fn set_D3HotSupportsStopClock(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn BusPowerClockControlEnabled(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) } - } - #[inline] - pub fn set_BusPowerClockControlEnabled(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Rsvd1: UCHAR, - D3HotSupportsStopClock: UCHAR, - BusPowerClockControlEnabled: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 6u8, - { - let Rsvd1: u8 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let D3HotSupportsStopClock: u8 = unsafe { - ::core::mem::transmute(D3HotSupportsStopClock) - }; - D3HotSupportsStopClock as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let BusPowerClockControlEnabled: u8 = unsafe { - ::core::mem::transmute(BusPowerClockControlEnabled) - }; - BusPowerClockControlEnabled as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type PCI_PMCSR_BSE = _PCI_PMCSR_BSE; -pub type PPCI_PMCSR_BSE = *mut _PCI_PMCSR_BSE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_PM_CAPABILITY { - pub Header: PCI_CAPABILITIES_HEADER, - pub PMC: _PCI_PM_CAPABILITY__bindgen_ty_1, - pub PMCSR: _PCI_PM_CAPABILITY__bindgen_ty_2, - pub PMCSR_BSE: _PCI_PM_CAPABILITY__bindgen_ty_3, - pub Data: UCHAR, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_PM_CAPABILITY__bindgen_ty_1 { - pub Capabilities: PCI_PMC, - pub AsUSHORT: USHORT, -} -#[test] -fn bindgen_test_layout__PCI_PM_CAPABILITY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_PM_CAPABILITY__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_PM_CAPABILITY__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_PM_CAPABILITY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_PM_CAPABILITY__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_PM_CAPABILITY__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capabilities) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_PM_CAPABILITY__bindgen_ty_1), - "::", - stringify!(Capabilities), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_PM_CAPABILITY__bindgen_ty_1), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_PM_CAPABILITY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_PM_CAPABILITY__bindgen_ty_2 { - pub ControlStatus: PCI_PMCSR, - pub AsUSHORT: USHORT, -} -#[test] -fn bindgen_test_layout__PCI_PM_CAPABILITY__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_PM_CAPABILITY__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_PM_CAPABILITY__bindgen_ty_2>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_PM_CAPABILITY__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_PM_CAPABILITY__bindgen_ty_2>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_PM_CAPABILITY__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ControlStatus) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_PM_CAPABILITY__bindgen_ty_2), - "::", - stringify!(ControlStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_PM_CAPABILITY__bindgen_ty_2), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_PM_CAPABILITY__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_PM_CAPABILITY__bindgen_ty_3 { - pub BridgeSupport: PCI_PMCSR_BSE, - pub AsUCHAR: UCHAR, -} -#[test] -fn bindgen_test_layout__PCI_PM_CAPABILITY__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_PM_CAPABILITY__bindgen_ty_3> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_PM_CAPABILITY__bindgen_ty_3>(), - 1usize, - concat!("Size of: ", stringify!(_PCI_PM_CAPABILITY__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_PM_CAPABILITY__bindgen_ty_3>(), - 1usize, - concat!("Alignment of ", stringify!(_PCI_PM_CAPABILITY__bindgen_ty_3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BridgeSupport) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_PM_CAPABILITY__bindgen_ty_3), - "::", - stringify!(BridgeSupport), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUCHAR) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_PM_CAPABILITY__bindgen_ty_3), - "::", - stringify!(AsUCHAR), - ), - ); -} -impl Default for _PCI_PM_CAPABILITY__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PCI_PM_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_PM_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_PM_CAPABILITY>(), - 8usize, - concat!("Size of: ", stringify!(_PCI_PM_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_PM_CAPABILITY>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_PM_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_PM_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PMC) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_PM_CAPABILITY), - "::", - stringify!(PMC), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PMCSR) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_PM_CAPABILITY), - "::", - stringify!(PMCSR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PMCSR_BSE) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_PCI_PM_CAPABILITY), - "::", - stringify!(PMCSR_BSE), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(_PCI_PM_CAPABILITY), - "::", - stringify!(Data), - ), - ); -} -impl Default for _PCI_PM_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_PM_CAPABILITY = _PCI_PM_CAPABILITY; -pub type PPCI_PM_CAPABILITY = *mut _PCI_PM_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct PCI_X_CAPABILITY { - pub Header: PCI_CAPABILITIES_HEADER, - pub Command: PCI_X_CAPABILITY__bindgen_ty_1, - pub Status: PCI_X_CAPABILITY__bindgen_ty_2, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union PCI_X_CAPABILITY__bindgen_ty_1 { - pub bits: PCI_X_CAPABILITY__bindgen_ty_1__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct PCI_X_CAPABILITY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout_PCI_X_CAPABILITY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(PCI_X_CAPABILITY__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::(), - 2usize, - concat!( - "Alignment of ", - stringify!(PCI_X_CAPABILITY__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl PCI_X_CAPABILITY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn DataParityErrorRecoveryEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_DataParityErrorRecoveryEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableRelaxedOrdering(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_EnableRelaxedOrdering(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn MaxMemoryReadByteCount(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u16) } - } - #[inline] - pub fn set_MaxMemoryReadByteCount(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 2u8, val as u64) - } - } - #[inline] - pub fn MaxOutstandingSplitTransactions(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 3u8) as u16) } - } - #[inline] - pub fn set_MaxOutstandingSplitTransactions(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 3u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 9u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 9u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - DataParityErrorRecoveryEnable: USHORT, - EnableRelaxedOrdering: USHORT, - MaxMemoryReadByteCount: USHORT, - MaxOutstandingSplitTransactions: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let DataParityErrorRecoveryEnable: u16 = unsafe { - ::core::mem::transmute(DataParityErrorRecoveryEnable) - }; - DataParityErrorRecoveryEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let EnableRelaxedOrdering: u16 = unsafe { - ::core::mem::transmute(EnableRelaxedOrdering) - }; - EnableRelaxedOrdering as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 2u8, - { - let MaxMemoryReadByteCount: u16 = unsafe { - ::core::mem::transmute(MaxMemoryReadByteCount) - }; - MaxMemoryReadByteCount as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 3u8, - { - let MaxOutstandingSplitTransactions: u16 = unsafe { - ::core::mem::transmute(MaxOutstandingSplitTransactions) - }; - MaxOutstandingSplitTransactions as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 9u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout_PCI_X_CAPABILITY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(PCI_X_CAPABILITY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(PCI_X_CAPABILITY__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PCI_X_CAPABILITY__bindgen_ty_1), - "::", - stringify!(bits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PCI_X_CAPABILITY__bindgen_ty_1), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for PCI_X_CAPABILITY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union PCI_X_CAPABILITY__bindgen_ty_2 { - pub bits: PCI_X_CAPABILITY__bindgen_ty_2__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct PCI_X_CAPABILITY__bindgen_ty_2__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout_PCI_X_CAPABILITY__bindgen_ty_2__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(PCI_X_CAPABILITY__bindgen_ty_2__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(PCI_X_CAPABILITY__bindgen_ty_2__bindgen_ty_1), - ), - ); -} -impl PCI_X_CAPABILITY__bindgen_ty_2__bindgen_ty_1 { - #[inline] - pub fn FunctionNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u32) } - } - #[inline] - pub fn set_FunctionNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn DeviceNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) } - } - #[inline] - pub fn set_DeviceNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn BusNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_BusNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn Device64Bit(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_Device64Bit(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn Capable133MHz(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_Capable133MHz(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn SplitCompletionDiscarded(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_SplitCompletionDiscarded(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnexpectedSplitCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } - } - #[inline] - pub fn set_UnexpectedSplitCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 1u8, val as u64) - } - } - #[inline] - pub fn DeviceComplexity(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } - } - #[inline] - pub fn set_DeviceComplexity(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 1u8, val as u64) - } - } - #[inline] - pub fn DesignedMaxMemoryReadByteCount(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 2u8) as u32) } - } - #[inline] - pub fn set_DesignedMaxMemoryReadByteCount(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 2u8, val as u64) - } - } - #[inline] - pub fn DesignedMaxOutstandingSplitTransactions(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 3u8) as u32) } - } - #[inline] - pub fn set_DesignedMaxOutstandingSplitTransactions(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(23usize, 3u8, val as u64) - } - } - #[inline] - pub fn DesignedMaxCumulativeReadSize(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 3u8) as u32) } - } - #[inline] - pub fn set_DesignedMaxCumulativeReadSize(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(26usize, 3u8, val as u64) - } - } - #[inline] - pub fn ReceivedSplitCompletionErrorMessage(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReceivedSplitCompletionErrorMessage(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(29usize, 1u8, val as u64) - } - } - #[inline] - pub fn CapablePCIX266(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) } - } - #[inline] - pub fn set_CapablePCIX266(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(30usize, 1u8, val as u64) - } - } - #[inline] - pub fn CapablePCIX533(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_CapablePCIX533(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - FunctionNumber: ULONG, - DeviceNumber: ULONG, - BusNumber: ULONG, - Device64Bit: ULONG, - Capable133MHz: ULONG, - SplitCompletionDiscarded: ULONG, - UnexpectedSplitCompletion: ULONG, - DeviceComplexity: ULONG, - DesignedMaxMemoryReadByteCount: ULONG, - DesignedMaxOutstandingSplitTransactions: ULONG, - DesignedMaxCumulativeReadSize: ULONG, - ReceivedSplitCompletionErrorMessage: ULONG, - CapablePCIX266: ULONG, - CapablePCIX533: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let FunctionNumber: u32 = unsafe { - ::core::mem::transmute(FunctionNumber) - }; - FunctionNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let DeviceNumber: u32 = unsafe { - ::core::mem::transmute(DeviceNumber) - }; - DeviceNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let BusNumber: u32 = unsafe { ::core::mem::transmute(BusNumber) }; - BusNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let Device64Bit: u32 = unsafe { - ::core::mem::transmute(Device64Bit) - }; - Device64Bit as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let Capable133MHz: u32 = unsafe { - ::core::mem::transmute(Capable133MHz) - }; - Capable133MHz as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let SplitCompletionDiscarded: u32 = unsafe { - ::core::mem::transmute(SplitCompletionDiscarded) - }; - SplitCompletionDiscarded as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 1u8, - { - let UnexpectedSplitCompletion: u32 = unsafe { - ::core::mem::transmute(UnexpectedSplitCompletion) - }; - UnexpectedSplitCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 1u8, - { - let DeviceComplexity: u32 = unsafe { - ::core::mem::transmute(DeviceComplexity) - }; - DeviceComplexity as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 2u8, - { - let DesignedMaxMemoryReadByteCount: u32 = unsafe { - ::core::mem::transmute(DesignedMaxMemoryReadByteCount) - }; - DesignedMaxMemoryReadByteCount as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 23usize, - 3u8, - { - let DesignedMaxOutstandingSplitTransactions: u32 = unsafe { - ::core::mem::transmute(DesignedMaxOutstandingSplitTransactions) - }; - DesignedMaxOutstandingSplitTransactions as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 26usize, - 3u8, - { - let DesignedMaxCumulativeReadSize: u32 = unsafe { - ::core::mem::transmute(DesignedMaxCumulativeReadSize) - }; - DesignedMaxCumulativeReadSize as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 29usize, - 1u8, - { - let ReceivedSplitCompletionErrorMessage: u32 = unsafe { - ::core::mem::transmute(ReceivedSplitCompletionErrorMessage) - }; - ReceivedSplitCompletionErrorMessage as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 30usize, - 1u8, - { - let CapablePCIX266: u32 = unsafe { - ::core::mem::transmute(CapablePCIX266) - }; - CapablePCIX266 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 31usize, - 1u8, - { - let CapablePCIX533: u32 = unsafe { - ::core::mem::transmute(CapablePCIX533) - }; - CapablePCIX533 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout_PCI_X_CAPABILITY__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(PCI_X_CAPABILITY__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(PCI_X_CAPABILITY__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PCI_X_CAPABILITY__bindgen_ty_2), - "::", - stringify!(bits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PCI_X_CAPABILITY__bindgen_ty_2), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for PCI_X_CAPABILITY__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout_PCI_X_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(PCI_X_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(PCI_X_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PCI_X_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Command) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(PCI_X_CAPABILITY), - "::", - stringify!(Command), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(PCI_X_CAPABILITY), - "::", - stringify!(Status), - ), - ); -} -impl Default for PCI_X_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PPCI_X_CAPABILITY = *mut PCI_X_CAPABILITY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER { - pub CapabilityID: USHORT, - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CapabilityID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER), - "::", - stringify!(CapabilityID), - ), - ); -} -impl _PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER { - #[inline] - pub fn Version(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u16) } - } - #[inline] - pub fn set_Version(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn Next(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 12u8) as u16) } - } - #[inline] - pub fn set_Next(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 12u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Version: USHORT, - Next: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let Version: u16 = unsafe { ::core::mem::transmute(Version) }; - Version as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 12u8, - { - let Next: u16 = unsafe { ::core::mem::transmute(Next) }; - Next as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER = _PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER; -pub type PPCI_EXPRESS_ENHANCED_CAPABILITY_HEADER = *mut _PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub VsecId: USHORT, - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY>(), - 8usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VsecId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY), - "::", - stringify!(VsecId), - ), - ); -} -impl _PCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY { - #[inline] - pub fn VsecRev(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u16) } - } - #[inline] - pub fn set_VsecRev(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn VsecLength(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 12u8) as u16) } - } - #[inline] - pub fn set_VsecLength(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 12u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - VsecRev: USHORT, - VsecLength: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let VsecRev: u16 = unsafe { ::core::mem::transmute(VsecRev) }; - VsecRev as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 12u8, - { - let VsecLength: u16 = unsafe { ::core::mem::transmute(VsecLength) }; - VsecLength as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type PCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY = _PCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY; -pub type PPCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY = *mut _PCI_EXPRESS_VENDOR_SPECIFIC_CAPABILITY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_SERIAL_NUMBER_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub LowSerialNumber: ULONG, - pub HighSerialNumber: ULONG, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SERIAL_NUMBER_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_SERIAL_NUMBER_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SERIAL_NUMBER_CAPABILITY>(), - 12usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SERIAL_NUMBER_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SERIAL_NUMBER_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SERIAL_NUMBER_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SERIAL_NUMBER_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowSerialNumber) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SERIAL_NUMBER_CAPABILITY), - "::", - stringify!(LowSerialNumber), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HighSerialNumber) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SERIAL_NUMBER_CAPABILITY), - "::", - stringify!(HighSerialNumber), - ), - ); -} -pub type PCI_EXPRESS_SERIAL_NUMBER_CAPABILITY = _PCI_EXPRESS_SERIAL_NUMBER_CAPABILITY; -pub type PPCI_EXPRESS_SERIAL_NUMBER_CAPABILITY = *mut _PCI_EXPRESS_SERIAL_NUMBER_CAPABILITY; -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ARI_CAPABILITY_REGISTER { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ARI_CAPABILITY_REGISTER() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ARI_CAPABILITY_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ARI_CAPABILITY_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ARI_CAPABILITY_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ARI_CAPABILITY_REGISTER)), - ); -} -impl _PCI_EXPRESS_ARI_CAPABILITY_REGISTER { - #[inline] - pub fn MfvcFunctionGroupsCapability(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_MfvcFunctionGroupsCapability(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn AcsFunctionGroupsCapability(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_AcsFunctionGroupsCapability(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 6u8, val as u64) - } - } - #[inline] - pub fn NextFunctionNumber(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u16) } - } - #[inline] - pub fn set_NextFunctionNumber(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MfvcFunctionGroupsCapability: USHORT, - AcsFunctionGroupsCapability: USHORT, - Reserved: USHORT, - NextFunctionNumber: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let MfvcFunctionGroupsCapability: u16 = unsafe { - ::core::mem::transmute(MfvcFunctionGroupsCapability) - }; - MfvcFunctionGroupsCapability as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let AcsFunctionGroupsCapability: u16 = unsafe { - ::core::mem::transmute(AcsFunctionGroupsCapability) - }; - AcsFunctionGroupsCapability as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 6u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let NextFunctionNumber: u16 = unsafe { - ::core::mem::transmute(NextFunctionNumber) - }; - NextFunctionNumber as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type PCI_EXPRESS_ARI_CAPABILITY_REGISTER = _PCI_EXPRESS_ARI_CAPABILITY_REGISTER; -pub type PPCI_EXPRESS_ARI_CAPABILITY_REGISTER = *mut _PCI_EXPRESS_ARI_CAPABILITY_REGISTER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ARI_CONTROL_REGISTER { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ARI_CONTROL_REGISTER() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ARI_CONTROL_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ARI_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ARI_CONTROL_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ARI_CONTROL_REGISTER)), - ); -} -impl _PCI_EXPRESS_ARI_CONTROL_REGISTER { - #[inline] - pub fn MfvcFunctionGroupsEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_MfvcFunctionGroupsEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn AcsFunctionGroupsEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_AcsFunctionGroupsEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u16) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 2u8, val as u64) - } - } - #[inline] - pub fn FunctionGroup(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 3u8) as u16) } - } - #[inline] - pub fn set_FunctionGroup(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 3u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 9u8) as u16) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 9u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MfvcFunctionGroupsEnable: USHORT, - AcsFunctionGroupsEnable: USHORT, - Reserved1: USHORT, - FunctionGroup: USHORT, - Reserved2: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let MfvcFunctionGroupsEnable: u16 = unsafe { - ::core::mem::transmute(MfvcFunctionGroupsEnable) - }; - MfvcFunctionGroupsEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let AcsFunctionGroupsEnable: u16 = unsafe { - ::core::mem::transmute(AcsFunctionGroupsEnable) - }; - AcsFunctionGroupsEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 2u8, - { - let Reserved1: u16 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 3u8, - { - let FunctionGroup: u16 = unsafe { - ::core::mem::transmute(FunctionGroup) - }; - FunctionGroup as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 9u8, - { - let Reserved2: u16 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type PCI_EXPRESS_ARI_CONTROL_REGISTER = _PCI_EXPRESS_ARI_CONTROL_REGISTER; -pub type PPCI_EXPRESS_ARI_CONTROL_REGISTER = *mut _PCI_EXPRESS_ARI_CONTROL_REGISTER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ARI_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub Capability: PCI_EXPRESS_ARI_CAPABILITY_REGISTER, - pub Control: PCI_EXPRESS_ARI_CONTROL_REGISTER, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ARI_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ARI_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ARI_CAPABILITY>(), - 8usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ARI_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ARI_CAPABILITY>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ARI_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ARI_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capability) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ARI_CAPABILITY), - "::", - stringify!(Capability), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ARI_CAPABILITY), - "::", - stringify!(Control), - ), - ); -} -pub type PCI_EXPRESS_ARI_CAPABILITY = _PCI_EXPRESS_ARI_CAPABILITY; -pub type PPCI_EXPRESS_ARI_CAPABILITY = *mut _PCI_EXPRESS_ARI_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _VIRTUAL_CHANNEL_CAPABILITIES1 { - pub __bindgen_anon_1: _VIRTUAL_CHANNEL_CAPABILITIES1__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VIRTUAL_CHANNEL_CAPABILITIES1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__VIRTUAL_CHANNEL_CAPABILITIES1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_CHANNEL_CAPABILITIES1__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_VIRTUAL_CHANNEL_CAPABILITIES1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_CHANNEL_CAPABILITIES1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_VIRTUAL_CHANNEL_CAPABILITIES1__bindgen_ty_1), - ), - ); -} -impl _VIRTUAL_CHANNEL_CAPABILITIES1__bindgen_ty_1 { - #[inline] - pub fn ExtendedVCCount(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u32) } - } - #[inline] - pub fn set_ExtendedVCCount(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn RsvdP1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_RsvdP1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn LowPriorityExtendedVCCount(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 3u8) as u32) } - } - #[inline] - pub fn set_LowPriorityExtendedVCCount(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 3u8, val as u64) - } - } - #[inline] - pub fn RsvdP2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_RsvdP2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReferenceClock(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u32) } - } - #[inline] - pub fn set_ReferenceClock(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 2u8, val as u64) - } - } - #[inline] - pub fn PortArbitrationTableEntrySize(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u32) } - } - #[inline] - pub fn set_PortArbitrationTableEntrySize(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 2u8, val as u64) - } - } - #[inline] - pub fn RsvdP3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 20u8) as u32) } - } - #[inline] - pub fn set_RsvdP3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 20u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ExtendedVCCount: ULONG, - RsvdP1: ULONG, - LowPriorityExtendedVCCount: ULONG, - RsvdP2: ULONG, - ReferenceClock: ULONG, - PortArbitrationTableEntrySize: ULONG, - RsvdP3: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let ExtendedVCCount: u32 = unsafe { - ::core::mem::transmute(ExtendedVCCount) - }; - ExtendedVCCount as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let RsvdP1: u32 = unsafe { ::core::mem::transmute(RsvdP1) }; - RsvdP1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 3u8, - { - let LowPriorityExtendedVCCount: u32 = unsafe { - ::core::mem::transmute(LowPriorityExtendedVCCount) - }; - LowPriorityExtendedVCCount as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let RsvdP2: u32 = unsafe { ::core::mem::transmute(RsvdP2) }; - RsvdP2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 2u8, - { - let ReferenceClock: u32 = unsafe { - ::core::mem::transmute(ReferenceClock) - }; - ReferenceClock as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 2u8, - { - let PortArbitrationTableEntrySize: u32 = unsafe { - ::core::mem::transmute(PortArbitrationTableEntrySize) - }; - PortArbitrationTableEntrySize as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 20u8, - { - let RsvdP3: u32 = unsafe { ::core::mem::transmute(RsvdP3) }; - RsvdP3 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__VIRTUAL_CHANNEL_CAPABILITIES1() { - const UNINIT: ::core::mem::MaybeUninit<_VIRTUAL_CHANNEL_CAPABILITIES1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_CHANNEL_CAPABILITIES1>(), - 4usize, - concat!("Size of: ", stringify!(_VIRTUAL_CHANNEL_CAPABILITIES1)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_CHANNEL_CAPABILITIES1>(), - 4usize, - concat!("Alignment of ", stringify!(_VIRTUAL_CHANNEL_CAPABILITIES1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_CHANNEL_CAPABILITIES1), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _VIRTUAL_CHANNEL_CAPABILITIES1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type VIRTUAL_CHANNEL_CAPABILITIES1 = _VIRTUAL_CHANNEL_CAPABILITIES1; -pub type PVIRTUAL_CHANNEL_CAPABILITIES1 = *mut _VIRTUAL_CHANNEL_CAPABILITIES1; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _VIRTUAL_CHANNEL_CAPABILITIES2 { - pub __bindgen_anon_1: _VIRTUAL_CHANNEL_CAPABILITIES2__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VIRTUAL_CHANNEL_CAPABILITIES2__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__VIRTUAL_CHANNEL_CAPABILITIES2__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_CHANNEL_CAPABILITIES2__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_VIRTUAL_CHANNEL_CAPABILITIES2__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_CHANNEL_CAPABILITIES2__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_VIRTUAL_CHANNEL_CAPABILITIES2__bindgen_ty_1), - ), - ); -} -impl _VIRTUAL_CHANNEL_CAPABILITIES2__bindgen_ty_1 { - #[inline] - pub fn VCArbitrationCapability(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set_VCArbitrationCapability(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn RsvdP(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 16u8) as u32) } - } - #[inline] - pub fn set_RsvdP(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 16u8, val as u64) - } - } - #[inline] - pub fn VCArbitrationTableOffset(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_VCArbitrationTableOffset(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - VCArbitrationCapability: ULONG, - RsvdP: ULONG, - VCArbitrationTableOffset: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let VCArbitrationCapability: u32 = unsafe { - ::core::mem::transmute(VCArbitrationCapability) - }; - VCArbitrationCapability as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 16u8, - { - let RsvdP: u32 = unsafe { ::core::mem::transmute(RsvdP) }; - RsvdP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let VCArbitrationTableOffset: u32 = unsafe { - ::core::mem::transmute(VCArbitrationTableOffset) - }; - VCArbitrationTableOffset as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__VIRTUAL_CHANNEL_CAPABILITIES2() { - const UNINIT: ::core::mem::MaybeUninit<_VIRTUAL_CHANNEL_CAPABILITIES2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_CHANNEL_CAPABILITIES2>(), - 4usize, - concat!("Size of: ", stringify!(_VIRTUAL_CHANNEL_CAPABILITIES2)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_CHANNEL_CAPABILITIES2>(), - 4usize, - concat!("Alignment of ", stringify!(_VIRTUAL_CHANNEL_CAPABILITIES2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_CHANNEL_CAPABILITIES2), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _VIRTUAL_CHANNEL_CAPABILITIES2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type VIRTUAL_CHANNEL_CAPABILITIES2 = _VIRTUAL_CHANNEL_CAPABILITIES2; -pub type PVIRTUAL_CHANNEL_CAPABILITIES2 = *mut _VIRTUAL_CHANNEL_CAPABILITIES2; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _VIRTUAL_CHANNEL_CONTROL { - pub __bindgen_anon_1: _VIRTUAL_CHANNEL_CONTROL__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VIRTUAL_CHANNEL_CONTROL__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__VIRTUAL_CHANNEL_CONTROL__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_CHANNEL_CONTROL__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_VIRTUAL_CHANNEL_CONTROL__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_CHANNEL_CONTROL__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_VIRTUAL_CHANNEL_CONTROL__bindgen_ty_1)), - ); -} -impl _VIRTUAL_CHANNEL_CONTROL__bindgen_ty_1 { - #[inline] - pub fn LoadVCArbitrationTable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_LoadVCArbitrationTable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn VCArbitrationSelect(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u16) } - } - #[inline] - pub fn set_VCArbitrationSelect(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 3u8, val as u64) - } - } - #[inline] - pub fn RsvdP(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 12u8) as u16) } - } - #[inline] - pub fn set_RsvdP(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 12u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - LoadVCArbitrationTable: USHORT, - VCArbitrationSelect: USHORT, - RsvdP: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let LoadVCArbitrationTable: u16 = unsafe { - ::core::mem::transmute(LoadVCArbitrationTable) - }; - LoadVCArbitrationTable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 3u8, - { - let VCArbitrationSelect: u16 = unsafe { - ::core::mem::transmute(VCArbitrationSelect) - }; - VCArbitrationSelect as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 12u8, - { - let RsvdP: u16 = unsafe { ::core::mem::transmute(RsvdP) }; - RsvdP as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__VIRTUAL_CHANNEL_CONTROL() { - const UNINIT: ::core::mem::MaybeUninit<_VIRTUAL_CHANNEL_CONTROL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_CHANNEL_CONTROL>(), - 2usize, - concat!("Size of: ", stringify!(_VIRTUAL_CHANNEL_CONTROL)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_CHANNEL_CONTROL>(), - 2usize, - concat!("Alignment of ", stringify!(_VIRTUAL_CHANNEL_CONTROL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_CHANNEL_CONTROL), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _VIRTUAL_CHANNEL_CONTROL { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type VIRTUAL_CHANNEL_CONTROL = _VIRTUAL_CHANNEL_CONTROL; -pub type PVIRTUAL_CHANNEL_CONTROL = *mut _VIRTUAL_CHANNEL_CONTROL; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _VIRTUAL_CHANNEL_STATUS { - pub __bindgen_anon_1: _VIRTUAL_CHANNEL_STATUS__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VIRTUAL_CHANNEL_STATUS__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__VIRTUAL_CHANNEL_STATUS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_CHANNEL_STATUS__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_VIRTUAL_CHANNEL_STATUS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_CHANNEL_STATUS__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_VIRTUAL_CHANNEL_STATUS__bindgen_ty_1)), - ); -} -impl _VIRTUAL_CHANNEL_STATUS__bindgen_ty_1 { - #[inline] - pub fn VCArbitrationTableStatus(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_VCArbitrationTableStatus(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn RsvdZ(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 15u8) as u16) } - } - #[inline] - pub fn set_RsvdZ(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 15u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - VCArbitrationTableStatus: USHORT, - RsvdZ: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let VCArbitrationTableStatus: u16 = unsafe { - ::core::mem::transmute(VCArbitrationTableStatus) - }; - VCArbitrationTableStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 15u8, - { - let RsvdZ: u16 = unsafe { ::core::mem::transmute(RsvdZ) }; - RsvdZ as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__VIRTUAL_CHANNEL_STATUS() { - const UNINIT: ::core::mem::MaybeUninit<_VIRTUAL_CHANNEL_STATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_CHANNEL_STATUS>(), - 2usize, - concat!("Size of: ", stringify!(_VIRTUAL_CHANNEL_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_CHANNEL_STATUS>(), - 2usize, - concat!("Alignment of ", stringify!(_VIRTUAL_CHANNEL_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_CHANNEL_STATUS), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _VIRTUAL_CHANNEL_STATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type VIRTUAL_CHANNEL_STATUS = _VIRTUAL_CHANNEL_STATUS; -pub type PVIRTUAL_CHANNEL_STATUS = *mut _VIRTUAL_CHANNEL_STATUS; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _VIRTUAL_RESOURCE_CAPABILITY { - pub __bindgen_anon_1: _VIRTUAL_RESOURCE_CAPABILITY__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VIRTUAL_RESOURCE_CAPABILITY__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__VIRTUAL_RESOURCE_CAPABILITY__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_RESOURCE_CAPABILITY__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_VIRTUAL_RESOURCE_CAPABILITY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_RESOURCE_CAPABILITY__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_VIRTUAL_RESOURCE_CAPABILITY__bindgen_ty_1)), - ); -} -impl _VIRTUAL_RESOURCE_CAPABILITY__bindgen_ty_1 { - #[inline] - pub fn PortArbitrationCapability(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set_PortArbitrationCapability(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn RsvdP1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 6u8) as u32) } - } - #[inline] - pub fn set_RsvdP1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 6u8, val as u64) - } - } - #[inline] - pub fn Undefined(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } - } - #[inline] - pub fn set_Undefined(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn RejectSnoopTransactions(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } - } - #[inline] - pub fn set_RejectSnoopTransactions(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn MaximumTimeSlots(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 7u8) as u32) } - } - #[inline] - pub fn set_MaximumTimeSlots(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 7u8, val as u64) - } - } - #[inline] - pub fn RsvdP2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u32) } - } - #[inline] - pub fn set_RsvdP2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(23usize, 1u8, val as u64) - } - } - #[inline] - pub fn PortArbitrationTableOffset(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_PortArbitrationTableOffset(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PortArbitrationCapability: ULONG, - RsvdP1: ULONG, - Undefined: ULONG, - RejectSnoopTransactions: ULONG, - MaximumTimeSlots: ULONG, - RsvdP2: ULONG, - PortArbitrationTableOffset: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let PortArbitrationCapability: u32 = unsafe { - ::core::mem::transmute(PortArbitrationCapability) - }; - PortArbitrationCapability as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 6u8, - { - let RsvdP1: u32 = unsafe { ::core::mem::transmute(RsvdP1) }; - RsvdP1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 1u8, - { - let Undefined: u32 = unsafe { ::core::mem::transmute(Undefined) }; - Undefined as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let RejectSnoopTransactions: u32 = unsafe { - ::core::mem::transmute(RejectSnoopTransactions) - }; - RejectSnoopTransactions as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 7u8, - { - let MaximumTimeSlots: u32 = unsafe { - ::core::mem::transmute(MaximumTimeSlots) - }; - MaximumTimeSlots as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 23usize, - 1u8, - { - let RsvdP2: u32 = unsafe { ::core::mem::transmute(RsvdP2) }; - RsvdP2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let PortArbitrationTableOffset: u32 = unsafe { - ::core::mem::transmute(PortArbitrationTableOffset) - }; - PortArbitrationTableOffset as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__VIRTUAL_RESOURCE_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_VIRTUAL_RESOURCE_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_RESOURCE_CAPABILITY>(), - 4usize, - concat!("Size of: ", stringify!(_VIRTUAL_RESOURCE_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_RESOURCE_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_VIRTUAL_RESOURCE_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_RESOURCE_CAPABILITY), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _VIRTUAL_RESOURCE_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type VIRTUAL_RESOURCE_CAPABILITY = _VIRTUAL_RESOURCE_CAPABILITY; -pub type PVIRTUAL_RESOURCE_CAPABILITY = *mut _VIRTUAL_RESOURCE_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _VIRTUAL_RESOURCE_CONTROL { - pub __bindgen_anon_1: _VIRTUAL_RESOURCE_CONTROL__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VIRTUAL_RESOURCE_CONTROL__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__VIRTUAL_RESOURCE_CONTROL__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_RESOURCE_CONTROL__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_VIRTUAL_RESOURCE_CONTROL__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_RESOURCE_CONTROL__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_VIRTUAL_RESOURCE_CONTROL__bindgen_ty_1)), - ); -} -impl _VIRTUAL_RESOURCE_CONTROL__bindgen_ty_1 { - #[inline] - pub fn TcVcMap(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set_TcVcMap(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn RsvdP1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_RsvdP1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn LoadPortArbitrationTable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_LoadPortArbitrationTable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn PortArbitrationSelect(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 3u8) as u32) } - } - #[inline] - pub fn set_PortArbitrationSelect(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 3u8, val as u64) - } - } - #[inline] - pub fn RsvdP2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 4u8) as u32) } - } - #[inline] - pub fn set_RsvdP2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 4u8, val as u64) - } - } - #[inline] - pub fn VcID(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 3u8) as u32) } - } - #[inline] - pub fn set_VcID(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 3u8, val as u64) - } - } - #[inline] - pub fn RsvdP3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 4u8) as u32) } - } - #[inline] - pub fn set_RsvdP3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(27usize, 4u8, val as u64) - } - } - #[inline] - pub fn VcEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_VcEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TcVcMap: ULONG, - RsvdP1: ULONG, - LoadPortArbitrationTable: ULONG, - PortArbitrationSelect: ULONG, - RsvdP2: ULONG, - VcID: ULONG, - RsvdP3: ULONG, - VcEnable: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let TcVcMap: u32 = unsafe { ::core::mem::transmute(TcVcMap) }; - TcVcMap as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let RsvdP1: u32 = unsafe { ::core::mem::transmute(RsvdP1) }; - RsvdP1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let LoadPortArbitrationTable: u32 = unsafe { - ::core::mem::transmute(LoadPortArbitrationTable) - }; - LoadPortArbitrationTable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 3u8, - { - let PortArbitrationSelect: u32 = unsafe { - ::core::mem::transmute(PortArbitrationSelect) - }; - PortArbitrationSelect as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 4u8, - { - let RsvdP2: u32 = unsafe { ::core::mem::transmute(RsvdP2) }; - RsvdP2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 3u8, - { - let VcID: u32 = unsafe { ::core::mem::transmute(VcID) }; - VcID as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 27usize, - 4u8, - { - let RsvdP3: u32 = unsafe { ::core::mem::transmute(RsvdP3) }; - RsvdP3 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 31usize, - 1u8, - { - let VcEnable: u32 = unsafe { ::core::mem::transmute(VcEnable) }; - VcEnable as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__VIRTUAL_RESOURCE_CONTROL() { - const UNINIT: ::core::mem::MaybeUninit<_VIRTUAL_RESOURCE_CONTROL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_RESOURCE_CONTROL>(), - 4usize, - concat!("Size of: ", stringify!(_VIRTUAL_RESOURCE_CONTROL)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_RESOURCE_CONTROL>(), - 4usize, - concat!("Alignment of ", stringify!(_VIRTUAL_RESOURCE_CONTROL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_RESOURCE_CONTROL), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _VIRTUAL_RESOURCE_CONTROL { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type VIRTUAL_RESOURCE_CONTROL = _VIRTUAL_RESOURCE_CONTROL; -pub type PVIRTUAL_RESOURCE_CONTROL = *mut _VIRTUAL_RESOURCE_CONTROL; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _VIRTUAL_RESOURCE_STATUS { - pub __bindgen_anon_1: _VIRTUAL_RESOURCE_STATUS__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VIRTUAL_RESOURCE_STATUS__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__VIRTUAL_RESOURCE_STATUS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_RESOURCE_STATUS__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_VIRTUAL_RESOURCE_STATUS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_RESOURCE_STATUS__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_VIRTUAL_RESOURCE_STATUS__bindgen_ty_1)), - ); -} -impl _VIRTUAL_RESOURCE_STATUS__bindgen_ty_1 { - #[inline] - pub fn PortArbitrationTableStatus(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_PortArbitrationTableStatus(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn VcNegotiationPending(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_VcNegotiationPending(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn RsvdZ(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 14u8) as u16) } - } - #[inline] - pub fn set_RsvdZ(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 14u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PortArbitrationTableStatus: USHORT, - VcNegotiationPending: USHORT, - RsvdZ: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let PortArbitrationTableStatus: u16 = unsafe { - ::core::mem::transmute(PortArbitrationTableStatus) - }; - PortArbitrationTableStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let VcNegotiationPending: u16 = unsafe { - ::core::mem::transmute(VcNegotiationPending) - }; - VcNegotiationPending as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 14u8, - { - let RsvdZ: u16 = unsafe { ::core::mem::transmute(RsvdZ) }; - RsvdZ as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__VIRTUAL_RESOURCE_STATUS() { - const UNINIT: ::core::mem::MaybeUninit<_VIRTUAL_RESOURCE_STATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_RESOURCE_STATUS>(), - 2usize, - concat!("Size of: ", stringify!(_VIRTUAL_RESOURCE_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_RESOURCE_STATUS>(), - 2usize, - concat!("Alignment of ", stringify!(_VIRTUAL_RESOURCE_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_RESOURCE_STATUS), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _VIRTUAL_RESOURCE_STATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type VIRTUAL_RESOURCE_STATUS = _VIRTUAL_RESOURCE_STATUS; -pub type PVIRTUAL_RESOURCE_STATUS = *mut _VIRTUAL_RESOURCE_STATUS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _VIRTUAL_RESOURCE { - pub Capability: VIRTUAL_RESOURCE_CAPABILITY, - pub Control: VIRTUAL_RESOURCE_CONTROL, - pub RsvdP: USHORT, - pub Status: VIRTUAL_RESOURCE_STATUS, -} -#[test] -fn bindgen_test_layout__VIRTUAL_RESOURCE() { - const UNINIT: ::core::mem::MaybeUninit<_VIRTUAL_RESOURCE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_RESOURCE>(), - 12usize, - concat!("Size of: ", stringify!(_VIRTUAL_RESOURCE)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_RESOURCE>(), - 4usize, - concat!("Alignment of ", stringify!(_VIRTUAL_RESOURCE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capability) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_RESOURCE), - "::", - stringify!(Capability), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_RESOURCE), - "::", - stringify!(Control), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RsvdP) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_RESOURCE), - "::", - stringify!(RsvdP), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_RESOURCE), - "::", - stringify!(Status), - ), - ); -} -impl Default for _VIRTUAL_RESOURCE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type VIRTUAL_RESOURCE = _VIRTUAL_RESOURCE; -pub type PVIRTUAL_RESOURCE = *mut _VIRTUAL_RESOURCE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub Capabilities1: VIRTUAL_CHANNEL_CAPABILITIES1, - pub Capabilities2: VIRTUAL_CHANNEL_CAPABILITIES2, - pub Control: VIRTUAL_CHANNEL_CONTROL, - pub Status: VIRTUAL_CHANNEL_STATUS, - pub Resource: [VIRTUAL_RESOURCE; 8usize], -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY>(), - 112usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capabilities1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY), - "::", - stringify!(Capabilities1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capabilities2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY), - "::", - stringify!(Capabilities2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY), - "::", - stringify!(Control), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Resource) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY), - "::", - stringify!(Resource), - ), - ); -} -impl Default for _PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY = _PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY; -pub type PPCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY = *mut _PCI_EXPRESS_VIRTUAL_CHANNEL_CAPABILITY; -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ATS_CAPABILITY_REGISTER { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ATS_CAPABILITY_REGISTER() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ATS_CAPABILITY_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ATS_CAPABILITY_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ATS_CAPABILITY_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ATS_CAPABILITY_REGISTER)), - ); -} -impl _PCI_EXPRESS_ATS_CAPABILITY_REGISTER { - #[inline] - pub fn InvalidateQueueDepth(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u16) } - } - #[inline] - pub fn set_InvalidateQueueDepth(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 5u8, val as u64) - } - } - #[inline] - pub fn PageAlignedRequest(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_PageAlignedRequest(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn GlobalInvalidateSupported(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set_GlobalInvalidateSupported(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn RelaxedOrderingSupported(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } - } - #[inline] - pub fn set_RelaxedOrderingSupported(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - InvalidateQueueDepth: USHORT, - PageAlignedRequest: USHORT, - GlobalInvalidateSupported: USHORT, - RelaxedOrderingSupported: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 5u8, - { - let InvalidateQueueDepth: u16 = unsafe { - ::core::mem::transmute(InvalidateQueueDepth) - }; - InvalidateQueueDepth as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let PageAlignedRequest: u16 = unsafe { - ::core::mem::transmute(PageAlignedRequest) - }; - PageAlignedRequest as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let GlobalInvalidateSupported: u16 = unsafe { - ::core::mem::transmute(GlobalInvalidateSupported) - }; - GlobalInvalidateSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let RelaxedOrderingSupported: u16 = unsafe { - ::core::mem::transmute(RelaxedOrderingSupported) - }; - RelaxedOrderingSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type PCI_EXPRESS_ATS_CAPABILITY_REGISTER = _PCI_EXPRESS_ATS_CAPABILITY_REGISTER; -pub type PPCI_EXPRESS_ATS_CAPABILITY_REGISTER = *mut _PCI_EXPRESS_ATS_CAPABILITY_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_ATS_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_ATS_CONTROL_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ATS_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ATS_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ATS_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ATS_CONTROL_REGISTER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ATS_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_ATS_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_ATS_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn SmallestTransactionUnit(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u16) } - } - #[inline] - pub fn set_SmallestTransactionUnit(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 5u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 10u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 10u8, val as u64) - } - } - #[inline] - pub fn Enable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } - } - #[inline] - pub fn set_Enable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - SmallestTransactionUnit: USHORT, - Reserved: USHORT, - Enable: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 5u8, - { - let SmallestTransactionUnit: u16 = unsafe { - ::core::mem::transmute(SmallestTransactionUnit) - }; - SmallestTransactionUnit as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 10u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let Enable: u16 = unsafe { ::core::mem::transmute(Enable) }; - Enable as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ATS_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ATS_CONTROL_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ATS_CONTROL_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ATS_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ATS_CONTROL_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ATS_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ATS_CONTROL_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_ATS_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_ATS_CONTROL_REGISTER = _PCI_EXPRESS_ATS_CONTROL_REGISTER; -pub type PPCI_EXPRESS_ATS_CONTROL_REGISTER = *mut _PCI_EXPRESS_ATS_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_ATS_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub Capability: PCI_EXPRESS_ATS_CAPABILITY_REGISTER, - pub Control: PCI_EXPRESS_ATS_CONTROL_REGISTER, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ATS_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ATS_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ATS_CAPABILITY>(), - 8usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ATS_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ATS_CAPABILITY>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ATS_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ATS_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capability) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ATS_CAPABILITY), - "::", - stringify!(Capability), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ATS_CAPABILITY), - "::", - stringify!(Control), - ), - ); -} -impl Default for _PCI_EXPRESS_ATS_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_ATS_CAPABILITY = _PCI_EXPRESS_ATS_CAPABILITY; -pub type PPCI_EXPRESS_ATS_CAPABILITY = *mut _PCI_EXPRESS_ATS_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_PASID_CAPABILITY_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_PASID_CAPABILITY_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_PASID_CAPABILITY_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PASID_CAPABILITY_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PASID_CAPABILITY_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_PASID_CAPABILITY_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PASID_CAPABILITY_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_PASID_CAPABILITY_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_PASID_CAPABILITY_REGISTER__bindgen_ty_1 { - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ExecutePermissionSupported(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_ExecutePermissionSupported(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn PrivilegedModeSupported(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_PrivilegedModeSupported(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u16) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn MaxPASIDWidth(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 5u8) as u16) } - } - #[inline] - pub fn set_MaxPASIDWidth(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 5u8, val as u64) - } - } - #[inline] - pub fn Rsvd3(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u16) } - } - #[inline] - pub fn set_Rsvd3(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 3u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Rsvd: USHORT, - ExecutePermissionSupported: USHORT, - PrivilegedModeSupported: USHORT, - Rsvd2: USHORT, - MaxPASIDWidth: USHORT, - Rsvd3: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ExecutePermissionSupported: u16 = unsafe { - ::core::mem::transmute(ExecutePermissionSupported) - }; - ExecutePermissionSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let PrivilegedModeSupported: u16 = unsafe { - ::core::mem::transmute(PrivilegedModeSupported) - }; - PrivilegedModeSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let Rsvd2: u16 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 5u8, - { - let MaxPASIDWidth: u16 = unsafe { - ::core::mem::transmute(MaxPASIDWidth) - }; - MaxPASIDWidth as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 3u8, - { - let Rsvd3: u16 = unsafe { ::core::mem::transmute(Rsvd3) }; - Rsvd3 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PASID_CAPABILITY_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_PASID_CAPABILITY_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PASID_CAPABILITY_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PASID_CAPABILITY_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PASID_CAPABILITY_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_PASID_CAPABILITY_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PASID_CAPABILITY_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_PASID_CAPABILITY_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_PASID_CAPABILITY_REGISTER = _PCI_EXPRESS_PASID_CAPABILITY_REGISTER; -pub type PPCI_EXPRESS_PASID_CAPABILITY_REGISTER = *mut _PCI_EXPRESS_PASID_CAPABILITY_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_PASID_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_PASID_CONTROL_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_PASID_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PASID_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PASID_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_PASID_CONTROL_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PASID_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_PASID_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_PASID_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn PASIDEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_PASIDEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ExecutePermissionEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_ExecutePermissionEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn PrivilegedModeEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_PrivilegedModeEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 13u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PASIDEnable: USHORT, - ExecutePermissionEnable: USHORT, - PrivilegedModeEnable: USHORT, - Rsvd: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let PASIDEnable: u16 = unsafe { - ::core::mem::transmute(PASIDEnable) - }; - PASIDEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ExecutePermissionEnable: u16 = unsafe { - ::core::mem::transmute(ExecutePermissionEnable) - }; - ExecutePermissionEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let PrivilegedModeEnable: u16 = unsafe { - ::core::mem::transmute(PrivilegedModeEnable) - }; - PrivilegedModeEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 13u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PASID_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_PASID_CONTROL_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PASID_CONTROL_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PASID_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PASID_CONTROL_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_PASID_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PASID_CONTROL_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_PASID_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_PASID_CONTROL_REGISTER = _PCI_EXPRESS_PASID_CONTROL_REGISTER; -pub type PPCI_EXPRESS_PASID_CONTROL_REGISTER = *mut _PCI_EXPRESS_PASID_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_PASID_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub Capability: PCI_EXPRESS_PASID_CAPABILITY_REGISTER, - pub Control: PCI_EXPRESS_PASID_CONTROL_REGISTER, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PASID_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_PASID_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PASID_CAPABILITY>(), - 8usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PASID_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PASID_CAPABILITY>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_PASID_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PASID_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capability) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PASID_CAPABILITY), - "::", - stringify!(Capability), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PASID_CAPABILITY), - "::", - stringify!(Control), - ), - ); -} -impl Default for _PCI_EXPRESS_PASID_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_PASID_CAPABILITY = _PCI_EXPRESS_PASID_CAPABILITY; -pub type PPCI_EXPRESS_PASID_CAPABILITY = *mut _PCI_EXPRESS_PASID_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_PRI_STATUS_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_PRI_STATUS_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_PRI_STATUS_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PRI_STATUS_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PRI_STATUS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PRI_STATUS_REGISTER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PRI_STATUS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_PRI_STATUS_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_PRI_STATUS_REGISTER__bindgen_ty_1 { - #[inline] - pub fn ResponseFailure(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_ResponseFailure(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnexpectedPageRequestGroupIndex(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_UnexpectedPageRequestGroupIndex(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 6u8, val as u64) - } - } - #[inline] - pub fn Stopped(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } - } - #[inline] - pub fn set_Stopped(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 6u8) as u16) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 6u8, val as u64) - } - } - #[inline] - pub fn PrgResponsePasidRequired(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } - } - #[inline] - pub fn set_PrgResponsePasidRequired(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ResponseFailure: USHORT, - UnexpectedPageRequestGroupIndex: USHORT, - Rsvd: USHORT, - Stopped: USHORT, - Rsvd2: USHORT, - PrgResponsePasidRequired: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ResponseFailure: u16 = unsafe { - ::core::mem::transmute(ResponseFailure) - }; - ResponseFailure as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let UnexpectedPageRequestGroupIndex: u16 = unsafe { - ::core::mem::transmute(UnexpectedPageRequestGroupIndex) - }; - UnexpectedPageRequestGroupIndex as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 6u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let Stopped: u16 = unsafe { ::core::mem::transmute(Stopped) }; - Stopped as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 6u8, - { - let Rsvd2: u16 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let PrgResponsePasidRequired: u16 = unsafe { - ::core::mem::transmute(PrgResponsePasidRequired) - }; - PrgResponsePasidRequired as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PRI_STATUS_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_PRI_STATUS_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PRI_STATUS_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PRI_STATUS_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PRI_STATUS_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_PRI_STATUS_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PRI_STATUS_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_PRI_STATUS_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_PRI_STATUS_REGISTER = _PCI_EXPRESS_PRI_STATUS_REGISTER; -pub type PPCI_EXPRESS_PRI_STATUS_REGISTER = *mut _PCI_EXPRESS_PRI_STATUS_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_PRI_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_PRI_CONTROL_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_PRI_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PRI_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PRI_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PRI_CONTROL_REGISTER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PRI_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_PRI_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_PRI_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn Enable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_Enable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reset(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_Reset(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 14u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 14u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Enable: USHORT, - Reset: USHORT, - Rsvd: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Enable: u16 = unsafe { ::core::mem::transmute(Enable) }; - Enable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Reset: u16 = unsafe { ::core::mem::transmute(Reset) }; - Reset as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 14u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PRI_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_PRI_CONTROL_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PRI_CONTROL_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PRI_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PRI_CONTROL_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_PRI_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PRI_CONTROL_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_PRI_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_PRI_CONTROL_REGISTER = _PCI_EXPRESS_PRI_CONTROL_REGISTER; -pub type PPCI_EXPRESS_PRI_CONTROL_REGISTER = *mut _PCI_EXPRESS_PRI_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_PRI_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub Control: PCI_EXPRESS_PRI_CONTROL_REGISTER, - pub Status: PCI_EXPRESS_PRI_STATUS_REGISTER, - pub PRCapacity: ULONG, - pub PRAllocation: ULONG, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PRI_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_PRI_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PRI_CAPABILITY>(), - 16usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PRI_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PRI_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_PRI_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PRI_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PRI_CAPABILITY), - "::", - stringify!(Control), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PRI_CAPABILITY), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PRCapacity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PRI_CAPABILITY), - "::", - stringify!(PRCapacity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PRAllocation) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PRI_CAPABILITY), - "::", - stringify!(PRAllocation), - ), - ); -} -impl Default for _PCI_EXPRESS_PRI_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_PRI_CAPABILITY = _PCI_EXPRESS_PRI_CAPABILITY; -pub type PPCI_EXPRESS_PRI_CAPABILITY = *mut _PCI_EXPRESS_PRI_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_PTM_CAPABILITY_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_PTM_CAPABILITY_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_PTM_CAPABILITY_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PTM_CAPABILITY_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PTM_CAPABILITY_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_PTM_CAPABILITY_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PTM_CAPABILITY_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_PTM_CAPABILITY_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_PTM_CAPABILITY_REGISTER__bindgen_ty_1 { - #[inline] - pub fn RequesterCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_RequesterCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ResponderCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_ResponderCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn RootCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_RootCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn LocalGranularity(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_LocalGranularity(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - RequesterCapable: ULONG, - ResponderCapable: ULONG, - RootCapable: ULONG, - Rsvd: ULONG, - LocalGranularity: ULONG, - Rsvd2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let RequesterCapable: u32 = unsafe { - ::core::mem::transmute(RequesterCapable) - }; - RequesterCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ResponderCapable: u32 = unsafe { - ::core::mem::transmute(ResponderCapable) - }; - ResponderCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let RootCapable: u32 = unsafe { - ::core::mem::transmute(RootCapable) - }; - RootCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let LocalGranularity: u32 = unsafe { - ::core::mem::transmute(LocalGranularity) - }; - LocalGranularity as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 16u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PTM_CAPABILITY_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_PTM_CAPABILITY_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PTM_CAPABILITY_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PTM_CAPABILITY_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PTM_CAPABILITY_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_PTM_CAPABILITY_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PTM_CAPABILITY_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_PTM_CAPABILITY_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_PTM_CAPABILITY_REGISTER = _PCI_EXPRESS_PTM_CAPABILITY_REGISTER; -pub type PPCI_EXPRESS_PTM_CAPABILITY_REGISTER = *mut _PCI_EXPRESS_PTM_CAPABILITY_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_PTM_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_PTM_CONTROL_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_PTM_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PTM_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PTM_CONTROL_REGISTER__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PTM_CONTROL_REGISTER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PTM_CONTROL_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_PTM_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_PTM_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn Enable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_Enable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn RootSelect(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_RootSelect(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 6u8, val as u64) - } - } - #[inline] - pub fn EffectiveGranularity(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_EffectiveGranularity(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Enable: ULONG, - RootSelect: ULONG, - Rsvd: ULONG, - EffectiveGranularity: ULONG, - Rsvd2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Enable: u32 = unsafe { ::core::mem::transmute(Enable) }; - Enable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let RootSelect: u32 = unsafe { ::core::mem::transmute(RootSelect) }; - RootSelect as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 6u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let EffectiveGranularity: u32 = unsafe { - ::core::mem::transmute(EffectiveGranularity) - }; - EffectiveGranularity as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 16u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PTM_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_PTM_CONTROL_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PTM_CONTROL_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PTM_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PTM_CONTROL_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_PTM_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PTM_CONTROL_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_PTM_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_PTM_CONTROL_REGISTER = _PCI_EXPRESS_PTM_CONTROL_REGISTER; -pub type PPCI_EXPRESS_PTM_CONTROL_REGISTER = *mut _PCI_EXPRESS_PTM_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_PTM_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub PtmCapability: PCI_EXPRESS_PTM_CAPABILITY_REGISTER, - pub PtmControl: PCI_EXPRESS_PTM_CONTROL_REGISTER, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PTM_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_PTM_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PTM_CAPABILITY>(), - 12usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PTM_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PTM_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_PTM_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PTM_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PtmCapability) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PTM_CAPABILITY), - "::", - stringify!(PtmCapability), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PtmControl) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PTM_CAPABILITY), - "::", - stringify!(PtmControl), - ), - ); -} -impl Default for _PCI_EXPRESS_PTM_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_PTM_CAPABILITY = _PCI_EXPRESS_PTM_CAPABILITY; -pub type PPCI_EXPRESS_PTM_CAPABILITY = *mut _PCI_EXPRESS_PTM_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS { - pub __bindgen_anon_1: _PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1 { - #[inline] - pub fn Undefined(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_Undefined(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 3u8, val as u64) - } - } - #[inline] - pub fn DataLinkProtocolError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_DataLinkProtocolError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn SurpriseDownError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_SurpriseDownError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 6u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 6u8, val as u64) - } - } - #[inline] - pub fn PoisonedTLP(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } - } - #[inline] - pub fn set_PoisonedTLP(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn FlowControlProtocolError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } - } - #[inline] - pub fn set_FlowControlProtocolError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 1u8, val as u64) - } - } - #[inline] - pub fn CompletionTimeout(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } - } - #[inline] - pub fn set_CompletionTimeout(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn CompleterAbort(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } - } - #[inline] - pub fn set_CompleterAbort(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnexpectedCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_UnexpectedCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReceiverOverflow(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReceiverOverflow(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn MalformedTLP(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_MalformedTLP(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn ECRCError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } - } - #[inline] - pub fn set_ECRCError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnsupportedRequestError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } - } - #[inline] - pub fn set_UnsupportedRequestError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 1u8, val as u64) - } - } - #[inline] - pub fn AcsViolation(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } - } - #[inline] - pub fn set_AcsViolation(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableInternalError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableInternalError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 1u8, val as u64) - } - } - #[inline] - pub fn MCBlockedTlp(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u32) } - } - #[inline] - pub fn set_MCBlockedTlp(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(23usize, 1u8, val as u64) - } - } - #[inline] - pub fn AtomicOpEgressBlocked(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u32) } - } - #[inline] - pub fn set_AtomicOpEgressBlocked(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 1u8, val as u64) - } - } - #[inline] - pub fn TlpPrefixBlocked(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u32) } - } - #[inline] - pub fn set_TlpPrefixBlocked(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(25usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 6u8) as u32) } - } - #[inline] - pub fn set_Reserved3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(26usize, 6u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Undefined: ULONG, - Reserved1: ULONG, - DataLinkProtocolError: ULONG, - SurpriseDownError: ULONG, - Reserved2: ULONG, - PoisonedTLP: ULONG, - FlowControlProtocolError: ULONG, - CompletionTimeout: ULONG, - CompleterAbort: ULONG, - UnexpectedCompletion: ULONG, - ReceiverOverflow: ULONG, - MalformedTLP: ULONG, - ECRCError: ULONG, - UnsupportedRequestError: ULONG, - AcsViolation: ULONG, - UncorrectableInternalError: ULONG, - MCBlockedTlp: ULONG, - AtomicOpEgressBlocked: ULONG, - TlpPrefixBlocked: ULONG, - Reserved3: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Undefined: u32 = unsafe { ::core::mem::transmute(Undefined) }; - Undefined as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 3u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let DataLinkProtocolError: u32 = unsafe { - ::core::mem::transmute(DataLinkProtocolError) - }; - DataLinkProtocolError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let SurpriseDownError: u32 = unsafe { - ::core::mem::transmute(SurpriseDownError) - }; - SurpriseDownError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 6u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let PoisonedTLP: u32 = unsafe { - ::core::mem::transmute(PoisonedTLP) - }; - PoisonedTLP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 1u8, - { - let FlowControlProtocolError: u32 = unsafe { - ::core::mem::transmute(FlowControlProtocolError) - }; - FlowControlProtocolError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 1u8, - { - let CompletionTimeout: u32 = unsafe { - ::core::mem::transmute(CompletionTimeout) - }; - CompletionTimeout as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let CompleterAbort: u32 = unsafe { - ::core::mem::transmute(CompleterAbort) - }; - CompleterAbort as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let UnexpectedCompletion: u32 = unsafe { - ::core::mem::transmute(UnexpectedCompletion) - }; - UnexpectedCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let ReceiverOverflow: u32 = unsafe { - ::core::mem::transmute(ReceiverOverflow) - }; - ReceiverOverflow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let MalformedTLP: u32 = unsafe { - ::core::mem::transmute(MalformedTLP) - }; - MalformedTLP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 1u8, - { - let ECRCError: u32 = unsafe { ::core::mem::transmute(ECRCError) }; - ECRCError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 1u8, - { - let UnsupportedRequestError: u32 = unsafe { - ::core::mem::transmute(UnsupportedRequestError) - }; - UnsupportedRequestError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 1u8, - { - let AcsViolation: u32 = unsafe { - ::core::mem::transmute(AcsViolation) - }; - AcsViolation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 1u8, - { - let UncorrectableInternalError: u32 = unsafe { - ::core::mem::transmute(UncorrectableInternalError) - }; - UncorrectableInternalError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 23usize, - 1u8, - { - let MCBlockedTlp: u32 = unsafe { - ::core::mem::transmute(MCBlockedTlp) - }; - MCBlockedTlp as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 1u8, - { - let AtomicOpEgressBlocked: u32 = unsafe { - ::core::mem::transmute(AtomicOpEgressBlocked) - }; - AtomicOpEgressBlocked as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 25usize, - 1u8, - { - let TlpPrefixBlocked: u32 = unsafe { - ::core::mem::transmute(TlpPrefixBlocked) - }; - TlpPrefixBlocked as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 26usize, - 6u8, - { - let Reserved3: u32 = unsafe { ::core::mem::transmute(Reserved3) }; - Reserved3 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS = _PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS; -pub type PPCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS = *mut _PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK { - pub __bindgen_anon_1: _PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1 { - #[inline] - pub fn Undefined(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_Undefined(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 3u8, val as u64) - } - } - #[inline] - pub fn DataLinkProtocolError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_DataLinkProtocolError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn SurpriseDownError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_SurpriseDownError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 6u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 6u8, val as u64) - } - } - #[inline] - pub fn PoisonedTLP(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } - } - #[inline] - pub fn set_PoisonedTLP(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn FlowControlProtocolError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } - } - #[inline] - pub fn set_FlowControlProtocolError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 1u8, val as u64) - } - } - #[inline] - pub fn CompletionTimeout(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } - } - #[inline] - pub fn set_CompletionTimeout(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn CompleterAbort(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } - } - #[inline] - pub fn set_CompleterAbort(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnexpectedCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_UnexpectedCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReceiverOverflow(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReceiverOverflow(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn MalformedTLP(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_MalformedTLP(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn ECRCError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } - } - #[inline] - pub fn set_ECRCError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnsupportedRequestError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } - } - #[inline] - pub fn set_UnsupportedRequestError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 1u8, val as u64) - } - } - #[inline] - pub fn AcsViolation(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } - } - #[inline] - pub fn set_AcsViolation(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableInternalError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableInternalError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 1u8, val as u64) - } - } - #[inline] - pub fn MCBlockedTlp(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u32) } - } - #[inline] - pub fn set_MCBlockedTlp(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(23usize, 1u8, val as u64) - } - } - #[inline] - pub fn AtomicOpEgressBlocked(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u32) } - } - #[inline] - pub fn set_AtomicOpEgressBlocked(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 1u8, val as u64) - } - } - #[inline] - pub fn TlpPrefixBlocked(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u32) } - } - #[inline] - pub fn set_TlpPrefixBlocked(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(25usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 6u8) as u32) } - } - #[inline] - pub fn set_Reserved3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(26usize, 6u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Undefined: ULONG, - Reserved1: ULONG, - DataLinkProtocolError: ULONG, - SurpriseDownError: ULONG, - Reserved2: ULONG, - PoisonedTLP: ULONG, - FlowControlProtocolError: ULONG, - CompletionTimeout: ULONG, - CompleterAbort: ULONG, - UnexpectedCompletion: ULONG, - ReceiverOverflow: ULONG, - MalformedTLP: ULONG, - ECRCError: ULONG, - UnsupportedRequestError: ULONG, - AcsViolation: ULONG, - UncorrectableInternalError: ULONG, - MCBlockedTlp: ULONG, - AtomicOpEgressBlocked: ULONG, - TlpPrefixBlocked: ULONG, - Reserved3: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Undefined: u32 = unsafe { ::core::mem::transmute(Undefined) }; - Undefined as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 3u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let DataLinkProtocolError: u32 = unsafe { - ::core::mem::transmute(DataLinkProtocolError) - }; - DataLinkProtocolError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let SurpriseDownError: u32 = unsafe { - ::core::mem::transmute(SurpriseDownError) - }; - SurpriseDownError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 6u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let PoisonedTLP: u32 = unsafe { - ::core::mem::transmute(PoisonedTLP) - }; - PoisonedTLP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 1u8, - { - let FlowControlProtocolError: u32 = unsafe { - ::core::mem::transmute(FlowControlProtocolError) - }; - FlowControlProtocolError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 1u8, - { - let CompletionTimeout: u32 = unsafe { - ::core::mem::transmute(CompletionTimeout) - }; - CompletionTimeout as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let CompleterAbort: u32 = unsafe { - ::core::mem::transmute(CompleterAbort) - }; - CompleterAbort as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let UnexpectedCompletion: u32 = unsafe { - ::core::mem::transmute(UnexpectedCompletion) - }; - UnexpectedCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let ReceiverOverflow: u32 = unsafe { - ::core::mem::transmute(ReceiverOverflow) - }; - ReceiverOverflow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let MalformedTLP: u32 = unsafe { - ::core::mem::transmute(MalformedTLP) - }; - MalformedTLP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 1u8, - { - let ECRCError: u32 = unsafe { ::core::mem::transmute(ECRCError) }; - ECRCError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 1u8, - { - let UnsupportedRequestError: u32 = unsafe { - ::core::mem::transmute(UnsupportedRequestError) - }; - UnsupportedRequestError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 1u8, - { - let AcsViolation: u32 = unsafe { - ::core::mem::transmute(AcsViolation) - }; - AcsViolation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 1u8, - { - let UncorrectableInternalError: u32 = unsafe { - ::core::mem::transmute(UncorrectableInternalError) - }; - UncorrectableInternalError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 23usize, - 1u8, - { - let MCBlockedTlp: u32 = unsafe { - ::core::mem::transmute(MCBlockedTlp) - }; - MCBlockedTlp as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 1u8, - { - let AtomicOpEgressBlocked: u32 = unsafe { - ::core::mem::transmute(AtomicOpEgressBlocked) - }; - AtomicOpEgressBlocked as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 25usize, - 1u8, - { - let TlpPrefixBlocked: u32 = unsafe { - ::core::mem::transmute(TlpPrefixBlocked) - }; - TlpPrefixBlocked as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 26usize, - 6u8, - { - let Reserved3: u32 = unsafe { ::core::mem::transmute(Reserved3) }; - Reserved3 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK = _PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK; -pub type PPCI_EXPRESS_UNCORRECTABLE_ERROR_MASK = *mut _PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY { - pub __bindgen_anon_1: _PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1 { - #[inline] - pub fn Undefined(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_Undefined(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 3u8, val as u64) - } - } - #[inline] - pub fn DataLinkProtocolError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_DataLinkProtocolError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn SurpriseDownError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_SurpriseDownError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 6u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 6u8, val as u64) - } - } - #[inline] - pub fn PoisonedTLP(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } - } - #[inline] - pub fn set_PoisonedTLP(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn FlowControlProtocolError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } - } - #[inline] - pub fn set_FlowControlProtocolError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 1u8, val as u64) - } - } - #[inline] - pub fn CompletionTimeout(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } - } - #[inline] - pub fn set_CompletionTimeout(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn CompleterAbort(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } - } - #[inline] - pub fn set_CompleterAbort(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnexpectedCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_UnexpectedCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReceiverOverflow(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReceiverOverflow(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn MalformedTLP(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_MalformedTLP(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn ECRCError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } - } - #[inline] - pub fn set_ECRCError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnsupportedRequestError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } - } - #[inline] - pub fn set_UnsupportedRequestError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 1u8, val as u64) - } - } - #[inline] - pub fn AcsViolation(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } - } - #[inline] - pub fn set_AcsViolation(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableInternalError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableInternalError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 1u8, val as u64) - } - } - #[inline] - pub fn MCBlockedTlp(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u32) } - } - #[inline] - pub fn set_MCBlockedTlp(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(23usize, 1u8, val as u64) - } - } - #[inline] - pub fn AtomicOpEgressBlocked(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u32) } - } - #[inline] - pub fn set_AtomicOpEgressBlocked(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 1u8, val as u64) - } - } - #[inline] - pub fn TlpPrefixBlocked(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u32) } - } - #[inline] - pub fn set_TlpPrefixBlocked(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(25usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 6u8) as u32) } - } - #[inline] - pub fn set_Reserved3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(26usize, 6u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Undefined: ULONG, - Reserved1: ULONG, - DataLinkProtocolError: ULONG, - SurpriseDownError: ULONG, - Reserved2: ULONG, - PoisonedTLP: ULONG, - FlowControlProtocolError: ULONG, - CompletionTimeout: ULONG, - CompleterAbort: ULONG, - UnexpectedCompletion: ULONG, - ReceiverOverflow: ULONG, - MalformedTLP: ULONG, - ECRCError: ULONG, - UnsupportedRequestError: ULONG, - AcsViolation: ULONG, - UncorrectableInternalError: ULONG, - MCBlockedTlp: ULONG, - AtomicOpEgressBlocked: ULONG, - TlpPrefixBlocked: ULONG, - Reserved3: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Undefined: u32 = unsafe { ::core::mem::transmute(Undefined) }; - Undefined as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 3u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let DataLinkProtocolError: u32 = unsafe { - ::core::mem::transmute(DataLinkProtocolError) - }; - DataLinkProtocolError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let SurpriseDownError: u32 = unsafe { - ::core::mem::transmute(SurpriseDownError) - }; - SurpriseDownError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 6u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let PoisonedTLP: u32 = unsafe { - ::core::mem::transmute(PoisonedTLP) - }; - PoisonedTLP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 1u8, - { - let FlowControlProtocolError: u32 = unsafe { - ::core::mem::transmute(FlowControlProtocolError) - }; - FlowControlProtocolError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 1u8, - { - let CompletionTimeout: u32 = unsafe { - ::core::mem::transmute(CompletionTimeout) - }; - CompletionTimeout as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let CompleterAbort: u32 = unsafe { - ::core::mem::transmute(CompleterAbort) - }; - CompleterAbort as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let UnexpectedCompletion: u32 = unsafe { - ::core::mem::transmute(UnexpectedCompletion) - }; - UnexpectedCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let ReceiverOverflow: u32 = unsafe { - ::core::mem::transmute(ReceiverOverflow) - }; - ReceiverOverflow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let MalformedTLP: u32 = unsafe { - ::core::mem::transmute(MalformedTLP) - }; - MalformedTLP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 1u8, - { - let ECRCError: u32 = unsafe { ::core::mem::transmute(ECRCError) }; - ECRCError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 1u8, - { - let UnsupportedRequestError: u32 = unsafe { - ::core::mem::transmute(UnsupportedRequestError) - }; - UnsupportedRequestError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 1u8, - { - let AcsViolation: u32 = unsafe { - ::core::mem::transmute(AcsViolation) - }; - AcsViolation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 1u8, - { - let UncorrectableInternalError: u32 = unsafe { - ::core::mem::transmute(UncorrectableInternalError) - }; - UncorrectableInternalError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 23usize, - 1u8, - { - let MCBlockedTlp: u32 = unsafe { - ::core::mem::transmute(MCBlockedTlp) - }; - MCBlockedTlp as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 1u8, - { - let AtomicOpEgressBlocked: u32 = unsafe { - ::core::mem::transmute(AtomicOpEgressBlocked) - }; - AtomicOpEgressBlocked as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 25usize, - 1u8, - { - let TlpPrefixBlocked: u32 = unsafe { - ::core::mem::transmute(TlpPrefixBlocked) - }; - TlpPrefixBlocked as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 26usize, - 6u8, - { - let Reserved3: u32 = unsafe { ::core::mem::transmute(Reserved3) }; - Reserved3 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY = _PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY; -pub type PPCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY = *mut _PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_CORRECTABLE_ERROR_STATUS { - pub __bindgen_anon_1: _PCI_EXPRESS_CORRECTABLE_ERROR_STATUS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_CORRECTABLE_ERROR_STATUS__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CORRECTABLE_ERROR_STATUS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CORRECTABLE_ERROR_STATUS__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_CORRECTABLE_ERROR_STATUS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CORRECTABLE_ERROR_STATUS__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CORRECTABLE_ERROR_STATUS__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_CORRECTABLE_ERROR_STATUS__bindgen_ty_1 { - #[inline] - pub fn ReceiverError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReceiverError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 5u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 5u8, val as u64) - } - } - #[inline] - pub fn BadTLP(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_BadTLP(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn BadDLLP(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_BadDLLP(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReplayNumRollover(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReplayNumRollover(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 3u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 3u8, val as u64) - } - } - #[inline] - pub fn ReplayTimerTimeout(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReplayTimerTimeout(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn AdvisoryNonFatalError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } - } - #[inline] - pub fn set_AdvisoryNonFatalError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 1u8, val as u64) - } - } - #[inline] - pub fn CorrectedInternalError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } - } - #[inline] - pub fn set_CorrectedInternalError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn HeaderLogOverflow(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } - } - #[inline] - pub fn set_HeaderLogOverflow(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_Reserved3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ReceiverError: ULONG, - Reserved1: ULONG, - BadTLP: ULONG, - BadDLLP: ULONG, - ReplayNumRollover: ULONG, - Reserved2: ULONG, - ReplayTimerTimeout: ULONG, - AdvisoryNonFatalError: ULONG, - CorrectedInternalError: ULONG, - HeaderLogOverflow: ULONG, - Reserved3: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ReceiverError: u32 = unsafe { - ::core::mem::transmute(ReceiverError) - }; - ReceiverError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 5u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let BadTLP: u32 = unsafe { ::core::mem::transmute(BadTLP) }; - BadTLP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let BadDLLP: u32 = unsafe { ::core::mem::transmute(BadDLLP) }; - BadDLLP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let ReplayNumRollover: u32 = unsafe { - ::core::mem::transmute(ReplayNumRollover) - }; - ReplayNumRollover as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 3u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let ReplayTimerTimeout: u32 = unsafe { - ::core::mem::transmute(ReplayTimerTimeout) - }; - ReplayTimerTimeout as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 1u8, - { - let AdvisoryNonFatalError: u32 = unsafe { - ::core::mem::transmute(AdvisoryNonFatalError) - }; - AdvisoryNonFatalError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 1u8, - { - let CorrectedInternalError: u32 = unsafe { - ::core::mem::transmute(CorrectedInternalError) - }; - CorrectedInternalError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let HeaderLogOverflow: u32 = unsafe { - ::core::mem::transmute(HeaderLogOverflow) - }; - HeaderLogOverflow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 16u8, - { - let Reserved3: u32 = unsafe { ::core::mem::transmute(Reserved3) }; - Reserved3 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CORRECTABLE_ERROR_STATUS() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_CORRECTABLE_ERROR_STATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CORRECTABLE_ERROR_STATUS>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_CORRECTABLE_ERROR_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CORRECTABLE_ERROR_STATUS>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_CORRECTABLE_ERROR_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CORRECTABLE_ERROR_STATUS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_CORRECTABLE_ERROR_STATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_CORRECTABLE_ERROR_STATUS = _PCI_EXPRESS_CORRECTABLE_ERROR_STATUS; -pub type PPCI_CORRECTABLE_ERROR_STATUS = *mut _PCI_EXPRESS_CORRECTABLE_ERROR_STATUS; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_CORRECTABLE_ERROR_MASK { - pub __bindgen_anon_1: _PCI_EXPRESS_CORRECTABLE_ERROR_MASK__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_CORRECTABLE_ERROR_MASK__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CORRECTABLE_ERROR_MASK__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CORRECTABLE_ERROR_MASK__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_CORRECTABLE_ERROR_MASK__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CORRECTABLE_ERROR_MASK__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CORRECTABLE_ERROR_MASK__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_CORRECTABLE_ERROR_MASK__bindgen_ty_1 { - #[inline] - pub fn ReceiverError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReceiverError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 5u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 5u8, val as u64) - } - } - #[inline] - pub fn BadTLP(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_BadTLP(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn BadDLLP(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_BadDLLP(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReplayNumRollover(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReplayNumRollover(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 3u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 3u8, val as u64) - } - } - #[inline] - pub fn ReplayTimerTimeout(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReplayTimerTimeout(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn AdvisoryNonFatalError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } - } - #[inline] - pub fn set_AdvisoryNonFatalError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 1u8, val as u64) - } - } - #[inline] - pub fn CorrectedInternalError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } - } - #[inline] - pub fn set_CorrectedInternalError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn HeaderLogOverflow(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } - } - #[inline] - pub fn set_HeaderLogOverflow(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_Reserved3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ReceiverError: ULONG, - Reserved1: ULONG, - BadTLP: ULONG, - BadDLLP: ULONG, - ReplayNumRollover: ULONG, - Reserved2: ULONG, - ReplayTimerTimeout: ULONG, - AdvisoryNonFatalError: ULONG, - CorrectedInternalError: ULONG, - HeaderLogOverflow: ULONG, - Reserved3: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ReceiverError: u32 = unsafe { - ::core::mem::transmute(ReceiverError) - }; - ReceiverError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 5u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let BadTLP: u32 = unsafe { ::core::mem::transmute(BadTLP) }; - BadTLP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let BadDLLP: u32 = unsafe { ::core::mem::transmute(BadDLLP) }; - BadDLLP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let ReplayNumRollover: u32 = unsafe { - ::core::mem::transmute(ReplayNumRollover) - }; - ReplayNumRollover as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 3u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let ReplayTimerTimeout: u32 = unsafe { - ::core::mem::transmute(ReplayTimerTimeout) - }; - ReplayTimerTimeout as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 1u8, - { - let AdvisoryNonFatalError: u32 = unsafe { - ::core::mem::transmute(AdvisoryNonFatalError) - }; - AdvisoryNonFatalError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 1u8, - { - let CorrectedInternalError: u32 = unsafe { - ::core::mem::transmute(CorrectedInternalError) - }; - CorrectedInternalError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let HeaderLogOverflow: u32 = unsafe { - ::core::mem::transmute(HeaderLogOverflow) - }; - HeaderLogOverflow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 16u8, - { - let Reserved3: u32 = unsafe { ::core::mem::transmute(Reserved3) }; - Reserved3 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CORRECTABLE_ERROR_MASK() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_CORRECTABLE_ERROR_MASK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CORRECTABLE_ERROR_MASK>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_CORRECTABLE_ERROR_MASK)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CORRECTABLE_ERROR_MASK>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_CORRECTABLE_ERROR_MASK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CORRECTABLE_ERROR_MASK), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_CORRECTABLE_ERROR_MASK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_CORRECTABLE_ERROR_MASK = _PCI_EXPRESS_CORRECTABLE_ERROR_MASK; -pub type PPCI_CORRECTABLE_ERROR_MASK = *mut _PCI_EXPRESS_CORRECTABLE_ERROR_MASK; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_AER_CAPABILITIES { - pub __bindgen_anon_1: _PCI_EXPRESS_AER_CAPABILITIES__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_AER_CAPABILITIES__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_AER_CAPABILITIES__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_AER_CAPABILITIES__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_AER_CAPABILITIES__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_AER_CAPABILITIES__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_AER_CAPABILITIES__bindgen_ty_1)), - ); -} -impl _PCI_EXPRESS_AER_CAPABILITIES__bindgen_ty_1 { - #[inline] - pub fn FirstErrorPointer(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u32) } - } - #[inline] - pub fn set_FirstErrorPointer(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 5u8, val as u64) - } - } - #[inline] - pub fn ECRCGenerationCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_ECRCGenerationCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn ECRCGenerationEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_ECRCGenerationEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn ECRCCheckCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_ECRCCheckCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn ECRCCheckEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_ECRCCheckEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn MultipleHeaderRecordingCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_MultipleHeaderRecordingCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn MultipleHeaderRecordingEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_MultipleHeaderRecordingEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn TlpPrefixLogPresent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } - } - #[inline] - pub fn set_TlpPrefixLogPresent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 20u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 20u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - FirstErrorPointer: ULONG, - ECRCGenerationCapable: ULONG, - ECRCGenerationEnable: ULONG, - ECRCCheckCapable: ULONG, - ECRCCheckEnable: ULONG, - MultipleHeaderRecordingCapable: ULONG, - MultipleHeaderRecordingEnable: ULONG, - TlpPrefixLogPresent: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 5u8, - { - let FirstErrorPointer: u32 = unsafe { - ::core::mem::transmute(FirstErrorPointer) - }; - FirstErrorPointer as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let ECRCGenerationCapable: u32 = unsafe { - ::core::mem::transmute(ECRCGenerationCapable) - }; - ECRCGenerationCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let ECRCGenerationEnable: u32 = unsafe { - ::core::mem::transmute(ECRCGenerationEnable) - }; - ECRCGenerationEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let ECRCCheckCapable: u32 = unsafe { - ::core::mem::transmute(ECRCCheckCapable) - }; - ECRCCheckCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let ECRCCheckEnable: u32 = unsafe { - ::core::mem::transmute(ECRCCheckEnable) - }; - ECRCCheckEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let MultipleHeaderRecordingCapable: u32 = unsafe { - ::core::mem::transmute(MultipleHeaderRecordingCapable) - }; - MultipleHeaderRecordingCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let MultipleHeaderRecordingEnable: u32 = unsafe { - ::core::mem::transmute(MultipleHeaderRecordingEnable) - }; - MultipleHeaderRecordingEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let TlpPrefixLogPresent: u32 = unsafe { - ::core::mem::transmute(TlpPrefixLogPresent) - }; - TlpPrefixLogPresent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 20u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_AER_CAPABILITIES() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_AER_CAPABILITIES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_AER_CAPABILITIES>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_AER_CAPABILITIES)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_AER_CAPABILITIES>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_AER_CAPABILITIES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITIES), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_AER_CAPABILITIES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_AER_CAPABILITIES = _PCI_EXPRESS_AER_CAPABILITIES; -pub type PPCI_EXPRESS_AER_CAPABILITIES = *mut _PCI_EXPRESS_AER_CAPABILITIES; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_ROOT_ERROR_COMMAND { - pub __bindgen_anon_1: _PCI_EXPRESS_ROOT_ERROR_COMMAND__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ROOT_ERROR_COMMAND__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ROOT_ERROR_COMMAND__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ROOT_ERROR_COMMAND__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ROOT_ERROR_COMMAND__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ROOT_ERROR_COMMAND__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_ROOT_ERROR_COMMAND__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_ROOT_ERROR_COMMAND__bindgen_ty_1 { - #[inline] - pub fn CorrectableErrorReportingEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_CorrectableErrorReportingEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn NonFatalErrorReportingEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_NonFatalErrorReportingEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn FatalErrorReportingEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_FatalErrorReportingEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 29u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CorrectableErrorReportingEnable: ULONG, - NonFatalErrorReportingEnable: ULONG, - FatalErrorReportingEnable: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CorrectableErrorReportingEnable: u32 = unsafe { - ::core::mem::transmute(CorrectableErrorReportingEnable) - }; - CorrectableErrorReportingEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let NonFatalErrorReportingEnable: u32 = unsafe { - ::core::mem::transmute(NonFatalErrorReportingEnable) - }; - NonFatalErrorReportingEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let FatalErrorReportingEnable: u32 = unsafe { - ::core::mem::transmute(FatalErrorReportingEnable) - }; - FatalErrorReportingEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 29u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ROOT_ERROR_COMMAND() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ROOT_ERROR_COMMAND> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ROOT_ERROR_COMMAND>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ROOT_ERROR_COMMAND)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ROOT_ERROR_COMMAND>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ROOT_ERROR_COMMAND)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOT_ERROR_COMMAND), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_ROOT_ERROR_COMMAND { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_ROOT_ERROR_COMMAND = _PCI_EXPRESS_ROOT_ERROR_COMMAND; -pub type PPCI_EXPRESS_ROOT_ERROR_COMMAND = *mut _PCI_EXPRESS_ROOT_ERROR_COMMAND; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_ROOT_ERROR_STATUS { - pub __bindgen_anon_1: _PCI_EXPRESS_ROOT_ERROR_STATUS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ROOT_ERROR_STATUS__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ROOT_ERROR_STATUS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ROOT_ERROR_STATUS__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ROOT_ERROR_STATUS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ROOT_ERROR_STATUS__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_ROOT_ERROR_STATUS__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_ROOT_ERROR_STATUS__bindgen_ty_1 { - #[inline] - pub fn CorrectableErrorReceived(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_CorrectableErrorReceived(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn MultipleCorrectableErrorsReceived(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_MultipleCorrectableErrorsReceived(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableErrorReceived(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableErrorReceived(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn MultipleUncorrectableErrorsReceived(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_MultipleUncorrectableErrorsReceived(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn FirstUncorrectableFatal(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_FirstUncorrectableFatal(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn NonFatalErrorMessagesReceived(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_NonFatalErrorMessagesReceived(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn FatalErrorMessagesReceived(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_FatalErrorMessagesReceived(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 20u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 20u8, val as u64) - } - } - #[inline] - pub fn AdvancedErrorInterruptMessageNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 5u8) as u32) } - } - #[inline] - pub fn set_AdvancedErrorInterruptMessageNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(27usize, 5u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CorrectableErrorReceived: ULONG, - MultipleCorrectableErrorsReceived: ULONG, - UncorrectableErrorReceived: ULONG, - MultipleUncorrectableErrorsReceived: ULONG, - FirstUncorrectableFatal: ULONG, - NonFatalErrorMessagesReceived: ULONG, - FatalErrorMessagesReceived: ULONG, - Reserved: ULONG, - AdvancedErrorInterruptMessageNumber: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CorrectableErrorReceived: u32 = unsafe { - ::core::mem::transmute(CorrectableErrorReceived) - }; - CorrectableErrorReceived as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let MultipleCorrectableErrorsReceived: u32 = unsafe { - ::core::mem::transmute(MultipleCorrectableErrorsReceived) - }; - MultipleCorrectableErrorsReceived as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let UncorrectableErrorReceived: u32 = unsafe { - ::core::mem::transmute(UncorrectableErrorReceived) - }; - UncorrectableErrorReceived as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let MultipleUncorrectableErrorsReceived: u32 = unsafe { - ::core::mem::transmute(MultipleUncorrectableErrorsReceived) - }; - MultipleUncorrectableErrorsReceived as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let FirstUncorrectableFatal: u32 = unsafe { - ::core::mem::transmute(FirstUncorrectableFatal) - }; - FirstUncorrectableFatal as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let NonFatalErrorMessagesReceived: u32 = unsafe { - ::core::mem::transmute(NonFatalErrorMessagesReceived) - }; - NonFatalErrorMessagesReceived as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let FatalErrorMessagesReceived: u32 = unsafe { - ::core::mem::transmute(FatalErrorMessagesReceived) - }; - FatalErrorMessagesReceived as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 20u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 27usize, - 5u8, - { - let AdvancedErrorInterruptMessageNumber: u32 = unsafe { - ::core::mem::transmute(AdvancedErrorInterruptMessageNumber) - }; - AdvancedErrorInterruptMessageNumber as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ROOT_ERROR_STATUS() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ROOT_ERROR_STATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ROOT_ERROR_STATUS>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ROOT_ERROR_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ROOT_ERROR_STATUS>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ROOT_ERROR_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOT_ERROR_STATUS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_ROOT_ERROR_STATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_ROOT_ERROR_STATUS = _PCI_EXPRESS_ROOT_ERROR_STATUS; -pub type PPCI_EXPRESS_ROOT_ERROR_STATUS = *mut _PCI_EXPRESS_ROOT_ERROR_STATUS; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_ERROR_SOURCE_ID { - pub __bindgen_anon_1: _PCI_EXPRESS_ERROR_SOURCE_ID__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ERROR_SOURCE_ID__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ERROR_SOURCE_ID__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ERROR_SOURCE_ID__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ERROR_SOURCE_ID__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ERROR_SOURCE_ID__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ERROR_SOURCE_ID__bindgen_ty_1)), - ); -} -impl _PCI_EXPRESS_ERROR_SOURCE_ID__bindgen_ty_1 { - #[inline] - pub fn CorrectableSourceIdFun(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u16) } - } - #[inline] - pub fn set_CorrectableSourceIdFun(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn CorrectableSourceIdDev(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u16) } - } - #[inline] - pub fn set_CorrectableSourceIdDev(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn CorrectableSourceIdBus(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u16) } - } - #[inline] - pub fn set_CorrectableSourceIdBus(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn UncorrectableSourceIdFun(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 3u8) as u16) } - } - #[inline] - pub fn set_UncorrectableSourceIdFun(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 3u8, val as u64) - } - } - #[inline] - pub fn UncorrectableSourceIdDev(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 5u8) as u16) } - } - #[inline] - pub fn set_UncorrectableSourceIdDev(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 5u8, val as u64) - } - } - #[inline] - pub fn UncorrectableSourceIdBus(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u16) } - } - #[inline] - pub fn set_UncorrectableSourceIdBus(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CorrectableSourceIdFun: USHORT, - CorrectableSourceIdDev: USHORT, - CorrectableSourceIdBus: USHORT, - UncorrectableSourceIdFun: USHORT, - UncorrectableSourceIdDev: USHORT, - UncorrectableSourceIdBus: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let CorrectableSourceIdFun: u16 = unsafe { - ::core::mem::transmute(CorrectableSourceIdFun) - }; - CorrectableSourceIdFun as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let CorrectableSourceIdDev: u16 = unsafe { - ::core::mem::transmute(CorrectableSourceIdDev) - }; - CorrectableSourceIdDev as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let CorrectableSourceIdBus: u16 = unsafe { - ::core::mem::transmute(CorrectableSourceIdBus) - }; - CorrectableSourceIdBus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 3u8, - { - let UncorrectableSourceIdFun: u16 = unsafe { - ::core::mem::transmute(UncorrectableSourceIdFun) - }; - UncorrectableSourceIdFun as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 5u8, - { - let UncorrectableSourceIdDev: u16 = unsafe { - ::core::mem::transmute(UncorrectableSourceIdDev) - }; - UncorrectableSourceIdDev as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let UncorrectableSourceIdBus: u16 = unsafe { - ::core::mem::transmute(UncorrectableSourceIdBus) - }; - UncorrectableSourceIdBus as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ERROR_SOURCE_ID() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ERROR_SOURCE_ID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ERROR_SOURCE_ID>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ERROR_SOURCE_ID)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ERROR_SOURCE_ID>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ERROR_SOURCE_ID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ERROR_SOURCE_ID), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_ERROR_SOURCE_ID { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_ERROR_SOURCE_ID = _PCI_EXPRESS_ERROR_SOURCE_ID; -pub type PPCI_EXPRESS_ERROR_SOURCE_ID = *mut _PCI_EXPRESS_ERROR_SOURCE_ID; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS { - pub __bindgen_anon_1: _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS__bindgen_ty_1 { - #[inline] - pub fn TargetAbortOnSplitCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_TargetAbortOnSplitCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn MasterAbortOnSplitCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_MasterAbortOnSplitCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReceivedTargetAbort(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReceivedTargetAbort(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReceivedMasterAbort(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReceivedMasterAbort(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn RsvdZ(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_RsvdZ(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnexpectedSplitCompletionError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_UnexpectedSplitCompletionError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableSplitCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableSplitCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableDataError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableDataError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableAttributeError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableAttributeError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableAddressError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableAddressError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn DelayedTransactionDiscardTimerExpired(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_DelayedTransactionDiscardTimerExpired(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn PERRAsserted(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } - } - #[inline] - pub fn set_PERRAsserted(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn SERRAsserted(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } - } - #[inline] - pub fn set_SERRAsserted(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn InternalBridgeError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } - } - #[inline] - pub fn set_InternalBridgeError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 18u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 18u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TargetAbortOnSplitCompletion: ULONG, - MasterAbortOnSplitCompletion: ULONG, - ReceivedTargetAbort: ULONG, - ReceivedMasterAbort: ULONG, - RsvdZ: ULONG, - UnexpectedSplitCompletionError: ULONG, - UncorrectableSplitCompletion: ULONG, - UncorrectableDataError: ULONG, - UncorrectableAttributeError: ULONG, - UncorrectableAddressError: ULONG, - DelayedTransactionDiscardTimerExpired: ULONG, - PERRAsserted: ULONG, - SERRAsserted: ULONG, - InternalBridgeError: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let TargetAbortOnSplitCompletion: u32 = unsafe { - ::core::mem::transmute(TargetAbortOnSplitCompletion) - }; - TargetAbortOnSplitCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let MasterAbortOnSplitCompletion: u32 = unsafe { - ::core::mem::transmute(MasterAbortOnSplitCompletion) - }; - MasterAbortOnSplitCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let ReceivedTargetAbort: u32 = unsafe { - ::core::mem::transmute(ReceivedTargetAbort) - }; - ReceivedTargetAbort as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ReceivedMasterAbort: u32 = unsafe { - ::core::mem::transmute(ReceivedMasterAbort) - }; - ReceivedMasterAbort as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let RsvdZ: u32 = unsafe { ::core::mem::transmute(RsvdZ) }; - RsvdZ as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let UnexpectedSplitCompletionError: u32 = unsafe { - ::core::mem::transmute(UnexpectedSplitCompletionError) - }; - UnexpectedSplitCompletionError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let UncorrectableSplitCompletion: u32 = unsafe { - ::core::mem::transmute(UncorrectableSplitCompletion) - }; - UncorrectableSplitCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let UncorrectableDataError: u32 = unsafe { - ::core::mem::transmute(UncorrectableDataError) - }; - UncorrectableDataError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let UncorrectableAttributeError: u32 = unsafe { - ::core::mem::transmute(UncorrectableAttributeError) - }; - UncorrectableAttributeError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let UncorrectableAddressError: u32 = unsafe { - ::core::mem::transmute(UncorrectableAddressError) - }; - UncorrectableAddressError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let DelayedTransactionDiscardTimerExpired: u32 = unsafe { - ::core::mem::transmute(DelayedTransactionDiscardTimerExpired) - }; - DelayedTransactionDiscardTimerExpired as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let PERRAsserted: u32 = unsafe { - ::core::mem::transmute(PERRAsserted) - }; - PERRAsserted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let SERRAsserted: u32 = unsafe { - ::core::mem::transmute(SERRAsserted) - }; - SERRAsserted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 1u8, - { - let InternalBridgeError: u32 = unsafe { - ::core::mem::transmute(InternalBridgeError) - }; - InternalBridgeError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 18u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS = _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS; -pub type PPCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS = *mut _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK { - pub __bindgen_anon_1: _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK__bindgen_ty_1 { - #[inline] - pub fn TargetAbortOnSplitCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_TargetAbortOnSplitCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn MasterAbortOnSplitCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_MasterAbortOnSplitCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReceivedTargetAbort(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReceivedTargetAbort(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReceivedMasterAbort(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReceivedMasterAbort(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn RsvdZ(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_RsvdZ(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnexpectedSplitCompletionError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_UnexpectedSplitCompletionError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableSplitCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableSplitCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableDataError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableDataError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableAttributeError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableAttributeError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableAddressError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableAddressError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn DelayedTransactionDiscardTimerExpired(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_DelayedTransactionDiscardTimerExpired(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn PERRAsserted(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } - } - #[inline] - pub fn set_PERRAsserted(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn SERRAsserted(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } - } - #[inline] - pub fn set_SERRAsserted(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn InternalBridgeError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } - } - #[inline] - pub fn set_InternalBridgeError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 18u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 18u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TargetAbortOnSplitCompletion: ULONG, - MasterAbortOnSplitCompletion: ULONG, - ReceivedTargetAbort: ULONG, - ReceivedMasterAbort: ULONG, - RsvdZ: ULONG, - UnexpectedSplitCompletionError: ULONG, - UncorrectableSplitCompletion: ULONG, - UncorrectableDataError: ULONG, - UncorrectableAttributeError: ULONG, - UncorrectableAddressError: ULONG, - DelayedTransactionDiscardTimerExpired: ULONG, - PERRAsserted: ULONG, - SERRAsserted: ULONG, - InternalBridgeError: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let TargetAbortOnSplitCompletion: u32 = unsafe { - ::core::mem::transmute(TargetAbortOnSplitCompletion) - }; - TargetAbortOnSplitCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let MasterAbortOnSplitCompletion: u32 = unsafe { - ::core::mem::transmute(MasterAbortOnSplitCompletion) - }; - MasterAbortOnSplitCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let ReceivedTargetAbort: u32 = unsafe { - ::core::mem::transmute(ReceivedTargetAbort) - }; - ReceivedTargetAbort as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ReceivedMasterAbort: u32 = unsafe { - ::core::mem::transmute(ReceivedMasterAbort) - }; - ReceivedMasterAbort as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let RsvdZ: u32 = unsafe { ::core::mem::transmute(RsvdZ) }; - RsvdZ as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let UnexpectedSplitCompletionError: u32 = unsafe { - ::core::mem::transmute(UnexpectedSplitCompletionError) - }; - UnexpectedSplitCompletionError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let UncorrectableSplitCompletion: u32 = unsafe { - ::core::mem::transmute(UncorrectableSplitCompletion) - }; - UncorrectableSplitCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let UncorrectableDataError: u32 = unsafe { - ::core::mem::transmute(UncorrectableDataError) - }; - UncorrectableDataError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let UncorrectableAttributeError: u32 = unsafe { - ::core::mem::transmute(UncorrectableAttributeError) - }; - UncorrectableAttributeError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let UncorrectableAddressError: u32 = unsafe { - ::core::mem::transmute(UncorrectableAddressError) - }; - UncorrectableAddressError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let DelayedTransactionDiscardTimerExpired: u32 = unsafe { - ::core::mem::transmute(DelayedTransactionDiscardTimerExpired) - }; - DelayedTransactionDiscardTimerExpired as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let PERRAsserted: u32 = unsafe { - ::core::mem::transmute(PERRAsserted) - }; - PERRAsserted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let SERRAsserted: u32 = unsafe { - ::core::mem::transmute(SERRAsserted) - }; - SERRAsserted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 1u8, - { - let InternalBridgeError: u32 = unsafe { - ::core::mem::transmute(InternalBridgeError) - }; - InternalBridgeError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 18u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK = _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK; -pub type PPCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK = *mut _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY { - pub __bindgen_anon_1: _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY__bindgen_ty_1 { - #[inline] - pub fn TargetAbortOnSplitCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_TargetAbortOnSplitCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn MasterAbortOnSplitCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_MasterAbortOnSplitCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReceivedTargetAbort(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReceivedTargetAbort(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReceivedMasterAbort(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_ReceivedMasterAbort(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn RsvdZ(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_RsvdZ(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnexpectedSplitCompletionError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_UnexpectedSplitCompletionError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableSplitCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableSplitCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableDataError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableDataError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableAttributeError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableAttributeError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableAddressError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableAddressError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn DelayedTransactionDiscardTimerExpired(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_DelayedTransactionDiscardTimerExpired(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn PERRAsserted(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } - } - #[inline] - pub fn set_PERRAsserted(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn SERRAsserted(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } - } - #[inline] - pub fn set_SERRAsserted(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn InternalBridgeError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } - } - #[inline] - pub fn set_InternalBridgeError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 18u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 18u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TargetAbortOnSplitCompletion: ULONG, - MasterAbortOnSplitCompletion: ULONG, - ReceivedTargetAbort: ULONG, - ReceivedMasterAbort: ULONG, - RsvdZ: ULONG, - UnexpectedSplitCompletionError: ULONG, - UncorrectableSplitCompletion: ULONG, - UncorrectableDataError: ULONG, - UncorrectableAttributeError: ULONG, - UncorrectableAddressError: ULONG, - DelayedTransactionDiscardTimerExpired: ULONG, - PERRAsserted: ULONG, - SERRAsserted: ULONG, - InternalBridgeError: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let TargetAbortOnSplitCompletion: u32 = unsafe { - ::core::mem::transmute(TargetAbortOnSplitCompletion) - }; - TargetAbortOnSplitCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let MasterAbortOnSplitCompletion: u32 = unsafe { - ::core::mem::transmute(MasterAbortOnSplitCompletion) - }; - MasterAbortOnSplitCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let ReceivedTargetAbort: u32 = unsafe { - ::core::mem::transmute(ReceivedTargetAbort) - }; - ReceivedTargetAbort as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ReceivedMasterAbort: u32 = unsafe { - ::core::mem::transmute(ReceivedMasterAbort) - }; - ReceivedMasterAbort as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let RsvdZ: u32 = unsafe { ::core::mem::transmute(RsvdZ) }; - RsvdZ as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let UnexpectedSplitCompletionError: u32 = unsafe { - ::core::mem::transmute(UnexpectedSplitCompletionError) - }; - UnexpectedSplitCompletionError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let UncorrectableSplitCompletion: u32 = unsafe { - ::core::mem::transmute(UncorrectableSplitCompletion) - }; - UncorrectableSplitCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let UncorrectableDataError: u32 = unsafe { - ::core::mem::transmute(UncorrectableDataError) - }; - UncorrectableDataError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let UncorrectableAttributeError: u32 = unsafe { - ::core::mem::transmute(UncorrectableAttributeError) - }; - UncorrectableAttributeError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let UncorrectableAddressError: u32 = unsafe { - ::core::mem::transmute(UncorrectableAddressError) - }; - UncorrectableAddressError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let DelayedTransactionDiscardTimerExpired: u32 = unsafe { - ::core::mem::transmute(DelayedTransactionDiscardTimerExpired) - }; - DelayedTransactionDiscardTimerExpired as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let PERRAsserted: u32 = unsafe { - ::core::mem::transmute(PERRAsserted) - }; - PERRAsserted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let SERRAsserted: u32 = unsafe { - ::core::mem::transmute(SERRAsserted) - }; - SERRAsserted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 1u8, - { - let InternalBridgeError: u32 = unsafe { - ::core::mem::transmute(InternalBridgeError) - }; - InternalBridgeError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 18u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY = _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY; -pub type PPCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY = *mut _PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_SEC_AER_CAPABILITIES { - pub __bindgen_anon_1: _PCI_EXPRESS_SEC_AER_CAPABILITIES__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_SEC_AER_CAPABILITIES__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SEC_AER_CAPABILITIES__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SEC_AER_CAPABILITIES__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SEC_AER_CAPABILITIES__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SEC_AER_CAPABILITIES__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_SEC_AER_CAPABILITIES__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_SEC_AER_CAPABILITIES__bindgen_ty_1 { - #[inline] - pub fn SecondaryUncorrectableFirstErrorPtr(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u32) } - } - #[inline] - pub fn set_SecondaryUncorrectableFirstErrorPtr(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 5u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - SecondaryUncorrectableFirstErrorPtr: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 5u8, - { - let SecondaryUncorrectableFirstErrorPtr: u32 = unsafe { - ::core::mem::transmute(SecondaryUncorrectableFirstErrorPtr) - }; - SecondaryUncorrectableFirstErrorPtr as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 27u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SEC_AER_CAPABILITIES() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_SEC_AER_CAPABILITIES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SEC_AER_CAPABILITIES>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SEC_AER_CAPABILITIES)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SEC_AER_CAPABILITIES>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SEC_AER_CAPABILITIES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SEC_AER_CAPABILITIES), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_SEC_AER_CAPABILITIES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_SEC_AER_CAPABILITIES = _PCI_EXPRESS_SEC_AER_CAPABILITIES; -pub type PPCI_EXPRESS_SEC_AER_CAPABILITIES = *mut _PCI_EXPRESS_SEC_AER_CAPABILITIES; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_AER_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub UncorrectableErrorStatus: PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS, - pub UncorrectableErrorMask: PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK, - pub UncorrectableErrorSeverity: PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY, - pub CorrectableErrorStatus: PCI_EXPRESS_CORRECTABLE_ERROR_STATUS, - pub CorrectableErrorMask: PCI_EXPRESS_CORRECTABLE_ERROR_MASK, - pub CapabilitiesAndControl: PCI_EXPRESS_AER_CAPABILITIES, - pub HeaderLog: [ULONG; 4usize], - pub SecUncorrectableErrorStatus: PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS, - pub SecUncorrectableErrorMask: PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK, - pub SecUncorrectableErrorSeverity: PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY, - pub SecCapabilitiesAndControl: PCI_EXPRESS_SEC_AER_CAPABILITIES, - pub SecHeaderLog: [ULONG; 4usize], -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_AER_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_AER_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_AER_CAPABILITY>(), - 76usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_AER_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_AER_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_AER_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorStatus) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITY), - "::", - stringify!(UncorrectableErrorStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorMask) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITY), - "::", - stringify!(UncorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorSeverity) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITY), - "::", - stringify!(UncorrectableErrorSeverity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CorrectableErrorStatus) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITY), - "::", - stringify!(CorrectableErrorStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CorrectableErrorMask) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITY), - "::", - stringify!(CorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CapabilitiesAndControl) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITY), - "::", - stringify!(CapabilitiesAndControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HeaderLog) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITY), - "::", - stringify!(HeaderLog), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecUncorrectableErrorStatus) as usize - - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITY), - "::", - stringify!(SecUncorrectableErrorStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecUncorrectableErrorMask) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITY), - "::", - stringify!(SecUncorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecUncorrectableErrorSeverity) as usize - - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITY), - "::", - stringify!(SecUncorrectableErrorSeverity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecCapabilitiesAndControl) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITY), - "::", - stringify!(SecCapabilitiesAndControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecHeaderLog) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_AER_CAPABILITY), - "::", - stringify!(SecHeaderLog), - ), - ); -} -impl Default for _PCI_EXPRESS_AER_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_AER_CAPABILITY = _PCI_EXPRESS_AER_CAPABILITY; -pub type PPCI_EXPRESS_AER_CAPABILITY = *mut _PCI_EXPRESS_AER_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_ROOTPORT_AER_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub UncorrectableErrorStatus: PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS, - pub UncorrectableErrorMask: PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK, - pub UncorrectableErrorSeverity: PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY, - pub CorrectableErrorStatus: PCI_EXPRESS_CORRECTABLE_ERROR_STATUS, - pub CorrectableErrorMask: PCI_EXPRESS_CORRECTABLE_ERROR_MASK, - pub CapabilitiesAndControl: PCI_EXPRESS_AER_CAPABILITIES, - pub HeaderLog: [ULONG; 4usize], - pub RootErrorCommand: PCI_EXPRESS_ROOT_ERROR_COMMAND, - pub RootErrorStatus: PCI_EXPRESS_ROOT_ERROR_STATUS, - pub ErrorSourceId: PCI_EXPRESS_ERROR_SOURCE_ID, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ROOTPORT_AER_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY>(), - 56usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorStatus) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY), - "::", - stringify!(UncorrectableErrorStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorMask) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY), - "::", - stringify!(UncorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorSeverity) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY), - "::", - stringify!(UncorrectableErrorSeverity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CorrectableErrorStatus) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY), - "::", - stringify!(CorrectableErrorStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CorrectableErrorMask) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY), - "::", - stringify!(CorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CapabilitiesAndControl) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY), - "::", - stringify!(CapabilitiesAndControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HeaderLog) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY), - "::", - stringify!(HeaderLog), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RootErrorCommand) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY), - "::", - stringify!(RootErrorCommand), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootErrorStatus) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY), - "::", - stringify!(RootErrorStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSourceId) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOTPORT_AER_CAPABILITY), - "::", - stringify!(ErrorSourceId), - ), - ); -} -impl Default for _PCI_EXPRESS_ROOTPORT_AER_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_ROOTPORT_AER_CAPABILITY = _PCI_EXPRESS_ROOTPORT_AER_CAPABILITY; -pub type PPCI_EXPRESS_ROOTPORT_AER_CAPABILITY = *mut _PCI_EXPRESS_ROOTPORT_AER_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_BRIDGE_AER_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub UncorrectableErrorStatus: PCI_EXPRESS_UNCORRECTABLE_ERROR_STATUS, - pub UncorrectableErrorMask: PCI_EXPRESS_UNCORRECTABLE_ERROR_MASK, - pub UncorrectableErrorSeverity: PCI_EXPRESS_UNCORRECTABLE_ERROR_SEVERITY, - pub CorrectableErrorStatus: PCI_EXPRESS_CORRECTABLE_ERROR_STATUS, - pub CorrectableErrorMask: PCI_EXPRESS_CORRECTABLE_ERROR_MASK, - pub CapabilitiesAndControl: PCI_EXPRESS_AER_CAPABILITIES, - pub HeaderLog: [ULONG; 4usize], - pub SecUncorrectableErrorStatus: PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_STATUS, - pub SecUncorrectableErrorMask: PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_MASK, - pub SecUncorrectableErrorSeverity: PCI_EXPRESS_SEC_UNCORRECTABLE_ERROR_SEVERITY, - pub SecCapabilitiesAndControl: PCI_EXPRESS_SEC_AER_CAPABILITIES, - pub SecHeaderLog: [ULONG; 4usize], -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_BRIDGE_AER_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_BRIDGE_AER_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_BRIDGE_AER_CAPABILITY>(), - 76usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_BRIDGE_AER_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorStatus) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY), - "::", - stringify!(UncorrectableErrorStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorMask) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY), - "::", - stringify!(UncorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorSeverity) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY), - "::", - stringify!(UncorrectableErrorSeverity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CorrectableErrorStatus) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY), - "::", - stringify!(CorrectableErrorStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CorrectableErrorMask) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY), - "::", - stringify!(CorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CapabilitiesAndControl) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY), - "::", - stringify!(CapabilitiesAndControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HeaderLog) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY), - "::", - stringify!(HeaderLog), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecUncorrectableErrorStatus) as usize - - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY), - "::", - stringify!(SecUncorrectableErrorStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecUncorrectableErrorMask) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY), - "::", - stringify!(SecUncorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecUncorrectableErrorSeverity) as usize - - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY), - "::", - stringify!(SecUncorrectableErrorSeverity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecCapabilitiesAndControl) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY), - "::", - stringify!(SecCapabilitiesAndControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecHeaderLog) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_BRIDGE_AER_CAPABILITY), - "::", - stringify!(SecHeaderLog), - ), - ); -} -impl Default for _PCI_EXPRESS_BRIDGE_AER_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_BRIDGE_AER_CAPABILITY = _PCI_EXPRESS_BRIDGE_AER_CAPABILITY; -pub type PPCI_EXPRESS_BRIDGE_AER_CAPABILITY = *mut _PCI_EXPRESS_BRIDGE_AER_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_ACS_CAPABILITY_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_ACS_CAPABILITY_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ACS_CAPABILITY_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ACS_CAPABILITY_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ACS_CAPABILITY_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_ACS_CAPABILITY_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ACS_CAPABILITY_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_ACS_CAPABILITY_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_ACS_CAPABILITY_REGISTER__bindgen_ty_1 { - #[inline] - pub fn SourceValidation(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_SourceValidation(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn TranslationBlocking(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_TranslationBlocking(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn RequestRedirect(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_RequestRedirect(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn CompletionRedirect(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_CompletionRedirect(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn UpstreamForwarding(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_UpstreamForwarding(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn EgressControl(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_EgressControl(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn DirectTranslation(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set_DirectTranslation(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnhancedCapability(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } - } - #[inline] - pub fn set_EnhancedCapability(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn EgressControlVectorSize(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u16) } - } - #[inline] - pub fn set_EgressControlVectorSize(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - SourceValidation: USHORT, - TranslationBlocking: USHORT, - RequestRedirect: USHORT, - CompletionRedirect: USHORT, - UpstreamForwarding: USHORT, - EgressControl: USHORT, - DirectTranslation: USHORT, - EnhancedCapability: USHORT, - EgressControlVectorSize: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let SourceValidation: u16 = unsafe { - ::core::mem::transmute(SourceValidation) - }; - SourceValidation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let TranslationBlocking: u16 = unsafe { - ::core::mem::transmute(TranslationBlocking) - }; - TranslationBlocking as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let RequestRedirect: u16 = unsafe { - ::core::mem::transmute(RequestRedirect) - }; - RequestRedirect as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let CompletionRedirect: u16 = unsafe { - ::core::mem::transmute(CompletionRedirect) - }; - CompletionRedirect as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let UpstreamForwarding: u16 = unsafe { - ::core::mem::transmute(UpstreamForwarding) - }; - UpstreamForwarding as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let EgressControl: u16 = unsafe { - ::core::mem::transmute(EgressControl) - }; - EgressControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let DirectTranslation: u16 = unsafe { - ::core::mem::transmute(DirectTranslation) - }; - DirectTranslation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let EnhancedCapability: u16 = unsafe { - ::core::mem::transmute(EnhancedCapability) - }; - EnhancedCapability as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let EgressControlVectorSize: u16 = unsafe { - ::core::mem::transmute(EgressControlVectorSize) - }; - EgressControlVectorSize as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ACS_CAPABILITY_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ACS_CAPABILITY_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ACS_CAPABILITY_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ACS_CAPABILITY_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ACS_CAPABILITY_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ACS_CAPABILITY_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ACS_CAPABILITY_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_ACS_CAPABILITY_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_ACS_CAPABILITY_REGISTER = _PCI_EXPRESS_ACS_CAPABILITY_REGISTER; -pub type PPCI_EXPRESS_ACS_CAPABILITY_REGISTER = *mut _PCI_EXPRESS_ACS_CAPABILITY_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_ACS_CONTROL { - pub __bindgen_anon_1: _PCI_EXPRESS_ACS_CONTROL__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ACS_CONTROL__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ACS_CONTROL__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ACS_CONTROL__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ACS_CONTROL__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ACS_CONTROL__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ACS_CONTROL__bindgen_ty_1)), - ); -} -impl _PCI_EXPRESS_ACS_CONTROL__bindgen_ty_1 { - #[inline] - pub fn SourceValidation(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_SourceValidation(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn TranslationBlocking(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_TranslationBlocking(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn RequestRedirect(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_RequestRedirect(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn CompletionRedirect(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_CompletionRedirect(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn UpstreamForwarding(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_UpstreamForwarding(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn EgressControl(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_EgressControl(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn DirectTranslation(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set_DirectTranslation(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoBlocking(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } - } - #[inline] - pub fn set_IoBlocking(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn DspMemoryControl(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u16) } - } - #[inline] - pub fn set_DspMemoryControl(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 2u8, val as u64) - } - } - #[inline] - pub fn UspMemoryControl(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u16) } - } - #[inline] - pub fn set_UspMemoryControl(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 2u8, val as u64) - } - } - #[inline] - pub fn UnclaimedRedirect(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } - } - #[inline] - pub fn set_UnclaimedRedirect(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 3u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - SourceValidation: USHORT, - TranslationBlocking: USHORT, - RequestRedirect: USHORT, - CompletionRedirect: USHORT, - UpstreamForwarding: USHORT, - EgressControl: USHORT, - DirectTranslation: USHORT, - IoBlocking: USHORT, - DspMemoryControl: USHORT, - UspMemoryControl: USHORT, - UnclaimedRedirect: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let SourceValidation: u16 = unsafe { - ::core::mem::transmute(SourceValidation) - }; - SourceValidation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let TranslationBlocking: u16 = unsafe { - ::core::mem::transmute(TranslationBlocking) - }; - TranslationBlocking as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let RequestRedirect: u16 = unsafe { - ::core::mem::transmute(RequestRedirect) - }; - RequestRedirect as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let CompletionRedirect: u16 = unsafe { - ::core::mem::transmute(CompletionRedirect) - }; - CompletionRedirect as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let UpstreamForwarding: u16 = unsafe { - ::core::mem::transmute(UpstreamForwarding) - }; - UpstreamForwarding as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let EgressControl: u16 = unsafe { - ::core::mem::transmute(EgressControl) - }; - EgressControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let DirectTranslation: u16 = unsafe { - ::core::mem::transmute(DirectTranslation) - }; - DirectTranslation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let IoBlocking: u16 = unsafe { ::core::mem::transmute(IoBlocking) }; - IoBlocking as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 2u8, - { - let DspMemoryControl: u16 = unsafe { - ::core::mem::transmute(DspMemoryControl) - }; - DspMemoryControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 2u8, - { - let UspMemoryControl: u16 = unsafe { - ::core::mem::transmute(UspMemoryControl) - }; - UspMemoryControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let UnclaimedRedirect: u16 = unsafe { - ::core::mem::transmute(UnclaimedRedirect) - }; - UnclaimedRedirect as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 3u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ACS_CONTROL() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ACS_CONTROL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ACS_CONTROL>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ACS_CONTROL)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ACS_CONTROL>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ACS_CONTROL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ACS_CONTROL), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_ACS_CONTROL { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_ACS_CONTROL = _PCI_EXPRESS_ACS_CONTROL; -pub type PPCI_EXPRESS_ACS_CONTROL = *mut _PCI_EXPRESS_ACS_CONTROL; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_ACS_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub Capability: PCI_EXPRESS_ACS_CAPABILITY_REGISTER, - pub Control: PCI_EXPRESS_ACS_CONTROL, - pub EgressControl: [ULONG; 1usize], -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ACS_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ACS_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ACS_CAPABILITY>(), - 12usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ACS_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ACS_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ACS_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ACS_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capability) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ACS_CAPABILITY), - "::", - stringify!(Capability), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ACS_CAPABILITY), - "::", - stringify!(Control), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EgressControl) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ACS_CAPABILITY), - "::", - stringify!(EgressControl), - ), - ); -} -impl Default for _PCI_EXPRESS_ACS_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_ACS_CAPABILITY = _PCI_EXPRESS_ACS_CAPABILITY; -pub type PPCI_EXPRESS_ACS_CAPABILITY = *mut _PCI_EXPRESS_ACS_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_SRIOV_CAPS { - pub __bindgen_anon_1: _PCI_EXPRESS_SRIOV_CAPS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_SRIOV_CAPS__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SRIOV_CAPS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SRIOV_CAPS__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SRIOV_CAPS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SRIOV_CAPS__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SRIOV_CAPS__bindgen_ty_1)), - ); -} -impl _PCI_EXPRESS_SRIOV_CAPS__bindgen_ty_1 { - #[inline] - pub fn VFMigrationCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_VFMigrationCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 20u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 20u8, val as u64) - } - } - #[inline] - pub fn VFMigrationInterruptNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 11u8) as u32) } - } - #[inline] - pub fn set_VFMigrationInterruptNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 11u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - VFMigrationCapable: ULONG, - Reserved1: ULONG, - VFMigrationInterruptNumber: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let VFMigrationCapable: u32 = unsafe { - ::core::mem::transmute(VFMigrationCapable) - }; - VFMigrationCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 20u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 11u8, - { - let VFMigrationInterruptNumber: u32 = unsafe { - ::core::mem::transmute(VFMigrationInterruptNumber) - }; - VFMigrationInterruptNumber as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SRIOV_CAPS() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_SRIOV_CAPS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SRIOV_CAPS>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SRIOV_CAPS)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SRIOV_CAPS>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SRIOV_CAPS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_SRIOV_CAPS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_SRIOV_CAPS = _PCI_EXPRESS_SRIOV_CAPS; -pub type PPCI_EXPRESS_SRIOV_CAPS = *mut _PCI_EXPRESS_SRIOV_CAPS; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_SRIOV_CONTROL { - pub __bindgen_anon_1: _PCI_EXPRESS_SRIOV_CONTROL__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_SRIOV_CONTROL__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SRIOV_CONTROL__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SRIOV_CONTROL__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SRIOV_CONTROL__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SRIOV_CONTROL__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SRIOV_CONTROL__bindgen_ty_1)), - ); -} -impl _PCI_EXPRESS_SRIOV_CONTROL__bindgen_ty_1 { - #[inline] - pub fn VFEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_VFEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn VFMigrationEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_VFMigrationEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn VFMigrationInterruptEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_VFMigrationInterruptEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn VFMemorySpaceEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_VFMemorySpaceEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn ARICapableHierarchy(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_ARICapableHierarchy(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 11u8) as u16) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 11u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - VFEnable: USHORT, - VFMigrationEnable: USHORT, - VFMigrationInterruptEnable: USHORT, - VFMemorySpaceEnable: USHORT, - ARICapableHierarchy: USHORT, - Reserved1: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let VFEnable: u16 = unsafe { ::core::mem::transmute(VFEnable) }; - VFEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let VFMigrationEnable: u16 = unsafe { - ::core::mem::transmute(VFMigrationEnable) - }; - VFMigrationEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let VFMigrationInterruptEnable: u16 = unsafe { - ::core::mem::transmute(VFMigrationInterruptEnable) - }; - VFMigrationInterruptEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let VFMemorySpaceEnable: u16 = unsafe { - ::core::mem::transmute(VFMemorySpaceEnable) - }; - VFMemorySpaceEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let ARICapableHierarchy: u16 = unsafe { - ::core::mem::transmute(ARICapableHierarchy) - }; - ARICapableHierarchy as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 11u8, - { - let Reserved1: u16 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SRIOV_CONTROL() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_SRIOV_CONTROL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SRIOV_CONTROL>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SRIOV_CONTROL)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SRIOV_CONTROL>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SRIOV_CONTROL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CONTROL), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_SRIOV_CONTROL { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_SRIOV_CONTROL = _PCI_EXPRESS_SRIOV_CONTROL; -pub type PPCI_EXPRESS_SRIOV_CONTROL = *mut _PCI_EXPRESS_SRIOV_CONTROL; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_SRIOV_STATUS { - pub __bindgen_anon_1: _PCI_EXPRESS_SRIOV_STATUS__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_SRIOV_STATUS__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SRIOV_STATUS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SRIOV_STATUS__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SRIOV_STATUS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SRIOV_STATUS__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SRIOV_STATUS__bindgen_ty_1)), - ); -} -impl _PCI_EXPRESS_SRIOV_STATUS__bindgen_ty_1 { - #[inline] - pub fn VFMigrationStatus(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_VFMigrationStatus(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 15u8) as u16) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 15u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - VFMigrationStatus: USHORT, - Reserved1: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let VFMigrationStatus: u16 = unsafe { - ::core::mem::transmute(VFMigrationStatus) - }; - VFMigrationStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 15u8, - { - let Reserved1: u16 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SRIOV_STATUS() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_SRIOV_STATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SRIOV_STATUS>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SRIOV_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SRIOV_STATUS>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SRIOV_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_STATUS), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_SRIOV_STATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_SRIOV_STATUS = _PCI_EXPRESS_SRIOV_STATUS; -pub type PPCI_EXPRESS_SRIOV_STATUS = *mut _PCI_EXPRESS_SRIOV_STATUS; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY { - pub __bindgen_anon_1: _PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY__bindgen_ty_1 { - #[inline] - pub fn VFMigrationStateBIR(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u32) } - } - #[inline] - pub fn set_VFMigrationStateBIR(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn VFMigrationStateOffset(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } - } - #[inline] - pub fn set_VFMigrationStateOffset(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 29u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - VFMigrationStateBIR: ULONG, - VFMigrationStateOffset: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let VFMigrationStateBIR: u32 = unsafe { - ::core::mem::transmute(VFMigrationStateBIR) - }; - VFMigrationStateBIR as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 29u8, - { - let VFMigrationStateOffset: u32 = unsafe { - ::core::mem::transmute(VFMigrationStateOffset) - }; - VFMigrationStateOffset as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY = _PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY; -pub type PPCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY = *mut _PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_SRIOV_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub SRIOVCapabilities: PCI_EXPRESS_SRIOV_CAPS, - pub SRIOVControl: PCI_EXPRESS_SRIOV_CONTROL, - pub SRIOVStatus: PCI_EXPRESS_SRIOV_STATUS, - pub InitialVFs: USHORT, - pub TotalVFs: USHORT, - pub NumVFs: USHORT, - pub FunctionDependencyLink: UCHAR, - pub RsvdP1: UCHAR, - pub FirstVFOffset: USHORT, - pub VFStride: USHORT, - pub RsvdP2: USHORT, - pub VFDeviceId: USHORT, - pub SupportedPageSizes: ULONG, - pub SystemPageSize: ULONG, - pub BaseAddresses: [ULONG; 6usize], - pub VFMigrationStateArrayOffset: PCI_EXPRESS_SRIOV_MIGRATION_STATE_ARRAY, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SRIOV_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_SRIOV_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SRIOV_CAPABILITY>(), - 64usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SRIOV_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SRIOVCapabilities) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(SRIOVCapabilities), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SRIOVControl) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(SRIOVControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SRIOVStatus) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(SRIOVStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InitialVFs) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(InitialVFs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalVFs) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(TotalVFs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumVFs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(NumVFs), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FunctionDependencyLink) as usize - ptr as usize - }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(FunctionDependencyLink), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RsvdP1) as usize - ptr as usize }, - 19usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(RsvdP1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FirstVFOffset) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(FirstVFOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VFStride) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(VFStride), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RsvdP2) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(RsvdP2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VFDeviceId) as usize - ptr as usize }, - 26usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(VFDeviceId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SupportedPageSizes) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(SupportedPageSizes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SystemPageSize) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(SystemPageSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseAddresses) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(BaseAddresses), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VFMigrationStateArrayOffset) as usize - - ptr as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SRIOV_CAPABILITY), - "::", - stringify!(VFMigrationStateArrayOffset), - ), - ); -} -impl Default for _PCI_EXPRESS_SRIOV_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_SRIOV_CAPABILITY = _PCI_EXPRESS_SRIOV_CAPABILITY; -pub type PPCI_EXPRESS_SRIOV_CAPABILITY = *mut _PCI_EXPRESS_SRIOV_CAPABILITY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_DEVICE_PRESENCE_PARAMETERS { - pub Size: ULONG, - pub Flags: ULONG, - pub VendorID: USHORT, - pub DeviceID: USHORT, - pub RevisionID: UCHAR, - pub SubVendorID: USHORT, - pub SubSystemID: USHORT, - pub BaseClass: UCHAR, - pub SubClass: UCHAR, - pub ProgIf: UCHAR, -} -#[test] -fn bindgen_test_layout__PCI_DEVICE_PRESENCE_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_DEVICE_PRESENCE_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_DEVICE_PRESENCE_PARAMETERS>(), - 24usize, - concat!("Size of: ", stringify!(_PCI_DEVICE_PRESENCE_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_DEVICE_PRESENCE_PARAMETERS>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_DEVICE_PRESENCE_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENCE_PARAMETERS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENCE_PARAMETERS), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VendorID) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENCE_PARAMETERS), - "::", - stringify!(VendorID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceID) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENCE_PARAMETERS), - "::", - stringify!(DeviceID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RevisionID) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENCE_PARAMETERS), - "::", - stringify!(RevisionID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubVendorID) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENCE_PARAMETERS), - "::", - stringify!(SubVendorID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubSystemID) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENCE_PARAMETERS), - "::", - stringify!(SubSystemID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseClass) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENCE_PARAMETERS), - "::", - stringify!(BaseClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubClass) as usize - ptr as usize }, - 19usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENCE_PARAMETERS), - "::", - stringify!(SubClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProgIf) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENCE_PARAMETERS), - "::", - stringify!(ProgIf), - ), - ); -} -pub type PCI_DEVICE_PRESENCE_PARAMETERS = _PCI_DEVICE_PRESENCE_PARAMETERS; -pub type PPCI_DEVICE_PRESENCE_PARAMETERS = *mut _PCI_DEVICE_PRESENCE_PARAMETERS; -pub type PCI_IS_DEVICE_PRESENT = ::core::option::Option< - unsafe extern "C" fn( - VendorID: USHORT, - DeviceID: USHORT, - RevisionID: UCHAR, - SubVendorID: USHORT, - SubSystemID: USHORT, - Flags: ULONG, - ) -> BOOLEAN, ->; -pub type PPCI_IS_DEVICE_PRESENT = PCI_IS_DEVICE_PRESENT; -pub type PCI_IS_DEVICE_PRESENT_EX = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - Parameters: PPCI_DEVICE_PRESENCE_PARAMETERS, - ) -> BOOLEAN, ->; -pub type PPCI_IS_DEVICE_PRESENT_EX = PCI_IS_DEVICE_PRESENT_EX; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCI_DEVICE_PRESENT_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub IsDevicePresent: PPCI_IS_DEVICE_PRESENT, - pub IsDevicePresentEx: PPCI_IS_DEVICE_PRESENT_EX, -} -#[test] -fn bindgen_test_layout__PCI_DEVICE_PRESENT_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_DEVICE_PRESENT_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_DEVICE_PRESENT_INTERFACE>(), - 48usize, - concat!("Size of: ", stringify!(_PCI_DEVICE_PRESENT_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_DEVICE_PRESENT_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_PCI_DEVICE_PRESENT_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENT_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENT_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENT_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENT_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENT_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsDevicePresent) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENT_INTERFACE), - "::", - stringify!(IsDevicePresent), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IsDevicePresentEx) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEVICE_PRESENT_INTERFACE), - "::", - stringify!(IsDevicePresentEx), - ), - ); -} -impl Default for _PCI_DEVICE_PRESENT_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_DEVICE_PRESENT_INTERFACE = _PCI_DEVICE_PRESENT_INTERFACE; -pub type PPCI_DEVICE_PRESENT_INTERFACE = *mut _PCI_DEVICE_PRESENT_INTERFACE; -pub type PCI_EXPRESS_ENTER_LINK_QUIESCENT_MODE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID) -> NTSTATUS, ->; -pub type PPCI_EXPRESS_ENTER_LINK_QUIESCENT_MODE = PCI_EXPRESS_ENTER_LINK_QUIESCENT_MODE; -pub type PCI_EXPRESS_EXIT_LINK_QUIESCENT_MODE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID) -> NTSTATUS, ->; -pub type PPCI_EXPRESS_EXIT_LINK_QUIESCENT_MODE = PCI_EXPRESS_EXIT_LINK_QUIESCENT_MODE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCI_EXPRESS_LINK_QUIESCENT_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub PciExpressEnterLinkQuiescentMode: PPCI_EXPRESS_ENTER_LINK_QUIESCENT_MODE, - pub PciExpressExitLinkQuiescentMode: PPCI_EXPRESS_EXIT_LINK_QUIESCENT_MODE, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_QUIESCENT_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_LINK_QUIESCENT_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_QUIESCENT_INTERFACE>(), - 48usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_LINK_QUIESCENT_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_QUIESCENT_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_LINK_QUIESCENT_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_QUIESCENT_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_QUIESCENT_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_QUIESCENT_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_QUIESCENT_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_QUIESCENT_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PciExpressEnterLinkQuiescentMode) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_QUIESCENT_INTERFACE), - "::", - stringify!(PciExpressEnterLinkQuiescentMode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PciExpressExitLinkQuiescentMode) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_QUIESCENT_INTERFACE), - "::", - stringify!(PciExpressExitLinkQuiescentMode), - ), - ); -} -impl Default for _PCI_EXPRESS_LINK_QUIESCENT_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_LINK_QUIESCENT_INTERFACE = _PCI_EXPRESS_LINK_QUIESCENT_INTERFACE; -pub type PPCI_EXPRESS_LINK_QUIESCENT_INTERFACE = *mut _PCI_EXPRESS_LINK_QUIESCENT_INTERFACE; -pub type PPCI_EXPRESS_ROOT_PORT_READ_CONFIG_SPACE = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - Buffer: PVOID, - Offset: ULONG, - Length: ULONG, - ) -> ULONG, ->; -pub type PPCI_EXPRESS_ROOT_PORT_WRITE_CONFIG_SPACE = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - Buffer: PVOID, - Offset: ULONG, - Length: ULONG, - ) -> ULONG, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCI_EXPRESS_ROOT_PORT_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub ReadConfigSpace: PPCI_EXPRESS_ROOT_PORT_READ_CONFIG_SPACE, - pub WriteConfigSpace: PPCI_EXPRESS_ROOT_PORT_WRITE_CONFIG_SPACE, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ROOT_PORT_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ROOT_PORT_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ROOT_PORT_INTERFACE>(), - 48usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ROOT_PORT_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ROOT_PORT_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ROOT_PORT_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOT_PORT_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOT_PORT_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOT_PORT_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOT_PORT_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOT_PORT_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadConfigSpace) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOT_PORT_INTERFACE), - "::", - stringify!(ReadConfigSpace), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WriteConfigSpace) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOT_PORT_INTERFACE), - "::", - stringify!(WriteConfigSpace), - ), - ); -} -impl Default for _PCI_EXPRESS_ROOT_PORT_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_ROOT_PORT_INTERFACE = _PCI_EXPRESS_ROOT_PORT_INTERFACE; -pub type PPCI_EXPRESS_ROOT_PORT_INTERFACE = *mut _PCI_EXPRESS_ROOT_PORT_INTERFACE; -pub type PCI_MSIX_SET_ENTRY = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - TableEntry: ULONG, - MessageNumber: ULONG, - ) -> NTSTATUS, ->; -pub type PPCI_MSIX_SET_ENTRY = PCI_MSIX_SET_ENTRY; -pub type PCI_MSIX_MASKUNMASK_ENTRY = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, TableEntry: ULONG) -> NTSTATUS, ->; -pub type PPCI_MSIX_MASKUNMASK_ENTRY = PCI_MSIX_MASKUNMASK_ENTRY; -pub type PCI_MSIX_GET_ENTRY = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - TableEntry: ULONG, - MessageNumber: PULONG, - Masked: PBOOLEAN, - ) -> NTSTATUS, ->; -pub type PPCI_MSIX_GET_ENTRY = PCI_MSIX_GET_ENTRY; -pub type PCI_MSIX_GET_TABLE_SIZE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, TableSize: PULONG) -> NTSTATUS, ->; -pub type PPCI_MSIX_GET_TABLE_SIZE = PCI_MSIX_GET_TABLE_SIZE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCI_MSIX_TABLE_CONFIG_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub SetTableEntry: PPCI_MSIX_SET_ENTRY, - pub MaskTableEntry: PPCI_MSIX_MASKUNMASK_ENTRY, - pub UnmaskTableEntry: PPCI_MSIX_MASKUNMASK_ENTRY, - pub GetTableEntry: PPCI_MSIX_GET_ENTRY, - pub GetTableSize: PPCI_MSIX_GET_TABLE_SIZE, -} -#[test] -fn bindgen_test_layout__PCI_MSIX_TABLE_CONFIG_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_MSIX_TABLE_CONFIG_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_MSIX_TABLE_CONFIG_INTERFACE>(), - 72usize, - concat!("Size of: ", stringify!(_PCI_MSIX_TABLE_CONFIG_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_MSIX_TABLE_CONFIG_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_PCI_MSIX_TABLE_CONFIG_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_MSIX_TABLE_CONFIG_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_MSIX_TABLE_CONFIG_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_MSIX_TABLE_CONFIG_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_MSIX_TABLE_CONFIG_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_MSIX_TABLE_CONFIG_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetTableEntry) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_MSIX_TABLE_CONFIG_INTERFACE), - "::", - stringify!(SetTableEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaskTableEntry) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCI_MSIX_TABLE_CONFIG_INTERFACE), - "::", - stringify!(MaskTableEntry), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnmaskTableEntry) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PCI_MSIX_TABLE_CONFIG_INTERFACE), - "::", - stringify!(UnmaskTableEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GetTableEntry) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_PCI_MSIX_TABLE_CONFIG_INTERFACE), - "::", - stringify!(GetTableEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GetTableSize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_PCI_MSIX_TABLE_CONFIG_INTERFACE), - "::", - stringify!(GetTableSize), - ), - ); -} -impl Default for _PCI_MSIX_TABLE_CONFIG_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_MSIX_TABLE_CONFIG_INTERFACE = _PCI_MSIX_TABLE_CONFIG_INTERFACE; -pub type PPCI_MSIX_TABLE_CONFIG_INTERFACE = *mut _PCI_MSIX_TABLE_CONFIG_INTERFACE; -pub type CLFS_CONTAINER_ID = ULONG; -pub type PCLFS_CONTAINER_ID = *mut CLFS_CONTAINER_ID; -pub type PPCLFS_CONTAINER_ID = *mut *mut CLFS_CONTAINER_ID; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLS_LSN { - pub Internal: ULONGLONG, -} -#[test] -fn bindgen_test_layout__CLS_LSN() { - const UNINIT: ::core::mem::MaybeUninit<_CLS_LSN> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLS_LSN>(), - 8usize, - concat!("Size of: ", stringify!(_CLS_LSN)), - ); - assert_eq!( - ::core::mem::align_of::<_CLS_LSN>(), - 8usize, - concat!("Alignment of ", stringify!(_CLS_LSN)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Internal) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_CLS_LSN), "::", stringify!(Internal)), - ); -} -pub type CLS_LSN = _CLS_LSN; -pub type PCLS_LSN = *mut _CLS_LSN; -pub type PPCLS_LSN = *mut *mut _CLS_LSN; -pub type CLFS_LSN = CLS_LSN; -pub type PCLFS_LSN = *mut CLFS_LSN; -pub type PPCLFS_LSN = *mut *mut CLFS_LSN; -pub type CLS_RECORD_TYPE = UCHAR; -pub type PCLS_RECORD_TYPE = *mut UCHAR; -pub type PPCLS_RECORD_TYPE = *mut *mut UCHAR; -pub type CLFS_RECORD_TYPE = CLS_RECORD_TYPE; -pub type PCLFS_RECORD_TYPE = *mut CLS_RECORD_TYPE; -pub type PPCLFS_RECORD_TYPE = *mut *mut CLS_RECORD_TYPE; -pub mod _CLS_CONTEXT_MODE { - pub type Type = ::core::ffi::c_int; - pub const ClsContextNone: Type = 0; - pub const ClsContextUndoNext: Type = 1; - pub const ClsContextPrevious: Type = 2; - pub const ClsContextForward: Type = 3; -} -pub use self::_CLS_CONTEXT_MODE::Type as CLS_CONTEXT_MODE; -pub type PCLS_CONTEXT_MODE = *mut _CLS_CONTEXT_MODE::Type; -pub type PPCLS_CONTEXT_MODE = *mut *mut _CLS_CONTEXT_MODE::Type; -pub mod _CLFS_CONTEXT_MODE { - pub type Type = ::core::ffi::c_int; - pub const ClfsContextNone: Type = 0; - pub const ClfsContextUndoNext: Type = 1; - pub const ClfsContextPrevious: Type = 2; - pub const ClfsContextForward: Type = 3; -} -pub use self::_CLFS_CONTEXT_MODE::Type as CLFS_CONTEXT_MODE; -pub type PCLFS_CONTEXT_MODE = *mut _CLFS_CONTEXT_MODE::Type; -pub type PPCLFS_CONTEXT_MODE = *mut *mut _CLFS_CONTEXT_MODE::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_NODE_ID { - pub cType: ULONG, - pub cbNode: ULONG, -} -#[test] -fn bindgen_test_layout__CLFS_NODE_ID() { - const UNINIT: ::core::mem::MaybeUninit<_CLFS_NODE_ID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_NODE_ID>(), - 8usize, - concat!("Size of: ", stringify!(_CLFS_NODE_ID)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_NODE_ID>(), - 4usize, - concat!("Alignment of ", stringify!(_CLFS_NODE_ID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cType) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_CLFS_NODE_ID), "::", stringify!(cType)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbNode) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_CLFS_NODE_ID), "::", stringify!(cbNode)), - ); -} -pub type CLFS_NODE_ID = _CLFS_NODE_ID; -pub type PCLFS_NODE_ID = *mut _CLFS_NODE_ID; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CLS_WRITE_ENTRY { - pub Buffer: PVOID, - pub ByteLength: ULONG, -} -#[test] -fn bindgen_test_layout__CLS_WRITE_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_CLS_WRITE_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLS_WRITE_ENTRY>(), - 16usize, - concat!("Size of: ", stringify!(_CLS_WRITE_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_CLS_WRITE_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_CLS_WRITE_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLS_WRITE_ENTRY), - "::", - stringify!(Buffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLS_WRITE_ENTRY), - "::", - stringify!(ByteLength), - ), - ); -} -impl Default for _CLS_WRITE_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLS_WRITE_ENTRY = _CLS_WRITE_ENTRY; -pub type PCLS_WRITE_ENTRY = *mut _CLS_WRITE_ENTRY; -pub type PPCLS_WRITE_ENTRY = *mut *mut _CLS_WRITE_ENTRY; -pub type CLFS_WRITE_ENTRY = CLS_WRITE_ENTRY; -pub type PCLFS_WRITE_ENTRY = *mut CLFS_WRITE_ENTRY; -pub type PPCLFS_WRITE_ENTRY = *mut *mut CLFS_WRITE_ENTRY; -pub type CLFS_LOG_ID = GUID; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLS_INFORMATION { - pub TotalAvailable: LONGLONG, - pub CurrentAvailable: LONGLONG, - pub TotalReservation: LONGLONG, - pub BaseFileSize: ULONGLONG, - pub ContainerSize: ULONGLONG, - pub TotalContainers: ULONG, - pub FreeContainers: ULONG, - pub TotalClients: ULONG, - pub Attributes: ULONG, - pub FlushThreshold: ULONG, - pub SectorSize: ULONG, - pub MinArchiveTailLsn: CLS_LSN, - pub BaseLsn: CLS_LSN, - pub LastFlushedLsn: CLS_LSN, - pub LastLsn: CLS_LSN, - pub RestartLsn: CLS_LSN, - pub Identity: GUID, -} -#[test] -fn bindgen_test_layout__CLS_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_CLS_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLS_INFORMATION>(), - 120usize, - concat!("Size of: ", stringify!(_CLS_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_CLS_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_CLS_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalAvailable) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(TotalAvailable), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CurrentAvailable) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(CurrentAvailable), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalReservation) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(TotalReservation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseFileSize) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(BaseFileSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContainerSize) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(ContainerSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalContainers) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(TotalContainers), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeContainers) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(FreeContainers), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalClients) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(TotalClients), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Attributes) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(Attributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FlushThreshold) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(FlushThreshold), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectorSize) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(SectorSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MinArchiveTailLsn) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(MinArchiveTailLsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseLsn) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(BaseLsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastFlushedLsn) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(LastFlushedLsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastLsn) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(LastLsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RestartLsn) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(RestartLsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Identity) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_CLS_INFORMATION), - "::", - stringify!(Identity), - ), - ); -} -pub type CLS_INFORMATION = _CLS_INFORMATION; -pub type PCLS_INFORMATION = *mut _CLS_INFORMATION; -pub type PPCLS_INFORMATION = *mut _CLS_INFORMATION; -pub type CLFS_INFORMATION = CLS_INFORMATION; -pub type PCLFS_INFORMATION = *mut CLFS_INFORMATION; -pub type PPCLFS_INFORMATION = *mut CLFS_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_LOG_NAME_INFORMATION { - pub NameLengthInBytes: USHORT, - pub Name: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__CLFS_LOG_NAME_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_CLFS_LOG_NAME_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_LOG_NAME_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_CLFS_LOG_NAME_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_LOG_NAME_INFORMATION>(), - 2usize, - concat!("Alignment of ", stringify!(_CLFS_LOG_NAME_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NameLengthInBytes) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_LOG_NAME_INFORMATION), - "::", - stringify!(NameLengthInBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_LOG_NAME_INFORMATION), - "::", - stringify!(Name), - ), - ); -} -pub type CLFS_LOG_NAME_INFORMATION = _CLFS_LOG_NAME_INFORMATION; -pub type PCLFS_LOG_NAME_INFORMATION = *mut _CLFS_LOG_NAME_INFORMATION; -pub type PPCLFS_LOG_NAME_INFORMATION = *mut *mut _CLFS_LOG_NAME_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_STREAM_ID_INFORMATION { - pub StreamIdentifier: UCHAR, -} -#[test] -fn bindgen_test_layout__CLFS_STREAM_ID_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_CLFS_STREAM_ID_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_STREAM_ID_INFORMATION>(), - 1usize, - concat!("Size of: ", stringify!(_CLFS_STREAM_ID_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_STREAM_ID_INFORMATION>(), - 1usize, - concat!("Alignment of ", stringify!(_CLFS_STREAM_ID_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StreamIdentifier) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_STREAM_ID_INFORMATION), - "::", - stringify!(StreamIdentifier), - ), - ); -} -pub type CLFS_STREAM_ID_INFORMATION = _CLFS_STREAM_ID_INFORMATION; -pub type PCLFS_STREAM_ID_INFORMATION = *mut _CLFS_STREAM_ID_INFORMATION; -pub type PPCLFS_STREAM_ID_INFORMATION = *mut *mut _CLFS_STREAM_ID_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_PHYSICAL_LSN_INFORMATION { - pub StreamIdentifier: UCHAR, - pub VirtualLsn: CLFS_LSN, - pub PhysicalLsn: CLFS_LSN, -} -#[test] -fn bindgen_test_layout__CLFS_PHYSICAL_LSN_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_CLFS_PHYSICAL_LSN_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_PHYSICAL_LSN_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_CLFS_PHYSICAL_LSN_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_PHYSICAL_LSN_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_CLFS_PHYSICAL_LSN_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StreamIdentifier) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_PHYSICAL_LSN_INFORMATION), - "::", - stringify!(StreamIdentifier), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VirtualLsn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_PHYSICAL_LSN_INFORMATION), - "::", - stringify!(VirtualLsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PhysicalLsn) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_PHYSICAL_LSN_INFORMATION), - "::", - stringify!(PhysicalLsn), - ), - ); -} -pub type CLFS_PHYSICAL_LSN_INFORMATION = _CLFS_PHYSICAL_LSN_INFORMATION; -pub type PCLFS_PHYSICAL_LSN_INFORMATION = *mut _CLFS_PHYSICAL_LSN_INFORMATION; -pub type CLS_CONTAINER_STATE = UINT32; -pub type PCLS_CONTAINER_STATE = *mut UINT32; -pub type PPCLS_CONTAINER_STATE = *mut UINT32; -pub type CLFS_CONTAINER_STATE = CLS_CONTAINER_STATE; -pub type PCLFS_CONTAINER_STATE = *mut CLS_CONTAINER_STATE; -pub type PPCLFS_CONTAINER_STATE = *mut CLS_CONTAINER_STATE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CLS_CONTAINER_INFORMATION { - pub FileAttributes: ULONG, - pub CreationTime: ULONGLONG, - pub LastAccessTime: ULONGLONG, - pub LastWriteTime: ULONGLONG, - pub ContainerSize: LONGLONG, - pub FileNameActualLength: ULONG, - pub FileNameLength: ULONG, - pub FileName: [WCHAR; 256usize], - pub State: CLFS_CONTAINER_STATE, - pub PhysicalContainerId: CLFS_CONTAINER_ID, - pub LogicalContainerId: CLFS_CONTAINER_ID, -} -#[test] -fn bindgen_test_layout__CLS_CONTAINER_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_CLS_CONTAINER_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLS_CONTAINER_INFORMATION>(), - 576usize, - concat!("Size of: ", stringify!(_CLS_CONTAINER_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_CLS_CONTAINER_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_CLS_CONTAINER_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLS_CONTAINER_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLS_CONTAINER_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CLS_CONTAINER_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CLS_CONTAINER_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContainerSize) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_CLS_CONTAINER_INFORMATION), - "::", - stringify!(ContainerSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileNameActualLength) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_CLS_CONTAINER_INFORMATION), - "::", - stringify!(FileNameActualLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_CLS_CONTAINER_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_CLS_CONTAINER_INFORMATION), - "::", - stringify!(FileName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).State) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_CLS_CONTAINER_INFORMATION), - "::", - stringify!(State), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PhysicalContainerId) as usize - ptr as usize - }, - 564usize, - concat!( - "Offset of field: ", - stringify!(_CLS_CONTAINER_INFORMATION), - "::", - stringify!(PhysicalContainerId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogicalContainerId) as usize - ptr as usize - }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_CLS_CONTAINER_INFORMATION), - "::", - stringify!(LogicalContainerId), - ), - ); -} -impl Default for _CLS_CONTAINER_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLS_CONTAINER_INFORMATION = _CLS_CONTAINER_INFORMATION; -pub type PCLS_CONTAINER_INFORMATION = *mut _CLS_CONTAINER_INFORMATION; -pub type PPCLS_CONTAINER_INFORMATION = *mut *mut _CLS_CONTAINER_INFORMATION; -pub type CLFS_CONTAINER_INFORMATION = CLS_CONTAINER_INFORMATION; -pub type PCLFS_CONTAINER_INFORMATION = *mut CLFS_CONTAINER_INFORMATION; -pub type PPCLFS_CONTAINER_INFORMATION = *mut *mut CLFS_CONTAINER_INFORMATION; -pub mod _CLS_LOG_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const ClfsLogBasicInformation: Type = 0; - pub const ClfsLogBasicInformationPhysical: Type = 1; - pub const ClfsLogPhysicalNameInformation: Type = 2; - pub const ClfsLogStreamIdentifierInformation: Type = 3; - pub const ClfsLogSystemMarkingInformation: Type = 4; - pub const ClfsLogPhysicalLsnInformation: Type = 5; -} -pub use self::_CLS_LOG_INFORMATION_CLASS::Type as CLS_LOG_INFORMATION_CLASS; -pub type PCLS_LOG_INFORMATION_CLASS = *mut _CLS_LOG_INFORMATION_CLASS::Type; -pub type PPCLS_LOG_INFORMATION_CLASS = *mut *mut _CLS_LOG_INFORMATION_CLASS::Type; -pub use self::CLS_LOG_INFORMATION_CLASS as CLFS_LOG_INFORMATION_CLASS; -pub type PCLFS_LOG_INFORMATION_CLASS = *mut CLFS_LOG_INFORMATION_CLASS; -pub type PPCLFS_LOG_INFORMATION_CLASS = *mut *mut CLFS_LOG_INFORMATION_CLASS; -pub mod _CLS_IOSTATS_CLASS { - pub type Type = ::core::ffi::c_int; - pub const ClsIoStatsDefault: Type = 0; - pub const ClsIoStatsMax: Type = 65535; -} -pub use self::_CLS_IOSTATS_CLASS::Type as CLS_IOSTATS_CLASS; -pub type PCLS_IOSTATS_CLASS = *mut _CLS_IOSTATS_CLASS::Type; -pub type PPCLS_IOSTATS_CLASS = *mut *mut _CLS_IOSTATS_CLASS::Type; -pub mod _CLFS_IOSTATS_CLASS { - pub type Type = ::core::ffi::c_int; - pub const ClfsIoStatsDefault: Type = 0; - pub const ClfsIoStatsMax: Type = 65535; -} -pub use self::_CLFS_IOSTATS_CLASS::Type as CLFS_IOSTATS_CLASS; -pub type PCLFS_IOSTATS_CLASS = *mut _CLFS_IOSTATS_CLASS::Type; -pub type PPCLFS_IOSTATS_CLASS = *mut *mut _CLFS_IOSTATS_CLASS::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CLS_IO_STATISTICS_HEADER { - pub ubMajorVersion: UCHAR, - pub ubMinorVersion: UCHAR, - pub eStatsClass: CLFS_IOSTATS_CLASS, - pub cbLength: USHORT, - pub coffData: ULONG, -} -#[test] -fn bindgen_test_layout__CLS_IO_STATISTICS_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_CLS_IO_STATISTICS_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLS_IO_STATISTICS_HEADER>(), - 16usize, - concat!("Size of: ", stringify!(_CLS_IO_STATISTICS_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_CLS_IO_STATISTICS_HEADER>(), - 4usize, - concat!("Alignment of ", stringify!(_CLS_IO_STATISTICS_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ubMajorVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLS_IO_STATISTICS_HEADER), - "::", - stringify!(ubMajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ubMinorVersion) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_CLS_IO_STATISTICS_HEADER), - "::", - stringify!(ubMinorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).eStatsClass) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CLS_IO_STATISTICS_HEADER), - "::", - stringify!(eStatsClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLS_IO_STATISTICS_HEADER), - "::", - stringify!(cbLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).coffData) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CLS_IO_STATISTICS_HEADER), - "::", - stringify!(coffData), - ), - ); -} -impl Default for _CLS_IO_STATISTICS_HEADER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLS_IO_STATISTICS_HEADER = _CLS_IO_STATISTICS_HEADER; -pub type PCLS_IO_STATISTICS_HEADER = *mut _CLS_IO_STATISTICS_HEADER; -pub type PPCLS_IO_STATISTICS_HEADER = *mut *mut _CLS_IO_STATISTICS_HEADER; -pub type CLFS_IO_STATISTICS_HEADER = CLS_IO_STATISTICS_HEADER; -pub type PCLFS_IO_STATISTICS_HEADER = *mut CLFS_IO_STATISTICS_HEADER; -pub type PPCLFS_IO_STATISTICS_HEADER = *mut *mut CLFS_IO_STATISTICS_HEADER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CLS_IO_STATISTICS { - pub hdrIoStats: CLS_IO_STATISTICS_HEADER, - pub cFlush: ULONGLONG, - pub cbFlush: ULONGLONG, - pub cMetaFlush: ULONGLONG, - pub cbMetaFlush: ULONGLONG, -} -#[test] -fn bindgen_test_layout__CLS_IO_STATISTICS() { - const UNINIT: ::core::mem::MaybeUninit<_CLS_IO_STATISTICS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLS_IO_STATISTICS>(), - 48usize, - concat!("Size of: ", stringify!(_CLS_IO_STATISTICS)), - ); - assert_eq!( - ::core::mem::align_of::<_CLS_IO_STATISTICS>(), - 8usize, - concat!("Alignment of ", stringify!(_CLS_IO_STATISTICS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).hdrIoStats) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLS_IO_STATISTICS), - "::", - stringify!(hdrIoStats), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cFlush) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CLS_IO_STATISTICS), - "::", - stringify!(cFlush), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbFlush) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CLS_IO_STATISTICS), - "::", - stringify!(cbFlush), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cMetaFlush) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_CLS_IO_STATISTICS), - "::", - stringify!(cMetaFlush), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbMetaFlush) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_CLS_IO_STATISTICS), - "::", - stringify!(cbMetaFlush), - ), - ); -} -impl Default for _CLS_IO_STATISTICS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLS_IO_STATISTICS = _CLS_IO_STATISTICS; -pub type PCLS_IO_STATISTICS = *mut _CLS_IO_STATISTICS; -pub type PPCLS_IO_STATISTICS = *mut *mut _CLS_IO_STATISTICS; -pub type CLFS_IO_STATISTICS = CLS_IO_STATISTICS; -pub type PCLFS_IO_STATISTICS = *mut CLFS_IO_STATISTICS; -pub type PPCLFS_IO_STATISTICS = *mut *mut CLFS_IO_STATISTICS; -pub type CLFS_SCAN_MODE = UCHAR; -pub type PCLFS_SCAN_MODE = *mut UCHAR; -pub type LOG_FILE_OBJECT = FILE_OBJECT; -pub type PLOG_FILE_OBJECT = *mut FILE_OBJECT; -pub type PPLOG_FILE_OBJECT = *mut *mut FILE_OBJECT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CLS_SCAN_CONTEXT { - pub cidNode: CLFS_NODE_ID, - pub plfoLog: PLOG_FILE_OBJECT, - pub cIndex: ULONG, - pub __bindgen_padding_0: u32, - pub cContainers: ULONG, - pub __bindgen_padding_1: u32, - pub cContainersReturned: ULONG, - pub __bindgen_padding_2: [u8; 4usize], - pub eScanMode: CLFS_SCAN_MODE, - pub pinfoContainer: PCLS_CONTAINER_INFORMATION, -} -#[test] -fn bindgen_test_layout__CLS_SCAN_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_CLS_SCAN_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLS_SCAN_CONTEXT>(), - 56usize, - concat!("Size of: ", stringify!(_CLS_SCAN_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_CLS_SCAN_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_CLS_SCAN_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cidNode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLS_SCAN_CONTEXT), - "::", - stringify!(cidNode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).plfoLog) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLS_SCAN_CONTEXT), - "::", - stringify!(plfoLog), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cIndex) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CLS_SCAN_CONTEXT), - "::", - stringify!(cIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cContainers) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CLS_SCAN_CONTEXT), - "::", - stringify!(cContainers), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).cContainersReturned) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_CLS_SCAN_CONTEXT), - "::", - stringify!(cContainersReturned), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).eScanMode) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_CLS_SCAN_CONTEXT), - "::", - stringify!(eScanMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pinfoContainer) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_CLS_SCAN_CONTEXT), - "::", - stringify!(pinfoContainer), - ), - ); -} -impl Default for _CLS_SCAN_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLS_SCAN_CONTEXT = _CLS_SCAN_CONTEXT; -pub type PCLS_SCAN_CONTEXT = *mut _CLS_SCAN_CONTEXT; -pub type PPCLS_SCAN_CONTEXT = *mut *mut _CLS_SCAN_CONTEXT; -pub type CLFS_SCAN_CONTEXT = CLS_SCAN_CONTEXT; -pub type PCLFS_SCAN_CONTEXT = *mut CLFS_SCAN_CONTEXT; -pub type PPCLFS_SCAN_CONTEXT = *mut *mut CLFS_SCAN_CONTEXT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CLS_ARCHIVE_DESCRIPTOR { - pub coffLow: ULONGLONG, - pub coffHigh: ULONGLONG, - pub infoContainer: CLS_CONTAINER_INFORMATION, -} -#[test] -fn bindgen_test_layout__CLS_ARCHIVE_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_CLS_ARCHIVE_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLS_ARCHIVE_DESCRIPTOR>(), - 592usize, - concat!("Size of: ", stringify!(_CLS_ARCHIVE_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_CLS_ARCHIVE_DESCRIPTOR>(), - 8usize, - concat!("Alignment of ", stringify!(_CLS_ARCHIVE_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).coffLow) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLS_ARCHIVE_DESCRIPTOR), - "::", - stringify!(coffLow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).coffHigh) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLS_ARCHIVE_DESCRIPTOR), - "::", - stringify!(coffHigh), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).infoContainer) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CLS_ARCHIVE_DESCRIPTOR), - "::", - stringify!(infoContainer), - ), - ); -} -impl Default for _CLS_ARCHIVE_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLS_ARCHIVE_DESCRIPTOR = _CLS_ARCHIVE_DESCRIPTOR; -pub type PCLS_ARCHIVE_DESCRIPTOR = *mut _CLS_ARCHIVE_DESCRIPTOR; -pub type PPCLS_ARCHIVE_DESCRIPTOR = *mut *mut _CLS_ARCHIVE_DESCRIPTOR; -pub type CLFS_ARCHIVE_DESCRIPTOR = CLS_ARCHIVE_DESCRIPTOR; -pub type PCLFS_ARCHIVE_DESCRIPTOR = *mut CLFS_ARCHIVE_DESCRIPTOR; -pub type PPCLFS_ARCHIVE_DESCRIPTOR = *mut *mut CLFS_ARCHIVE_DESCRIPTOR; -pub type CLFS_BLOCK_ALLOCATION = ::core::option::Option< - unsafe extern "C" fn(cbBufferLength: ULONG, pvUserContext: PVOID) -> PVOID, ->; -pub type CLFS_BLOCK_DEALLOCATION = ::core::option::Option< - unsafe extern "C" fn(pvBuffer: PVOID, pvUserContext: PVOID), ->; -pub mod _CLFS_LOG_ARCHIVE_MODE { - pub type Type = ::core::ffi::c_int; - pub const ClfsLogArchiveEnabled: Type = 1; - pub const ClfsLogArchiveDisabled: Type = 2; -} -pub use self::_CLFS_LOG_ARCHIVE_MODE::Type as CLFS_LOG_ARCHIVE_MODE; -pub type PCLFS_LOG_ARCHIVE_MODE = *mut _CLFS_LOG_ARCHIVE_MODE::Type; -pub mod _CLFS_MGMT_POLICY_TYPE { - pub type Type = ::core::ffi::c_int; - pub const ClfsMgmtPolicyMaximumSize: Type = 0; - pub const ClfsMgmtPolicyMinimumSize: Type = 1; - pub const ClfsMgmtPolicyNewContainerSize: Type = 2; - pub const ClfsMgmtPolicyGrowthRate: Type = 3; - pub const ClfsMgmtPolicyLogTail: Type = 4; - pub const ClfsMgmtPolicyAutoShrink: Type = 5; - pub const ClfsMgmtPolicyAutoGrow: Type = 6; - pub const ClfsMgmtPolicyNewContainerPrefix: Type = 7; - pub const ClfsMgmtPolicyNewContainerSuffix: Type = 8; - pub const ClfsMgmtPolicyNewContainerExtension: Type = 9; - pub const ClfsMgmtPolicyInvalid: Type = 10; -} -pub use self::_CLFS_MGMT_POLICY_TYPE::Type as CLFS_MGMT_POLICY_TYPE; -pub type PCLFS_MGMT_POLICY_TYPE = *mut _CLFS_MGMT_POLICY_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CLFS_MGMT_POLICY { - pub Version: ULONG, - pub LengthInBytes: ULONG, - pub PolicyFlags: ULONG, - pub PolicyType: CLFS_MGMT_POLICY_TYPE, - pub PolicyParameters: _CLFS_MGMT_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _CLFS_MGMT_POLICY__bindgen_ty_1 { - pub MaximumSize: _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_1, - pub MinimumSize: _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_2, - pub NewContainerSize: _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_3, - pub GrowthRate: _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_4, - pub LogTail: _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_5, - pub AutoShrink: _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_6, - pub AutoGrow: _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_7, - pub NewContainerPrefix: _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_8, - pub NewContainerSuffix: _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_9, - pub NewContainerExtension: _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_10, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub Containers: ULONG, -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Containers) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Containers), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_2 { - pub Containers: ULONG, -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_2>(), - 4usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_2>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Containers) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Containers), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_3 { - pub SizeInBytes: ULONG, -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_3>(), - 4usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_3>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SizeInBytes) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(SizeInBytes), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_4 { - pub AbsoluteGrowthInContainers: ULONG, - pub RelativeGrowthPercentage: ULONG, -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit< - _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_4, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_4>(), - 8usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_4)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_4>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_4), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AbsoluteGrowthInContainers) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(AbsoluteGrowthInContainers), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RelativeGrowthPercentage) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(RelativeGrowthPercentage), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_5 { - pub MinimumAvailablePercentage: ULONG, - pub MinimumAvailableContainers: ULONG, -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit< - _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_5, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_5>(), - 8usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_5)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_5>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_5), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MinimumAvailablePercentage) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(MinimumAvailablePercentage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MinimumAvailableContainers) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(MinimumAvailableContainers), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_6 { - pub Percentage: ULONG, -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_6() { - const UNINIT: ::core::mem::MaybeUninit< - _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_6, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_6>(), - 4usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_6)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_6>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Percentage) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(Percentage), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_7 { - pub Enabled: ULONG, -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_7() { - const UNINIT: ::core::mem::MaybeUninit< - _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_7, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_7>(), - 4usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_7)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_7>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_7), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(Enabled), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_8 { - pub PrefixLengthInBytes: USHORT, - pub PrefixString: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_8() { - const UNINIT: ::core::mem::MaybeUninit< - _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_8, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_8>(), - 4usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_8)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_8>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_8), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PrefixLengthInBytes) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(PrefixLengthInBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrefixString) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(PrefixString), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_9 { - pub NextContainerSuffix: ULONGLONG, -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_9() { - const UNINIT: ::core::mem::MaybeUninit< - _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_9, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_9>(), - 8usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_9)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_9>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_9), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NextContainerSuffix) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_9), - "::", - stringify!(NextContainerSuffix), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_10 { - pub ExtensionLengthInBytes: USHORT, - pub ExtensionString: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_10() { - const UNINIT: ::core::mem::MaybeUninit< - _CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_10, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_10>(), - 4usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_10)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_10>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_10), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExtensionLengthInBytes) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_10), - "::", - stringify!(ExtensionLengthInBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtensionString) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1__bindgen_ty_10), - "::", - stringify!(ExtensionString), - ), - ); -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_CLFS_MGMT_POLICY__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_POLICY__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_POLICY__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1), - "::", - stringify!(MaximumSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinimumSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1), - "::", - stringify!(MinimumSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NewContainerSize) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1), - "::", - stringify!(NewContainerSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GrowthRate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1), - "::", - stringify!(GrowthRate), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogTail) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1), - "::", - stringify!(LogTail), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AutoShrink) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1), - "::", - stringify!(AutoShrink), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AutoGrow) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1), - "::", - stringify!(AutoGrow), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NewContainerPrefix) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1), - "::", - stringify!(NewContainerPrefix), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NewContainerSuffix) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1), - "::", - stringify!(NewContainerSuffix), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NewContainerExtension) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY__bindgen_ty_1), - "::", - stringify!(NewContainerExtension), - ), - ); -} -impl Default for _CLFS_MGMT_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_POLICY() { - const UNINIT: ::core::mem::MaybeUninit<_CLFS_MGMT_POLICY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_POLICY>(), - 24usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_POLICY>(), - 8usize, - concat!("Alignment of ", stringify!(_CLFS_MGMT_POLICY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LengthInBytes) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY), - "::", - stringify!(LengthInBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PolicyFlags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY), - "::", - stringify!(PolicyFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PolicyType) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY), - "::", - stringify!(PolicyType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PolicyParameters) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_POLICY), - "::", - stringify!(PolicyParameters), - ), - ); -} -impl Default for _CLFS_MGMT_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLFS_MGMT_POLICY = _CLFS_MGMT_POLICY; -pub type PCLFS_MGMT_POLICY = *mut _CLFS_MGMT_POLICY; -pub mod _CLFS_MGMT_NOTIFICATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const ClfsMgmtAdvanceTailNotification: Type = 0; - pub const ClfsMgmtLogFullHandlerNotification: Type = 1; - pub const ClfsMgmtLogUnpinnedNotification: Type = 2; - pub const ClfsMgmtLogWriteNotification: Type = 3; -} -pub use self::_CLFS_MGMT_NOTIFICATION_TYPE::Type as CLFS_MGMT_NOTIFICATION_TYPE; -pub type PCLFS_MGMT_NOTIFICATION_TYPE = *mut _CLFS_MGMT_NOTIFICATION_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CLFS_MGMT_NOTIFICATION { - pub Notification: CLFS_MGMT_NOTIFICATION_TYPE, - pub Lsn: CLFS_LSN, - pub LogIsPinned: USHORT, -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_NOTIFICATION() { - const UNINIT: ::core::mem::MaybeUninit<_CLFS_MGMT_NOTIFICATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_NOTIFICATION>(), - 24usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_NOTIFICATION)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_NOTIFICATION>(), - 8usize, - concat!("Alignment of ", stringify!(_CLFS_MGMT_NOTIFICATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Notification) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_NOTIFICATION), - "::", - stringify!(Notification), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lsn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_NOTIFICATION), - "::", - stringify!(Lsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogIsPinned) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_NOTIFICATION), - "::", - stringify!(LogIsPinned), - ), - ); -} -impl Default for _CLFS_MGMT_NOTIFICATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLFS_MGMT_NOTIFICATION = _CLFS_MGMT_NOTIFICATION; -pub type PCLFS_MGMT_NOTIFICATION = *mut _CLFS_MGMT_NOTIFICATION; -pub type PCLFS_CLIENT_ADVANCE_TAIL_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - LogFile: PLOG_FILE_OBJECT, - TargetLsn: PCLFS_LSN, - ClientData: PVOID, - ) -> NTSTATUS, ->; -pub type PCLFS_CLIENT_LFF_HANDLER_COMPLETE_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - LogFile: PLOG_FILE_OBJECT, - OperationStatus: NTSTATUS, - LogIsPinned: BOOLEAN, - ClientData: PVOID, - ), ->; -pub type PCLFS_CLIENT_LOG_UNPINNED_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(LogFile: PLOG_FILE_OBJECT, ClientData: PVOID), ->; -pub type PCLFS_SET_LOG_SIZE_COMPLETE_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - LogFile: PLOG_FILE_OBJECT, - OperationStatus: NTSTATUS, - ClientData: PVOID, - ), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CLFS_MGMT_CLIENT_REGISTRATION { - pub Version: ULONG, - pub AdvanceTailCallback: PCLFS_CLIENT_ADVANCE_TAIL_CALLBACK, - pub AdvanceTailCallbackData: PVOID, - pub LogGrowthCompleteCallback: PCLFS_CLIENT_LFF_HANDLER_COMPLETE_CALLBACK, - pub LogGrowthCompleteCallbackData: PVOID, - pub LogUnpinnedCallback: PCLFS_CLIENT_LOG_UNPINNED_CALLBACK, - pub LogUnpinnedCallbackData: PVOID, -} -#[test] -fn bindgen_test_layout__CLFS_MGMT_CLIENT_REGISTRATION() { - const UNINIT: ::core::mem::MaybeUninit<_CLFS_MGMT_CLIENT_REGISTRATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLFS_MGMT_CLIENT_REGISTRATION>(), - 56usize, - concat!("Size of: ", stringify!(_CLFS_MGMT_CLIENT_REGISTRATION)), - ); - assert_eq!( - ::core::mem::align_of::<_CLFS_MGMT_CLIENT_REGISTRATION>(), - 8usize, - concat!("Alignment of ", stringify!(_CLFS_MGMT_CLIENT_REGISTRATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_CLIENT_REGISTRATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AdvanceTailCallback) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_CLIENT_REGISTRATION), - "::", - stringify!(AdvanceTailCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AdvanceTailCallbackData) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_CLIENT_REGISTRATION), - "::", - stringify!(AdvanceTailCallbackData), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogGrowthCompleteCallback) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_CLIENT_REGISTRATION), - "::", - stringify!(LogGrowthCompleteCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogGrowthCompleteCallbackData) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_CLIENT_REGISTRATION), - "::", - stringify!(LogGrowthCompleteCallbackData), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogUnpinnedCallback) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_CLIENT_REGISTRATION), - "::", - stringify!(LogUnpinnedCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogUnpinnedCallbackData) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_CLFS_MGMT_CLIENT_REGISTRATION), - "::", - stringify!(LogUnpinnedCallbackData), - ), - ); -} -impl Default for _CLFS_MGMT_CLIENT_REGISTRATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLFS_MGMT_CLIENT_REGISTRATION = _CLFS_MGMT_CLIENT_REGISTRATION; -pub type PCLFS_MGMT_CLIENT_REGISTRATION = *mut _CLFS_MGMT_CLIENT_REGISTRATION; -pub type CLFS_MGMT_CLIENT = PVOID; -pub type PCLFS_MGMT_CLIENT = *mut PVOID; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KTRANSACTION { - _unused: [u8; 0], -} -pub type KTRANSACTION = _KTRANSACTION; -pub type PKTRANSACTION = *mut _KTRANSACTION; -pub type PRKTRANSACTION = *mut _KTRANSACTION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KENLISTMENT { - _unused: [u8; 0], -} -pub type KENLISTMENT = _KENLISTMENT; -pub type PKENLISTMENT = *mut _KENLISTMENT; -pub type PRKENLISTMENT = *mut _KENLISTMENT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KRESOURCEMANAGER { - _unused: [u8; 0], -} -pub type KRESOURCEMANAGER = _KRESOURCEMANAGER; -pub type PKRESOURCEMANAGER = *mut _KRESOURCEMANAGER; -pub type PRKRESOURCEMANAGER = *mut _KRESOURCEMANAGER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KTM { - _unused: [u8; 0], -} -pub type KTM = _KTM; -pub type PKTM = *mut _KTM; -pub type PRKTM = *mut _KTM; -pub type PGUID = *mut GUID; -pub type PTM_RM_NOTIFICATION = ::core::option::Option< - unsafe extern "C" fn( - EnlistmentObject: PKENLISTMENT, - RMContext: PVOID, - TransactionContext: PVOID, - TransactionNotification: ULONG, - TmVirtualClock: PLARGE_INTEGER, - ArgumentLength: ULONG, - Argument: PVOID, - ) -> NTSTATUS, ->; -pub type KCRM_PROTOCOL_ID = GUID; -pub type PKCRM_PROTOCOL_ID = *mut GUID; -pub type PTM_PROPAGATE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - PropagationCookie: PVOID, - CallbackData: PVOID, - PropagationStatus: NTSTATUS, - TransactionGuid: GUID, - ) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCW_INSTANCE { - _unused: [u8; 0], -} -pub type PPCW_INSTANCE = *mut _PCW_INSTANCE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCW_REGISTRATION { - _unused: [u8; 0], -} -pub type PPCW_REGISTRATION = *mut _PCW_REGISTRATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCW_BUFFER { - _unused: [u8; 0], -} -pub type PPCW_BUFFER = *mut _PCW_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCW_COUNTER_DESCRIPTOR { - pub Id: USHORT, - pub StructIndex: USHORT, - pub Offset: USHORT, - pub Size: USHORT, -} -#[test] -fn bindgen_test_layout__PCW_COUNTER_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_PCW_COUNTER_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCW_COUNTER_DESCRIPTOR>(), - 8usize, - concat!("Size of: ", stringify!(_PCW_COUNTER_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_PCW_COUNTER_DESCRIPTOR>(), - 2usize, - concat!("Alignment of ", stringify!(_PCW_COUNTER_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCW_COUNTER_DESCRIPTOR), - "::", - stringify!(Id), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StructIndex) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCW_COUNTER_DESCRIPTOR), - "::", - stringify!(StructIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCW_COUNTER_DESCRIPTOR), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_PCW_COUNTER_DESCRIPTOR), - "::", - stringify!(Size), - ), - ); -} -pub type PCW_COUNTER_DESCRIPTOR = _PCW_COUNTER_DESCRIPTOR; -pub type PPCW_COUNTER_DESCRIPTOR = *mut _PCW_COUNTER_DESCRIPTOR; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCW_DATA { - pub Data: *const ::core::ffi::c_void, - pub Size: ULONG, -} -#[test] -fn bindgen_test_layout__PCW_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_PCW_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCW_DATA>(), - 16usize, - concat!("Size of: ", stringify!(_PCW_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_PCW_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_PCW_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_PCW_DATA), "::", stringify!(Data)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_PCW_DATA), "::", stringify!(Size)), - ); -} -impl Default for _PCW_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCW_DATA = _PCW_DATA; -pub type PPCW_DATA = *mut _PCW_DATA; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCW_COUNTER_INFORMATION { - pub CounterMask: ULONG64, - pub InstanceMask: PCUNICODE_STRING, -} -#[test] -fn bindgen_test_layout__PCW_COUNTER_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PCW_COUNTER_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCW_COUNTER_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_PCW_COUNTER_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PCW_COUNTER_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_PCW_COUNTER_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CounterMask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCW_COUNTER_INFORMATION), - "::", - stringify!(CounterMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InstanceMask) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCW_COUNTER_INFORMATION), - "::", - stringify!(InstanceMask), - ), - ); -} -impl Default for _PCW_COUNTER_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCW_COUNTER_INFORMATION = _PCW_COUNTER_INFORMATION; -pub type PPCW_COUNTER_INFORMATION = *mut _PCW_COUNTER_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCW_MASK_INFORMATION { - pub CounterMask: ULONG64, - pub InstanceMask: PCUNICODE_STRING, - pub InstanceId: ULONG, - pub CollectMultiple: BOOLEAN, - pub Buffer: PPCW_BUFFER, - pub CancelEvent: PKEVENT, -} -#[test] -fn bindgen_test_layout__PCW_MASK_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PCW_MASK_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCW_MASK_INFORMATION>(), - 40usize, - concat!("Size of: ", stringify!(_PCW_MASK_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PCW_MASK_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_PCW_MASK_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CounterMask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCW_MASK_INFORMATION), - "::", - stringify!(CounterMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InstanceMask) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCW_MASK_INFORMATION), - "::", - stringify!(InstanceMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InstanceId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCW_MASK_INFORMATION), - "::", - stringify!(InstanceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CollectMultiple) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PCW_MASK_INFORMATION), - "::", - stringify!(CollectMultiple), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCW_MASK_INFORMATION), - "::", - stringify!(Buffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CancelEvent) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCW_MASK_INFORMATION), - "::", - stringify!(CancelEvent), - ), - ); -} -impl Default for _PCW_MASK_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCW_MASK_INFORMATION = _PCW_MASK_INFORMATION; -pub type PPCW_MASK_INFORMATION = *mut _PCW_MASK_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCW_CALLBACK_INFORMATION { - pub AddCounter: PCW_COUNTER_INFORMATION, - pub RemoveCounter: PCW_COUNTER_INFORMATION, - pub EnumerateInstances: PCW_MASK_INFORMATION, - pub CollectData: PCW_MASK_INFORMATION, -} -#[test] -fn bindgen_test_layout__PCW_CALLBACK_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PCW_CALLBACK_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCW_CALLBACK_INFORMATION>(), - 40usize, - concat!("Size of: ", stringify!(_PCW_CALLBACK_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PCW_CALLBACK_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_PCW_CALLBACK_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AddCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCW_CALLBACK_INFORMATION), - "::", - stringify!(AddCounter), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RemoveCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCW_CALLBACK_INFORMATION), - "::", - stringify!(RemoveCounter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EnumerateInstances) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCW_CALLBACK_INFORMATION), - "::", - stringify!(EnumerateInstances), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CollectData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCW_CALLBACK_INFORMATION), - "::", - stringify!(CollectData), - ), - ); -} -impl Default for _PCW_CALLBACK_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCW_CALLBACK_INFORMATION = _PCW_CALLBACK_INFORMATION; -pub type PPCW_CALLBACK_INFORMATION = *mut _PCW_CALLBACK_INFORMATION; -pub mod _PCW_CALLBACK_TYPE { - pub type Type = ::core::ffi::c_int; - pub const PcwCallbackAddCounter: Type = 0; - pub const PcwCallbackRemoveCounter: Type = 1; - pub const PcwCallbackEnumerateInstances: Type = 2; - pub const PcwCallbackCollectData: Type = 3; -} -pub use self::_PCW_CALLBACK_TYPE::Type as PCW_CALLBACK_TYPE; -pub type PPCW_CALLBACK_TYPE = *mut _PCW_CALLBACK_TYPE::Type; -pub type PPCW_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCW_CALLBACK_TYPE, - arg2: PPCW_CALLBACK_INFORMATION, - arg3: PVOID, - ) -> NTSTATUS, ->; -pub mod PCW_REGISTRATION_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const PcwRegistrationNone: Type = 0; - pub const PcwRegistrationSiloNeutral: Type = 1; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCW_REGISTRATION_INFORMATION { - pub Version: ULONG, - pub Name: PCUNICODE_STRING, - pub CounterCount: ULONG, - pub Counters: PPCW_COUNTER_DESCRIPTOR, - pub Callback: PPCW_CALLBACK, - pub CallbackContext: PVOID, - pub Flags: PCW_REGISTRATION_FLAGS::Type, -} -#[test] -fn bindgen_test_layout__PCW_REGISTRATION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PCW_REGISTRATION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCW_REGISTRATION_INFORMATION>(), - 56usize, - concat!("Size of: ", stringify!(_PCW_REGISTRATION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PCW_REGISTRATION_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_PCW_REGISTRATION_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCW_REGISTRATION_INFORMATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCW_REGISTRATION_INFORMATION), - "::", - stringify!(Name), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CounterCount) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCW_REGISTRATION_INFORMATION), - "::", - stringify!(CounterCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Counters) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCW_REGISTRATION_INFORMATION), - "::", - stringify!(Counters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Callback) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCW_REGISTRATION_INFORMATION), - "::", - stringify!(Callback), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallbackContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCW_REGISTRATION_INFORMATION), - "::", - stringify!(CallbackContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PCW_REGISTRATION_INFORMATION), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PCW_REGISTRATION_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCW_REGISTRATION_INFORMATION = _PCW_REGISTRATION_INFORMATION; -pub type PPCW_REGISTRATION_INFORMATION = *mut _PCW_REGISTRATION_INFORMATION; -pub mod _DRIVER_RUNTIME_INIT_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const DrvRtPoolNxOptIn: Type = 1; - pub const LastDrvRtFlag: Type = 2; -} -pub use self::_DRIVER_RUNTIME_INIT_FLAGS::Type as DRIVER_RUNTIME_INIT_FLAGS; -pub type PDRIVER_RUNTIME_INIT_FLAGS = *mut _DRIVER_RUNTIME_INIT_FLAGS::Type; -pub type PCDRIVER_RUNTIME_INIT_FLAGS = *const _DRIVER_RUNTIME_INIT_FLAGS::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _BUS_HANDLER { - _unused: [u8; 0], -} -pub type PBUS_HANDLER = *mut _BUS_HANDLER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DEVICE_HANDLER_OBJECT { - _unused: [u8; 0], -} -pub type PDEVICE_HANDLER_OBJECT = *mut _DEVICE_HANDLER_OBJECT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _EJOB { - _unused: [u8; 0], -} -pub type PEJOB = *mut _EJOB; -pub type PESILO = *mut _EJOB; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SILO_MONITOR { - _unused: [u8; 0], -} -pub type PSILO_MONITOR = *mut _SILO_MONITOR; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PEB { - _unused: [u8; 0], -} -pub type PPEB = *mut _PEB; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IMAGE_NT_HEADERS { - _unused: [u8; 0], -} -pub type PIMAGE_NT_HEADERS32 = *mut _IMAGE_NT_HEADERS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IMAGE_NT_HEADERS64 { - _unused: [u8; 0], -} -pub type PIMAGE_NT_HEADERS64 = *mut _IMAGE_NT_HEADERS64; -pub type PIMAGE_NT_HEADERS = PIMAGE_NT_HEADERS64; -#[repr(C)] -#[repr(align(16))] -#[derive(Copy, Clone)] -pub struct _CONTEXT { - pub P1Home: ULONG64, - pub P2Home: ULONG64, - pub P3Home: ULONG64, - pub P4Home: ULONG64, - pub P5Home: ULONG64, - pub P6Home: ULONG64, - pub ContextFlags: ULONG, - pub MxCsr: ULONG, - pub SegCs: USHORT, - pub SegDs: USHORT, - pub SegEs: USHORT, - pub SegFs: USHORT, - pub SegGs: USHORT, - pub SegSs: USHORT, - pub EFlags: ULONG, - pub Dr0: ULONG64, - pub Dr1: ULONG64, - pub Dr2: ULONG64, - pub Dr3: ULONG64, - pub Dr6: ULONG64, - pub Dr7: ULONG64, - pub Rax: ULONG64, - pub Rcx: ULONG64, - pub Rdx: ULONG64, - pub Rbx: ULONG64, - pub Rsp: ULONG64, - pub Rbp: ULONG64, - pub Rsi: ULONG64, - pub Rdi: ULONG64, - pub R8: ULONG64, - pub R9: ULONG64, - pub R10: ULONG64, - pub R11: ULONG64, - pub R12: ULONG64, - pub R13: ULONG64, - pub R14: ULONG64, - pub R15: ULONG64, - pub Rip: ULONG64, - pub __bindgen_anon_1: _CONTEXT__bindgen_ty_1, - pub VectorRegister: [M128A; 26usize], - pub VectorControl: ULONG64, - pub DebugControl: ULONG64, - pub LastBranchToRip: ULONG64, - pub LastBranchFromRip: ULONG64, - pub LastExceptionToRip: ULONG64, - pub LastExceptionFromRip: ULONG64, -} -#[repr(C)] -#[repr(align(16))] -#[derive(Copy, Clone)] -pub union _CONTEXT__bindgen_ty_1 { - pub FltSave: XMM_SAVE_AREA32, - pub __bindgen_anon_1: _CONTEXT__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[repr(align(16))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CONTEXT__bindgen_ty_1__bindgen_ty_1 { - pub Header: [M128A; 2usize], - pub Legacy: [M128A; 8usize], - pub Xmm0: M128A, - pub Xmm1: M128A, - pub Xmm2: M128A, - pub Xmm3: M128A, - pub Xmm4: M128A, - pub Xmm5: M128A, - pub Xmm6: M128A, - pub Xmm7: M128A, - pub Xmm8: M128A, - pub Xmm9: M128A, - pub Xmm10: M128A, - pub Xmm11: M128A, - pub Xmm12: M128A, - pub Xmm13: M128A, - pub Xmm14: M128A, - pub Xmm15: M128A, -} -#[test] -fn bindgen_test_layout__CONTEXT__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_CONTEXT__bindgen_ty_1__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 416usize, - concat!("Size of: ", stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 16usize, - concat!("Alignment of ", stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Legacy) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Legacy), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm0) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm1) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm2) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm3) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm4) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm5) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm5), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm6) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm7) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm7), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm8) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm8), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm9) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm9), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm10) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm10), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm11) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm11), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm12) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm12), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm13) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm13), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm14) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm14), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm15) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Xmm15), - ), - ); -} -#[test] -fn bindgen_test_layout__CONTEXT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_CONTEXT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CONTEXT__bindgen_ty_1>(), - 512usize, - concat!("Size of: ", stringify!(_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_CONTEXT__bindgen_ty_1>(), - 16usize, - concat!("Alignment of ", stringify!(_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FltSave) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT__bindgen_ty_1), - "::", - stringify!(FltSave), - ), - ); -} -impl Default for _CONTEXT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CONTEXT>(), - 1232usize, - concat!("Size of: ", stringify!(_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_CONTEXT>(), - 16usize, - concat!("Alignment of ", stringify!(_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P1Home) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(P1Home)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P2Home) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(P2Home)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P3Home) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(P3Home)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P4Home) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(P4Home)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P5Home) as usize - ptr as usize }, - 32usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(P5Home)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P6Home) as usize - ptr as usize }, - 40usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(P6Home)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContextFlags) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT), - "::", - stringify!(ContextFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MxCsr) as usize - ptr as usize }, - 52usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(MxCsr)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegCs) as usize - ptr as usize }, - 56usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(SegCs)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegDs) as usize - ptr as usize }, - 58usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(SegDs)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegEs) as usize - ptr as usize }, - 60usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(SegEs)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegFs) as usize - ptr as usize }, - 62usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(SegFs)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegGs) as usize - ptr as usize }, - 64usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(SegGs)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegSs) as usize - ptr as usize }, - 66usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(SegSs)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EFlags) as usize - ptr as usize }, - 68usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(EFlags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dr0) as usize - ptr as usize }, - 72usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Dr0)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dr1) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Dr1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dr2) as usize - ptr as usize }, - 88usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Dr2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dr3) as usize - ptr as usize }, - 96usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Dr3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dr6) as usize - ptr as usize }, - 104usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Dr6)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dr7) as usize - ptr as usize }, - 112usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Dr7)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rax) as usize - ptr as usize }, - 120usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Rax)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rcx) as usize - ptr as usize }, - 128usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Rcx)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rdx) as usize - ptr as usize }, - 136usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Rdx)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rbx) as usize - ptr as usize }, - 144usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Rbx)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rsp) as usize - ptr as usize }, - 152usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Rsp)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rbp) as usize - ptr as usize }, - 160usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Rbp)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rsi) as usize - ptr as usize }, - 168usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Rsi)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rdi) as usize - ptr as usize }, - 176usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Rdi)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R8) as usize - ptr as usize }, - 184usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(R8)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R9) as usize - ptr as usize }, - 192usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(R9)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R10) as usize - ptr as usize }, - 200usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(R10)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R11) as usize - ptr as usize }, - 208usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(R11)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R12) as usize - ptr as usize }, - 216usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(R12)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R13) as usize - ptr as usize }, - 224usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(R13)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R14) as usize - ptr as usize }, - 232usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(R14)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R15) as usize - ptr as usize }, - 240usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(R15)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rip) as usize - ptr as usize }, - 248usize, - concat!("Offset of field: ", stringify!(_CONTEXT), "::", stringify!(Rip)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VectorRegister) as usize - ptr as usize }, - 768usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT), - "::", - stringify!(VectorRegister), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VectorControl) as usize - ptr as usize }, - 1184usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT), - "::", - stringify!(VectorControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DebugControl) as usize - ptr as usize }, - 1192usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT), - "::", - stringify!(DebugControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastBranchToRip) as usize - ptr as usize }, - 1200usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT), - "::", - stringify!(LastBranchToRip), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastBranchFromRip) as usize - ptr as usize - }, - 1208usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT), - "::", - stringify!(LastBranchFromRip), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastExceptionToRip) as usize - ptr as usize - }, - 1216usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT), - "::", - stringify!(LastExceptionToRip), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastExceptionFromRip) as usize - ptr as usize - }, - 1224usize, - concat!( - "Offset of field: ", - stringify!(_CONTEXT), - "::", - stringify!(LastExceptionFromRip), - ), - ); -} -impl Default for _CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CONTEXT = _CONTEXT; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _ARM64_NT_NEON128 { - pub __bindgen_anon_1: _ARM64_NT_NEON128__bindgen_ty_1, - pub D: [f64; 2usize], - pub S: [f32; 4usize], - pub H: [USHORT; 8usize], - pub B: [UCHAR; 16usize], -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ARM64_NT_NEON128__bindgen_ty_1 { - pub Low: ULONGLONG, - pub High: LONGLONG, -} -#[test] -fn bindgen_test_layout__ARM64_NT_NEON128__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_ARM64_NT_NEON128__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARM64_NT_NEON128__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_ARM64_NT_NEON128__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_ARM64_NT_NEON128__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_ARM64_NT_NEON128__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Low) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_NEON128__bindgen_ty_1), - "::", - stringify!(Low), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).High) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_NEON128__bindgen_ty_1), - "::", - stringify!(High), - ), - ); -} -#[test] -fn bindgen_test_layout__ARM64_NT_NEON128() { - const UNINIT: ::core::mem::MaybeUninit<_ARM64_NT_NEON128> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARM64_NT_NEON128>(), - 16usize, - concat!("Size of: ", stringify!(_ARM64_NT_NEON128)), - ); - assert_eq!( - ::core::mem::align_of::<_ARM64_NT_NEON128>(), - 8usize, - concat!("Alignment of ", stringify!(_ARM64_NT_NEON128)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).D) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_ARM64_NT_NEON128), "::", stringify!(D)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).S) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_ARM64_NT_NEON128), "::", stringify!(S)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).H) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_ARM64_NT_NEON128), "::", stringify!(H)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).B) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_ARM64_NT_NEON128), "::", stringify!(B)), - ); -} -impl Default for _ARM64_NT_NEON128 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARM64_NT_NEON128 = _ARM64_NT_NEON128; -pub type PARM64_NT_NEON128 = *mut _ARM64_NT_NEON128; -#[repr(C)] -#[repr(align(16))] -#[derive(Copy, Clone)] -pub struct _ARM64_NT_CONTEXT { - pub ContextFlags: ULONG, - pub Cpsr: ULONG, - pub __bindgen_anon_1: _ARM64_NT_CONTEXT__bindgen_ty_1, - pub Sp: ULONG64, - pub Pc: ULONG64, - pub V: [ARM64_NT_NEON128; 32usize], - pub Fpcr: ULONG, - pub Fpsr: ULONG, - pub Bcr: [ULONG; 8usize], - pub Bvr: [ULONG64; 8usize], - pub Wcr: [ULONG; 2usize], - pub Wvr: [ULONG64; 2usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _ARM64_NT_CONTEXT__bindgen_ty_1 { - pub __bindgen_anon_1: _ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1, - pub X: [ULONG64; 31usize], -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1 { - pub X0: ULONG64, - pub X1: ULONG64, - pub X2: ULONG64, - pub X3: ULONG64, - pub X4: ULONG64, - pub X5: ULONG64, - pub X6: ULONG64, - pub X7: ULONG64, - pub X8: ULONG64, - pub X9: ULONG64, - pub X10: ULONG64, - pub X11: ULONG64, - pub X12: ULONG64, - pub X13: ULONG64, - pub X14: ULONG64, - pub X15: ULONG64, - pub X16: ULONG64, - pub X17: ULONG64, - pub X18: ULONG64, - pub X19: ULONG64, - pub X20: ULONG64, - pub X21: ULONG64, - pub X22: ULONG64, - pub X23: ULONG64, - pub X24: ULONG64, - pub X25: ULONG64, - pub X26: ULONG64, - pub X27: ULONG64, - pub X28: ULONG64, - pub Fp: ULONG64, - pub Lr: ULONG64, -} -#[test] -fn bindgen_test_layout__ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 248usize, - concat!("Size of: ", stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X0) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X1) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X2) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X3) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X4) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X5) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X5), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X6) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X7) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X7), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X8) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X8), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X9) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X9), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X10) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X10), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X11) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X11), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X12) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X12), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X13) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X13), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X14) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X14), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X15) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X15), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X16) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X16), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X17) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X17), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X18) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X18), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X19) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X19), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X20) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X20), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X21) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X21), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X22) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X22), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X23) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X23), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X24) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X24), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X25) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X25), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X26) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X26), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X27) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X27), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X28) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X28), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Fp) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Fp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lr) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Lr), - ), - ); -} -#[test] -fn bindgen_test_layout__ARM64_NT_CONTEXT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_ARM64_NT_CONTEXT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARM64_NT_CONTEXT__bindgen_ty_1>(), - 248usize, - concat!("Size of: ", stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_ARM64_NT_CONTEXT__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT__bindgen_ty_1), - "::", - stringify!(X), - ), - ); -} -impl Default for _ARM64_NT_CONTEXT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__ARM64_NT_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_ARM64_NT_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARM64_NT_CONTEXT>(), - 912usize, - concat!("Size of: ", stringify!(_ARM64_NT_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_ARM64_NT_CONTEXT>(), - 16usize, - concat!("Alignment of ", stringify!(_ARM64_NT_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContextFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT), - "::", - stringify!(ContextFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cpsr) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT), - "::", - stringify!(Cpsr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sp) as usize - ptr as usize }, - 256usize, - concat!("Offset of field: ", stringify!(_ARM64_NT_CONTEXT), "::", stringify!(Sp)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Pc) as usize - ptr as usize }, - 264usize, - concat!("Offset of field: ", stringify!(_ARM64_NT_CONTEXT), "::", stringify!(Pc)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).V) as usize - ptr as usize }, - 272usize, - concat!("Offset of field: ", stringify!(_ARM64_NT_CONTEXT), "::", stringify!(V)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Fpcr) as usize - ptr as usize }, - 784usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT), - "::", - stringify!(Fpcr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Fpsr) as usize - ptr as usize }, - 788usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT), - "::", - stringify!(Fpsr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bcr) as usize - ptr as usize }, - 792usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT), - "::", - stringify!(Bcr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bvr) as usize - ptr as usize }, - 824usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT), - "::", - stringify!(Bvr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Wcr) as usize - ptr as usize }, - 888usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT), - "::", - stringify!(Wcr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Wvr) as usize - ptr as usize }, - 896usize, - concat!( - "Offset of field: ", - stringify!(_ARM64_NT_CONTEXT), - "::", - stringify!(Wvr), - ), - ); -} -impl Default for _ARM64_NT_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARM64_NT_CONTEXT = _ARM64_NT_CONTEXT; -pub type PARM64_NT_CONTEXT = *mut _ARM64_NT_CONTEXT; -#[repr(C)] -#[repr(align(16))] -#[derive(Copy, Clone)] -pub struct _ARM64EC_NT_CONTEXT { - pub __bindgen_anon_1: _ARM64EC_NT_CONTEXT__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _ARM64EC_NT_CONTEXT__bindgen_ty_1 { - pub __bindgen_anon_1: _ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1 { - pub AMD64_P1Home: ULONG64, - pub AMD64_P2Home: ULONG64, - pub AMD64_P3Home: ULONG64, - pub AMD64_P4Home: ULONG64, - pub AMD64_P5Home: ULONG64, - pub AMD64_P6Home: ULONG64, - pub ContextFlags: ULONG, - pub AMD64_MxCsr_copy: ULONG, - pub AMD64_SegCs: USHORT, - pub AMD64_SegDs: USHORT, - pub AMD64_SegEs: USHORT, - pub AMD64_SegFs: USHORT, - pub AMD64_SegGs: USHORT, - pub AMD64_SegSs: USHORT, - pub AMD64_EFlags: ULONG, - pub AMD64_Dr0: ULONG64, - pub AMD64_Dr1: ULONG64, - pub AMD64_Dr2: ULONG64, - pub AMD64_Dr3: ULONG64, - pub AMD64_Dr6: ULONG64, - pub AMD64_Dr7: ULONG64, - pub X8: ULONG64, - pub X0: ULONG64, - pub X1: ULONG64, - pub X27: ULONG64, - pub Sp: ULONG64, - pub Fp: ULONG64, - pub X25: ULONG64, - pub X26: ULONG64, - pub X2: ULONG64, - pub X3: ULONG64, - pub X4: ULONG64, - pub X5: ULONG64, - pub X19: ULONG64, - pub X20: ULONG64, - pub X21: ULONG64, - pub X22: ULONG64, - pub Pc: ULONG64, - pub __bindgen_anon_1: _ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - pub AMD64_VectorRegister: [ARM64_NT_NEON128; 26usize], - pub AMD64_VectorControl: ULONG64, - pub AMD64_DebugControl: ULONG64, - pub AMD64_LastBranchToRip: ULONG64, - pub AMD64_LastBranchFromRip: ULONG64, - pub AMD64_LastExceptionToRip: ULONG64, - pub AMD64_LastExceptionFromRip: ULONG64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { - pub AMD64_ControlWord: USHORT, - pub AMD64_StatusWord: USHORT, - pub AMD64_TagWord: UCHAR, - pub AMD64_Reserved1: UCHAR, - pub AMD64_ErrorOpcode: USHORT, - pub AMD64_ErrorOffset: ULONG, - pub AMD64_ErrorSelector: USHORT, - pub AMD64_Reserved2: USHORT, - pub AMD64_DataOffset: ULONG, - pub AMD64_DataSelector: USHORT, - pub AMD64_Reserved3: USHORT, - pub AMD64_MxCsr: ULONG, - pub AMD64_MxCsr_Mask: ULONG, - pub Lr: ULONG64, - pub X16_0: USHORT, - pub AMD64_St0_Reserved1: USHORT, - pub AMD64_St0_Reserved2: ULONG, - pub X6: ULONG64, - pub X16_1: USHORT, - pub AMD64_St1_Reserved1: USHORT, - pub AMD64_St1_Reserved2: ULONG, - pub X7: ULONG64, - pub X16_2: USHORT, - pub AMD64_St2_Reserved1: USHORT, - pub AMD64_St2_Reserved2: ULONG, - pub X9: ULONG64, - pub X16_3: USHORT, - pub AMD64_St3_Reserved1: USHORT, - pub AMD64_St3_Reserved2: ULONG, - pub X10: ULONG64, - pub X17_0: USHORT, - pub AMD64_St4_Reserved1: USHORT, - pub AMD64_St4_Reserved2: ULONG, - pub X11: ULONG64, - pub X17_1: USHORT, - pub AMD64_St5_Reserved1: USHORT, - pub AMD64_St5_Reserved2: ULONG, - pub X12: ULONG64, - pub X17_2: USHORT, - pub AMD64_St6_Reserved1: USHORT, - pub AMD64_St6_Reserved2: ULONG, - pub X15: ULONG64, - pub X17_3: USHORT, - pub AMD64_St7_Reserved1: USHORT, - pub AMD64_St7_Reserved2: ULONG, - pub V: [ARM64_NT_NEON128; 16usize], - pub AMD64_XSAVE_FORMAT_Reserved4: [UCHAR; 96usize], -} -#[test] -fn bindgen_test_layout__ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - >(), - 512usize, - concat!( - "Size of: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_ControlWord) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_ControlWord), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_StatusWord) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_StatusWord), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_TagWord) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_TagWord), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_Reserved1) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_Reserved1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_ErrorOpcode) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_ErrorOpcode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_ErrorOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_ErrorOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_ErrorSelector) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_ErrorSelector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_Reserved2) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_Reserved2), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_DataOffset) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_DataOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_DataSelector) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_DataSelector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_Reserved3) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_Reserved3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_MxCsr) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_MxCsr), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_MxCsr_Mask) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_MxCsr_Mask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lr) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Lr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X16_0) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X16_0), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St0_Reserved1) as usize - ptr as usize - }, - 42usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St0_Reserved1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St0_Reserved2) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St0_Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X6) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X16_1) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X16_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St1_Reserved1) as usize - ptr as usize - }, - 58usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St1_Reserved1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St1_Reserved2) as usize - ptr as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St1_Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X7) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X7), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X16_2) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X16_2), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St2_Reserved1) as usize - ptr as usize - }, - 74usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St2_Reserved1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St2_Reserved2) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St2_Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X9) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X9), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X16_3) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X16_3), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St3_Reserved1) as usize - ptr as usize - }, - 90usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St3_Reserved1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St3_Reserved2) as usize - ptr as usize - }, - 92usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St3_Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X10) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X10), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X17_0) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X17_0), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St4_Reserved1) as usize - ptr as usize - }, - 106usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St4_Reserved1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St4_Reserved2) as usize - ptr as usize - }, - 108usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St4_Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X11) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X11), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X17_1) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X17_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St5_Reserved1) as usize - ptr as usize - }, - 122usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St5_Reserved1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St5_Reserved2) as usize - ptr as usize - }, - 124usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St5_Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X12) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X12), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X17_2) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X17_2), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St6_Reserved1) as usize - ptr as usize - }, - 138usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St6_Reserved1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St6_Reserved2) as usize - ptr as usize - }, - 140usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St6_Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X15) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X15), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X17_3) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X17_3), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St7_Reserved1) as usize - ptr as usize - }, - 154usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St7_Reserved1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_St7_Reserved2) as usize - ptr as usize - }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_St7_Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).V) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(V), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_XSAVE_FORMAT_Reserved4) as usize - - ptr as usize - }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_XSAVE_FORMAT_Reserved4), - ), - ); -} -impl Default for _ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 1232usize, - concat!("Size of: ", stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_P1Home) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_P1Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_P2Home) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_P2Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_P3Home) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_P3Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_P4Home) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_P4Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_P5Home) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_P5Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_P6Home) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_P6Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContextFlags) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ContextFlags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_MxCsr_copy) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_MxCsr_copy), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_SegCs) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_SegCs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_SegDs) as usize - ptr as usize }, - 58usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_SegDs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_SegEs) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_SegEs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_SegFs) as usize - ptr as usize }, - 62usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_SegFs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_SegGs) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_SegGs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_SegSs) as usize - ptr as usize }, - 66usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_SegSs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_EFlags) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_EFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_Dr0) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_Dr0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_Dr1) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_Dr1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_Dr2) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_Dr2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_Dr3) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_Dr3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_Dr6) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_Dr6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AMD64_Dr7) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_Dr7), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X8) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X8), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X0) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X1) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X27) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X27), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sp) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Sp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Fp) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Fp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X25) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X25), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X26) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X26), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X2) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X3) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X4) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X5) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X5), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X19) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X19), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X20) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X20), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X21) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X21), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X22) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(X22), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Pc) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Pc), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_VectorRegister) as usize - ptr as usize - }, - 768usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_VectorRegister), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_VectorControl) as usize - ptr as usize - }, - 1184usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_VectorControl), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_DebugControl) as usize - ptr as usize - }, - 1192usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_DebugControl), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_LastBranchToRip) as usize - ptr as usize - }, - 1200usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_LastBranchToRip), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_LastBranchFromRip) as usize - ptr as usize - }, - 1208usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_LastBranchFromRip), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_LastExceptionToRip) as usize - - ptr as usize - }, - 1216usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_LastExceptionToRip), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMD64_LastExceptionFromRip) as usize - - ptr as usize - }, - 1224usize, - concat!( - "Offset of field: ", - stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AMD64_LastExceptionFromRip), - ), - ); -} -impl Default for _ARM64EC_NT_CONTEXT__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__ARM64EC_NT_CONTEXT__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_ARM64EC_NT_CONTEXT__bindgen_ty_1>(), - 1232usize, - concat!("Size of: ", stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_ARM64EC_NT_CONTEXT__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_ARM64EC_NT_CONTEXT__bindgen_ty_1)), - ); -} -impl Default for _ARM64EC_NT_CONTEXT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__ARM64EC_NT_CONTEXT() { - assert_eq!( - ::core::mem::size_of::<_ARM64EC_NT_CONTEXT>(), - 1232usize, - concat!("Size of: ", stringify!(_ARM64EC_NT_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_ARM64EC_NT_CONTEXT>(), - 16usize, - concat!("Alignment of ", stringify!(_ARM64EC_NT_CONTEXT)), - ); -} -impl Default for _ARM64EC_NT_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARM64EC_NT_CONTEXT = _ARM64EC_NT_CONTEXT; -pub type PARM64EC_NT_CONTEXT = *mut _ARM64EC_NT_CONTEXT; -pub mod WELL_KNOWN_SID_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WinNullSid: Type = 0; - pub const WinWorldSid: Type = 1; - pub const WinLocalSid: Type = 2; - pub const WinCreatorOwnerSid: Type = 3; - pub const WinCreatorGroupSid: Type = 4; - pub const WinCreatorOwnerServerSid: Type = 5; - pub const WinCreatorGroupServerSid: Type = 6; - pub const WinNtAuthoritySid: Type = 7; - pub const WinDialupSid: Type = 8; - pub const WinNetworkSid: Type = 9; - pub const WinBatchSid: Type = 10; - pub const WinInteractiveSid: Type = 11; - pub const WinServiceSid: Type = 12; - pub const WinAnonymousSid: Type = 13; - pub const WinProxySid: Type = 14; - pub const WinEnterpriseControllersSid: Type = 15; - pub const WinSelfSid: Type = 16; - pub const WinAuthenticatedUserSid: Type = 17; - pub const WinRestrictedCodeSid: Type = 18; - pub const WinTerminalServerSid: Type = 19; - pub const WinRemoteLogonIdSid: Type = 20; - pub const WinLogonIdsSid: Type = 21; - pub const WinLocalSystemSid: Type = 22; - pub const WinLocalServiceSid: Type = 23; - pub const WinNetworkServiceSid: Type = 24; - pub const WinBuiltinDomainSid: Type = 25; - pub const WinBuiltinAdministratorsSid: Type = 26; - pub const WinBuiltinUsersSid: Type = 27; - pub const WinBuiltinGuestsSid: Type = 28; - pub const WinBuiltinPowerUsersSid: Type = 29; - pub const WinBuiltinAccountOperatorsSid: Type = 30; - pub const WinBuiltinSystemOperatorsSid: Type = 31; - pub const WinBuiltinPrintOperatorsSid: Type = 32; - pub const WinBuiltinBackupOperatorsSid: Type = 33; - pub const WinBuiltinReplicatorSid: Type = 34; - pub const WinBuiltinPreWindows2000CompatibleAccessSid: Type = 35; - pub const WinBuiltinRemoteDesktopUsersSid: Type = 36; - pub const WinBuiltinNetworkConfigurationOperatorsSid: Type = 37; - pub const WinAccountAdministratorSid: Type = 38; - pub const WinAccountGuestSid: Type = 39; - pub const WinAccountKrbtgtSid: Type = 40; - pub const WinAccountDomainAdminsSid: Type = 41; - pub const WinAccountDomainUsersSid: Type = 42; - pub const WinAccountDomainGuestsSid: Type = 43; - pub const WinAccountComputersSid: Type = 44; - pub const WinAccountControllersSid: Type = 45; - pub const WinAccountCertAdminsSid: Type = 46; - pub const WinAccountSchemaAdminsSid: Type = 47; - pub const WinAccountEnterpriseAdminsSid: Type = 48; - pub const WinAccountPolicyAdminsSid: Type = 49; - pub const WinAccountRasAndIasServersSid: Type = 50; - pub const WinNTLMAuthenticationSid: Type = 51; - pub const WinDigestAuthenticationSid: Type = 52; - pub const WinSChannelAuthenticationSid: Type = 53; - pub const WinThisOrganizationSid: Type = 54; - pub const WinOtherOrganizationSid: Type = 55; - pub const WinBuiltinIncomingForestTrustBuildersSid: Type = 56; - pub const WinBuiltinPerfMonitoringUsersSid: Type = 57; - pub const WinBuiltinPerfLoggingUsersSid: Type = 58; - pub const WinBuiltinAuthorizationAccessSid: Type = 59; - pub const WinBuiltinTerminalServerLicenseServersSid: Type = 60; - pub const WinBuiltinDCOMUsersSid: Type = 61; - pub const WinBuiltinIUsersSid: Type = 62; - pub const WinIUserSid: Type = 63; - pub const WinBuiltinCryptoOperatorsSid: Type = 64; - pub const WinUntrustedLabelSid: Type = 65; - pub const WinLowLabelSid: Type = 66; - pub const WinMediumLabelSid: Type = 67; - pub const WinHighLabelSid: Type = 68; - pub const WinSystemLabelSid: Type = 69; - pub const WinWriteRestrictedCodeSid: Type = 70; - pub const WinCreatorOwnerRightsSid: Type = 71; - pub const WinCacheablePrincipalsGroupSid: Type = 72; - pub const WinNonCacheablePrincipalsGroupSid: Type = 73; - pub const WinEnterpriseReadonlyControllersSid: Type = 74; - pub const WinAccountReadonlyControllersSid: Type = 75; - pub const WinBuiltinEventLogReadersGroup: Type = 76; - pub const WinNewEnterpriseReadonlyControllersSid: Type = 77; - pub const WinBuiltinCertSvcDComAccessGroup: Type = 78; - pub const WinMediumPlusLabelSid: Type = 79; - pub const WinLocalLogonSid: Type = 80; - pub const WinConsoleLogonSid: Type = 81; - pub const WinThisOrganizationCertificateSid: Type = 82; - pub const WinApplicationPackageAuthoritySid: Type = 83; - pub const WinBuiltinAnyPackageSid: Type = 84; - pub const WinCapabilityInternetClientSid: Type = 85; - pub const WinCapabilityInternetClientServerSid: Type = 86; - pub const WinCapabilityPrivateNetworkClientServerSid: Type = 87; - pub const WinCapabilityPicturesLibrarySid: Type = 88; - pub const WinCapabilityVideosLibrarySid: Type = 89; - pub const WinCapabilityMusicLibrarySid: Type = 90; - pub const WinCapabilityDocumentsLibrarySid: Type = 91; - pub const WinCapabilitySharedUserCertificatesSid: Type = 92; - pub const WinCapabilityEnterpriseAuthenticationSid: Type = 93; - pub const WinCapabilityRemovableStorageSid: Type = 94; - pub const WinBuiltinRDSRemoteAccessServersSid: Type = 95; - pub const WinBuiltinRDSEndpointServersSid: Type = 96; - pub const WinBuiltinRDSManagementServersSid: Type = 97; - pub const WinUserModeDriversSid: Type = 98; - pub const WinBuiltinHyperVAdminsSid: Type = 99; - pub const WinAccountCloneableControllersSid: Type = 100; - pub const WinBuiltinAccessControlAssistanceOperatorsSid: Type = 101; - pub const WinBuiltinRemoteManagementUsersSid: Type = 102; - pub const WinAuthenticationAuthorityAssertedSid: Type = 103; - pub const WinAuthenticationServiceAssertedSid: Type = 104; - pub const WinLocalAccountSid: Type = 105; - pub const WinLocalAccountAndAdministratorSid: Type = 106; - pub const WinAccountProtectedUsersSid: Type = 107; - pub const WinCapabilityAppointmentsSid: Type = 108; - pub const WinCapabilityContactsSid: Type = 109; - pub const WinAccountDefaultSystemManagedSid: Type = 110; - pub const WinBuiltinDefaultSystemManagedGroupSid: Type = 111; - pub const WinBuiltinStorageReplicaAdminsSid: Type = 112; - pub const WinAccountKeyAdminsSid: Type = 113; - pub const WinAccountEnterpriseKeyAdminsSid: Type = 114; - pub const WinAuthenticationKeyTrustSid: Type = 115; - pub const WinAuthenticationKeyPropertyMFASid: Type = 116; - pub const WinAuthenticationKeyPropertyAttestationSid: Type = 117; - pub const WinAuthenticationFreshKeyAuthSid: Type = 118; - pub const WinBuiltinDeviceOwnersSid: Type = 119; -} -pub type SE_SIGNING_LEVEL = UCHAR; -pub type PSE_SIGNING_LEVEL = *mut UCHAR; -pub mod _SE_IMAGE_SIGNATURE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const SeImageSignatureNone: Type = 0; - pub const SeImageSignatureEmbedded: Type = 1; - pub const SeImageSignatureCache: Type = 2; - pub const SeImageSignatureCatalogCached: Type = 3; - pub const SeImageSignatureCatalogNotCached: Type = 4; - pub const SeImageSignatureCatalogHint: Type = 5; - pub const SeImageSignaturePackageCatalog: Type = 6; - pub const SeImageSignaturePplMitigated: Type = 7; -} -pub use self::_SE_IMAGE_SIGNATURE_TYPE::Type as SE_IMAGE_SIGNATURE_TYPE; -pub type PSE_IMAGE_SIGNATURE_TYPE = *mut _SE_IMAGE_SIGNATURE_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _RTL_RUN_ONCE { - pub Ptr: PVOID, -} -#[test] -fn bindgen_test_layout__RTL_RUN_ONCE() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_RUN_ONCE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_RUN_ONCE>(), - 8usize, - concat!("Size of: ", stringify!(_RTL_RUN_ONCE)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_RUN_ONCE>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_RUN_ONCE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ptr) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_RTL_RUN_ONCE), "::", stringify!(Ptr)), - ); -} -impl Default for _RTL_RUN_ONCE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_RUN_ONCE = _RTL_RUN_ONCE; -pub type PRTL_RUN_ONCE = *mut _RTL_RUN_ONCE; -pub type PRTL_RUN_ONCE_INIT_FN = ::core::option::Option< - unsafe extern "C" fn(arg1: PRTL_RUN_ONCE, arg2: PVOID, arg3: *mut PVOID) -> ULONG, ->; -pub mod _TABLE_SEARCH_RESULT { - pub type Type = ::core::ffi::c_int; - pub const TableEmptyTree: Type = 0; - pub const TableFoundNode: Type = 1; - pub const TableInsertAsLeft: Type = 2; - pub const TableInsertAsRight: Type = 3; -} -pub use self::_TABLE_SEARCH_RESULT::Type as TABLE_SEARCH_RESULT; -pub mod _RTL_GENERIC_COMPARE_RESULTS { - pub type Type = ::core::ffi::c_int; - pub const GenericLessThan: Type = 0; - pub const GenericGreaterThan: Type = 1; - pub const GenericEqual: Type = 2; -} -pub use self::_RTL_GENERIC_COMPARE_RESULTS::Type as RTL_GENERIC_COMPARE_RESULTS; -pub type PRTL_AVL_COMPARE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - arg1: *mut _RTL_AVL_TABLE, - arg2: PVOID, - arg3: PVOID, - ) -> RTL_GENERIC_COMPARE_RESULTS, ->; -pub type PRTL_AVL_ALLOCATE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(arg1: *mut _RTL_AVL_TABLE, arg2: CLONG) -> PVOID, ->; -pub type PRTL_AVL_FREE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(arg1: *mut _RTL_AVL_TABLE, arg2: PVOID), ->; -pub type PRTL_AVL_MATCH_FUNCTION = ::core::option::Option< - unsafe extern "C" fn(arg1: *mut _RTL_AVL_TABLE, arg2: PVOID, arg3: PVOID) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RTL_BALANCED_LINKS { - pub Parent: *mut _RTL_BALANCED_LINKS, - pub LeftChild: *mut _RTL_BALANCED_LINKS, - pub RightChild: *mut _RTL_BALANCED_LINKS, - pub Balance: CHAR, - pub Reserved: [UCHAR; 3usize], -} -#[test] -fn bindgen_test_layout__RTL_BALANCED_LINKS() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_BALANCED_LINKS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_BALANCED_LINKS>(), - 32usize, - concat!("Size of: ", stringify!(_RTL_BALANCED_LINKS)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_BALANCED_LINKS>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_BALANCED_LINKS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parent) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_BALANCED_LINKS), - "::", - stringify!(Parent), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LeftChild) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RTL_BALANCED_LINKS), - "::", - stringify!(LeftChild), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RightChild) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_RTL_BALANCED_LINKS), - "::", - stringify!(RightChild), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Balance) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_RTL_BALANCED_LINKS), - "::", - stringify!(Balance), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 25usize, - concat!( - "Offset of field: ", - stringify!(_RTL_BALANCED_LINKS), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _RTL_BALANCED_LINKS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_BALANCED_LINKS = _RTL_BALANCED_LINKS; -pub type PRTL_BALANCED_LINKS = *mut RTL_BALANCED_LINKS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RTL_AVL_TABLE { - pub BalancedRoot: RTL_BALANCED_LINKS, - pub OrderedPointer: PVOID, - pub WhichOrderedElement: ULONG, - pub NumberGenericTableElements: ULONG, - pub DepthOfTree: ULONG, - pub RestartKey: PRTL_BALANCED_LINKS, - pub DeleteCount: ULONG, - pub CompareRoutine: PRTL_AVL_COMPARE_ROUTINE, - pub AllocateRoutine: PRTL_AVL_ALLOCATE_ROUTINE, - pub FreeRoutine: PRTL_AVL_FREE_ROUTINE, - pub TableContext: PVOID, -} -#[test] -fn bindgen_test_layout__RTL_AVL_TABLE() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_AVL_TABLE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_AVL_TABLE>(), - 104usize, - concat!("Size of: ", stringify!(_RTL_AVL_TABLE)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_AVL_TABLE>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_AVL_TABLE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BalancedRoot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_AVL_TABLE), - "::", - stringify!(BalancedRoot), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OrderedPointer) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_RTL_AVL_TABLE), - "::", - stringify!(OrderedPointer), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WhichOrderedElement) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_RTL_AVL_TABLE), - "::", - stringify!(WhichOrderedElement), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberGenericTableElements) as usize - - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_RTL_AVL_TABLE), - "::", - stringify!(NumberGenericTableElements), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DepthOfTree) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_RTL_AVL_TABLE), - "::", - stringify!(DepthOfTree), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RestartKey) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_RTL_AVL_TABLE), - "::", - stringify!(RestartKey), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeleteCount) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_RTL_AVL_TABLE), - "::", - stringify!(DeleteCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompareRoutine) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_RTL_AVL_TABLE), - "::", - stringify!(CompareRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocateRoutine) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_RTL_AVL_TABLE), - "::", - stringify!(AllocateRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeRoutine) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_RTL_AVL_TABLE), - "::", - stringify!(FreeRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TableContext) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_RTL_AVL_TABLE), - "::", - stringify!(TableContext), - ), - ); -} -impl Default for _RTL_AVL_TABLE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_AVL_TABLE = _RTL_AVL_TABLE; -pub type PRTL_AVL_TABLE = *mut RTL_AVL_TABLE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RTL_SPLAY_LINKS { - pub Parent: *mut _RTL_SPLAY_LINKS, - pub LeftChild: *mut _RTL_SPLAY_LINKS, - pub RightChild: *mut _RTL_SPLAY_LINKS, -} -#[test] -fn bindgen_test_layout__RTL_SPLAY_LINKS() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_SPLAY_LINKS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_SPLAY_LINKS>(), - 24usize, - concat!("Size of: ", stringify!(_RTL_SPLAY_LINKS)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_SPLAY_LINKS>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_SPLAY_LINKS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parent) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SPLAY_LINKS), - "::", - stringify!(Parent), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LeftChild) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SPLAY_LINKS), - "::", - stringify!(LeftChild), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RightChild) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SPLAY_LINKS), - "::", - stringify!(RightChild), - ), - ); -} -impl Default for _RTL_SPLAY_LINKS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_SPLAY_LINKS = _RTL_SPLAY_LINKS; -pub type PRTL_SPLAY_LINKS = *mut RTL_SPLAY_LINKS; -pub type PRTL_GENERIC_COMPARE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - arg1: *mut _RTL_GENERIC_TABLE, - arg2: PVOID, - arg3: PVOID, - ) -> RTL_GENERIC_COMPARE_RESULTS, ->; -pub type PRTL_GENERIC_ALLOCATE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(arg1: *mut _RTL_GENERIC_TABLE, arg2: CLONG) -> PVOID, ->; -pub type PRTL_GENERIC_FREE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(arg1: *mut _RTL_GENERIC_TABLE, arg2: PVOID), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RTL_GENERIC_TABLE { - pub TableRoot: PRTL_SPLAY_LINKS, - pub InsertOrderList: LIST_ENTRY, - pub OrderedPointer: PLIST_ENTRY, - pub WhichOrderedElement: ULONG, - pub NumberGenericTableElements: ULONG, - pub CompareRoutine: PRTL_GENERIC_COMPARE_ROUTINE, - pub AllocateRoutine: PRTL_GENERIC_ALLOCATE_ROUTINE, - pub FreeRoutine: PRTL_GENERIC_FREE_ROUTINE, - pub TableContext: PVOID, -} -#[test] -fn bindgen_test_layout__RTL_GENERIC_TABLE() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_GENERIC_TABLE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_GENERIC_TABLE>(), - 72usize, - concat!("Size of: ", stringify!(_RTL_GENERIC_TABLE)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_GENERIC_TABLE>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_GENERIC_TABLE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TableRoot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_GENERIC_TABLE), - "::", - stringify!(TableRoot), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InsertOrderList) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RTL_GENERIC_TABLE), - "::", - stringify!(InsertOrderList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OrderedPointer) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_RTL_GENERIC_TABLE), - "::", - stringify!(OrderedPointer), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WhichOrderedElement) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_RTL_GENERIC_TABLE), - "::", - stringify!(WhichOrderedElement), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberGenericTableElements) as usize - - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_RTL_GENERIC_TABLE), - "::", - stringify!(NumberGenericTableElements), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompareRoutine) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_RTL_GENERIC_TABLE), - "::", - stringify!(CompareRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocateRoutine) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_RTL_GENERIC_TABLE), - "::", - stringify!(AllocateRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeRoutine) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_RTL_GENERIC_TABLE), - "::", - stringify!(FreeRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TableContext) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_RTL_GENERIC_TABLE), - "::", - stringify!(TableContext), - ), - ); -} -impl Default for _RTL_GENERIC_TABLE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_GENERIC_TABLE = _RTL_GENERIC_TABLE; -pub type PRTL_GENERIC_TABLE = *mut RTL_GENERIC_TABLE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RTL_DYNAMIC_HASH_TABLE_ENTRY { - pub Linkage: LIST_ENTRY, - pub Signature: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__RTL_DYNAMIC_HASH_TABLE_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_DYNAMIC_HASH_TABLE_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_DYNAMIC_HASH_TABLE_ENTRY>(), - 24usize, - concat!("Size of: ", stringify!(_RTL_DYNAMIC_HASH_TABLE_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_DYNAMIC_HASH_TABLE_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_DYNAMIC_HASH_TABLE_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Linkage) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE_ENTRY), - "::", - stringify!(Linkage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE_ENTRY), - "::", - stringify!(Signature), - ), - ); -} -impl Default for _RTL_DYNAMIC_HASH_TABLE_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_DYNAMIC_HASH_TABLE_ENTRY = _RTL_DYNAMIC_HASH_TABLE_ENTRY; -pub type PRTL_DYNAMIC_HASH_TABLE_ENTRY = *mut _RTL_DYNAMIC_HASH_TABLE_ENTRY; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RTL_DYNAMIC_HASH_TABLE_CONTEXT { - pub ChainHead: PLIST_ENTRY, - pub PrevLinkage: PLIST_ENTRY, - pub Signature: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__RTL_DYNAMIC_HASH_TABLE_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_DYNAMIC_HASH_TABLE_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_DYNAMIC_HASH_TABLE_CONTEXT>(), - 24usize, - concat!("Size of: ", stringify!(_RTL_DYNAMIC_HASH_TABLE_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_DYNAMIC_HASH_TABLE_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_DYNAMIC_HASH_TABLE_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChainHead) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE_CONTEXT), - "::", - stringify!(ChainHead), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrevLinkage) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE_CONTEXT), - "::", - stringify!(PrevLinkage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE_CONTEXT), - "::", - stringify!(Signature), - ), - ); -} -impl Default for _RTL_DYNAMIC_HASH_TABLE_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_DYNAMIC_HASH_TABLE_CONTEXT = _RTL_DYNAMIC_HASH_TABLE_CONTEXT; -pub type PRTL_DYNAMIC_HASH_TABLE_CONTEXT = *mut _RTL_DYNAMIC_HASH_TABLE_CONTEXT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _RTL_DYNAMIC_HASH_TABLE_ENUMERATOR { - pub __bindgen_anon_1: _RTL_DYNAMIC_HASH_TABLE_ENUMERATOR__bindgen_ty_1, - pub ChainHead: PLIST_ENTRY, - pub BucketIndex: ULONG, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _RTL_DYNAMIC_HASH_TABLE_ENUMERATOR__bindgen_ty_1 { - pub HashEntry: RTL_DYNAMIC_HASH_TABLE_ENTRY, - pub CurEntry: PLIST_ENTRY, -} -#[test] -fn bindgen_test_layout__RTL_DYNAMIC_HASH_TABLE_ENUMERATOR__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _RTL_DYNAMIC_HASH_TABLE_ENUMERATOR__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_DYNAMIC_HASH_TABLE_ENUMERATOR__bindgen_ty_1>(), - 24usize, - concat!( - "Size of: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE_ENUMERATOR__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_DYNAMIC_HASH_TABLE_ENUMERATOR__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_RTL_DYNAMIC_HASH_TABLE_ENUMERATOR__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HashEntry) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE_ENUMERATOR__bindgen_ty_1), - "::", - stringify!(HashEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurEntry) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE_ENUMERATOR__bindgen_ty_1), - "::", - stringify!(CurEntry), - ), - ); -} -impl Default for _RTL_DYNAMIC_HASH_TABLE_ENUMERATOR__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__RTL_DYNAMIC_HASH_TABLE_ENUMERATOR() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_DYNAMIC_HASH_TABLE_ENUMERATOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_DYNAMIC_HASH_TABLE_ENUMERATOR>(), - 40usize, - concat!("Size of: ", stringify!(_RTL_DYNAMIC_HASH_TABLE_ENUMERATOR)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_DYNAMIC_HASH_TABLE_ENUMERATOR>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_DYNAMIC_HASH_TABLE_ENUMERATOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChainHead) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE_ENUMERATOR), - "::", - stringify!(ChainHead), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BucketIndex) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE_ENUMERATOR), - "::", - stringify!(BucketIndex), - ), - ); -} -impl Default for _RTL_DYNAMIC_HASH_TABLE_ENUMERATOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_DYNAMIC_HASH_TABLE_ENUMERATOR = _RTL_DYNAMIC_HASH_TABLE_ENUMERATOR; -pub type PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR = *mut _RTL_DYNAMIC_HASH_TABLE_ENUMERATOR; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RTL_DYNAMIC_HASH_TABLE { - pub Flags: ULONG, - pub Shift: ULONG, - pub TableSize: ULONG, - pub Pivot: ULONG, - pub DivisorMask: ULONG, - pub NumEntries: ULONG, - pub NonEmptyBuckets: ULONG, - pub NumEnumerators: ULONG, - pub Directory: PVOID, -} -#[test] -fn bindgen_test_layout__RTL_DYNAMIC_HASH_TABLE() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_DYNAMIC_HASH_TABLE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_DYNAMIC_HASH_TABLE>(), - 40usize, - concat!("Size of: ", stringify!(_RTL_DYNAMIC_HASH_TABLE)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_DYNAMIC_HASH_TABLE>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_DYNAMIC_HASH_TABLE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Shift) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE), - "::", - stringify!(Shift), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TableSize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE), - "::", - stringify!(TableSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Pivot) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE), - "::", - stringify!(Pivot), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DivisorMask) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE), - "::", - stringify!(DivisorMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumEntries) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE), - "::", - stringify!(NumEntries), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NonEmptyBuckets) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE), - "::", - stringify!(NonEmptyBuckets), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumEnumerators) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE), - "::", - stringify!(NumEnumerators), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Directory) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_RTL_DYNAMIC_HASH_TABLE), - "::", - stringify!(Directory), - ), - ); -} -impl Default for _RTL_DYNAMIC_HASH_TABLE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_DYNAMIC_HASH_TABLE = _RTL_DYNAMIC_HASH_TABLE; -pub type PRTL_DYNAMIC_HASH_TABLE = *mut _RTL_DYNAMIC_HASH_TABLE; -pub mod _STATE_LOCATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const LocationTypeRegistry: Type = 0; - pub const LocationTypeFileSystem: Type = 1; - pub const LocationTypeMaximum: Type = 2; -} -pub use self::_STATE_LOCATION_TYPE::Type as STATE_LOCATION_TYPE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _NV_MEMORY_RANGE { - pub BaseAddress: *mut ::core::ffi::c_void, - pub Length: SIZE_T, -} -#[test] -fn bindgen_test_layout__NV_MEMORY_RANGE() { - const UNINIT: ::core::mem::MaybeUninit<_NV_MEMORY_RANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NV_MEMORY_RANGE>(), - 16usize, - concat!("Size of: ", stringify!(_NV_MEMORY_RANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_NV_MEMORY_RANGE>(), - 8usize, - concat!("Alignment of ", stringify!(_NV_MEMORY_RANGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseAddress) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NV_MEMORY_RANGE), - "::", - stringify!(BaseAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NV_MEMORY_RANGE), - "::", - stringify!(Length), - ), - ); -} -impl Default for _NV_MEMORY_RANGE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type NV_MEMORY_RANGE = _NV_MEMORY_RANGE; -pub type PNV_MEMORY_RANGE = *mut _NV_MEMORY_RANGE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CORRELATION_VECTOR { - pub Version: CHAR, - pub Vector: [CHAR; 129usize], -} -#[test] -fn bindgen_test_layout_CORRELATION_VECTOR() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 130usize, - concat!("Size of: ", stringify!(CORRELATION_VECTOR)), - ); - assert_eq!( - ::core::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CORRELATION_VECTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CORRELATION_VECTOR), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CORRELATION_VECTOR), - "::", - stringify!(Vector), - ), - ); -} -impl Default for CORRELATION_VECTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCORRELATION_VECTOR = *mut CORRELATION_VECTOR; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG { - pub Size: ULONG, - pub TriggerId: PCWSTR, -} -#[test] -fn bindgen_test_layout__CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG>(), - 16usize, - concat!("Size of: ", stringify!(_CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TriggerId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG), - "::", - stringify!(TriggerId), - ), - ); -} -impl Default for _CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG = _CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG; -pub type PCUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG = *mut _CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG; -pub mod _RTL_SYSTEM_GLOBAL_DATA_ID { - pub type Type = ::core::ffi::c_int; - pub const GlobalDataIdUnknown: Type = 0; - pub const GlobalDataIdRngSeedVersion: Type = 1; - pub const GlobalDataIdInterruptTime: Type = 2; - pub const GlobalDataIdTimeZoneBias: Type = 3; - pub const GlobalDataIdImageNumberLow: Type = 4; - pub const GlobalDataIdImageNumberHigh: Type = 5; - pub const GlobalDataIdTimeZoneId: Type = 6; - pub const GlobalDataIdNtMajorVersion: Type = 7; - pub const GlobalDataIdNtMinorVersion: Type = 8; - pub const GlobalDataIdSystemExpirationDate: Type = 9; - pub const GlobalDataIdKdDebuggerEnabled: Type = 10; - pub const GlobalDataIdCyclesPerYield: Type = 11; - pub const GlobalDataIdSafeBootMode: Type = 12; - pub const GlobalDataIdLastSystemRITEventTickCount: Type = 13; - pub const GlobalDataIdConsoleSharedDataFlags: Type = 14; - pub const GlobalDataIdNtSystemRootDrive: Type = 15; - pub const GlobalDataIdQpcShift: Type = 16; - pub const GlobalDataIdQpcBypassEnabled: Type = 17; - pub const GlobalDataIdQpcData: Type = 18; - pub const GlobalDataIdQpcBias: Type = 19; -} -pub use self::_RTL_SYSTEM_GLOBAL_DATA_ID::Type as RTL_SYSTEM_GLOBAL_DATA_ID; -pub type PRTL_SYSTEM_GLOBAL_DATA_ID = *mut _RTL_SYSTEM_GLOBAL_DATA_ID::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_ALIGNMENT_INFORMATION { - pub AlignmentRequirement: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_ALIGNMENT_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ALIGNMENT_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ALIGNMENT_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_ALIGNMENT_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ALIGNMENT_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_ALIGNMENT_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AlignmentRequirement) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ALIGNMENT_INFORMATION), - "::", - stringify!(AlignmentRequirement), - ), - ); -} -pub type FILE_ALIGNMENT_INFORMATION = _FILE_ALIGNMENT_INFORMATION; -pub type PFILE_ALIGNMENT_INFORMATION = *mut _FILE_ALIGNMENT_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_NAME_INFORMATION { - pub FileNameLength: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_NAME_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_NAME_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_NAME_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_NAME_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_NAME_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_NAME_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NAME_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NAME_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -pub type FILE_NAME_INFORMATION = _FILE_NAME_INFORMATION; -pub type PFILE_NAME_INFORMATION = *mut _FILE_NAME_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_ATTRIBUTE_TAG_INFORMATION { - pub FileAttributes: ULONG, - pub ReparseTag: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_ATTRIBUTE_TAG_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ATTRIBUTE_TAG_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ATTRIBUTE_TAG_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_ATTRIBUTE_TAG_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ATTRIBUTE_TAG_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_ATTRIBUTE_TAG_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ATTRIBUTE_TAG_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparseTag) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ATTRIBUTE_TAG_INFORMATION), - "::", - stringify!(ReparseTag), - ), - ); -} -pub type FILE_ATTRIBUTE_TAG_INFORMATION = _FILE_ATTRIBUTE_TAG_INFORMATION; -pub type PFILE_ATTRIBUTE_TAG_INFORMATION = *mut _FILE_ATTRIBUTE_TAG_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_DISPOSITION_INFORMATION { - pub DeleteFile: BOOLEAN, -} -#[test] -fn bindgen_test_layout__FILE_DISPOSITION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_DISPOSITION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_DISPOSITION_INFORMATION>(), - 1usize, - concat!("Size of: ", stringify!(_FILE_DISPOSITION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_DISPOSITION_INFORMATION>(), - 1usize, - concat!("Alignment of ", stringify!(_FILE_DISPOSITION_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeleteFile) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DISPOSITION_INFORMATION), - "::", - stringify!(DeleteFile), - ), - ); -} -pub type FILE_DISPOSITION_INFORMATION = _FILE_DISPOSITION_INFORMATION; -pub type PFILE_DISPOSITION_INFORMATION = *mut _FILE_DISPOSITION_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_DISPOSITION_INFORMATION_EX { - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_DISPOSITION_INFORMATION_EX() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_DISPOSITION_INFORMATION_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_DISPOSITION_INFORMATION_EX>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_DISPOSITION_INFORMATION_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_DISPOSITION_INFORMATION_EX>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_DISPOSITION_INFORMATION_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DISPOSITION_INFORMATION_EX), - "::", - stringify!(Flags), - ), - ); -} -pub type FILE_DISPOSITION_INFORMATION_EX = _FILE_DISPOSITION_INFORMATION_EX; -pub type PFILE_DISPOSITION_INFORMATION_EX = *mut _FILE_DISPOSITION_INFORMATION_EX; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_END_OF_FILE_INFORMATION { - pub EndOfFile: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FILE_END_OF_FILE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_END_OF_FILE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_END_OF_FILE_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_END_OF_FILE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_END_OF_FILE_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_END_OF_FILE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_END_OF_FILE_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); -} -impl Default for _FILE_END_OF_FILE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_END_OF_FILE_INFORMATION = _FILE_END_OF_FILE_INFORMATION; -pub type PFILE_END_OF_FILE_INFORMATION = *mut _FILE_END_OF_FILE_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_VALID_DATA_LENGTH_INFORMATION { - pub ValidDataLength: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FILE_VALID_DATA_LENGTH_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_VALID_DATA_LENGTH_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_VALID_DATA_LENGTH_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_VALID_DATA_LENGTH_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_VALID_DATA_LENGTH_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_VALID_DATA_LENGTH_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidDataLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_VALID_DATA_LENGTH_INFORMATION), - "::", - stringify!(ValidDataLength), - ), - ); -} -impl Default for _FILE_VALID_DATA_LENGTH_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_VALID_DATA_LENGTH_INFORMATION = _FILE_VALID_DATA_LENGTH_INFORMATION; -pub type PFILE_VALID_DATA_LENGTH_INFORMATION = *mut _FILE_VALID_DATA_LENGTH_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_FS_LABEL_INFORMATION { - pub VolumeLabelLength: ULONG, - pub VolumeLabel: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_FS_LABEL_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_LABEL_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_LABEL_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_FS_LABEL_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_LABEL_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_FS_LABEL_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeLabelLength) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_LABEL_INFORMATION), - "::", - stringify!(VolumeLabelLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeLabel) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_LABEL_INFORMATION), - "::", - stringify!(VolumeLabel), - ), - ); -} -pub type FILE_FS_LABEL_INFORMATION = _FILE_FS_LABEL_INFORMATION; -pub type PFILE_FS_LABEL_INFORMATION = *mut _FILE_FS_LABEL_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_FS_VOLUME_INFORMATION { - pub VolumeCreationTime: LARGE_INTEGER, - pub VolumeSerialNumber: ULONG, - pub VolumeLabelLength: ULONG, - pub SupportsObjects: BOOLEAN, - pub VolumeLabel: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_FS_VOLUME_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_VOLUME_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_VOLUME_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_FS_VOLUME_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_VOLUME_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_FS_VOLUME_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeCreationTime) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_VOLUME_INFORMATION), - "::", - stringify!(VolumeCreationTime), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeSerialNumber) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_VOLUME_INFORMATION), - "::", - stringify!(VolumeSerialNumber), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeLabelLength) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_VOLUME_INFORMATION), - "::", - stringify!(VolumeLabelLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SupportsObjects) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_VOLUME_INFORMATION), - "::", - stringify!(SupportsObjects), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeLabel) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_VOLUME_INFORMATION), - "::", - stringify!(VolumeLabel), - ), - ); -} -impl Default for _FILE_FS_VOLUME_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_FS_VOLUME_INFORMATION = _FILE_FS_VOLUME_INFORMATION; -pub type PFILE_FS_VOLUME_INFORMATION = *mut _FILE_FS_VOLUME_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_FS_SIZE_INFORMATION { - pub TotalAllocationUnits: LARGE_INTEGER, - pub AvailableAllocationUnits: LARGE_INTEGER, - pub SectorsPerAllocationUnit: ULONG, - pub BytesPerSector: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_FS_SIZE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_SIZE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_SIZE_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_FS_SIZE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_SIZE_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_FS_SIZE_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalAllocationUnits) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_SIZE_INFORMATION), - "::", - stringify!(TotalAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AvailableAllocationUnits) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_SIZE_INFORMATION), - "::", - stringify!(AvailableAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SectorsPerAllocationUnit) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_SIZE_INFORMATION), - "::", - stringify!(SectorsPerAllocationUnit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesPerSector) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_SIZE_INFORMATION), - "::", - stringify!(BytesPerSector), - ), - ); -} -impl Default for _FILE_FS_SIZE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_FS_SIZE_INFORMATION = _FILE_FS_SIZE_INFORMATION; -pub type PFILE_FS_SIZE_INFORMATION = *mut _FILE_FS_SIZE_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_FS_FULL_SIZE_INFORMATION { - pub TotalAllocationUnits: LARGE_INTEGER, - pub CallerAvailableAllocationUnits: LARGE_INTEGER, - pub ActualAvailableAllocationUnits: LARGE_INTEGER, - pub SectorsPerAllocationUnit: ULONG, - pub BytesPerSector: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_FS_FULL_SIZE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_FULL_SIZE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_FULL_SIZE_INFORMATION>(), - 32usize, - concat!("Size of: ", stringify!(_FILE_FS_FULL_SIZE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_FULL_SIZE_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_FS_FULL_SIZE_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalAllocationUnits) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION), - "::", - stringify!(TotalAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CallerAvailableAllocationUnits) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION), - "::", - stringify!(CallerAvailableAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ActualAvailableAllocationUnits) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION), - "::", - stringify!(ActualAvailableAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SectorsPerAllocationUnit) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION), - "::", - stringify!(SectorsPerAllocationUnit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesPerSector) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION), - "::", - stringify!(BytesPerSector), - ), - ); -} -impl Default for _FILE_FS_FULL_SIZE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_FS_FULL_SIZE_INFORMATION = _FILE_FS_FULL_SIZE_INFORMATION; -pub type PFILE_FS_FULL_SIZE_INFORMATION = *mut _FILE_FS_FULL_SIZE_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_FS_FULL_SIZE_INFORMATION_EX { - pub ActualTotalAllocationUnits: ULONGLONG, - pub ActualAvailableAllocationUnits: ULONGLONG, - pub ActualPoolUnavailableAllocationUnits: ULONGLONG, - pub CallerTotalAllocationUnits: ULONGLONG, - pub CallerAvailableAllocationUnits: ULONGLONG, - pub CallerPoolUnavailableAllocationUnits: ULONGLONG, - pub UsedAllocationUnits: ULONGLONG, - pub TotalReservedAllocationUnits: ULONGLONG, - pub VolumeStorageReserveAllocationUnits: ULONGLONG, - pub AvailableCommittedAllocationUnits: ULONGLONG, - pub PoolAvailableAllocationUnits: ULONGLONG, - pub SectorsPerAllocationUnit: ULONG, - pub BytesPerSector: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_FS_FULL_SIZE_INFORMATION_EX() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_FULL_SIZE_INFORMATION_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_FULL_SIZE_INFORMATION_EX>(), - 96usize, - concat!("Size of: ", stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_FULL_SIZE_INFORMATION_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ActualTotalAllocationUnits) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX), - "::", - stringify!(ActualTotalAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ActualAvailableAllocationUnits) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX), - "::", - stringify!(ActualAvailableAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ActualPoolUnavailableAllocationUnits) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX), - "::", - stringify!(ActualPoolUnavailableAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CallerTotalAllocationUnits) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX), - "::", - stringify!(CallerTotalAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CallerAvailableAllocationUnits) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX), - "::", - stringify!(CallerAvailableAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CallerPoolUnavailableAllocationUnits) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX), - "::", - stringify!(CallerPoolUnavailableAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UsedAllocationUnits) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX), - "::", - stringify!(UsedAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalReservedAllocationUnits) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX), - "::", - stringify!(TotalReservedAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeStorageReserveAllocationUnits) as usize - - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX), - "::", - stringify!(VolumeStorageReserveAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AvailableCommittedAllocationUnits) as usize - - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX), - "::", - stringify!(AvailableCommittedAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PoolAvailableAllocationUnits) as usize - - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX), - "::", - stringify!(PoolAvailableAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SectorsPerAllocationUnit) as usize - - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX), - "::", - stringify!(SectorsPerAllocationUnit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesPerSector) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_FULL_SIZE_INFORMATION_EX), - "::", - stringify!(BytesPerSector), - ), - ); -} -pub type FILE_FS_FULL_SIZE_INFORMATION_EX = _FILE_FS_FULL_SIZE_INFORMATION_EX; -pub type PFILE_FS_FULL_SIZE_INFORMATION_EX = *mut _FILE_FS_FULL_SIZE_INFORMATION_EX; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_FS_METADATA_SIZE_INFORMATION { - pub TotalMetadataAllocationUnits: LARGE_INTEGER, - pub SectorsPerAllocationUnit: ULONG, - pub BytesPerSector: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_FS_METADATA_SIZE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_METADATA_SIZE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_METADATA_SIZE_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_FS_METADATA_SIZE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_METADATA_SIZE_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_FS_METADATA_SIZE_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalMetadataAllocationUnits) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_METADATA_SIZE_INFORMATION), - "::", - stringify!(TotalMetadataAllocationUnits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SectorsPerAllocationUnit) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_METADATA_SIZE_INFORMATION), - "::", - stringify!(SectorsPerAllocationUnit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesPerSector) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_METADATA_SIZE_INFORMATION), - "::", - stringify!(BytesPerSector), - ), - ); -} -impl Default for _FILE_FS_METADATA_SIZE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_FS_METADATA_SIZE_INFORMATION = _FILE_FS_METADATA_SIZE_INFORMATION; -pub type PFILE_FS_METADATA_SIZE_INFORMATION = *mut _FILE_FS_METADATA_SIZE_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_FS_SECTOR_SIZE_INFORMATION { - pub LogicalBytesPerSector: ULONG, - pub PhysicalBytesPerSectorForAtomicity: ULONG, - pub PhysicalBytesPerSectorForPerformance: ULONG, - pub FileSystemEffectivePhysicalBytesPerSectorForAtomicity: ULONG, - pub Flags: ULONG, - pub ByteOffsetForSectorAlignment: ULONG, - pub ByteOffsetForPartitionAlignment: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_FS_SECTOR_SIZE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_SECTOR_SIZE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_SECTOR_SIZE_INFORMATION>(), - 28usize, - concat!("Size of: ", stringify!(_FILE_FS_SECTOR_SIZE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_SECTOR_SIZE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_FS_SECTOR_SIZE_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogicalBytesPerSector) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_SECTOR_SIZE_INFORMATION), - "::", - stringify!(LogicalBytesPerSector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PhysicalBytesPerSectorForAtomicity) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_SECTOR_SIZE_INFORMATION), - "::", - stringify!(PhysicalBytesPerSectorForAtomicity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PhysicalBytesPerSectorForPerformance) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_SECTOR_SIZE_INFORMATION), - "::", - stringify!(PhysicalBytesPerSectorForPerformance), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!( - (*ptr).FileSystemEffectivePhysicalBytesPerSectorForAtomicity - ) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_SECTOR_SIZE_INFORMATION), - "::", - stringify!(FileSystemEffectivePhysicalBytesPerSectorForAtomicity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_SECTOR_SIZE_INFORMATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ByteOffsetForSectorAlignment) as usize - - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_SECTOR_SIZE_INFORMATION), - "::", - stringify!(ByteOffsetForSectorAlignment), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ByteOffsetForPartitionAlignment) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_SECTOR_SIZE_INFORMATION), - "::", - stringify!(ByteOffsetForPartitionAlignment), - ), - ); -} -pub type FILE_FS_SECTOR_SIZE_INFORMATION = _FILE_FS_SECTOR_SIZE_INFORMATION; -pub type PFILE_FS_SECTOR_SIZE_INFORMATION = *mut _FILE_FS_SECTOR_SIZE_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_FS_OBJECTID_INFORMATION { - pub ObjectId: [UCHAR; 16usize], - pub ExtendedInfo: [UCHAR; 48usize], -} -#[test] -fn bindgen_test_layout__FILE_FS_OBJECTID_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_OBJECTID_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_OBJECTID_INFORMATION>(), - 64usize, - concat!("Size of: ", stringify!(_FILE_FS_OBJECTID_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_OBJECTID_INFORMATION>(), - 1usize, - concat!("Alignment of ", stringify!(_FILE_FS_OBJECTID_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_OBJECTID_INFORMATION), - "::", - stringify!(ObjectId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtendedInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_OBJECTID_INFORMATION), - "::", - stringify!(ExtendedInfo), - ), - ); -} -impl Default for _FILE_FS_OBJECTID_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_FS_OBJECTID_INFORMATION = _FILE_FS_OBJECTID_INFORMATION; -pub type PFILE_FS_OBJECTID_INFORMATION = *mut _FILE_FS_OBJECTID_INFORMATION; -pub mod _BUS_DATA_TYPE { - pub type Type = ::core::ffi::c_int; - pub const ConfigurationSpaceUndefined: Type = -1; - pub const Cmos: Type = 0; - pub const EisaConfiguration: Type = 1; - pub const Pos: Type = 2; - pub const CbusConfiguration: Type = 3; - pub const PCIConfiguration: Type = 4; - pub const VMEConfiguration: Type = 5; - pub const NuBusConfiguration: Type = 6; - pub const PCMCIAConfiguration: Type = 7; - pub const MPIConfiguration: Type = 8; - pub const MPSAConfiguration: Type = 9; - pub const PNPISAConfiguration: Type = 10; - pub const SgiInternalConfiguration: Type = 11; - pub const MaximumBusDataType: Type = 12; -} -pub use self::_BUS_DATA_TYPE::Type as BUS_DATA_TYPE; -pub type PBUS_DATA_TYPE = *mut _BUS_DATA_TYPE::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KEY_NAME_INFORMATION { - pub NameLength: ULONG, - pub Name: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__KEY_NAME_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_KEY_NAME_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEY_NAME_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_KEY_NAME_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_NAME_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_KEY_NAME_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEY_NAME_INFORMATION), - "::", - stringify!(NameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_KEY_NAME_INFORMATION), - "::", - stringify!(Name), - ), - ); -} -pub type KEY_NAME_INFORMATION = _KEY_NAME_INFORMATION; -pub type PKEY_NAME_INFORMATION = *mut _KEY_NAME_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KEY_CACHED_INFORMATION { - pub LastWriteTime: LARGE_INTEGER, - pub TitleIndex: ULONG, - pub SubKeys: ULONG, - pub MaxNameLen: ULONG, - pub Values: ULONG, - pub MaxValueNameLen: ULONG, - pub MaxValueDataLen: ULONG, - pub NameLength: ULONG, -} -#[test] -fn bindgen_test_layout__KEY_CACHED_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_KEY_CACHED_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEY_CACHED_INFORMATION>(), - 40usize, - concat!("Size of: ", stringify!(_KEY_CACHED_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_CACHED_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_KEY_CACHED_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEY_CACHED_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TitleIndex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KEY_CACHED_INFORMATION), - "::", - stringify!(TitleIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubKeys) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KEY_CACHED_INFORMATION), - "::", - stringify!(SubKeys), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxNameLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KEY_CACHED_INFORMATION), - "::", - stringify!(MaxNameLen), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Values) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_KEY_CACHED_INFORMATION), - "::", - stringify!(Values), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxValueNameLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KEY_CACHED_INFORMATION), - "::", - stringify!(MaxValueNameLen), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxValueDataLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_KEY_CACHED_INFORMATION), - "::", - stringify!(MaxValueDataLen), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KEY_CACHED_INFORMATION), - "::", - stringify!(NameLength), - ), - ); -} -impl Default for _KEY_CACHED_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KEY_CACHED_INFORMATION = _KEY_CACHED_INFORMATION; -pub type PKEY_CACHED_INFORMATION = *mut _KEY_CACHED_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KEY_VIRTUALIZATION_INFORMATION { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__KEY_VIRTUALIZATION_INFORMATION() { - assert_eq!( - ::core::mem::size_of::<_KEY_VIRTUALIZATION_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_KEY_VIRTUALIZATION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_VIRTUALIZATION_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_KEY_VIRTUALIZATION_INFORMATION)), - ); -} -impl _KEY_VIRTUALIZATION_INFORMATION { - #[inline] - pub fn VirtualizationCandidate(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_VirtualizationCandidate(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn VirtualizationEnabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_VirtualizationEnabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn VirtualTarget(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_VirtualTarget(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn VirtualStore(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_VirtualStore(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn VirtualSource(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_VirtualSource(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - VirtualizationCandidate: ULONG, - VirtualizationEnabled: ULONG, - VirtualTarget: ULONG, - VirtualStore: ULONG, - VirtualSource: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let VirtualizationCandidate: u32 = unsafe { - ::core::mem::transmute(VirtualizationCandidate) - }; - VirtualizationCandidate as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let VirtualizationEnabled: u32 = unsafe { - ::core::mem::transmute(VirtualizationEnabled) - }; - VirtualizationEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let VirtualTarget: u32 = unsafe { - ::core::mem::transmute(VirtualTarget) - }; - VirtualTarget as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let VirtualStore: u32 = unsafe { - ::core::mem::transmute(VirtualStore) - }; - VirtualStore as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let VirtualSource: u32 = unsafe { - ::core::mem::transmute(VirtualSource) - }; - VirtualSource as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 27u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type KEY_VIRTUALIZATION_INFORMATION = _KEY_VIRTUALIZATION_INFORMATION; -pub type PKEY_VIRTUALIZATION_INFORMATION = *mut _KEY_VIRTUALIZATION_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KEY_LAYER_INFORMATION { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__KEY_LAYER_INFORMATION() { - assert_eq!( - ::core::mem::size_of::<_KEY_LAYER_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_KEY_LAYER_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_KEY_LAYER_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_KEY_LAYER_INFORMATION)), - ); -} -impl _KEY_LAYER_INFORMATION { - #[inline] - pub fn IsTombstone(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsTombstone(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn IsSupersedeLocal(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsSupersedeLocal(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn IsSupersedeTree(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsSupersedeTree(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ClassIsInherited(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_ClassIsInherited(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 28u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - IsTombstone: ULONG, - IsSupersedeLocal: ULONG, - IsSupersedeTree: ULONG, - ClassIsInherited: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let IsTombstone: u32 = unsafe { - ::core::mem::transmute(IsTombstone) - }; - IsTombstone as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let IsSupersedeLocal: u32 = unsafe { - ::core::mem::transmute(IsSupersedeLocal) - }; - IsSupersedeLocal as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let IsSupersedeTree: u32 = unsafe { - ::core::mem::transmute(IsSupersedeTree) - }; - IsSupersedeTree as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ClassIsInherited: u32 = unsafe { - ::core::mem::transmute(ClassIsInherited) - }; - ClassIsInherited as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 28u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type KEY_LAYER_INFORMATION = _KEY_LAYER_INFORMATION; -pub type PKEY_LAYER_INFORMATION = *mut _KEY_LAYER_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _EXCEPTION_REGISTRATION_RECORD { - pub Next: *mut _EXCEPTION_REGISTRATION_RECORD, - pub Handler: PEXCEPTION_ROUTINE, -} -#[test] -fn bindgen_test_layout__EXCEPTION_REGISTRATION_RECORD() { - const UNINIT: ::core::mem::MaybeUninit<_EXCEPTION_REGISTRATION_RECORD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EXCEPTION_REGISTRATION_RECORD>(), - 16usize, - concat!("Size of: ", stringify!(_EXCEPTION_REGISTRATION_RECORD)), - ); - assert_eq!( - ::core::mem::align_of::<_EXCEPTION_REGISTRATION_RECORD>(), - 8usize, - concat!("Alignment of ", stringify!(_EXCEPTION_REGISTRATION_RECORD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Next) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_REGISTRATION_RECORD), - "::", - stringify!(Next), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Handler) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EXCEPTION_REGISTRATION_RECORD), - "::", - stringify!(Handler), - ), - ); -} -impl Default for _EXCEPTION_REGISTRATION_RECORD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type EXCEPTION_REGISTRATION_RECORD = _EXCEPTION_REGISTRATION_RECORD; -pub type PEXCEPTION_REGISTRATION_RECORD = *mut EXCEPTION_REGISTRATION_RECORD; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _NT_TIB { - pub ExceptionList: *mut _EXCEPTION_REGISTRATION_RECORD, - pub StackBase: PVOID, - pub StackLimit: PVOID, - pub SubSystemTib: PVOID, - pub __bindgen_anon_1: _NT_TIB__bindgen_ty_1, - pub ArbitraryUserPointer: PVOID, - pub Self_: *mut _NT_TIB, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _NT_TIB__bindgen_ty_1 { - pub FiberData: PVOID, - pub Version: ULONG, -} -#[test] -fn bindgen_test_layout__NT_TIB__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_NT_TIB__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NT_TIB__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_NT_TIB__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_NT_TIB__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_NT_TIB__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FiberData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB__bindgen_ty_1), - "::", - stringify!(FiberData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB__bindgen_ty_1), - "::", - stringify!(Version), - ), - ); -} -impl Default for _NT_TIB__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__NT_TIB() { - const UNINIT: ::core::mem::MaybeUninit<_NT_TIB> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NT_TIB>(), - 56usize, - concat!("Size of: ", stringify!(_NT_TIB)), - ); - assert_eq!( - ::core::mem::align_of::<_NT_TIB>(), - 8usize, - concat!("Alignment of ", stringify!(_NT_TIB)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionList) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB), - "::", - stringify!(ExceptionList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StackBase) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_NT_TIB), "::", stringify!(StackBase)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StackLimit) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_NT_TIB), "::", stringify!(StackLimit)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubSystemTib) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_NT_TIB), "::", stringify!(SubSystemTib)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ArbitraryUserPointer) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB), - "::", - stringify!(ArbitraryUserPointer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Self_) as usize - ptr as usize }, - 48usize, - concat!("Offset of field: ", stringify!(_NT_TIB), "::", stringify!(Self_)), - ); -} -impl Default for _NT_TIB { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type NT_TIB = _NT_TIB; -pub type PNT_TIB = *mut NT_TIB; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _NT_TIB32 { - pub ExceptionList: ULONG, - pub StackBase: ULONG, - pub StackLimit: ULONG, - pub SubSystemTib: ULONG, - pub __bindgen_anon_1: _NT_TIB32__bindgen_ty_1, - pub ArbitraryUserPointer: ULONG, - pub Self_: ULONG, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _NT_TIB32__bindgen_ty_1 { - pub FiberData: ULONG, - pub Version: ULONG, -} -#[test] -fn bindgen_test_layout__NT_TIB32__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_NT_TIB32__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NT_TIB32__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_NT_TIB32__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_NT_TIB32__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_NT_TIB32__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FiberData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB32__bindgen_ty_1), - "::", - stringify!(FiberData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB32__bindgen_ty_1), - "::", - stringify!(Version), - ), - ); -} -impl Default for _NT_TIB32__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__NT_TIB32() { - const UNINIT: ::core::mem::MaybeUninit<_NT_TIB32> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NT_TIB32>(), - 28usize, - concat!("Size of: ", stringify!(_NT_TIB32)), - ); - assert_eq!( - ::core::mem::align_of::<_NT_TIB32>(), - 4usize, - concat!("Alignment of ", stringify!(_NT_TIB32)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionList) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB32), - "::", - stringify!(ExceptionList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StackBase) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_NT_TIB32), "::", stringify!(StackBase)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StackLimit) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_NT_TIB32), "::", stringify!(StackLimit)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubSystemTib) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB32), - "::", - stringify!(SubSystemTib), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ArbitraryUserPointer) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB32), - "::", - stringify!(ArbitraryUserPointer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Self_) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_NT_TIB32), "::", stringify!(Self_)), - ); -} -impl Default for _NT_TIB32 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type NT_TIB32 = _NT_TIB32; -pub type PNT_TIB32 = *mut _NT_TIB32; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _NT_TIB64 { - pub ExceptionList: ULONG64, - pub StackBase: ULONG64, - pub StackLimit: ULONG64, - pub SubSystemTib: ULONG64, - pub __bindgen_anon_1: _NT_TIB64__bindgen_ty_1, - pub ArbitraryUserPointer: ULONG64, - pub Self_: ULONG64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _NT_TIB64__bindgen_ty_1 { - pub FiberData: ULONG64, - pub Version: ULONG, -} -#[test] -fn bindgen_test_layout__NT_TIB64__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_NT_TIB64__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NT_TIB64__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_NT_TIB64__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_NT_TIB64__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_NT_TIB64__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FiberData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB64__bindgen_ty_1), - "::", - stringify!(FiberData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB64__bindgen_ty_1), - "::", - stringify!(Version), - ), - ); -} -impl Default for _NT_TIB64__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__NT_TIB64() { - const UNINIT: ::core::mem::MaybeUninit<_NT_TIB64> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NT_TIB64>(), - 56usize, - concat!("Size of: ", stringify!(_NT_TIB64)), - ); - assert_eq!( - ::core::mem::align_of::<_NT_TIB64>(), - 8usize, - concat!("Alignment of ", stringify!(_NT_TIB64)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionList) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB64), - "::", - stringify!(ExceptionList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StackBase) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_NT_TIB64), "::", stringify!(StackBase)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StackLimit) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_NT_TIB64), "::", stringify!(StackLimit)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubSystemTib) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB64), - "::", - stringify!(SubSystemTib), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ArbitraryUserPointer) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_NT_TIB64), - "::", - stringify!(ArbitraryUserPointer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Self_) as usize - ptr as usize }, - 48usize, - concat!("Offset of field: ", stringify!(_NT_TIB64), "::", stringify!(Self_)), - ); -} -impl Default for _NT_TIB64 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type NT_TIB64 = _NT_TIB64; -pub type PNT_TIB64 = *mut _NT_TIB64; -pub mod _PROCESSINFOCLASS { - pub type Type = ::core::ffi::c_int; - pub const ProcessBasicInformation: Type = 0; - pub const ProcessQuotaLimits: Type = 1; - pub const ProcessIoCounters: Type = 2; - pub const ProcessVmCounters: Type = 3; - pub const ProcessTimes: Type = 4; - pub const ProcessBasePriority: Type = 5; - pub const ProcessRaisePriority: Type = 6; - pub const ProcessDebugPort: Type = 7; - pub const ProcessExceptionPort: Type = 8; - pub const ProcessAccessToken: Type = 9; - pub const ProcessLdtInformation: Type = 10; - pub const ProcessLdtSize: Type = 11; - pub const ProcessDefaultHardErrorMode: Type = 12; - pub const ProcessIoPortHandlers: Type = 13; - pub const ProcessPooledUsageAndLimits: Type = 14; - pub const ProcessWorkingSetWatch: Type = 15; - pub const ProcessUserModeIOPL: Type = 16; - pub const ProcessEnableAlignmentFaultFixup: Type = 17; - pub const ProcessPriorityClass: Type = 18; - pub const ProcessWx86Information: Type = 19; - pub const ProcessHandleCount: Type = 20; - pub const ProcessAffinityMask: Type = 21; - pub const ProcessPriorityBoost: Type = 22; - pub const ProcessDeviceMap: Type = 23; - pub const ProcessSessionInformation: Type = 24; - pub const ProcessForegroundInformation: Type = 25; - pub const ProcessWow64Information: Type = 26; - pub const ProcessImageFileName: Type = 27; - pub const ProcessLUIDDeviceMapsEnabled: Type = 28; - pub const ProcessBreakOnTermination: Type = 29; - pub const ProcessDebugObjectHandle: Type = 30; - pub const ProcessDebugFlags: Type = 31; - pub const ProcessHandleTracing: Type = 32; - pub const ProcessIoPriority: Type = 33; - pub const ProcessExecuteFlags: Type = 34; - pub const ProcessTlsInformation: Type = 35; - pub const ProcessCookie: Type = 36; - pub const ProcessImageInformation: Type = 37; - pub const ProcessCycleTime: Type = 38; - pub const ProcessPagePriority: Type = 39; - pub const ProcessInstrumentationCallback: Type = 40; - pub const ProcessThreadStackAllocation: Type = 41; - pub const ProcessWorkingSetWatchEx: Type = 42; - pub const ProcessImageFileNameWin32: Type = 43; - pub const ProcessImageFileMapping: Type = 44; - pub const ProcessAffinityUpdateMode: Type = 45; - pub const ProcessMemoryAllocationMode: Type = 46; - pub const ProcessGroupInformation: Type = 47; - pub const ProcessTokenVirtualizationEnabled: Type = 48; - pub const ProcessOwnerInformation: Type = 49; - pub const ProcessWindowInformation: Type = 50; - pub const ProcessHandleInformation: Type = 51; - pub const ProcessMitigationPolicy: Type = 52; - pub const ProcessDynamicFunctionTableInformation: Type = 53; - pub const ProcessHandleCheckingMode: Type = 54; - pub const ProcessKeepAliveCount: Type = 55; - pub const ProcessRevokeFileHandles: Type = 56; - pub const ProcessWorkingSetControl: Type = 57; - pub const ProcessHandleTable: Type = 58; - pub const ProcessCheckStackExtentsMode: Type = 59; - pub const ProcessCommandLineInformation: Type = 60; - pub const ProcessProtectionInformation: Type = 61; - pub const ProcessMemoryExhaustion: Type = 62; - pub const ProcessFaultInformation: Type = 63; - pub const ProcessTelemetryIdInformation: Type = 64; - pub const ProcessCommitReleaseInformation: Type = 65; - pub const ProcessReserved1Information: Type = 66; - pub const ProcessReserved2Information: Type = 67; - pub const ProcessSubsystemProcess: Type = 68; - pub const ProcessInPrivate: Type = 70; - pub const ProcessRaiseUMExceptionOnInvalidHandleClose: Type = 71; - pub const ProcessSubsystemInformation: Type = 75; - pub const ProcessWin32kSyscallFilterInformation: Type = 79; - pub const ProcessEnergyTrackingState: Type = 82; - pub const MaxProcessInfoClass: Type = 83; -} -pub use self::_PROCESSINFOCLASS::Type as PROCESSINFOCLASS; -pub mod _THREADINFOCLASS { - pub type Type = ::core::ffi::c_int; - pub const ThreadBasicInformation: Type = 0; - pub const ThreadTimes: Type = 1; - pub const ThreadPriority: Type = 2; - pub const ThreadBasePriority: Type = 3; - pub const ThreadAffinityMask: Type = 4; - pub const ThreadImpersonationToken: Type = 5; - pub const ThreadDescriptorTableEntry: Type = 6; - pub const ThreadEnableAlignmentFaultFixup: Type = 7; - pub const ThreadEventPair_Reusable: Type = 8; - pub const ThreadQuerySetWin32StartAddress: Type = 9; - pub const ThreadZeroTlsCell: Type = 10; - pub const ThreadPerformanceCount: Type = 11; - pub const ThreadAmILastThread: Type = 12; - pub const ThreadIdealProcessor: Type = 13; - pub const ThreadPriorityBoost: Type = 14; - pub const ThreadSetTlsArrayAddress: Type = 15; - pub const ThreadIsIoPending: Type = 16; - pub const ThreadHideFromDebugger: Type = 17; - pub const ThreadBreakOnTermination: Type = 18; - pub const ThreadSwitchLegacyState: Type = 19; - pub const ThreadIsTerminated: Type = 20; - pub const ThreadLastSystemCall: Type = 21; - pub const ThreadIoPriority: Type = 22; - pub const ThreadCycleTime: Type = 23; - pub const ThreadPagePriority: Type = 24; - pub const ThreadActualBasePriority: Type = 25; - pub const ThreadTebInformation: Type = 26; - pub const ThreadCSwitchMon: Type = 27; - pub const ThreadCSwitchPmu: Type = 28; - pub const ThreadWow64Context: Type = 29; - pub const ThreadGroupInformation: Type = 30; - pub const ThreadUmsInformation: Type = 31; - pub const ThreadCounterProfiling: Type = 32; - pub const ThreadIdealProcessorEx: Type = 33; - pub const ThreadCpuAccountingInformation: Type = 34; - pub const ThreadSuspendCount: Type = 35; - pub const ThreadActualGroupAffinity: Type = 41; - pub const ThreadDynamicCodePolicyInfo: Type = 42; - pub const ThreadSubsystemInformation: Type = 45; - pub const MaxThreadInfoClass: Type = 56; -} -pub use self::_THREADINFOCLASS::Type as THREADINFOCLASS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PAGE_PRIORITY_INFORMATION { - pub PagePriority: ULONG, -} -#[test] -fn bindgen_test_layout__PAGE_PRIORITY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PAGE_PRIORITY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PAGE_PRIORITY_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_PAGE_PRIORITY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PAGE_PRIORITY_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_PAGE_PRIORITY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PagePriority) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PAGE_PRIORITY_INFORMATION), - "::", - stringify!(PagePriority), - ), - ); -} -pub type PAGE_PRIORITY_INFORMATION = _PAGE_PRIORITY_INFORMATION; -pub type PPAGE_PRIORITY_INFORMATION = *mut _PAGE_PRIORITY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PROCESS_WS_WATCH_INFORMATION { - pub FaultingPc: PVOID, - pub FaultingVa: PVOID, -} -#[test] -fn bindgen_test_layout__PROCESS_WS_WATCH_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_WS_WATCH_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_WS_WATCH_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_PROCESS_WS_WATCH_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_WS_WATCH_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESS_WS_WATCH_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FaultingPc) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_WS_WATCH_INFORMATION), - "::", - stringify!(FaultingPc), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FaultingVa) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_WS_WATCH_INFORMATION), - "::", - stringify!(FaultingVa), - ), - ); -} -impl Default for _PROCESS_WS_WATCH_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_WS_WATCH_INFORMATION = _PROCESS_WS_WATCH_INFORMATION; -pub type PPROCESS_WS_WATCH_INFORMATION = *mut _PROCESS_WS_WATCH_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PROCESS_BASIC_INFORMATION { - pub ExitStatus: NTSTATUS, - pub PebBaseAddress: PPEB, - pub AffinityMask: ULONG_PTR, - pub BasePriority: KPRIORITY, - pub UniqueProcessId: ULONG_PTR, - pub InheritedFromUniqueProcessId: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__PROCESS_BASIC_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_BASIC_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_BASIC_INFORMATION>(), - 48usize, - concat!("Size of: ", stringify!(_PROCESS_BASIC_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_BASIC_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESS_BASIC_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExitStatus) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_BASIC_INFORMATION), - "::", - stringify!(ExitStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PebBaseAddress) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_BASIC_INFORMATION), - "::", - stringify!(PebBaseAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AffinityMask) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_BASIC_INFORMATION), - "::", - stringify!(AffinityMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BasePriority) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_BASIC_INFORMATION), - "::", - stringify!(BasePriority), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UniqueProcessId) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_BASIC_INFORMATION), - "::", - stringify!(UniqueProcessId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InheritedFromUniqueProcessId) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_BASIC_INFORMATION), - "::", - stringify!(InheritedFromUniqueProcessId), - ), - ); -} -impl Default for _PROCESS_BASIC_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_BASIC_INFORMATION = _PROCESS_BASIC_INFORMATION; -pub type PPROCESS_BASIC_INFORMATION = *mut _PROCESS_BASIC_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_EXTENDED_BASIC_INFORMATION { - pub Size: SIZE_T, - pub BasicInfo: PROCESS_BASIC_INFORMATION, - pub __bindgen_anon_1: _PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn IsProtectedProcess(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsProtectedProcess(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn IsWow64Process(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsWow64Process(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn IsProcessDeleting(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsProcessDeleting(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn IsCrossSessionCreate(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsCrossSessionCreate(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn IsFrozen(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsFrozen(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn IsBackground(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsBackground(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn IsStronglyNamed(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsStronglyNamed(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn IsSecureProcess(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsSecureProcess(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn IsSubsystemProcess(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsSubsystemProcess(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn SpareBits(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 23u8) as u32) } - } - #[inline] - pub fn set_SpareBits(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 23u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - IsProtectedProcess: ULONG, - IsWow64Process: ULONG, - IsProcessDeleting: ULONG, - IsCrossSessionCreate: ULONG, - IsFrozen: ULONG, - IsBackground: ULONG, - IsStronglyNamed: ULONG, - IsSecureProcess: ULONG, - IsSubsystemProcess: ULONG, - SpareBits: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let IsProtectedProcess: u32 = unsafe { - ::core::mem::transmute(IsProtectedProcess) - }; - IsProtectedProcess as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let IsWow64Process: u32 = unsafe { - ::core::mem::transmute(IsWow64Process) - }; - IsWow64Process as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let IsProcessDeleting: u32 = unsafe { - ::core::mem::transmute(IsProcessDeleting) - }; - IsProcessDeleting as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let IsCrossSessionCreate: u32 = unsafe { - ::core::mem::transmute(IsCrossSessionCreate) - }; - IsCrossSessionCreate as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let IsFrozen: u32 = unsafe { ::core::mem::transmute(IsFrozen) }; - IsFrozen as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let IsBackground: u32 = unsafe { - ::core::mem::transmute(IsBackground) - }; - IsBackground as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let IsStronglyNamed: u32 = unsafe { - ::core::mem::transmute(IsStronglyNamed) - }; - IsStronglyNamed as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let IsSecureProcess: u32 = unsafe { - ::core::mem::transmute(IsSecureProcess) - }; - IsSecureProcess as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let IsSubsystemProcess: u32 = unsafe { - ::core::mem::transmute(IsSubsystemProcess) - }; - IsSubsystemProcess as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 23u8, - { - let SpareBits: u32 = unsafe { ::core::mem::transmute(SpareBits) }; - SpareBits as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_EXTENDED_BASIC_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_EXTENDED_BASIC_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_EXTENDED_BASIC_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_EXTENDED_BASIC_INFORMATION>(), - 64usize, - concat!("Size of: ", stringify!(_PROCESS_EXTENDED_BASIC_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_EXTENDED_BASIC_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESS_EXTENDED_BASIC_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_EXTENDED_BASIC_INFORMATION), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BasicInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_EXTENDED_BASIC_INFORMATION), - "::", - stringify!(BasicInfo), - ), - ); -} -impl Default for _PROCESS_EXTENDED_BASIC_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_EXTENDED_BASIC_INFORMATION = _PROCESS_EXTENDED_BASIC_INFORMATION; -pub type PPROCESS_EXTENDED_BASIC_INFORMATION = *mut _PROCESS_EXTENDED_BASIC_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MEMBERSHIP_INFORMATION { - pub ServerSiloId: ULONG, -} -#[test] -fn bindgen_test_layout__PROCESS_MEMBERSHIP_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_MEMBERSHIP_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_MEMBERSHIP_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MEMBERSHIP_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MEMBERSHIP_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_MEMBERSHIP_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ServerSiloId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MEMBERSHIP_INFORMATION), - "::", - stringify!(ServerSiloId), - ), - ); -} -pub type PROCESS_MEMBERSHIP_INFORMATION = _PROCESS_MEMBERSHIP_INFORMATION; -pub type PPROCESS_MEMBERSHIP_INFORMATION = *mut _PROCESS_MEMBERSHIP_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_DEVICEMAP_INFORMATION { - pub __bindgen_anon_1: _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1 { - pub Set: _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_1, - pub Query: _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - pub DirectoryHandle: HANDLE, -} -#[test] -fn bindgen_test_layout__PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DirectoryHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(DirectoryHandle), - ), - ); -} -impl Default for _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_2 { - pub DriveMap: ULONG, - pub DriveType: [UCHAR; 32usize], -} -#[test] -fn bindgen_test_layout__PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_2, - >(), - 36usize, - concat!( - "Size of: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriveMap) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(DriveMap), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriveType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(DriveType), - ), - ); -} -#[test] -fn bindgen_test_layout__PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1>(), - 40usize, - concat!("Size of: ", stringify!(_PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Set) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1), - "::", - stringify!(Set), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Query) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1), - "::", - stringify!(Query), - ), - ); -} -impl Default for _PROCESS_DEVICEMAP_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_DEVICEMAP_INFORMATION() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_DEVICEMAP_INFORMATION>(), - 40usize, - concat!("Size of: ", stringify!(_PROCESS_DEVICEMAP_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_DEVICEMAP_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESS_DEVICEMAP_INFORMATION)), - ); -} -impl Default for _PROCESS_DEVICEMAP_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_DEVICEMAP_INFORMATION = _PROCESS_DEVICEMAP_INFORMATION; -pub type PPROCESS_DEVICEMAP_INFORMATION = *mut _PROCESS_DEVICEMAP_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_DEVICEMAP_INFORMATION_EX { - pub __bindgen_anon_1: _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1, - pub Flags: ULONG, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1 { - pub Set: _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_1, - pub Query: _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_1 { - pub DirectoryHandle: HANDLE, -} -#[test] -fn bindgen_test_layout__PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DirectoryHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(DirectoryHandle), - ), - ); -} -impl Default for _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_2 { - pub DriveMap: ULONG, - pub DriveType: [UCHAR; 32usize], -} -#[test] -fn bindgen_test_layout__PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_2, - >(), - 36usize, - concat!( - "Size of: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriveMap) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(DriveMap), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriveType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(DriveType), - ), - ); -} -#[test] -fn bindgen_test_layout__PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1>(), - 40usize, - concat!("Size of: ", stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Set) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1), - "::", - stringify!(Set), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Query) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1), - "::", - stringify!(Query), - ), - ); -} -impl Default for _PROCESS_DEVICEMAP_INFORMATION_EX__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_DEVICEMAP_INFORMATION_EX() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_DEVICEMAP_INFORMATION_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_DEVICEMAP_INFORMATION_EX>(), - 48usize, - concat!("Size of: ", stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_DEVICEMAP_INFORMATION_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DEVICEMAP_INFORMATION_EX), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_DEVICEMAP_INFORMATION_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_DEVICEMAP_INFORMATION_EX = _PROCESS_DEVICEMAP_INFORMATION_EX; -pub type PPROCESS_DEVICEMAP_INFORMATION_EX = *mut _PROCESS_DEVICEMAP_INFORMATION_EX; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_SESSION_INFORMATION { - pub SessionId: ULONG, -} -#[test] -fn bindgen_test_layout__PROCESS_SESSION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_SESSION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_SESSION_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_SESSION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_SESSION_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_SESSION_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SessionId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_SESSION_INFORMATION), - "::", - stringify!(SessionId), - ), - ); -} -pub type PROCESS_SESSION_INFORMATION = _PROCESS_SESSION_INFORMATION; -pub type PPROCESS_SESSION_INFORMATION = *mut _PROCESS_SESSION_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_HANDLE_TRACING_ENABLE { - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__PROCESS_HANDLE_TRACING_ENABLE() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_HANDLE_TRACING_ENABLE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_HANDLE_TRACING_ENABLE>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_HANDLE_TRACING_ENABLE)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_HANDLE_TRACING_ENABLE>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_HANDLE_TRACING_ENABLE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_HANDLE_TRACING_ENABLE), - "::", - stringify!(Flags), - ), - ); -} -pub type PROCESS_HANDLE_TRACING_ENABLE = _PROCESS_HANDLE_TRACING_ENABLE; -pub type PPROCESS_HANDLE_TRACING_ENABLE = *mut _PROCESS_HANDLE_TRACING_ENABLE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_HANDLE_TRACING_ENABLE_EX { - pub Flags: ULONG, - pub TotalSlots: ULONG, -} -#[test] -fn bindgen_test_layout__PROCESS_HANDLE_TRACING_ENABLE_EX() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_HANDLE_TRACING_ENABLE_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_HANDLE_TRACING_ENABLE_EX>(), - 8usize, - concat!("Size of: ", stringify!(_PROCESS_HANDLE_TRACING_ENABLE_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_HANDLE_TRACING_ENABLE_EX>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_HANDLE_TRACING_ENABLE_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_HANDLE_TRACING_ENABLE_EX), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalSlots) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_HANDLE_TRACING_ENABLE_EX), - "::", - stringify!(TotalSlots), - ), - ); -} -pub type PROCESS_HANDLE_TRACING_ENABLE_EX = _PROCESS_HANDLE_TRACING_ENABLE_EX; -pub type PPROCESS_HANDLE_TRACING_ENABLE_EX = *mut _PROCESS_HANDLE_TRACING_ENABLE_EX; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PROCESS_HANDLE_TRACING_ENTRY { - pub Handle: HANDLE, - pub ClientId: CLIENT_ID, - pub Type: ULONG, - pub Stacks: [PVOID; 16usize], -} -#[test] -fn bindgen_test_layout__PROCESS_HANDLE_TRACING_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_HANDLE_TRACING_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_HANDLE_TRACING_ENTRY>(), - 160usize, - concat!("Size of: ", stringify!(_PROCESS_HANDLE_TRACING_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_HANDLE_TRACING_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESS_HANDLE_TRACING_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Handle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_HANDLE_TRACING_ENTRY), - "::", - stringify!(Handle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClientId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_HANDLE_TRACING_ENTRY), - "::", - stringify!(ClientId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_HANDLE_TRACING_ENTRY), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Stacks) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_HANDLE_TRACING_ENTRY), - "::", - stringify!(Stacks), - ), - ); -} -impl Default for _PROCESS_HANDLE_TRACING_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_HANDLE_TRACING_ENTRY = _PROCESS_HANDLE_TRACING_ENTRY; -pub type PPROCESS_HANDLE_TRACING_ENTRY = *mut _PROCESS_HANDLE_TRACING_ENTRY; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PROCESS_HANDLE_TRACING_QUERY { - pub Handle: HANDLE, - pub TotalTraces: ULONG, - pub HandleTrace: [PROCESS_HANDLE_TRACING_ENTRY; 1usize], -} -#[test] -fn bindgen_test_layout__PROCESS_HANDLE_TRACING_QUERY() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_HANDLE_TRACING_QUERY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_HANDLE_TRACING_QUERY>(), - 176usize, - concat!("Size of: ", stringify!(_PROCESS_HANDLE_TRACING_QUERY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_HANDLE_TRACING_QUERY>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESS_HANDLE_TRACING_QUERY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Handle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_HANDLE_TRACING_QUERY), - "::", - stringify!(Handle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalTraces) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_HANDLE_TRACING_QUERY), - "::", - stringify!(TotalTraces), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HandleTrace) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_HANDLE_TRACING_QUERY), - "::", - stringify!(HandleTrace), - ), - ); -} -impl Default for _PROCESS_HANDLE_TRACING_QUERY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_HANDLE_TRACING_QUERY = _PROCESS_HANDLE_TRACING_QUERY; -pub type PPROCESS_HANDLE_TRACING_QUERY = *mut _PROCESS_HANDLE_TRACING_QUERY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_DYNAMIC_EH_CONTINUATION_TARGET { - pub TargetAddress: ULONG_PTR, - pub Flags: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__PROCESS_DYNAMIC_EH_CONTINUATION_TARGET() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_DYNAMIC_EH_CONTINUATION_TARGET> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_DYNAMIC_EH_CONTINUATION_TARGET>(), - 16usize, - concat!("Size of: ", stringify!(_PROCESS_DYNAMIC_EH_CONTINUATION_TARGET)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_DYNAMIC_EH_CONTINUATION_TARGET>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESS_DYNAMIC_EH_CONTINUATION_TARGET)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TargetAddress) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DYNAMIC_EH_CONTINUATION_TARGET), - "::", - stringify!(TargetAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DYNAMIC_EH_CONTINUATION_TARGET), - "::", - stringify!(Flags), - ), - ); -} -pub type PROCESS_DYNAMIC_EH_CONTINUATION_TARGET = _PROCESS_DYNAMIC_EH_CONTINUATION_TARGET; -pub type PPROCESS_DYNAMIC_EH_CONTINUATION_TARGET = *mut _PROCESS_DYNAMIC_EH_CONTINUATION_TARGET; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION { - pub NumberOfTargets: USHORT, - pub Reserved: USHORT, - pub Reserved2: ULONG, - pub Targets: PPROCESS_DYNAMIC_EH_CONTINUATION_TARGET, -} -#[test] -fn bindgen_test_layout__PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION>(), - 16usize, - concat!( - "Size of: ", - stringify!(_PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfTargets) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION), - "::", - stringify!(NumberOfTargets), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Targets) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION), - "::", - stringify!(Targets), - ), - ); -} -impl Default for _PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION = _PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION; -pub type PPROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION = *mut _PROCESS_DYNAMIC_EH_CONTINUATION_TARGETS_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE { - pub BaseAddress: ULONG_PTR, - pub Size: SIZE_T, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE>(), - 24usize, - concat!("Size of: ", stringify!(_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseAddress) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE), - "::", - stringify!(BaseAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE), - "::", - stringify!(Flags), - ), - ); -} -pub type PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE = _PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE; -pub type PPROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE = *mut _PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION { - pub NumberOfRanges: USHORT, - pub Reserved: USHORT, - pub Reserved2: ULONG, - pub Ranges: PPROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE, -} -#[test] -fn bindgen_test_layout__PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION>(), - 16usize, - concat!( - "Size of: ", - stringify!(_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfRanges) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION), - "::", - stringify!(NumberOfRanges), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ranges) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION), - "::", - stringify!(Ranges), - ), - ); -} -impl Default for _PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION = _PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION; -pub type PPROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION = *mut _PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGES_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _QUOTA_LIMITS { - pub PagedPoolLimit: SIZE_T, - pub NonPagedPoolLimit: SIZE_T, - pub MinimumWorkingSetSize: SIZE_T, - pub MaximumWorkingSetSize: SIZE_T, - pub PagefileLimit: SIZE_T, - pub TimeLimit: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__QUOTA_LIMITS() { - const UNINIT: ::core::mem::MaybeUninit<_QUOTA_LIMITS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUOTA_LIMITS>(), - 48usize, - concat!("Size of: ", stringify!(_QUOTA_LIMITS)), - ); - assert_eq!( - ::core::mem::align_of::<_QUOTA_LIMITS>(), - 8usize, - concat!("Alignment of ", stringify!(_QUOTA_LIMITS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PagedPoolLimit) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS), - "::", - stringify!(PagedPoolLimit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NonPagedPoolLimit) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS), - "::", - stringify!(NonPagedPoolLimit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MinimumWorkingSetSize) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS), - "::", - stringify!(MinimumWorkingSetSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumWorkingSetSize) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS), - "::", - stringify!(MaximumWorkingSetSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PagefileLimit) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS), - "::", - stringify!(PagefileLimit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimeLimit) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS), - "::", - stringify!(TimeLimit), - ), - ); -} -impl Default for _QUOTA_LIMITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type QUOTA_LIMITS = _QUOTA_LIMITS; -pub type PQUOTA_LIMITS = *mut _QUOTA_LIMITS; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _RATE_QUOTA_LIMIT { - pub RateData: ULONG, - pub __bindgen_anon_1: _RATE_QUOTA_LIMIT__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _RATE_QUOTA_LIMIT__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__RATE_QUOTA_LIMIT__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_RATE_QUOTA_LIMIT__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_RATE_QUOTA_LIMIT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_RATE_QUOTA_LIMIT__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_RATE_QUOTA_LIMIT__bindgen_ty_1)), - ); -} -impl _RATE_QUOTA_LIMIT__bindgen_ty_1 { - #[inline] - pub fn RatePercent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 7u8) as u32) } - } - #[inline] - pub fn set_RatePercent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 7u8, val as u64) - } - } - #[inline] - pub fn Reserved0(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 25u8) as u32) } - } - #[inline] - pub fn set_Reserved0(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 25u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - RatePercent: ULONG, - Reserved0: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 7u8, - { - let RatePercent: u32 = unsafe { - ::core::mem::transmute(RatePercent) - }; - RatePercent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 25u8, - { - let Reserved0: u32 = unsafe { ::core::mem::transmute(Reserved0) }; - Reserved0 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__RATE_QUOTA_LIMIT() { - const UNINIT: ::core::mem::MaybeUninit<_RATE_QUOTA_LIMIT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RATE_QUOTA_LIMIT>(), - 4usize, - concat!("Size of: ", stringify!(_RATE_QUOTA_LIMIT)), - ); - assert_eq!( - ::core::mem::align_of::<_RATE_QUOTA_LIMIT>(), - 4usize, - concat!("Alignment of ", stringify!(_RATE_QUOTA_LIMIT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RateData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RATE_QUOTA_LIMIT), - "::", - stringify!(RateData), - ), - ); -} -impl Default for _RATE_QUOTA_LIMIT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RATE_QUOTA_LIMIT = _RATE_QUOTA_LIMIT; -pub type PRATE_QUOTA_LIMIT = *mut _RATE_QUOTA_LIMIT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _QUOTA_LIMITS_EX { - pub PagedPoolLimit: SIZE_T, - pub NonPagedPoolLimit: SIZE_T, - pub MinimumWorkingSetSize: SIZE_T, - pub MaximumWorkingSetSize: SIZE_T, - pub PagefileLimit: SIZE_T, - pub TimeLimit: LARGE_INTEGER, - pub WorkingSetLimit: SIZE_T, - pub Reserved2: SIZE_T, - pub Reserved3: SIZE_T, - pub Reserved4: SIZE_T, - pub Flags: ULONG, - pub CpuRateLimit: RATE_QUOTA_LIMIT, -} -#[test] -fn bindgen_test_layout__QUOTA_LIMITS_EX() { - const UNINIT: ::core::mem::MaybeUninit<_QUOTA_LIMITS_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUOTA_LIMITS_EX>(), - 88usize, - concat!("Size of: ", stringify!(_QUOTA_LIMITS_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_QUOTA_LIMITS_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_QUOTA_LIMITS_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PagedPoolLimit) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS_EX), - "::", - stringify!(PagedPoolLimit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NonPagedPoolLimit) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS_EX), - "::", - stringify!(NonPagedPoolLimit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MinimumWorkingSetSize) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS_EX), - "::", - stringify!(MinimumWorkingSetSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumWorkingSetSize) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS_EX), - "::", - stringify!(MaximumWorkingSetSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PagefileLimit) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS_EX), - "::", - stringify!(PagefileLimit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimeLimit) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS_EX), - "::", - stringify!(TimeLimit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WorkingSetLimit) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS_EX), - "::", - stringify!(WorkingSetLimit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS_EX), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved3) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS_EX), - "::", - stringify!(Reserved3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved4) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS_EX), - "::", - stringify!(Reserved4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS_EX), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CpuRateLimit) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(_QUOTA_LIMITS_EX), - "::", - stringify!(CpuRateLimit), - ), - ); -} -impl Default for _QUOTA_LIMITS_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type QUOTA_LIMITS_EX = _QUOTA_LIMITS_EX; -pub type PQUOTA_LIMITS_EX = *mut _QUOTA_LIMITS_EX; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_COUNTERS { - pub ReadOperationCount: ULONGLONG, - pub WriteOperationCount: ULONGLONG, - pub OtherOperationCount: ULONGLONG, - pub ReadTransferCount: ULONGLONG, - pub WriteTransferCount: ULONGLONG, - pub OtherTransferCount: ULONGLONG, -} -#[test] -fn bindgen_test_layout__IO_COUNTERS() { - const UNINIT: ::core::mem::MaybeUninit<_IO_COUNTERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_COUNTERS>(), - 48usize, - concat!("Size of: ", stringify!(_IO_COUNTERS)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_COUNTERS>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_COUNTERS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadOperationCount) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_COUNTERS), - "::", - stringify!(ReadOperationCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WriteOperationCount) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_COUNTERS), - "::", - stringify!(WriteOperationCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OtherOperationCount) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_COUNTERS), - "::", - stringify!(OtherOperationCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadTransferCount) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_COUNTERS), - "::", - stringify!(ReadTransferCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WriteTransferCount) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_COUNTERS), - "::", - stringify!(WriteTransferCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OtherTransferCount) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_COUNTERS), - "::", - stringify!(OtherTransferCount), - ), - ); -} -pub type IO_COUNTERS = _IO_COUNTERS; -pub type PIO_COUNTERS = *mut IO_COUNTERS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VM_COUNTERS { - pub PeakVirtualSize: SIZE_T, - pub VirtualSize: SIZE_T, - pub PageFaultCount: ULONG, - pub PeakWorkingSetSize: SIZE_T, - pub WorkingSetSize: SIZE_T, - pub QuotaPeakPagedPoolUsage: SIZE_T, - pub QuotaPagedPoolUsage: SIZE_T, - pub QuotaPeakNonPagedPoolUsage: SIZE_T, - pub QuotaNonPagedPoolUsage: SIZE_T, - pub PagefileUsage: SIZE_T, - pub PeakPagefileUsage: SIZE_T, -} -#[test] -fn bindgen_test_layout__VM_COUNTERS() { - const UNINIT: ::core::mem::MaybeUninit<_VM_COUNTERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VM_COUNTERS>(), - 88usize, - concat!("Size of: ", stringify!(_VM_COUNTERS)), - ); - assert_eq!( - ::core::mem::align_of::<_VM_COUNTERS>(), - 8usize, - concat!("Alignment of ", stringify!(_VM_COUNTERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PeakVirtualSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS), - "::", - stringify!(PeakVirtualSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VirtualSize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS), - "::", - stringify!(VirtualSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PageFaultCount) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS), - "::", - stringify!(PageFaultCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PeakWorkingSetSize) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS), - "::", - stringify!(PeakWorkingSetSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WorkingSetSize) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS), - "::", - stringify!(WorkingSetSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QuotaPeakPagedPoolUsage) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS), - "::", - stringify!(QuotaPeakPagedPoolUsage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QuotaPagedPoolUsage) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS), - "::", - stringify!(QuotaPagedPoolUsage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QuotaPeakNonPagedPoolUsage) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS), - "::", - stringify!(QuotaPeakNonPagedPoolUsage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QuotaNonPagedPoolUsage) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS), - "::", - stringify!(QuotaNonPagedPoolUsage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PagefileUsage) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS), - "::", - stringify!(PagefileUsage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PeakPagefileUsage) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS), - "::", - stringify!(PeakPagefileUsage), - ), - ); -} -pub type VM_COUNTERS = _VM_COUNTERS; -pub type PVM_COUNTERS = *mut VM_COUNTERS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VM_COUNTERS_EX { - pub PeakVirtualSize: SIZE_T, - pub VirtualSize: SIZE_T, - pub PageFaultCount: ULONG, - pub PeakWorkingSetSize: SIZE_T, - pub WorkingSetSize: SIZE_T, - pub QuotaPeakPagedPoolUsage: SIZE_T, - pub QuotaPagedPoolUsage: SIZE_T, - pub QuotaPeakNonPagedPoolUsage: SIZE_T, - pub QuotaNonPagedPoolUsage: SIZE_T, - pub PagefileUsage: SIZE_T, - pub PeakPagefileUsage: SIZE_T, - pub PrivateUsage: SIZE_T, -} -#[test] -fn bindgen_test_layout__VM_COUNTERS_EX() { - const UNINIT: ::core::mem::MaybeUninit<_VM_COUNTERS_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VM_COUNTERS_EX>(), - 96usize, - concat!("Size of: ", stringify!(_VM_COUNTERS_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_VM_COUNTERS_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_VM_COUNTERS_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PeakVirtualSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX), - "::", - stringify!(PeakVirtualSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VirtualSize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX), - "::", - stringify!(VirtualSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PageFaultCount) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX), - "::", - stringify!(PageFaultCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PeakWorkingSetSize) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX), - "::", - stringify!(PeakWorkingSetSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WorkingSetSize) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX), - "::", - stringify!(WorkingSetSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QuotaPeakPagedPoolUsage) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX), - "::", - stringify!(QuotaPeakPagedPoolUsage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QuotaPagedPoolUsage) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX), - "::", - stringify!(QuotaPagedPoolUsage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QuotaPeakNonPagedPoolUsage) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX), - "::", - stringify!(QuotaPeakNonPagedPoolUsage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QuotaNonPagedPoolUsage) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX), - "::", - stringify!(QuotaNonPagedPoolUsage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PagefileUsage) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX), - "::", - stringify!(PagefileUsage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PeakPagefileUsage) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX), - "::", - stringify!(PeakPagefileUsage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrivateUsage) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX), - "::", - stringify!(PrivateUsage), - ), - ); -} -pub type VM_COUNTERS_EX = _VM_COUNTERS_EX; -pub type PVM_COUNTERS_EX = *mut VM_COUNTERS_EX; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VM_COUNTERS_EX2 { - pub CountersEx: VM_COUNTERS_EX, - pub PrivateWorkingSetSize: SIZE_T, - pub SharedCommitUsage: ULONGLONG, -} -#[test] -fn bindgen_test_layout__VM_COUNTERS_EX2() { - const UNINIT: ::core::mem::MaybeUninit<_VM_COUNTERS_EX2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VM_COUNTERS_EX2>(), - 112usize, - concat!("Size of: ", stringify!(_VM_COUNTERS_EX2)), - ); - assert_eq!( - ::core::mem::align_of::<_VM_COUNTERS_EX2>(), - 8usize, - concat!("Alignment of ", stringify!(_VM_COUNTERS_EX2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CountersEx) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX2), - "::", - stringify!(CountersEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PrivateWorkingSetSize) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX2), - "::", - stringify!(PrivateWorkingSetSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SharedCommitUsage) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_VM_COUNTERS_EX2), - "::", - stringify!(SharedCommitUsage), - ), - ); -} -pub type VM_COUNTERS_EX2 = _VM_COUNTERS_EX2; -pub type PVM_COUNTERS_EX2 = *mut _VM_COUNTERS_EX2; -pub mod _HARDWARE_COUNTER_TYPE { - pub type Type = ::core::ffi::c_int; - pub const PMCCounter: Type = 0; - pub const MaxHardwareCounterType: Type = 1; -} -pub use self::_HARDWARE_COUNTER_TYPE::Type as HARDWARE_COUNTER_TYPE; -pub type PHARDWARE_COUNTER_TYPE = *mut _HARDWARE_COUNTER_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _HARDWARE_COUNTER { - pub Type: HARDWARE_COUNTER_TYPE, - pub Reserved: ULONG, - pub Index: ULONG64, -} -#[test] -fn bindgen_test_layout__HARDWARE_COUNTER() { - const UNINIT: ::core::mem::MaybeUninit<_HARDWARE_COUNTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_HARDWARE_COUNTER>(), - 16usize, - concat!("Size of: ", stringify!(_HARDWARE_COUNTER)), - ); - assert_eq!( - ::core::mem::align_of::<_HARDWARE_COUNTER>(), - 8usize, - concat!("Alignment of ", stringify!(_HARDWARE_COUNTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_HARDWARE_COUNTER), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_HARDWARE_COUNTER), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Index) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_HARDWARE_COUNTER), - "::", - stringify!(Index), - ), - ); -} -impl Default for _HARDWARE_COUNTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type HARDWARE_COUNTER = _HARDWARE_COUNTER; -pub type PHARDWARE_COUNTER = *mut _HARDWARE_COUNTER; -pub mod _PROCESS_MITIGATION_POLICY { - pub type Type = ::core::ffi::c_int; - pub const ProcessDEPPolicy: Type = 0; - pub const ProcessASLRPolicy: Type = 1; - pub const ProcessDynamicCodePolicy: Type = 2; - pub const ProcessStrictHandleCheckPolicy: Type = 3; - pub const ProcessSystemCallDisablePolicy: Type = 4; - pub const ProcessMitigationOptionsMask: Type = 5; - pub const ProcessExtensionPointDisablePolicy: Type = 6; - pub const ProcessControlFlowGuardPolicy: Type = 7; - pub const ProcessSignaturePolicy: Type = 8; - pub const ProcessFontDisablePolicy: Type = 9; - pub const ProcessImageLoadPolicy: Type = 10; - pub const ProcessSystemCallFilterPolicy: Type = 11; - pub const ProcessPayloadRestrictionPolicy: Type = 12; - pub const ProcessChildProcessPolicy: Type = 13; - pub const ProcessSideChannelIsolationPolicy: Type = 14; - pub const ProcessUserShadowStackPolicy: Type = 15; - pub const ProcessRedirectionTrustPolicy: Type = 16; - pub const ProcessUserPointerAuthPolicy: Type = 17; - pub const ProcessSEHOPPolicy: Type = 18; - pub const ProcessActivationContextTrustPolicy: Type = 19; - pub const MaxProcessMitigationPolicy: Type = 20; -} -pub use self::_PROCESS_MITIGATION_POLICY::Type as PROCESS_MITIGATION_POLICY; -pub type PPROCESS_MITIGATION_POLICY = *mut _PROCESS_MITIGATION_POLICY::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_ASLR_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn EnableBottomUpRandomization(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableBottomUpRandomization(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableForceRelocateImages(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableForceRelocateImages(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableHighEntropy(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableHighEntropy(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn DisallowStrippedImages(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_DisallowStrippedImages(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 28u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - EnableBottomUpRandomization: ULONG, - EnableForceRelocateImages: ULONG, - EnableHighEntropy: ULONG, - DisallowStrippedImages: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let EnableBottomUpRandomization: u32 = unsafe { - ::core::mem::transmute(EnableBottomUpRandomization) - }; - EnableBottomUpRandomization as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let EnableForceRelocateImages: u32 = unsafe { - ::core::mem::transmute(EnableForceRelocateImages) - }; - EnableForceRelocateImages as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let EnableHighEntropy: u32 = unsafe { - ::core::mem::transmute(EnableHighEntropy) - }; - EnableHighEntropy as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let DisallowStrippedImages: u32 = unsafe { - ::core::mem::transmute(DisallowStrippedImages) - }; - DisallowStrippedImages as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 28u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_ASLR_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_ASLR_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_ASLR_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_ASLR_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_ASLR_POLICY>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_MITIGATION_ASLR_POLICY)), - ); -} -impl Default for _PROCESS_MITIGATION_ASLR_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_ASLR_POLICY = _PROCESS_MITIGATION_ASLR_POLICY; -pub type PPROCESS_MITIGATION_ASLR_POLICY = *mut _PROCESS_MITIGATION_ASLR_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_DEP_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1, - pub Permanent: BOOLEAN, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn Enable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_Enable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn DisableAtlThunkEmulation(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_DisableAtlThunkEmulation(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 30u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Enable: ULONG, - DisableAtlThunkEmulation: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Enable: u32 = unsafe { ::core::mem::transmute(Enable) }; - Enable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let DisableAtlThunkEmulation: u32 = unsafe { - ::core::mem::transmute(DisableAtlThunkEmulation) - }; - DisableAtlThunkEmulation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 30u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_DEP_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_DEP_POLICY() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_MITIGATION_DEP_POLICY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_DEP_POLICY>(), - 8usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_DEP_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_DEP_POLICY>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_MITIGATION_DEP_POLICY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Permanent) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_DEP_POLICY), - "::", - stringify!(Permanent), - ), - ); -} -impl Default for _PROCESS_MITIGATION_DEP_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_DEP_POLICY = _PROCESS_MITIGATION_DEP_POLICY; -pub type PPROCESS_MITIGATION_DEP_POLICY = *mut _PROCESS_MITIGATION_DEP_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_SEHOP_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn EnableSehop(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableSehop(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 31u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - EnableSehop: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let EnableSehop: u32 = unsafe { - ::core::mem::transmute(EnableSehop) - }; - EnableSehop as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 31u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_SEHOP_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_SEHOP_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_SEHOP_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_SEHOP_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_SEHOP_POLICY>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_MITIGATION_SEHOP_POLICY)), - ); -} -impl Default for _PROCESS_MITIGATION_SEHOP_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_SEHOP_POLICY = _PROCESS_MITIGATION_SEHOP_POLICY; -pub type PPROCESS_MITIGATION_SEHOP_POLICY = *mut _PROCESS_MITIGATION_SEHOP_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn RaiseExceptionOnInvalidHandleReference(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_RaiseExceptionOnInvalidHandleReference(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn HandleExceptionsPermanentlyEnabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_HandleExceptionsPermanentlyEnabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 30u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - RaiseExceptionOnInvalidHandleReference: ULONG, - HandleExceptionsPermanentlyEnabled: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let RaiseExceptionOnInvalidHandleReference: u32 = unsafe { - ::core::mem::transmute(RaiseExceptionOnInvalidHandleReference) - }; - RaiseExceptionOnInvalidHandleReference as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let HandleExceptionsPermanentlyEnabled: u32 = unsafe { - ::core::mem::transmute(HandleExceptionsPermanentlyEnabled) - }; - HandleExceptionsPermanentlyEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 30u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY), - ), - ); -} -impl Default for _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY = _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY; -pub type PPROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY = *mut _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn DisallowWin32kSystemCalls(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_DisallowWin32kSystemCalls(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditDisallowWin32kSystemCalls(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditDisallowWin32kSystemCalls(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn DisallowFsctlSystemCalls(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_DisallowFsctlSystemCalls(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditDisallowFsctlSystemCalls(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditDisallowFsctlSystemCalls(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 28u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - DisallowWin32kSystemCalls: ULONG, - AuditDisallowWin32kSystemCalls: ULONG, - DisallowFsctlSystemCalls: ULONG, - AuditDisallowFsctlSystemCalls: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let DisallowWin32kSystemCalls: u32 = unsafe { - ::core::mem::transmute(DisallowWin32kSystemCalls) - }; - DisallowWin32kSystemCalls as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let AuditDisallowWin32kSystemCalls: u32 = unsafe { - ::core::mem::transmute(AuditDisallowWin32kSystemCalls) - }; - AuditDisallowWin32kSystemCalls as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let DisallowFsctlSystemCalls: u32 = unsafe { - ::core::mem::transmute(DisallowFsctlSystemCalls) - }; - DisallowFsctlSystemCalls as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AuditDisallowFsctlSystemCalls: u32 = unsafe { - ::core::mem::transmute(AuditDisallowFsctlSystemCalls) - }; - AuditDisallowFsctlSystemCalls as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 28u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY), - ), - ); -} -impl Default for _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY = _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY; -pub type PPROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY = *mut _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn DisableExtensionPoints(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_DisableExtensionPoints(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 31u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - DisableExtensionPoints: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let DisableExtensionPoints: u32 = unsafe { - ::core::mem::transmute(DisableExtensionPoints) - }; - DisableExtensionPoints as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 31u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY), - ), - ); -} -impl Default for _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY = _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY; -pub type PPROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY = *mut _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn ProhibitDynamicCode(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_ProhibitDynamicCode(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn AllowThreadOptOut(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_AllowThreadOptOut(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn AllowRemoteDowngrade(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_AllowRemoteDowngrade(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditProhibitDynamicCode(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditProhibitDynamicCode(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 28u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ProhibitDynamicCode: ULONG, - AllowThreadOptOut: ULONG, - AllowRemoteDowngrade: ULONG, - AuditProhibitDynamicCode: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ProhibitDynamicCode: u32 = unsafe { - ::core::mem::transmute(ProhibitDynamicCode) - }; - ProhibitDynamicCode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let AllowThreadOptOut: u32 = unsafe { - ::core::mem::transmute(AllowThreadOptOut) - }; - AllowThreadOptOut as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let AllowRemoteDowngrade: u32 = unsafe { - ::core::mem::transmute(AllowRemoteDowngrade) - }; - AllowRemoteDowngrade as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AuditProhibitDynamicCode: u32 = unsafe { - ::core::mem::transmute(AuditProhibitDynamicCode) - }; - AuditProhibitDynamicCode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 28u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_DYNAMIC_CODE_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY)), - ); -} -impl Default for _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_DYNAMIC_CODE_POLICY = _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY; -pub type PPROCESS_MITIGATION_DYNAMIC_CODE_POLICY = *mut _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn EnableControlFlowGuard(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableControlFlowGuard(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableExportSuppression(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableExportSuppression(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn StrictMode(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_StrictMode(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableXfg(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableXfg(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableXfgAuditMode(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableXfgAuditMode(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - EnableControlFlowGuard: ULONG, - EnableExportSuppression: ULONG, - StrictMode: ULONG, - EnableXfg: ULONG, - EnableXfgAuditMode: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let EnableControlFlowGuard: u32 = unsafe { - ::core::mem::transmute(EnableControlFlowGuard) - }; - EnableControlFlowGuard as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let EnableExportSuppression: u32 = unsafe { - ::core::mem::transmute(EnableExportSuppression) - }; - EnableExportSuppression as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let StrictMode: u32 = unsafe { ::core::mem::transmute(StrictMode) }; - StrictMode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let EnableXfg: u32 = unsafe { ::core::mem::transmute(EnableXfg) }; - EnableXfg as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let EnableXfgAuditMode: u32 = unsafe { - ::core::mem::transmute(EnableXfgAuditMode) - }; - EnableXfgAuditMode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 27u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY), - ), - ); -} -impl Default for _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY = _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY; -pub type PPROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY = *mut _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn MicrosoftSignedOnly(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_MicrosoftSignedOnly(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn StoreSignedOnly(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_StoreSignedOnly(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn MitigationOptIn(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_MitigationOptIn(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditMicrosoftSignedOnly(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditMicrosoftSignedOnly(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditStoreSignedOnly(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditStoreSignedOnly(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MicrosoftSignedOnly: ULONG, - StoreSignedOnly: ULONG, - MitigationOptIn: ULONG, - AuditMicrosoftSignedOnly: ULONG, - AuditStoreSignedOnly: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let MicrosoftSignedOnly: u32 = unsafe { - ::core::mem::transmute(MicrosoftSignedOnly) - }; - MicrosoftSignedOnly as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let StoreSignedOnly: u32 = unsafe { - ::core::mem::transmute(StoreSignedOnly) - }; - StoreSignedOnly as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let MitigationOptIn: u32 = unsafe { - ::core::mem::transmute(MitigationOptIn) - }; - MitigationOptIn as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AuditMicrosoftSignedOnly: u32 = unsafe { - ::core::mem::transmute(AuditMicrosoftSignedOnly) - }; - AuditMicrosoftSignedOnly as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let AuditStoreSignedOnly: u32 = unsafe { - ::core::mem::transmute(AuditStoreSignedOnly) - }; - AuditStoreSignedOnly as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 27u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY)), - ); -} -impl Default for _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY = _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY; -pub type PPROCESS_MITIGATION_BINARY_SIGNATURE_POLICY = *mut _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_FONT_DISABLE_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn DisableNonSystemFonts(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_DisableNonSystemFonts(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditNonSystemFontLoading(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditNonSystemFontLoading(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 30u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - DisableNonSystemFonts: ULONG, - AuditNonSystemFontLoading: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let DisableNonSystemFonts: u32 = unsafe { - ::core::mem::transmute(DisableNonSystemFonts) - }; - DisableNonSystemFonts as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let AuditNonSystemFontLoading: u32 = unsafe { - ::core::mem::transmute(AuditNonSystemFontLoading) - }; - AuditNonSystemFontLoading as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 30u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_FONT_DISABLE_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_FONT_DISABLE_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_FONT_DISABLE_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_FONT_DISABLE_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_FONT_DISABLE_POLICY>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_MITIGATION_FONT_DISABLE_POLICY)), - ); -} -impl Default for _PROCESS_MITIGATION_FONT_DISABLE_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_FONT_DISABLE_POLICY = _PROCESS_MITIGATION_FONT_DISABLE_POLICY; -pub type PPROCESS_MITIGATION_FONT_DISABLE_POLICY = *mut _PROCESS_MITIGATION_FONT_DISABLE_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_IMAGE_LOAD_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn NoRemoteImages(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_NoRemoteImages(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn NoLowMandatoryLabelImages(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_NoLowMandatoryLabelImages(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn PreferSystem32Images(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_PreferSystem32Images(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditNoRemoteImages(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditNoRemoteImages(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditNoLowMandatoryLabelImages(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditNoLowMandatoryLabelImages(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - NoRemoteImages: ULONG, - NoLowMandatoryLabelImages: ULONG, - PreferSystem32Images: ULONG, - AuditNoRemoteImages: ULONG, - AuditNoLowMandatoryLabelImages: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let NoRemoteImages: u32 = unsafe { - ::core::mem::transmute(NoRemoteImages) - }; - NoRemoteImages as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let NoLowMandatoryLabelImages: u32 = unsafe { - ::core::mem::transmute(NoLowMandatoryLabelImages) - }; - NoLowMandatoryLabelImages as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let PreferSystem32Images: u32 = unsafe { - ::core::mem::transmute(PreferSystem32Images) - }; - PreferSystem32Images as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AuditNoRemoteImages: u32 = unsafe { - ::core::mem::transmute(AuditNoRemoteImages) - }; - AuditNoRemoteImages as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let AuditNoLowMandatoryLabelImages: u32 = unsafe { - ::core::mem::transmute(AuditNoLowMandatoryLabelImages) - }; - AuditNoLowMandatoryLabelImages as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 27u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_IMAGE_LOAD_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_IMAGE_LOAD_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_IMAGE_LOAD_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_IMAGE_LOAD_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_IMAGE_LOAD_POLICY>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_MITIGATION_IMAGE_LOAD_POLICY)), - ); -} -impl Default for _PROCESS_MITIGATION_IMAGE_LOAD_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_IMAGE_LOAD_POLICY = _PROCESS_MITIGATION_IMAGE_LOAD_POLICY; -pub type PPROCESS_MITIGATION_IMAGE_LOAD_POLICY = *mut _PROCESS_MITIGATION_IMAGE_LOAD_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn FilterId(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u32) } - } - #[inline] - pub fn set_FilterId(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 28u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - FilterId: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let FilterId: u32 = unsafe { ::core::mem::transmute(FilterId) }; - FilterId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 28u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY), - ), - ); -} -impl Default for _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY = _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY; -pub type PPROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY = *mut _PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn EnableExportAddressFilter(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableExportAddressFilter(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditExportAddressFilter(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditExportAddressFilter(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableExportAddressFilterPlus(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableExportAddressFilterPlus(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditExportAddressFilterPlus(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditExportAddressFilterPlus(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableImportAddressFilter(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableImportAddressFilter(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditImportAddressFilter(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditImportAddressFilter(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableRopStackPivot(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableRopStackPivot(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditRopStackPivot(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditRopStackPivot(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableRopCallerCheck(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableRopCallerCheck(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditRopCallerCheck(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditRopCallerCheck(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableRopSimExec(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableRopSimExec(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditRopSimExec(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditRopSimExec(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 20u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 20u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - EnableExportAddressFilter: ULONG, - AuditExportAddressFilter: ULONG, - EnableExportAddressFilterPlus: ULONG, - AuditExportAddressFilterPlus: ULONG, - EnableImportAddressFilter: ULONG, - AuditImportAddressFilter: ULONG, - EnableRopStackPivot: ULONG, - AuditRopStackPivot: ULONG, - EnableRopCallerCheck: ULONG, - AuditRopCallerCheck: ULONG, - EnableRopSimExec: ULONG, - AuditRopSimExec: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let EnableExportAddressFilter: u32 = unsafe { - ::core::mem::transmute(EnableExportAddressFilter) - }; - EnableExportAddressFilter as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let AuditExportAddressFilter: u32 = unsafe { - ::core::mem::transmute(AuditExportAddressFilter) - }; - AuditExportAddressFilter as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let EnableExportAddressFilterPlus: u32 = unsafe { - ::core::mem::transmute(EnableExportAddressFilterPlus) - }; - EnableExportAddressFilterPlus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AuditExportAddressFilterPlus: u32 = unsafe { - ::core::mem::transmute(AuditExportAddressFilterPlus) - }; - AuditExportAddressFilterPlus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let EnableImportAddressFilter: u32 = unsafe { - ::core::mem::transmute(EnableImportAddressFilter) - }; - EnableImportAddressFilter as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let AuditImportAddressFilter: u32 = unsafe { - ::core::mem::transmute(AuditImportAddressFilter) - }; - AuditImportAddressFilter as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let EnableRopStackPivot: u32 = unsafe { - ::core::mem::transmute(EnableRopStackPivot) - }; - EnableRopStackPivot as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let AuditRopStackPivot: u32 = unsafe { - ::core::mem::transmute(AuditRopStackPivot) - }; - AuditRopStackPivot as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let EnableRopCallerCheck: u32 = unsafe { - ::core::mem::transmute(EnableRopCallerCheck) - }; - EnableRopCallerCheck as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let AuditRopCallerCheck: u32 = unsafe { - ::core::mem::transmute(AuditRopCallerCheck) - }; - AuditRopCallerCheck as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let EnableRopSimExec: u32 = unsafe { - ::core::mem::transmute(EnableRopSimExec) - }; - EnableRopSimExec as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let AuditRopSimExec: u32 = unsafe { - ::core::mem::transmute(AuditRopSimExec) - }; - AuditRopSimExec as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 20u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY), - ), - ); -} -impl Default for _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY = _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY; -pub type PPROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY = *mut _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_CHILD_PROCESS_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn NoChildProcessCreation(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_NoChildProcessCreation(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditNoChildProcessCreation(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditNoChildProcessCreation(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn AllowSecureProcessCreation(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_AllowSecureProcessCreation(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 29u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - NoChildProcessCreation: ULONG, - AuditNoChildProcessCreation: ULONG, - AllowSecureProcessCreation: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let NoChildProcessCreation: u32 = unsafe { - ::core::mem::transmute(NoChildProcessCreation) - }; - NoChildProcessCreation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let AuditNoChildProcessCreation: u32 = unsafe { - ::core::mem::transmute(AuditNoChildProcessCreation) - }; - AuditNoChildProcessCreation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let AllowSecureProcessCreation: u32 = unsafe { - ::core::mem::transmute(AllowSecureProcessCreation) - }; - AllowSecureProcessCreation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 29u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_CHILD_PROCESS_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_CHILD_PROCESS_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_CHILD_PROCESS_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_CHILD_PROCESS_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_CHILD_PROCESS_POLICY>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_MITIGATION_CHILD_PROCESS_POLICY)), - ); -} -impl Default for _PROCESS_MITIGATION_CHILD_PROCESS_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_CHILD_PROCESS_POLICY = _PROCESS_MITIGATION_CHILD_PROCESS_POLICY; -pub type PPROCESS_MITIGATION_CHILD_PROCESS_POLICY = *mut _PROCESS_MITIGATION_CHILD_PROCESS_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn SmtBranchTargetIsolation(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_SmtBranchTargetIsolation(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn IsolateSecurityDomain(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsolateSecurityDomain(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn DisablePageCombine(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_DisablePageCombine(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn SpeculativeStoreBypassDisable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_SpeculativeStoreBypassDisable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestrictCoreSharing(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_RestrictCoreSharing(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - SmtBranchTargetIsolation: ULONG, - IsolateSecurityDomain: ULONG, - DisablePageCombine: ULONG, - SpeculativeStoreBypassDisable: ULONG, - RestrictCoreSharing: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let SmtBranchTargetIsolation: u32 = unsafe { - ::core::mem::transmute(SmtBranchTargetIsolation) - }; - SmtBranchTargetIsolation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let IsolateSecurityDomain: u32 = unsafe { - ::core::mem::transmute(IsolateSecurityDomain) - }; - IsolateSecurityDomain as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let DisablePageCombine: u32 = unsafe { - ::core::mem::transmute(DisablePageCombine) - }; - DisablePageCombine as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let SpeculativeStoreBypassDisable: u32 = unsafe { - ::core::mem::transmute(SpeculativeStoreBypassDisable) - }; - SpeculativeStoreBypassDisable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let RestrictCoreSharing: u32 = unsafe { - ::core::mem::transmute(RestrictCoreSharing) - }; - RestrictCoreSharing as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 27u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY), - ), - ); -} -impl Default for _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY = _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY; -pub type PPROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY = *mut _PROCESS_MITIGATION_SIDE_CHANNEL_ISOLATION_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn EnableUserShadowStack(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableUserShadowStack(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditUserShadowStack(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditUserShadowStack(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn SetContextIpValidation(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_SetContextIpValidation(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditSetContextIpValidation(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditSetContextIpValidation(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableUserShadowStackStrictMode(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnableUserShadowStackStrictMode(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn BlockNonCetBinaries(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_BlockNonCetBinaries(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn BlockNonCetBinariesNonEhcont(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_BlockNonCetBinariesNonEhcont(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditBlockNonCetBinaries(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditBlockNonCetBinaries(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn CetDynamicApisOutOfProcOnly(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_CetDynamicApisOutOfProcOnly(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn SetContextIpValidationRelaxedMode(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_SetContextIpValidationRelaxedMode(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 22u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 22u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - EnableUserShadowStack: ULONG, - AuditUserShadowStack: ULONG, - SetContextIpValidation: ULONG, - AuditSetContextIpValidation: ULONG, - EnableUserShadowStackStrictMode: ULONG, - BlockNonCetBinaries: ULONG, - BlockNonCetBinariesNonEhcont: ULONG, - AuditBlockNonCetBinaries: ULONG, - CetDynamicApisOutOfProcOnly: ULONG, - SetContextIpValidationRelaxedMode: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let EnableUserShadowStack: u32 = unsafe { - ::core::mem::transmute(EnableUserShadowStack) - }; - EnableUserShadowStack as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let AuditUserShadowStack: u32 = unsafe { - ::core::mem::transmute(AuditUserShadowStack) - }; - AuditUserShadowStack as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let SetContextIpValidation: u32 = unsafe { - ::core::mem::transmute(SetContextIpValidation) - }; - SetContextIpValidation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AuditSetContextIpValidation: u32 = unsafe { - ::core::mem::transmute(AuditSetContextIpValidation) - }; - AuditSetContextIpValidation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let EnableUserShadowStackStrictMode: u32 = unsafe { - ::core::mem::transmute(EnableUserShadowStackStrictMode) - }; - EnableUserShadowStackStrictMode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let BlockNonCetBinaries: u32 = unsafe { - ::core::mem::transmute(BlockNonCetBinaries) - }; - BlockNonCetBinaries as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let BlockNonCetBinariesNonEhcont: u32 = unsafe { - ::core::mem::transmute(BlockNonCetBinariesNonEhcont) - }; - BlockNonCetBinariesNonEhcont as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let AuditBlockNonCetBinaries: u32 = unsafe { - ::core::mem::transmute(AuditBlockNonCetBinaries) - }; - AuditBlockNonCetBinaries as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let CetDynamicApisOutOfProcOnly: u32 = unsafe { - ::core::mem::transmute(CetDynamicApisOutOfProcOnly) - }; - CetDynamicApisOutOfProcOnly as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let SetContextIpValidationRelaxedMode: u32 = unsafe { - ::core::mem::transmute(SetContextIpValidationRelaxedMode) - }; - SetContextIpValidationRelaxedMode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 22u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY), - ), - ); -} -impl Default for _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY = _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY; -pub type PPROCESS_MITIGATION_USER_SHADOW_STACK_POLICY = *mut _PROCESS_MITIGATION_USER_SHADOW_STACK_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn EnablePointerAuthUserIp(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnablePointerAuthUserIp(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 31u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - EnablePointerAuthUserIp: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let EnablePointerAuthUserIp: u32 = unsafe { - ::core::mem::transmute(EnablePointerAuthUserIp) - }; - EnablePointerAuthUserIp as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 31u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY), - ), - ); -} -impl Default for _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY = _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY; -pub type PPROCESS_MITIGATION_USER_POINTER_AUTH_POLICY = *mut _PROCESS_MITIGATION_USER_POINTER_AUTH_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn EnforceRedirectionTrust(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_EnforceRedirectionTrust(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuditRedirectionTrust(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_AuditRedirectionTrust(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 30u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - EnforceRedirectionTrust: ULONG, - AuditRedirectionTrust: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let EnforceRedirectionTrust: u32 = unsafe { - ::core::mem::transmute(EnforceRedirectionTrust) - }; - EnforceRedirectionTrust as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let AuditRedirectionTrust: u32 = unsafe { - ::core::mem::transmute(AuditRedirectionTrust) - }; - AuditRedirectionTrust as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 30u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY), - ), - ); -} -impl Default for _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY = _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY; -pub type PPROCESS_MITIGATION_REDIRECTION_TRUST_POLICY = *mut _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY { - pub __bindgen_anon_1: _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); -} -impl _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn AssemblyManifestRedirectionTrust(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_AssemblyManifestRedirectionTrust(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } - } - #[inline] - pub fn set_ReservedFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 31u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - AssemblyManifestRedirectionTrust: ULONG, - ReservedFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let AssemblyManifestRedirectionTrust: u32 = unsafe { - ::core::mem::transmute(AssemblyManifestRedirectionTrust) - }; - AssemblyManifestRedirectionTrust as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 31u8, - { - let ReservedFlags: u32 = unsafe { - ::core::mem::transmute(ReservedFlags) - }; - ReservedFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1 - ), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY() { - assert_eq!( - ::core::mem::size_of::<_PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY), - ), - ); -} -impl Default for _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY = _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY; -pub type PPROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY = *mut _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_KEEPALIVE_COUNT_INFORMATION { - pub WakeCount: ULONG, - pub NoWakeCount: ULONG, -} -#[test] -fn bindgen_test_layout__PROCESS_KEEPALIVE_COUNT_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_KEEPALIVE_COUNT_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_KEEPALIVE_COUNT_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_PROCESS_KEEPALIVE_COUNT_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_KEEPALIVE_COUNT_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_KEEPALIVE_COUNT_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WakeCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_KEEPALIVE_COUNT_INFORMATION), - "::", - stringify!(WakeCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NoWakeCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_KEEPALIVE_COUNT_INFORMATION), - "::", - stringify!(NoWakeCount), - ), - ); -} -pub type PROCESS_KEEPALIVE_COUNT_INFORMATION = _PROCESS_KEEPALIVE_COUNT_INFORMATION; -pub type PPROCESS_KEEPALIVE_COUNT_INFORMATION = *mut _PROCESS_KEEPALIVE_COUNT_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PROCESS_REVOKE_FILE_HANDLES_INFORMATION { - pub TargetDevicePath: UNICODE_STRING, -} -#[test] -fn bindgen_test_layout__PROCESS_REVOKE_FILE_HANDLES_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_REVOKE_FILE_HANDLES_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_REVOKE_FILE_HANDLES_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_PROCESS_REVOKE_FILE_HANDLES_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_REVOKE_FILE_HANDLES_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESS_REVOKE_FILE_HANDLES_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetDevicePath) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_REVOKE_FILE_HANDLES_INFORMATION), - "::", - stringify!(TargetDevicePath), - ), - ); -} -impl Default for _PROCESS_REVOKE_FILE_HANDLES_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_REVOKE_FILE_HANDLES_INFORMATION = _PROCESS_REVOKE_FILE_HANDLES_INFORMATION; -pub type PPROCESS_REVOKE_FILE_HANDLES_INFORMATION = *mut _PROCESS_REVOKE_FILE_HANDLES_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _POOLED_USAGE_AND_LIMITS { - pub PeakPagedPoolUsage: SIZE_T, - pub PagedPoolUsage: SIZE_T, - pub PagedPoolLimit: SIZE_T, - pub PeakNonPagedPoolUsage: SIZE_T, - pub NonPagedPoolUsage: SIZE_T, - pub NonPagedPoolLimit: SIZE_T, - pub PeakPagefileUsage: SIZE_T, - pub PagefileUsage: SIZE_T, - pub PagefileLimit: SIZE_T, -} -#[test] -fn bindgen_test_layout__POOLED_USAGE_AND_LIMITS() { - const UNINIT: ::core::mem::MaybeUninit<_POOLED_USAGE_AND_LIMITS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POOLED_USAGE_AND_LIMITS>(), - 72usize, - concat!("Size of: ", stringify!(_POOLED_USAGE_AND_LIMITS)), - ); - assert_eq!( - ::core::mem::align_of::<_POOLED_USAGE_AND_LIMITS>(), - 8usize, - concat!("Alignment of ", stringify!(_POOLED_USAGE_AND_LIMITS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PeakPagedPoolUsage) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POOLED_USAGE_AND_LIMITS), - "::", - stringify!(PeakPagedPoolUsage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PagedPoolUsage) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_POOLED_USAGE_AND_LIMITS), - "::", - stringify!(PagedPoolUsage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PagedPoolLimit) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_POOLED_USAGE_AND_LIMITS), - "::", - stringify!(PagedPoolLimit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PeakNonPagedPoolUsage) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_POOLED_USAGE_AND_LIMITS), - "::", - stringify!(PeakNonPagedPoolUsage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NonPagedPoolUsage) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_POOLED_USAGE_AND_LIMITS), - "::", - stringify!(NonPagedPoolUsage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NonPagedPoolLimit) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_POOLED_USAGE_AND_LIMITS), - "::", - stringify!(NonPagedPoolLimit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PeakPagefileUsage) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_POOLED_USAGE_AND_LIMITS), - "::", - stringify!(PeakPagefileUsage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PagefileUsage) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_POOLED_USAGE_AND_LIMITS), - "::", - stringify!(PagefileUsage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PagefileLimit) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_POOLED_USAGE_AND_LIMITS), - "::", - stringify!(PagefileLimit), - ), - ); -} -pub type POOLED_USAGE_AND_LIMITS = _POOLED_USAGE_AND_LIMITS; -pub type PPOOLED_USAGE_AND_LIMITS = *mut POOLED_USAGE_AND_LIMITS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PROCESS_ACCESS_TOKEN { - pub Token: HANDLE, - pub Thread: HANDLE, -} -#[test] -fn bindgen_test_layout__PROCESS_ACCESS_TOKEN() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_ACCESS_TOKEN> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_ACCESS_TOKEN>(), - 16usize, - concat!("Size of: ", stringify!(_PROCESS_ACCESS_TOKEN)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_ACCESS_TOKEN>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESS_ACCESS_TOKEN)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Token) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_ACCESS_TOKEN), - "::", - stringify!(Token), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Thread) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_ACCESS_TOKEN), - "::", - stringify!(Thread), - ), - ); -} -impl Default for _PROCESS_ACCESS_TOKEN { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_ACCESS_TOKEN = _PROCESS_ACCESS_TOKEN; -pub type PPROCESS_ACCESS_TOKEN = *mut _PROCESS_ACCESS_TOKEN; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PROCESS_EXCEPTION_PORT { - pub ExceptionPortHandle: HANDLE, - pub StateFlags: ULONG, -} -#[test] -fn bindgen_test_layout__PROCESS_EXCEPTION_PORT() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_EXCEPTION_PORT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_EXCEPTION_PORT>(), - 16usize, - concat!("Size of: ", stringify!(_PROCESS_EXCEPTION_PORT)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_EXCEPTION_PORT>(), - 8usize, - concat!("Alignment of ", stringify!(_PROCESS_EXCEPTION_PORT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExceptionPortHandle) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_EXCEPTION_PORT), - "::", - stringify!(ExceptionPortHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StateFlags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_EXCEPTION_PORT), - "::", - stringify!(StateFlags), - ), - ); -} -impl Default for _PROCESS_EXCEPTION_PORT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PROCESS_EXCEPTION_PORT = _PROCESS_EXCEPTION_PORT; -pub type PPROCESS_EXCEPTION_PORT = *mut _PROCESS_EXCEPTION_PORT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KERNEL_USER_TIMES { - pub CreateTime: LARGE_INTEGER, - pub ExitTime: LARGE_INTEGER, - pub KernelTime: LARGE_INTEGER, - pub UserTime: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__KERNEL_USER_TIMES() { - const UNINIT: ::core::mem::MaybeUninit<_KERNEL_USER_TIMES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KERNEL_USER_TIMES>(), - 32usize, - concat!("Size of: ", stringify!(_KERNEL_USER_TIMES)), - ); - assert_eq!( - ::core::mem::align_of::<_KERNEL_USER_TIMES>(), - 8usize, - concat!("Alignment of ", stringify!(_KERNEL_USER_TIMES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KERNEL_USER_TIMES), - "::", - stringify!(CreateTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExitTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KERNEL_USER_TIMES), - "::", - stringify!(ExitTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KernelTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KERNEL_USER_TIMES), - "::", - stringify!(KernelTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KERNEL_USER_TIMES), - "::", - stringify!(UserTime), - ), - ); -} -impl Default for _KERNEL_USER_TIMES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KERNEL_USER_TIMES = _KERNEL_USER_TIMES; -pub type PKERNEL_USER_TIMES = *mut KERNEL_USER_TIMES; -pub mod _SUBSYSTEM_INFORMATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const SubsystemInformationTypeWin32: Type = 0; - pub const SubsystemInformationTypeWSL: Type = 1; - pub const MaxSubsystemInformationType: Type = 2; -} -pub use self::_SUBSYSTEM_INFORMATION_TYPE::Type as SUBSYSTEM_INFORMATION_TYPE; -pub type PSUBSYSTEM_INFORMATION_TYPE = *mut _SUBSYSTEM_INFORMATION_TYPE::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _POWER_THROTTLING_PROCESS_STATE { - pub Version: ULONG, - pub ControlMask: ULONG, - pub StateMask: ULONG, -} -#[test] -fn bindgen_test_layout__POWER_THROTTLING_PROCESS_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_POWER_THROTTLING_PROCESS_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POWER_THROTTLING_PROCESS_STATE>(), - 12usize, - concat!("Size of: ", stringify!(_POWER_THROTTLING_PROCESS_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_POWER_THROTTLING_PROCESS_STATE>(), - 4usize, - concat!("Alignment of ", stringify!(_POWER_THROTTLING_PROCESS_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_THROTTLING_PROCESS_STATE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ControlMask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_POWER_THROTTLING_PROCESS_STATE), - "::", - stringify!(ControlMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StateMask) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_POWER_THROTTLING_PROCESS_STATE), - "::", - stringify!(StateMask), - ), - ); -} -pub type POWER_THROTTLING_PROCESS_STATE = _POWER_THROTTLING_PROCESS_STATE; -pub type PPOWER_THROTTLING_PROCESS_STATE = *mut _POWER_THROTTLING_PROCESS_STATE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _POWER_THROTTLING_THREAD_STATE { - pub Version: ULONG, - pub ControlMask: ULONG, - pub StateMask: ULONG, -} -#[test] -fn bindgen_test_layout__POWER_THROTTLING_THREAD_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_POWER_THROTTLING_THREAD_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_POWER_THROTTLING_THREAD_STATE>(), - 12usize, - concat!("Size of: ", stringify!(_POWER_THROTTLING_THREAD_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_POWER_THROTTLING_THREAD_STATE>(), - 4usize, - concat!("Alignment of ", stringify!(_POWER_THROTTLING_THREAD_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_POWER_THROTTLING_THREAD_STATE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ControlMask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_POWER_THROTTLING_THREAD_STATE), - "::", - stringify!(ControlMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StateMask) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_POWER_THROTTLING_THREAD_STATE), - "::", - stringify!(StateMask), - ), - ); -} -pub type POWER_THROTTLING_THREAD_STATE = _POWER_THROTTLING_THREAD_STATE; -pub type PPOWER_THROTTLING_THREAD_STATE = *mut _POWER_THROTTLING_THREAD_STATE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PROCESS_SYSCALL_PROVIDER_INFORMATION { - pub ProviderId: GUID, - pub Level: UCHAR, -} -#[test] -fn bindgen_test_layout__PROCESS_SYSCALL_PROVIDER_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PROCESS_SYSCALL_PROVIDER_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PROCESS_SYSCALL_PROVIDER_INFORMATION>(), - 20usize, - concat!("Size of: ", stringify!(_PROCESS_SYSCALL_PROVIDER_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PROCESS_SYSCALL_PROVIDER_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_PROCESS_SYSCALL_PROVIDER_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProviderId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_SYSCALL_PROVIDER_INFORMATION), - "::", - stringify!(ProviderId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Level) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PROCESS_SYSCALL_PROVIDER_INFORMATION), - "::", - stringify!(Level), - ), - ); -} -pub type PROCESS_SYSCALL_PROVIDER_INFORMATION = _PROCESS_SYSCALL_PROVIDER_INFORMATION; -pub type PPROCESS_SYSCALL_PROVIDER_INFORMATION = *mut _PROCESS_SYSCALL_PROVIDER_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KPCR { - pub __bindgen_anon_1: _KPCR__bindgen_ty_1, - pub IdtBase: *mut _KIDTENTRY64, - pub Unused: [ULONG64; 2usize], - pub Irql: KIRQL, - pub SecondLevelCacheAssociativity: UCHAR, - pub ObsoleteNumber: UCHAR, - pub Fill0: UCHAR, - pub Unused0: [ULONG; 3usize], - pub MajorVersion: USHORT, - pub MinorVersion: USHORT, - pub StallScaleFactor: ULONG, - pub Unused1: [PVOID; 3usize], - pub KernelReserved: [ULONG; 15usize], - pub SecondLevelCacheSize: ULONG, - pub HalReserved: [ULONG; 16usize], - pub Unused2: ULONG, - pub KdVersionBlock: PVOID, - pub Unused3: PVOID, - pub PcrAlign1: [ULONG; 24usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KPCR__bindgen_ty_1 { - pub NtTib: NT_TIB, - pub __bindgen_anon_1: _KPCR__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _KPCR__bindgen_ty_1__bindgen_ty_1 { - pub GdtBase: *mut _KGDTENTRY64, - pub TssBase: *mut _KTSS64, - pub UserRsp: ULONG64, - pub Self_: *mut _KPCR, - pub CurrentPrcb: *mut _KPRCB, - pub LockArray: PKSPIN_LOCK_QUEUE, - pub Used_Self: PVOID, -} -#[test] -fn bindgen_test_layout__KPCR__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KPCR__bindgen_ty_1__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KPCR__bindgen_ty_1__bindgen_ty_1>(), - 56usize, - concat!("Size of: ", stringify!(_KPCR__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KPCR__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_KPCR__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GdtBase) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KPCR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(GdtBase), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TssBase) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KPCR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(TssBase), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserRsp) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KPCR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(UserRsp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Self_) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KPCR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Self_), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentPrcb) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KPCR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(CurrentPrcb), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LockArray) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KPCR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(LockArray), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Used_Self) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_KPCR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Used_Self), - ), - ); -} -impl Default for _KPCR__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__KPCR__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KPCR__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KPCR__bindgen_ty_1>(), - 56usize, - concat!("Size of: ", stringify!(_KPCR__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KPCR__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_KPCR__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NtTib) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KPCR__bindgen_ty_1), - "::", - stringify!(NtTib), - ), - ); -} -impl Default for _KPCR__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__KPCR() { - const UNINIT: ::core::mem::MaybeUninit<_KPCR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KPCR>(), - 376usize, - concat!("Size of: ", stringify!(_KPCR)), - ); - assert_eq!( - ::core::mem::align_of::<_KPCR>(), - 8usize, - concat!("Alignment of ", stringify!(_KPCR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdtBase) as usize - ptr as usize }, - 56usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(IdtBase)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused) as usize - ptr as usize }, - 64usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(Unused)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Irql) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(Irql)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecondLevelCacheAssociativity) as usize - - ptr as usize - }, - 81usize, - concat!( - "Offset of field: ", - stringify!(_KPCR), - "::", - stringify!(SecondLevelCacheAssociativity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObsoleteNumber) as usize - ptr as usize }, - 82usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(ObsoleteNumber)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Fill0) as usize - ptr as usize }, - 83usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(Fill0)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused0) as usize - ptr as usize }, - 84usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(Unused0)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorVersion) as usize - ptr as usize }, - 96usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(MajorVersion)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorVersion) as usize - ptr as usize }, - 98usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(MinorVersion)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StallScaleFactor) as usize - ptr as usize - }, - 100usize, - concat!( - "Offset of field: ", - stringify!(_KPCR), - "::", - stringify!(StallScaleFactor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused1) as usize - ptr as usize }, - 104usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(Unused1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KernelReserved) as usize - ptr as usize }, - 128usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(KernelReserved)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecondLevelCacheSize) as usize - ptr as usize - }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_KPCR), - "::", - stringify!(SecondLevelCacheSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HalReserved) as usize - ptr as usize }, - 192usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(HalReserved)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused2) as usize - ptr as usize }, - 256usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(Unused2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KdVersionBlock) as usize - ptr as usize }, - 264usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(KdVersionBlock)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused3) as usize - ptr as usize }, - 272usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(Unused3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PcrAlign1) as usize - ptr as usize }, - 280usize, - concat!("Offset of field: ", stringify!(_KPCR), "::", stringify!(PcrAlign1)), - ); -} -impl Default for _KPCR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KPCR = _KPCR; -pub type PKPCR = *mut _KPCR; -#[repr(C)] -#[repr(align(16))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KEXCEPTION_FRAME { - pub P1Home: ULONG64, - pub P2Home: ULONG64, - pub P3Home: ULONG64, - pub P4Home: ULONG64, - pub P5: ULONG64, - pub Spare1: ULONG64, - pub Xmm6: M128A, - pub Xmm7: M128A, - pub Xmm8: M128A, - pub Xmm9: M128A, - pub Xmm10: M128A, - pub Xmm11: M128A, - pub Xmm12: M128A, - pub Xmm13: M128A, - pub Xmm14: M128A, - pub Xmm15: M128A, - pub TrapFrame: ULONG64, - pub OutputBuffer: ULONG64, - pub OutputLength: ULONG64, - pub Spare2: ULONG64, - pub MxCsr: ULONG64, - pub Rbp: ULONG64, - pub Rbx: ULONG64, - pub Rdi: ULONG64, - pub Rsi: ULONG64, - pub R12: ULONG64, - pub R13: ULONG64, - pub R14: ULONG64, - pub R15: ULONG64, - pub Return: ULONG64, -} -#[test] -fn bindgen_test_layout__KEXCEPTION_FRAME() { - const UNINIT: ::core::mem::MaybeUninit<_KEXCEPTION_FRAME> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KEXCEPTION_FRAME>(), - 320usize, - concat!("Size of: ", stringify!(_KEXCEPTION_FRAME)), - ); - assert_eq!( - ::core::mem::align_of::<_KEXCEPTION_FRAME>(), - 16usize, - concat!("Alignment of ", stringify!(_KEXCEPTION_FRAME)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P1Home) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(P1Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P2Home) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(P2Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P3Home) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(P3Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P4Home) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(P4Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P5) as usize - ptr as usize }, - 32usize, - concat!("Offset of field: ", stringify!(_KEXCEPTION_FRAME), "::", stringify!(P5)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spare1) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Spare1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm6) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Xmm6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm7) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Xmm7), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm8) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Xmm8), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm9) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Xmm9), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm10) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Xmm10), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm11) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Xmm11), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm12) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Xmm12), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm13) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Xmm13), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm14) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Xmm14), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm15) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Xmm15), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TrapFrame) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(TrapFrame), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OutputBuffer) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(OutputBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OutputLength) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(OutputLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spare2) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Spare2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MxCsr) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(MxCsr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rbp) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Rbp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rbx) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Rbx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rdi) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Rdi), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rsi) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Rsi), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R12) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(R12), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R13) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(R13), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R14) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(R14), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R15) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(R15), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Return) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_KEXCEPTION_FRAME), - "::", - stringify!(Return), - ), - ); -} -pub type KEXCEPTION_FRAME = _KEXCEPTION_FRAME; -pub type PKEXCEPTION_FRAME = *mut _KEXCEPTION_FRAME; -#[repr(C)] -#[repr(align(16))] -#[derive(Copy, Clone)] -pub struct _KTRAP_FRAME { - pub P1Home: ULONG64, - pub P2Home: ULONG64, - pub P3Home: ULONG64, - pub P4Home: ULONG64, - pub P5: ULONG64, - pub PreviousMode: KPROCESSOR_MODE, - pub PreviousIrql: KIRQL, - pub FaultIndicator: UCHAR, - pub ExceptionActive: UCHAR, - pub MxCsr: ULONG, - pub Rax: ULONG64, - pub Rcx: ULONG64, - pub Rdx: ULONG64, - pub R8: ULONG64, - pub R9: ULONG64, - pub R10: ULONG64, - pub R11: ULONG64, - pub __bindgen_anon_1: _KTRAP_FRAME__bindgen_ty_1, - pub Xmm0: M128A, - pub Xmm1: M128A, - pub Xmm2: M128A, - pub Xmm3: M128A, - pub Xmm4: M128A, - pub Xmm5: M128A, - pub __bindgen_anon_2: _KTRAP_FRAME__bindgen_ty_2, - pub __bindgen_anon_3: _KTRAP_FRAME__bindgen_ty_3, - pub __bindgen_anon_4: _KTRAP_FRAME__bindgen_ty_4, - pub SegDs: USHORT, - pub SegEs: USHORT, - pub SegFs: USHORT, - pub SegGs: USHORT, - pub TrapFrame: ULONG64, - pub Rbx: ULONG64, - pub Rdi: ULONG64, - pub Rsi: ULONG64, - pub Rbp: ULONG64, - pub __bindgen_anon_5: _KTRAP_FRAME__bindgen_ty_5, - pub Rip: ULONG64, - pub SegCs: USHORT, - pub Fill0: UCHAR, - pub Logging: UCHAR, - pub Fill1: [USHORT; 2usize], - pub EFlags: ULONG, - pub Fill2: ULONG, - pub Rsp: ULONG64, - pub SegSs: USHORT, - pub Fill3: USHORT, - pub Fill4: ULONG, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KTRAP_FRAME__bindgen_ty_1 { - pub GsBase: ULONG64, - pub GsSwap: ULONG64, -} -#[test] -fn bindgen_test_layout__KTRAP_FRAME__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KTRAP_FRAME__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KTRAP_FRAME__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_KTRAP_FRAME__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KTRAP_FRAME__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_KTRAP_FRAME__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GsBase) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_1), - "::", - stringify!(GsBase), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GsSwap) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_1), - "::", - stringify!(GsSwap), - ), - ); -} -impl Default for _KTRAP_FRAME__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KTRAP_FRAME__bindgen_ty_2 { - pub FaultAddress: ULONG64, - pub ContextRecord: ULONG64, -} -#[test] -fn bindgen_test_layout__KTRAP_FRAME__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_KTRAP_FRAME__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KTRAP_FRAME__bindgen_ty_2>(), - 8usize, - concat!("Size of: ", stringify!(_KTRAP_FRAME__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_KTRAP_FRAME__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(_KTRAP_FRAME__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FaultAddress) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_2), - "::", - stringify!(FaultAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContextRecord) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_2), - "::", - stringify!(ContextRecord), - ), - ); -} -impl Default for _KTRAP_FRAME__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KTRAP_FRAME__bindgen_ty_3 { - pub __bindgen_anon_1: _KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1, - pub __bindgen_anon_2: _KTRAP_FRAME__bindgen_ty_3__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1 { - pub Dr0: ULONG64, - pub Dr1: ULONG64, - pub Dr2: ULONG64, - pub Dr3: ULONG64, - pub Dr6: ULONG64, - pub Dr7: ULONG64, -} -#[test] -fn bindgen_test_layout__KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1>(), - 48usize, - concat!("Size of: ", stringify!(_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dr0) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(Dr0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dr1) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(Dr1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dr2) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(Dr2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dr3) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(Dr3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dr6) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(Dr6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dr7) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_1), - "::", - stringify!(Dr7), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KTRAP_FRAME__bindgen_ty_3__bindgen_ty_2 { - pub ShadowStackFrame: ULONG64, - pub Spare: [ULONG64; 5usize], -} -#[test] -fn bindgen_test_layout__KTRAP_FRAME__bindgen_ty_3__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_2>(), - 48usize, - concat!("Size of: ", stringify!(_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_2)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ShadowStackFrame) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_2), - "::", - stringify!(ShadowStackFrame), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spare) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_3__bindgen_ty_2), - "::", - stringify!(Spare), - ), - ); -} -#[test] -fn bindgen_test_layout__KTRAP_FRAME__bindgen_ty_3() { - assert_eq!( - ::core::mem::size_of::<_KTRAP_FRAME__bindgen_ty_3>(), - 48usize, - concat!("Size of: ", stringify!(_KTRAP_FRAME__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_KTRAP_FRAME__bindgen_ty_3>(), - 8usize, - concat!("Alignment of ", stringify!(_KTRAP_FRAME__bindgen_ty_3)), - ); -} -impl Default for _KTRAP_FRAME__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KTRAP_FRAME__bindgen_ty_4 { - pub DebugControl: ULONG64, - pub LastBranchToRip: ULONG64, - pub LastBranchFromRip: ULONG64, - pub LastExceptionToRip: ULONG64, - pub LastExceptionFromRip: ULONG64, -} -#[test] -fn bindgen_test_layout__KTRAP_FRAME__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit<_KTRAP_FRAME__bindgen_ty_4> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KTRAP_FRAME__bindgen_ty_4>(), - 40usize, - concat!("Size of: ", stringify!(_KTRAP_FRAME__bindgen_ty_4)), - ); - assert_eq!( - ::core::mem::align_of::<_KTRAP_FRAME__bindgen_ty_4>(), - 8usize, - concat!("Alignment of ", stringify!(_KTRAP_FRAME__bindgen_ty_4)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DebugControl) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_4), - "::", - stringify!(DebugControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastBranchToRip) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_4), - "::", - stringify!(LastBranchToRip), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastBranchFromRip) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_4), - "::", - stringify!(LastBranchFromRip), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastExceptionToRip) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_4), - "::", - stringify!(LastExceptionToRip), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastExceptionFromRip) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_4), - "::", - stringify!(LastExceptionFromRip), - ), - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KTRAP_FRAME__bindgen_ty_5 { - pub ErrorCode: ULONG64, - pub ExceptionFrame: ULONG64, -} -#[test] -fn bindgen_test_layout__KTRAP_FRAME__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit<_KTRAP_FRAME__bindgen_ty_5> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KTRAP_FRAME__bindgen_ty_5>(), - 8usize, - concat!("Size of: ", stringify!(_KTRAP_FRAME__bindgen_ty_5)), - ); - assert_eq!( - ::core::mem::align_of::<_KTRAP_FRAME__bindgen_ty_5>(), - 8usize, - concat!("Alignment of ", stringify!(_KTRAP_FRAME__bindgen_ty_5)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_5), - "::", - stringify!(ErrorCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionFrame) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME__bindgen_ty_5), - "::", - stringify!(ExceptionFrame), - ), - ); -} -impl Default for _KTRAP_FRAME__bindgen_ty_5 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__KTRAP_FRAME() { - const UNINIT: ::core::mem::MaybeUninit<_KTRAP_FRAME> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KTRAP_FRAME>(), - 400usize, - concat!("Size of: ", stringify!(_KTRAP_FRAME)), - ); - assert_eq!( - ::core::mem::align_of::<_KTRAP_FRAME>(), - 16usize, - concat!("Alignment of ", stringify!(_KTRAP_FRAME)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P1Home) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(P1Home)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P2Home) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(P2Home)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P3Home) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(P3Home)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P4Home) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(P4Home)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P5) as usize - ptr as usize }, - 32usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(P5)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PreviousMode) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME), - "::", - stringify!(PreviousMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PreviousIrql) as usize - ptr as usize }, - 41usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME), - "::", - stringify!(PreviousIrql), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FaultIndicator) as usize - ptr as usize }, - 42usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME), - "::", - stringify!(FaultIndicator), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionActive) as usize - ptr as usize }, - 43usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME), - "::", - stringify!(ExceptionActive), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MxCsr) as usize - ptr as usize }, - 44usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(MxCsr)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rax) as usize - ptr as usize }, - 48usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Rax)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rcx) as usize - ptr as usize }, - 56usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Rcx)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rdx) as usize - ptr as usize }, - 64usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Rdx)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R8) as usize - ptr as usize }, - 72usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(R8)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R9) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(R9)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R10) as usize - ptr as usize }, - 88usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(R10)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R11) as usize - ptr as usize }, - 96usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(R11)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm0) as usize - ptr as usize }, - 112usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Xmm0)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm1) as usize - ptr as usize }, - 128usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Xmm1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm2) as usize - ptr as usize }, - 144usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Xmm2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm3) as usize - ptr as usize }, - 160usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Xmm3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm4) as usize - ptr as usize }, - 176usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Xmm4)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Xmm5) as usize - ptr as usize }, - 192usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Xmm5)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegDs) as usize - ptr as usize }, - 304usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(SegDs)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegEs) as usize - ptr as usize }, - 306usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(SegEs)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegFs) as usize - ptr as usize }, - 308usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(SegFs)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegGs) as usize - ptr as usize }, - 310usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(SegGs)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TrapFrame) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_KTRAP_FRAME), - "::", - stringify!(TrapFrame), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rbx) as usize - ptr as usize }, - 320usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Rbx)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rdi) as usize - ptr as usize }, - 328usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Rdi)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rsi) as usize - ptr as usize }, - 336usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Rsi)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rbp) as usize - ptr as usize }, - 344usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Rbp)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rip) as usize - ptr as usize }, - 360usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Rip)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegCs) as usize - ptr as usize }, - 368usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(SegCs)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Fill0) as usize - ptr as usize }, - 370usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Fill0)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Logging) as usize - ptr as usize }, - 371usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Logging)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Fill1) as usize - ptr as usize }, - 372usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Fill1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EFlags) as usize - ptr as usize }, - 376usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(EFlags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Fill2) as usize - ptr as usize }, - 380usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Fill2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rsp) as usize - ptr as usize }, - 384usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Rsp)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegSs) as usize - ptr as usize }, - 392usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(SegSs)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Fill3) as usize - ptr as usize }, - 394usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Fill3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Fill4) as usize - ptr as usize }, - 396usize, - concat!("Offset of field: ", stringify!(_KTRAP_FRAME), "::", stringify!(Fill4)), - ); -} -impl Default for _KTRAP_FRAME { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KTRAP_FRAME = _KTRAP_FRAME; -pub type PKTRAP_FRAME = *mut _KTRAP_FRAME; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KUMS_CONTEXT_HEADER { - pub P1Home: ULONG64, - pub P2Home: ULONG64, - pub P3Home: ULONG64, - pub P4Home: ULONG64, - pub StackTop: PVOID, - pub StackSize: ULONG64, - pub RspOffset: ULONG64, - pub Rip: ULONG64, - pub FltSave: PXMM_SAVE_AREA32, - pub __bindgen_anon_1: _KUMS_CONTEXT_HEADER__bindgen_ty_1, - pub TrapFrame: PKTRAP_FRAME, - pub ExceptionFrame: PKEXCEPTION_FRAME, - pub SourceThread: *mut _KTHREAD, - pub Return: ULONG64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KUMS_CONTEXT_HEADER__bindgen_ty_1 { - pub __bindgen_anon_1: _KUMS_CONTEXT_HEADER__bindgen_ty_1__bindgen_ty_1, - pub Flags: ULONG64, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KUMS_CONTEXT_HEADER__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u64; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__KUMS_CONTEXT_HEADER__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_KUMS_CONTEXT_HEADER__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(_KUMS_CONTEXT_HEADER__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_KUMS_CONTEXT_HEADER__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_KUMS_CONTEXT_HEADER__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _KUMS_CONTEXT_HEADER__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn Volatile(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_Volatile(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 63u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 63u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Volatile: ULONG64, - Reserved: ULONG64, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Volatile: u64 = unsafe { ::core::mem::transmute(Volatile) }; - Volatile as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 63u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__KUMS_CONTEXT_HEADER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KUMS_CONTEXT_HEADER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KUMS_CONTEXT_HEADER__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_KUMS_CONTEXT_HEADER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KUMS_CONTEXT_HEADER__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_KUMS_CONTEXT_HEADER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _KUMS_CONTEXT_HEADER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__KUMS_CONTEXT_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_KUMS_CONTEXT_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KUMS_CONTEXT_HEADER>(), - 112usize, - concat!("Size of: ", stringify!(_KUMS_CONTEXT_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_KUMS_CONTEXT_HEADER>(), - 8usize, - concat!("Alignment of ", stringify!(_KUMS_CONTEXT_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P1Home) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER), - "::", - stringify!(P1Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P2Home) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER), - "::", - stringify!(P2Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P3Home) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER), - "::", - stringify!(P3Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).P4Home) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER), - "::", - stringify!(P4Home), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StackTop) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER), - "::", - stringify!(StackTop), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StackSize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER), - "::", - stringify!(StackSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RspOffset) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER), - "::", - stringify!(RspOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rip) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER), - "::", - stringify!(Rip), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FltSave) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER), - "::", - stringify!(FltSave), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TrapFrame) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER), - "::", - stringify!(TrapFrame), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExceptionFrame) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER), - "::", - stringify!(ExceptionFrame), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceThread) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER), - "::", - stringify!(SourceThread), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Return) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_KUMS_CONTEXT_HEADER), - "::", - stringify!(Return), - ), - ); -} -impl Default for _KUMS_CONTEXT_HEADER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KUMS_CONTEXT_HEADER = _KUMS_CONTEXT_HEADER; -pub type PKUMS_CONTEXT_HEADER = *mut _KUMS_CONTEXT_HEADER; -pub mod _INTERLOCKED_RESULT { - pub type Type = ::core::ffi::c_int; - pub const ResultNegative: Type = 1; - pub const ResultZero: Type = 0; - pub const ResultPositive: Type = 2; -} -pub use self::_INTERLOCKED_RESULT::Type as INTERLOCKED_RESULT; -pub mod _SYSTEM_FIRMWARE_TABLE_ACTION { - pub type Type = ::core::ffi::c_int; - pub const SystemFirmwareTable_Enumerate: Type = 0; - pub const SystemFirmwareTable_Get: Type = 1; -} -pub use self::_SYSTEM_FIRMWARE_TABLE_ACTION::Type as SYSTEM_FIRMWARE_TABLE_ACTION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SYSTEM_FIRMWARE_TABLE_INFORMATION { - pub ProviderSignature: ULONG, - pub Action: SYSTEM_FIRMWARE_TABLE_ACTION, - pub TableID: ULONG, - pub TableBufferLength: ULONG, - pub TableBuffer: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__SYSTEM_FIRMWARE_TABLE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_FIRMWARE_TABLE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_FIRMWARE_TABLE_INFORMATION>(), - 20usize, - concat!("Size of: ", stringify!(_SYSTEM_FIRMWARE_TABLE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_FIRMWARE_TABLE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_SYSTEM_FIRMWARE_TABLE_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProviderSignature) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_FIRMWARE_TABLE_INFORMATION), - "::", - stringify!(ProviderSignature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Action) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_FIRMWARE_TABLE_INFORMATION), - "::", - stringify!(Action), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TableID) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_FIRMWARE_TABLE_INFORMATION), - "::", - stringify!(TableID), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TableBufferLength) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_FIRMWARE_TABLE_INFORMATION), - "::", - stringify!(TableBufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TableBuffer) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_FIRMWARE_TABLE_INFORMATION), - "::", - stringify!(TableBuffer), - ), - ); -} -impl Default for _SYSTEM_FIRMWARE_TABLE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SYSTEM_FIRMWARE_TABLE_INFORMATION = _SYSTEM_FIRMWARE_TABLE_INFORMATION; -pub type PSYSTEM_FIRMWARE_TABLE_INFORMATION = *mut _SYSTEM_FIRMWARE_TABLE_INFORMATION; -pub type PFNFTH = ::core::option::Option< - unsafe extern "C" fn( - SystemFirmwareTableInfo: PSYSTEM_FIRMWARE_TABLE_INFORMATION, - ) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SYSTEM_FIRMWARE_TABLE_HANDLER { - pub ProviderSignature: ULONG, - pub Register: BOOLEAN, - pub FirmwareTableHandler: PFNFTH, - pub DriverObject: PVOID, -} -#[test] -fn bindgen_test_layout__SYSTEM_FIRMWARE_TABLE_HANDLER() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_FIRMWARE_TABLE_HANDLER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_FIRMWARE_TABLE_HANDLER>(), - 24usize, - concat!("Size of: ", stringify!(_SYSTEM_FIRMWARE_TABLE_HANDLER)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_FIRMWARE_TABLE_HANDLER>(), - 8usize, - concat!("Alignment of ", stringify!(_SYSTEM_FIRMWARE_TABLE_HANDLER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProviderSignature) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_FIRMWARE_TABLE_HANDLER), - "::", - stringify!(ProviderSignature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Register) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_FIRMWARE_TABLE_HANDLER), - "::", - stringify!(Register), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FirmwareTableHandler) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_FIRMWARE_TABLE_HANDLER), - "::", - stringify!(FirmwareTableHandler), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverObject) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_FIRMWARE_TABLE_HANDLER), - "::", - stringify!(DriverObject), - ), - ); -} -impl Default for _SYSTEM_FIRMWARE_TABLE_HANDLER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SYSTEM_FIRMWARE_TABLE_HANDLER = _SYSTEM_FIRMWARE_TABLE_HANDLER; -pub type PSYSTEM_FIRMWARE_TABLE_HANDLER = *mut _SYSTEM_FIRMWARE_TABLE_HANDLER; -pub type PTIMER_APC_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(TimerContext: PVOID, TimerLowValue: ULONG, TimerHighValue: LONG), ->; -pub mod _TIMER_SET_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const TimerSetCoalescableTimer: Type = 0; - pub const MaxTimerInfoClass: Type = 1; -} -pub use self::_TIMER_SET_INFORMATION_CLASS::Type as TIMER_SET_INFORMATION_CLASS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _TIMER_SET_COALESCABLE_TIMER_INFO { - pub DueTime: LARGE_INTEGER, - pub TimerApcRoutine: PTIMER_APC_ROUTINE, - pub TimerContext: PVOID, - pub WakeContext: *mut _COUNTED_REASON_CONTEXT, - pub Period: ULONG, - pub TolerableDelay: ULONG, - pub PreviousState: PBOOLEAN, -} -#[test] -fn bindgen_test_layout__TIMER_SET_COALESCABLE_TIMER_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_TIMER_SET_COALESCABLE_TIMER_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TIMER_SET_COALESCABLE_TIMER_INFO>(), - 48usize, - concat!("Size of: ", stringify!(_TIMER_SET_COALESCABLE_TIMER_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_TIMER_SET_COALESCABLE_TIMER_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_TIMER_SET_COALESCABLE_TIMER_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DueTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TIMER_SET_COALESCABLE_TIMER_INFO), - "::", - stringify!(DueTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimerApcRoutine) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TIMER_SET_COALESCABLE_TIMER_INFO), - "::", - stringify!(TimerApcRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimerContext) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TIMER_SET_COALESCABLE_TIMER_INFO), - "::", - stringify!(TimerContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WakeContext) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TIMER_SET_COALESCABLE_TIMER_INFO), - "::", - stringify!(WakeContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Period) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_TIMER_SET_COALESCABLE_TIMER_INFO), - "::", - stringify!(Period), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TolerableDelay) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_TIMER_SET_COALESCABLE_TIMER_INFO), - "::", - stringify!(TolerableDelay), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PreviousState) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_TIMER_SET_COALESCABLE_TIMER_INFO), - "::", - stringify!(PreviousState), - ), - ); -} -impl Default for _TIMER_SET_COALESCABLE_TIMER_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TIMER_SET_COALESCABLE_TIMER_INFO = _TIMER_SET_COALESCABLE_TIMER_INFO; -pub type PTIMER_SET_COALESCABLE_TIMER_INFO = *mut _TIMER_SET_COALESCABLE_TIMER_INFO; -pub type PDRIVER_VERIFIER_THUNK_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID) -> ULONG_PTR, ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DRIVER_VERIFIER_THUNK_PAIRS { - pub PristineRoutine: PDRIVER_VERIFIER_THUNK_ROUTINE, - pub NewRoutine: PDRIVER_VERIFIER_THUNK_ROUTINE, -} -#[test] -fn bindgen_test_layout__DRIVER_VERIFIER_THUNK_PAIRS() { - const UNINIT: ::core::mem::MaybeUninit<_DRIVER_VERIFIER_THUNK_PAIRS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DRIVER_VERIFIER_THUNK_PAIRS>(), - 16usize, - concat!("Size of: ", stringify!(_DRIVER_VERIFIER_THUNK_PAIRS)), - ); - assert_eq!( - ::core::mem::align_of::<_DRIVER_VERIFIER_THUNK_PAIRS>(), - 8usize, - concat!("Alignment of ", stringify!(_DRIVER_VERIFIER_THUNK_PAIRS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PristineRoutine) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_VERIFIER_THUNK_PAIRS), - "::", - stringify!(PristineRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NewRoutine) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DRIVER_VERIFIER_THUNK_PAIRS), - "::", - stringify!(NewRoutine), - ), - ); -} -pub type DRIVER_VERIFIER_THUNK_PAIRS = _DRIVER_VERIFIER_THUNK_PAIRS; -pub type PDRIVER_VERIFIER_THUNK_PAIRS = *mut _DRIVER_VERIFIER_THUNK_PAIRS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _XSTATE_FEATURE { - pub Offset: ULONG, - pub Size: ULONG, -} -#[test] -fn bindgen_test_layout__XSTATE_FEATURE() { - const UNINIT: ::core::mem::MaybeUninit<_XSTATE_FEATURE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_XSTATE_FEATURE>(), - 8usize, - concat!("Size of: ", stringify!(_XSTATE_FEATURE)), - ); - assert_eq!( - ::core::mem::align_of::<_XSTATE_FEATURE>(), - 4usize, - concat!("Alignment of ", stringify!(_XSTATE_FEATURE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_FEATURE), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_XSTATE_FEATURE), "::", stringify!(Size)), - ); -} -pub type XSTATE_FEATURE = _XSTATE_FEATURE; -pub type PXSTATE_FEATURE = *mut _XSTATE_FEATURE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _XSTATE_CONFIGURATION { - pub EnabledFeatures: ULONG64, - pub EnabledVolatileFeatures: ULONG64, - pub Size: ULONG, - pub __bindgen_anon_1: _XSTATE_CONFIGURATION__bindgen_ty_1, - pub Features: [XSTATE_FEATURE; 64usize], - pub EnabledSupervisorFeatures: ULONG64, - pub AlignedFeatures: ULONG64, - pub AllFeatureSize: ULONG, - pub AllFeatures: [ULONG; 64usize], - pub EnabledUserVisibleSupervisorFeatures: ULONG64, - pub ExtendedFeatureDisableFeatures: ULONG64, - pub AllNonLargeFeatureSize: ULONG, - pub Spare: ULONG, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _XSTATE_CONFIGURATION__bindgen_ty_1 { - pub ControlFlags: ULONG, - pub __bindgen_anon_1: _XSTATE_CONFIGURATION__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _XSTATE_CONFIGURATION__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - pub __bindgen_padding_0: [u8; 3usize], -} -#[test] -fn bindgen_test_layout__XSTATE_CONFIGURATION__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_XSTATE_CONFIGURATION__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_XSTATE_CONFIGURATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_XSTATE_CONFIGURATION__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_XSTATE_CONFIGURATION__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _XSTATE_CONFIGURATION__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn OptimizedSave(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_OptimizedSave(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn CompactionEnabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_CompactionEnabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ExtendedFeatureDisable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_ExtendedFeatureDisable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - OptimizedSave: ULONG, - CompactionEnabled: ULONG, - ExtendedFeatureDisable: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let OptimizedSave: u32 = unsafe { - ::core::mem::transmute(OptimizedSave) - }; - OptimizedSave as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let CompactionEnabled: u32 = unsafe { - ::core::mem::transmute(CompactionEnabled) - }; - CompactionEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let ExtendedFeatureDisable: u32 = unsafe { - ::core::mem::transmute(ExtendedFeatureDisable) - }; - ExtendedFeatureDisable as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__XSTATE_CONFIGURATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_XSTATE_CONFIGURATION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_XSTATE_CONFIGURATION__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_XSTATE_CONFIGURATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_XSTATE_CONFIGURATION__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_XSTATE_CONFIGURATION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ControlFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONFIGURATION__bindgen_ty_1), - "::", - stringify!(ControlFlags), - ), - ); -} -impl Default for _XSTATE_CONFIGURATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__XSTATE_CONFIGURATION() { - const UNINIT: ::core::mem::MaybeUninit<_XSTATE_CONFIGURATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_XSTATE_CONFIGURATION>(), - 840usize, - concat!("Size of: ", stringify!(_XSTATE_CONFIGURATION)), - ); - assert_eq!( - ::core::mem::align_of::<_XSTATE_CONFIGURATION>(), - 8usize, - concat!("Alignment of ", stringify!(_XSTATE_CONFIGURATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EnabledFeatures) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONFIGURATION), - "::", - stringify!(EnabledFeatures), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EnabledVolatileFeatures) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONFIGURATION), - "::", - stringify!(EnabledVolatileFeatures), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONFIGURATION), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Features) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONFIGURATION), - "::", - stringify!(Features), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EnabledSupervisorFeatures) as usize - - ptr as usize - }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONFIGURATION), - "::", - stringify!(EnabledSupervisorFeatures), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AlignedFeatures) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONFIGURATION), - "::", - stringify!(AlignedFeatures), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllFeatureSize) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONFIGURATION), - "::", - stringify!(AllFeatureSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllFeatures) as usize - ptr as usize }, - 556usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONFIGURATION), - "::", - stringify!(AllFeatures), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EnabledUserVisibleSupervisorFeatures) as usize - - ptr as usize - }, - 816usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONFIGURATION), - "::", - stringify!(EnabledUserVisibleSupervisorFeatures), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExtendedFeatureDisableFeatures) as usize - - ptr as usize - }, - 824usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONFIGURATION), - "::", - stringify!(ExtendedFeatureDisableFeatures), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllNonLargeFeatureSize) as usize - ptr as usize - }, - 832usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONFIGURATION), - "::", - stringify!(AllNonLargeFeatureSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spare) as usize - ptr as usize }, - 836usize, - concat!( - "Offset of field: ", - stringify!(_XSTATE_CONFIGURATION), - "::", - stringify!(Spare), - ), - ); -} -impl Default for _XSTATE_CONFIGURATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type XSTATE_CONFIGURATION = _XSTATE_CONFIGURATION; -pub type PXSTATE_CONFIGURATION = *mut _XSTATE_CONFIGURATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KUSER_SHARED_DATA { - pub TickCountLowDeprecated: ULONG, - pub TickCountMultiplier: ULONG, - pub InterruptTime: KSYSTEM_TIME, - pub SystemTime: KSYSTEM_TIME, - pub TimeZoneBias: KSYSTEM_TIME, - pub ImageNumberLow: USHORT, - pub ImageNumberHigh: USHORT, - pub NtSystemRoot: [WCHAR; 260usize], - pub MaxStackTraceDepth: ULONG, - pub CryptoExponent: ULONG, - pub TimeZoneId: ULONG, - pub LargePageMinimum: ULONG, - pub AitSamplingValue: ULONG, - pub AppCompatFlag: ULONG, - pub RNGSeedVersion: ULONGLONG, - pub GlobalValidationRunlevel: ULONG, - pub TimeZoneBiasStamp: LONG, - pub NtBuildNumber: ULONG, - pub NtProductType: NT_PRODUCT_TYPE, - pub ProductTypeIsValid: BOOLEAN, - pub Reserved0: [BOOLEAN; 1usize], - pub NativeProcessorArchitecture: USHORT, - pub NtMajorVersion: ULONG, - pub NtMinorVersion: ULONG, - pub ProcessorFeatures: [BOOLEAN; 64usize], - pub Reserved1: ULONG, - pub Reserved3: ULONG, - pub TimeSlip: ULONG, - pub AlternativeArchitecture: ALTERNATIVE_ARCHITECTURE_TYPE, - pub BootId: ULONG, - pub SystemExpirationDate: LARGE_INTEGER, - pub SuiteMask: ULONG, - pub KdDebuggerEnabled: BOOLEAN, - pub __bindgen_anon_1: _KUSER_SHARED_DATA__bindgen_ty_1, - pub CyclesPerYield: USHORT, - pub ActiveConsoleId: ULONG, - pub DismountCount: ULONG, - pub ComPlusPackage: ULONG, - pub LastSystemRITEventTickCount: ULONG, - pub NumberOfPhysicalPages: ULONG, - pub SafeBootMode: BOOLEAN, - pub __bindgen_anon_2: _KUSER_SHARED_DATA__bindgen_ty_2, - pub Reserved12: [UCHAR; 2usize], - pub __bindgen_anon_3: _KUSER_SHARED_DATA__bindgen_ty_3, - pub DataFlagsPad: [ULONG; 1usize], - pub TestRetInstruction: ULONGLONG, - pub QpcFrequency: LONGLONG, - pub SystemCall: ULONG, - pub Reserved2: ULONG, - pub SystemCallPad: [ULONGLONG; 2usize], - pub __bindgen_anon_4: _KUSER_SHARED_DATA__bindgen_ty_4, - pub Cookie: ULONG, - pub CookiePad: [ULONG; 1usize], - pub ConsoleSessionForegroundProcessId: LONGLONG, - pub TimeUpdateLock: ULONGLONG, - pub BaselineSystemTimeQpc: ULONGLONG, - pub BaselineInterruptTimeQpc: ULONGLONG, - pub QpcSystemTimeIncrement: ULONGLONG, - pub QpcInterruptTimeIncrement: ULONGLONG, - pub QpcSystemTimeIncrementShift: UCHAR, - pub QpcInterruptTimeIncrementShift: UCHAR, - pub UnparkedProcessorCount: USHORT, - pub EnclaveFeatureMask: [ULONG; 4usize], - pub TelemetryCoverageRound: ULONG, - pub UserModeGlobalLogger: [USHORT; 16usize], - pub ImageFileExecutionOptions: ULONG, - pub LangGenerationCount: ULONG, - pub Reserved4: ULONGLONG, - pub InterruptTimeBias: ULONGLONG, - pub QpcBias: ULONGLONG, - pub ActiveProcessorCount: ULONG, - pub ActiveGroupCount: UCHAR, - pub Reserved9: UCHAR, - pub __bindgen_anon_5: _KUSER_SHARED_DATA__bindgen_ty_5, - pub TimeZoneBiasEffectiveStart: LARGE_INTEGER, - pub TimeZoneBiasEffectiveEnd: LARGE_INTEGER, - pub XState: XSTATE_CONFIGURATION, - pub FeatureConfigurationChangeStamp: KSYSTEM_TIME, - pub Spare: ULONG, - pub UserPointerAuthMask: ULONG64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KUSER_SHARED_DATA__bindgen_ty_1 { - pub MitigationPolicies: UCHAR, - pub __bindgen_anon_1: _KUSER_SHARED_DATA__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KUSER_SHARED_DATA__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__KUSER_SHARED_DATA__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_KUSER_SHARED_DATA__bindgen_ty_1__bindgen_ty_1>(), - 1usize, - concat!("Size of: ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KUSER_SHARED_DATA__bindgen_ty_1__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _KUSER_SHARED_DATA__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn NXSupportPolicy(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u8) } - } - #[inline] - pub fn set_NXSupportPolicy(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 2u8, val as u64) - } - } - #[inline] - pub fn SEHValidationPolicy(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u8) } - } - #[inline] - pub fn set_SEHValidationPolicy(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 2u8, val as u64) - } - } - #[inline] - pub fn CurDirDevicesSkippedForDlls(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u8) } - } - #[inline] - pub fn set_CurDirDevicesSkippedForDlls(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 2u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u8) } - } - #[inline] - pub fn set_Reserved(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 2u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - NXSupportPolicy: UCHAR, - SEHValidationPolicy: UCHAR, - CurDirDevicesSkippedForDlls: UCHAR, - Reserved: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 2u8, - { - let NXSupportPolicy: u8 = unsafe { - ::core::mem::transmute(NXSupportPolicy) - }; - NXSupportPolicy as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 2u8, - { - let SEHValidationPolicy: u8 = unsafe { - ::core::mem::transmute(SEHValidationPolicy) - }; - SEHValidationPolicy as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 2u8, - { - let CurDirDevicesSkippedForDlls: u8 = unsafe { - ::core::mem::transmute(CurDirDevicesSkippedForDlls) - }; - CurDirDevicesSkippedForDlls as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 2u8, - { - let Reserved: u8 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__KUSER_SHARED_DATA__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KUSER_SHARED_DATA__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KUSER_SHARED_DATA__bindgen_ty_1>(), - 1usize, - concat!("Size of: ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KUSER_SHARED_DATA__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MitigationPolicies) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_1), - "::", - stringify!(MitigationPolicies), - ), - ); -} -impl Default for _KUSER_SHARED_DATA__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KUSER_SHARED_DATA__bindgen_ty_2 { - pub VirtualizationFlags: UCHAR, -} -#[test] -fn bindgen_test_layout__KUSER_SHARED_DATA__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_KUSER_SHARED_DATA__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KUSER_SHARED_DATA__bindgen_ty_2>(), - 1usize, - concat!("Size of: ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_KUSER_SHARED_DATA__bindgen_ty_2>(), - 1usize, - concat!("Alignment of ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_2)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VirtualizationFlags) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_2), - "::", - stringify!(VirtualizationFlags), - ), - ); -} -impl Default for _KUSER_SHARED_DATA__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KUSER_SHARED_DATA__bindgen_ty_3 { - pub SharedDataFlags: ULONG, - pub __bindgen_anon_1: _KUSER_SHARED_DATA__bindgen_ty_3__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KUSER_SHARED_DATA__bindgen_ty_3__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__KUSER_SHARED_DATA__bindgen_ty_3__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_KUSER_SHARED_DATA__bindgen_ty_3__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_3__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KUSER_SHARED_DATA__bindgen_ty_3__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_3__bindgen_ty_1), - ), - ); -} -impl _KUSER_SHARED_DATA__bindgen_ty_3__bindgen_ty_1 { - #[inline] - pub fn DbgErrorPortPresent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_DbgErrorPortPresent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgElevationEnabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_DbgElevationEnabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgVirtEnabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_DbgVirtEnabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgInstallerDetectEnabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_DbgInstallerDetectEnabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgLkgEnabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_DbgLkgEnabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgDynProcessorEnabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_DbgDynProcessorEnabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgConsoleBrokerEnabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_DbgConsoleBrokerEnabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgSecureBootEnabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_DbgSecureBootEnabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgMultiSessionSku(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_DbgMultiSessionSku(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgMultiUsersInSessionSku(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_DbgMultiUsersInSessionSku(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgStateSeparationEnabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_DbgStateSeparationEnabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn SpareBits(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 21u8) as u32) } - } - #[inline] - pub fn set_SpareBits(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 21u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - DbgErrorPortPresent: ULONG, - DbgElevationEnabled: ULONG, - DbgVirtEnabled: ULONG, - DbgInstallerDetectEnabled: ULONG, - DbgLkgEnabled: ULONG, - DbgDynProcessorEnabled: ULONG, - DbgConsoleBrokerEnabled: ULONG, - DbgSecureBootEnabled: ULONG, - DbgMultiSessionSku: ULONG, - DbgMultiUsersInSessionSku: ULONG, - DbgStateSeparationEnabled: ULONG, - SpareBits: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let DbgErrorPortPresent: u32 = unsafe { - ::core::mem::transmute(DbgErrorPortPresent) - }; - DbgErrorPortPresent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let DbgElevationEnabled: u32 = unsafe { - ::core::mem::transmute(DbgElevationEnabled) - }; - DbgElevationEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let DbgVirtEnabled: u32 = unsafe { - ::core::mem::transmute(DbgVirtEnabled) - }; - DbgVirtEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let DbgInstallerDetectEnabled: u32 = unsafe { - ::core::mem::transmute(DbgInstallerDetectEnabled) - }; - DbgInstallerDetectEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let DbgLkgEnabled: u32 = unsafe { - ::core::mem::transmute(DbgLkgEnabled) - }; - DbgLkgEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let DbgDynProcessorEnabled: u32 = unsafe { - ::core::mem::transmute(DbgDynProcessorEnabled) - }; - DbgDynProcessorEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let DbgConsoleBrokerEnabled: u32 = unsafe { - ::core::mem::transmute(DbgConsoleBrokerEnabled) - }; - DbgConsoleBrokerEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let DbgSecureBootEnabled: u32 = unsafe { - ::core::mem::transmute(DbgSecureBootEnabled) - }; - DbgSecureBootEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let DbgMultiSessionSku: u32 = unsafe { - ::core::mem::transmute(DbgMultiSessionSku) - }; - DbgMultiSessionSku as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let DbgMultiUsersInSessionSku: u32 = unsafe { - ::core::mem::transmute(DbgMultiUsersInSessionSku) - }; - DbgMultiUsersInSessionSku as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let DbgStateSeparationEnabled: u32 = unsafe { - ::core::mem::transmute(DbgStateSeparationEnabled) - }; - DbgStateSeparationEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 21u8, - { - let SpareBits: u32 = unsafe { ::core::mem::transmute(SpareBits) }; - SpareBits as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__KUSER_SHARED_DATA__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit<_KUSER_SHARED_DATA__bindgen_ty_3> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KUSER_SHARED_DATA__bindgen_ty_3>(), - 4usize, - concat!("Size of: ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_KUSER_SHARED_DATA__bindgen_ty_3>(), - 4usize, - concat!("Alignment of ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SharedDataFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_3), - "::", - stringify!(SharedDataFlags), - ), - ); -} -impl Default for _KUSER_SHARED_DATA__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KUSER_SHARED_DATA__bindgen_ty_4 { - pub TickCount: KSYSTEM_TIME, - pub TickCountQuad: ULONG64, - pub __bindgen_anon_1: _KUSER_SHARED_DATA__bindgen_ty_4__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KUSER_SHARED_DATA__bindgen_ty_4__bindgen_ty_1 { - pub ReservedTickCountOverlay: [ULONG; 3usize], - pub TickCountPad: [ULONG; 1usize], -} -#[test] -fn bindgen_test_layout__KUSER_SHARED_DATA__bindgen_ty_4__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _KUSER_SHARED_DATA__bindgen_ty_4__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KUSER_SHARED_DATA__bindgen_ty_4__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_4__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KUSER_SHARED_DATA__bindgen_ty_4__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_4__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReservedTickCountOverlay) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_4__bindgen_ty_1), - "::", - stringify!(ReservedTickCountOverlay), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TickCountPad) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_4__bindgen_ty_1), - "::", - stringify!(TickCountPad), - ), - ); -} -#[test] -fn bindgen_test_layout__KUSER_SHARED_DATA__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit<_KUSER_SHARED_DATA__bindgen_ty_4> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KUSER_SHARED_DATA__bindgen_ty_4>(), - 16usize, - concat!("Size of: ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_4)), - ); - assert_eq!( - ::core::mem::align_of::<_KUSER_SHARED_DATA__bindgen_ty_4>(), - 8usize, - concat!("Alignment of ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_4)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TickCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_4), - "::", - stringify!(TickCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TickCountQuad) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_4), - "::", - stringify!(TickCountQuad), - ), - ); -} -impl Default for _KUSER_SHARED_DATA__bindgen_ty_4 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KUSER_SHARED_DATA__bindgen_ty_5 { - pub QpcData: USHORT, - pub __bindgen_anon_1: _KUSER_SHARED_DATA__bindgen_ty_5__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KUSER_SHARED_DATA__bindgen_ty_5__bindgen_ty_1 { - pub QpcBypassEnabled: UCHAR, - pub QpcShift: UCHAR, -} -#[test] -fn bindgen_test_layout__KUSER_SHARED_DATA__bindgen_ty_5__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _KUSER_SHARED_DATA__bindgen_ty_5__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KUSER_SHARED_DATA__bindgen_ty_5__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_5__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KUSER_SHARED_DATA__bindgen_ty_5__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_5__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QpcBypassEnabled) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(QpcBypassEnabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QpcShift) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(QpcShift), - ), - ); -} -#[test] -fn bindgen_test_layout__KUSER_SHARED_DATA__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit<_KUSER_SHARED_DATA__bindgen_ty_5> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KUSER_SHARED_DATA__bindgen_ty_5>(), - 2usize, - concat!("Size of: ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_5)), - ); - assert_eq!( - ::core::mem::align_of::<_KUSER_SHARED_DATA__bindgen_ty_5>(), - 2usize, - concat!("Alignment of ", stringify!(_KUSER_SHARED_DATA__bindgen_ty_5)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QpcData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA__bindgen_ty_5), - "::", - stringify!(QpcData), - ), - ); -} -impl Default for _KUSER_SHARED_DATA__bindgen_ty_5 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__KUSER_SHARED_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_KUSER_SHARED_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KUSER_SHARED_DATA>(), - 1848usize, - concat!("Size of: ", stringify!(_KUSER_SHARED_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_KUSER_SHARED_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_KUSER_SHARED_DATA)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TickCountLowDeprecated) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(TickCountLowDeprecated), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TickCountMultiplier) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(TickCountMultiplier), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(InterruptTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SystemTime) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(SystemTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimeZoneBias) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(TimeZoneBias), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ImageNumberLow) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(ImageNumberLow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ImageNumberHigh) as usize - ptr as usize }, - 46usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(ImageNumberHigh), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NtSystemRoot) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(NtSystemRoot), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxStackTraceDepth) as usize - ptr as usize - }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(MaxStackTraceDepth), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CryptoExponent) as usize - ptr as usize }, - 572usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(CryptoExponent), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimeZoneId) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(TimeZoneId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LargePageMinimum) as usize - ptr as usize - }, - 580usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(LargePageMinimum), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AitSamplingValue) as usize - ptr as usize - }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(AitSamplingValue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AppCompatFlag) as usize - ptr as usize }, - 588usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(AppCompatFlag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RNGSeedVersion) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(RNGSeedVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GlobalValidationRunlevel) as usize - - ptr as usize - }, - 600usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(GlobalValidationRunlevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TimeZoneBiasStamp) as usize - ptr as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(TimeZoneBiasStamp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NtBuildNumber) as usize - ptr as usize }, - 608usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(NtBuildNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NtProductType) as usize - ptr as usize }, - 612usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(NtProductType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProductTypeIsValid) as usize - ptr as usize - }, - 616usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(ProductTypeIsValid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved0) as usize - ptr as usize }, - 617usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(Reserved0), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NativeProcessorArchitecture) as usize - - ptr as usize - }, - 618usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(NativeProcessorArchitecture), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NtMajorVersion) as usize - ptr as usize }, - 620usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(NtMajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NtMinorVersion) as usize - ptr as usize }, - 624usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(NtMinorVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProcessorFeatures) as usize - ptr as usize - }, - 628usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(ProcessorFeatures), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 692usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved3) as usize - ptr as usize }, - 696usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(Reserved3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimeSlip) as usize - ptr as usize }, - 700usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(TimeSlip), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AlternativeArchitecture) as usize - ptr as usize - }, - 704usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(AlternativeArchitecture), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BootId) as usize - ptr as usize }, - 708usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(BootId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SystemExpirationDate) as usize - ptr as usize - }, - 712usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(SystemExpirationDate), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SuiteMask) as usize - ptr as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(SuiteMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KdDebuggerEnabled) as usize - ptr as usize - }, - 724usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(KdDebuggerEnabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CyclesPerYield) as usize - ptr as usize }, - 726usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(CyclesPerYield), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ActiveConsoleId) as usize - ptr as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(ActiveConsoleId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DismountCount) as usize - ptr as usize }, - 732usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(DismountCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ComPlusPackage) as usize - ptr as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(ComPlusPackage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastSystemRITEventTickCount) as usize - - ptr as usize - }, - 740usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(LastSystemRITEventTickCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfPhysicalPages) as usize - ptr as usize - }, - 744usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(NumberOfPhysicalPages), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SafeBootMode) as usize - ptr as usize }, - 748usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(SafeBootMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved12) as usize - ptr as usize }, - 750usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(Reserved12), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataFlagsPad) as usize - ptr as usize }, - 756usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(DataFlagsPad), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TestRetInstruction) as usize - ptr as usize - }, - 760usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(TestRetInstruction), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QpcFrequency) as usize - ptr as usize }, - 768usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(QpcFrequency), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SystemCall) as usize - ptr as usize }, - 776usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(SystemCall), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 780usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SystemCallPad) as usize - ptr as usize }, - 784usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(SystemCallPad), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cookie) as usize - ptr as usize }, - 816usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(Cookie), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CookiePad) as usize - ptr as usize }, - 820usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(CookiePad), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ConsoleSessionForegroundProcessId) as usize - - ptr as usize - }, - 824usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(ConsoleSessionForegroundProcessId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimeUpdateLock) as usize - ptr as usize }, - 832usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(TimeUpdateLock), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BaselineSystemTimeQpc) as usize - ptr as usize - }, - 840usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(BaselineSystemTimeQpc), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BaselineInterruptTimeQpc) as usize - - ptr as usize - }, - 848usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(BaselineInterruptTimeQpc), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QpcSystemTimeIncrement) as usize - ptr as usize - }, - 856usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(QpcSystemTimeIncrement), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QpcInterruptTimeIncrement) as usize - - ptr as usize - }, - 864usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(QpcInterruptTimeIncrement), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QpcSystemTimeIncrementShift) as usize - - ptr as usize - }, - 872usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(QpcSystemTimeIncrementShift), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QpcInterruptTimeIncrementShift) as usize - - ptr as usize - }, - 873usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(QpcInterruptTimeIncrementShift), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnparkedProcessorCount) as usize - ptr as usize - }, - 874usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(UnparkedProcessorCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EnclaveFeatureMask) as usize - ptr as usize - }, - 876usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(EnclaveFeatureMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TelemetryCoverageRound) as usize - ptr as usize - }, - 892usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(TelemetryCoverageRound), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserModeGlobalLogger) as usize - ptr as usize - }, - 896usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(UserModeGlobalLogger), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ImageFileExecutionOptions) as usize - - ptr as usize - }, - 928usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(ImageFileExecutionOptions), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LangGenerationCount) as usize - ptr as usize - }, - 932usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(LangGenerationCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved4) as usize - ptr as usize }, - 936usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(Reserved4), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterruptTimeBias) as usize - ptr as usize - }, - 944usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(InterruptTimeBias), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QpcBias) as usize - ptr as usize }, - 952usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(QpcBias), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ActiveProcessorCount) as usize - ptr as usize - }, - 960usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(ActiveProcessorCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ActiveGroupCount) as usize - ptr as usize - }, - 964usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(ActiveGroupCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved9) as usize - ptr as usize }, - 965usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(Reserved9), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TimeZoneBiasEffectiveStart) as usize - - ptr as usize - }, - 968usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(TimeZoneBiasEffectiveStart), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TimeZoneBiasEffectiveEnd) as usize - - ptr as usize - }, - 976usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(TimeZoneBiasEffectiveEnd), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).XState) as usize - ptr as usize }, - 984usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(XState), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FeatureConfigurationChangeStamp) as usize - - ptr as usize - }, - 1824usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(FeatureConfigurationChangeStamp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spare) as usize - ptr as usize }, - 1836usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(Spare), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserPointerAuthMask) as usize - ptr as usize - }, - 1840usize, - concat!( - "Offset of field: ", - stringify!(_KUSER_SHARED_DATA), - "::", - stringify!(UserPointerAuthMask), - ), - ); -} -impl Default for _KUSER_SHARED_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KUSER_SHARED_DATA = _KUSER_SHARED_DATA; -pub type PKUSER_SHARED_DATA = *mut _KUSER_SHARED_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CM_PCCARD_DEVICE_DATA { - pub Flags: UCHAR, - pub ErrorCode: UCHAR, - pub Reserved: USHORT, - pub BusData: ULONG, - pub DeviceId: ULONG, - pub LegacyBaseAddress: ULONG, - pub IRQMap: [UCHAR; 16usize], -} -#[test] -fn bindgen_test_layout__CM_PCCARD_DEVICE_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_CM_PCCARD_DEVICE_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CM_PCCARD_DEVICE_DATA>(), - 32usize, - concat!("Size of: ", stringify!(_CM_PCCARD_DEVICE_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_CM_PCCARD_DEVICE_DATA>(), - 4usize, - concat!("Alignment of ", stringify!(_CM_PCCARD_DEVICE_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CM_PCCARD_DEVICE_DATA), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorCode) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_CM_PCCARD_DEVICE_DATA), - "::", - stringify!(ErrorCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CM_PCCARD_DEVICE_DATA), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusData) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CM_PCCARD_DEVICE_DATA), - "::", - stringify!(BusData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CM_PCCARD_DEVICE_DATA), - "::", - stringify!(DeviceId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LegacyBaseAddress) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CM_PCCARD_DEVICE_DATA), - "::", - stringify!(LegacyBaseAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IRQMap) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CM_PCCARD_DEVICE_DATA), - "::", - stringify!(IRQMap), - ), - ); -} -pub type CM_PCCARD_DEVICE_DATA = _CM_PCCARD_DEVICE_DATA; -pub type PCM_PCCARD_DEVICE_DATA = *mut _CM_PCCARD_DEVICE_DATA; -pub mod _CONFIGURATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const ArcSystem: Type = 0; - pub const CentralProcessor: Type = 1; - pub const FloatingPointProcessor: Type = 2; - pub const PrimaryIcache: Type = 3; - pub const PrimaryDcache: Type = 4; - pub const SecondaryIcache: Type = 5; - pub const SecondaryDcache: Type = 6; - pub const SecondaryCache: Type = 7; - pub const EisaAdapter: Type = 8; - pub const TcAdapter: Type = 9; - pub const ScsiAdapter: Type = 10; - pub const DtiAdapter: Type = 11; - pub const MultiFunctionAdapter: Type = 12; - pub const DiskController: Type = 13; - pub const TapeController: Type = 14; - pub const CdromController: Type = 15; - pub const WormController: Type = 16; - pub const SerialController: Type = 17; - pub const NetworkController: Type = 18; - pub const DisplayController: Type = 19; - pub const ParallelController: Type = 20; - pub const PointerController: Type = 21; - pub const KeyboardController: Type = 22; - pub const AudioController: Type = 23; - pub const OtherController: Type = 24; - pub const DiskPeripheral: Type = 25; - pub const FloppyDiskPeripheral: Type = 26; - pub const TapePeripheral: Type = 27; - pub const ModemPeripheral: Type = 28; - pub const MonitorPeripheral: Type = 29; - pub const PrinterPeripheral: Type = 30; - pub const PointerPeripheral: Type = 31; - pub const KeyboardPeripheral: Type = 32; - pub const TerminalPeripheral: Type = 33; - pub const OtherPeripheral: Type = 34; - pub const LinePeripheral: Type = 35; - pub const NetworkPeripheral: Type = 36; - pub const SystemMemory: Type = 37; - pub const DockingInformation: Type = 38; - pub const RealModeIrqRoutingTable: Type = 39; - pub const RealModePCIEnumeration: Type = 40; - pub const MaximumType: Type = 41; -} -pub use self::_CONFIGURATION_TYPE::Type as CONFIGURATION_TYPE; -pub type PCONFIGURATION_TYPE = *mut _CONFIGURATION_TYPE::Type; -pub type PEXPAND_STACK_CALLOUT = ::core::option::Option< - unsafe extern "C" fn(arg1: PVOID), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ZONE_SEGMENT_HEADER { - pub SegmentList: SINGLE_LIST_ENTRY, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__ZONE_SEGMENT_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_ZONE_SEGMENT_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ZONE_SEGMENT_HEADER>(), - 16usize, - concat!("Size of: ", stringify!(_ZONE_SEGMENT_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_ZONE_SEGMENT_HEADER>(), - 8usize, - concat!("Alignment of ", stringify!(_ZONE_SEGMENT_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegmentList) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ZONE_SEGMENT_HEADER), - "::", - stringify!(SegmentList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ZONE_SEGMENT_HEADER), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _ZONE_SEGMENT_HEADER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ZONE_SEGMENT_HEADER = _ZONE_SEGMENT_HEADER; -pub type PZONE_SEGMENT_HEADER = *mut _ZONE_SEGMENT_HEADER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ZONE_HEADER { - pub FreeList: SINGLE_LIST_ENTRY, - pub SegmentList: SINGLE_LIST_ENTRY, - pub BlockSize: ULONG, - pub TotalSegmentSize: ULONG, -} -#[test] -fn bindgen_test_layout__ZONE_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_ZONE_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ZONE_HEADER>(), - 24usize, - concat!("Size of: ", stringify!(_ZONE_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_ZONE_HEADER>(), - 8usize, - concat!("Alignment of ", stringify!(_ZONE_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeList) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ZONE_HEADER), - "::", - stringify!(FreeList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegmentList) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ZONE_HEADER), - "::", - stringify!(SegmentList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BlockSize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ZONE_HEADER), - "::", - stringify!(BlockSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalSegmentSize) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_ZONE_HEADER), - "::", - stringify!(TotalSegmentSize), - ), - ); -} -impl Default for _ZONE_HEADER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ZONE_HEADER = _ZONE_HEADER; -pub type PZONE_HEADER = *mut _ZONE_HEADER; -pub type UUID = GUID; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PHYSICAL_MEMORY_RANGE { - pub BaseAddress: PHYSICAL_ADDRESS, - pub NumberOfBytes: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__PHYSICAL_MEMORY_RANGE() { - const UNINIT: ::core::mem::MaybeUninit<_PHYSICAL_MEMORY_RANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PHYSICAL_MEMORY_RANGE>(), - 16usize, - concat!("Size of: ", stringify!(_PHYSICAL_MEMORY_RANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_PHYSICAL_MEMORY_RANGE>(), - 8usize, - concat!("Alignment of ", stringify!(_PHYSICAL_MEMORY_RANGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseAddress) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_MEMORY_RANGE), - "::", - stringify!(BaseAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfBytes) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_MEMORY_RANGE), - "::", - stringify!(NumberOfBytes), - ), - ); -} -impl Default for _PHYSICAL_MEMORY_RANGE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PHYSICAL_MEMORY_RANGE = _PHYSICAL_MEMORY_RANGE; -pub type PPHYSICAL_MEMORY_RANGE = *mut _PHYSICAL_MEMORY_RANGE; -pub type PMM_ROTATE_COPY_CALLBACK_FUNCTION = ::core::option::Option< - unsafe extern "C" fn( - DestinationMdl: PMDL, - SourceMdl: PMDL, - Context: PVOID, - ) -> NTSTATUS, ->; -pub mod _MM_ROTATE_DIRECTION { - pub type Type = ::core::ffi::c_int; - pub const MmToFrameBuffer: Type = 0; - pub const MmToFrameBufferNoCopy: Type = 1; - pub const MmToRegularMemory: Type = 2; - pub const MmToRegularMemoryNoCopy: Type = 3; - pub const MmMaximumRotateDirection: Type = 4; -} -pub use self::_MM_ROTATE_DIRECTION::Type as MM_ROTATE_DIRECTION; -pub type PMM_ROTATE_DIRECTION = *mut _MM_ROTATE_DIRECTION::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _MM_COPY_ADDRESS { - pub __bindgen_anon_1: _MM_COPY_ADDRESS__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _MM_COPY_ADDRESS__bindgen_ty_1 { - pub VirtualAddress: PVOID, - pub PhysicalAddress: PHYSICAL_ADDRESS, -} -#[test] -fn bindgen_test_layout__MM_COPY_ADDRESS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_MM_COPY_ADDRESS__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MM_COPY_ADDRESS__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_MM_COPY_ADDRESS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_MM_COPY_ADDRESS__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_MM_COPY_ADDRESS__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VirtualAddress) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MM_COPY_ADDRESS__bindgen_ty_1), - "::", - stringify!(VirtualAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PhysicalAddress) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MM_COPY_ADDRESS__bindgen_ty_1), - "::", - stringify!(PhysicalAddress), - ), - ); -} -impl Default for _MM_COPY_ADDRESS__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__MM_COPY_ADDRESS() { - assert_eq!( - ::core::mem::size_of::<_MM_COPY_ADDRESS>(), - 8usize, - concat!("Size of: ", stringify!(_MM_COPY_ADDRESS)), - ); - assert_eq!( - ::core::mem::align_of::<_MM_COPY_ADDRESS>(), - 8usize, - concat!("Alignment of ", stringify!(_MM_COPY_ADDRESS)), - ); -} -impl Default for _MM_COPY_ADDRESS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MM_COPY_ADDRESS = _MM_COPY_ADDRESS; -pub type PMMCOPY_ADDRESS = *mut _MM_COPY_ADDRESS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PS_CREATE_NOTIFY_INFO { - pub Size: SIZE_T, - pub __bindgen_anon_1: _PS_CREATE_NOTIFY_INFO__bindgen_ty_1, - pub ParentProcessId: HANDLE, - pub CreatingThreadId: CLIENT_ID, - pub FileObject: *mut _FILE_OBJECT, - pub ImageFileName: PCUNICODE_STRING, - pub CommandLine: PCUNICODE_STRING, - pub CreationStatus: NTSTATUS, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PS_CREATE_NOTIFY_INFO__bindgen_ty_1 { - pub Flags: ULONG, - pub __bindgen_anon_1: _PS_CREATE_NOTIFY_INFO__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PS_CREATE_NOTIFY_INFO__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PS_CREATE_NOTIFY_INFO__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PS_CREATE_NOTIFY_INFO__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PS_CREATE_NOTIFY_INFO__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PS_CREATE_NOTIFY_INFO__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PS_CREATE_NOTIFY_INFO__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _PS_CREATE_NOTIFY_INFO__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn FileOpenNameAvailable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_FileOpenNameAvailable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn IsSubsystemProcess(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_IsSubsystemProcess(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 30u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - FileOpenNameAvailable: ULONG, - IsSubsystemProcess: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let FileOpenNameAvailable: u32 = unsafe { - ::core::mem::transmute(FileOpenNameAvailable) - }; - FileOpenNameAvailable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let IsSubsystemProcess: u32 = unsafe { - ::core::mem::transmute(IsSubsystemProcess) - }; - IsSubsystemProcess as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 30u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PS_CREATE_NOTIFY_INFO__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_PS_CREATE_NOTIFY_INFO__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PS_CREATE_NOTIFY_INFO__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PS_CREATE_NOTIFY_INFO__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PS_CREATE_NOTIFY_INFO__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_PS_CREATE_NOTIFY_INFO__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PS_CREATE_NOTIFY_INFO__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _PS_CREATE_NOTIFY_INFO__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PS_CREATE_NOTIFY_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_PS_CREATE_NOTIFY_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PS_CREATE_NOTIFY_INFO>(), - 72usize, - concat!("Size of: ", stringify!(_PS_CREATE_NOTIFY_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_PS_CREATE_NOTIFY_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_PS_CREATE_NOTIFY_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PS_CREATE_NOTIFY_INFO), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParentProcessId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PS_CREATE_NOTIFY_INFO), - "::", - stringify!(ParentProcessId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CreatingThreadId) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PS_CREATE_NOTIFY_INFO), - "::", - stringify!(CreatingThreadId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileObject) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PS_CREATE_NOTIFY_INFO), - "::", - stringify!(FileObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ImageFileName) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PS_CREATE_NOTIFY_INFO), - "::", - stringify!(ImageFileName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CommandLine) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_PS_CREATE_NOTIFY_INFO), - "::", - stringify!(CommandLine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationStatus) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_PS_CREATE_NOTIFY_INFO), - "::", - stringify!(CreationStatus), - ), - ); -} -impl Default for _PS_CREATE_NOTIFY_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PS_CREATE_NOTIFY_INFO = _PS_CREATE_NOTIFY_INFO; -pub type PPS_CREATE_NOTIFY_INFO = *mut _PS_CREATE_NOTIFY_INFO; -pub type PCREATE_PROCESS_NOTIFY_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(ParentId: HANDLE, ProcessId: HANDLE, Create: BOOLEAN), ->; -pub type PCREATE_PROCESS_NOTIFY_ROUTINE_EX = ::core::option::Option< - unsafe extern "C" fn( - Process: PEPROCESS, - ProcessId: HANDLE, - CreateInfo: PPS_CREATE_NOTIFY_INFO, - ), ->; -pub mod _PSCREATEPROCESSNOTIFYTYPE { - pub type Type = ::core::ffi::c_int; - pub const PsCreateProcessNotifySubsystems: Type = 0; -} -pub use self::_PSCREATEPROCESSNOTIFYTYPE::Type as PSCREATEPROCESSNOTIFYTYPE; -pub type PCREATE_THREAD_NOTIFY_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(ProcessId: HANDLE, ThreadId: HANDLE, Create: BOOLEAN), ->; -pub mod _PSCREATETHREADNOTIFYTYPE { - pub type Type = ::core::ffi::c_int; - pub const PsCreateThreadNotifyNonSystem: Type = 0; - pub const PsCreateThreadNotifySubsystems: Type = 1; -} -pub use self::_PSCREATETHREADNOTIFYTYPE::Type as PSCREATETHREADNOTIFYTYPE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IMAGE_INFO { - pub __bindgen_anon_1: _IMAGE_INFO__bindgen_ty_1, - pub ImageBase: PVOID, - pub ImageSelector: ULONG, - pub ImageSize: SIZE_T, - pub ImageSectionNumber: ULONG, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IMAGE_INFO__bindgen_ty_1 { - pub Properties: ULONG, - pub __bindgen_anon_1: _IMAGE_INFO__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IMAGE_INFO__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__IMAGE_INFO__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_IMAGE_INFO__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_IMAGE_INFO__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IMAGE_INFO__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_IMAGE_INFO__bindgen_ty_1__bindgen_ty_1)), - ); -} -impl _IMAGE_INFO__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn ImageAddressingMode(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set_ImageAddressingMode(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn SystemModeImage(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_SystemModeImage(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn ImageMappedToAllPids(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_ImageMappedToAllPids(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn ExtendedInfoPresent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_ExtendedInfoPresent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn MachineTypeMismatch(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } - } - #[inline] - pub fn set_MachineTypeMismatch(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn ImageSignatureLevel(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 4u8) as u32) } - } - #[inline] - pub fn set_ImageSignatureLevel(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 4u8, val as u64) - } - } - #[inline] - pub fn ImageSignatureType(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 3u8) as u32) } - } - #[inline] - pub fn set_ImageSignatureType(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 3u8, val as u64) - } - } - #[inline] - pub fn ImagePartialMap(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } - } - #[inline] - pub fn set_ImagePartialMap(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 12u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 12u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ImageAddressingMode: ULONG, - SystemModeImage: ULONG, - ImageMappedToAllPids: ULONG, - ExtendedInfoPresent: ULONG, - MachineTypeMismatch: ULONG, - ImageSignatureLevel: ULONG, - ImageSignatureType: ULONG, - ImagePartialMap: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let ImageAddressingMode: u32 = unsafe { - ::core::mem::transmute(ImageAddressingMode) - }; - ImageAddressingMode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let SystemModeImage: u32 = unsafe { - ::core::mem::transmute(SystemModeImage) - }; - SystemModeImage as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let ImageMappedToAllPids: u32 = unsafe { - ::core::mem::transmute(ImageMappedToAllPids) - }; - ImageMappedToAllPids as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let ExtendedInfoPresent: u32 = unsafe { - ::core::mem::transmute(ExtendedInfoPresent) - }; - ExtendedInfoPresent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let MachineTypeMismatch: u32 = unsafe { - ::core::mem::transmute(MachineTypeMismatch) - }; - MachineTypeMismatch as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 4u8, - { - let ImageSignatureLevel: u32 = unsafe { - ::core::mem::transmute(ImageSignatureLevel) - }; - ImageSignatureLevel as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 3u8, - { - let ImageSignatureType: u32 = unsafe { - ::core::mem::transmute(ImageSignatureType) - }; - ImageSignatureType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 1u8, - { - let ImagePartialMap: u32 = unsafe { - ::core::mem::transmute(ImagePartialMap) - }; - ImagePartialMap as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 12u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__IMAGE_INFO__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_IMAGE_INFO__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IMAGE_INFO__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_IMAGE_INFO__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IMAGE_INFO__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_IMAGE_INFO__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Properties) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_INFO__bindgen_ty_1), - "::", - stringify!(Properties), - ), - ); -} -impl Default for _IMAGE_INFO__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IMAGE_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_IMAGE_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IMAGE_INFO>(), - 40usize, - concat!("Size of: ", stringify!(_IMAGE_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_IMAGE_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_IMAGE_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ImageBase) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_INFO), - "::", - stringify!(ImageBase), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ImageSelector) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_INFO), - "::", - stringify!(ImageSelector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ImageSize) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_INFO), - "::", - stringify!(ImageSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ImageSectionNumber) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_INFO), - "::", - stringify!(ImageSectionNumber), - ), - ); -} -impl Default for _IMAGE_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IMAGE_INFO = _IMAGE_INFO; -pub type PIMAGE_INFO = *mut _IMAGE_INFO; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IMAGE_INFO_EX { - pub Size: SIZE_T, - pub ImageInfo: IMAGE_INFO, - pub FileObject: *mut _FILE_OBJECT, -} -#[test] -fn bindgen_test_layout__IMAGE_INFO_EX() { - const UNINIT: ::core::mem::MaybeUninit<_IMAGE_INFO_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IMAGE_INFO_EX>(), - 56usize, - concat!("Size of: ", stringify!(_IMAGE_INFO_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_IMAGE_INFO_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_IMAGE_INFO_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_IMAGE_INFO_EX), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ImageInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_INFO_EX), - "::", - stringify!(ImageInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileObject) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IMAGE_INFO_EX), - "::", - stringify!(FileObject), - ), - ); -} -impl Default for _IMAGE_INFO_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IMAGE_INFO_EX = _IMAGE_INFO_EX; -pub type PIMAGE_INFO_EX = *mut _IMAGE_INFO_EX; -pub type PLOAD_IMAGE_NOTIFY_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - FullImageName: PUNICODE_STRING, - ProcessId: HANDLE, - ImageInfo: PIMAGE_INFO, - ), ->; -pub type SILO_CONTEXT_CLEANUP_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(SiloContext: PVOID), ->; -pub type SILO_MONITOR_CREATE_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Silo: PESILO) -> NTSTATUS, ->; -pub type SILO_MONITOR_TERMINATE_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Silo: PESILO), ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _SILO_MONITOR_REGISTRATION { - pub Version: UCHAR, - pub MonitorHost: BOOLEAN, - pub MonitorExistingSilos: BOOLEAN, - pub Reserved: [UCHAR; 5usize], - pub __bindgen_anon_1: _SILO_MONITOR_REGISTRATION__bindgen_ty_1, - pub CreateCallback: SILO_MONITOR_CREATE_CALLBACK, - pub TerminateCallback: SILO_MONITOR_TERMINATE_CALLBACK, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _SILO_MONITOR_REGISTRATION__bindgen_ty_1 { - pub DriverObjectName: PUNICODE_STRING, - pub ComponentName: PUNICODE_STRING, -} -#[test] -fn bindgen_test_layout__SILO_MONITOR_REGISTRATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_SILO_MONITOR_REGISTRATION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SILO_MONITOR_REGISTRATION__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_SILO_MONITOR_REGISTRATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_SILO_MONITOR_REGISTRATION__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_SILO_MONITOR_REGISTRATION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DriverObjectName) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SILO_MONITOR_REGISTRATION__bindgen_ty_1), - "::", - stringify!(DriverObjectName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ComponentName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SILO_MONITOR_REGISTRATION__bindgen_ty_1), - "::", - stringify!(ComponentName), - ), - ); -} -impl Default for _SILO_MONITOR_REGISTRATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__SILO_MONITOR_REGISTRATION() { - const UNINIT: ::core::mem::MaybeUninit<_SILO_MONITOR_REGISTRATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SILO_MONITOR_REGISTRATION>(), - 32usize, - concat!("Size of: ", stringify!(_SILO_MONITOR_REGISTRATION)), - ); - assert_eq!( - ::core::mem::align_of::<_SILO_MONITOR_REGISTRATION>(), - 8usize, - concat!("Alignment of ", stringify!(_SILO_MONITOR_REGISTRATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SILO_MONITOR_REGISTRATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MonitorHost) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_SILO_MONITOR_REGISTRATION), - "::", - stringify!(MonitorHost), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MonitorExistingSilos) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_SILO_MONITOR_REGISTRATION), - "::", - stringify!(MonitorExistingSilos), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_SILO_MONITOR_REGISTRATION), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateCallback) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SILO_MONITOR_REGISTRATION), - "::", - stringify!(CreateCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TerminateCallback) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SILO_MONITOR_REGISTRATION), - "::", - stringify!(TerminateCallback), - ), - ); -} -impl Default for _SILO_MONITOR_REGISTRATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SILO_MONITOR_REGISTRATION = _SILO_MONITOR_REGISTRATION; -pub type PSILO_MONITOR_REGISTRATION = *mut _SILO_MONITOR_REGISTRATION; -pub type PIO_QUERY_DEVICE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - PathName: PUNICODE_STRING, - BusType: INTERFACE_TYPE, - BusNumber: ULONG, - BusInformation: *mut PKEY_VALUE_FULL_INFORMATION, - ControllerType: CONFIGURATION_TYPE, - ControllerNumber: ULONG, - ControllerInformation: *mut PKEY_VALUE_FULL_INFORMATION, - PeripheralType: CONFIGURATION_TYPE, - PeripheralNumber: ULONG, - PeripheralInformation: *mut PKEY_VALUE_FULL_INFORMATION, - ) -> NTSTATUS, ->; -pub mod _IO_QUERY_DEVICE_DATA_FORMAT { - pub type Type = ::core::ffi::c_int; - pub const IoQueryDeviceIdentifier: Type = 0; - pub const IoQueryDeviceConfigurationData: Type = 1; - pub const IoQueryDeviceComponentInformation: Type = 2; - pub const IoQueryDeviceMaxData: Type = 3; -} -pub use self::_IO_QUERY_DEVICE_DATA_FORMAT::Type as IO_QUERY_DEVICE_DATA_FORMAT; -pub type PIO_QUERY_DEVICE_DATA_FORMAT = *mut _IO_QUERY_DEVICE_DATA_FORMAT::Type; -pub type DRIVER_REINITIALIZE = ::core::option::Option< - unsafe extern "C" fn(DriverObject: *mut _DRIVER_OBJECT, Context: PVOID, Count: ULONG), ->; -pub type PDRIVER_REINITIALIZE = DRIVER_REINITIALIZE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CONTROLLER_OBJECT { - pub Type: CSHORT, - pub Size: CSHORT, - pub ControllerExtension: PVOID, - pub DeviceWaitQueue: KDEVICE_QUEUE, - pub Spare1: ULONG, - pub Spare2: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__CONTROLLER_OBJECT() { - const UNINIT: ::core::mem::MaybeUninit<_CONTROLLER_OBJECT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CONTROLLER_OBJECT>(), - 72usize, - concat!("Size of: ", stringify!(_CONTROLLER_OBJECT)), - ); - assert_eq!( - ::core::mem::align_of::<_CONTROLLER_OBJECT>(), - 8usize, - concat!("Alignment of ", stringify!(_CONTROLLER_OBJECT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CONTROLLER_OBJECT), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CONTROLLER_OBJECT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ControllerExtension) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CONTROLLER_OBJECT), - "::", - stringify!(ControllerExtension), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceWaitQueue) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CONTROLLER_OBJECT), - "::", - stringify!(DeviceWaitQueue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spare1) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_CONTROLLER_OBJECT), - "::", - stringify!(Spare1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spare2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_CONTROLLER_OBJECT), - "::", - stringify!(Spare2), - ), - ); -} -impl Default for _CONTROLLER_OBJECT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CONTROLLER_OBJECT = _CONTROLLER_OBJECT; -pub type PCONTROLLER_OBJECT = *mut _CONTROLLER_OBJECT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CONFIGURATION_INFORMATION { - pub DiskCount: ULONG, - pub FloppyCount: ULONG, - pub CdRomCount: ULONG, - pub TapeCount: ULONG, - pub ScsiPortCount: ULONG, - pub SerialCount: ULONG, - pub ParallelCount: ULONG, - pub AtDiskPrimaryAddressClaimed: BOOLEAN, - pub AtDiskSecondaryAddressClaimed: BOOLEAN, - pub Version: ULONG, - pub MediumChangerCount: ULONG, -} -#[test] -fn bindgen_test_layout__CONFIGURATION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_CONFIGURATION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CONFIGURATION_INFORMATION>(), - 40usize, - concat!("Size of: ", stringify!(_CONFIGURATION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_CONFIGURATION_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_CONFIGURATION_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DiskCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CONFIGURATION_INFORMATION), - "::", - stringify!(DiskCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FloppyCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CONFIGURATION_INFORMATION), - "::", - stringify!(FloppyCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CdRomCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CONFIGURATION_INFORMATION), - "::", - stringify!(CdRomCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TapeCount) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CONFIGURATION_INFORMATION), - "::", - stringify!(TapeCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ScsiPortCount) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CONFIGURATION_INFORMATION), - "::", - stringify!(ScsiPortCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SerialCount) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_CONFIGURATION_INFORMATION), - "::", - stringify!(SerialCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParallelCount) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CONFIGURATION_INFORMATION), - "::", - stringify!(ParallelCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AtDiskPrimaryAddressClaimed) as usize - - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_CONFIGURATION_INFORMATION), - "::", - stringify!(AtDiskPrimaryAddressClaimed), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AtDiskSecondaryAddressClaimed) as usize - - ptr as usize - }, - 29usize, - concat!( - "Offset of field: ", - stringify!(_CONFIGURATION_INFORMATION), - "::", - stringify!(AtDiskSecondaryAddressClaimed), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_CONFIGURATION_INFORMATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MediumChangerCount) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_CONFIGURATION_INFORMATION), - "::", - stringify!(MediumChangerCount), - ), - ); -} -pub type CONFIGURATION_INFORMATION = _CONFIGURATION_INFORMATION; -pub type PCONFIGURATION_INFORMATION = *mut _CONFIGURATION_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DISK_SIGNATURE { - pub PartitionStyle: ULONG, - pub __bindgen_anon_1: _DISK_SIGNATURE__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DISK_SIGNATURE__bindgen_ty_1 { - pub Mbr: _DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_1, - pub Gpt: _DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_1 { - pub Signature: ULONG, - pub CheckSum: ULONG, -} -#[test] -fn bindgen_test_layout__DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Signature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CheckSum) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(CheckSum), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_2 { - pub DiskId: GUID, -} -#[test] -fn bindgen_test_layout__DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_2>(), - 16usize, - concat!("Size of: ", stringify!(_DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_2>(), - 4usize, - concat!("Alignment of ", stringify!(_DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DiskId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISK_SIGNATURE__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(DiskId), - ), - ); -} -#[test] -fn bindgen_test_layout__DISK_SIGNATURE__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_DISK_SIGNATURE__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DISK_SIGNATURE__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_DISK_SIGNATURE__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_DISK_SIGNATURE__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_DISK_SIGNATURE__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mbr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISK_SIGNATURE__bindgen_ty_1), - "::", - stringify!(Mbr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Gpt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISK_SIGNATURE__bindgen_ty_1), - "::", - stringify!(Gpt), - ), - ); -} -impl Default for _DISK_SIGNATURE__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DISK_SIGNATURE() { - const UNINIT: ::core::mem::MaybeUninit<_DISK_SIGNATURE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DISK_SIGNATURE>(), - 20usize, - concat!("Size of: ", stringify!(_DISK_SIGNATURE)), - ); - assert_eq!( - ::core::mem::align_of::<_DISK_SIGNATURE>(), - 4usize, - concat!("Alignment of ", stringify!(_DISK_SIGNATURE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PartitionStyle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DISK_SIGNATURE), - "::", - stringify!(PartitionStyle), - ), - ); -} -impl Default for _DISK_SIGNATURE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DISK_SIGNATURE = _DISK_SIGNATURE; -pub type PDISK_SIGNATURE = *mut _DISK_SIGNATURE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _IO_FOEXT_SILO_PARAMETERS { - pub Length: ULONG, - pub __bindgen_anon_1: _IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1, - pub SiloContext: PESILO, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1 { - pub __bindgen_anon_1: _IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1__bindgen_ty_1, - pub Flags: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn HasHardReference(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_HasHardReference(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn SpareFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } - } - #[inline] - pub fn set_SpareFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 31u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - HasHardReference: ULONG, - SpareFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let HasHardReference: u32 = unsafe { - ::core::mem::transmute(HasHardReference) - }; - HasHardReference as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 31u8, - { - let SpareFlags: u32 = unsafe { ::core::mem::transmute(SpareFlags) }; - SpareFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _IO_FOEXT_SILO_PARAMETERS__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__IO_FOEXT_SILO_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_IO_FOEXT_SILO_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_FOEXT_SILO_PARAMETERS>(), - 16usize, - concat!("Size of: ", stringify!(_IO_FOEXT_SILO_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_FOEXT_SILO_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FOEXT_SILO_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FOEXT_SILO_PARAMETERS), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SiloContext) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FOEXT_SILO_PARAMETERS), - "::", - stringify!(SiloContext), - ), - ); -} -impl Default for _IO_FOEXT_SILO_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_FOEXT_SILO_PARAMETERS = _IO_FOEXT_SILO_PARAMETERS; -pub type PIO_FOEXT_SILO_PARAMETERS = *mut _IO_FOEXT_SILO_PARAMETERS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TXN_PARAMETER_BLOCK { - pub Length: USHORT, - pub TxFsContext: USHORT, - pub TransactionObject: PVOID, -} -#[test] -fn bindgen_test_layout__TXN_PARAMETER_BLOCK() { - const UNINIT: ::core::mem::MaybeUninit<_TXN_PARAMETER_BLOCK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXN_PARAMETER_BLOCK>(), - 16usize, - concat!("Size of: ", stringify!(_TXN_PARAMETER_BLOCK)), - ); - assert_eq!( - ::core::mem::align_of::<_TXN_PARAMETER_BLOCK>(), - 8usize, - concat!("Alignment of ", stringify!(_TXN_PARAMETER_BLOCK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXN_PARAMETER_BLOCK), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TxFsContext) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_TXN_PARAMETER_BLOCK), - "::", - stringify!(TxFsContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TransactionObject) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TXN_PARAMETER_BLOCK), - "::", - stringify!(TransactionObject), - ), - ); -} -impl Default for _TXN_PARAMETER_BLOCK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TXN_PARAMETER_BLOCK = _TXN_PARAMETER_BLOCK; -pub type PTXN_PARAMETER_BLOCK = *mut _TXN_PARAMETER_BLOCK; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CREATE_USER_PROCESS_ECP_CONTEXT { - pub Size: USHORT, - pub Reserved: USHORT, - pub AccessToken: PACCESS_TOKEN, -} -#[test] -fn bindgen_test_layout__CREATE_USER_PROCESS_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_CREATE_USER_PROCESS_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CREATE_USER_PROCESS_ECP_CONTEXT>(), - 16usize, - concat!("Size of: ", stringify!(_CREATE_USER_PROCESS_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_CREATE_USER_PROCESS_ECP_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_CREATE_USER_PROCESS_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CREATE_USER_PROCESS_ECP_CONTEXT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CREATE_USER_PROCESS_ECP_CONTEXT), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AccessToken) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CREATE_USER_PROCESS_ECP_CONTEXT), - "::", - stringify!(AccessToken), - ), - ); -} -impl Default for _CREATE_USER_PROCESS_ECP_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CREATE_USER_PROCESS_ECP_CONTEXT = _CREATE_USER_PROCESS_ECP_CONTEXT; -pub type PCREATE_USER_PROCESS_ECP_CONTEXT = *mut _CREATE_USER_PROCESS_ECP_CONTEXT; -pub type POPLOCK_KEY_ECP_CONTEXT = *mut _OPLOCK_KEY_ECP_CONTEXT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _OPLOCK_KEY_CONTEXT { - pub Version: USHORT, - pub Flags: USHORT, - pub ParentOplockKey: GUID, - pub TargetOplockKey: GUID, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__OPLOCK_KEY_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_OPLOCK_KEY_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OPLOCK_KEY_CONTEXT>(), - 40usize, - concat!("Size of: ", stringify!(_OPLOCK_KEY_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_OPLOCK_KEY_CONTEXT>(), - 4usize, - concat!("Alignment of ", stringify!(_OPLOCK_KEY_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OPLOCK_KEY_CONTEXT), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_OPLOCK_KEY_CONTEXT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParentOplockKey) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_OPLOCK_KEY_CONTEXT), - "::", - stringify!(ParentOplockKey), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TargetOplockKey) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_OPLOCK_KEY_CONTEXT), - "::", - stringify!(TargetOplockKey), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_OPLOCK_KEY_CONTEXT), - "::", - stringify!(Reserved), - ), - ); -} -pub type OPLOCK_KEY_CONTEXT = _OPLOCK_KEY_CONTEXT; -pub type POPLOCK_KEY_CONTEXT = *mut _OPLOCK_KEY_CONTEXT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_DRIVER_CREATE_CONTEXT { - pub Size: CSHORT, - pub ExtraCreateParameter: *mut _ECP_LIST, - pub DeviceObjectHint: PVOID, - pub TxnParameters: PTXN_PARAMETER_BLOCK, - pub SiloContext: PESILO, -} -#[test] -fn bindgen_test_layout__IO_DRIVER_CREATE_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_IO_DRIVER_CREATE_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_DRIVER_CREATE_CONTEXT>(), - 40usize, - concat!("Size of: ", stringify!(_IO_DRIVER_CREATE_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_DRIVER_CREATE_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_DRIVER_CREATE_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_DRIVER_CREATE_CONTEXT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExtraCreateParameter) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_DRIVER_CREATE_CONTEXT), - "::", - stringify!(ExtraCreateParameter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceObjectHint) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_DRIVER_CREATE_CONTEXT), - "::", - stringify!(DeviceObjectHint), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TxnParameters) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_DRIVER_CREATE_CONTEXT), - "::", - stringify!(TxnParameters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SiloContext) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_DRIVER_CREATE_CONTEXT), - "::", - stringify!(SiloContext), - ), - ); -} -impl Default for _IO_DRIVER_CREATE_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_DRIVER_CREATE_CONTEXT = _IO_DRIVER_CREATE_CONTEXT; -pub type PIO_DRIVER_CREATE_CONTEXT = *mut _IO_DRIVER_CREATE_CONTEXT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_FOEXT_SHADOW_FILE { - pub BackingFileObject: PFILE_OBJECT, - pub BackingFltInstance: PVOID, -} -#[test] -fn bindgen_test_layout__IO_FOEXT_SHADOW_FILE() { - const UNINIT: ::core::mem::MaybeUninit<_IO_FOEXT_SHADOW_FILE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_FOEXT_SHADOW_FILE>(), - 16usize, - concat!("Size of: ", stringify!(_IO_FOEXT_SHADOW_FILE)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_FOEXT_SHADOW_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FOEXT_SHADOW_FILE)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BackingFileObject) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FOEXT_SHADOW_FILE), - "::", - stringify!(BackingFileObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BackingFltInstance) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FOEXT_SHADOW_FILE), - "::", - stringify!(BackingFltInstance), - ), - ); -} -impl Default for _IO_FOEXT_SHADOW_FILE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_FOEXT_SHADOW_FILE = _IO_FOEXT_SHADOW_FILE; -pub type PIO_FOEXT_SHADOW_FILE = *mut _IO_FOEXT_SHADOW_FILE; -pub mod _BDCB_CALLBACK_TYPE { - pub type Type = ::core::ffi::c_int; - pub const BdCbStatusUpdate: Type = 0; - pub const BdCbInitializeImage: Type = 1; -} -pub use self::_BDCB_CALLBACK_TYPE::Type as BDCB_CALLBACK_TYPE; -pub type PBDCB_CALLBACK_TYPE = *mut _BDCB_CALLBACK_TYPE::Type; -pub mod _BDCB_CLASSIFICATION { - pub type Type = ::core::ffi::c_int; - pub const BdCbClassificationUnknownImage: Type = 0; - pub const BdCbClassificationKnownGoodImage: Type = 1; - pub const BdCbClassificationKnownBadImage: Type = 2; - pub const BdCbClassificationKnownBadImageBootCritical: Type = 3; - pub const BdCbClassificationEnd: Type = 4; -} -pub use self::_BDCB_CLASSIFICATION::Type as BDCB_CLASSIFICATION; -pub type PBDCB_CLASSIFICATION = *mut _BDCB_CLASSIFICATION::Type; -pub mod _BDCB_STATUS_UPDATE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const BdCbStatusPrepareForDependencyLoad: Type = 0; - pub const BdCbStatusPrepareForDriverLoad: Type = 1; - pub const BdCbStatusPrepareForUnload: Type = 2; -} -pub use self::_BDCB_STATUS_UPDATE_TYPE::Type as BDCB_STATUS_UPDATE_TYPE; -pub type PBDCB_STATUS_UPDATE_TYPE = *mut _BDCB_STATUS_UPDATE_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _BDCB_STATUS_UPDATE_CONTEXT { - pub StatusType: BDCB_STATUS_UPDATE_TYPE, -} -#[test] -fn bindgen_test_layout__BDCB_STATUS_UPDATE_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_BDCB_STATUS_UPDATE_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_BDCB_STATUS_UPDATE_CONTEXT>(), - 4usize, - concat!("Size of: ", stringify!(_BDCB_STATUS_UPDATE_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_BDCB_STATUS_UPDATE_CONTEXT>(), - 4usize, - concat!("Alignment of ", stringify!(_BDCB_STATUS_UPDATE_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StatusType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_BDCB_STATUS_UPDATE_CONTEXT), - "::", - stringify!(StatusType), - ), - ); -} -impl Default for _BDCB_STATUS_UPDATE_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type BDCB_STATUS_UPDATE_CONTEXT = _BDCB_STATUS_UPDATE_CONTEXT; -pub type PBDCB_STATUS_UPDATE_CONTEXT = *mut _BDCB_STATUS_UPDATE_CONTEXT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _BDCB_IMAGE_INFORMATION { - pub Classification: BDCB_CLASSIFICATION, - pub ImageFlags: ULONG, - pub ImageName: UNICODE_STRING, - pub RegistryPath: UNICODE_STRING, - pub CertificatePublisher: UNICODE_STRING, - pub CertificateIssuer: UNICODE_STRING, - pub ImageHash: PVOID, - pub CertificateThumbprint: PVOID, - pub ImageHashAlgorithm: ULONG, - pub ThumbprintHashAlgorithm: ULONG, - pub ImageHashLength: ULONG, - pub CertificateThumbprintLength: ULONG, -} -#[test] -fn bindgen_test_layout__BDCB_IMAGE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_BDCB_IMAGE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_BDCB_IMAGE_INFORMATION>(), - 104usize, - concat!("Size of: ", stringify!(_BDCB_IMAGE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_BDCB_IMAGE_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_BDCB_IMAGE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Classification) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_BDCB_IMAGE_INFORMATION), - "::", - stringify!(Classification), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ImageFlags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_BDCB_IMAGE_INFORMATION), - "::", - stringify!(ImageFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ImageName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_BDCB_IMAGE_INFORMATION), - "::", - stringify!(ImageName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RegistryPath) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_BDCB_IMAGE_INFORMATION), - "::", - stringify!(RegistryPath), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CertificatePublisher) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_BDCB_IMAGE_INFORMATION), - "::", - stringify!(CertificatePublisher), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CertificateIssuer) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_BDCB_IMAGE_INFORMATION), - "::", - stringify!(CertificateIssuer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ImageHash) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_BDCB_IMAGE_INFORMATION), - "::", - stringify!(ImageHash), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CertificateThumbprint) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_BDCB_IMAGE_INFORMATION), - "::", - stringify!(CertificateThumbprint), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ImageHashAlgorithm) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_BDCB_IMAGE_INFORMATION), - "::", - stringify!(ImageHashAlgorithm), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ThumbprintHashAlgorithm) as usize - ptr as usize - }, - 92usize, - concat!( - "Offset of field: ", - stringify!(_BDCB_IMAGE_INFORMATION), - "::", - stringify!(ThumbprintHashAlgorithm), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ImageHashLength) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_BDCB_IMAGE_INFORMATION), - "::", - stringify!(ImageHashLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CertificateThumbprintLength) as usize - - ptr as usize - }, - 100usize, - concat!( - "Offset of field: ", - stringify!(_BDCB_IMAGE_INFORMATION), - "::", - stringify!(CertificateThumbprintLength), - ), - ); -} -impl Default for _BDCB_IMAGE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type BDCB_IMAGE_INFORMATION = _BDCB_IMAGE_INFORMATION; -pub type BOOT_DRIVER_CALLBACK_FUNCTION = ::core::option::Option< - unsafe extern "C" fn( - CallbackContext: PVOID, - Classification: BDCB_CALLBACK_TYPE, - ImageInformation: PBDCB_IMAGE_INFORMATION, - ), ->; -pub type PBOOT_DRIVER_CALLBACK_FUNCTION = BOOT_DRIVER_CALLBACK_FUNCTION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _AGP_TARGET_BUS_INTERFACE_STANDARD { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub SetBusData: PGET_SET_DEVICE_DATA, - pub GetBusData: PGET_SET_DEVICE_DATA, - pub CapabilityID: UCHAR, -} -#[test] -fn bindgen_test_layout__AGP_TARGET_BUS_INTERFACE_STANDARD() { - const UNINIT: ::core::mem::MaybeUninit<_AGP_TARGET_BUS_INTERFACE_STANDARD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_AGP_TARGET_BUS_INTERFACE_STANDARD>(), - 56usize, - concat!("Size of: ", stringify!(_AGP_TARGET_BUS_INTERFACE_STANDARD)), - ); - assert_eq!( - ::core::mem::align_of::<_AGP_TARGET_BUS_INTERFACE_STANDARD>(), - 8usize, - concat!("Alignment of ", stringify!(_AGP_TARGET_BUS_INTERFACE_STANDARD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_AGP_TARGET_BUS_INTERFACE_STANDARD), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_AGP_TARGET_BUS_INTERFACE_STANDARD), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_AGP_TARGET_BUS_INTERFACE_STANDARD), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_AGP_TARGET_BUS_INTERFACE_STANDARD), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_AGP_TARGET_BUS_INTERFACE_STANDARD), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetBusData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_AGP_TARGET_BUS_INTERFACE_STANDARD), - "::", - stringify!(SetBusData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GetBusData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_AGP_TARGET_BUS_INTERFACE_STANDARD), - "::", - stringify!(GetBusData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CapabilityID) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_AGP_TARGET_BUS_INTERFACE_STANDARD), - "::", - stringify!(CapabilityID), - ), - ); -} -impl Default for _AGP_TARGET_BUS_INTERFACE_STANDARD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type AGP_TARGET_BUS_INTERFACE_STANDARD = _AGP_TARGET_BUS_INTERFACE_STANDARD; -pub type PAGP_TARGET_BUS_INTERFACE_STANDARD = *mut _AGP_TARGET_BUS_INTERFACE_STANDARD; -pub type PGET_LOCATION_STRING = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, LocationStrings: *mut PZZWSTR) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PNP_LOCATION_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub GetLocationString: PGET_LOCATION_STRING, -} -#[test] -fn bindgen_test_layout__PNP_LOCATION_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_PNP_LOCATION_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PNP_LOCATION_INTERFACE>(), - 40usize, - concat!("Size of: ", stringify!(_PNP_LOCATION_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_PNP_LOCATION_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_PNP_LOCATION_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PNP_LOCATION_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PNP_LOCATION_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PNP_LOCATION_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PNP_LOCATION_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PNP_LOCATION_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetLocationString) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PNP_LOCATION_INTERFACE), - "::", - stringify!(GetLocationString), - ), - ); -} -impl Default for _PNP_LOCATION_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PNP_LOCATION_INTERFACE = _PNP_LOCATION_INTERFACE; -pub type PPNP_LOCATION_INTERFACE = *mut _PNP_LOCATION_INTERFACE; -pub mod _ARBITER_ACTION { - pub type Type = ::core::ffi::c_int; - pub const ArbiterActionTestAllocation: Type = 0; - pub const ArbiterActionRetestAllocation: Type = 1; - pub const ArbiterActionCommitAllocation: Type = 2; - pub const ArbiterActionRollbackAllocation: Type = 3; - pub const ArbiterActionQueryAllocatedResources: Type = 4; - pub const ArbiterActionWriteReservedResources: Type = 5; - pub const ArbiterActionQueryConflict: Type = 6; - pub const ArbiterActionQueryArbitrate: Type = 7; - pub const ArbiterActionAddReserved: Type = 8; - pub const ArbiterActionBootAllocation: Type = 9; -} -pub use self::_ARBITER_ACTION::Type as ARBITER_ACTION; -pub type PARBITER_ACTION = *mut _ARBITER_ACTION::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ARBITER_CONFLICT_INFO { - pub OwningObject: PDEVICE_OBJECT, - pub Start: ULONGLONG, - pub End: ULONGLONG, -} -#[test] -fn bindgen_test_layout__ARBITER_CONFLICT_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_ARBITER_CONFLICT_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARBITER_CONFLICT_INFO>(), - 24usize, - concat!("Size of: ", stringify!(_ARBITER_CONFLICT_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_ARBITER_CONFLICT_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_ARBITER_CONFLICT_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OwningObject) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_CONFLICT_INFO), - "::", - stringify!(OwningObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Start) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_CONFLICT_INFO), - "::", - stringify!(Start), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).End) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_CONFLICT_INFO), - "::", - stringify!(End), - ), - ); -} -impl Default for _ARBITER_CONFLICT_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARBITER_CONFLICT_INFO = _ARBITER_CONFLICT_INFO; -pub type PARBITER_CONFLICT_INFO = *mut _ARBITER_CONFLICT_INFO; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ARBITER_TEST_ALLOCATION_PARAMETERS { - pub ArbitrationList: PLIST_ENTRY, - pub AllocateFromCount: ULONG, - pub AllocateFrom: PCM_PARTIAL_RESOURCE_DESCRIPTOR, -} -#[test] -fn bindgen_test_layout__ARBITER_TEST_ALLOCATION_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_ARBITER_TEST_ALLOCATION_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARBITER_TEST_ALLOCATION_PARAMETERS>(), - 24usize, - concat!("Size of: ", stringify!(_ARBITER_TEST_ALLOCATION_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_ARBITER_TEST_ALLOCATION_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_ARBITER_TEST_ALLOCATION_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ArbitrationList) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_TEST_ALLOCATION_PARAMETERS), - "::", - stringify!(ArbitrationList), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocateFromCount) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_TEST_ALLOCATION_PARAMETERS), - "::", - stringify!(AllocateFromCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocateFrom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_TEST_ALLOCATION_PARAMETERS), - "::", - stringify!(AllocateFrom), - ), - ); -} -impl Default for _ARBITER_TEST_ALLOCATION_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARBITER_TEST_ALLOCATION_PARAMETERS = _ARBITER_TEST_ALLOCATION_PARAMETERS; -pub type PARBITER_TEST_ALLOCATION_PARAMETERS = *mut _ARBITER_TEST_ALLOCATION_PARAMETERS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ARBITER_RETEST_ALLOCATION_PARAMETERS { - pub ArbitrationList: PLIST_ENTRY, - pub AllocateFromCount: ULONG, - pub AllocateFrom: PCM_PARTIAL_RESOURCE_DESCRIPTOR, -} -#[test] -fn bindgen_test_layout__ARBITER_RETEST_ALLOCATION_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_ARBITER_RETEST_ALLOCATION_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARBITER_RETEST_ALLOCATION_PARAMETERS>(), - 24usize, - concat!("Size of: ", stringify!(_ARBITER_RETEST_ALLOCATION_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_ARBITER_RETEST_ALLOCATION_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_ARBITER_RETEST_ALLOCATION_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ArbitrationList) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_RETEST_ALLOCATION_PARAMETERS), - "::", - stringify!(ArbitrationList), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocateFromCount) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_RETEST_ALLOCATION_PARAMETERS), - "::", - stringify!(AllocateFromCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocateFrom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_RETEST_ALLOCATION_PARAMETERS), - "::", - stringify!(AllocateFrom), - ), - ); -} -impl Default for _ARBITER_RETEST_ALLOCATION_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARBITER_RETEST_ALLOCATION_PARAMETERS = _ARBITER_RETEST_ALLOCATION_PARAMETERS; -pub type PARBITER_RETEST_ALLOCATION_PARAMETERS = *mut _ARBITER_RETEST_ALLOCATION_PARAMETERS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ARBITER_BOOT_ALLOCATION_PARAMETERS { - pub ArbitrationList: PLIST_ENTRY, -} -#[test] -fn bindgen_test_layout__ARBITER_BOOT_ALLOCATION_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_ARBITER_BOOT_ALLOCATION_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARBITER_BOOT_ALLOCATION_PARAMETERS>(), - 8usize, - concat!("Size of: ", stringify!(_ARBITER_BOOT_ALLOCATION_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_ARBITER_BOOT_ALLOCATION_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_ARBITER_BOOT_ALLOCATION_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ArbitrationList) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_BOOT_ALLOCATION_PARAMETERS), - "::", - stringify!(ArbitrationList), - ), - ); -} -impl Default for _ARBITER_BOOT_ALLOCATION_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARBITER_BOOT_ALLOCATION_PARAMETERS = _ARBITER_BOOT_ALLOCATION_PARAMETERS; -pub type PARBITER_BOOT_ALLOCATION_PARAMETERS = *mut _ARBITER_BOOT_ALLOCATION_PARAMETERS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS { - pub AllocatedResources: *mut PCM_PARTIAL_RESOURCE_LIST, -} -#[test] -fn bindgen_test_layout__ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit< - _ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS>(), - 8usize, - concat!("Size of: ", stringify!(_ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocatedResources) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS), - "::", - stringify!(AllocatedResources), - ), - ); -} -impl Default for _ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS = _ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS; -pub type PARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS = *mut _ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ARBITER_QUERY_CONFLICT_PARAMETERS { - pub PhysicalDeviceObject: PDEVICE_OBJECT, - pub ConflictingResource: PIO_RESOURCE_DESCRIPTOR, - pub ConflictCount: PULONG, - pub Conflicts: *mut PARBITER_CONFLICT_INFO, -} -#[test] -fn bindgen_test_layout__ARBITER_QUERY_CONFLICT_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_ARBITER_QUERY_CONFLICT_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARBITER_QUERY_CONFLICT_PARAMETERS>(), - 32usize, - concat!("Size of: ", stringify!(_ARBITER_QUERY_CONFLICT_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_ARBITER_QUERY_CONFLICT_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_ARBITER_QUERY_CONFLICT_PARAMETERS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PhysicalDeviceObject) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_QUERY_CONFLICT_PARAMETERS), - "::", - stringify!(PhysicalDeviceObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ConflictingResource) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_QUERY_CONFLICT_PARAMETERS), - "::", - stringify!(ConflictingResource), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ConflictCount) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_QUERY_CONFLICT_PARAMETERS), - "::", - stringify!(ConflictCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Conflicts) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_QUERY_CONFLICT_PARAMETERS), - "::", - stringify!(Conflicts), - ), - ); -} -impl Default for _ARBITER_QUERY_CONFLICT_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARBITER_QUERY_CONFLICT_PARAMETERS = _ARBITER_QUERY_CONFLICT_PARAMETERS; -pub type PARBITER_QUERY_CONFLICT_PARAMETERS = *mut _ARBITER_QUERY_CONFLICT_PARAMETERS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ARBITER_QUERY_ARBITRATE_PARAMETERS { - pub ArbitrationList: PLIST_ENTRY, -} -#[test] -fn bindgen_test_layout__ARBITER_QUERY_ARBITRATE_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_ARBITER_QUERY_ARBITRATE_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARBITER_QUERY_ARBITRATE_PARAMETERS>(), - 8usize, - concat!("Size of: ", stringify!(_ARBITER_QUERY_ARBITRATE_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_ARBITER_QUERY_ARBITRATE_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_ARBITER_QUERY_ARBITRATE_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ArbitrationList) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_QUERY_ARBITRATE_PARAMETERS), - "::", - stringify!(ArbitrationList), - ), - ); -} -impl Default for _ARBITER_QUERY_ARBITRATE_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARBITER_QUERY_ARBITRATE_PARAMETERS = _ARBITER_QUERY_ARBITRATE_PARAMETERS; -pub type PARBITER_QUERY_ARBITRATE_PARAMETERS = *mut _ARBITER_QUERY_ARBITRATE_PARAMETERS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ARBITER_ADD_RESERVED_PARAMETERS { - pub ReserveDevice: PDEVICE_OBJECT, -} -#[test] -fn bindgen_test_layout__ARBITER_ADD_RESERVED_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_ARBITER_ADD_RESERVED_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARBITER_ADD_RESERVED_PARAMETERS>(), - 8usize, - concat!("Size of: ", stringify!(_ARBITER_ADD_RESERVED_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_ARBITER_ADD_RESERVED_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_ARBITER_ADD_RESERVED_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReserveDevice) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_ADD_RESERVED_PARAMETERS), - "::", - stringify!(ReserveDevice), - ), - ); -} -impl Default for _ARBITER_ADD_RESERVED_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARBITER_ADD_RESERVED_PARAMETERS = _ARBITER_ADD_RESERVED_PARAMETERS; -pub type PARBITER_ADD_RESERVED_PARAMETERS = *mut _ARBITER_ADD_RESERVED_PARAMETERS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _ARBITER_PARAMETERS { - pub Parameters: _ARBITER_PARAMETERS__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _ARBITER_PARAMETERS__bindgen_ty_1 { - pub TestAllocation: ARBITER_TEST_ALLOCATION_PARAMETERS, - pub RetestAllocation: ARBITER_RETEST_ALLOCATION_PARAMETERS, - pub BootAllocation: ARBITER_BOOT_ALLOCATION_PARAMETERS, - pub QueryAllocatedResources: ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS, - pub QueryConflict: ARBITER_QUERY_CONFLICT_PARAMETERS, - pub QueryArbitrate: ARBITER_QUERY_ARBITRATE_PARAMETERS, - pub AddReserved: ARBITER_ADD_RESERVED_PARAMETERS, -} -#[test] -fn bindgen_test_layout__ARBITER_PARAMETERS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_ARBITER_PARAMETERS__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARBITER_PARAMETERS__bindgen_ty_1>(), - 32usize, - concat!("Size of: ", stringify!(_ARBITER_PARAMETERS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_ARBITER_PARAMETERS__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_ARBITER_PARAMETERS__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TestAllocation) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_PARAMETERS__bindgen_ty_1), - "::", - stringify!(TestAllocation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RetestAllocation) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_PARAMETERS__bindgen_ty_1), - "::", - stringify!(RetestAllocation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BootAllocation) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_PARAMETERS__bindgen_ty_1), - "::", - stringify!(BootAllocation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryAllocatedResources) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_PARAMETERS__bindgen_ty_1), - "::", - stringify!(QueryAllocatedResources), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryConflict) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_PARAMETERS__bindgen_ty_1), - "::", - stringify!(QueryConflict), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryArbitrate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_PARAMETERS__bindgen_ty_1), - "::", - stringify!(QueryArbitrate), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AddReserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_PARAMETERS__bindgen_ty_1), - "::", - stringify!(AddReserved), - ), - ); -} -impl Default for _ARBITER_PARAMETERS__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__ARBITER_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_ARBITER_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARBITER_PARAMETERS>(), - 32usize, - concat!("Size of: ", stringify!(_ARBITER_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_ARBITER_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_ARBITER_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_PARAMETERS), - "::", - stringify!(Parameters), - ), - ); -} -impl Default for _ARBITER_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARBITER_PARAMETERS = _ARBITER_PARAMETERS; -pub type PARBITER_PARAMETERS = *mut _ARBITER_PARAMETERS; -pub mod _ARBITER_REQUEST_SOURCE { - pub type Type = ::core::ffi::c_int; - pub const ArbiterRequestUndefined: Type = -1; - pub const ArbiterRequestLegacyReported: Type = 0; - pub const ArbiterRequestHalReported: Type = 1; - pub const ArbiterRequestLegacyAssigned: Type = 2; - pub const ArbiterRequestPnpDetected: Type = 3; - pub const ArbiterRequestPnpEnumerated: Type = 4; -} -pub use self::_ARBITER_REQUEST_SOURCE::Type as ARBITER_REQUEST_SOURCE; -pub mod _ARBITER_RESULT { - pub type Type = ::core::ffi::c_int; - pub const ArbiterResultUndefined: Type = -1; - pub const ArbiterResultSuccess: Type = 0; - pub const ArbiterResultExternalConflict: Type = 1; - pub const ArbiterResultNullRequest: Type = 2; -} -pub use self::_ARBITER_RESULT::Type as ARBITER_RESULT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ARBITER_LIST_ENTRY { - pub ListEntry: LIST_ENTRY, - pub AlternativeCount: ULONG, - pub Alternatives: PIO_RESOURCE_DESCRIPTOR, - pub PhysicalDeviceObject: PDEVICE_OBJECT, - pub RequestSource: ARBITER_REQUEST_SOURCE, - pub Flags: ULONG, - pub WorkSpace: LONG_PTR, - pub InterfaceType: INTERFACE_TYPE, - pub SlotNumber: ULONG, - pub BusNumber: ULONG, - pub Assignment: PCM_PARTIAL_RESOURCE_DESCRIPTOR, - pub SelectedAlternative: PIO_RESOURCE_DESCRIPTOR, - pub Result: ARBITER_RESULT, -} -#[test] -fn bindgen_test_layout__ARBITER_LIST_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_ARBITER_LIST_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARBITER_LIST_ENTRY>(), - 96usize, - concat!("Size of: ", stringify!(_ARBITER_LIST_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_ARBITER_LIST_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_ARBITER_LIST_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ListEntry) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_LIST_ENTRY), - "::", - stringify!(ListEntry), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AlternativeCount) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_LIST_ENTRY), - "::", - stringify!(AlternativeCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Alternatives) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_LIST_ENTRY), - "::", - stringify!(Alternatives), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PhysicalDeviceObject) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_LIST_ENTRY), - "::", - stringify!(PhysicalDeviceObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequestSource) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_LIST_ENTRY), - "::", - stringify!(RequestSource), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_LIST_ENTRY), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WorkSpace) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_LIST_ENTRY), - "::", - stringify!(WorkSpace), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterfaceType) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_LIST_ENTRY), - "::", - stringify!(InterfaceType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SlotNumber) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_LIST_ENTRY), - "::", - stringify!(SlotNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusNumber) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_LIST_ENTRY), - "::", - stringify!(BusNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Assignment) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_LIST_ENTRY), - "::", - stringify!(Assignment), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SelectedAlternative) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_LIST_ENTRY), - "::", - stringify!(SelectedAlternative), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Result) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_LIST_ENTRY), - "::", - stringify!(Result), - ), - ); -} -impl Default for _ARBITER_LIST_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARBITER_LIST_ENTRY = _ARBITER_LIST_ENTRY; -pub type PARBITER_LIST_ENTRY = *mut _ARBITER_LIST_ENTRY; -pub type PARBITER_HANDLER = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - Action: ARBITER_ACTION, - Parameters: PARBITER_PARAMETERS, - ) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ARBITER_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub ArbiterHandler: PARBITER_HANDLER, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__ARBITER_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_ARBITER_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ARBITER_INTERFACE>(), - 48usize, - concat!("Size of: ", stringify!(_ARBITER_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_ARBITER_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_ARBITER_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ArbiterHandler) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_INTERFACE), - "::", - stringify!(ArbiterHandler), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_ARBITER_INTERFACE), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _ARBITER_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ARBITER_INTERFACE = _ARBITER_INTERFACE; -pub type PARBITER_INTERFACE = *mut _ARBITER_INTERFACE; -pub mod _RESOURCE_TRANSLATION_DIRECTION { - pub type Type = ::core::ffi::c_int; - pub const TranslateChildToParent: Type = 0; - pub const TranslateParentToChild: Type = 1; -} -pub use self::_RESOURCE_TRANSLATION_DIRECTION::Type as RESOURCE_TRANSLATION_DIRECTION; -pub type PTRANSLATE_RESOURCE_HANDLER = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - Source: PCM_PARTIAL_RESOURCE_DESCRIPTOR, - Direction: RESOURCE_TRANSLATION_DIRECTION, - AlternativesCount: ULONG, - Alternatives: *mut IO_RESOURCE_DESCRIPTOR, - PhysicalDeviceObject: PDEVICE_OBJECT, - Target: PCM_PARTIAL_RESOURCE_DESCRIPTOR, - ) -> NTSTATUS, ->; -pub type PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - Source: PIO_RESOURCE_DESCRIPTOR, - PhysicalDeviceObject: PDEVICE_OBJECT, - TargetCount: PULONG, - Target: *mut PIO_RESOURCE_DESCRIPTOR, - ) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TRANSLATOR_INTERFACE { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub TranslateResources: PTRANSLATE_RESOURCE_HANDLER, - pub TranslateResourceRequirements: PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER, -} -#[test] -fn bindgen_test_layout__TRANSLATOR_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_TRANSLATOR_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TRANSLATOR_INTERFACE>(), - 48usize, - concat!("Size of: ", stringify!(_TRANSLATOR_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_TRANSLATOR_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_TRANSLATOR_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TRANSLATOR_INTERFACE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_TRANSLATOR_INTERFACE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TRANSLATOR_INTERFACE), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TRANSLATOR_INTERFACE), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TRANSLATOR_INTERFACE), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TranslateResources) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_TRANSLATOR_INTERFACE), - "::", - stringify!(TranslateResources), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TranslateResourceRequirements) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_TRANSLATOR_INTERFACE), - "::", - stringify!(TranslateResourceRequirements), - ), - ); -} -impl Default for _TRANSLATOR_INTERFACE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TRANSLATOR_INTERFACE = _TRANSLATOR_INTERFACE; -pub type PTRANSLATOR_INTERFACE = *mut _TRANSLATOR_INTERFACE; -pub type PHAL_RESET_DISPLAY_PARAMETERS = ::core::option::Option< - unsafe extern "C" fn(Columns: ULONG, Rows: ULONG) -> BOOLEAN, ->; -pub mod _HAL_DMA_CRASH_DUMP_REGISTER_TYPE { - pub type Type = ::core::ffi::c_int; - pub const HalDmaCrashDumpRegisterSet1: Type = 0; - pub const HalDmaCrashDumpRegisterSet2: Type = 1; - pub const HalDmaCrashDumpRegisterSetMax: Type = 2; -} -pub use self::_HAL_DMA_CRASH_DUMP_REGISTER_TYPE::Type as HAL_DMA_CRASH_DUMP_REGISTER_TYPE; -pub type PHAL_DMA_CRASH_DUMP_REGISTER_TYPE = *mut _HAL_DMA_CRASH_DUMP_REGISTER_TYPE::Type; -pub type pHalHandlerForBus = ::core::option::Option< - unsafe extern "C" fn(InterfaceType: INTERFACE_TYPE, BusNumber: ULONG) -> PBUS_HANDLER, ->; -pub type pHalReferenceBusHandler = ::core::option::Option< - unsafe extern "C" fn(BusHandler: PBUS_HANDLER), ->; -pub mod _HAL_QUERY_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const HalInstalledBusInformation: Type = 0; - pub const HalProfileSourceInformation: Type = 1; - pub const HalInformationClassUnused1: Type = 2; - pub const HalPowerInformation: Type = 3; - pub const HalProcessorSpeedInformation: Type = 4; - pub const HalCallbackInformation: Type = 5; - pub const HalMapRegisterInformation: Type = 6; - pub const HalMcaLogInformation: Type = 7; - pub const HalFrameBufferCachingInformation: Type = 8; - pub const HalDisplayBiosInformation: Type = 9; - pub const HalProcessorFeatureInformation: Type = 10; - pub const HalNumaTopologyInterface: Type = 11; - pub const HalErrorInformation: Type = 12; - pub const HalCmcLogInformation: Type = 13; - pub const HalCpeLogInformation: Type = 14; - pub const HalQueryMcaInterface: Type = 15; - pub const HalQueryAMLIIllegalIOPortAddresses: Type = 16; - pub const HalQueryMaxHotPlugMemoryAddress: Type = 17; - pub const HalPartitionIpiInterface: Type = 18; - pub const HalPlatformInformation: Type = 19; - pub const HalQueryProfileSourceList: Type = 20; - pub const HalInitLogInformation: Type = 21; - pub const HalFrequencyInformation: Type = 22; - pub const HalProcessorBrandString: Type = 23; - pub const HalHypervisorInformation: Type = 24; - pub const HalPlatformTimerInformation: Type = 25; - pub const HalAcpiAuditInformation: Type = 26; - pub const HalIrtInformation: Type = 27; - pub const HalSecondaryInterruptInformation: Type = 28; - pub const HalParkingPageInformation: Type = 29; - pub const HalNumaRangeTableInformation: Type = 30; - pub const HalChannelTopologyInformation: Type = 31; - pub const HalExternalCacheInformation: Type = 32; - pub const HalQueryDebuggerInformation: Type = 33; - pub const HalFwBootPerformanceInformation: Type = 34; - pub const HalFwS3PerformanceInformation: Type = 35; - pub const HalGetChannelPowerInformation: Type = 36; - pub const HalQueryStateElementInformation: Type = 37; - pub const HalPsciInformation: Type = 38; - pub const HalInterruptControllerInformation: Type = 39; - pub const HalQueryIommuReservedRegionInformation: Type = 40; - pub const HalQueryArmErrataInformation: Type = 41; - pub const HalQueryProcessorEfficiencyInformation: Type = 42; - pub const HalQueryAcpiWakeAlarmSystemPowerStateInformation: Type = 43; - pub const HalQueryProfileNumberOfCounters: Type = 44; - pub const HalQueryHyperlaunchEntrypoint: Type = 45; - pub const HalHardwareWatchdogInformation: Type = 46; - pub const HalDmaRemappingInformation: Type = 47; - pub const HalQueryUnused0001: Type = 48; - pub const HalHeterogeneousMemoryAttributesInterface: Type = 49; - pub const HalQueryPerDeviceMsiLimitInformation: Type = 50; - pub const HalQueryProfileCorruptionStatus: Type = 51; - pub const HalQueryProfileCounterOwnership: Type = 52; -} -pub use self::_HAL_QUERY_INFORMATION_CLASS::Type as HAL_QUERY_INFORMATION_CLASS; -pub type PHAL_QUERY_INFORMATION_CLASS = *mut _HAL_QUERY_INFORMATION_CLASS::Type; -pub mod _HAL_SET_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const HalProfileSourceInterval: Type = 0; - pub const HalProfileSourceInterruptHandler: Type = 1; - pub const HalMcaRegisterDriver: Type = 2; - pub const HalKernelErrorHandler: Type = 3; - pub const HalCmcRegisterDriver: Type = 4; - pub const HalCpeRegisterDriver: Type = 5; - pub const HalMcaLog: Type = 6; - pub const HalCmcLog: Type = 7; - pub const HalCpeLog: Type = 8; - pub const HalGenerateCmcInterrupt: Type = 9; - pub const HalProfileSourceTimerHandler: Type = 10; - pub const HalEnlightenment: Type = 11; - pub const HalProfileDpgoSourceInterruptHandler: Type = 12; - pub const HalRegisterSecondaryInterruptInterface: Type = 13; - pub const HalSetChannelPowerInformation: Type = 14; - pub const HalI386ExceptionChainTerminatorInformation: Type = 15; - pub const HalSetResetParkDisposition: Type = 16; - pub const HalSetPsciSuspendMode: Type = 17; - pub const HalSetHvciEnabled: Type = 18; - pub const HalSetProcessorTraceInterruptHandler: Type = 19; - pub const HalProfileSourceAdd: Type = 20; - pub const HalProfileSourceRemove: Type = 21; - pub const HalSetSwInterruptHandler: Type = 22; - pub const HalSetClockTimerMinimumInterval: Type = 23; -} -pub use self::_HAL_SET_INFORMATION_CLASS::Type as HAL_SET_INFORMATION_CLASS; -pub type PHAL_SET_INFORMATION_CLASS = *mut _HAL_SET_INFORMATION_CLASS::Type; -pub type pHalQuerySystemInformation = ::core::option::Option< - unsafe extern "C" fn( - InformationClass: HAL_QUERY_INFORMATION_CLASS, - BufferSize: ULONG, - Buffer: PVOID, - ReturnedLength: PULONG, - ) -> NTSTATUS, ->; -pub type pHalSetSystemInformation = ::core::option::Option< - unsafe extern "C" fn( - InformationClass: HAL_SET_INFORMATION_CLASS, - BufferSize: ULONG, - Buffer: PVOID, - ) -> NTSTATUS, ->; -pub type pHalExamineMBR = ::core::option::Option< - unsafe extern "C" fn( - DeviceObject: PDEVICE_OBJECT, - SectorSize: ULONG, - MBRTypeIdentifier: ULONG, - Buffer: *mut PVOID, - ), ->; -pub type pHalIoReadPartitionTable = ::core::option::Option< - unsafe extern "C" fn( - DeviceObject: PDEVICE_OBJECT, - SectorSize: ULONG, - ReturnRecognizedPartitions: BOOLEAN, - PartitionBuffer: *mut *mut _DRIVE_LAYOUT_INFORMATION, - ) -> NTSTATUS, ->; -pub type pHalIoSetPartitionInformation = ::core::option::Option< - unsafe extern "C" fn( - DeviceObject: PDEVICE_OBJECT, - SectorSize: ULONG, - PartitionNumber: ULONG, - PartitionType: ULONG, - ) -> NTSTATUS, ->; -pub type pHalIoWritePartitionTable = ::core::option::Option< - unsafe extern "C" fn( - DeviceObject: PDEVICE_OBJECT, - SectorSize: ULONG, - SectorsPerTrack: ULONG, - NumberOfHeads: ULONG, - PartitionBuffer: *mut _DRIVE_LAYOUT_INFORMATION, - ) -> NTSTATUS, ->; -pub type pHalQueryBusSlots = ::core::option::Option< - unsafe extern "C" fn( - BusHandler: PBUS_HANDLER, - BufferSize: ULONG, - SlotNumbers: PULONG, - ReturnedLength: PULONG, - ) -> NTSTATUS, ->; -pub type pHalInitPnpDriver = ::core::option::Option NTSTATUS>; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PM_DISPATCH_TABLE { - pub Signature: ULONG, - pub Version: ULONG, - pub Function: [PVOID; 1usize], -} -#[test] -fn bindgen_test_layout__PM_DISPATCH_TABLE() { - const UNINIT: ::core::mem::MaybeUninit<_PM_DISPATCH_TABLE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PM_DISPATCH_TABLE>(), - 16usize, - concat!("Size of: ", stringify!(_PM_DISPATCH_TABLE)), - ); - assert_eq!( - ::core::mem::align_of::<_PM_DISPATCH_TABLE>(), - 8usize, - concat!("Alignment of ", stringify!(_PM_DISPATCH_TABLE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PM_DISPATCH_TABLE), - "::", - stringify!(Signature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PM_DISPATCH_TABLE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Function) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PM_DISPATCH_TABLE), - "::", - stringify!(Function), - ), - ); -} -impl Default for _PM_DISPATCH_TABLE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PM_DISPATCH_TABLE = _PM_DISPATCH_TABLE; -pub type PPM_DISPATCH_TABLE = *mut _PM_DISPATCH_TABLE; -pub type pHalInitPowerManagement = ::core::option::Option< - unsafe extern "C" fn( - PmDriverDispatchTable: PPM_DISPATCH_TABLE, - PmHalDispatchTable: *mut PPM_DISPATCH_TABLE, - ) -> NTSTATUS, ->; -pub type pHalGetDmaAdapter = ::core::option::Option< - unsafe extern "C" fn( - PhysicalDeviceObject: PVOID, - DeviceDescriptor: *mut _DEVICE_DESCRIPTION, - NumberOfMapRegisters: PULONG, - ) -> *mut _DMA_ADAPTER, ->; -pub type pHalGetInterruptTranslator = ::core::option::Option< - unsafe extern "C" fn( - ParentInterfaceType: INTERFACE_TYPE, - ParentBusNumber: ULONG, - BridgeInterfaceType: INTERFACE_TYPE, - Size: USHORT, - Version: USHORT, - Translator: PTRANSLATOR_INTERFACE, - BridgeBusNumber: PULONG, - ) -> NTSTATUS, ->; -pub type pHalTranslateBusAddress = ::core::option::Option< - unsafe extern "C" fn( - InterfaceType: INTERFACE_TYPE, - BusNumber: ULONG, - BusAddress: PHYSICAL_ADDRESS, - AddressSpace: PULONG, - TranslatedAddress: PPHYSICAL_ADDRESS, - ) -> BOOLEAN, ->; -pub type pHalAssignSlotResources = ::core::option::Option< - unsafe extern "C" fn( - RegistryPath: PUNICODE_STRING, - DriverClassName: PUNICODE_STRING, - DriverObject: PDRIVER_OBJECT, - DeviceObject: PDEVICE_OBJECT, - BusType: INTERFACE_TYPE, - BusNumber: ULONG, - SlotNumber: ULONG, - AllocatedResources: *mut PCM_RESOURCE_LIST, - ) -> NTSTATUS, ->; -pub type pHalHaltSystem = ::core::option::Option; -pub type pHalResetDisplay = ::core::option::Option BOOLEAN>; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MAP_REGISTER_ENTRY { - pub MapRegister: PVOID, - pub WriteToDevice: BOOLEAN, -} -#[test] -fn bindgen_test_layout__MAP_REGISTER_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_MAP_REGISTER_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MAP_REGISTER_ENTRY>(), - 16usize, - concat!("Size of: ", stringify!(_MAP_REGISTER_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_MAP_REGISTER_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_MAP_REGISTER_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MapRegister) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MAP_REGISTER_ENTRY), - "::", - stringify!(MapRegister), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WriteToDevice) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MAP_REGISTER_ENTRY), - "::", - stringify!(WriteToDevice), - ), - ); -} -impl Default for _MAP_REGISTER_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MAP_REGISTER_ENTRY = _MAP_REGISTER_ENTRY; -pub type PMAP_REGISTER_ENTRY = *mut _MAP_REGISTER_ENTRY; -pub type pHalVectorToIDTEntry = ::core::option::Option< - unsafe extern "C" fn(Vector: ULONG) -> UCHAR, ->; -pub type pHalFindBusAddressTranslation = ::core::option::Option< - unsafe extern "C" fn( - BusAddress: PHYSICAL_ADDRESS, - AddressSpace: PULONG, - TranslatedAddress: PPHYSICAL_ADDRESS, - Context: PULONG_PTR, - NextBus: BOOLEAN, - ) -> BOOLEAN, ->; -pub type pHalStartMirroring = ::core::option::Option NTSTATUS>; -pub type pHalEndMirroring = ::core::option::Option< - unsafe extern "C" fn(PassNumber: ULONG) -> NTSTATUS, ->; -pub type pHalMirrorPhysicalMemory = ::core::option::Option< - unsafe extern "C" fn( - PhysicalAddress: PHYSICAL_ADDRESS, - NumberOfBytes: LARGE_INTEGER, - ) -> NTSTATUS, ->; -pub type pHalMirrorVerify = ::core::option::Option< - unsafe extern "C" fn( - PhysicalAddress: PHYSICAL_ADDRESS, - NumberOfBytes: LARGE_INTEGER, - ) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct DEBUG_DEVICE_ADDRESS { - pub Type: UCHAR, - pub Valid: BOOLEAN, - pub __bindgen_anon_1: DEBUG_DEVICE_ADDRESS__bindgen_ty_1, - pub TranslatedAddress: PUCHAR, - pub Length: ULONG, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union DEBUG_DEVICE_ADDRESS__bindgen_ty_1 { - pub Reserved: [UCHAR; 2usize], - pub __bindgen_anon_1: DEBUG_DEVICE_ADDRESS__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct DEBUG_DEVICE_ADDRESS__bindgen_ty_1__bindgen_ty_1 { - pub BitWidth: UCHAR, - pub AccessSize: UCHAR, -} -#[test] -fn bindgen_test_layout_DEBUG_DEVICE_ADDRESS__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - DEBUG_DEVICE_ADDRESS__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 2usize, - concat!( - "Size of: ", - stringify!(DEBUG_DEVICE_ADDRESS__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::(), - 1usize, - concat!( - "Alignment of ", - stringify!(DEBUG_DEVICE_ADDRESS__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BitWidth) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(DEBUG_DEVICE_ADDRESS__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(BitWidth), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AccessSize) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(DEBUG_DEVICE_ADDRESS__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(AccessSize), - ), - ); -} -#[test] -fn bindgen_test_layout_DEBUG_DEVICE_ADDRESS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(DEBUG_DEVICE_ADDRESS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(DEBUG_DEVICE_ADDRESS__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(DEBUG_DEVICE_ADDRESS__bindgen_ty_1), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for DEBUG_DEVICE_ADDRESS__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout_DEBUG_DEVICE_ADDRESS() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(DEBUG_DEVICE_ADDRESS)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(DEBUG_DEVICE_ADDRESS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(DEBUG_DEVICE_ADDRESS), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Valid) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(DEBUG_DEVICE_ADDRESS), - "::", - stringify!(Valid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TranslatedAddress) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(DEBUG_DEVICE_ADDRESS), - "::", - stringify!(TranslatedAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(DEBUG_DEVICE_ADDRESS), - "::", - stringify!(Length), - ), - ); -} -impl Default for DEBUG_DEVICE_ADDRESS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PDEBUG_DEVICE_ADDRESS = *mut DEBUG_DEVICE_ADDRESS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct DEBUG_MEMORY_REQUIREMENTS { - pub Start: PHYSICAL_ADDRESS, - pub MaxEnd: PHYSICAL_ADDRESS, - pub VirtualAddress: PVOID, - pub Length: ULONG, - pub Cached: BOOLEAN, - pub Aligned: BOOLEAN, -} -#[test] -fn bindgen_test_layout_DEBUG_MEMORY_REQUIREMENTS() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(DEBUG_MEMORY_REQUIREMENTS)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(DEBUG_MEMORY_REQUIREMENTS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Start) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(DEBUG_MEMORY_REQUIREMENTS), - "::", - stringify!(Start), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxEnd) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(DEBUG_MEMORY_REQUIREMENTS), - "::", - stringify!(MaxEnd), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VirtualAddress) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(DEBUG_MEMORY_REQUIREMENTS), - "::", - stringify!(VirtualAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(DEBUG_MEMORY_REQUIREMENTS), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cached) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(DEBUG_MEMORY_REQUIREMENTS), - "::", - stringify!(Cached), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Aligned) as usize - ptr as usize }, - 29usize, - concat!( - "Offset of field: ", - stringify!(DEBUG_MEMORY_REQUIREMENTS), - "::", - stringify!(Aligned), - ), - ); -} -impl Default for DEBUG_MEMORY_REQUIREMENTS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PDEBUG_MEMORY_REQUIREMENTS = *mut DEBUG_MEMORY_REQUIREMENTS; -pub mod KD_NAMESPACE_ENUM { - pub type Type = ::core::ffi::c_int; - pub const KdNameSpacePCI: Type = 0; - pub const KdNameSpaceACPI: Type = 1; - pub const KdNameSpaceAny: Type = 2; - pub const KdNameSpaceNone: Type = 3; - pub const KdNameSpaceMax: Type = 4; -} -pub type PKD_NAMESPACE_ENUM = *mut KD_NAMESPACE_ENUM::Type; -pub mod KD_CALLBACK_ACTION { - pub type Type = ::core::ffi::c_int; - pub const KdConfigureDeviceAndContinue: Type = 0; - pub const KdSkipDeviceAndContinue: Type = 1; - pub const KdConfigureDeviceAndStop: Type = 2; - pub const KdSkipDeviceAndStop: Type = 3; -} -pub type PKD_CALLBACK_ACTION = *mut KD_CALLBACK_ACTION::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DEBUG_TRANSPORT_DATA { - pub HwContextSize: ULONG, - pub SharedVisibleDataSize: ULONG, - pub UseSerialFraming: BOOLEAN, - pub ValidUSBCoreId: BOOLEAN, - pub USBCoreId: UCHAR, -} -#[test] -fn bindgen_test_layout__DEBUG_TRANSPORT_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_DEBUG_TRANSPORT_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEBUG_TRANSPORT_DATA>(), - 12usize, - concat!("Size of: ", stringify!(_DEBUG_TRANSPORT_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_DEBUG_TRANSPORT_DATA>(), - 4usize, - concat!("Alignment of ", stringify!(_DEBUG_TRANSPORT_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HwContextSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_TRANSPORT_DATA), - "::", - stringify!(HwContextSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SharedVisibleDataSize) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_TRANSPORT_DATA), - "::", - stringify!(SharedVisibleDataSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UseSerialFraming) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_TRANSPORT_DATA), - "::", - stringify!(UseSerialFraming), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidUSBCoreId) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_TRANSPORT_DATA), - "::", - stringify!(ValidUSBCoreId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).USBCoreId) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_TRANSPORT_DATA), - "::", - stringify!(USBCoreId), - ), - ); -} -pub type DEBUG_TRANSPORT_DATA = _DEBUG_TRANSPORT_DATA; -pub type PDEBUG_TRANSPORT_DATA = *mut _DEBUG_TRANSPORT_DATA; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _DEBUG_IOMMU_EFI_DATA { - pub PciIoProtocolHandle: PVOID, - pub Mapping: PVOID, -} -#[test] -fn bindgen_test_layout__DEBUG_IOMMU_EFI_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_DEBUG_IOMMU_EFI_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEBUG_IOMMU_EFI_DATA>(), - 16usize, - concat!("Size of: ", stringify!(_DEBUG_IOMMU_EFI_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_DEBUG_IOMMU_EFI_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_DEBUG_IOMMU_EFI_DATA)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PciIoProtocolHandle) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_IOMMU_EFI_DATA), - "::", - stringify!(PciIoProtocolHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mapping) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_IOMMU_EFI_DATA), - "::", - stringify!(Mapping), - ), - ); -} -impl Default for _DEBUG_IOMMU_EFI_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEBUG_EFI_IOMMU_DATA = _DEBUG_IOMMU_EFI_DATA; -pub type PDEBUG_EFI_IOMMU_DATA = *mut _DEBUG_IOMMU_EFI_DATA; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DEBUG_DEVICE_DESCRIPTOR { - pub Bus: ULONG, - pub Slot: ULONG, - pub Segment: USHORT, - pub VendorID: USHORT, - pub DeviceID: USHORT, - pub BaseClass: UCHAR, - pub SubClass: UCHAR, - pub ProgIf: UCHAR, - pub __bindgen_anon_1: _DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1, - pub Initialized: BOOLEAN, - pub Configured: BOOLEAN, - pub BaseAddress: [DEBUG_DEVICE_ADDRESS; 6usize], - pub Memory: DEBUG_MEMORY_REQUIREMENTS, - pub Dbg2TableIndex: ULONG, - pub PortType: USHORT, - pub PortSubtype: USHORT, - pub OemData: PVOID, - pub OemDataLength: ULONG, - pub NameSpace: KD_NAMESPACE_ENUM::Type, - pub NameSpacePath: PWCHAR, - pub NameSpacePathLength: ULONG, - pub TransportType: ULONG, - pub TransportData: DEBUG_TRANSPORT_DATA, - pub EfiIoMmuData: DEBUG_EFI_IOMMU_DATA, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1 { - pub Flags: UCHAR, - pub __bindgen_anon_1: _DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1>(), - 1usize, - concat!( - "Size of: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn DbgHalScratchAllocated(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_DbgHalScratchAllocated(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgBarsMapped(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_DbgBarsMapped(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgScratchAllocated(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) } - } - #[inline] - pub fn set_DbgScratchAllocated(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgUncachedMemory(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) } - } - #[inline] - pub fn set_DbgUncachedMemory(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn DbgSynthetic(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) } - } - #[inline] - pub fn set_DbgSynthetic(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - DbgHalScratchAllocated: UCHAR, - DbgBarsMapped: UCHAR, - DbgScratchAllocated: UCHAR, - DbgUncachedMemory: UCHAR, - DbgSynthetic: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let DbgHalScratchAllocated: u8 = unsafe { - ::core::mem::transmute(DbgHalScratchAllocated) - }; - DbgHalScratchAllocated as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let DbgBarsMapped: u8 = unsafe { - ::core::mem::transmute(DbgBarsMapped) - }; - DbgBarsMapped as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let DbgScratchAllocated: u8 = unsafe { - ::core::mem::transmute(DbgScratchAllocated) - }; - DbgScratchAllocated as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let DbgUncachedMemory: u8 = unsafe { - ::core::mem::transmute(DbgUncachedMemory) - }; - DbgUncachedMemory as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let DbgSynthetic: u8 = unsafe { - ::core::mem::transmute(DbgSynthetic) - }; - DbgSynthetic as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1>(), - 1usize, - concat!("Size of: ", stringify!(_DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _DEBUG_DEVICE_DESCRIPTOR__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DEBUG_DEVICE_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_DEBUG_DEVICE_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEBUG_DEVICE_DESCRIPTOR>(), - 272usize, - concat!("Size of: ", stringify!(_DEBUG_DEVICE_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_DEBUG_DEVICE_DESCRIPTOR>(), - 8usize, - concat!("Alignment of ", stringify!(_DEBUG_DEVICE_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bus) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(Bus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Slot) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(Slot), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Segment) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(Segment), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VendorID) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(VendorID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceID) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(DeviceID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseClass) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(BaseClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubClass) as usize - ptr as usize }, - 15usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(SubClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProgIf) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(ProgIf), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Initialized) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(Initialized), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Configured) as usize - ptr as usize }, - 19usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(Configured), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseAddress) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(BaseAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Memory) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(Memory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dbg2TableIndex) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(Dbg2TableIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PortType) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(PortType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PortSubtype) as usize - ptr as usize }, - 206usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(PortSubtype), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OemData) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(OemData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OemDataLength) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(OemDataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameSpace) as usize - ptr as usize }, - 220usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(NameSpace), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameSpacePath) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(NameSpacePath), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NameSpacePathLength) as usize - ptr as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(NameSpacePathLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TransportType) as usize - ptr as usize }, - 236usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(TransportType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TransportData) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(TransportData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EfiIoMmuData) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_DEBUG_DEVICE_DESCRIPTOR), - "::", - stringify!(EfiIoMmuData), - ), - ); -} -impl Default for _DEBUG_DEVICE_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEBUG_DEVICE_DESCRIPTOR = _DEBUG_DEVICE_DESCRIPTOR; -pub type PDEBUG_DEVICE_DESCRIPTOR = *mut _DEBUG_DEVICE_DESCRIPTOR; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_DEBUGGING_DEVICE_IN_USE { - pub Segment: USHORT, - pub Bus: ULONG, - pub Slot: ULONG, -} -#[test] -fn bindgen_test_layout__PCI_DEBUGGING_DEVICE_IN_USE() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_DEBUGGING_DEVICE_IN_USE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_DEBUGGING_DEVICE_IN_USE>(), - 12usize, - concat!("Size of: ", stringify!(_PCI_DEBUGGING_DEVICE_IN_USE)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_DEBUGGING_DEVICE_IN_USE>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_DEBUGGING_DEVICE_IN_USE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Segment) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEBUGGING_DEVICE_IN_USE), - "::", - stringify!(Segment), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bus) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEBUGGING_DEVICE_IN_USE), - "::", - stringify!(Bus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Slot) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_DEBUGGING_DEVICE_IN_USE), - "::", - stringify!(Slot), - ), - ); -} -pub type PCI_DEBUGGING_DEVICE_IN_USE = _PCI_DEBUGGING_DEVICE_IN_USE; -pub type PPCI_DEBUGGING_DEVICE_IN_USE = *mut _PCI_DEBUGGING_DEVICE_IN_USE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ACPI_DEBUGGING_DEVICE_IN_USE { - pub NameSpacePathLength: ULONG, - pub NameSpacePath: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__ACPI_DEBUGGING_DEVICE_IN_USE() { - const UNINIT: ::core::mem::MaybeUninit<_ACPI_DEBUGGING_DEVICE_IN_USE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ACPI_DEBUGGING_DEVICE_IN_USE>(), - 8usize, - concat!("Size of: ", stringify!(_ACPI_DEBUGGING_DEVICE_IN_USE)), - ); - assert_eq!( - ::core::mem::align_of::<_ACPI_DEBUGGING_DEVICE_IN_USE>(), - 4usize, - concat!("Alignment of ", stringify!(_ACPI_DEBUGGING_DEVICE_IN_USE)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NameSpacePathLength) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_DEBUGGING_DEVICE_IN_USE), - "::", - stringify!(NameSpacePathLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameSpacePath) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ACPI_DEBUGGING_DEVICE_IN_USE), - "::", - stringify!(NameSpacePath), - ), - ); -} -pub type ACPI_DEBUGGING_DEVICE_IN_USE = _ACPI_DEBUGGING_DEVICE_IN_USE; -pub type PACPI_DEBUGGING_DEVICE_IN_USE = *mut _ACPI_DEBUGGING_DEVICE_IN_USE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DEBUGGING_DEVICE_IN_USE { - pub NameSpace: KD_NAMESPACE_ENUM::Type, - pub StructureLength: ULONG, - pub __bindgen_anon_1: _DEBUGGING_DEVICE_IN_USE__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _DEBUGGING_DEVICE_IN_USE__bindgen_ty_1 { - pub AcpiDevice: ACPI_DEBUGGING_DEVICE_IN_USE, - pub PciDevice: PCI_DEBUGGING_DEVICE_IN_USE, -} -#[test] -fn bindgen_test_layout__DEBUGGING_DEVICE_IN_USE__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_DEBUGGING_DEVICE_IN_USE__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEBUGGING_DEVICE_IN_USE__bindgen_ty_1>(), - 12usize, - concat!("Size of: ", stringify!(_DEBUGGING_DEVICE_IN_USE__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_DEBUGGING_DEVICE_IN_USE__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_DEBUGGING_DEVICE_IN_USE__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AcpiDevice) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEBUGGING_DEVICE_IN_USE__bindgen_ty_1), - "::", - stringify!(AcpiDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PciDevice) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEBUGGING_DEVICE_IN_USE__bindgen_ty_1), - "::", - stringify!(PciDevice), - ), - ); -} -impl Default for _DEBUGGING_DEVICE_IN_USE__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__DEBUGGING_DEVICE_IN_USE() { - const UNINIT: ::core::mem::MaybeUninit<_DEBUGGING_DEVICE_IN_USE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEBUGGING_DEVICE_IN_USE>(), - 20usize, - concat!("Size of: ", stringify!(_DEBUGGING_DEVICE_IN_USE)), - ); - assert_eq!( - ::core::mem::align_of::<_DEBUGGING_DEVICE_IN_USE>(), - 4usize, - concat!("Alignment of ", stringify!(_DEBUGGING_DEVICE_IN_USE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameSpace) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEBUGGING_DEVICE_IN_USE), - "::", - stringify!(NameSpace), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StructureLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DEBUGGING_DEVICE_IN_USE), - "::", - stringify!(StructureLength), - ), - ); -} -impl Default for _DEBUGGING_DEVICE_IN_USE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEBUGGING_DEVICE_IN_USE = _DEBUGGING_DEVICE_IN_USE; -pub type PDEBUGGING_DEVICE_IN_USE = *mut _DEBUGGING_DEVICE_IN_USE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DEBUGGING_DEVICE_IN_USE_INFORMATION { - pub DeviceCount: ULONG, - pub Device: [DEBUGGING_DEVICE_IN_USE; 1usize], -} -#[test] -fn bindgen_test_layout__DEBUGGING_DEVICE_IN_USE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_DEBUGGING_DEVICE_IN_USE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DEBUGGING_DEVICE_IN_USE_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_DEBUGGING_DEVICE_IN_USE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_DEBUGGING_DEVICE_IN_USE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_DEBUGGING_DEVICE_IN_USE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DEBUGGING_DEVICE_IN_USE_INFORMATION), - "::", - stringify!(DeviceCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Device) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DEBUGGING_DEVICE_IN_USE_INFORMATION), - "::", - stringify!(Device), - ), - ); -} -impl Default for _DEBUGGING_DEVICE_IN_USE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DEBUGGING_DEVICE_IN_USE_INFORMATION = _DEBUGGING_DEVICE_IN_USE_INFORMATION; -pub type PDEBUGGING_DEVICE_IN_USE_INFORMATION = *mut _DEBUGGING_DEVICE_IN_USE_INFORMATION; -pub type PDEBUG_DEVICE_FOUND_FUNCTION = ::core::option::Option< - unsafe extern "C" fn(Device: PDEBUG_DEVICE_DESCRIPTOR) -> KD_CALLBACK_ACTION::Type, ->; -pub type pKdEnumerateDebuggingDevices = ::core::option::Option< - unsafe extern "C" fn( - LoaderBlock: PVOID, - Device: PDEBUG_DEVICE_DESCRIPTOR, - Callback: PDEBUG_DEVICE_FOUND_FUNCTION, - ) -> NTSTATUS, ->; -pub type pKdSetupPciDeviceForDebugging = ::core::option::Option< - unsafe extern "C" fn( - LoaderBlock: PVOID, - PciDevice: PDEBUG_DEVICE_DESCRIPTOR, - ) -> NTSTATUS, ->; -pub type pKdReleasePciDeviceForDebugging = ::core::option::Option< - unsafe extern "C" fn(PciDevice: PDEBUG_DEVICE_DESCRIPTOR) -> NTSTATUS, ->; -pub type pKdSetupIntegratedDeviceForDebugging = ::core::option::Option< - unsafe extern "C" fn( - LoaderBlock: PVOID, - IntegratedDevice: PDEBUG_DEVICE_DESCRIPTOR, - ) -> NTSTATUS, ->; -pub type pKdReleaseIntegratedDeviceForDebugging = ::core::option::Option< - unsafe extern "C" fn(IntegratedDevice: PDEBUG_DEVICE_DESCRIPTOR) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _LOADER_PARAMETER_BLOCK { - _unused: [u8; 0], -} -pub type pKdGetAcpiTablePhase0 = ::core::option::Option< - unsafe extern "C" fn( - LoaderBlock: *mut _LOADER_PARAMETER_BLOCK, - Signature: ULONG, - ) -> PVOID, ->; -pub type pKdCheckPowerButton = ::core::option::Option; -pub type pHalEndOfBoot = ::core::option::Option; -pub type pKdMapPhysicalMemory64 = ::core::option::Option< - unsafe extern "C" fn( - PhysicalAddress: PHYSICAL_ADDRESS, - NumberPages: ULONG, - FlushCurrentTLB: BOOLEAN, - ) -> PVOID, ->; -pub type pKdUnmapVirtualAddress = ::core::option::Option< - unsafe extern "C" fn( - VirtualAddress: PVOID, - NumberPages: ULONG, - FlushCurrentTLB: BOOLEAN, - ), ->; -pub type pKdGetPciDataByOffset = ::core::option::Option< - unsafe extern "C" fn( - BusNumber: ULONG, - SlotNumber: ULONG, - Buffer: PVOID, - Offset: ULONG, - Length: ULONG, - ) -> ULONG, ->; -pub type pKdSetPciDataByOffset = ::core::option::Option< - unsafe extern "C" fn( - BusNumber: ULONG, - SlotNumber: ULONG, - Buffer: PVOID, - Offset: ULONG, - Length: ULONG, - ) -> ULONG, ->; -pub type pHalGetAcpiTable = ::core::option::Option< - unsafe extern "C" fn(Signature: ULONG, OemId: PCSTR, OemTableId: PCSTR) -> PVOID, ->; -pub type PCI_ERROR_HANDLER_CALLBACK = ::core::option::Option; -pub type pHalSetPciErrorHandlerCallback = ::core::option::Option< - unsafe extern "C" fn(Callback: PCI_ERROR_HANDLER_CALLBACK), ->; -pub type pHalGetPrmCache = ::core::option::Option< - unsafe extern "C" fn(FirmwareList: *mut PLIST_ENTRY, UpdateList: *mut PLIST_ENTRY), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct HAL_DISPATCH { - pub Version: ULONG, - pub HalQuerySystemInformation: pHalQuerySystemInformation, - pub HalSetSystemInformation: pHalSetSystemInformation, - pub HalQueryBusSlots: pHalQueryBusSlots, - pub Spare1: ULONG, - pub HalExamineMBR: pHalExamineMBR, - pub HalIoReadPartitionTable: pHalIoReadPartitionTable, - pub HalIoSetPartitionInformation: pHalIoSetPartitionInformation, - pub HalIoWritePartitionTable: pHalIoWritePartitionTable, - pub HalReferenceHandlerForBus: pHalHandlerForBus, - pub HalReferenceBusHandler: pHalReferenceBusHandler, - pub HalDereferenceBusHandler: pHalReferenceBusHandler, - pub HalInitPnpDriver: pHalInitPnpDriver, - pub HalInitPowerManagement: pHalInitPowerManagement, - pub HalGetDmaAdapter: pHalGetDmaAdapter, - pub HalGetInterruptTranslator: pHalGetInterruptTranslator, - pub HalStartMirroring: pHalStartMirroring, - pub HalEndMirroring: pHalEndMirroring, - pub HalMirrorPhysicalMemory: pHalMirrorPhysicalMemory, - pub HalEndOfBoot: pHalEndOfBoot, - pub HalMirrorVerify: pHalMirrorVerify, - pub HalGetCachedAcpiTable: pHalGetAcpiTable, - pub HalSetPciErrorHandlerCallback: pHalSetPciErrorHandlerCallback, - pub HalGetPrmCache: pHalGetPrmCache, -} -#[test] -fn bindgen_test_layout_HAL_DISPATCH() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 192usize, - concat!("Size of: ", stringify!(HAL_DISPATCH)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(HAL_DISPATCH)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(HAL_DISPATCH), "::", stringify!(Version)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalQuerySystemInformation) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalQuerySystemInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalSetSystemInformation) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalSetSystemInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalQueryBusSlots) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalQueryBusSlots), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Spare1) as usize - ptr as usize }, - 32usize, - concat!("Offset of field: ", stringify!(HAL_DISPATCH), "::", stringify!(Spare1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HalExamineMBR) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalExamineMBR), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalIoReadPartitionTable) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalIoReadPartitionTable), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalIoSetPartitionInformation) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalIoSetPartitionInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalIoWritePartitionTable) as usize - - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalIoWritePartitionTable), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalReferenceHandlerForBus) as usize - - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalReferenceHandlerForBus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalReferenceBusHandler) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalReferenceBusHandler), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalDereferenceBusHandler) as usize - - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalDereferenceBusHandler), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalInitPnpDriver) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalInitPnpDriver), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalInitPowerManagement) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalInitPowerManagement), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalGetDmaAdapter) as usize - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalGetDmaAdapter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalGetInterruptTranslator) as usize - - ptr as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalGetInterruptTranslator), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalStartMirroring) as usize - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalStartMirroring), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HalEndMirroring) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalEndMirroring), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalMirrorPhysicalMemory) as usize - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalMirrorPhysicalMemory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HalEndOfBoot) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalEndOfBoot), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HalMirrorVerify) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalMirrorVerify), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalGetCachedAcpiTable) as usize - ptr as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalGetCachedAcpiTable), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HalSetPciErrorHandlerCallback) as usize - - ptr as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalSetPciErrorHandlerCallback), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HalGetPrmCache) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(HAL_DISPATCH), - "::", - stringify!(HalGetPrmCache), - ), - ); -} -pub type PHAL_DISPATCH = *mut HAL_DISPATCH; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _HAL_BUS_INFORMATION { - pub BusType: INTERFACE_TYPE, - pub ConfigurationType: BUS_DATA_TYPE, - pub BusNumber: ULONG, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__HAL_BUS_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_HAL_BUS_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_HAL_BUS_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_HAL_BUS_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_HAL_BUS_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_HAL_BUS_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_HAL_BUS_INFORMATION), - "::", - stringify!(BusType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ConfigurationType) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_HAL_BUS_INFORMATION), - "::", - stringify!(ConfigurationType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusNumber) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_HAL_BUS_INFORMATION), - "::", - stringify!(BusNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_HAL_BUS_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _HAL_BUS_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type HAL_BUS_INFORMATION = _HAL_BUS_INFORMATION; -pub type PHAL_BUS_INFORMATION = *mut _HAL_BUS_INFORMATION; -pub mod _HAL_DISPLAY_BIOS_INFORMATION { - pub type Type = ::core::ffi::c_int; - pub const HalDisplayInt10Bios: Type = 0; - pub const HalDisplayEmulatedBios: Type = 1; - pub const HalDisplayNoBios: Type = 2; -} -pub use self::_HAL_DISPLAY_BIOS_INFORMATION::Type as HAL_DISPLAY_BIOS_INFORMATION; -pub type PHAL_DISPLAY_BIOS_INFORMATION = *mut _HAL_DISPLAY_BIOS_INFORMATION::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _HAL_POWER_INFORMATION { - pub TBD: ULONG, -} -#[test] -fn bindgen_test_layout__HAL_POWER_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_HAL_POWER_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_HAL_POWER_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_HAL_POWER_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_HAL_POWER_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_HAL_POWER_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TBD) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_HAL_POWER_INFORMATION), - "::", - stringify!(TBD), - ), - ); -} -pub type HAL_POWER_INFORMATION = _HAL_POWER_INFORMATION; -pub type PHAL_POWER_INFORMATION = *mut _HAL_POWER_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _HAL_PROCESSOR_SPEED_INFO { - pub ProcessorSpeed: ULONG, -} -#[test] -fn bindgen_test_layout__HAL_PROCESSOR_SPEED_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_HAL_PROCESSOR_SPEED_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_HAL_PROCESSOR_SPEED_INFO>(), - 4usize, - concat!("Size of: ", stringify!(_HAL_PROCESSOR_SPEED_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_HAL_PROCESSOR_SPEED_INFO>(), - 4usize, - concat!("Alignment of ", stringify!(_HAL_PROCESSOR_SPEED_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProcessorSpeed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_HAL_PROCESSOR_SPEED_INFO), - "::", - stringify!(ProcessorSpeed), - ), - ); -} -pub type HAL_PROCESSOR_SPEED_INFORMATION = _HAL_PROCESSOR_SPEED_INFO; -pub type PHAL_PROCESSOR_SPEED_INFORMATION = *mut _HAL_PROCESSOR_SPEED_INFO; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _HAL_CALLBACKS { - pub SetSystemInformation: PCALLBACK_OBJECT, - pub BusCheck: PCALLBACK_OBJECT, -} -#[test] -fn bindgen_test_layout__HAL_CALLBACKS() { - const UNINIT: ::core::mem::MaybeUninit<_HAL_CALLBACKS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_HAL_CALLBACKS>(), - 16usize, - concat!("Size of: ", stringify!(_HAL_CALLBACKS)), - ); - assert_eq!( - ::core::mem::align_of::<_HAL_CALLBACKS>(), - 8usize, - concat!("Alignment of ", stringify!(_HAL_CALLBACKS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetSystemInformation) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_HAL_CALLBACKS), - "::", - stringify!(SetSystemInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusCheck) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_HAL_CALLBACKS), - "::", - stringify!(BusCheck), - ), - ); -} -impl Default for _HAL_CALLBACKS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type HAL_CALLBACKS = _HAL_CALLBACKS; -pub type PHAL_CALLBACKS = *mut _HAL_CALLBACKS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _HAL_PROCESSOR_FEATURE { - pub UsableFeatureBits: ULONG, -} -#[test] -fn bindgen_test_layout__HAL_PROCESSOR_FEATURE() { - const UNINIT: ::core::mem::MaybeUninit<_HAL_PROCESSOR_FEATURE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_HAL_PROCESSOR_FEATURE>(), - 4usize, - concat!("Size of: ", stringify!(_HAL_PROCESSOR_FEATURE)), - ); - assert_eq!( - ::core::mem::align_of::<_HAL_PROCESSOR_FEATURE>(), - 4usize, - concat!("Alignment of ", stringify!(_HAL_PROCESSOR_FEATURE)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UsableFeatureBits) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_HAL_PROCESSOR_FEATURE), - "::", - stringify!(UsableFeatureBits), - ), - ); -} -pub type HAL_PROCESSOR_FEATURE = _HAL_PROCESSOR_FEATURE; -pub type PHALIOREADWRITEHANDLER = ::core::option::Option< - unsafe extern "C" fn( - fRead: BOOLEAN, - dwAddr: ULONG, - dwSize: ULONG, - pdwData: PULONG, - ) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _HAL_AMLI_BAD_IO_ADDRESS_LIST { - pub BadAddrBegin: ULONG, - pub BadAddrSize: ULONG, - pub OSVersionTrigger: ULONG, - pub IOHandler: PHALIOREADWRITEHANDLER, -} -#[test] -fn bindgen_test_layout__HAL_AMLI_BAD_IO_ADDRESS_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_HAL_AMLI_BAD_IO_ADDRESS_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_HAL_AMLI_BAD_IO_ADDRESS_LIST>(), - 24usize, - concat!("Size of: ", stringify!(_HAL_AMLI_BAD_IO_ADDRESS_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_HAL_AMLI_BAD_IO_ADDRESS_LIST>(), - 8usize, - concat!("Alignment of ", stringify!(_HAL_AMLI_BAD_IO_ADDRESS_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BadAddrBegin) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_HAL_AMLI_BAD_IO_ADDRESS_LIST), - "::", - stringify!(BadAddrBegin), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BadAddrSize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_HAL_AMLI_BAD_IO_ADDRESS_LIST), - "::", - stringify!(BadAddrSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OSVersionTrigger) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_HAL_AMLI_BAD_IO_ADDRESS_LIST), - "::", - stringify!(OSVersionTrigger), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IOHandler) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_HAL_AMLI_BAD_IO_ADDRESS_LIST), - "::", - stringify!(IOHandler), - ), - ); -} -pub type HAL_AMLI_BAD_IO_ADDRESS_LIST = _HAL_AMLI_BAD_IO_ADDRESS_LIST; -pub type PHAL_AMLI_BAD_IO_ADDRESS_LIST = *mut _HAL_AMLI_BAD_IO_ADDRESS_LIST; -pub type PHALMCAINTERFACELOCK = ::core::option::Option; -pub type PHALMCAINTERFACEUNLOCK = ::core::option::Option; -pub type PHALMCAINTERFACEREADREGISTER = ::core::option::Option< - unsafe extern "C" fn(BankNumber: UCHAR, Exception: PVOID) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _HAL_MCA_INTERFACE { - pub Lock: PHALMCAINTERFACELOCK, - pub Unlock: PHALMCAINTERFACEUNLOCK, - pub ReadRegister: PHALMCAINTERFACEREADREGISTER, -} -#[test] -fn bindgen_test_layout__HAL_MCA_INTERFACE() { - const UNINIT: ::core::mem::MaybeUninit<_HAL_MCA_INTERFACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_HAL_MCA_INTERFACE>(), - 24usize, - concat!("Size of: ", stringify!(_HAL_MCA_INTERFACE)), - ); - assert_eq!( - ::core::mem::align_of::<_HAL_MCA_INTERFACE>(), - 8usize, - concat!("Alignment of ", stringify!(_HAL_MCA_INTERFACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lock) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_HAL_MCA_INTERFACE), - "::", - stringify!(Lock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unlock) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_HAL_MCA_INTERFACE), - "::", - stringify!(Unlock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadRegister) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_HAL_MCA_INTERFACE), - "::", - stringify!(ReadRegister), - ), - ); -} -pub type HAL_MCA_INTERFACE = _HAL_MCA_INTERFACE; -pub mod HAL_APIC_DESTINATION_MODE { - pub type Type = ::core::ffi::c_int; - pub const ApicDestinationModePhysical: Type = 1; - pub const ApicDestinationModeLogicalFlat: Type = 2; - pub const ApicDestinationModeLogicalClustered: Type = 3; - pub const ApicDestinationModeUnknown: Type = 4; -} -pub type PHAL_APIC_DESTINATION_MODE = *mut HAL_APIC_DESTINATION_MODE::Type; -pub type PDRIVER_EXCPTN_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - TrapFrame: *mut _KTRAP_FRAME, - ExceptionFrame: *mut _KEXCEPTION_FRAME, - Exception: PMCA_EXCEPTION, - ) -> ERROR_SEVERITY, ->; -pub type PDRIVER_MCA_EXCEPTION_CALLBACK = PDRIVER_EXCPTN_CALLBACK; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MCA_DRIVER_INFO { - pub ExceptionCallback: PDRIVER_MCA_EXCEPTION_CALLBACK, - pub DpcCallback: PKDEFERRED_ROUTINE, - pub DeviceContext: PVOID, -} -#[test] -fn bindgen_test_layout__MCA_DRIVER_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_MCA_DRIVER_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MCA_DRIVER_INFO>(), - 24usize, - concat!("Size of: ", stringify!(_MCA_DRIVER_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_MCA_DRIVER_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_MCA_DRIVER_INFO)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExceptionCallback) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MCA_DRIVER_INFO), - "::", - stringify!(ExceptionCallback), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DpcCallback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MCA_DRIVER_INFO), - "::", - stringify!(DpcCallback), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceContext) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MCA_DRIVER_INFO), - "::", - stringify!(DeviceContext), - ), - ); -} -impl Default for _MCA_DRIVER_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MCA_DRIVER_INFO = _MCA_DRIVER_INFO; -pub type PMCA_DRIVER_INFO = *mut _MCA_DRIVER_INFO; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _HAL_ERROR_INFO { - pub Version: ULONG, - pub InitMaxSize: ULONG, - pub McaMaxSize: ULONG, - pub McaPreviousEventsCount: ULONG, - pub McaCorrectedEventsCount: ULONG, - pub McaKernelDeliveryFails: ULONG, - pub McaDriverDpcQueueFails: ULONG, - pub McaReserved: ULONG, - pub CmcMaxSize: ULONG, - pub CmcPollingInterval: ULONG, - pub CmcInterruptsCount: ULONG, - pub CmcKernelDeliveryFails: ULONG, - pub CmcDriverDpcQueueFails: ULONG, - pub CmcGetStateFails: ULONG, - pub CmcClearStateFails: ULONG, - pub CmcReserved: ULONG, - pub CmcLogId: ULONGLONG, - pub CpeMaxSize: ULONG, - pub CpePollingInterval: ULONG, - pub CpeInterruptsCount: ULONG, - pub CpeKernelDeliveryFails: ULONG, - pub CpeDriverDpcQueueFails: ULONG, - pub CpeGetStateFails: ULONG, - pub CpeClearStateFails: ULONG, - pub CpeInterruptSources: ULONG, - pub CpeLogId: ULONGLONG, - pub KernelReserved: [ULONGLONG; 4usize], -} -#[test] -fn bindgen_test_layout__HAL_ERROR_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_HAL_ERROR_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_HAL_ERROR_INFO>(), - 144usize, - concat!("Size of: ", stringify!(_HAL_ERROR_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_HAL_ERROR_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_HAL_ERROR_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InitMaxSize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(InitMaxSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).McaMaxSize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(McaMaxSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).McaPreviousEventsCount) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(McaPreviousEventsCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).McaCorrectedEventsCount) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(McaCorrectedEventsCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).McaKernelDeliveryFails) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(McaKernelDeliveryFails), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).McaDriverDpcQueueFails) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(McaDriverDpcQueueFails), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).McaReserved) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(McaReserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CmcMaxSize) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CmcMaxSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CmcPollingInterval) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CmcPollingInterval), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CmcInterruptsCount) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CmcInterruptsCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CmcKernelDeliveryFails) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CmcKernelDeliveryFails), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CmcDriverDpcQueueFails) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CmcDriverDpcQueueFails), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CmcGetStateFails) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CmcGetStateFails), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CmcClearStateFails) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CmcClearStateFails), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CmcReserved) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CmcReserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CmcLogId) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CmcLogId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CpeMaxSize) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CpeMaxSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CpePollingInterval) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CpePollingInterval), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CpeInterruptsCount) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CpeInterruptsCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CpeKernelDeliveryFails) as usize - ptr as usize - }, - 84usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CpeKernelDeliveryFails), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CpeDriverDpcQueueFails) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CpeDriverDpcQueueFails), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CpeGetStateFails) as usize - ptr as usize - }, - 92usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CpeGetStateFails), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CpeClearStateFails) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CpeClearStateFails), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CpeInterruptSources) as usize - ptr as usize - }, - 100usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CpeInterruptSources), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CpeLogId) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(CpeLogId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KernelReserved) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_HAL_ERROR_INFO), - "::", - stringify!(KernelReserved), - ), - ); -} -pub type HAL_ERROR_INFO = _HAL_ERROR_INFO; -pub type PHAL_ERROR_INFO = *mut _HAL_ERROR_INFO; -pub type PDRIVER_CMC_EXCEPTION_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, CmcLog: PCMC_EXCEPTION), ->; -pub type PDRIVER_CPE_EXCEPTION_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, CmcLog: PCPE_EXCEPTION), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CMC_DRIVER_INFO { - pub ExceptionCallback: PDRIVER_CMC_EXCEPTION_CALLBACK, - pub DpcCallback: PKDEFERRED_ROUTINE, - pub DeviceContext: PVOID, -} -#[test] -fn bindgen_test_layout__CMC_DRIVER_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_CMC_DRIVER_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CMC_DRIVER_INFO>(), - 24usize, - concat!("Size of: ", stringify!(_CMC_DRIVER_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_CMC_DRIVER_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_CMC_DRIVER_INFO)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExceptionCallback) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CMC_DRIVER_INFO), - "::", - stringify!(ExceptionCallback), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DpcCallback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CMC_DRIVER_INFO), - "::", - stringify!(DpcCallback), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceContext) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CMC_DRIVER_INFO), - "::", - stringify!(DeviceContext), - ), - ); -} -impl Default for _CMC_DRIVER_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CMC_DRIVER_INFO = _CMC_DRIVER_INFO; -pub type PCMC_DRIVER_INFO = *mut _CMC_DRIVER_INFO; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CPE_DRIVER_INFO { - pub ExceptionCallback: PDRIVER_CPE_EXCEPTION_CALLBACK, - pub DpcCallback: PKDEFERRED_ROUTINE, - pub DeviceContext: PVOID, -} -#[test] -fn bindgen_test_layout__CPE_DRIVER_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_CPE_DRIVER_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CPE_DRIVER_INFO>(), - 24usize, - concat!("Size of: ", stringify!(_CPE_DRIVER_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_CPE_DRIVER_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_CPE_DRIVER_INFO)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExceptionCallback) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CPE_DRIVER_INFO), - "::", - stringify!(ExceptionCallback), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DpcCallback) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CPE_DRIVER_INFO), - "::", - stringify!(DpcCallback), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceContext) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CPE_DRIVER_INFO), - "::", - stringify!(DeviceContext), - ), - ); -} -impl Default for _CPE_DRIVER_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CPE_DRIVER_INFO = _CPE_DRIVER_INFO; -pub type PCPE_DRIVER_INFO = *mut _CPE_DRIVER_INFO; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _HAL_PLATFORM_INFORMATION { - pub PlatformFlags: ULONG, -} -#[test] -fn bindgen_test_layout__HAL_PLATFORM_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_HAL_PLATFORM_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_HAL_PLATFORM_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_HAL_PLATFORM_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_HAL_PLATFORM_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_HAL_PLATFORM_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PlatformFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_HAL_PLATFORM_INFORMATION), - "::", - stringify!(PlatformFlags), - ), - ); -} -pub type HAL_PLATFORM_INFORMATION = _HAL_PLATFORM_INFORMATION; -pub type PHAL_PLATFORM_INFORMATION = *mut _HAL_PLATFORM_INFORMATION; -pub type PWHEA_ERROR_SOURCE_DESCRIPTOR = *mut _WHEA_ERROR_SOURCE_DESCRIPTOR; -pub type PWHEA_ERROR_RECORD = *mut _WHEA_ERROR_RECORD; -pub mod _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR_TYPE { - pub type Type = ::core::ffi::c_int; - pub const ResourceTypeSingle: Type = 0; - pub const ResourceTypeRange: Type = 1; - pub const ResourceTypeExtendedCounterConfiguration: Type = 2; - pub const ResourceTypeOverflow: Type = 3; - pub const ResourceTypeEventBuffer: Type = 4; - pub const ResourceTypeIdenitificationTag: Type = 5; - pub const ResourceTypeMax: Type = 6; -} -pub use self::_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR_TYPE::Type as PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR_TYPE; -pub type PPHYSICAL_COUNTER_OVERFLOW_HANDLER = ::core::option::Option< - unsafe extern "C" fn(OverflowBits: ULONGLONG, OwningHandle: HANDLE), ->; -pub type PPHYSICAL_COUNTER_EVENT_BUFFER_OVERFLOW_HANDLER = ::core::option::Option< - unsafe extern "C" fn( - EventBuffer: PVOID, - EntrySize: SIZE_T, - NumberOfEntries: SIZE_T, - OwningHandle: HANDLE, - ), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION { - pub OverflowHandler: PPHYSICAL_COUNTER_EVENT_BUFFER_OVERFLOW_HANDLER, - pub CustomEventBufferEntrySize: ULONG, - pub EventThreshold: ULONG, -} -#[test] -fn bindgen_test_layout__PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION() { - const UNINIT: ::core::mem::MaybeUninit< - _PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION>(), - 16usize, - concat!("Size of: ", stringify!(_PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OverflowHandler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION), - "::", - stringify!(OverflowHandler), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CustomEventBufferEntrySize) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION), - "::", - stringify!(CustomEventBufferEntrySize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EventThreshold) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION), - "::", - stringify!(EventThreshold), - ), - ); -} -pub type PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION = _PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION; -pub type PPHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION = *mut _PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR { - pub Type: PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR_TYPE, - pub Flags: ULONG, - pub u: _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1 { - pub CounterIndex: ULONG, - pub Range: _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - pub OverflowHandler: PPHYSICAL_COUNTER_OVERFLOW_HANDLER, - pub EventBufferConfiguration: PHYSICAL_COUNTER_EVENT_BUFFER_CONFIGURATION, - pub IdentificationTag: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1 { - pub Begin: ULONG, - pub End: ULONG, -} -#[test] -fn bindgen_test_layout__PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Begin) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(Begin), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).End) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!( - _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(End), - ), - ); -} -#[test] -fn bindgen_test_layout__PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1>(), - 16usize, - concat!( - "Size of: ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CounterIndex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(CounterIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Range) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Range), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OverflowHandler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(OverflowHandler), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EventBufferConfiguration) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(EventBufferConfiguration), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IdentificationTag) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(IdentificationTag), - ), - ); -} -impl Default for _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR>(), - 24usize, - concat!("Size of: ", stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR>(), - 8usize, - concat!("Alignment of ", stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR), - "::", - stringify!(u), - ), - ); -} -impl Default for _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR = _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR; -pub type PPHYSICAL_COUNTER_RESOURCE_DESCRIPTOR = *mut _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PHYSICAL_COUNTER_RESOURCE_LIST { - pub Count: ULONG, - pub Descriptors: [PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR; 1usize], -} -#[test] -fn bindgen_test_layout__PHYSICAL_COUNTER_RESOURCE_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_PHYSICAL_COUNTER_RESOURCE_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PHYSICAL_COUNTER_RESOURCE_LIST>(), - 32usize, - concat!("Size of: ", stringify!(_PHYSICAL_COUNTER_RESOURCE_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_PHYSICAL_COUNTER_RESOURCE_LIST>(), - 8usize, - concat!("Alignment of ", stringify!(_PHYSICAL_COUNTER_RESOURCE_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_LIST), - "::", - stringify!(Count), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Descriptors) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_COUNTER_RESOURCE_LIST), - "::", - stringify!(Descriptors), - ), - ); -} -impl Default for _PHYSICAL_COUNTER_RESOURCE_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PHYSICAL_COUNTER_RESOURCE_LIST = _PHYSICAL_COUNTER_RESOURCE_LIST; -pub type PPHYSICAL_COUNTER_RESOURCE_LIST = *mut _PHYSICAL_COUNTER_RESOURCE_LIST; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_AGP_CAPABILITY { - pub Header: PCI_CAPABILITIES_HEADER, - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, - pub AGPStatus: _PCI_AGP_CAPABILITY__PCI_AGP_STATUS, - pub AGPCommand: _PCI_AGP_CAPABILITY__PCI_AGP_COMMAND, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_AGP_CAPABILITY__PCI_AGP_STATUS { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_AGP_CAPABILITY__PCI_AGP_STATUS() { - assert_eq!( - ::core::mem::size_of::<_PCI_AGP_CAPABILITY__PCI_AGP_STATUS>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_AGP_CAPABILITY__PCI_AGP_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_AGP_CAPABILITY__PCI_AGP_STATUS>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_AGP_CAPABILITY__PCI_AGP_STATUS)), - ); -} -impl _PCI_AGP_CAPABILITY__PCI_AGP_STATUS { - #[inline] - pub fn Rate(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u32) } - } - #[inline] - pub fn set_Rate(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn Agp3Mode(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_Agp3Mode(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn FastWrite(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_FastWrite(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn FourGB(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_FourGB(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn HostTransDisable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_HostTransDisable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn Gart64(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_Gart64(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn ITA_Coherent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_ITA_Coherent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn SideBandAddressing(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_SideBandAddressing(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn CalibrationCycle(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 3u8) as u32) } - } - #[inline] - pub fn set_CalibrationCycle(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 3u8, val as u64) - } - } - #[inline] - pub fn AsyncRequestSize(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u32) } - } - #[inline] - pub fn set_AsyncRequestSize(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 3u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn Isoch(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_Isoch(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 6u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 6u8, val as u64) - } - } - #[inline] - pub fn RequestQueueDepthMaximum(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_RequestQueueDepthMaximum(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Rate: ULONG, - Agp3Mode: ULONG, - FastWrite: ULONG, - FourGB: ULONG, - HostTransDisable: ULONG, - Gart64: ULONG, - ITA_Coherent: ULONG, - SideBandAddressing: ULONG, - CalibrationCycle: ULONG, - AsyncRequestSize: ULONG, - Rsvd1: ULONG, - Isoch: ULONG, - Rsvd2: ULONG, - RequestQueueDepthMaximum: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let Rate: u32 = unsafe { ::core::mem::transmute(Rate) }; - Rate as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let Agp3Mode: u32 = unsafe { ::core::mem::transmute(Agp3Mode) }; - Agp3Mode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let FastWrite: u32 = unsafe { ::core::mem::transmute(FastWrite) }; - FastWrite as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let FourGB: u32 = unsafe { ::core::mem::transmute(FourGB) }; - FourGB as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let HostTransDisable: u32 = unsafe { - ::core::mem::transmute(HostTransDisable) - }; - HostTransDisable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let Gart64: u32 = unsafe { ::core::mem::transmute(Gart64) }; - Gart64 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let ITA_Coherent: u32 = unsafe { - ::core::mem::transmute(ITA_Coherent) - }; - ITA_Coherent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let SideBandAddressing: u32 = unsafe { - ::core::mem::transmute(SideBandAddressing) - }; - SideBandAddressing as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 3u8, - { - let CalibrationCycle: u32 = unsafe { - ::core::mem::transmute(CalibrationCycle) - }; - CalibrationCycle as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 3u8, - { - let AsyncRequestSize: u32 = unsafe { - ::core::mem::transmute(AsyncRequestSize) - }; - AsyncRequestSize as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let Rsvd1: u32 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let Isoch: u32 = unsafe { ::core::mem::transmute(Isoch) }; - Isoch as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 6u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let RequestQueueDepthMaximum: u32 = unsafe { - ::core::mem::transmute(RequestQueueDepthMaximum) - }; - RequestQueueDepthMaximum as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_AGP_CAPABILITY__PCI_AGP_COMMAND { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_AGP_CAPABILITY__PCI_AGP_COMMAND() { - assert_eq!( - ::core::mem::size_of::<_PCI_AGP_CAPABILITY__PCI_AGP_COMMAND>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_AGP_CAPABILITY__PCI_AGP_COMMAND)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_AGP_CAPABILITY__PCI_AGP_COMMAND>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_AGP_CAPABILITY__PCI_AGP_COMMAND)), - ); -} -impl _PCI_AGP_CAPABILITY__PCI_AGP_COMMAND { - #[inline] - pub fn Rate(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u32) } - } - #[inline] - pub fn set_Rate(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn FastWriteEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_FastWriteEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn FourGBEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_FourGBEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn Gart64(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_Gart64(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn AGPEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_AGPEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn SBAEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_SBAEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn CalibrationCycle(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 3u8) as u32) } - } - #[inline] - pub fn set_CalibrationCycle(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 3u8, val as u64) - } - } - #[inline] - pub fn AsyncReqSize(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u32) } - } - #[inline] - pub fn set_AsyncReqSize(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 3u8, val as u64) - } - } - #[inline] - pub fn Rsvd3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 8u8) as u32) } - } - #[inline] - pub fn set_Rsvd3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 8u8, val as u64) - } - } - #[inline] - pub fn RequestQueueDepth(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_RequestQueueDepth(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Rate: ULONG, - Rsvd1: ULONG, - FastWriteEnable: ULONG, - FourGBEnable: ULONG, - Rsvd2: ULONG, - Gart64: ULONG, - AGPEnable: ULONG, - SBAEnable: ULONG, - CalibrationCycle: ULONG, - AsyncReqSize: ULONG, - Rsvd3: ULONG, - RequestQueueDepth: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let Rate: u32 = unsafe { ::core::mem::transmute(Rate) }; - Rate as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let Rsvd1: u32 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let FastWriteEnable: u32 = unsafe { - ::core::mem::transmute(FastWriteEnable) - }; - FastWriteEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let FourGBEnable: u32 = unsafe { - ::core::mem::transmute(FourGBEnable) - }; - FourGBEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let Gart64: u32 = unsafe { ::core::mem::transmute(Gart64) }; - Gart64 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let AGPEnable: u32 = unsafe { ::core::mem::transmute(AGPEnable) }; - AGPEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let SBAEnable: u32 = unsafe { ::core::mem::transmute(SBAEnable) }; - SBAEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 3u8, - { - let CalibrationCycle: u32 = unsafe { - ::core::mem::transmute(CalibrationCycle) - }; - CalibrationCycle as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 3u8, - { - let AsyncReqSize: u32 = unsafe { - ::core::mem::transmute(AsyncReqSize) - }; - AsyncReqSize as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 8u8, - { - let Rsvd3: u32 = unsafe { ::core::mem::transmute(Rsvd3) }; - Rsvd3 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let RequestQueueDepth: u32 = unsafe { - ::core::mem::transmute(RequestQueueDepth) - }; - RequestQueueDepth as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_AGP_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_AGP_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_AGP_CAPABILITY>(), - 12usize, - concat!("Size of: ", stringify!(_PCI_AGP_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_AGP_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_AGP_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_AGP_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AGPStatus) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_AGP_CAPABILITY), - "::", - stringify!(AGPStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AGPCommand) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_AGP_CAPABILITY), - "::", - stringify!(AGPCommand), - ), - ); -} -impl _PCI_AGP_CAPABILITY { - #[inline] - pub fn Minor(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u16) } - } - #[inline] - pub fn set_Minor(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn Major(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } - } - #[inline] - pub fn set_Major(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 4u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u16) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Minor: USHORT, - Major: USHORT, - Rsvd1: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let Minor: u16 = unsafe { ::core::mem::transmute(Minor) }; - Minor as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 4u8, - { - let Major: u16 = unsafe { ::core::mem::transmute(Major) }; - Major as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let Rsvd1: u16 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type PCI_AGP_CAPABILITY = _PCI_AGP_CAPABILITY; -pub type PPCI_AGP_CAPABILITY = *mut _PCI_AGP_CAPABILITY; -pub mod _EXTENDED_AGP_REGISTER { - pub type Type = ::core::ffi::c_int; - pub const IsochStatus: Type = 0; - pub const AgpControl: Type = 1; - pub const ApertureSize: Type = 2; - pub const AperturePageSize: Type = 3; - pub const GartLow: Type = 4; - pub const GartHigh: Type = 5; - pub const IsochCommand: Type = 6; -} -pub use self::_EXTENDED_AGP_REGISTER::Type as EXTENDED_AGP_REGISTER; -pub type PEXTENDED_AGP_REGISTER = *mut _EXTENDED_AGP_REGISTER::Type; -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_AGP_ISOCH_STATUS { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_AGP_ISOCH_STATUS() { - assert_eq!( - ::core::mem::size_of::<_PCI_AGP_ISOCH_STATUS>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_AGP_ISOCH_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_AGP_ISOCH_STATUS>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_AGP_ISOCH_STATUS)), - ); -} -impl _PCI_AGP_ISOCH_STATUS { - #[inline] - pub fn ErrorCode(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } - } - #[inline] - pub fn set_ErrorCode(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 2u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Isoch_L(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 3u8) as u32) } - } - #[inline] - pub fn set_Isoch_L(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 3u8, val as u64) - } - } - #[inline] - pub fn Isoch_Y(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u32) } - } - #[inline] - pub fn set_Isoch_Y(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 2u8, val as u64) - } - } - #[inline] - pub fn Isoch_N(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_Isoch_N(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ErrorCode: ULONG, - Rsvd1: ULONG, - Isoch_L: ULONG, - Isoch_Y: ULONG, - Isoch_N: ULONG, - Rsvd2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 2u8, - { - let ErrorCode: u32 = unsafe { ::core::mem::transmute(ErrorCode) }; - ErrorCode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Rsvd1: u32 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 3u8, - { - let Isoch_L: u32 = unsafe { ::core::mem::transmute(Isoch_L) }; - Isoch_L as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 2u8, - { - let Isoch_Y: u32 = unsafe { ::core::mem::transmute(Isoch_Y) }; - Isoch_Y as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let Isoch_N: u32 = unsafe { ::core::mem::transmute(Isoch_N) }; - Isoch_N as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 16u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type PCI_AGP_ISOCH_STATUS = _PCI_AGP_ISOCH_STATUS; -pub type PPCI_AGP_ISOCH_STATUS = *mut _PCI_AGP_ISOCH_STATUS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_AGP_CONTROL { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_AGP_CONTROL() { - assert_eq!( - ::core::mem::size_of::<_PCI_AGP_CONTROL>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_AGP_CONTROL)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_AGP_CONTROL>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_AGP_CONTROL)), - ); -} -impl _PCI_AGP_CONTROL { - #[inline] - pub fn Rsvd1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 7u8) as u32) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 7u8, val as u64) - } - } - #[inline] - pub fn GTLB_Enable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_GTLB_Enable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn AP_Enable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_AP_Enable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn CAL_Disable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_CAL_Disable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 22u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 22u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Rsvd1: ULONG, - GTLB_Enable: ULONG, - AP_Enable: ULONG, - CAL_Disable: ULONG, - Rsvd2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 7u8, - { - let Rsvd1: u32 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let GTLB_Enable: u32 = unsafe { - ::core::mem::transmute(GTLB_Enable) - }; - GTLB_Enable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let AP_Enable: u32 = unsafe { ::core::mem::transmute(AP_Enable) }; - AP_Enable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let CAL_Disable: u32 = unsafe { - ::core::mem::transmute(CAL_Disable) - }; - CAL_Disable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 22u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type PCI_AGP_CONTROL = _PCI_AGP_CONTROL; -pub type PPCI_AGP_CONTROL = *mut _PCI_AGP_CONTROL; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_AGP_APERTURE_PAGE_SIZE { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_AGP_APERTURE_PAGE_SIZE() { - assert_eq!( - ::core::mem::size_of::<_PCI_AGP_APERTURE_PAGE_SIZE>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_AGP_APERTURE_PAGE_SIZE)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_AGP_APERTURE_PAGE_SIZE>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_AGP_APERTURE_PAGE_SIZE)), - ); -} -impl _PCI_AGP_APERTURE_PAGE_SIZE { - #[inline] - pub fn PageSizeMask(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 11u8) as u16) } - } - #[inline] - pub fn set_PageSizeMask(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 11u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn PageSizeSelect(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 4u8) as u16) } - } - #[inline] - pub fn set_PageSizeSelect(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 4u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PageSizeMask: USHORT, - Rsvd1: USHORT, - PageSizeSelect: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 11u8, - { - let PageSizeMask: u16 = unsafe { - ::core::mem::transmute(PageSizeMask) - }; - PageSizeMask as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let Rsvd1: u16 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 4u8, - { - let PageSizeSelect: u16 = unsafe { - ::core::mem::transmute(PageSizeSelect) - }; - PageSizeSelect as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type PCI_AGP_APERTURE_PAGE_SIZE = _PCI_AGP_APERTURE_PAGE_SIZE; -pub type PPCI_AGP_APERTURE_PAGE_SIZE = *mut _PCI_AGP_APERTURE_PAGE_SIZE; -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_AGP_ISOCH_COMMAND { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_AGP_ISOCH_COMMAND() { - assert_eq!( - ::core::mem::size_of::<_PCI_AGP_ISOCH_COMMAND>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_AGP_ISOCH_COMMAND)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_AGP_ISOCH_COMMAND>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_AGP_ISOCH_COMMAND)), - ); -} -impl _PCI_AGP_ISOCH_COMMAND { - #[inline] - pub fn Rsvd1(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 6u8) as u16) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 6u8, val as u64) - } - } - #[inline] - pub fn Isoch_Y(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u16) } - } - #[inline] - pub fn set_Isoch_Y(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 2u8, val as u64) - } - } - #[inline] - pub fn Isoch_N(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u16) } - } - #[inline] - pub fn set_Isoch_N(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Rsvd1: USHORT, - Isoch_Y: USHORT, - Isoch_N: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 6u8, - { - let Rsvd1: u16 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 2u8, - { - let Isoch_Y: u16 = unsafe { ::core::mem::transmute(Isoch_Y) }; - Isoch_Y as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let Isoch_N: u16 = unsafe { ::core::mem::transmute(Isoch_N) }; - Isoch_N as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type PCI_AGP_ISOCH_COMMAND = _PCI_AGP_ISOCH_COMMAND; -pub type PPCI_AGP_ISOCH_COMMAND = *mut _PCI_AGP_ISOCH_COMMAND; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct PCI_AGP_EXTENDED_CAPABILITY { - pub IsochStatus: PCI_AGP_ISOCH_STATUS, - pub AgpControl: PCI_AGP_CONTROL, - pub ApertureSize: USHORT, - pub AperturePageSize: PCI_AGP_APERTURE_PAGE_SIZE, - pub GartLow: ULONG, - pub GartHigh: ULONG, - pub IsochCommand: PCI_AGP_ISOCH_COMMAND, -} -#[test] -fn bindgen_test_layout_PCI_AGP_EXTENDED_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(PCI_AGP_EXTENDED_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(PCI_AGP_EXTENDED_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsochStatus) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(PCI_AGP_EXTENDED_CAPABILITY), - "::", - stringify!(IsochStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AgpControl) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(PCI_AGP_EXTENDED_CAPABILITY), - "::", - stringify!(AgpControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ApertureSize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(PCI_AGP_EXTENDED_CAPABILITY), - "::", - stringify!(ApertureSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AperturePageSize) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(PCI_AGP_EXTENDED_CAPABILITY), - "::", - stringify!(AperturePageSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GartLow) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(PCI_AGP_EXTENDED_CAPABILITY), - "::", - stringify!(GartLow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GartHigh) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(PCI_AGP_EXTENDED_CAPABILITY), - "::", - stringify!(GartHigh), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsochCommand) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(PCI_AGP_EXTENDED_CAPABILITY), - "::", - stringify!(IsochCommand), - ), - ); -} -pub type PPCI_AGP_EXTENDED_CAPABILITY = *mut PCI_AGP_EXTENDED_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCIX_BRIDGE_CAPABILITY { - pub Header: PCI_CAPABILITIES_HEADER, - pub SecondaryStatus: _PCIX_BRIDGE_CAPABILITY__bindgen_ty_1, - pub BridgeStatus: _PCIX_BRIDGE_CAPABILITY__bindgen_ty_2, - pub UpstreamSplitTransactionCapacity: USHORT, - pub UpstreamSplitTransactionLimit: USHORT, - pub DownstreamSplitTransactionCapacity: USHORT, - pub DownstreamSplitTransactionLimit: USHORT, - pub EccControlStatus: _PCIX_BRIDGE_CAPABILITY__bindgen_ty_3, - pub EccFirstAddress: ULONG, - pub EccSecondAddress: ULONG, - pub EccAttribute: ULONG, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCIX_BRIDGE_CAPABILITY__bindgen_ty_1 { - pub __bindgen_anon_1: _PCIX_BRIDGE_CAPABILITY__bindgen_ty_1__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCIX_BRIDGE_CAPABILITY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCIX_BRIDGE_CAPABILITY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_1__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_1__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _PCIX_BRIDGE_CAPABILITY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn Bus64Bit(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_Bus64Bit(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Bus133MHzCapable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_Bus133MHzCapable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn SplitCompletionDiscarded(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_SplitCompletionDiscarded(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnexpectedSplitCompletion(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_UnexpectedSplitCompletion(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn SplitCompletionOverrun(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_SplitCompletionOverrun(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn SplitRequestDelayed(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_SplitRequestDelayed(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn BusModeFrequency(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 4u8) as u16) } - } - #[inline] - pub fn set_BusModeFrequency(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 4u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 2u8, val as u64) - } - } - #[inline] - pub fn Version(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u16) } - } - #[inline] - pub fn set_Version(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 2u8, val as u64) - } - } - #[inline] - pub fn Bus266MHzCapable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } - } - #[inline] - pub fn set_Bus266MHzCapable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn Bus533MHzCapable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } - } - #[inline] - pub fn set_Bus533MHzCapable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Bus64Bit: USHORT, - Bus133MHzCapable: USHORT, - SplitCompletionDiscarded: USHORT, - UnexpectedSplitCompletion: USHORT, - SplitCompletionOverrun: USHORT, - SplitRequestDelayed: USHORT, - BusModeFrequency: USHORT, - Rsvd: USHORT, - Version: USHORT, - Bus266MHzCapable: USHORT, - Bus533MHzCapable: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Bus64Bit: u16 = unsafe { ::core::mem::transmute(Bus64Bit) }; - Bus64Bit as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Bus133MHzCapable: u16 = unsafe { - ::core::mem::transmute(Bus133MHzCapable) - }; - Bus133MHzCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let SplitCompletionDiscarded: u16 = unsafe { - ::core::mem::transmute(SplitCompletionDiscarded) - }; - SplitCompletionDiscarded as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let UnexpectedSplitCompletion: u16 = unsafe { - ::core::mem::transmute(UnexpectedSplitCompletion) - }; - UnexpectedSplitCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let SplitCompletionOverrun: u16 = unsafe { - ::core::mem::transmute(SplitCompletionOverrun) - }; - SplitCompletionOverrun as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let SplitRequestDelayed: u16 = unsafe { - ::core::mem::transmute(SplitRequestDelayed) - }; - SplitRequestDelayed as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 4u8, - { - let BusModeFrequency: u16 = unsafe { - ::core::mem::transmute(BusModeFrequency) - }; - BusModeFrequency as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 2u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 2u8, - { - let Version: u16 = unsafe { ::core::mem::transmute(Version) }; - Version as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 1u8, - { - let Bus266MHzCapable: u16 = unsafe { - ::core::mem::transmute(Bus266MHzCapable) - }; - Bus266MHzCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let Bus533MHzCapable: u16 = unsafe { - ::core::mem::transmute(Bus533MHzCapable) - }; - Bus533MHzCapable as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCIX_BRIDGE_CAPABILITY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_1), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCIX_BRIDGE_CAPABILITY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCIX_BRIDGE_CAPABILITY__bindgen_ty_2 { - pub __bindgen_anon_1: _PCIX_BRIDGE_CAPABILITY__bindgen_ty_2__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCIX_BRIDGE_CAPABILITY__bindgen_ty_2__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCIX_BRIDGE_CAPABILITY__bindgen_ty_2__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_2__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_2__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_2__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_2__bindgen_ty_1), - ), - ); -} -impl _PCIX_BRIDGE_CAPABILITY__bindgen_ty_2__bindgen_ty_1 { - #[inline] - pub fn FunctionNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u32) } - } - #[inline] - pub fn set_FunctionNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn DeviceNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) } - } - #[inline] - pub fn set_DeviceNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn BusNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_BusNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn Device64Bit(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_Device64Bit(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn Device133MHzCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_Device133MHzCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn SplitCompletionDiscarded(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_SplitCompletionDiscarded(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnexpectedSplitCompletion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } - } - #[inline] - pub fn set_UnexpectedSplitCompletion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 1u8, val as u64) - } - } - #[inline] - pub fn SplitCompletionOverrun(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } - } - #[inline] - pub fn set_SplitCompletionOverrun(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 1u8, val as u64) - } - } - #[inline] - pub fn SplitRequestDelayed(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } - } - #[inline] - pub fn set_SplitRequestDelayed(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 7u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 7u8, val as u64) - } - } - #[inline] - pub fn DIMCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } - } - #[inline] - pub fn set_DIMCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(29usize, 1u8, val as u64) - } - } - #[inline] - pub fn Device266MHzCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) } - } - #[inline] - pub fn set_Device266MHzCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(30usize, 1u8, val as u64) - } - } - #[inline] - pub fn Device533MHzCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_Device533MHzCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - FunctionNumber: ULONG, - DeviceNumber: ULONG, - BusNumber: ULONG, - Device64Bit: ULONG, - Device133MHzCapable: ULONG, - SplitCompletionDiscarded: ULONG, - UnexpectedSplitCompletion: ULONG, - SplitCompletionOverrun: ULONG, - SplitRequestDelayed: ULONG, - Rsvd: ULONG, - DIMCapable: ULONG, - Device266MHzCapable: ULONG, - Device533MHzCapable: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let FunctionNumber: u32 = unsafe { - ::core::mem::transmute(FunctionNumber) - }; - FunctionNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let DeviceNumber: u32 = unsafe { - ::core::mem::transmute(DeviceNumber) - }; - DeviceNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let BusNumber: u32 = unsafe { ::core::mem::transmute(BusNumber) }; - BusNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let Device64Bit: u32 = unsafe { - ::core::mem::transmute(Device64Bit) - }; - Device64Bit as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let Device133MHzCapable: u32 = unsafe { - ::core::mem::transmute(Device133MHzCapable) - }; - Device133MHzCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let SplitCompletionDiscarded: u32 = unsafe { - ::core::mem::transmute(SplitCompletionDiscarded) - }; - SplitCompletionDiscarded as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 1u8, - { - let UnexpectedSplitCompletion: u32 = unsafe { - ::core::mem::transmute(UnexpectedSplitCompletion) - }; - UnexpectedSplitCompletion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 1u8, - { - let SplitCompletionOverrun: u32 = unsafe { - ::core::mem::transmute(SplitCompletionOverrun) - }; - SplitCompletionOverrun as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 1u8, - { - let SplitRequestDelayed: u32 = unsafe { - ::core::mem::transmute(SplitRequestDelayed) - }; - SplitRequestDelayed as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 7u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 29usize, - 1u8, - { - let DIMCapable: u32 = unsafe { ::core::mem::transmute(DIMCapable) }; - DIMCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 30usize, - 1u8, - { - let Device266MHzCapable: u32 = unsafe { - ::core::mem::transmute(Device266MHzCapable) - }; - Device266MHzCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 31usize, - 1u8, - { - let Device533MHzCapable: u32 = unsafe { - ::core::mem::transmute(Device533MHzCapable) - }; - Device533MHzCapable as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCIX_BRIDGE_CAPABILITY__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_2>(), - 4usize, - concat!("Size of: ", stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_2>(), - 4usize, - concat!("Alignment of ", stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_2), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCIX_BRIDGE_CAPABILITY__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCIX_BRIDGE_CAPABILITY__bindgen_ty_3 { - pub __bindgen_anon_1: _PCIX_BRIDGE_CAPABILITY__bindgen_ty_3__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCIX_BRIDGE_CAPABILITY__bindgen_ty_3__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCIX_BRIDGE_CAPABILITY__bindgen_ty_3__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_3__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_3__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_3__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_3__bindgen_ty_1), - ), - ); -} -impl _PCIX_BRIDGE_CAPABILITY__bindgen_ty_3__bindgen_ty_1 { - #[inline] - pub fn SelectSecondaryRegisters(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_SelectSecondaryRegisters(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorPresentInOtherBank(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_ErrorPresentInOtherBank(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn AdditionalCorrectableError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_AdditionalCorrectableError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AdditionalUncorrectableError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_AdditionalUncorrectableError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorPhase(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 3u8) as u32) } - } - #[inline] - pub fn set_ErrorPhase(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 3u8, val as u64) - } - } - #[inline] - pub fn ErrorCorrected(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_ErrorCorrected(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn Syndrome(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_Syndrome(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn ErrorFirstCommand(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 4u8) as u32) } - } - #[inline] - pub fn set_ErrorFirstCommand(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 4u8, val as u64) - } - } - #[inline] - pub fn ErrorSecondCommand(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 4u8) as u32) } - } - #[inline] - pub fn set_ErrorSecondCommand(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 4u8, val as u64) - } - } - #[inline] - pub fn ErrorUpperAttributes(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 4u8) as u32) } - } - #[inline] - pub fn set_ErrorUpperAttributes(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 4u8, val as u64) - } - } - #[inline] - pub fn ControlUpdateEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u32) } - } - #[inline] - pub fn set_ControlUpdateEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(28usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(29usize, 1u8, val as u64) - } - } - #[inline] - pub fn DisableSingleBitCorrection(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) } - } - #[inline] - pub fn set_DisableSingleBitCorrection(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(30usize, 1u8, val as u64) - } - } - #[inline] - pub fn EccMode(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_EccMode(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - SelectSecondaryRegisters: ULONG, - ErrorPresentInOtherBank: ULONG, - AdditionalCorrectableError: ULONG, - AdditionalUncorrectableError: ULONG, - ErrorPhase: ULONG, - ErrorCorrected: ULONG, - Syndrome: ULONG, - ErrorFirstCommand: ULONG, - ErrorSecondCommand: ULONG, - ErrorUpperAttributes: ULONG, - ControlUpdateEnable: ULONG, - Rsvd: ULONG, - DisableSingleBitCorrection: ULONG, - EccMode: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let SelectSecondaryRegisters: u32 = unsafe { - ::core::mem::transmute(SelectSecondaryRegisters) - }; - SelectSecondaryRegisters as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ErrorPresentInOtherBank: u32 = unsafe { - ::core::mem::transmute(ErrorPresentInOtherBank) - }; - ErrorPresentInOtherBank as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let AdditionalCorrectableError: u32 = unsafe { - ::core::mem::transmute(AdditionalCorrectableError) - }; - AdditionalCorrectableError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AdditionalUncorrectableError: u32 = unsafe { - ::core::mem::transmute(AdditionalUncorrectableError) - }; - AdditionalUncorrectableError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 3u8, - { - let ErrorPhase: u32 = unsafe { ::core::mem::transmute(ErrorPhase) }; - ErrorPhase as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let ErrorCorrected: u32 = unsafe { - ::core::mem::transmute(ErrorCorrected) - }; - ErrorCorrected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let Syndrome: u32 = unsafe { ::core::mem::transmute(Syndrome) }; - Syndrome as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 4u8, - { - let ErrorFirstCommand: u32 = unsafe { - ::core::mem::transmute(ErrorFirstCommand) - }; - ErrorFirstCommand as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 4u8, - { - let ErrorSecondCommand: u32 = unsafe { - ::core::mem::transmute(ErrorSecondCommand) - }; - ErrorSecondCommand as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 4u8, - { - let ErrorUpperAttributes: u32 = unsafe { - ::core::mem::transmute(ErrorUpperAttributes) - }; - ErrorUpperAttributes as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 28usize, - 1u8, - { - let ControlUpdateEnable: u32 = unsafe { - ::core::mem::transmute(ControlUpdateEnable) - }; - ControlUpdateEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 29usize, - 1u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 30usize, - 1u8, - { - let DisableSingleBitCorrection: u32 = unsafe { - ::core::mem::transmute(DisableSingleBitCorrection) - }; - DisableSingleBitCorrection as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 31usize, - 1u8, - { - let EccMode: u32 = unsafe { ::core::mem::transmute(EccMode) }; - EccMode as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCIX_BRIDGE_CAPABILITY__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_3> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_3>(), - 4usize, - concat!("Size of: ", stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_PCIX_BRIDGE_CAPABILITY__bindgen_ty_3>(), - 4usize, - concat!("Alignment of ", stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY__bindgen_ty_3), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCIX_BRIDGE_CAPABILITY__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PCIX_BRIDGE_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCIX_BRIDGE_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCIX_BRIDGE_CAPABILITY>(), - 32usize, - concat!("Size of: ", stringify!(_PCIX_BRIDGE_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCIX_BRIDGE_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCIX_BRIDGE_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecondaryStatus) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY), - "::", - stringify!(SecondaryStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BridgeStatus) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY), - "::", - stringify!(BridgeStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UpstreamSplitTransactionCapacity) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY), - "::", - stringify!(UpstreamSplitTransactionCapacity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UpstreamSplitTransactionLimit) as usize - - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY), - "::", - stringify!(UpstreamSplitTransactionLimit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DownstreamSplitTransactionCapacity) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY), - "::", - stringify!(DownstreamSplitTransactionCapacity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DownstreamSplitTransactionLimit) as usize - - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY), - "::", - stringify!(DownstreamSplitTransactionLimit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EccControlStatus) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY), - "::", - stringify!(EccControlStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EccFirstAddress) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY), - "::", - stringify!(EccFirstAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EccSecondAddress) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY), - "::", - stringify!(EccSecondAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EccAttribute) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PCIX_BRIDGE_CAPABILITY), - "::", - stringify!(EccAttribute), - ), - ); -} -impl Default for _PCIX_BRIDGE_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCIX_BRIDGE_CAPABILITY = _PCIX_BRIDGE_CAPABILITY; -pub type PPCIX_BRIDGE_CAPABILITY = *mut _PCIX_BRIDGE_CAPABILITY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_SUBSYSTEM_IDS_CAPABILITY { - pub Header: PCI_CAPABILITIES_HEADER, - pub Reserved: USHORT, - pub SubVendorID: USHORT, - pub SubSystemID: USHORT, -} -#[test] -fn bindgen_test_layout__PCI_SUBSYSTEM_IDS_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_SUBSYSTEM_IDS_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_SUBSYSTEM_IDS_CAPABILITY>(), - 8usize, - concat!("Size of: ", stringify!(_PCI_SUBSYSTEM_IDS_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_SUBSYSTEM_IDS_CAPABILITY>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_SUBSYSTEM_IDS_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SUBSYSTEM_IDS_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SUBSYSTEM_IDS_CAPABILITY), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubVendorID) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SUBSYSTEM_IDS_CAPABILITY), - "::", - stringify!(SubVendorID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubSystemID) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_PCI_SUBSYSTEM_IDS_CAPABILITY), - "::", - stringify!(SubSystemID), - ), - ); -} -pub type PCI_SUBSYSTEM_IDS_CAPABILITY = _PCI_SUBSYSTEM_IDS_CAPABILITY; -pub type PPCI_SUBSYSTEM_IDS_CAPABILITY = *mut _PCI_SUBSYSTEM_IDS_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_ADVANCED_FEATURES_CAPABILITY { - pub Header: PCI_CAPABILITIES_HEADER, - pub Length: UCHAR, - pub Capabilities: _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1, - pub Control: _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2, - pub Status: _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1 { - pub __bindgen_anon_1: _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1__bindgen_ty_1, - pub AsUCHAR: UCHAR, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn FunctionLevelResetSupported(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_FunctionLevelResetSupported(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn TransactionsPendingSupported(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_TransactionsPendingSupported(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u8) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 6u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - FunctionLevelResetSupported: UCHAR, - TransactionsPendingSupported: UCHAR, - Rsvd: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let FunctionLevelResetSupported: u8 = unsafe { - ::core::mem::transmute(FunctionLevelResetSupported) - }; - FunctionLevelResetSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let TransactionsPendingSupported: u8 = unsafe { - ::core::mem::transmute(TransactionsPendingSupported) - }; - TransactionsPendingSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 6u8, - { - let Rsvd: u8 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1>(), - 1usize, - concat!("Size of: ", stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUCHAR) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1), - "::", - stringify!(AsUCHAR), - ), - ); -} -impl Default for _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2 { - pub __bindgen_anon_1: _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2__bindgen_ty_1, - pub AsUCHAR: UCHAR, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2__bindgen_ty_1), - ), - ); -} -impl _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2__bindgen_ty_1 { - #[inline] - pub fn InitiateFunctionLevelReset(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_InitiateFunctionLevelReset(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 7u8) as u8) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 7u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - InitiateFunctionLevelReset: UCHAR, - Rsvd: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let InitiateFunctionLevelReset: u8 = unsafe { - ::core::mem::transmute(InitiateFunctionLevelReset) - }; - InitiateFunctionLevelReset as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 7u8, - { - let Rsvd: u8 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2>(), - 1usize, - concat!("Size of: ", stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUCHAR) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2), - "::", - stringify!(AsUCHAR), - ), - ); -} -impl Default for _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3 { - pub __bindgen_anon_1: _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3__bindgen_ty_1, - pub AsUCHAR: UCHAR, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3__bindgen_ty_1), - ), - ); -} -impl _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3__bindgen_ty_1 { - #[inline] - pub fn TransactionsPending(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_TransactionsPending(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 7u8) as u8) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 7u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TransactionsPending: UCHAR, - Rsvd: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let TransactionsPending: u8 = unsafe { - ::core::mem::transmute(TransactionsPending) - }; - TransactionsPending as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 7u8, - { - let Rsvd: u8 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3>(), - 1usize, - concat!("Size of: ", stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUCHAR) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3), - "::", - stringify!(AsUCHAR), - ), - ); -} -impl Default for _PCI_ADVANCED_FEATURES_CAPABILITY__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PCI_ADVANCED_FEATURES_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_ADVANCED_FEATURES_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_ADVANCED_FEATURES_CAPABILITY>(), - 6usize, - concat!("Size of: ", stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_ADVANCED_FEATURES_CAPABILITY>(), - 1usize, - concat!("Alignment of ", stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capabilities) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY), - "::", - stringify!(Capabilities), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY), - "::", - stringify!(Control), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ADVANCED_FEATURES_CAPABILITY), - "::", - stringify!(Status), - ), - ); -} -impl Default for _PCI_ADVANCED_FEATURES_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_ADVANCED_FEATURES_CAPABILITY = _PCI_ADVANCED_FEATURES_CAPABILITY; -pub type PPCI_ADVANCED_FEATURES_CAPABILITY = *mut _PCI_ADVANCED_FEATURES_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_ROOT_BUS_OSC_SUPPORT_FIELD { - pub u: _PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1 { - pub __bindgen_anon_1: _PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn ExtendedConfigOpRegions(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_ExtendedConfigOpRegions(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ActiveStatePowerManagement(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_ActiveStatePowerManagement(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ClockPowerManagement(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_ClockPowerManagement(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn SegmentGroups(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_SegmentGroups(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn MessageSignaledInterrupts(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_MessageSignaledInterrupts(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn OptimizedBufferFlushAndFill(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_OptimizedBufferFlushAndFill(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn AspmOptionality(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_AspmOptionality(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 25u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 25u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ExtendedConfigOpRegions: ULONG, - ActiveStatePowerManagement: ULONG, - ClockPowerManagement: ULONG, - SegmentGroups: ULONG, - MessageSignaledInterrupts: ULONG, - OptimizedBufferFlushAndFill: ULONG, - AspmOptionality: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ExtendedConfigOpRegions: u32 = unsafe { - ::core::mem::transmute(ExtendedConfigOpRegions) - }; - ExtendedConfigOpRegions as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ActiveStatePowerManagement: u32 = unsafe { - ::core::mem::transmute(ActiveStatePowerManagement) - }; - ActiveStatePowerManagement as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let ClockPowerManagement: u32 = unsafe { - ::core::mem::transmute(ClockPowerManagement) - }; - ClockPowerManagement as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let SegmentGroups: u32 = unsafe { - ::core::mem::transmute(SegmentGroups) - }; - SegmentGroups as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let MessageSignaledInterrupts: u32 = unsafe { - ::core::mem::transmute(MessageSignaledInterrupts) - }; - MessageSignaledInterrupts as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let OptimizedBufferFlushAndFill: u32 = unsafe { - ::core::mem::transmute(OptimizedBufferFlushAndFill) - }; - OptimizedBufferFlushAndFill as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let AspmOptionality: u32 = unsafe { - ::core::mem::transmute(AspmOptionality) - }; - AspmOptionality as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 25u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_ROOT_BUS_OSC_SUPPORT_FIELD__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PCI_ROOT_BUS_OSC_SUPPORT_FIELD() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_ROOT_BUS_OSC_SUPPORT_FIELD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_ROOT_BUS_OSC_SUPPORT_FIELD>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_ROOT_BUS_OSC_SUPPORT_FIELD)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_ROOT_BUS_OSC_SUPPORT_FIELD>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_ROOT_BUS_OSC_SUPPORT_FIELD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ROOT_BUS_OSC_SUPPORT_FIELD), - "::", - stringify!(u), - ), - ); -} -impl Default for _PCI_ROOT_BUS_OSC_SUPPORT_FIELD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_ROOT_BUS_OSC_SUPPORT_FIELD = _PCI_ROOT_BUS_OSC_SUPPORT_FIELD; -pub type PPCI_ROOT_BUS_OSC_SUPPORT_FIELD = *mut _PCI_ROOT_BUS_OSC_SUPPORT_FIELD; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_ROOT_BUS_OSC_CONTROL_FIELD { - pub u: _PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1 { - pub __bindgen_anon_1: _PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn ExpressNativeHotPlug(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_ExpressNativeHotPlug(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ShpcNativeHotPlug(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_ShpcNativeHotPlug(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ExpressNativePME(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_ExpressNativePME(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ExpressAdvancedErrorReporting(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_ExpressAdvancedErrorReporting(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn ExpressCapabilityStructure(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_ExpressCapabilityStructure(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn LatencyToleranceReporting(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_LatencyToleranceReporting(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 26u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 26u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ExpressNativeHotPlug: ULONG, - ShpcNativeHotPlug: ULONG, - ExpressNativePME: ULONG, - ExpressAdvancedErrorReporting: ULONG, - ExpressCapabilityStructure: ULONG, - LatencyToleranceReporting: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ExpressNativeHotPlug: u32 = unsafe { - ::core::mem::transmute(ExpressNativeHotPlug) - }; - ExpressNativeHotPlug as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ShpcNativeHotPlug: u32 = unsafe { - ::core::mem::transmute(ShpcNativeHotPlug) - }; - ShpcNativeHotPlug as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let ExpressNativePME: u32 = unsafe { - ::core::mem::transmute(ExpressNativePME) - }; - ExpressNativePME as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ExpressAdvancedErrorReporting: u32 = unsafe { - ::core::mem::transmute(ExpressAdvancedErrorReporting) - }; - ExpressAdvancedErrorReporting as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let ExpressCapabilityStructure: u32 = unsafe { - ::core::mem::transmute(ExpressCapabilityStructure) - }; - ExpressCapabilityStructure as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let LatencyToleranceReporting: u32 = unsafe { - ::core::mem::transmute(LatencyToleranceReporting) - }; - LatencyToleranceReporting as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 26u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_ROOT_BUS_OSC_CONTROL_FIELD__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PCI_ROOT_BUS_OSC_CONTROL_FIELD() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_ROOT_BUS_OSC_CONTROL_FIELD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_ROOT_BUS_OSC_CONTROL_FIELD>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_ROOT_BUS_OSC_CONTROL_FIELD)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_ROOT_BUS_OSC_CONTROL_FIELD>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_ROOT_BUS_OSC_CONTROL_FIELD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ROOT_BUS_OSC_CONTROL_FIELD), - "::", - stringify!(u), - ), - ); -} -impl Default for _PCI_ROOT_BUS_OSC_CONTROL_FIELD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_ROOT_BUS_OSC_CONTROL_FIELD = _PCI_ROOT_BUS_OSC_CONTROL_FIELD; -pub type PPCI_ROOT_BUS_OSC_CONTROL_FIELD = *mut _PCI_ROOT_BUS_OSC_CONTROL_FIELD; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_FIRMWARE_BUS_CAPS { - pub Type: USHORT, - pub Length: USHORT, - pub __bindgen_anon_1: _PCI_FIRMWARE_BUS_CAPS__bindgen_ty_1, - pub CurrentSpeedAndMode: UCHAR, - pub SupportedSpeedsAndModesLowByte: UCHAR, - pub SupportedSpeedsAndModesHighByte: UCHAR, - pub Voltage: UCHAR, - pub Reserved2: [UCHAR; 7usize], -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_FIRMWARE_BUS_CAPS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__PCI_FIRMWARE_BUS_CAPS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_FIRMWARE_BUS_CAPS__bindgen_ty_1>(), - 1usize, - concat!("Size of: ", stringify!(_PCI_FIRMWARE_BUS_CAPS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FIRMWARE_BUS_CAPS__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_PCI_FIRMWARE_BUS_CAPS__bindgen_ty_1)), - ); -} -impl _PCI_FIRMWARE_BUS_CAPS__bindgen_ty_1 { - #[inline] - pub fn SixtyFourBitDevice(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_SixtyFourBitDevice(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn PciXMode1EccCapable(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_PciXMode1EccCapable(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn DeviceIdMessagingCapable(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) } - } - #[inline] - pub fn set_DeviceIdMessagingCapable(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ObffWakeSignalCapable(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) } - } - #[inline] - pub fn set_ObffWakeSignalCapable(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 4u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - SixtyFourBitDevice: UCHAR, - PciXMode1EccCapable: UCHAR, - DeviceIdMessagingCapable: UCHAR, - ObffWakeSignalCapable: UCHAR, - Reserved1: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let SixtyFourBitDevice: u8 = unsafe { - ::core::mem::transmute(SixtyFourBitDevice) - }; - SixtyFourBitDevice as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let PciXMode1EccCapable: u8 = unsafe { - ::core::mem::transmute(PciXMode1EccCapable) - }; - PciXMode1EccCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let DeviceIdMessagingCapable: u8 = unsafe { - ::core::mem::transmute(DeviceIdMessagingCapable) - }; - DeviceIdMessagingCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ObffWakeSignalCapable: u8 = unsafe { - ::core::mem::transmute(ObffWakeSignalCapable) - }; - ObffWakeSignalCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 4u8, - { - let Reserved1: u8 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_FIRMWARE_BUS_CAPS() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_FIRMWARE_BUS_CAPS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_FIRMWARE_BUS_CAPS>(), - 16usize, - concat!("Size of: ", stringify!(_PCI_FIRMWARE_BUS_CAPS)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FIRMWARE_BUS_CAPS>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_FIRMWARE_BUS_CAPS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FIRMWARE_BUS_CAPS), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FIRMWARE_BUS_CAPS), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CurrentSpeedAndMode) as usize - ptr as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FIRMWARE_BUS_CAPS), - "::", - stringify!(CurrentSpeedAndMode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SupportedSpeedsAndModesLowByte) as usize - - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FIRMWARE_BUS_CAPS), - "::", - stringify!(SupportedSpeedsAndModesLowByte), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SupportedSpeedsAndModesHighByte) as usize - - ptr as usize - }, - 7usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FIRMWARE_BUS_CAPS), - "::", - stringify!(SupportedSpeedsAndModesHighByte), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Voltage) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FIRMWARE_BUS_CAPS), - "::", - stringify!(Voltage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FIRMWARE_BUS_CAPS), - "::", - stringify!(Reserved2), - ), - ); -} -pub type PCI_FIRMWARE_BUS_CAPS = _PCI_FIRMWARE_BUS_CAPS; -pub type PPCI_FIRMWARE_BUS_CAPS = *mut _PCI_FIRMWARE_BUS_CAPS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER { - pub Version: USHORT, - pub Status: USHORT, - pub Length: ULONG, - pub Caps: PCI_FIRMWARE_BUS_CAPS, -} -#[test] -fn bindgen_test_layout__PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER>(), - 24usize, - concat!("Size of: ", stringify!(_PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Caps) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER), - "::", - stringify!(Caps), - ), - ); -} -pub type PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER = _PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER; -pub type PPCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER = *mut _PCI_FIRMWARE_BUS_CAPS_RETURN_BUFFER; -pub mod _PCI_HARDWARE_INTERFACE { - pub type Type = ::core::ffi::c_int; - pub const PciConventional: Type = 0; - pub const PciXMode1: Type = 1; - pub const PciXMode2: Type = 2; - pub const PciExpress: Type = 3; -} -pub use self::_PCI_HARDWARE_INTERFACE::Type as PCI_HARDWARE_INTERFACE; -pub type PPCI_HARDWARE_INTERFACE = *mut _PCI_HARDWARE_INTERFACE::Type; -pub mod PCI_BUS_WIDTH { - pub type Type = ::core::ffi::c_int; - pub const BusWidth32Bits: Type = 0; - pub const BusWidth64Bits: Type = 1; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_ROOT_BUS_HARDWARE_CAPABILITY { - pub SecondaryInterface: PCI_HARDWARE_INTERFACE, - pub __bindgen_anon_1: _PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1, - pub OscFeatureSupport: PCI_ROOT_BUS_OSC_SUPPORT_FIELD, - pub OscControlRequest: PCI_ROOT_BUS_OSC_CONTROL_FIELD, - pub OscControlGranted: PCI_ROOT_BUS_OSC_CONTROL_FIELD, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1 { - pub BusCapabilitiesFound: BOOLEAN, - pub CurrentSpeedAndMode: ULONG, - pub SupportedSpeedsAndModes: ULONG, - pub DeviceIDMessagingCapable: BOOLEAN, - pub SecondaryBusWidth: PCI_BUS_WIDTH::Type, -} -#[test] -fn bindgen_test_layout__PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1>(), - 20usize, - concat!("Size of: ", stringify!(_PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BusCapabilitiesFound) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1), - "::", - stringify!(BusCapabilitiesFound), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CurrentSpeedAndMode) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1), - "::", - stringify!(CurrentSpeedAndMode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SupportedSpeedsAndModes) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1), - "::", - stringify!(SupportedSpeedsAndModes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceIDMessagingCapable) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1), - "::", - stringify!(DeviceIDMessagingCapable), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecondaryBusWidth) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1), - "::", - stringify!(SecondaryBusWidth), - ), - ); -} -impl Default for _PCI_ROOT_BUS_HARDWARE_CAPABILITY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PCI_ROOT_BUS_HARDWARE_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_ROOT_BUS_HARDWARE_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_ROOT_BUS_HARDWARE_CAPABILITY>(), - 36usize, - concat!("Size of: ", stringify!(_PCI_ROOT_BUS_HARDWARE_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_ROOT_BUS_HARDWARE_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_ROOT_BUS_HARDWARE_CAPABILITY)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecondaryInterface) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ROOT_BUS_HARDWARE_CAPABILITY), - "::", - stringify!(SecondaryInterface), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OscFeatureSupport) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ROOT_BUS_HARDWARE_CAPABILITY), - "::", - stringify!(OscFeatureSupport), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OscControlRequest) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ROOT_BUS_HARDWARE_CAPABILITY), - "::", - stringify!(OscControlRequest), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OscControlGranted) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_ROOT_BUS_HARDWARE_CAPABILITY), - "::", - stringify!(OscControlGranted), - ), - ); -} -impl Default for _PCI_ROOT_BUS_HARDWARE_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_ROOT_BUS_HARDWARE_CAPABILITY = _PCI_ROOT_BUS_HARDWARE_CAPABILITY; -pub type PPCI_ROOT_BUS_HARDWARE_CAPABILITY = *mut _PCI_ROOT_BUS_HARDWARE_CAPABILITY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_FPB_CAPABILITY_HEADER { - pub Header: PCI_CAPABILITIES_HEADER, - pub Reserved: USHORT, -} -#[test] -fn bindgen_test_layout__PCI_FPB_CAPABILITY_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_FPB_CAPABILITY_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_CAPABILITY_HEADER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_FPB_CAPABILITY_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_CAPABILITY_HEADER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_FPB_CAPABILITY_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_CAPABILITY_HEADER), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_CAPABILITY_HEADER), - "::", - stringify!(Reserved), - ), - ); -} -pub type PCI_FPB_CAPABILITY_HEADER = _PCI_FPB_CAPABILITY_HEADER; -pub type PPCI_FPB_CAPABILITY_HEADER = *mut _PCI_FPB_CAPABILITY_HEADER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_FPB_CAPABILITIES_REGISTER { - pub __bindgen_anon_1: _PCI_FPB_CAPABILITIES_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_FPB_CAPABILITIES_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_FPB_CAPABILITIES_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_CAPABILITIES_REGISTER__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_FPB_CAPABILITIES_REGISTER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_CAPABILITIES_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_FPB_CAPABILITIES_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_FPB_CAPABILITIES_REGISTER__bindgen_ty_1 { - #[inline] - pub fn RidDecodeMechanismSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_RidDecodeMechanismSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemLowDecodeMechanismSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemLowDecodeMechanismSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemHighDecodeMechanismSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemHighDecodeMechanismSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn NumSecDev(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) } - } - #[inline] - pub fn set_NumSecDev(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn RidVectorSizeSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 3u8) as u32) } - } - #[inline] - pub fn set_RidVectorSizeSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 3u8, val as u64) - } - } - #[inline] - pub fn Rsvd0(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 5u8) as u32) } - } - #[inline] - pub fn set_Rsvd0(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 5u8, val as u64) - } - } - #[inline] - pub fn MemLowVectorSizeSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 3u8) as u32) } - } - #[inline] - pub fn set_MemLowVectorSizeSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 3u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 5u8) as u32) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 5u8, val as u64) - } - } - #[inline] - pub fn MemHighVectorSizeSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 3u8) as u32) } - } - #[inline] - pub fn set_MemHighVectorSizeSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 3u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 5u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(27usize, 5u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - RidDecodeMechanismSupported: ULONG, - MemLowDecodeMechanismSupported: ULONG, - MemHighDecodeMechanismSupported: ULONG, - NumSecDev: ULONG, - RidVectorSizeSupported: ULONG, - Rsvd0: ULONG, - MemLowVectorSizeSupported: ULONG, - Rsvd1: ULONG, - MemHighVectorSizeSupported: ULONG, - Rsvd2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let RidDecodeMechanismSupported: u32 = unsafe { - ::core::mem::transmute(RidDecodeMechanismSupported) - }; - RidDecodeMechanismSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let MemLowDecodeMechanismSupported: u32 = unsafe { - ::core::mem::transmute(MemLowDecodeMechanismSupported) - }; - MemLowDecodeMechanismSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let MemHighDecodeMechanismSupported: u32 = unsafe { - ::core::mem::transmute(MemHighDecodeMechanismSupported) - }; - MemHighDecodeMechanismSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let NumSecDev: u32 = unsafe { ::core::mem::transmute(NumSecDev) }; - NumSecDev as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 3u8, - { - let RidVectorSizeSupported: u32 = unsafe { - ::core::mem::transmute(RidVectorSizeSupported) - }; - RidVectorSizeSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 5u8, - { - let Rsvd0: u32 = unsafe { ::core::mem::transmute(Rsvd0) }; - Rsvd0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 3u8, - { - let MemLowVectorSizeSupported: u32 = unsafe { - ::core::mem::transmute(MemLowVectorSizeSupported) - }; - MemLowVectorSizeSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 5u8, - { - let Rsvd1: u32 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 3u8, - { - let MemHighVectorSizeSupported: u32 = unsafe { - ::core::mem::transmute(MemHighVectorSizeSupported) - }; - MemHighVectorSizeSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 27usize, - 5u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_FPB_CAPABILITIES_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_FPB_CAPABILITIES_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_CAPABILITIES_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_FPB_CAPABILITIES_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_CAPABILITIES_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_FPB_CAPABILITIES_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_CAPABILITIES_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_FPB_CAPABILITIES_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_FPB_CAPABILITIES_REGISTER = _PCI_FPB_CAPABILITIES_REGISTER; -pub type PPCI_FPB_CAPABILITIES_REGISTER = *mut _PCI_FPB_CAPABILITIES_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_FPB_RID_VECTOR_CONTROL1_REGISTER { - pub __bindgen_anon_1: _PCI_FPB_RID_VECTOR_CONTROL1_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_FPB_RID_VECTOR_CONTROL1_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_FPB_RID_VECTOR_CONTROL1_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_RID_VECTOR_CONTROL1_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_FPB_RID_VECTOR_CONTROL1_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_RID_VECTOR_CONTROL1_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_FPB_RID_VECTOR_CONTROL1_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_FPB_RID_VECTOR_CONTROL1_REGISTER__bindgen_ty_1 { - #[inline] - pub fn RidDecodeMechanismEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_RidDecodeMechanismEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd0(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) } - } - #[inline] - pub fn set_Rsvd0(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 3u8, val as u64) - } - } - #[inline] - pub fn RidVectorGranularity(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u32) } - } - #[inline] - pub fn set_RidVectorGranularity(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 4u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 11u8) as u32) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 11u8, val as u64) - } - } - #[inline] - pub fn RidVectorStart(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 13u8) as u32) } - } - #[inline] - pub fn set_RidVectorStart(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 13u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - RidDecodeMechanismEnable: ULONG, - Rsvd0: ULONG, - RidVectorGranularity: ULONG, - Rsvd1: ULONG, - RidVectorStart: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let RidDecodeMechanismEnable: u32 = unsafe { - ::core::mem::transmute(RidDecodeMechanismEnable) - }; - RidDecodeMechanismEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 3u8, - { - let Rsvd0: u32 = unsafe { ::core::mem::transmute(Rsvd0) }; - Rsvd0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 4u8, - { - let RidVectorGranularity: u32 = unsafe { - ::core::mem::transmute(RidVectorGranularity) - }; - RidVectorGranularity as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 11u8, - { - let Rsvd1: u32 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 13u8, - { - let RidVectorStart: u32 = unsafe { - ::core::mem::transmute(RidVectorStart) - }; - RidVectorStart as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_FPB_RID_VECTOR_CONTROL1_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_FPB_RID_VECTOR_CONTROL1_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_RID_VECTOR_CONTROL1_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_FPB_RID_VECTOR_CONTROL1_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_RID_VECTOR_CONTROL1_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_FPB_RID_VECTOR_CONTROL1_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_RID_VECTOR_CONTROL1_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_FPB_RID_VECTOR_CONTROL1_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_FPB_RID_VECTOR_CONTROL1_REGISTER = _PCI_FPB_RID_VECTOR_CONTROL1_REGISTER; -pub type PPCI_FPB_RID_VECTOR_CONTROL1_REGISTER = *mut _PCI_FPB_RID_VECTOR_CONTROL1_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_FPB_RID_VECTOR_CONTROL2_REGISTER { - pub __bindgen_anon_1: _PCI_FPB_RID_VECTOR_CONTROL2_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_FPB_RID_VECTOR_CONTROL2_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_FPB_RID_VECTOR_CONTROL2_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_RID_VECTOR_CONTROL2_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_FPB_RID_VECTOR_CONTROL2_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_RID_VECTOR_CONTROL2_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_FPB_RID_VECTOR_CONTROL2_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_FPB_RID_VECTOR_CONTROL2_REGISTER__bindgen_ty_1 { - #[inline] - pub fn Rsvd0(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u32) } - } - #[inline] - pub fn set_Rsvd0(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn RidSecondaryStart(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u32) } - } - #[inline] - pub fn set_RidSecondaryStart(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 13u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Rsvd0: ULONG, - RidSecondaryStart: ULONG, - Rsvd1: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let Rsvd0: u32 = unsafe { ::core::mem::transmute(Rsvd0) }; - Rsvd0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 13u8, - { - let RidSecondaryStart: u32 = unsafe { - ::core::mem::transmute(RidSecondaryStart) - }; - RidSecondaryStart as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 16u8, - { - let Rsvd1: u32 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_FPB_RID_VECTOR_CONTROL2_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_FPB_RID_VECTOR_CONTROL2_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_RID_VECTOR_CONTROL2_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_FPB_RID_VECTOR_CONTROL2_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_RID_VECTOR_CONTROL2_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_FPB_RID_VECTOR_CONTROL2_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_RID_VECTOR_CONTROL2_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_FPB_RID_VECTOR_CONTROL2_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_FPB_RID_VECTOR_CONTROL2_REGISTER = _PCI_FPB_RID_VECTOR_CONTROL2_REGISTER; -pub type PPCI_FPB_RID_VECTOR_CONTROL2_REGISTER = *mut _PCI_FPB_RID_VECTOR_CONTROL2_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn MemLowDecodeMechanismEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemLowDecodeMechanismEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd0(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) } - } - #[inline] - pub fn set_Rsvd0(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 3u8, val as u64) - } - } - #[inline] - pub fn MemLowVectorGranularity(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u32) } - } - #[inline] - pub fn set_MemLowVectorGranularity(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 4u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 12u8) as u32) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 12u8, val as u64) - } - } - #[inline] - pub fn MemLowVectorStart(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 12u8) as u32) } - } - #[inline] - pub fn set_MemLowVectorStart(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 12u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MemLowDecodeMechanismEnable: ULONG, - Rsvd0: ULONG, - MemLowVectorGranularity: ULONG, - Rsvd1: ULONG, - MemLowVectorStart: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let MemLowDecodeMechanismEnable: u32 = unsafe { - ::core::mem::transmute(MemLowDecodeMechanismEnable) - }; - MemLowDecodeMechanismEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 3u8, - { - let Rsvd0: u32 = unsafe { ::core::mem::transmute(Rsvd0) }; - Rsvd0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 4u8, - { - let MemLowVectorGranularity: u32 = unsafe { - ::core::mem::transmute(MemLowVectorGranularity) - }; - MemLowVectorGranularity as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 12u8, - { - let Rsvd1: u32 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 12u8, - { - let MemLowVectorStart: u32 = unsafe { - ::core::mem::transmute(MemLowVectorStart) - }; - MemLowVectorStart as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER = _PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER; -pub type PPCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER = *mut _PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER { - pub __bindgen_anon_1: _PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER__bindgen_ty_1 { - #[inline] - pub fn MemHighDecodeMechanismEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemHighDecodeMechanismEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd0(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) } - } - #[inline] - pub fn set_Rsvd0(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 3u8, val as u64) - } - } - #[inline] - pub fn MemHighVectorGranularity(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u32) } - } - #[inline] - pub fn set_MemHighVectorGranularity(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 4u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 20u8) as u32) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 20u8, val as u64) - } - } - #[inline] - pub fn MemHighVectorStartLower(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 4u8) as u32) } - } - #[inline] - pub fn set_MemHighVectorStartLower(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(28usize, 4u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MemHighDecodeMechanismEnable: ULONG, - Rsvd0: ULONG, - MemHighVectorGranularity: ULONG, - Rsvd1: ULONG, - MemHighVectorStartLower: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let MemHighDecodeMechanismEnable: u32 = unsafe { - ::core::mem::transmute(MemHighDecodeMechanismEnable) - }; - MemHighDecodeMechanismEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 3u8, - { - let Rsvd0: u32 = unsafe { ::core::mem::transmute(Rsvd0) }; - Rsvd0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 4u8, - { - let MemHighVectorGranularity: u32 = unsafe { - ::core::mem::transmute(MemHighVectorGranularity) - }; - MemHighVectorGranularity as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 20u8, - { - let Rsvd1: u32 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 28usize, - 4u8, - { - let MemHighVectorStartLower: u32 = unsafe { - ::core::mem::transmute(MemHighVectorStartLower) - }; - MemHighVectorStartLower as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER = _PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER; -pub type PPCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER = *mut _PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_FPB_MEM_HIGH_VECTOR_CONTROL2_REGISTER { - pub MemHighVectorStartUpper: ULONG, -} -#[test] -fn bindgen_test_layout__PCI_FPB_MEM_HIGH_VECTOR_CONTROL2_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_FPB_MEM_HIGH_VECTOR_CONTROL2_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_MEM_HIGH_VECTOR_CONTROL2_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_FPB_MEM_HIGH_VECTOR_CONTROL2_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_MEM_HIGH_VECTOR_CONTROL2_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_FPB_MEM_HIGH_VECTOR_CONTROL2_REGISTER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MemHighVectorStartUpper) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_MEM_HIGH_VECTOR_CONTROL2_REGISTER), - "::", - stringify!(MemHighVectorStartUpper), - ), - ); -} -pub type PCI_FPB_MEM_HIGH_VECTOR_CONTROL2_REGISTER = _PCI_FPB_MEM_HIGH_VECTOR_CONTROL2_REGISTER; -pub type PPCI_FPB_MEM_HIGH_VECTOR_CONTROL2_REGISTER = *mut _PCI_FPB_MEM_HIGH_VECTOR_CONTROL2_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn VectorAccessOffset(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set_VectorAccessOffset(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn Rsvd0(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 6u8) as u32) } - } - #[inline] - pub fn set_Rsvd0(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 6u8, val as u64) - } - } - #[inline] - pub fn VectorSelect(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u32) } - } - #[inline] - pub fn set_VectorSelect(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 2u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - VectorAccessOffset: ULONG, - Rsvd0: ULONG, - VectorSelect: ULONG, - Rsvd1: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let VectorAccessOffset: u32 = unsafe { - ::core::mem::transmute(VectorAccessOffset) - }; - VectorAccessOffset as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 6u8, - { - let Rsvd0: u32 = unsafe { ::core::mem::transmute(Rsvd0) }; - Rsvd0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 2u8, - { - let VectorSelect: u32 = unsafe { - ::core::mem::transmute(VectorSelect) - }; - VectorSelect as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 16u8, - { - let Rsvd1: u32 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER = _PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER; -pub type PPCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER = *mut _PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_FPB_VECTOR_ACCESS_DATA_REGISTER { - pub VectorAccessData: ULONG, -} -#[test] -fn bindgen_test_layout__PCI_FPB_VECTOR_ACCESS_DATA_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_FPB_VECTOR_ACCESS_DATA_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_VECTOR_ACCESS_DATA_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_FPB_VECTOR_ACCESS_DATA_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_VECTOR_ACCESS_DATA_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_FPB_VECTOR_ACCESS_DATA_REGISTER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VectorAccessData) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_VECTOR_ACCESS_DATA_REGISTER), - "::", - stringify!(VectorAccessData), - ), - ); -} -pub type PCI_FPB_VECTOR_ACCESS_DATA_REGISTER = _PCI_FPB_VECTOR_ACCESS_DATA_REGISTER; -pub type PPCI_FPB_VECTOR_ACCESS_DATA_REGISTER = *mut _PCI_FPB_VECTOR_ACCESS_DATA_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_FPB_CAPABILITY { - pub Header: PCI_FPB_CAPABILITY_HEADER, - pub CapabilitiesRegister: PCI_FPB_CAPABILITIES_REGISTER, - pub RidVectorControl1Register: PCI_FPB_RID_VECTOR_CONTROL1_REGISTER, - pub RidVectorControl2Register: PCI_FPB_RID_VECTOR_CONTROL2_REGISTER, - pub MemLowVectorControlRegister: PCI_FPB_MEM_LOW_VECTOR_CONTROL_REGISTER, - pub MemHighVectorControl1Register: PCI_FPB_MEM_HIGH_VECTOR_CONTROL1_REGISTER, - pub MemHighVectorControl2Register: PCI_FPB_MEM_HIGH_VECTOR_CONTROL2_REGISTER, - pub VectorAccessControlRegister: PCI_FPB_VECTOR_ACCESS_CONTROL_REGISTER, - pub VectorAccessDataRegister: PCI_FPB_VECTOR_ACCESS_DATA_REGISTER, -} -#[test] -fn bindgen_test_layout__PCI_FPB_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_FPB_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_FPB_CAPABILITY>(), - 36usize, - concat!("Size of: ", stringify!(_PCI_FPB_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_FPB_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_FPB_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CapabilitiesRegister) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_CAPABILITY), - "::", - stringify!(CapabilitiesRegister), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RidVectorControl1Register) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_CAPABILITY), - "::", - stringify!(RidVectorControl1Register), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RidVectorControl2Register) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_CAPABILITY), - "::", - stringify!(RidVectorControl2Register), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MemLowVectorControlRegister) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_CAPABILITY), - "::", - stringify!(MemLowVectorControlRegister), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MemHighVectorControl1Register) as usize - - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_CAPABILITY), - "::", - stringify!(MemHighVectorControl1Register), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MemHighVectorControl2Register) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_CAPABILITY), - "::", - stringify!(MemHighVectorControl2Register), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VectorAccessControlRegister) as usize - - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_CAPABILITY), - "::", - stringify!(VectorAccessControlRegister), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VectorAccessDataRegister) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_FPB_CAPABILITY), - "::", - stringify!(VectorAccessDataRegister), - ), - ); -} -impl Default for _PCI_FPB_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_FPB_CAPABILITY = _PCI_FPB_CAPABILITY; -pub type PPCI_FPB_CAPABILITY = *mut _PCI_FPB_CAPABILITY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_VENDOR_SPECIFIC_CAPABILITY { - pub Header: PCI_CAPABILITIES_HEADER, - pub VscLength: UCHAR, - pub VendorSpecific: UCHAR, -} -#[test] -fn bindgen_test_layout__PCI_VENDOR_SPECIFIC_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_VENDOR_SPECIFIC_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_VENDOR_SPECIFIC_CAPABILITY>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_VENDOR_SPECIFIC_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_VENDOR_SPECIFIC_CAPABILITY>(), - 1usize, - concat!("Alignment of ", stringify!(_PCI_VENDOR_SPECIFIC_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VENDOR_SPECIFIC_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VscLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VENDOR_SPECIFIC_CAPABILITY), - "::", - stringify!(VscLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VendorSpecific) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_PCI_VENDOR_SPECIFIC_CAPABILITY), - "::", - stringify!(VendorSpecific), - ), - ); -} -pub type PCI_VENDOR_SPECIFIC_CAPABILITY = _PCI_VENDOR_SPECIFIC_CAPABILITY; -pub type PPCI_VENDOR_SPECIFIC_CAPABILITY = *mut _PCI_VENDOR_SPECIFIC_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_CAPABILITIES_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_CAPABILITIES_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_CAPABILITIES_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CAPABILITIES_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CAPABILITIES_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_CAPABILITIES_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CAPABILITIES_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CAPABILITIES_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_CAPABILITIES_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CapabilityVersion(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u16) } - } - #[inline] - pub fn set_CapabilityVersion(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn DeviceType(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } - } - #[inline] - pub fn set_DeviceType(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 4u8, val as u64) - } - } - #[inline] - pub fn SlotImplemented(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } - } - #[inline] - pub fn set_SlotImplemented(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn InterruptMessageNumber(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 5u8) as u16) } - } - #[inline] - pub fn set_InterruptMessageNumber(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 5u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 2u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CapabilityVersion: USHORT, - DeviceType: USHORT, - SlotImplemented: USHORT, - InterruptMessageNumber: USHORT, - Rsvd: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let CapabilityVersion: u16 = unsafe { - ::core::mem::transmute(CapabilityVersion) - }; - CapabilityVersion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 4u8, - { - let DeviceType: u16 = unsafe { ::core::mem::transmute(DeviceType) }; - DeviceType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let SlotImplemented: u16 = unsafe { - ::core::mem::transmute(SlotImplemented) - }; - SlotImplemented as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 5u8, - { - let InterruptMessageNumber: u16 = unsafe { - ::core::mem::transmute(InterruptMessageNumber) - }; - InterruptMessageNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 2u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CAPABILITIES_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_CAPABILITIES_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CAPABILITIES_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_CAPABILITIES_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CAPABILITIES_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_CAPABILITIES_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITIES_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_CAPABILITIES_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_CAPABILITIES_REGISTER = _PCI_EXPRESS_CAPABILITIES_REGISTER; -pub type PPCI_EXPRESS_CAPABILITIES_REGISTER = *mut _PCI_EXPRESS_CAPABILITIES_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER__bindgen_ty_1 { - #[inline] - pub fn MaxPayloadSizeSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u32) } - } - #[inline] - pub fn set_MaxPayloadSizeSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn PhantomFunctionsSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 2u8) as u32) } - } - #[inline] - pub fn set_PhantomFunctionsSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 2u8, val as u64) - } - } - #[inline] - pub fn ExtendedTagSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_ExtendedTagSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn L0sAcceptableLatency(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 3u8) as u32) } - } - #[inline] - pub fn set_L0sAcceptableLatency(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 3u8, val as u64) - } - } - #[inline] - pub fn L1AcceptableLatency(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 3u8) as u32) } - } - #[inline] - pub fn set_L1AcceptableLatency(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 3u8, val as u64) - } - } - #[inline] - pub fn Undefined(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 3u8) as u32) } - } - #[inline] - pub fn set_Undefined(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 3u8, val as u64) - } - } - #[inline] - pub fn RoleBasedErrorReporting(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } - } - #[inline] - pub fn set_RoleBasedErrorReporting(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u32) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 2u8, val as u64) - } - } - #[inline] - pub fn CapturedSlotPowerLimit(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 8u8) as u32) } - } - #[inline] - pub fn set_CapturedSlotPowerLimit(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 8u8, val as u64) - } - } - #[inline] - pub fn CapturedSlotPowerLimitScale(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 2u8) as u32) } - } - #[inline] - pub fn set_CapturedSlotPowerLimitScale(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(26usize, 2u8, val as u64) - } - } - #[inline] - pub fn FunctionLevelResetCapability(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u32) } - } - #[inline] - pub fn set_FunctionLevelResetCapability(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(28usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 3u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(29usize, 3u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MaxPayloadSizeSupported: ULONG, - PhantomFunctionsSupported: ULONG, - ExtendedTagSupported: ULONG, - L0sAcceptableLatency: ULONG, - L1AcceptableLatency: ULONG, - Undefined: ULONG, - RoleBasedErrorReporting: ULONG, - Rsvd1: ULONG, - CapturedSlotPowerLimit: ULONG, - CapturedSlotPowerLimitScale: ULONG, - FunctionLevelResetCapability: ULONG, - Rsvd2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let MaxPayloadSizeSupported: u32 = unsafe { - ::core::mem::transmute(MaxPayloadSizeSupported) - }; - MaxPayloadSizeSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 2u8, - { - let PhantomFunctionsSupported: u32 = unsafe { - ::core::mem::transmute(PhantomFunctionsSupported) - }; - PhantomFunctionsSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let ExtendedTagSupported: u32 = unsafe { - ::core::mem::transmute(ExtendedTagSupported) - }; - ExtendedTagSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 3u8, - { - let L0sAcceptableLatency: u32 = unsafe { - ::core::mem::transmute(L0sAcceptableLatency) - }; - L0sAcceptableLatency as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 3u8, - { - let L1AcceptableLatency: u32 = unsafe { - ::core::mem::transmute(L1AcceptableLatency) - }; - L1AcceptableLatency as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 3u8, - { - let Undefined: u32 = unsafe { ::core::mem::transmute(Undefined) }; - Undefined as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let RoleBasedErrorReporting: u32 = unsafe { - ::core::mem::transmute(RoleBasedErrorReporting) - }; - RoleBasedErrorReporting as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 2u8, - { - let Rsvd1: u32 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 8u8, - { - let CapturedSlotPowerLimit: u32 = unsafe { - ::core::mem::transmute(CapturedSlotPowerLimit) - }; - CapturedSlotPowerLimit as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 26usize, - 2u8, - { - let CapturedSlotPowerLimitScale: u32 = unsafe { - ::core::mem::transmute(CapturedSlotPowerLimitScale) - }; - CapturedSlotPowerLimitScale as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 28usize, - 1u8, - { - let FunctionLevelResetCapability: u32 = unsafe { - ::core::mem::transmute(FunctionLevelResetCapability) - }; - FunctionLevelResetCapability as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 29usize, - 3u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER = _PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER; -pub type PPCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER = *mut _PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DEVICE_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_1, - pub __bindgen_anon_2: _PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_2, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CorrectableErrorEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_CorrectableErrorEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn NonFatalErrorEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_NonFatalErrorEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn FatalErrorEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_FatalErrorEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnsupportedRequestErrorEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_UnsupportedRequestErrorEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableRelaxedOrder(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_EnableRelaxedOrder(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn MaxPayloadSize(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u16) } - } - #[inline] - pub fn set_MaxPayloadSize(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 3u8, val as u64) - } - } - #[inline] - pub fn ExtendedTagEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } - } - #[inline] - pub fn set_ExtendedTagEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn PhantomFunctionsEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } - } - #[inline] - pub fn set_PhantomFunctionsEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuxPowerEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } - } - #[inline] - pub fn set_AuxPowerEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn NoSnoopEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } - } - #[inline] - pub fn set_NoSnoopEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn MaxReadRequestSize(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 3u8) as u16) } - } - #[inline] - pub fn set_MaxReadRequestSize(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 3u8, val as u64) - } - } - #[inline] - pub fn BridgeConfigRetryEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } - } - #[inline] - pub fn set_BridgeConfigRetryEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CorrectableErrorEnable: USHORT, - NonFatalErrorEnable: USHORT, - FatalErrorEnable: USHORT, - UnsupportedRequestErrorEnable: USHORT, - EnableRelaxedOrder: USHORT, - MaxPayloadSize: USHORT, - ExtendedTagEnable: USHORT, - PhantomFunctionsEnable: USHORT, - AuxPowerEnable: USHORT, - NoSnoopEnable: USHORT, - MaxReadRequestSize: USHORT, - BridgeConfigRetryEnable: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CorrectableErrorEnable: u16 = unsafe { - ::core::mem::transmute(CorrectableErrorEnable) - }; - CorrectableErrorEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let NonFatalErrorEnable: u16 = unsafe { - ::core::mem::transmute(NonFatalErrorEnable) - }; - NonFatalErrorEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let FatalErrorEnable: u16 = unsafe { - ::core::mem::transmute(FatalErrorEnable) - }; - FatalErrorEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let UnsupportedRequestErrorEnable: u16 = unsafe { - ::core::mem::transmute(UnsupportedRequestErrorEnable) - }; - UnsupportedRequestErrorEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let EnableRelaxedOrder: u16 = unsafe { - ::core::mem::transmute(EnableRelaxedOrder) - }; - EnableRelaxedOrder as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 3u8, - { - let MaxPayloadSize: u16 = unsafe { - ::core::mem::transmute(MaxPayloadSize) - }; - MaxPayloadSize as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let ExtendedTagEnable: u16 = unsafe { - ::core::mem::transmute(ExtendedTagEnable) - }; - ExtendedTagEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let PhantomFunctionsEnable: u16 = unsafe { - ::core::mem::transmute(PhantomFunctionsEnable) - }; - PhantomFunctionsEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let AuxPowerEnable: u16 = unsafe { - ::core::mem::transmute(AuxPowerEnable) - }; - AuxPowerEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let NoSnoopEnable: u16 = unsafe { - ::core::mem::transmute(NoSnoopEnable) - }; - NoSnoopEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 3u8, - { - let MaxReadRequestSize: u16 = unsafe { - ::core::mem::transmute(MaxReadRequestSize) - }; - MaxReadRequestSize as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let BridgeConfigRetryEnable: u16 = unsafe { - ::core::mem::transmute(BridgeConfigRetryEnable) - }; - BridgeConfigRetryEnable as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_2 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_2() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_2>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_2>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_2), - ), - ); -} -impl _PCI_EXPRESS_DEVICE_CONTROL_REGISTER__bindgen_ty_2 { - #[inline] - pub fn InitiateFunctionLevelReset(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } - } - #[inline] - pub fn set_InitiateFunctionLevelReset(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - InitiateFunctionLevelReset: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let InitiateFunctionLevelReset: u16 = unsafe { - ::core::mem::transmute(InitiateFunctionLevelReset) - }; - InitiateFunctionLevelReset as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DEVICE_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DEVICE_CONTROL_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DEVICE_CONTROL_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DEVICE_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DEVICE_CONTROL_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DEVICE_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DEVICE_CONTROL_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_DEVICE_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DEVICE_CONTROL_REGISTER = _PCI_EXPRESS_DEVICE_CONTROL_REGISTER; -pub type PPCI_EXPRESS_DEVICE_CONTROL_REGISTER = *mut _PCI_EXPRESS_DEVICE_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DEVICE_STATUS_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DEVICE_STATUS_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DEVICE_STATUS_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DEVICE_STATUS_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DEVICE_STATUS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DEVICE_STATUS_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DEVICE_STATUS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DEVICE_STATUS_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DEVICE_STATUS_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CorrectableErrorDetected(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_CorrectableErrorDetected(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn NonFatalErrorDetected(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_NonFatalErrorDetected(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn FatalErrorDetected(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_FatalErrorDetected(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn UnsupportedRequestDetected(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_UnsupportedRequestDetected(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn AuxPowerDetected(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_AuxPowerDetected(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn TransactionsPending(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_TransactionsPending(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 10u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 10u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CorrectableErrorDetected: USHORT, - NonFatalErrorDetected: USHORT, - FatalErrorDetected: USHORT, - UnsupportedRequestDetected: USHORT, - AuxPowerDetected: USHORT, - TransactionsPending: USHORT, - Rsvd: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CorrectableErrorDetected: u16 = unsafe { - ::core::mem::transmute(CorrectableErrorDetected) - }; - CorrectableErrorDetected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let NonFatalErrorDetected: u16 = unsafe { - ::core::mem::transmute(NonFatalErrorDetected) - }; - NonFatalErrorDetected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let FatalErrorDetected: u16 = unsafe { - ::core::mem::transmute(FatalErrorDetected) - }; - FatalErrorDetected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let UnsupportedRequestDetected: u16 = unsafe { - ::core::mem::transmute(UnsupportedRequestDetected) - }; - UnsupportedRequestDetected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let AuxPowerDetected: u16 = unsafe { - ::core::mem::transmute(AuxPowerDetected) - }; - AuxPowerDetected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let TransactionsPending: u16 = unsafe { - ::core::mem::transmute(TransactionsPending) - }; - TransactionsPending as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 10u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DEVICE_STATUS_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DEVICE_STATUS_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DEVICE_STATUS_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DEVICE_STATUS_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DEVICE_STATUS_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DEVICE_STATUS_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DEVICE_STATUS_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_DEVICE_STATUS_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DEVICE_STATUS_REGISTER = _PCI_EXPRESS_DEVICE_STATUS_REGISTER; -pub type PPCI_EXPRESS_DEVICE_STATUS_REGISTER = *mut _PCI_EXPRESS_DEVICE_STATUS_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_LINK_CAPABILITIES_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_LINK_CAPABILITIES_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_LINK_CAPABILITIES_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_CAPABILITIES_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_CAPABILITIES_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_LINK_CAPABILITIES_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_CAPABILITIES_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_LINK_CAPABILITIES_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_LINK_CAPABILITIES_REGISTER__bindgen_ty_1 { - #[inline] - pub fn MaximumLinkSpeed(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u32) } - } - #[inline] - pub fn set_MaximumLinkSpeed(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn MaximumLinkWidth(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 6u8) as u32) } - } - #[inline] - pub fn set_MaximumLinkWidth(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 6u8, val as u64) - } - } - #[inline] - pub fn ActiveStatePMSupport(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u32) } - } - #[inline] - pub fn set_ActiveStatePMSupport(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 2u8, val as u64) - } - } - #[inline] - pub fn L0sExitLatency(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 3u8) as u32) } - } - #[inline] - pub fn set_L0sExitLatency(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 3u8, val as u64) - } - } - #[inline] - pub fn L1ExitLatency(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 3u8) as u32) } - } - #[inline] - pub fn set_L1ExitLatency(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 3u8, val as u64) - } - } - #[inline] - pub fn ClockPowerManagement(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_ClockPowerManagement(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn SurpriseDownErrorReportingCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } - } - #[inline] - pub fn set_SurpriseDownErrorReportingCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 1u8, val as u64) - } - } - #[inline] - pub fn DataLinkLayerActiveReportingCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } - } - #[inline] - pub fn set_DataLinkLayerActiveReportingCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 1u8, val as u64) - } - } - #[inline] - pub fn LinkBandwidthNotificationCapability(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } - } - #[inline] - pub fn set_LinkBandwidthNotificationCapability(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 1u8, val as u64) - } - } - #[inline] - pub fn AspmOptionalityCompliance(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u32) } - } - #[inline] - pub fn set_AspmOptionalityCompliance(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(23usize, 1u8, val as u64) - } - } - #[inline] - pub fn PortNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_PortNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MaximumLinkSpeed: ULONG, - MaximumLinkWidth: ULONG, - ActiveStatePMSupport: ULONG, - L0sExitLatency: ULONG, - L1ExitLatency: ULONG, - ClockPowerManagement: ULONG, - SurpriseDownErrorReportingCapable: ULONG, - DataLinkLayerActiveReportingCapable: ULONG, - LinkBandwidthNotificationCapability: ULONG, - AspmOptionalityCompliance: ULONG, - Rsvd: ULONG, - PortNumber: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let MaximumLinkSpeed: u32 = unsafe { - ::core::mem::transmute(MaximumLinkSpeed) - }; - MaximumLinkSpeed as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 6u8, - { - let MaximumLinkWidth: u32 = unsafe { - ::core::mem::transmute(MaximumLinkWidth) - }; - MaximumLinkWidth as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 2u8, - { - let ActiveStatePMSupport: u32 = unsafe { - ::core::mem::transmute(ActiveStatePMSupport) - }; - ActiveStatePMSupport as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 3u8, - { - let L0sExitLatency: u32 = unsafe { - ::core::mem::transmute(L0sExitLatency) - }; - L0sExitLatency as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 3u8, - { - let L1ExitLatency: u32 = unsafe { - ::core::mem::transmute(L1ExitLatency) - }; - L1ExitLatency as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let ClockPowerManagement: u32 = unsafe { - ::core::mem::transmute(ClockPowerManagement) - }; - ClockPowerManagement as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 1u8, - { - let SurpriseDownErrorReportingCapable: u32 = unsafe { - ::core::mem::transmute(SurpriseDownErrorReportingCapable) - }; - SurpriseDownErrorReportingCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 1u8, - { - let DataLinkLayerActiveReportingCapable: u32 = unsafe { - ::core::mem::transmute(DataLinkLayerActiveReportingCapable) - }; - DataLinkLayerActiveReportingCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 1u8, - { - let LinkBandwidthNotificationCapability: u32 = unsafe { - ::core::mem::transmute(LinkBandwidthNotificationCapability) - }; - LinkBandwidthNotificationCapability as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 1u8, - { - let AspmOptionalityCompliance: u32 = unsafe { - ::core::mem::transmute(AspmOptionalityCompliance) - }; - AspmOptionalityCompliance as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 23usize, - 1u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let PortNumber: u32 = unsafe { ::core::mem::transmute(PortNumber) }; - PortNumber as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_CAPABILITIES_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_LINK_CAPABILITIES_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_CAPABILITIES_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_LINK_CAPABILITIES_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_CAPABILITIES_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_LINK_CAPABILITIES_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_CAPABILITIES_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_LINK_CAPABILITIES_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_LINK_CAPABILITIES_REGISTER = _PCI_EXPRESS_LINK_CAPABILITIES_REGISTER; -pub type PPCI_EXPRESS_LINK_CAPABILITIES_REGISTER = *mut _PCI_EXPRESS_LINK_CAPABILITIES_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_LINK_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_LINK_CONTROL_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_LINK_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_LINK_CONTROL_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_LINK_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_LINK_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn ActiveStatePMControl(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u16) } - } - #[inline] - pub fn set_ActiveStatePMControl(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 2u8, val as u64) - } - } - #[inline] - pub fn Rsvd1(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_Rsvd1(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReadCompletionBoundary(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_ReadCompletionBoundary(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn LinkDisable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_LinkDisable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn RetrainLink(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_RetrainLink(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn CommonClockConfig(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set_CommonClockConfig(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn ExtendedSynch(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } - } - #[inline] - pub fn set_ExtendedSynch(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn EnableClockPowerManagement(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } - } - #[inline] - pub fn set_EnableClockPowerManagement(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 7u8) as u16) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 7u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ActiveStatePMControl: USHORT, - Rsvd1: USHORT, - ReadCompletionBoundary: USHORT, - LinkDisable: USHORT, - RetrainLink: USHORT, - CommonClockConfig: USHORT, - ExtendedSynch: USHORT, - EnableClockPowerManagement: USHORT, - Rsvd2: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 2u8, - { - let ActiveStatePMControl: u16 = unsafe { - ::core::mem::transmute(ActiveStatePMControl) - }; - ActiveStatePMControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Rsvd1: u16 = unsafe { ::core::mem::transmute(Rsvd1) }; - Rsvd1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ReadCompletionBoundary: u16 = unsafe { - ::core::mem::transmute(ReadCompletionBoundary) - }; - ReadCompletionBoundary as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let LinkDisable: u16 = unsafe { - ::core::mem::transmute(LinkDisable) - }; - LinkDisable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let RetrainLink: u16 = unsafe { - ::core::mem::transmute(RetrainLink) - }; - RetrainLink as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let CommonClockConfig: u16 = unsafe { - ::core::mem::transmute(CommonClockConfig) - }; - CommonClockConfig as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let ExtendedSynch: u16 = unsafe { - ::core::mem::transmute(ExtendedSynch) - }; - ExtendedSynch as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let EnableClockPowerManagement: u16 = unsafe { - ::core::mem::transmute(EnableClockPowerManagement) - }; - EnableClockPowerManagement as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 7u8, - { - let Rsvd2: u16 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_LINK_CONTROL_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_CONTROL_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_LINK_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_CONTROL_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_LINK_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_CONTROL_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_LINK_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_LINK_CONTROL_REGISTER = _PCI_EXPRESS_LINK_CONTROL_REGISTER; -pub type PPCI_EXPRESS_LINK_CONTROL_REGISTER = *mut _PCI_EXPRESS_LINK_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_LINK_STATUS_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_LINK_STATUS_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_LINK_STATUS_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_STATUS_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_STATUS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_LINK_STATUS_REGISTER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_STATUS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_LINK_STATUS_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_LINK_STATUS_REGISTER__bindgen_ty_1 { - #[inline] - pub fn LinkSpeed(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u16) } - } - #[inline] - pub fn set_LinkSpeed(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn LinkWidth(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 6u8) as u16) } - } - #[inline] - pub fn set_LinkWidth(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 6u8, val as u64) - } - } - #[inline] - pub fn Undefined(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } - } - #[inline] - pub fn set_Undefined(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn LinkTraining(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } - } - #[inline] - pub fn set_LinkTraining(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn SlotClockConfig(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } - } - #[inline] - pub fn set_SlotClockConfig(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn DataLinkLayerActive(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } - } - #[inline] - pub fn set_DataLinkLayerActive(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 2u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - LinkSpeed: USHORT, - LinkWidth: USHORT, - Undefined: USHORT, - LinkTraining: USHORT, - SlotClockConfig: USHORT, - DataLinkLayerActive: USHORT, - Rsvd: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let LinkSpeed: u16 = unsafe { ::core::mem::transmute(LinkSpeed) }; - LinkSpeed as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 6u8, - { - let LinkWidth: u16 = unsafe { ::core::mem::transmute(LinkWidth) }; - LinkWidth as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let Undefined: u16 = unsafe { ::core::mem::transmute(Undefined) }; - Undefined as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let LinkTraining: u16 = unsafe { - ::core::mem::transmute(LinkTraining) - }; - LinkTraining as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let SlotClockConfig: u16 = unsafe { - ::core::mem::transmute(SlotClockConfig) - }; - SlotClockConfig as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 1u8, - { - let DataLinkLayerActive: u16 = unsafe { - ::core::mem::transmute(DataLinkLayerActive) - }; - DataLinkLayerActive as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 2u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_STATUS_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_LINK_STATUS_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_STATUS_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_LINK_STATUS_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_STATUS_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_LINK_STATUS_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_STATUS_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_LINK_STATUS_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_LINK_STATUS_REGISTER = _PCI_EXPRESS_LINK_STATUS_REGISTER; -pub type PPCI_EXPRESS_LINK_STATUS_REGISTER = *mut _PCI_EXPRESS_LINK_STATUS_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER__bindgen_ty_1 { - #[inline] - pub fn AttentionButtonPresent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_AttentionButtonPresent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn PowerControllerPresent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_PowerControllerPresent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn MRLSensorPresent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_MRLSensorPresent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AttentionIndicatorPresent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_AttentionIndicatorPresent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn PowerIndicatorPresent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_PowerIndicatorPresent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn HotPlugSurprise(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_HotPlugSurprise(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn HotPlugCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_HotPlugCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn SlotPowerLimit(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 8u8) as u32) } - } - #[inline] - pub fn set_SlotPowerLimit(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 8u8, val as u64) - } - } - #[inline] - pub fn SlotPowerLimitScale(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u32) } - } - #[inline] - pub fn set_SlotPowerLimitScale(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 2u8, val as u64) - } - } - #[inline] - pub fn ElectromechanicalLockPresent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_ElectromechanicalLockPresent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn NoCommandCompletedSupport(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_NoCommandCompletedSupport(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn PhysicalSlotNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 13u8) as u32) } - } - #[inline] - pub fn set_PhysicalSlotNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 13u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - AttentionButtonPresent: ULONG, - PowerControllerPresent: ULONG, - MRLSensorPresent: ULONG, - AttentionIndicatorPresent: ULONG, - PowerIndicatorPresent: ULONG, - HotPlugSurprise: ULONG, - HotPlugCapable: ULONG, - SlotPowerLimit: ULONG, - SlotPowerLimitScale: ULONG, - ElectromechanicalLockPresent: ULONG, - NoCommandCompletedSupport: ULONG, - PhysicalSlotNumber: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let AttentionButtonPresent: u32 = unsafe { - ::core::mem::transmute(AttentionButtonPresent) - }; - AttentionButtonPresent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let PowerControllerPresent: u32 = unsafe { - ::core::mem::transmute(PowerControllerPresent) - }; - PowerControllerPresent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let MRLSensorPresent: u32 = unsafe { - ::core::mem::transmute(MRLSensorPresent) - }; - MRLSensorPresent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AttentionIndicatorPresent: u32 = unsafe { - ::core::mem::transmute(AttentionIndicatorPresent) - }; - AttentionIndicatorPresent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let PowerIndicatorPresent: u32 = unsafe { - ::core::mem::transmute(PowerIndicatorPresent) - }; - PowerIndicatorPresent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let HotPlugSurprise: u32 = unsafe { - ::core::mem::transmute(HotPlugSurprise) - }; - HotPlugSurprise as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let HotPlugCapable: u32 = unsafe { - ::core::mem::transmute(HotPlugCapable) - }; - HotPlugCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 8u8, - { - let SlotPowerLimit: u32 = unsafe { - ::core::mem::transmute(SlotPowerLimit) - }; - SlotPowerLimit as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 2u8, - { - let SlotPowerLimitScale: u32 = unsafe { - ::core::mem::transmute(SlotPowerLimitScale) - }; - SlotPowerLimitScale as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let ElectromechanicalLockPresent: u32 = unsafe { - ::core::mem::transmute(ElectromechanicalLockPresent) - }; - ElectromechanicalLockPresent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let NoCommandCompletedSupport: u32 = unsafe { - ::core::mem::transmute(NoCommandCompletedSupport) - }; - NoCommandCompletedSupport as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 13u8, - { - let PhysicalSlotNumber: u32 = unsafe { - ::core::mem::transmute(PhysicalSlotNumber) - }; - PhysicalSlotNumber as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER = _PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER; -pub type PPCI_EXPRESS_SLOT_CAPABILITIES_REGISTER = *mut _PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_SLOT_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_SLOT_CONTROL_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_SLOT_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SLOT_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SLOT_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_SLOT_CONTROL_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SLOT_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_SLOT_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_SLOT_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn AttentionButtonEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_AttentionButtonEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn PowerFaultDetectEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_PowerFaultDetectEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn MRLSensorEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_MRLSensorEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn PresenceDetectEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_PresenceDetectEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn CommandCompletedEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_CommandCompletedEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn HotPlugInterruptEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_HotPlugInterruptEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn AttentionIndicatorControl(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u16) } - } - #[inline] - pub fn set_AttentionIndicatorControl(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 2u8, val as u64) - } - } - #[inline] - pub fn PowerIndicatorControl(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u16) } - } - #[inline] - pub fn set_PowerIndicatorControl(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 2u8, val as u64) - } - } - #[inline] - pub fn PowerControllerControl(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } - } - #[inline] - pub fn set_PowerControllerControl(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn ElectromechanicalLockControl(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } - } - #[inline] - pub fn set_ElectromechanicalLockControl(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn DataLinkStateChangeEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } - } - #[inline] - pub fn set_DataLinkStateChangeEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 3u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - AttentionButtonEnable: USHORT, - PowerFaultDetectEnable: USHORT, - MRLSensorEnable: USHORT, - PresenceDetectEnable: USHORT, - CommandCompletedEnable: USHORT, - HotPlugInterruptEnable: USHORT, - AttentionIndicatorControl: USHORT, - PowerIndicatorControl: USHORT, - PowerControllerControl: USHORT, - ElectromechanicalLockControl: USHORT, - DataLinkStateChangeEnable: USHORT, - Rsvd: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let AttentionButtonEnable: u16 = unsafe { - ::core::mem::transmute(AttentionButtonEnable) - }; - AttentionButtonEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let PowerFaultDetectEnable: u16 = unsafe { - ::core::mem::transmute(PowerFaultDetectEnable) - }; - PowerFaultDetectEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let MRLSensorEnable: u16 = unsafe { - ::core::mem::transmute(MRLSensorEnable) - }; - MRLSensorEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let PresenceDetectEnable: u16 = unsafe { - ::core::mem::transmute(PresenceDetectEnable) - }; - PresenceDetectEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let CommandCompletedEnable: u16 = unsafe { - ::core::mem::transmute(CommandCompletedEnable) - }; - CommandCompletedEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let HotPlugInterruptEnable: u16 = unsafe { - ::core::mem::transmute(HotPlugInterruptEnable) - }; - HotPlugInterruptEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 2u8, - { - let AttentionIndicatorControl: u16 = unsafe { - ::core::mem::transmute(AttentionIndicatorControl) - }; - AttentionIndicatorControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 2u8, - { - let PowerIndicatorControl: u16 = unsafe { - ::core::mem::transmute(PowerIndicatorControl) - }; - PowerIndicatorControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let PowerControllerControl: u16 = unsafe { - ::core::mem::transmute(PowerControllerControl) - }; - PowerControllerControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let ElectromechanicalLockControl: u16 = unsafe { - ::core::mem::transmute(ElectromechanicalLockControl) - }; - ElectromechanicalLockControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let DataLinkStateChangeEnable: u16 = unsafe { - ::core::mem::transmute(DataLinkStateChangeEnable) - }; - DataLinkStateChangeEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 3u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SLOT_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_SLOT_CONTROL_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SLOT_CONTROL_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SLOT_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SLOT_CONTROL_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SLOT_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SLOT_CONTROL_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_SLOT_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_SLOT_CONTROL_REGISTER = _PCI_EXPRESS_SLOT_CONTROL_REGISTER; -pub type PPCI_EXPRESS_SLOT_CONTROL_REGISTER = *mut _PCI_EXPRESS_SLOT_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_SLOT_STATUS_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_SLOT_STATUS_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_SLOT_STATUS_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SLOT_STATUS_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SLOT_STATUS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SLOT_STATUS_REGISTER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SLOT_STATUS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_SLOT_STATUS_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_SLOT_STATUS_REGISTER__bindgen_ty_1 { - #[inline] - pub fn AttentionButtonPressed(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_AttentionButtonPressed(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn PowerFaultDetected(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_PowerFaultDetected(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn MRLSensorChanged(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_MRLSensorChanged(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn PresenceDetectChanged(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_PresenceDetectChanged(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn CommandCompleted(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_CommandCompleted(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn MRLSensorState(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_MRLSensorState(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn PresenceDetectState(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set_PresenceDetectState(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn ElectromechanicalLockEngaged(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } - } - #[inline] - pub fn set_ElectromechanicalLockEngaged(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn DataLinkStateChanged(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } - } - #[inline] - pub fn set_DataLinkStateChanged(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 7u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 7u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - AttentionButtonPressed: USHORT, - PowerFaultDetected: USHORT, - MRLSensorChanged: USHORT, - PresenceDetectChanged: USHORT, - CommandCompleted: USHORT, - MRLSensorState: USHORT, - PresenceDetectState: USHORT, - ElectromechanicalLockEngaged: USHORT, - DataLinkStateChanged: USHORT, - Rsvd: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let AttentionButtonPressed: u16 = unsafe { - ::core::mem::transmute(AttentionButtonPressed) - }; - AttentionButtonPressed as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let PowerFaultDetected: u16 = unsafe { - ::core::mem::transmute(PowerFaultDetected) - }; - PowerFaultDetected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let MRLSensorChanged: u16 = unsafe { - ::core::mem::transmute(MRLSensorChanged) - }; - MRLSensorChanged as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let PresenceDetectChanged: u16 = unsafe { - ::core::mem::transmute(PresenceDetectChanged) - }; - PresenceDetectChanged as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let CommandCompleted: u16 = unsafe { - ::core::mem::transmute(CommandCompleted) - }; - CommandCompleted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let MRLSensorState: u16 = unsafe { - ::core::mem::transmute(MRLSensorState) - }; - MRLSensorState as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let PresenceDetectState: u16 = unsafe { - ::core::mem::transmute(PresenceDetectState) - }; - PresenceDetectState as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let ElectromechanicalLockEngaged: u16 = unsafe { - ::core::mem::transmute(ElectromechanicalLockEngaged) - }; - ElectromechanicalLockEngaged as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let DataLinkStateChanged: u16 = unsafe { - ::core::mem::transmute(DataLinkStateChanged) - }; - DataLinkStateChanged as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 7u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SLOT_STATUS_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_SLOT_STATUS_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SLOT_STATUS_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SLOT_STATUS_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SLOT_STATUS_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SLOT_STATUS_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SLOT_STATUS_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_SLOT_STATUS_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_SLOT_STATUS_REGISTER = _PCI_EXPRESS_SLOT_STATUS_REGISTER; -pub type PPCI_EXPRESS_SLOT_STATUS_REGISTER = *mut _PCI_EXPRESS_SLOT_STATUS_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_ROOT_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_ROOT_CONTROL_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ROOT_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ROOT_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ROOT_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_ROOT_CONTROL_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ROOT_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_ROOT_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_ROOT_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CorrectableSerrEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_CorrectableSerrEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn NonFatalSerrEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_NonFatalSerrEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn FatalSerrEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_FatalSerrEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn PMEInterruptEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_PMEInterruptEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn CRSSoftwareVisibilityEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_CRSSoftwareVisibilityEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 11u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 11u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CorrectableSerrEnable: USHORT, - NonFatalSerrEnable: USHORT, - FatalSerrEnable: USHORT, - PMEInterruptEnable: USHORT, - CRSSoftwareVisibilityEnable: USHORT, - Rsvd: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CorrectableSerrEnable: u16 = unsafe { - ::core::mem::transmute(CorrectableSerrEnable) - }; - CorrectableSerrEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let NonFatalSerrEnable: u16 = unsafe { - ::core::mem::transmute(NonFatalSerrEnable) - }; - NonFatalSerrEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let FatalSerrEnable: u16 = unsafe { - ::core::mem::transmute(FatalSerrEnable) - }; - FatalSerrEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let PMEInterruptEnable: u16 = unsafe { - ::core::mem::transmute(PMEInterruptEnable) - }; - PMEInterruptEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let CRSSoftwareVisibilityEnable: u16 = unsafe { - ::core::mem::transmute(CRSSoftwareVisibilityEnable) - }; - CRSSoftwareVisibilityEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 11u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ROOT_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ROOT_CONTROL_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ROOT_CONTROL_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ROOT_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ROOT_CONTROL_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ROOT_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOT_CONTROL_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_ROOT_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_ROOT_CONTROL_REGISTER = _PCI_EXPRESS_ROOT_CONTROL_REGISTER; -pub type PPCI_EXPRESS_ROOT_CONTROL_REGISTER = *mut _PCI_EXPRESS_ROOT_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CRSSoftwareVisibility(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_CRSSoftwareVisibility(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 15u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 15u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CRSSoftwareVisibility: USHORT, - Rsvd: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CRSSoftwareVisibility: u16 = unsafe { - ::core::mem::transmute(CRSSoftwareVisibility) - }; - CRSSoftwareVisibility as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 15u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER = _PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER; -pub type PPCI_EXPRESS_ROOT_CAPABILITIES_REGISTER = *mut _PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_ROOT_STATUS_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_ROOT_STATUS_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_ROOT_STATUS_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ROOT_STATUS_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ROOT_STATUS_REGISTER__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ROOT_STATUS_REGISTER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ROOT_STATUS_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_ROOT_STATUS_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_ROOT_STATUS_REGISTER__bindgen_ty_1 { - #[inline] - pub fn PMERequestorId(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u32) } - } - #[inline] - pub fn set_PMERequestorId(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn PMEStatus(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_PMEStatus(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn PMEPending(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_PMEPending(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 14u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 14u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PMERequestorId: ULONG, - PMEStatus: ULONG, - PMEPending: ULONG, - Rsvd: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 16u8, - { - let PMERequestorId: u32 = unsafe { - ::core::mem::transmute(PMERequestorId) - }; - PMERequestorId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let PMEStatus: u32 = unsafe { ::core::mem::transmute(PMEStatus) }; - PMEStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let PMEPending: u32 = unsafe { ::core::mem::transmute(PMEPending) }; - PMEPending as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 14u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_ROOT_STATUS_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_ROOT_STATUS_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_ROOT_STATUS_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_ROOT_STATUS_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_ROOT_STATUS_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_ROOT_STATUS_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_ROOT_STATUS_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_ROOT_STATUS_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_ROOT_STATUS_REGISTER = _PCI_EXPRESS_ROOT_STATUS_REGISTER; -pub type PPCI_EXPRESS_ROOT_STATUS_REGISTER = *mut _PCI_EXPRESS_ROOT_STATUS_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CompletionTimeoutRangesSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u32) } - } - #[inline] - pub fn set_CompletionTimeoutRangesSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn CompletionTimeoutDisableSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_CompletionTimeoutDisableSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn AriForwardingSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_AriForwardingSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn AtomicOpRoutingSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_AtomicOpRoutingSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn AtomicOpCompleterSupported32Bit(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_AtomicOpCompleterSupported32Bit(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn AtomicOpCompleterSupported64Bit(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_AtomicOpCompleterSupported64Bit(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn CASCompleterSupported128Bit(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_CASCompleterSupported128Bit(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn NoROEnabledPRPRPassing(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_NoROEnabledPRPRPassing(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn LTRMechanismSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } - } - #[inline] - pub fn set_LTRMechanismSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn TPHCompleterSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u32) } - } - #[inline] - pub fn set_TPHCompleterSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 2u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 4u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 4u8, val as u64) - } - } - #[inline] - pub fn OBFFSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 2u8) as u32) } - } - #[inline] - pub fn set_OBFFSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 2u8, val as u64) - } - } - #[inline] - pub fn ExtendedFmtFieldSuported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } - } - #[inline] - pub fn set_ExtendedFmtFieldSuported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 1u8, val as u64) - } - } - #[inline] - pub fn EndEndTLPPrefixSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } - } - #[inline] - pub fn set_EndEndTLPPrefixSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 1u8, val as u64) - } - } - #[inline] - pub fn MaxEndEndTLPPrefixes(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 2u8) as u32) } - } - #[inline] - pub fn set_MaxEndEndTLPPrefixes(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 2u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CompletionTimeoutRangesSupported: ULONG, - CompletionTimeoutDisableSupported: ULONG, - AriForwardingSupported: ULONG, - AtomicOpRoutingSupported: ULONG, - AtomicOpCompleterSupported32Bit: ULONG, - AtomicOpCompleterSupported64Bit: ULONG, - CASCompleterSupported128Bit: ULONG, - NoROEnabledPRPRPassing: ULONG, - LTRMechanismSupported: ULONG, - TPHCompleterSupported: ULONG, - Rsvd: ULONG, - OBFFSupported: ULONG, - ExtendedFmtFieldSuported: ULONG, - EndEndTLPPrefixSupported: ULONG, - MaxEndEndTLPPrefixes: ULONG, - Rsvd2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let CompletionTimeoutRangesSupported: u32 = unsafe { - ::core::mem::transmute(CompletionTimeoutRangesSupported) - }; - CompletionTimeoutRangesSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let CompletionTimeoutDisableSupported: u32 = unsafe { - ::core::mem::transmute(CompletionTimeoutDisableSupported) - }; - CompletionTimeoutDisableSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let AriForwardingSupported: u32 = unsafe { - ::core::mem::transmute(AriForwardingSupported) - }; - AriForwardingSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let AtomicOpRoutingSupported: u32 = unsafe { - ::core::mem::transmute(AtomicOpRoutingSupported) - }; - AtomicOpRoutingSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let AtomicOpCompleterSupported32Bit: u32 = unsafe { - ::core::mem::transmute(AtomicOpCompleterSupported32Bit) - }; - AtomicOpCompleterSupported32Bit as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let AtomicOpCompleterSupported64Bit: u32 = unsafe { - ::core::mem::transmute(AtomicOpCompleterSupported64Bit) - }; - AtomicOpCompleterSupported64Bit as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let CASCompleterSupported128Bit: u32 = unsafe { - ::core::mem::transmute(CASCompleterSupported128Bit) - }; - CASCompleterSupported128Bit as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let NoROEnabledPRPRPassing: u32 = unsafe { - ::core::mem::transmute(NoROEnabledPRPRPassing) - }; - NoROEnabledPRPRPassing as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let LTRMechanismSupported: u32 = unsafe { - ::core::mem::transmute(LTRMechanismSupported) - }; - LTRMechanismSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 2u8, - { - let TPHCompleterSupported: u32 = unsafe { - ::core::mem::transmute(TPHCompleterSupported) - }; - TPHCompleterSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 4u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 2u8, - { - let OBFFSupported: u32 = unsafe { - ::core::mem::transmute(OBFFSupported) - }; - OBFFSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 1u8, - { - let ExtendedFmtFieldSuported: u32 = unsafe { - ::core::mem::transmute(ExtendedFmtFieldSuported) - }; - ExtendedFmtFieldSuported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 1u8, - { - let EndEndTLPPrefixSupported: u32 = unsafe { - ::core::mem::transmute(EndEndTLPPrefixSupported) - }; - EndEndTLPPrefixSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 2u8, - { - let MaxEndEndTLPPrefixes: u32 = unsafe { - ::core::mem::transmute(MaxEndEndTLPPrefixes) - }; - MaxEndEndTLPPrefixes as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER = _PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER; -pub type PPCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER = *mut _PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CompletionTimeoutValue(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u16) } - } - #[inline] - pub fn set_CompletionTimeoutValue(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn CompletionTimeoutDisable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_CompletionTimeoutDisable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn AriForwardingEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_AriForwardingEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn AtomicOpRequesterEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set_AtomicOpRequesterEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn AtomicOpEgresBlocking(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } - } - #[inline] - pub fn set_AtomicOpEgresBlocking(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn IDORequestEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } - } - #[inline] - pub fn set_IDORequestEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn IDOCompletionEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } - } - #[inline] - pub fn set_IDOCompletionEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn LTRMechanismEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } - } - #[inline] - pub fn set_LTRMechanismEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 2u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 2u8, val as u64) - } - } - #[inline] - pub fn OBFFEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 2u8) as u16) } - } - #[inline] - pub fn set_OBFFEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 2u8, val as u64) - } - } - #[inline] - pub fn EndEndTLPPrefixBlocking(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } - } - #[inline] - pub fn set_EndEndTLPPrefixBlocking(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CompletionTimeoutValue: USHORT, - CompletionTimeoutDisable: USHORT, - AriForwardingEnable: USHORT, - AtomicOpRequesterEnable: USHORT, - AtomicOpEgresBlocking: USHORT, - IDORequestEnable: USHORT, - IDOCompletionEnable: USHORT, - LTRMechanismEnable: USHORT, - Rsvd: USHORT, - OBFFEnable: USHORT, - EndEndTLPPrefixBlocking: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let CompletionTimeoutValue: u16 = unsafe { - ::core::mem::transmute(CompletionTimeoutValue) - }; - CompletionTimeoutValue as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let CompletionTimeoutDisable: u16 = unsafe { - ::core::mem::transmute(CompletionTimeoutDisable) - }; - CompletionTimeoutDisable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let AriForwardingEnable: u16 = unsafe { - ::core::mem::transmute(AriForwardingEnable) - }; - AriForwardingEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let AtomicOpRequesterEnable: u16 = unsafe { - ::core::mem::transmute(AtomicOpRequesterEnable) - }; - AtomicOpRequesterEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let AtomicOpEgresBlocking: u16 = unsafe { - ::core::mem::transmute(AtomicOpEgresBlocking) - }; - AtomicOpEgresBlocking as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let IDORequestEnable: u16 = unsafe { - ::core::mem::transmute(IDORequestEnable) - }; - IDORequestEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let IDOCompletionEnable: u16 = unsafe { - ::core::mem::transmute(IDOCompletionEnable) - }; - IDOCompletionEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let LTRMechanismEnable: u16 = unsafe { - ::core::mem::transmute(LTRMechanismEnable) - }; - LTRMechanismEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 2u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 2u8, - { - let OBFFEnable: u16 = unsafe { ::core::mem::transmute(OBFFEnable) }; - OBFFEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let EndEndTLPPrefixBlocking: u16 = unsafe { - ::core::mem::transmute(EndEndTLPPrefixBlocking) - }; - EndEndTLPPrefixBlocking as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER = _PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER; -pub type PPCI_EXPRESS_DEVICE_CONTROL_2_REGISTER = *mut _PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DEVICE_STATUS_2_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DEVICE_STATUS_2_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DEVICE_STATUS_2_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DEVICE_STATUS_2_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DEVICE_STATUS_2_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DEVICE_STATUS_2_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DEVICE_STATUS_2_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DEVICE_STATUS_2_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DEVICE_STATUS_2_REGISTER__bindgen_ty_1 { - #[inline] - pub fn Rsvd(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u16) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1(Rsvd: USHORT) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 16u8, - { - let Rsvd: u16 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DEVICE_STATUS_2_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DEVICE_STATUS_2_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DEVICE_STATUS_2_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DEVICE_STATUS_2_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DEVICE_STATUS_2_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DEVICE_STATUS_2_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DEVICE_STATUS_2_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_DEVICE_STATUS_2_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DEVICE_STATUS_2_REGISTER = _PCI_EXPRESS_DEVICE_STATUS_2_REGISTER; -pub type PPCI_EXPRESS_DEVICE_STATUS_2_REGISTER = *mut _PCI_EXPRESS_DEVICE_STATUS_2_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER__bindgen_ty_1 { - #[inline] - pub fn Rsvd0(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_Rsvd0(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn SupportedLinkSpeedsVector(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 7u8) as u32) } - } - #[inline] - pub fn set_SupportedLinkSpeedsVector(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 7u8, val as u64) - } - } - #[inline] - pub fn Rsvd8_31(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 24u8) as u32) } - } - #[inline] - pub fn set_Rsvd8_31(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 24u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Rsvd0: ULONG, - SupportedLinkSpeedsVector: ULONG, - Rsvd8_31: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Rsvd0: u32 = unsafe { ::core::mem::transmute(Rsvd0) }; - Rsvd0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 7u8, - { - let SupportedLinkSpeedsVector: u32 = unsafe { - ::core::mem::transmute(SupportedLinkSpeedsVector) - }; - SupportedLinkSpeedsVector as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 24u8, - { - let Rsvd8_31: u32 = unsafe { ::core::mem::transmute(Rsvd8_31) }; - Rsvd8_31 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER = _PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER; -pub type PPCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER = *mut _PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_LINK_CONTROL_2_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_LINK_CONTROL_2_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_LINK_CONTROL_2_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_CONTROL_2_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_CONTROL_2_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_LINK_CONTROL_2_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_CONTROL_2_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_LINK_CONTROL_2_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_LINK_CONTROL_2_REGISTER__bindgen_ty_1 { - #[inline] - pub fn TargetLinkSpeed(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u16) } - } - #[inline] - pub fn set_TargetLinkSpeed(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn Rsvd4_15(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 12u8) as u16) } - } - #[inline] - pub fn set_Rsvd4_15(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 12u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TargetLinkSpeed: USHORT, - Rsvd4_15: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let TargetLinkSpeed: u16 = unsafe { - ::core::mem::transmute(TargetLinkSpeed) - }; - TargetLinkSpeed as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 12u8, - { - let Rsvd4_15: u16 = unsafe { ::core::mem::transmute(Rsvd4_15) }; - Rsvd4_15 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_CONTROL_2_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_LINK_CONTROL_2_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_CONTROL_2_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_LINK_CONTROL_2_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_CONTROL_2_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_LINK_CONTROL_2_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_CONTROL_2_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_LINK_CONTROL_2_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_LINK_CONTROL_2_REGISTER = _PCI_EXPRESS_LINK_CONTROL_2_REGISTER; -pub type PPCI_EXPRESS_LINK_CONTROL_2_REGISTER = *mut _PCI_EXPRESS_LINK_CONTROL_2_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_LINK_STATUS_2_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_LINK_STATUS_2_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_LINK_STATUS_2_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_STATUS_2_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_STATUS_2_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_LINK_STATUS_2_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_STATUS_2_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_LINK_STATUS_2_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_LINK_STATUS_2_REGISTER__bindgen_ty_1 { - #[inline] - pub fn Rsvd0_15(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u16) } - } - #[inline] - pub fn set_Rsvd0_15(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1(Rsvd0_15: USHORT) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 16u8, - { - let Rsvd0_15: u16 = unsafe { ::core::mem::transmute(Rsvd0_15) }; - Rsvd0_15 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_STATUS_2_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_LINK_STATUS_2_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_STATUS_2_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_LINK_STATUS_2_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_STATUS_2_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_LINK_STATUS_2_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_STATUS_2_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_LINK_STATUS_2_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_LINK_STATUS_2_REGISTER = _PCI_EXPRESS_LINK_STATUS_2_REGISTER; -pub type PPCI_EXPRESS_LINK_STATUS_2_REGISTER = *mut _PCI_EXPRESS_LINK_STATUS_2_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_CAPABILITY { - pub Header: PCI_CAPABILITIES_HEADER, - pub ExpressCapabilities: PCI_EXPRESS_CAPABILITIES_REGISTER, - pub DeviceCapabilities: PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER, - pub DeviceControl: PCI_EXPRESS_DEVICE_CONTROL_REGISTER, - pub DeviceStatus: PCI_EXPRESS_DEVICE_STATUS_REGISTER, - pub LinkCapabilities: PCI_EXPRESS_LINK_CAPABILITIES_REGISTER, - pub LinkControl: PCI_EXPRESS_LINK_CONTROL_REGISTER, - pub LinkStatus: PCI_EXPRESS_LINK_STATUS_REGISTER, - pub SlotCapabilities: PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER, - pub SlotControl: PCI_EXPRESS_SLOT_CONTROL_REGISTER, - pub SlotStatus: PCI_EXPRESS_SLOT_STATUS_REGISTER, - pub RootControl: PCI_EXPRESS_ROOT_CONTROL_REGISTER, - pub RootCapabilities: PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER, - pub RootStatus: PCI_EXPRESS_ROOT_STATUS_REGISTER, - pub DeviceCapabilities2: PCI_EXPRESS_DEVICE_CAPABILITIES_2_REGISTER, - pub DeviceControl2: PCI_EXPRESS_DEVICE_CONTROL_2_REGISTER, - pub DeviceStatus2: PCI_EXPRESS_DEVICE_STATUS_2_REGISTER, - pub LinkCapabilities2: PCI_EXPRESS_LINK_CAPABILITIES_2_REGISTER, - pub LinkControl2: PCI_EXPRESS_LINK_CONTROL_2_REGISTER, - pub LinkStatus2: PCI_EXPRESS_LINK_STATUS_2_REGISTER, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CAPABILITY>(), - 52usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExpressCapabilities) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(ExpressCapabilities), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceCapabilities) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(DeviceCapabilities), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceControl) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(DeviceControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceStatus) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(DeviceStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LinkCapabilities) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(LinkCapabilities), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LinkControl) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(LinkControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LinkStatus) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(LinkStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SlotCapabilities) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(SlotCapabilities), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SlotControl) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(SlotControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SlotStatus) as usize - ptr as usize }, - 26usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(SlotStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootControl) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(RootControl), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RootCapabilities) as usize - ptr as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(RootCapabilities), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootStatus) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(RootStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceCapabilities2) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(DeviceCapabilities2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceControl2) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(DeviceControl2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceStatus2) as usize - ptr as usize }, - 42usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(DeviceStatus2), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LinkCapabilities2) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(LinkCapabilities2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LinkControl2) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(LinkControl2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LinkStatus2) as usize - ptr as usize }, - 50usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CAPABILITY), - "::", - stringify!(LinkStatus2), - ), - ); -} -impl Default for _PCI_EXPRESS_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_CAPABILITY = _PCI_EXPRESS_CAPABILITY; -pub type PPCI_EXPRESS_CAPABILITY = *mut _PCI_EXPRESS_CAPABILITY; -pub mod PCI_EXPRESS_MRL_STATE { - pub type Type = ::core::ffi::c_int; - pub const MRLClosed: Type = 0; - pub const MRLOpen: Type = 1; -} -pub mod PCI_EXPRESS_CARD_PRESENCE { - pub type Type = ::core::ffi::c_int; - pub const SlotEmpty: Type = 0; - pub const CardPresent: Type = 1; -} -pub mod PCI_EXPRESS_INDICATOR_STATE { - pub type Type = ::core::ffi::c_int; - pub const IndicatorOn: Type = 1; - pub const IndicatorBlink: Type = 2; - pub const IndicatorOff: Type = 3; -} -pub mod PCI_EXPRESS_POWER_STATE { - pub type Type = ::core::ffi::c_int; - pub const PowerOn: Type = 0; - pub const PowerOff: Type = 1; -} -pub mod PCI_EXPRESS_ASPM_SUPPORT { - pub type Type = ::core::ffi::c_int; - pub const NoAspmSupport: Type = 0; - pub const L0sEntrySupport: Type = 1; - pub const L1EntrySupport: Type = 2; - pub const L0sAndL1EntrySupport: Type = 3; -} -pub mod PCI_EXPRESS_ASPM_CONTROL { - pub type Type = ::core::ffi::c_int; - pub const L0sAndL1EntryDisabled: Type = 0; - pub const L0sEntryEnabled: Type = 1; - pub const L1EntryEnabled: Type = 2; - pub const L0sAndL1EntryEnabled: Type = 3; -} -pub mod PCI_EXPRESS_L0s_EXIT_LATENCY { - pub type Type = ::core::ffi::c_int; - pub const L0s_Below64ns: Type = 0; - pub const L0s_64ns_128ns: Type = 1; - pub const L0s_128ns_256ns: Type = 2; - pub const L0s_256ns_512ns: Type = 3; - pub const L0s_512ns_1us: Type = 4; - pub const L0s_1us_2us: Type = 5; - pub const L0s_2us_4us: Type = 6; - pub const L0s_Above4us: Type = 7; -} -pub mod PCI_EXPRESS_L1_EXIT_LATENCY { - pub type Type = ::core::ffi::c_int; - pub const L1_Below1us: Type = 0; - pub const L1_1us_2us: Type = 1; - pub const L1_2us_4us: Type = 2; - pub const L1_4us_8us: Type = 3; - pub const L1_8us_16us: Type = 4; - pub const L1_16us_32us: Type = 5; - pub const L1_32us_64us: Type = 6; - pub const L1_Above64us: Type = 7; -} -pub mod PCI_EXPRESS_RCB { - pub type Type = ::core::ffi::c_int; - pub const RCB64Bytes: Type = 0; - pub const RCB128Bytes: Type = 1; -} -pub mod PCI_EXPRESS_LINK_SUBSTATE { - pub type Type = ::core::ffi::c_int; - pub const PciExpressPciPmLinkSubState_L11_BitIndex: Type = 0; - pub const PciExpressPciPmLinkSubState_L12_BitIndex: Type = 1; - pub const PciExpressASPMLinkSubState_L11_BitIndex: Type = 2; - pub const PciExpressASPMLinkSubState_L12_BitIndex: Type = 3; -} -pub mod PCI_DEVICE_D3COLD_STATE_REASON { - pub type Type = ::core::ffi::c_int; - pub const PciDeviceD3Cold_State_Disabled_BitIndex: Type = 1; - pub const PciDeviceD3Cold_State_Enabled_BitIndex: Type = 2; - pub const PciDeviceD3Cold_State_ParentRootPortS0WakeSupported_BitIndex: Type = 3; - pub const PciDeviceD3Cold_State_Disabled_Bridge_HackFlags_BitIndex: Type = 4; - pub const PciDeviceD3Cold_Reason_Default_State_BitIndex: Type = 8; - pub const PciDeviceD3Cold_Reason_INF_BitIndex: Type = 9; - pub const PciDeviceD3Cold_Reason_Interface_Api_BitIndex: Type = 10; -} -pub mod PCI_EXPRESS_DEVICE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const PciExpressEndpoint: Type = 0; - pub const PciExpressLegacyEndpoint: Type = 1; - pub const PciExpressRootPort: Type = 4; - pub const PciExpressUpstreamSwitchPort: Type = 5; - pub const PciExpressDownstreamSwitchPort: Type = 6; - pub const PciExpressToPciXBridge: Type = 7; - pub const PciXToExpressBridge: Type = 8; - pub const PciExpressRootComplexIntegratedEndpoint: Type = 9; - pub const PciExpressRootComplexEventCollector: Type = 10; -} -pub mod PCI_EXPRESS_MAX_PAYLOAD_SIZE { - pub type Type = ::core::ffi::c_int; - pub const MaxPayload128Bytes: Type = 0; - pub const MaxPayload256Bytes: Type = 1; - pub const MaxPayload512Bytes: Type = 2; - pub const MaxPayload1024Bytes: Type = 3; - pub const MaxPayload2048Bytes: Type = 4; - pub const MaxPayload4096Bytes: Type = 5; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_PME_REQUESTOR_ID { - pub __bindgen_anon_1: _PCI_EXPRESS_PME_REQUESTOR_ID__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_PME_REQUESTOR_ID__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PME_REQUESTOR_ID__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PME_REQUESTOR_ID__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PME_REQUESTOR_ID__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PME_REQUESTOR_ID__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_PME_REQUESTOR_ID__bindgen_ty_1)), - ); -} -impl _PCI_EXPRESS_PME_REQUESTOR_ID__bindgen_ty_1 { - #[inline] - pub fn FunctionNumber(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u16) } - } - #[inline] - pub fn set_FunctionNumber(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn DeviceNumber(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u16) } - } - #[inline] - pub fn set_DeviceNumber(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn BusNumber(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u16) } - } - #[inline] - pub fn set_BusNumber(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - FunctionNumber: USHORT, - DeviceNumber: USHORT, - BusNumber: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let FunctionNumber: u16 = unsafe { - ::core::mem::transmute(FunctionNumber) - }; - FunctionNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let DeviceNumber: u16 = unsafe { - ::core::mem::transmute(DeviceNumber) - }; - DeviceNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let BusNumber: u16 = unsafe { ::core::mem::transmute(BusNumber) }; - BusNumber as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_PME_REQUESTOR_ID() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_PME_REQUESTOR_ID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_PME_REQUESTOR_ID>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_PME_REQUESTOR_ID)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_PME_REQUESTOR_ID>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_PME_REQUESTOR_ID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_PME_REQUESTOR_ID), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_PME_REQUESTOR_ID { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_PME_REQUESTOR_ID = _PCI_EXPRESS_PME_REQUESTOR_ID; -pub type PPCI_EXPRESS_PME_REQUESTOR_ID = *mut _PCI_EXPRESS_PME_REQUESTOR_ID; -pub type PciPin2Line = ::core::option::Option< - unsafe extern "C" fn( - BusHandler: *mut _BUS_HANDLER, - RootHandler: *mut _BUS_HANDLER, - SlotNumber: PCI_SLOT_NUMBER, - PciData: PPCI_COMMON_CONFIG, - ), ->; -pub type PciLine2Pin = ::core::option::Option< - unsafe extern "C" fn( - BusHandler: *mut _BUS_HANDLER, - RootHandler: *mut _BUS_HANDLER, - SlotNumber: PCI_SLOT_NUMBER, - PciNewData: PPCI_COMMON_CONFIG, - PciOldData: PPCI_COMMON_CONFIG, - ), ->; -pub type PciReadWriteConfig = ::core::option::Option< - unsafe extern "C" fn( - BusHandler: *mut _BUS_HANDLER, - Slot: PCI_SLOT_NUMBER, - Buffer: PVOID, - Offset: ULONG, - Length: ULONG, - ), ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCIBUSDATA { - pub Tag: ULONG, - pub Version: ULONG, - pub ReadConfig: PciReadWriteConfig, - pub WriteConfig: PciReadWriteConfig, - pub Pin2Line: PciPin2Line, - pub Line2Pin: PciLine2Pin, - pub ParentSlot: PCI_SLOT_NUMBER, - pub Reserved: [PVOID; 4usize], -} -#[test] -fn bindgen_test_layout__PCIBUSDATA() { - const UNINIT: ::core::mem::MaybeUninit<_PCIBUSDATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCIBUSDATA>(), - 80usize, - concat!("Size of: ", stringify!(_PCIBUSDATA)), - ); - assert_eq!( - ::core::mem::align_of::<_PCIBUSDATA>(), - 8usize, - concat!("Alignment of ", stringify!(_PCIBUSDATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Tag) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_PCIBUSDATA), "::", stringify!(Tag)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_PCIBUSDATA), "::", stringify!(Version)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadConfig) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCIBUSDATA), - "::", - stringify!(ReadConfig), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WriteConfig) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCIBUSDATA), - "::", - stringify!(WriteConfig), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Pin2Line) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_PCIBUSDATA), "::", stringify!(Pin2Line)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Line2Pin) as usize - ptr as usize }, - 32usize, - concat!("Offset of field: ", stringify!(_PCIBUSDATA), "::", stringify!(Line2Pin)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParentSlot) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCIBUSDATA), - "::", - stringify!(ParentSlot), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 48usize, - concat!("Offset of field: ", stringify!(_PCIBUSDATA), "::", stringify!(Reserved)), - ); -} -impl Default for _PCIBUSDATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCIBUSDATA = _PCIBUSDATA; -pub type PPCIBUSDATA = *mut _PCIBUSDATA; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER__bindgen_ty_1 { - #[inline] - pub fn MaxSnoopLatencyValue(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 10u8) as u32) } - } - #[inline] - pub fn set_MaxSnoopLatencyValue(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 10u8, val as u64) - } - } - #[inline] - pub fn MaxSnoopLatencyScale(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 3u8) as u32) } - } - #[inline] - pub fn set_MaxSnoopLatencyScale(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 3u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 2u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 2u8, val as u64) - } - } - #[inline] - pub fn MaxSnoopRequirement(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } - } - #[inline] - pub fn set_MaxSnoopRequirement(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn MaxNoSnoopLatencyValue(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 10u8) as u32) } - } - #[inline] - pub fn set_MaxNoSnoopLatencyValue(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 10u8, val as u64) - } - } - #[inline] - pub fn MaxNoSnoopLatencyScale(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 3u8) as u32) } - } - #[inline] - pub fn set_MaxNoSnoopLatencyScale(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(26usize, 3u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 2u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(29usize, 2u8, val as u64) - } - } - #[inline] - pub fn MaxNoSnoopRequirement(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_MaxNoSnoopRequirement(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MaxSnoopLatencyValue: ULONG, - MaxSnoopLatencyScale: ULONG, - Rsvd: ULONG, - MaxSnoopRequirement: ULONG, - MaxNoSnoopLatencyValue: ULONG, - MaxNoSnoopLatencyScale: ULONG, - Rsvd2: ULONG, - MaxNoSnoopRequirement: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 10u8, - { - let MaxSnoopLatencyValue: u32 = unsafe { - ::core::mem::transmute(MaxSnoopLatencyValue) - }; - MaxSnoopLatencyValue as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 3u8, - { - let MaxSnoopLatencyScale: u32 = unsafe { - ::core::mem::transmute(MaxSnoopLatencyScale) - }; - MaxSnoopLatencyScale as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 2u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let MaxSnoopRequirement: u32 = unsafe { - ::core::mem::transmute(MaxSnoopRequirement) - }; - MaxSnoopRequirement as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 10u8, - { - let MaxNoSnoopLatencyValue: u32 = unsafe { - ::core::mem::transmute(MaxNoSnoopLatencyValue) - }; - MaxNoSnoopLatencyValue as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 26usize, - 3u8, - { - let MaxNoSnoopLatencyScale: u32 = unsafe { - ::core::mem::transmute(MaxNoSnoopLatencyScale) - }; - MaxNoSnoopLatencyScale as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 29usize, - 2u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 31usize, - 1u8, - { - let MaxNoSnoopRequirement: u32 = unsafe { - ::core::mem::transmute(MaxNoSnoopRequirement) - }; - MaxNoSnoopRequirement as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER = _PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER; -pub type PPCI_EXPRESS_LTR_MAX_LATENCY_REGISTER = *mut _PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_LTR_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub Latency: PCI_EXPRESS_LTR_MAX_LATENCY_REGISTER, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LTR_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_LTR_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LTR_CAPABILITY>(), - 8usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_LTR_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LTR_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_LTR_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LTR_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Latency) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LTR_CAPABILITY), - "::", - stringify!(Latency), - ), - ); -} -impl Default for _PCI_EXPRESS_LTR_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_LTR_CAPABILITY = _PCI_EXPRESS_LTR_CAPABILITY; -pub type PPCI_EXPRESS_LTR_CAPABILITY = *mut _PCI_EXPRESS_LTR_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER__bindgen_ty_1 { - #[inline] - pub fn NoStModeSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_NoStModeSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn InteruptVectorModeSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_InteruptVectorModeSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn DeviceSpecificModeSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_DeviceSpecificModeSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn ExtendedTPHRequesterSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_ExtendedTPHRequesterSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn StTableLocation(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u32) } - } - #[inline] - pub fn set_StTableLocation(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 2u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 5u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 5u8, val as u64) - } - } - #[inline] - pub fn StTableSize(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 11u8) as u32) } - } - #[inline] - pub fn set_StTableSize(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 11u8, val as u64) - } - } - #[inline] - pub fn Rsvd3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 5u8) as u32) } - } - #[inline] - pub fn set_Rsvd3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(27usize, 5u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - NoStModeSupported: ULONG, - InteruptVectorModeSupported: ULONG, - DeviceSpecificModeSupported: ULONG, - Rsvd: ULONG, - ExtendedTPHRequesterSupported: ULONG, - StTableLocation: ULONG, - Rsvd2: ULONG, - StTableSize: ULONG, - Rsvd3: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let NoStModeSupported: u32 = unsafe { - ::core::mem::transmute(NoStModeSupported) - }; - NoStModeSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let InteruptVectorModeSupported: u32 = unsafe { - ::core::mem::transmute(InteruptVectorModeSupported) - }; - InteruptVectorModeSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let DeviceSpecificModeSupported: u32 = unsafe { - ::core::mem::transmute(DeviceSpecificModeSupported) - }; - DeviceSpecificModeSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let ExtendedTPHRequesterSupported: u32 = unsafe { - ::core::mem::transmute(ExtendedTPHRequesterSupported) - }; - ExtendedTPHRequesterSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 2u8, - { - let StTableLocation: u32 = unsafe { - ::core::mem::transmute(StTableLocation) - }; - StTableLocation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 5u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 11u8, - { - let StTableSize: u32 = unsafe { - ::core::mem::transmute(StTableSize) - }; - StTableSize as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 27usize, - 5u8, - { - let Rsvd3: u32 = unsafe { ::core::mem::transmute(Rsvd3) }; - Rsvd3 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER = _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER; -pub type PPCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER = *mut _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn StModeSelect(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u32) } - } - #[inline] - pub fn set_StModeSelect(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn TphRequesterEnable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u32) } - } - #[inline] - pub fn set_TphRequesterEnable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 2u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 22u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 22u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - StModeSelect: ULONG, - Rsvd: ULONG, - TphRequesterEnable: ULONG, - Rsvd2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let StModeSelect: u32 = unsafe { - ::core::mem::transmute(StModeSelect) - }; - StModeSelect as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 2u8, - { - let TphRequesterEnable: u32 = unsafe { - ::core::mem::transmute(TphRequesterEnable) - }; - TphRequesterEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 22u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER = _PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER; -pub type PPCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER = *mut _PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_TPH_ST_TABLE_ENTRY { - pub __bindgen_anon_1: _PCI_EXPRESS_TPH_ST_TABLE_ENTRY__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_TPH_ST_TABLE_ENTRY__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_TPH_ST_TABLE_ENTRY__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_TPH_ST_TABLE_ENTRY__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_TPH_ST_TABLE_ENTRY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_TPH_ST_TABLE_ENTRY__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_TPH_ST_TABLE_ENTRY__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_TPH_ST_TABLE_ENTRY__bindgen_ty_1 { - #[inline] - pub fn LowerEntry(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u16) } - } - #[inline] - pub fn set_LowerEntry(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn UpperEntry(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u16) } - } - #[inline] - pub fn set_UpperEntry(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - LowerEntry: USHORT, - UpperEntry: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let LowerEntry: u16 = unsafe { ::core::mem::transmute(LowerEntry) }; - LowerEntry as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let UpperEntry: u16 = unsafe { ::core::mem::transmute(UpperEntry) }; - UpperEntry as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_TPH_ST_TABLE_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_TPH_ST_TABLE_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_TPH_ST_TABLE_ENTRY>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_TPH_ST_TABLE_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_TPH_ST_TABLE_ENTRY>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_TPH_ST_TABLE_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_TPH_ST_TABLE_ENTRY), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_TPH_ST_TABLE_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_TPH_ST_TABLE_ENTRY = _PCI_EXPRESS_TPH_ST_TABLE_ENTRY; -pub type PPCI_EXPRESS_TPH_ST_TABLE_ENTRY = *mut _PCI_EXPRESS_TPH_ST_TABLE_ENTRY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub RequesterCapability: PCI_EXPRESS_TPH_REQUESTER_CAPABILITY_REGISTER, - pub RequesterControl: PCI_EXPRESS_TPH_REQUESTER_CONTROL_REGISTER, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_TPH_REQUESTER_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY>(), - 12usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RequesterCapability) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY), - "::", - stringify!(RequesterCapability), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RequesterControl) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_TPH_REQUESTER_CAPABILITY), - "::", - stringify!(RequesterControl), - ), - ); -} -impl Default for _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_TPH_REQUESTER_CAPABILITY = _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY; -pub type PPCI_EXPRESS_TPH_REQUESTER_CAPABILITY = *mut _PCI_EXPRESS_TPH_REQUESTER_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER__bindgen_ty_1 { - #[inline] - pub fn PciPmL12Supported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_PciPmL12Supported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn PciPmL11Supported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_PciPmL11Supported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn AspmL12Supported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_AspmL12Supported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AspmL11Supported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_AspmL11Supported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn L1PmSsSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_L1PmSsSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 3u8, val as u64) - } - } - #[inline] - pub fn PortCommonModeRestoreTime(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_PortCommonModeRestoreTime(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn PortTPowerOnScale(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u32) } - } - #[inline] - pub fn set_PortTPowerOnScale(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 2u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn PortTPowerOnValue(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 5u8) as u32) } - } - #[inline] - pub fn set_PortTPowerOnValue(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 5u8, val as u64) - } - } - #[inline] - pub fn Rsvd3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_Rsvd3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PciPmL12Supported: ULONG, - PciPmL11Supported: ULONG, - AspmL12Supported: ULONG, - AspmL11Supported: ULONG, - L1PmSsSupported: ULONG, - Rsvd: ULONG, - PortCommonModeRestoreTime: ULONG, - PortTPowerOnScale: ULONG, - Rsvd2: ULONG, - PortTPowerOnValue: ULONG, - Rsvd3: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let PciPmL12Supported: u32 = unsafe { - ::core::mem::transmute(PciPmL12Supported) - }; - PciPmL12Supported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let PciPmL11Supported: u32 = unsafe { - ::core::mem::transmute(PciPmL11Supported) - }; - PciPmL11Supported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let AspmL12Supported: u32 = unsafe { - ::core::mem::transmute(AspmL12Supported) - }; - AspmL12Supported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AspmL11Supported: u32 = unsafe { - ::core::mem::transmute(AspmL11Supported) - }; - AspmL11Supported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let L1PmSsSupported: u32 = unsafe { - ::core::mem::transmute(L1PmSsSupported) - }; - L1PmSsSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 3u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let PortCommonModeRestoreTime: u32 = unsafe { - ::core::mem::transmute(PortCommonModeRestoreTime) - }; - PortCommonModeRestoreTime as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 2u8, - { - let PortTPowerOnScale: u32 = unsafe { - ::core::mem::transmute(PortTPowerOnScale) - }; - PortTPowerOnScale as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 5u8, - { - let PortTPowerOnValue: u32 = unsafe { - ::core::mem::transmute(PortTPowerOnValue) - }; - PortTPowerOnValue as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let Rsvd3: u32 = unsafe { ::core::mem::transmute(Rsvd3) }; - Rsvd3 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER = _PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER; -pub type PPCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER = *mut _PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER__bindgen_ty_1 { - #[inline] - pub fn PciPmL12Enabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_PciPmL12Enabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn PciPmL11Enabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_PciPmL11Enabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn AspmL12Enabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_AspmL12Enabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AspmL11Enabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_AspmL11Enabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 4u8, val as u64) - } - } - #[inline] - pub fn CommonModeRestoreTime(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_CommonModeRestoreTime(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn LtrL12ThresholdValue(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 10u8) as u32) } - } - #[inline] - pub fn set_LtrL12ThresholdValue(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 10u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 3u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(26usize, 3u8, val as u64) - } - } - #[inline] - pub fn LtrL12ThresholdScale(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 3u8) as u32) } - } - #[inline] - pub fn set_LtrL12ThresholdScale(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(29usize, 3u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PciPmL12Enabled: ULONG, - PciPmL11Enabled: ULONG, - AspmL12Enabled: ULONG, - AspmL11Enabled: ULONG, - Rsvd: ULONG, - CommonModeRestoreTime: ULONG, - LtrL12ThresholdValue: ULONG, - Rsvd2: ULONG, - LtrL12ThresholdScale: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let PciPmL12Enabled: u32 = unsafe { - ::core::mem::transmute(PciPmL12Enabled) - }; - PciPmL12Enabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let PciPmL11Enabled: u32 = unsafe { - ::core::mem::transmute(PciPmL11Enabled) - }; - PciPmL11Enabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let AspmL12Enabled: u32 = unsafe { - ::core::mem::transmute(AspmL12Enabled) - }; - AspmL12Enabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AspmL11Enabled: u32 = unsafe { - ::core::mem::transmute(AspmL11Enabled) - }; - AspmL11Enabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 4u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let CommonModeRestoreTime: u32 = unsafe { - ::core::mem::transmute(CommonModeRestoreTime) - }; - CommonModeRestoreTime as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 10u8, - { - let LtrL12ThresholdValue: u32 = unsafe { - ::core::mem::transmute(LtrL12ThresholdValue) - }; - LtrL12ThresholdValue as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 26usize, - 3u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 29usize, - 3u8, - { - let LtrL12ThresholdScale: u32 = unsafe { - ::core::mem::transmute(LtrL12ThresholdScale) - }; - LtrL12ThresholdScale as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER = _PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER; -pub type PPCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER = *mut _PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER__bindgen_ty_1 { - #[inline] - pub fn TPowerOnScale(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } - } - #[inline] - pub fn set_TPowerOnScale(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 2u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn TPowerOnValue(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) } - } - #[inline] - pub fn set_TPowerOnValue(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 24u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 24u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TPowerOnScale: ULONG, - Rsvd: ULONG, - TPowerOnValue: ULONG, - Rsvd2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 2u8, - { - let TPowerOnScale: u32 = unsafe { - ::core::mem::transmute(TPowerOnScale) - }; - TPowerOnScale as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let TPowerOnValue: u32 = unsafe { - ::core::mem::transmute(TPowerOnValue) - }; - TPowerOnValue as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 24u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER = _PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER; -pub type PPCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER = *mut _PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_L1_PM_SS_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub L1PmSsCapabilities: PCI_EXPRESS_L1_PM_SS_CAPABILITIES_REGISTER, - pub L1PmSsControl1: PCI_EXPRESS_L1_PM_SS_CONTROL_1_REGISTER, - pub L1PmSsControl2: PCI_EXPRESS_L1_PM_SS_CONTROL_2_REGISTER, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_L1_PM_SS_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_L1_PM_SS_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_L1_PM_SS_CAPABILITY>(), - 16usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_L1_PM_SS_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_L1_PM_SS_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_L1_PM_SS_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_L1_PM_SS_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).L1PmSsCapabilities) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_L1_PM_SS_CAPABILITY), - "::", - stringify!(L1PmSsCapabilities), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).L1PmSsControl1) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_L1_PM_SS_CAPABILITY), - "::", - stringify!(L1PmSsControl1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).L1PmSsControl2) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_L1_PM_SS_CAPABILITY), - "::", - stringify!(L1PmSsControl2), - ), - ); -} -impl Default for _PCI_EXPRESS_L1_PM_SS_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_L1_PM_SS_CAPABILITY = _PCI_EXPRESS_L1_PM_SS_CAPABILITY; -pub type PPCI_EXPRESS_L1_PM_SS_CAPABILITY = *mut _PCI_EXPRESS_L1_PM_SS_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DPC_CAPS_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DPC_CAPS_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DPC_CAPS_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_CAPS_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_CAPS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_CAPS_REGISTER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_CAPS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DPC_CAPS_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DPC_CAPS_REGISTER__bindgen_ty_1 { - #[inline] - pub fn InterruptMsgNumber(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u16) } - } - #[inline] - pub fn set_InterruptMsgNumber(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 5u8, val as u64) - } - } - #[inline] - pub fn RpExtensionsForDpc(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_RpExtensionsForDpc(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn PoisonedTlpEgressBlockingSupported(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set_PoisonedTlpEgressBlockingSupported(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn DpcSoftwareTriggeringSupported(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } - } - #[inline] - pub fn set_DpcSoftwareTriggeringSupported(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn RpPioLogSize(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 4u8) as u16) } - } - #[inline] - pub fn set_RpPioLogSize(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 4u8, val as u64) - } - } - #[inline] - pub fn DlActiveErrCorSignalingSupported(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } - } - #[inline] - pub fn set_DlActiveErrCorSignalingSupported(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 3u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - InterruptMsgNumber: USHORT, - RpExtensionsForDpc: USHORT, - PoisonedTlpEgressBlockingSupported: USHORT, - DpcSoftwareTriggeringSupported: USHORT, - RpPioLogSize: USHORT, - DlActiveErrCorSignalingSupported: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 5u8, - { - let InterruptMsgNumber: u16 = unsafe { - ::core::mem::transmute(InterruptMsgNumber) - }; - InterruptMsgNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let RpExtensionsForDpc: u16 = unsafe { - ::core::mem::transmute(RpExtensionsForDpc) - }; - RpExtensionsForDpc as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let PoisonedTlpEgressBlockingSupported: u16 = unsafe { - ::core::mem::transmute(PoisonedTlpEgressBlockingSupported) - }; - PoisonedTlpEgressBlockingSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let DpcSoftwareTriggeringSupported: u16 = unsafe { - ::core::mem::transmute(DpcSoftwareTriggeringSupported) - }; - DpcSoftwareTriggeringSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 4u8, - { - let RpPioLogSize: u16 = unsafe { - ::core::mem::transmute(RpPioLogSize) - }; - RpPioLogSize as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let DlActiveErrCorSignalingSupported: u16 = unsafe { - ::core::mem::transmute(DlActiveErrCorSignalingSupported) - }; - DlActiveErrCorSignalingSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 3u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_CAPS_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DPC_CAPS_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_CAPS_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_CAPS_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_CAPS_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DPC_CAPS_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPS_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_DPC_CAPS_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DPC_CAPS_REGISTER = _PCI_EXPRESS_DPC_CAPS_REGISTER; -pub type PPCI_EXPRESS_DPC_CAPS_REGISTER = *mut _PCI_EXPRESS_DPC_CAPS_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DPC_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DPC_CONTROL_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DPC_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_CONTROL_REGISTER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DPC_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DPC_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn TriggerEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u16) } - } - #[inline] - pub fn set_TriggerEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 2u8, val as u64) - } - } - #[inline] - pub fn CompletionControl(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_CompletionControl(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn InterruptEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_InterruptEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrCorEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_ErrCorEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn PoisonedTlpEgressBlockingEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_PoisonedTlpEgressBlockingEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn SoftwareTrigger(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set_SoftwareTrigger(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn DlActiveErrCorEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } - } - #[inline] - pub fn set_DlActiveErrCorEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TriggerEnable: USHORT, - CompletionControl: USHORT, - InterruptEnable: USHORT, - ErrCorEnable: USHORT, - PoisonedTlpEgressBlockingEnable: USHORT, - SoftwareTrigger: USHORT, - DlActiveErrCorEnable: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 2u8, - { - let TriggerEnable: u16 = unsafe { - ::core::mem::transmute(TriggerEnable) - }; - TriggerEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let CompletionControl: u16 = unsafe { - ::core::mem::transmute(CompletionControl) - }; - CompletionControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let InterruptEnable: u16 = unsafe { - ::core::mem::transmute(InterruptEnable) - }; - InterruptEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let ErrCorEnable: u16 = unsafe { - ::core::mem::transmute(ErrCorEnable) - }; - ErrCorEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let PoisonedTlpEgressBlockingEnable: u16 = unsafe { - ::core::mem::transmute(PoisonedTlpEgressBlockingEnable) - }; - PoisonedTlpEgressBlockingEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let SoftwareTrigger: u16 = unsafe { - ::core::mem::transmute(SoftwareTrigger) - }; - SoftwareTrigger as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let DlActiveErrCorEnable: u16 = unsafe { - ::core::mem::transmute(DlActiveErrCorEnable) - }; - DlActiveErrCorEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DPC_CONTROL_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_CONTROL_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_CONTROL_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DPC_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CONTROL_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_DPC_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DPC_CONTROL_REGISTER = _PCI_EXPRESS_DPC_CONTROL_REGISTER; -pub type PPCI_EXPRESS_DPC_CONTROL_REGISTER = *mut _PCI_EXPRESS_DPC_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DPC_STATUS_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DPC_STATUS_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DPC_STATUS_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_STATUS_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_STATUS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_STATUS_REGISTER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_STATUS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DPC_STATUS_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DPC_STATUS_REGISTER__bindgen_ty_1 { - #[inline] - pub fn TriggerStatus(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_TriggerStatus(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn TriggerReason(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u16) } - } - #[inline] - pub fn set_TriggerReason(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 2u8, val as u64) - } - } - #[inline] - pub fn InterruptStatus(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_InterruptStatus(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn RpBusy(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_RpBusy(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn TriggerReasonExtension(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 2u8) as u16) } - } - #[inline] - pub fn set_TriggerReasonExtension(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 2u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn PioFirstErrPointer(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 5u8) as u16) } - } - #[inline] - pub fn set_PioFirstErrPointer(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 5u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u16) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 3u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TriggerStatus: USHORT, - TriggerReason: USHORT, - InterruptStatus: USHORT, - RpBusy: USHORT, - TriggerReasonExtension: USHORT, - Reserved1: USHORT, - PioFirstErrPointer: USHORT, - Reserved2: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let TriggerStatus: u16 = unsafe { - ::core::mem::transmute(TriggerStatus) - }; - TriggerStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 2u8, - { - let TriggerReason: u16 = unsafe { - ::core::mem::transmute(TriggerReason) - }; - TriggerReason as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let InterruptStatus: u16 = unsafe { - ::core::mem::transmute(InterruptStatus) - }; - InterruptStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let RpBusy: u16 = unsafe { ::core::mem::transmute(RpBusy) }; - RpBusy as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 2u8, - { - let TriggerReasonExtension: u16 = unsafe { - ::core::mem::transmute(TriggerReasonExtension) - }; - TriggerReasonExtension as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let Reserved1: u16 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 5u8, - { - let PioFirstErrPointer: u16 = unsafe { - ::core::mem::transmute(PioFirstErrPointer) - }; - PioFirstErrPointer as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 3u8, - { - let Reserved2: u16 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_STATUS_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DPC_STATUS_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_STATUS_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_STATUS_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_STATUS_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DPC_STATUS_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_STATUS_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_DPC_STATUS_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DPC_STATUS_REGISTER = _PCI_EXPRESS_DPC_STATUS_REGISTER; -pub type PPCI_EXPRESS_DPC_STATUS_REGISTER = *mut _PCI_EXPRESS_DPC_STATUS_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CfgURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn CfgCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn CfgCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn IoURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 5u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 5u8, val as u64) - } - } - #[inline] - pub fn MemURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 12u8) as u32) } - } - #[inline] - pub fn set_Reserved3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 12u8, val as u64) - } - } - #[inline] - pub fn Reserved4(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_Reserved4(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CfgURCpl: ULONG, - CfgCACpl: ULONG, - CfgCTO: ULONG, - Reserved1: ULONG, - IoURCpl: ULONG, - IoCACpl: ULONG, - IoCTO: ULONG, - Reserved2: ULONG, - MemURCpl: ULONG, - MemCACpl: ULONG, - MemCTO: ULONG, - Reserved3: ULONG, - Reserved4: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CfgURCpl: u32 = unsafe { ::core::mem::transmute(CfgURCpl) }; - CfgURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let CfgCACpl: u32 = unsafe { ::core::mem::transmute(CfgCACpl) }; - CfgCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let CfgCTO: u32 = unsafe { ::core::mem::transmute(CfgCTO) }; - CfgCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let IoURCpl: u32 = unsafe { ::core::mem::transmute(IoURCpl) }; - IoURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let IoCACpl: u32 = unsafe { ::core::mem::transmute(IoCACpl) }; - IoCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let IoCTO: u32 = unsafe { ::core::mem::transmute(IoCTO) }; - IoCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 5u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let MemURCpl: u32 = unsafe { ::core::mem::transmute(MemURCpl) }; - MemURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let MemCACpl: u32 = unsafe { ::core::mem::transmute(MemCACpl) }; - MemCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let MemCTO: u32 = unsafe { ::core::mem::transmute(MemCTO) }; - MemCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 12u8, - { - let Reserved3: u32 = unsafe { ::core::mem::transmute(Reserved3) }; - Reserved3 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 31usize, - 1u8, - { - let Reserved4: u32 = unsafe { ::core::mem::transmute(Reserved4) }; - Reserved4 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER = _PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER; -pub type PPCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER = *mut _PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CfgURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn CfgCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn CfgCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn IoURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 5u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 5u8, val as u64) - } - } - #[inline] - pub fn MemURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 13u8) as u32) } - } - #[inline] - pub fn set_Reserved3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 13u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CfgURCpl: ULONG, - CfgCACpl: ULONG, - CfgCTO: ULONG, - Reserved1: ULONG, - IoURCpl: ULONG, - IoCACpl: ULONG, - IoCTO: ULONG, - Reserved2: ULONG, - MemURCpl: ULONG, - MemCACpl: ULONG, - MemCTO: ULONG, - Reserved3: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CfgURCpl: u32 = unsafe { ::core::mem::transmute(CfgURCpl) }; - CfgURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let CfgCACpl: u32 = unsafe { ::core::mem::transmute(CfgCACpl) }; - CfgCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let CfgCTO: u32 = unsafe { ::core::mem::transmute(CfgCTO) }; - CfgCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let IoURCpl: u32 = unsafe { ::core::mem::transmute(IoURCpl) }; - IoURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let IoCACpl: u32 = unsafe { ::core::mem::transmute(IoCACpl) }; - IoCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let IoCTO: u32 = unsafe { ::core::mem::transmute(IoCTO) }; - IoCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 5u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let MemURCpl: u32 = unsafe { ::core::mem::transmute(MemURCpl) }; - MemURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let MemCACpl: u32 = unsafe { ::core::mem::transmute(MemCACpl) }; - MemCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let MemCTO: u32 = unsafe { ::core::mem::transmute(MemCTO) }; - MemCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 13u8, - { - let Reserved3: u32 = unsafe { ::core::mem::transmute(Reserved3) }; - Reserved3 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER = _PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER; -pub type PPCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER = *mut _PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CfgURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn CfgCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn CfgCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn IoURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 5u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 5u8, val as u64) - } - } - #[inline] - pub fn MemURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 13u8) as u32) } - } - #[inline] - pub fn set_Reserved3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 13u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CfgURCpl: ULONG, - CfgCACpl: ULONG, - CfgCTO: ULONG, - Reserved1: ULONG, - IoURCpl: ULONG, - IoCACpl: ULONG, - IoCTO: ULONG, - Reserved2: ULONG, - MemURCpl: ULONG, - MemCACpl: ULONG, - MemCTO: ULONG, - Reserved3: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CfgURCpl: u32 = unsafe { ::core::mem::transmute(CfgURCpl) }; - CfgURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let CfgCACpl: u32 = unsafe { ::core::mem::transmute(CfgCACpl) }; - CfgCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let CfgCTO: u32 = unsafe { ::core::mem::transmute(CfgCTO) }; - CfgCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let IoURCpl: u32 = unsafe { ::core::mem::transmute(IoURCpl) }; - IoURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let IoCACpl: u32 = unsafe { ::core::mem::transmute(IoCACpl) }; - IoCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let IoCTO: u32 = unsafe { ::core::mem::transmute(IoCTO) }; - IoCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 5u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let MemURCpl: u32 = unsafe { ::core::mem::transmute(MemURCpl) }; - MemURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let MemCACpl: u32 = unsafe { ::core::mem::transmute(MemCACpl) }; - MemCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let MemCTO: u32 = unsafe { ::core::mem::transmute(MemCTO) }; - MemCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 13u8, - { - let Reserved3: u32 = unsafe { ::core::mem::transmute(Reserved3) }; - Reserved3 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER = _PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER; -pub type PPCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER = *mut _PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CfgURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn CfgCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn CfgCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn IoURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 5u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 5u8, val as u64) - } - } - #[inline] - pub fn MemURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 13u8) as u32) } - } - #[inline] - pub fn set_Reserved3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 13u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CfgURCpl: ULONG, - CfgCACpl: ULONG, - CfgCTO: ULONG, - Reserved1: ULONG, - IoURCpl: ULONG, - IoCACpl: ULONG, - IoCTO: ULONG, - Reserved2: ULONG, - MemURCpl: ULONG, - MemCACpl: ULONG, - MemCTO: ULONG, - Reserved3: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CfgURCpl: u32 = unsafe { ::core::mem::transmute(CfgURCpl) }; - CfgURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let CfgCACpl: u32 = unsafe { ::core::mem::transmute(CfgCACpl) }; - CfgCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let CfgCTO: u32 = unsafe { ::core::mem::transmute(CfgCTO) }; - CfgCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let IoURCpl: u32 = unsafe { ::core::mem::transmute(IoURCpl) }; - IoURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let IoCACpl: u32 = unsafe { ::core::mem::transmute(IoCACpl) }; - IoCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let IoCTO: u32 = unsafe { ::core::mem::transmute(IoCTO) }; - IoCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 5u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let MemURCpl: u32 = unsafe { ::core::mem::transmute(MemURCpl) }; - MemURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let MemCACpl: u32 = unsafe { ::core::mem::transmute(MemCACpl) }; - MemCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let MemCTO: u32 = unsafe { ::core::mem::transmute(MemCTO) }; - MemCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 13u8, - { - let Reserved3: u32 = unsafe { ::core::mem::transmute(Reserved3) }; - Reserved3 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER = _PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER; -pub type PPCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER = *mut _PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CfgURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn CfgCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn CfgCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_CfgCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn IoURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_IoCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 5u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 5u8, val as u64) - } - } - #[inline] - pub fn MemURCpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemURCpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemCACpl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemCACpl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemCTO(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemCTO(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved3(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 13u8) as u32) } - } - #[inline] - pub fn set_Reserved3(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 13u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CfgURCpl: ULONG, - CfgCACpl: ULONG, - CfgCTO: ULONG, - Reserved1: ULONG, - IoURCpl: ULONG, - IoCACpl: ULONG, - IoCTO: ULONG, - Reserved2: ULONG, - MemURCpl: ULONG, - MemCACpl: ULONG, - MemCTO: ULONG, - Reserved3: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CfgURCpl: u32 = unsafe { ::core::mem::transmute(CfgURCpl) }; - CfgURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let CfgCACpl: u32 = unsafe { ::core::mem::transmute(CfgCACpl) }; - CfgCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let CfgCTO: u32 = unsafe { ::core::mem::transmute(CfgCTO) }; - CfgCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let IoURCpl: u32 = unsafe { ::core::mem::transmute(IoURCpl) }; - IoURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let IoCACpl: u32 = unsafe { ::core::mem::transmute(IoCACpl) }; - IoCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let IoCTO: u32 = unsafe { ::core::mem::transmute(IoCTO) }; - IoCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 5u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let MemURCpl: u32 = unsafe { ::core::mem::transmute(MemURCpl) }; - MemURCpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let MemCACpl: u32 = unsafe { ::core::mem::transmute(MemCACpl) }; - MemCACpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let MemCTO: u32 = unsafe { ::core::mem::transmute(MemCTO) }; - MemCTO as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 13u8, - { - let Reserved3: u32 = unsafe { ::core::mem::transmute(Reserved3) }; - Reserved3 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER = _PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER; -pub type PPCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER = *mut _PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DPC_RP_PIO_HEADERLOG_REGISTER { - pub PioHeaderLogRegister: [ULONG; 4usize], -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_RP_PIO_HEADERLOG_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DPC_RP_PIO_HEADERLOG_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_RP_PIO_HEADERLOG_REGISTER>(), - 16usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_HEADERLOG_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_RP_PIO_HEADERLOG_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_HEADERLOG_REGISTER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PioHeaderLogRegister) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_HEADERLOG_REGISTER), - "::", - stringify!(PioHeaderLogRegister), - ), - ); -} -pub type PCI_EXPRESS_DPC_RP_PIO_HEADERLOG_REGISTER = _PCI_EXPRESS_DPC_RP_PIO_HEADERLOG_REGISTER; -pub type PPCI_EXPRESS_DPC_RP_PIO_HEADERLOG_REGISTER = *mut _PCI_EXPRESS_DPC_RP_PIO_HEADERLOG_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER { - pub PioImpSpecLog: ULONG, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PioImpSpecLog) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER), - "::", - stringify!(PioImpSpecLog), - ), - ); -} -impl Default for _PCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER = _PCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER; -pub type PPCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER = *mut _PCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DPC_RP_PIO_TLPPREFIXLOG_REGISTER { - pub PioTlpPrefixLogRegister: [ULONG; 4usize], -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_RP_PIO_TLPPREFIXLOG_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_DPC_RP_PIO_TLPPREFIXLOG_REGISTER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_RP_PIO_TLPPREFIXLOG_REGISTER>(), - 16usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_RP_PIO_TLPPREFIXLOG_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_RP_PIO_TLPPREFIXLOG_REGISTER>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_TLPPREFIXLOG_REGISTER), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PioTlpPrefixLogRegister) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_RP_PIO_TLPPREFIXLOG_REGISTER), - "::", - stringify!(PioTlpPrefixLogRegister), - ), - ); -} -pub type PCI_EXPRESS_DPC_RP_PIO_TLPPREFIXLOG_REGISTER = _PCI_EXPRESS_DPC_RP_PIO_TLPPREFIXLOG_REGISTER; -pub type PPCI_EXPRESS_DPC_RP_PIO_TLPPREFIXLOG_REGISTER = *mut _PCI_EXPRESS_DPC_RP_PIO_TLPPREFIXLOG_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DPC_ERROR_SOURCE_ID { - pub __bindgen_anon_1: _PCI_EXPRESS_DPC_ERROR_SOURCE_ID__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DPC_ERROR_SOURCE_ID__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_ERROR_SOURCE_ID__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_ERROR_SOURCE_ID__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_ERROR_SOURCE_ID__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_ERROR_SOURCE_ID__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DPC_ERROR_SOURCE_ID__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DPC_ERROR_SOURCE_ID__bindgen_ty_1 { - #[inline] - pub fn Function(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u16) } - } - #[inline] - pub fn set_Function(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn Device(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u16) } - } - #[inline] - pub fn set_Device(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn Bus(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u16) } - } - #[inline] - pub fn set_Bus(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Function: USHORT, - Device: USHORT, - Bus: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let Function: u16 = unsafe { ::core::mem::transmute(Function) }; - Function as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let Device: u16 = unsafe { ::core::mem::transmute(Device) }; - Device as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let Bus: u16 = unsafe { ::core::mem::transmute(Bus) }; - Bus as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_ERROR_SOURCE_ID() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DPC_ERROR_SOURCE_ID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_ERROR_SOURCE_ID>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_ERROR_SOURCE_ID)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_ERROR_SOURCE_ID>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DPC_ERROR_SOURCE_ID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_ERROR_SOURCE_ID), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_DPC_ERROR_SOURCE_ID { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DPC_ERROR_SOURCE_ID = _PCI_EXPRESS_DPC_ERROR_SOURCE_ID; -pub type PPCI_EXPRESS_DPC_ERROR_SOURCE_ID = *mut _PCI_EXPRESS_DPC_ERROR_SOURCE_ID; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_DPC_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub DpcCapabilities: PCI_EXPRESS_DPC_CAPS_REGISTER, - pub DpcControl: PCI_EXPRESS_DPC_CONTROL_REGISTER, - pub DpcStatus: PCI_EXPRESS_DPC_STATUS_REGISTER, - pub DpcErrSrcId: PCI_EXPRESS_DPC_ERROR_SOURCE_ID, - pub RpPioStatus: PCI_EXPRESS_DPC_RP_PIO_STATUS_REGISTER, - pub RpPioMask: PCI_EXPRESS_DPC_RP_PIO_MASK_REGISTER, - pub RpPioSeverity: PCI_EXPRESS_DPC_RP_PIO_SEVERITY_REGISTER, - pub RpPioSysError: PCI_EXPRESS_DPC_RP_PIO_SYSERR_REGISTER, - pub RpPioException: PCI_EXPRESS_DPC_RP_PIO_EXCEPTION_REGISTER, - pub RpPioHeaderLog: PCI_EXPRESS_DPC_RP_PIO_HEADERLOG_REGISTER, - pub RpPioImpSpecLog: PCI_EXPRESS_DPC_RP_PIO_IMPSPECLOG_REGISTER, - pub RpPioPrefixLog: PCI_EXPRESS_DPC_RP_PIO_TLPPREFIXLOG_REGISTER, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DPC_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_DPC_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DPC_CAPABILITY>(), - 68usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_DPC_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DPC_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_DPC_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DpcCapabilities) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPABILITY), - "::", - stringify!(DpcCapabilities), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DpcControl) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPABILITY), - "::", - stringify!(DpcControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DpcStatus) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPABILITY), - "::", - stringify!(DpcStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DpcErrSrcId) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPABILITY), - "::", - stringify!(DpcErrSrcId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RpPioStatus) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPABILITY), - "::", - stringify!(RpPioStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RpPioMask) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPABILITY), - "::", - stringify!(RpPioMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RpPioSeverity) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPABILITY), - "::", - stringify!(RpPioSeverity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RpPioSysError) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPABILITY), - "::", - stringify!(RpPioSysError), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RpPioException) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPABILITY), - "::", - stringify!(RpPioException), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RpPioHeaderLog) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPABILITY), - "::", - stringify!(RpPioHeaderLog), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RpPioImpSpecLog) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPABILITY), - "::", - stringify!(RpPioImpSpecLog), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RpPioPrefixLog) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DPC_CAPABILITY), - "::", - stringify!(RpPioPrefixLog), - ), - ); -} -impl Default for _PCI_EXPRESS_DPC_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DPC_CAPABILITY = _PCI_EXPRESS_DPC_CAPABILITY; -pub type PPCI_EXPRESS_DPC_CAPABILITY = *mut _PCI_EXPRESS_DPC_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER__bindgen_ty_1 { - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn SizesSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 20u8) as u32) } - } - #[inline] - pub fn set_SizesSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 20u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Rsvd: ULONG, - SizesSupported: ULONG, - Rsvd2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 20u8, - { - let SizesSupported: u32 = unsafe { - ::core::mem::transmute(SizesSupported) - }; - SizesSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER = _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER; -pub type PPCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER = *mut _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn BarIndex(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u32) } - } - #[inline] - pub fn set_BarIndex(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 2u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 2u8, val as u64) - } - } - #[inline] - pub fn NumberOfResizableBars(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u32) } - } - #[inline] - pub fn set_NumberOfResizableBars(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 3u8, val as u64) - } - } - #[inline] - pub fn BarSize(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 6u8) as u32) } - } - #[inline] - pub fn set_BarSize(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 6u8, val as u64) - } - } - #[inline] - pub fn Rsvd2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 18u8) as u32) } - } - #[inline] - pub fn set_Rsvd2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 18u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - BarIndex: ULONG, - Rsvd: ULONG, - NumberOfResizableBars: ULONG, - BarSize: ULONG, - Rsvd2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let BarIndex: u32 = unsafe { ::core::mem::transmute(BarIndex) }; - BarIndex as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 2u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 3u8, - { - let NumberOfResizableBars: u32 = unsafe { - ::core::mem::transmute(NumberOfResizableBars) - }; - NumberOfResizableBars as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 6u8, - { - let BarSize: u32 = unsafe { ::core::mem::transmute(BarSize) }; - BarSize as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 18u8, - { - let Rsvd2: u32 = unsafe { ::core::mem::transmute(Rsvd2) }; - Rsvd2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER = _PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER; -pub type PPCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER = *mut _PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_RESIZABLE_BAR_ENTRY { - pub Capability: PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY_REGISTER, - pub Control: PCI_EXPRESS_RESIZABLE_BAR_CONTROL_REGISTER, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_RESIZABLE_BAR_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_RESIZABLE_BAR_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_RESIZABLE_BAR_ENTRY>(), - 8usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_RESIZABLE_BAR_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_RESIZABLE_BAR_ENTRY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_RESIZABLE_BAR_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capability) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_RESIZABLE_BAR_ENTRY), - "::", - stringify!(Capability), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_RESIZABLE_BAR_ENTRY), - "::", - stringify!(Control), - ), - ); -} -impl Default for _PCI_EXPRESS_RESIZABLE_BAR_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_RESIZABLE_BAR_ENTRY = _PCI_EXPRESS_RESIZABLE_BAR_ENTRY; -pub type PPCI_EXPRESS_RESIZABLE_BAR_ENTRY = *mut _PCI_EXPRESS_RESIZABLE_BAR_ENTRY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub Entry: [PCI_EXPRESS_RESIZABLE_BAR_ENTRY; 6usize], -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY>(), - 52usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Entry) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY), - "::", - stringify!(Entry), - ), - ); -} -impl Default for _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY = _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY; -pub type PPCI_EXPRESS_RESIZABLE_BAR_CAPABILITY = *mut _PCI_EXPRESS_RESIZABLE_BAR_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1 { - pub __bindgen_anon_1: _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1__bindgen_ty_1 { - #[inline] - pub fn DvsecVendorId(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u32) } - } - #[inline] - pub fn set_DvsecVendorId(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn DvsecVersion(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 4u8) as u32) } - } - #[inline] - pub fn set_DvsecVersion(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 4u8, val as u64) - } - } - #[inline] - pub fn DvsecLength(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 12u8) as u32) } - } - #[inline] - pub fn set_DvsecLength(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 12u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - DvsecVendorId: ULONG, - DvsecVersion: ULONG, - DvsecLength: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 16u8, - { - let DvsecVendorId: u32 = unsafe { - ::core::mem::transmute(DvsecVendorId) - }; - DvsecVendorId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 4u8, - { - let DvsecVersion: u32 = unsafe { - ::core::mem::transmute(DvsecVersion) - }; - DvsecVersion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 12u8, - { - let DvsecLength: u32 = unsafe { - ::core::mem::transmute(DvsecLength) - }; - DvsecLength as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1 = _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1; -pub type PPCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1 = *mut _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2 { - pub __bindgen_anon_1: _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2__bindgen_ty_1, - >(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2__bindgen_ty_1, - >(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2__bindgen_ty_1 { - #[inline] - pub fn DvsecId(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u16) } - } - #[inline] - pub fn set_DvsecId(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1(DvsecId: USHORT) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 16u8, - { - let DvsecId: u16 = unsafe { ::core::mem::transmute(DvsecId) }; - DvsecId as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2 = _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2; -pub type PPCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2 = *mut _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub DvsecHeader1: PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1, - pub DvsecHeader2: PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2, - pub DvsecRegisters: [USHORT; 1usize], -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY>(), - 12usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DvsecHeader1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY), - "::", - stringify!(DvsecHeader1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DvsecHeader2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY), - "::", - stringify!(DvsecHeader2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DvsecRegisters) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY), - "::", - stringify!(DvsecRegisters), - ), - ); -} -impl Default for _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY = _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY; -pub type PPCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY = *mut _PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_LINK_CONTROL3 { - pub __bindgen_anon_1: _PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1 { - pub __bindgen_anon_1: _PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn PerformEq(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_PerformEq(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn LinkEqIntEn(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_LinkEqIntEn(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 30u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PerformEq: ULONG, - LinkEqIntEn: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let PerformEq: u32 = unsafe { ::core::mem::transmute(PerformEq) }; - PerformEq as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let LinkEqIntEn: u32 = unsafe { - ::core::mem::transmute(LinkEqIntEn) - }; - LinkEqIntEn as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 30u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_LINK_CONTROL3__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LINK_CONTROL3() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LINK_CONTROL3>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_LINK_CONTROL3)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LINK_CONTROL3>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_LINK_CONTROL3)), - ); -} -impl Default for _PCI_EXPRESS_LINK_CONTROL3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_LINK_CONTROL3 = _PCI_EXPRESS_LINK_CONTROL3; -pub type PPCI_EXPRESS_LINK_CONTROL3 = *mut _PCI_EXPRESS_LINK_CONTROL3; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_LANE_ERROR_STATUS { - pub LaneBitmap: ULONG, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_LANE_ERROR_STATUS() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_LANE_ERROR_STATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_LANE_ERROR_STATUS>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_LANE_ERROR_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_LANE_ERROR_STATUS>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_LANE_ERROR_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LaneBitmap) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_LANE_ERROR_STATUS), - "::", - stringify!(LaneBitmap), - ), - ); -} -pub type PCI_EXPRESS_LANE_ERROR_STATUS = _PCI_EXPRESS_LANE_ERROR_STATUS; -pub type PPCI_EXPRESS_LANE_ERROR_STATUS = *mut _PCI_EXPRESS_LANE_ERROR_STATUS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_SECONDARY_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub LinkControl3: PCI_EXPRESS_LINK_CONTROL3, - pub LaneErrorStatus: PCI_EXPRESS_LANE_ERROR_STATUS, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_SECONDARY_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_SECONDARY_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_SECONDARY_CAPABILITY>(), - 12usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_SECONDARY_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_SECONDARY_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_SECONDARY_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SECONDARY_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LinkControl3) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SECONDARY_CAPABILITY), - "::", - stringify!(LinkControl3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LaneErrorStatus) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_SECONDARY_CAPABILITY), - "::", - stringify!(LaneErrorStatus), - ), - ); -} -impl Default for _PCI_EXPRESS_SECONDARY_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_SECONDARY_CAPABILITY = _PCI_EXPRESS_SECONDARY_CAPABILITY; -pub type PPCI_EXPRESS_SECONDARY_CAPABILITY = *mut _PCI_EXPRESS_SECONDARY_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_NPEM_CAPABILITY_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_NPEM_CAPABILITY_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_NPEM_CAPABILITY_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_NPEM_CAPABILITY_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_NPEM_CAPABILITY_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_NPEM_CAPABILITY_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_NPEM_CAPABILITY_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_NPEM_CAPABILITY_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_NPEM_CAPABILITY_REGISTER__bindgen_ty_1 { - #[inline] - pub fn Capable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_Capable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ResetCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_ResetCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn OkCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_OkCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn LocateCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_LocateCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn FailCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_FailCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn RebuildCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_RebuildCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn PFACapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_PFACapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn HotSpareCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_HotSpareCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn InACriticalArrayCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_InACriticalArrayCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn InAFailedArrayCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_InAFailedArrayCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn InvalidDeviceTypeCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_InvalidDeviceTypeCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn DisabledCapable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } - } - #[inline] - pub fn set_DisabledCapable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 12u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 12u8, val as u64) - } - } - #[inline] - pub fn EnclosureSpecificCapabilities(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_EnclosureSpecificCapabilities(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Capable: ULONG, - ResetCapable: ULONG, - OkCapable: ULONG, - LocateCapable: ULONG, - FailCapable: ULONG, - RebuildCapable: ULONG, - PFACapable: ULONG, - HotSpareCapable: ULONG, - InACriticalArrayCapable: ULONG, - InAFailedArrayCapable: ULONG, - InvalidDeviceTypeCapable: ULONG, - DisabledCapable: ULONG, - Rsvd: ULONG, - EnclosureSpecificCapabilities: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Capable: u32 = unsafe { ::core::mem::transmute(Capable) }; - Capable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ResetCapable: u32 = unsafe { - ::core::mem::transmute(ResetCapable) - }; - ResetCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let OkCapable: u32 = unsafe { ::core::mem::transmute(OkCapable) }; - OkCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let LocateCapable: u32 = unsafe { - ::core::mem::transmute(LocateCapable) - }; - LocateCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let FailCapable: u32 = unsafe { - ::core::mem::transmute(FailCapable) - }; - FailCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let RebuildCapable: u32 = unsafe { - ::core::mem::transmute(RebuildCapable) - }; - RebuildCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let PFACapable: u32 = unsafe { ::core::mem::transmute(PFACapable) }; - PFACapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let HotSpareCapable: u32 = unsafe { - ::core::mem::transmute(HotSpareCapable) - }; - HotSpareCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let InACriticalArrayCapable: u32 = unsafe { - ::core::mem::transmute(InACriticalArrayCapable) - }; - InACriticalArrayCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let InAFailedArrayCapable: u32 = unsafe { - ::core::mem::transmute(InAFailedArrayCapable) - }; - InAFailedArrayCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let InvalidDeviceTypeCapable: u32 = unsafe { - ::core::mem::transmute(InvalidDeviceTypeCapable) - }; - InvalidDeviceTypeCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let DisabledCapable: u32 = unsafe { - ::core::mem::transmute(DisabledCapable) - }; - DisabledCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 12u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let EnclosureSpecificCapabilities: u32 = unsafe { - ::core::mem::transmute(EnclosureSpecificCapabilities) - }; - EnclosureSpecificCapabilities as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_NPEM_CAPABILITY_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_NPEM_CAPABILITY_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_NPEM_CAPABILITY_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_NPEM_CAPABILITY_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_NPEM_CAPABILITY_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_NPEM_CAPABILITY_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_NPEM_CAPABILITY_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_NPEM_CAPABILITY_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_NPEM_CAPABILITY_REGISTER = _PCI_EXPRESS_NPEM_CAPABILITY_REGISTER; -pub type PPCI_EXPRESS_NPEM_CAPABILITY_REGISTER = *mut _PCI_EXPRESS_NPEM_CAPABILITY_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_NPEM_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_NPEM_CONTROL_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_NPEM_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_NPEM_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_NPEM_CONTROL_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_NPEM_CONTROL_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_NPEM_CONTROL_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_NPEM_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_NPEM_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn Enable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_Enable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn InitiateReset(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_InitiateReset(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn OkControl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_OkControl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn LocateControl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_LocateControl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn FailControl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_FailControl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn RebuildControl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_RebuildControl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn PFAControl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_PFAControl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn HotSpareControl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_HotSpareControl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn InACriticalArrayControl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_InACriticalArrayControl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn InAFailedArrayControl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_InAFailedArrayControl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn InvalidDeviceTypeControl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_InvalidDeviceTypeControl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn DisabledControl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } - } - #[inline] - pub fn set_DisabledControl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 12u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 12u8, val as u64) - } - } - #[inline] - pub fn EnclosureSpecificControls(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_EnclosureSpecificControls(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Enable: ULONG, - InitiateReset: ULONG, - OkControl: ULONG, - LocateControl: ULONG, - FailControl: ULONG, - RebuildControl: ULONG, - PFAControl: ULONG, - HotSpareControl: ULONG, - InACriticalArrayControl: ULONG, - InAFailedArrayControl: ULONG, - InvalidDeviceTypeControl: ULONG, - DisabledControl: ULONG, - Rsvd: ULONG, - EnclosureSpecificControls: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Enable: u32 = unsafe { ::core::mem::transmute(Enable) }; - Enable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let InitiateReset: u32 = unsafe { - ::core::mem::transmute(InitiateReset) - }; - InitiateReset as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let OkControl: u32 = unsafe { ::core::mem::transmute(OkControl) }; - OkControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let LocateControl: u32 = unsafe { - ::core::mem::transmute(LocateControl) - }; - LocateControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let FailControl: u32 = unsafe { - ::core::mem::transmute(FailControl) - }; - FailControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let RebuildControl: u32 = unsafe { - ::core::mem::transmute(RebuildControl) - }; - RebuildControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let PFAControl: u32 = unsafe { ::core::mem::transmute(PFAControl) }; - PFAControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let HotSpareControl: u32 = unsafe { - ::core::mem::transmute(HotSpareControl) - }; - HotSpareControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let InACriticalArrayControl: u32 = unsafe { - ::core::mem::transmute(InACriticalArrayControl) - }; - InACriticalArrayControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let InAFailedArrayControl: u32 = unsafe { - ::core::mem::transmute(InAFailedArrayControl) - }; - InAFailedArrayControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let InvalidDeviceTypeControl: u32 = unsafe { - ::core::mem::transmute(InvalidDeviceTypeControl) - }; - InvalidDeviceTypeControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let DisabledControl: u32 = unsafe { - ::core::mem::transmute(DisabledControl) - }; - DisabledControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 12u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let EnclosureSpecificControls: u32 = unsafe { - ::core::mem::transmute(EnclosureSpecificControls) - }; - EnclosureSpecificControls as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_NPEM_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_NPEM_CONTROL_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_NPEM_CONTROL_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_NPEM_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_NPEM_CONTROL_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_NPEM_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_NPEM_CONTROL_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_NPEM_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_NPEM_CONTROL_REGISTER = _PCI_EXPRESS_NPEM_CONTROL_REGISTER; -pub type PPCI_EXPRESS_NPEM_CONTROL_REGISTER = *mut _PCI_EXPRESS_NPEM_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_NPEM_STATUS_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_NPEM_STATUS_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_NPEM_STATUS_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_NPEM_STATUS_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_NPEM_STATUS_REGISTER__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_NPEM_STATUS_REGISTER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_NPEM_STATUS_REGISTER__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_NPEM_STATUS_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_NPEM_STATUS_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CommandCompleted(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_CommandCompleted(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Rsvd(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 23u8) as u32) } - } - #[inline] - pub fn set_Rsvd(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 23u8, val as u64) - } - } - #[inline] - pub fn EnclosureSpecificStatus(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_EnclosureSpecificStatus(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CommandCompleted: ULONG, - Rsvd: ULONG, - EnclosureSpecificStatus: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CommandCompleted: u32 = unsafe { - ::core::mem::transmute(CommandCompleted) - }; - CommandCompleted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 23u8, - { - let Rsvd: u32 = unsafe { ::core::mem::transmute(Rsvd) }; - Rsvd as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let EnclosureSpecificStatus: u32 = unsafe { - ::core::mem::transmute(EnclosureSpecificStatus) - }; - EnclosureSpecificStatus as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_NPEM_STATUS_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_NPEM_STATUS_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_NPEM_STATUS_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_NPEM_STATUS_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_NPEM_STATUS_REGISTER>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_NPEM_STATUS_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_NPEM_STATUS_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_NPEM_STATUS_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_NPEM_STATUS_REGISTER = _PCI_EXPRESS_NPEM_STATUS_REGISTER; -pub type PPCI_EXPRESS_NPEM_STATUS_REGISTER = *mut _PCI_EXPRESS_NPEM_STATUS_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_NPEM_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub Capability: PCI_EXPRESS_NPEM_CAPABILITY_REGISTER, - pub Control: PCI_EXPRESS_NPEM_CONTROL_REGISTER, - pub Status: PCI_EXPRESS_NPEM_STATUS_REGISTER, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_NPEM_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_NPEM_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_NPEM_CAPABILITY>(), - 16usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_NPEM_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_NPEM_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_NPEM_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_NPEM_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capability) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_NPEM_CAPABILITY), - "::", - stringify!(Capability), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_NPEM_CAPABILITY), - "::", - stringify!(Control), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_NPEM_CAPABILITY), - "::", - stringify!(Status), - ), - ); -} -impl Default for _PCI_EXPRESS_NPEM_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_NPEM_CAPABILITY = _PCI_EXPRESS_NPEM_CAPABILITY; -pub type PPCI_EXPRESS_NPEM_CAPABILITY = *mut _PCI_EXPRESS_NPEM_CAPABILITY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub AssociationBitmap: ULONG, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAPABILITY, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAPABILITY, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAPABILITY), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAPABILITY, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAPABILITY), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AssociationBitmap) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAPABILITY), - "::", - stringify!(AssociationBitmap), - ), - ); -} -pub type PCI_EXPRESS_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAPABILITY = _PCI_EXPRESS_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAPABILITY; -pub type PPCI_EXPRESS_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAPABILITY = *mut _PCI_EXPRESS_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11 { - pub __bindgen_anon_1: _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11__bindgen_ty_1, - >(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11__bindgen_ty_1, - >(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11__bindgen_ty_1 { - #[inline] - pub fn CacheCapable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_CacheCapable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoCapable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_IoCapable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemCapable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_MemCapable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemHwInitMode(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_MemHwInitMode(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn HdmCount(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u16) } - } - #[inline] - pub fn set_HdmCount(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 2u8, val as u64) - } - } - #[inline] - pub fn Reserved0(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 8u8) as u16) } - } - #[inline] - pub fn set_Reserved0(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 8u8, val as u64) - } - } - #[inline] - pub fn ViralCapable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } - } - #[inline] - pub fn set_ViralCapable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CacheCapable: USHORT, - IoCapable: USHORT, - MemCapable: USHORT, - MemHwInitMode: USHORT, - HdmCount: USHORT, - Reserved0: USHORT, - ViralCapable: USHORT, - Reserved1: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CacheCapable: u16 = unsafe { - ::core::mem::transmute(CacheCapable) - }; - CacheCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let IoCapable: u16 = unsafe { ::core::mem::transmute(IoCapable) }; - IoCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let MemCapable: u16 = unsafe { ::core::mem::transmute(MemCapable) }; - MemCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let MemHwInitMode: u16 = unsafe { - ::core::mem::transmute(MemHwInitMode) - }; - MemHwInitMode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 2u8, - { - let HdmCount: u16 = unsafe { ::core::mem::transmute(HdmCount) }; - HdmCount as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 8u8, - { - let Reserved0: u16 = unsafe { ::core::mem::transmute(Reserved0) }; - Reserved0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 1u8, - { - let ViralCapable: u16 = unsafe { - ::core::mem::transmute(ViralCapable) - }; - ViralCapable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let Reserved1: u16 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11 = _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11; -pub type PPCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11 = *mut _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER__bindgen_ty_1 { - #[inline] - pub fn CacheEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_CacheEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_IoEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_MemEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn CacheSFCoverage(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u16) } - } - #[inline] - pub fn set_CacheSFCoverage(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn CacheSFGranularity(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 3u8) as u16) } - } - #[inline] - pub fn set_CacheSFGranularity(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 3u8, val as u64) - } - } - #[inline] - pub fn CacheCleanEviction(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } - } - #[inline] - pub fn set_CacheCleanEviction(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved0(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u16) } - } - #[inline] - pub fn set_Reserved0(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 2u8, val as u64) - } - } - #[inline] - pub fn ViralEnable(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } - } - #[inline] - pub fn set_ViralEnable(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CacheEnable: USHORT, - IoEnable: USHORT, - MemEnable: USHORT, - CacheSFCoverage: USHORT, - CacheSFGranularity: USHORT, - CacheCleanEviction: USHORT, - Reserved0: USHORT, - ViralEnable: USHORT, - Reserved1: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CacheEnable: u16 = unsafe { - ::core::mem::transmute(CacheEnable) - }; - CacheEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let IoEnable: u16 = unsafe { ::core::mem::transmute(IoEnable) }; - IoEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let MemEnable: u16 = unsafe { ::core::mem::transmute(MemEnable) }; - MemEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let CacheSFCoverage: u16 = unsafe { - ::core::mem::transmute(CacheSFCoverage) - }; - CacheSFCoverage as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 3u8, - { - let CacheSFGranularity: u16 = unsafe { - ::core::mem::transmute(CacheSFGranularity) - }; - CacheSFGranularity as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let CacheCleanEviction: u16 = unsafe { - ::core::mem::transmute(CacheCleanEviction) - }; - CacheCleanEviction as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 2u8, - { - let Reserved0: u16 = unsafe { ::core::mem::transmute(Reserved0) }; - Reserved0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 1u8, - { - let ViralEnable: u16 = unsafe { - ::core::mem::transmute(ViralEnable) - }; - ViralEnable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let Reserved1: u16 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER = _PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER; -pub type PPCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER = *mut _PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER__bindgen_ty_1 { - #[inline] - pub fn Reserved0(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 14u8) as u16) } - } - #[inline] - pub fn set_Reserved0(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 14u8, val as u64) - } - } - #[inline] - pub fn ViralStatus(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } - } - #[inline] - pub fn set_ViralStatus(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Reserved0: USHORT, - ViralStatus: USHORT, - Reserved1: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 14u8, - { - let Reserved0: u16 = unsafe { ::core::mem::transmute(Reserved0) }; - Reserved0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 1u8, - { - let ViralStatus: u16 = unsafe { - ::core::mem::transmute(ViralStatus) - }; - ViralStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let Reserved1: u16 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER = _PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER; -pub type PPCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER = *mut _PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER__bindgen_ty_1>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER__bindgen_ty_1 { - #[inline] - pub fn ConfigLock(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_ConfigLock(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 15u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 15u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ConfigLock: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ConfigLock: u16 = unsafe { ::core::mem::transmute(ConfigLock) }; - ConfigLock as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 15u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER>(), - 2usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER>(), - 2usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER = _PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER; -pub type PPCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER = *mut _PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER { - pub MemSizeHigh: ULONG, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MemSizeHigh) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER), - "::", - stringify!(MemSizeHigh), - ), - ); -} -pub type PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER = _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER; -pub type PPCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER = *mut _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11 { - pub __bindgen_anon_1: _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11__bindgen_ty_1 { - #[inline] - pub fn MemInfoValid(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemInfoValid(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemActive(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemActive(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn MediaType(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 3u8) as u32) } - } - #[inline] - pub fn set_MediaType(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 3u8, val as u64) - } - } - #[inline] - pub fn MemClass(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u32) } - } - #[inline] - pub fn set_MemClass(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 3u8, val as u64) - } - } - #[inline] - pub fn DesiredInterleave(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 3u8) as u32) } - } - #[inline] - pub fn set_DesiredInterleave(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 3u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 17u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 17u8, val as u64) - } - } - #[inline] - pub fn MemSizeLow(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 4u8) as u32) } - } - #[inline] - pub fn set_MemSizeLow(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(28usize, 4u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MemInfoValid: ULONG, - MemActive: ULONG, - MediaType: ULONG, - MemClass: ULONG, - DesiredInterleave: ULONG, - Reserved: ULONG, - MemSizeLow: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let MemInfoValid: u32 = unsafe { - ::core::mem::transmute(MemInfoValid) - }; - MemInfoValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let MemActive: u32 = unsafe { ::core::mem::transmute(MemActive) }; - MemActive as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 3u8, - { - let MediaType: u32 = unsafe { ::core::mem::transmute(MediaType) }; - MediaType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 3u8, - { - let MemClass: u32 = unsafe { ::core::mem::transmute(MemClass) }; - MemClass as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 3u8, - { - let DesiredInterleave: u32 = unsafe { - ::core::mem::transmute(DesiredInterleave) - }; - DesiredInterleave as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 17u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 28usize, - 4u8, - { - let MemSizeLow: u32 = unsafe { ::core::mem::transmute(MemSizeLow) }; - MemSizeLow as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11>(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11), - ), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11 = _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11; -pub type PPCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11 = *mut _PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER { - pub MemBaseHigh: ULONG, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MemBaseHigh) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER), - "::", - stringify!(MemBaseHigh), - ), - ); -} -pub type PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER = _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER; -pub type PPCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER = *mut _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER { - pub __bindgen_anon_1: _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER__bindgen_ty_1), - ), - ); -} -impl _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER__bindgen_ty_1 { - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 28u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 28u8, val as u64) - } - } - #[inline] - pub fn MemBaseLow(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 4u8) as u32) } - } - #[inline] - pub fn set_MemBaseLow(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(28usize, 4u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Reserved: ULONG, - MemBaseLow: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 28u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 28usize, - 4u8, - { - let MemBaseLow: u32 = unsafe { ::core::mem::transmute(MemBaseLow) }; - MemBaseLow as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit< - _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER>(), - 4usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER = _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER; -pub type PPCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER = *mut _PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_CXL_DVSEC_CAPABILITY { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub DvsecHeader1: PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1, - pub DvsecHeader2: PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2, - pub Reserved: [UCHAR; 46usize], -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_CAPABILITY() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_CXL_DVSEC_CAPABILITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CXL_DVSEC_CAPABILITY>(), - 56usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CXL_DVSEC_CAPABILITY>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DvsecHeader1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY), - "::", - stringify!(DvsecHeader1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DvsecHeader2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY), - "::", - stringify!(DvsecHeader2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _PCI_EXPRESS_CXL_DVSEC_CAPABILITY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_CXL_DVSEC_CAPABILITY = _PCI_EXPRESS_CXL_DVSEC_CAPABILITY; -pub type PPCI_EXPRESS_CXL_DVSEC_CAPABILITY = *mut _PCI_EXPRESS_CXL_DVSEC_CAPABILITY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11 { - pub Header: PCI_EXPRESS_ENHANCED_CAPABILITY_HEADER, - pub DvsecHeader1: PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1, - pub DvsecHeader2: PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2, - pub Capability: PCI_EXPRESS_CXL_DVSEC_CAPABILITY_REGISTER_V11, - pub Control: PCI_EXPRESS_CXL_DVSEC_CONTROL_REGISTER, - pub Status: PCI_EXPRESS_CXL_DVSEC_STATUS_REGISTER, - pub Control2: USHORT, - pub Status2: USHORT, - pub Lock: PCI_EXPRESS_CXL_DVSEC_LOCK_REGISTER, - pub Reserved: USHORT, - pub Range1SizeHigh: PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER, - pub Range1SizeLow: PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11, - pub Range1BaseHigh: PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER, - pub Range1BaseLow: PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER, - pub Range2SizeHigh: PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_HIGH_REGISTER, - pub Range2SizeLow: PCI_EXPRESS_CXL_DVSEC_RANGE_SIZE_LOW_REGISTER_V11, - pub Range2BaseHigh: PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_HIGH_REGISTER, - pub Range2BaseLow: PCI_EXPRESS_CXL_DVSEC_RANGE_BASE_LOW_REGISTER, -} -#[test] -fn bindgen_test_layout__PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11>(), - 56usize, - concat!("Size of: ", stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11>(), - 4usize, - concat!("Alignment of ", stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DvsecHeader1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(DvsecHeader1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DvsecHeader2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(DvsecHeader2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capability) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Capability), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Control), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control2) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Control2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status2) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Status2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lock) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Lock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Range1SizeHigh) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Range1SizeHigh), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Range1SizeLow) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Range1SizeLow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Range1BaseHigh) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Range1BaseHigh), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Range1BaseLow) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Range1BaseLow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Range2SizeHigh) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Range2SizeHigh), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Range2SizeLow) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Range2SizeLow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Range2BaseHigh) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Range2BaseHigh), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Range2BaseLow) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11), - "::", - stringify!(Range2BaseLow), - ), - ); -} -impl Default for _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11 = _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11; -pub type PPCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11 = *mut _PCI_EXPRESS_CXL_DVSEC_CAPABILITY_V11; -pub type PCI_READ_WRITE_CONFIG = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - BusOffset: ULONG, - Slot: ULONG, - Buffer: PVOID, - Offset: ULONG, - Length: ULONG, - ) -> ULONG, ->; -pub type PPCI_READ_WRITE_CONFIG = PCI_READ_WRITE_CONFIG; -pub type PCI_PIN_TO_LINE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, PciData: PPCI_COMMON_CONFIG), ->; -pub type PPCI_PIN_TO_LINE = PCI_PIN_TO_LINE; -pub type PCI_LINE_TO_PIN = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - PciNewData: PPCI_COMMON_CONFIG, - PciOldData: PPCI_COMMON_CONFIG, - ), ->; -pub type PPCI_LINE_TO_PIN = PCI_LINE_TO_PIN; -pub type PCI_ROOT_BUS_CAPABILITY = ::core::option::Option< - unsafe extern "C" fn( - Context: PVOID, - HardwareCapability: PPCI_ROOT_BUS_HARDWARE_CAPABILITY, - ), ->; -pub type PPCI_ROOT_BUS_CAPABILITY = PCI_ROOT_BUS_CAPABILITY; -pub type PCI_EXPRESS_WAKE_CONTROL = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, EnableWake: BOOLEAN), ->; -pub type PPCI_EXPRESS_WAKE_CONTROL = PCI_EXPRESS_WAKE_CONTROL; -pub type PCI_PREPARE_MULTISTAGE_RESUME = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID), ->; -pub type PPCI_PREPARE_MULTISTAGE_RESUME = PCI_PREPARE_MULTISTAGE_RESUME; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PCI_BUS_INTERFACE_STANDARD { - pub Size: USHORT, - pub Version: USHORT, - pub Context: PVOID, - pub InterfaceReference: PINTERFACE_REFERENCE, - pub InterfaceDereference: PINTERFACE_DEREFERENCE, - pub ReadConfig: PPCI_READ_WRITE_CONFIG, - pub WriteConfig: PPCI_READ_WRITE_CONFIG, - pub PinToLine: PPCI_PIN_TO_LINE, - pub LineToPin: PPCI_LINE_TO_PIN, - pub RootBusCapability: PPCI_ROOT_BUS_CAPABILITY, - pub ExpressWakeControl: PPCI_EXPRESS_WAKE_CONTROL, - pub PrepareMultistageResume: PPCI_PREPARE_MULTISTAGE_RESUME, -} -#[test] -fn bindgen_test_layout__PCI_BUS_INTERFACE_STANDARD() { - const UNINIT: ::core::mem::MaybeUninit<_PCI_BUS_INTERFACE_STANDARD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PCI_BUS_INTERFACE_STANDARD>(), - 88usize, - concat!("Size of: ", stringify!(_PCI_BUS_INTERFACE_STANDARD)), - ); - assert_eq!( - ::core::mem::align_of::<_PCI_BUS_INTERFACE_STANDARD>(), - 8usize, - concat!("Alignment of ", stringify!(_PCI_BUS_INTERFACE_STANDARD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PCI_BUS_INTERFACE_STANDARD), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PCI_BUS_INTERFACE_STANDARD), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PCI_BUS_INTERFACE_STANDARD), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceReference) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PCI_BUS_INTERFACE_STANDARD), - "::", - stringify!(InterfaceReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterfaceDereference) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PCI_BUS_INTERFACE_STANDARD), - "::", - stringify!(InterfaceDereference), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadConfig) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PCI_BUS_INTERFACE_STANDARD), - "::", - stringify!(ReadConfig), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WriteConfig) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PCI_BUS_INTERFACE_STANDARD), - "::", - stringify!(WriteConfig), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PinToLine) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PCI_BUS_INTERFACE_STANDARD), - "::", - stringify!(PinToLine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LineToPin) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_PCI_BUS_INTERFACE_STANDARD), - "::", - stringify!(LineToPin), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RootBusCapability) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_PCI_BUS_INTERFACE_STANDARD), - "::", - stringify!(RootBusCapability), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExpressWakeControl) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_PCI_BUS_INTERFACE_STANDARD), - "::", - stringify!(ExpressWakeControl), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PrepareMultistageResume) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_PCI_BUS_INTERFACE_STANDARD), - "::", - stringify!(PrepareMultistageResume), - ), - ); -} -impl Default for _PCI_BUS_INTERFACE_STANDARD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PCI_BUS_INTERFACE_STANDARD = _PCI_BUS_INTERFACE_STANDARD; -pub type PPCI_BUS_INTERFACE_STANDARD = *mut _PCI_BUS_INTERFACE_STANDARD; -pub mod _WHEA_ERROR_SOURCE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WheaErrSrcTypeMCE: Type = 0; - pub const WheaErrSrcTypeCMC: Type = 1; - pub const WheaErrSrcTypeCPE: Type = 2; - pub const WheaErrSrcTypeNMI: Type = 3; - pub const WheaErrSrcTypePCIe: Type = 4; - pub const WheaErrSrcTypeGeneric: Type = 5; - pub const WheaErrSrcTypeINIT: Type = 6; - pub const WheaErrSrcTypeBOOT: Type = 7; - pub const WheaErrSrcTypeSCIGeneric: Type = 8; - pub const WheaErrSrcTypeIPFMCA: Type = 9; - pub const WheaErrSrcTypeIPFCMC: Type = 10; - pub const WheaErrSrcTypeIPFCPE: Type = 11; - pub const WheaErrSrcTypeGenericV2: Type = 12; - pub const WheaErrSrcTypeSCIGenericV2: Type = 13; - pub const WheaErrSrcTypeBMC: Type = 14; - pub const WheaErrSrcTypePMEM: Type = 15; - pub const WheaErrSrcTypeDeviceDriver: Type = 16; - pub const WheaErrSrcTypeSea: Type = 17; - pub const WheaErrSrcTypeSei: Type = 18; - pub const WheaErrSrcTypeMax: Type = 19; -} -pub use self::_WHEA_ERROR_SOURCE_TYPE::Type as WHEA_ERROR_SOURCE_TYPE; -pub type PWHEA_ERROR_SOURCE_TYPE = *mut _WHEA_ERROR_SOURCE_TYPE::Type; -pub mod _WHEA_ERROR_SOURCE_STATE { - pub type Type = ::core::ffi::c_int; - pub const WheaErrSrcStateStopped: Type = 1; - pub const WheaErrSrcStateStarted: Type = 2; - pub const WheaErrSrcStateRemoved: Type = 3; - pub const WheaErrSrcStateRemovePending: Type = 4; -} -pub use self::_WHEA_ERROR_SOURCE_STATE::Type as WHEA_ERROR_SOURCE_STATE; -pub type PWHEA_ERROR_SOURCE_STATE = *mut _WHEA_ERROR_SOURCE_STATE::Type; -pub type _WHEA_ERROR_SOURCE_INITIALIZE_DEVICE_DRIVER = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, ErrorSourceId: ULONG) -> NTSTATUS, ->; -pub type WHEA_ERROR_SOURCE_INITIALIZE_DEVICE_DRIVER = _WHEA_ERROR_SOURCE_INITIALIZE_DEVICE_DRIVER; -pub type _WHEA_ERROR_SOURCE_UNINITIALIZE_DEVICE_DRIVER = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID), ->; -pub type WHEA_ERROR_SOURCE_UNINITIALIZE_DEVICE_DRIVER = _WHEA_ERROR_SOURCE_UNINITIALIZE_DEVICE_DRIVER; -pub type _WHEA_ERROR_SOURCE_CORRECT_DEVICE_DRIVER = ::core::option::Option< - unsafe extern "C" fn( - ErrorSourceDesc: PVOID, - MaximumSectionLength: PULONG, - ) -> NTSTATUS, ->; -pub type WHEA_ERROR_SOURCE_CORRECT_DEVICE_DRIVER = _WHEA_ERROR_SOURCE_CORRECT_DEVICE_DRIVER; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ERROR_SOURCE_CONFIGURATION_DD { - pub Initialize: WHEA_ERROR_SOURCE_INITIALIZE_DEVICE_DRIVER, - pub Uninitialize: WHEA_ERROR_SOURCE_UNINITIALIZE_DEVICE_DRIVER, - pub Correct: WHEA_ERROR_SOURCE_CORRECT_DEVICE_DRIVER, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_SOURCE_CONFIGURATION_DD() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_SOURCE_CONFIGURATION_DD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_SOURCE_CONFIGURATION_DD>(), - 24usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DD)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_SOURCE_CONFIGURATION_DD>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Initialize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DD), - "::", - stringify!(Initialize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Uninitialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DD), - "::", - stringify!(Uninitialize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Correct) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DD), - "::", - stringify!(Correct), - ), - ); -} -pub type WHEA_ERROR_SOURCE_CONFIGURATION_DD = _WHEA_ERROR_SOURCE_CONFIGURATION_DD; -pub type PWHEA_ERROR_SOURCE_CONFIGURATION_DD = *mut _WHEA_ERROR_SOURCE_CONFIGURATION_DD; -pub type WHEA_ERROR_HANDLE = PVOID; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1 { - pub Version: ULONG, - pub SourceGuid: GUID, - pub LogTag: USHORT, - pub Reserved: [UCHAR; 6usize], - pub Initialize: WHEA_ERROR_SOURCE_INITIALIZE_DEVICE_DRIVER, - pub Uninitialize: WHEA_ERROR_SOURCE_UNINITIALIZE_DEVICE_DRIVER, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1>(), - 44usize, - concat!( - "Size of: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceGuid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1), - "::", - stringify!(SourceGuid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogTag) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1), - "::", - stringify!(LogTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Initialize) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1), - "::", - stringify!(Initialize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Uninitialize) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1), - "::", - stringify!(Uninitialize), - ), - ); -} -pub type WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1 = _WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1; -pub type PWHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1 = *mut _WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER_V1; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER { - pub Version: ULONG, - pub SourceGuid: GUID, - pub LogTag: USHORT, - pub Reserved: [UCHAR; 6usize], - pub Initialize: WHEA_ERROR_SOURCE_INITIALIZE_DEVICE_DRIVER, - pub Uninitialize: WHEA_ERROR_SOURCE_UNINITIALIZE_DEVICE_DRIVER, - pub MaxSectionDataLength: ULONG, - pub MaxSectionsPerReport: ULONG, - pub CreatorId: GUID, - pub PartitionId: GUID, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER>(), - 84usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceGuid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER), - "::", - stringify!(SourceGuid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogTag) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER), - "::", - stringify!(LogTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Initialize) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER), - "::", - stringify!(Initialize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Uninitialize) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER), - "::", - stringify!(Uninitialize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxSectionDataLength) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER), - "::", - stringify!(MaxSectionDataLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxSectionsPerReport) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER), - "::", - stringify!(MaxSectionsPerReport), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreatorId) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER), - "::", - stringify!(CreatorId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PartitionId) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER), - "::", - stringify!(PartitionId), - ), - ); -} -pub type WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER = _WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER; -pub type PWHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER = *mut _WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER; -#[repr(C, packed)] -#[derive(Debug, Copy, Clone)] -pub struct _WHEA_DRIVER_BUFFER_SET { - pub Version: ULONG, - pub Data: PUCHAR, - pub DataSize: ULONG, - pub SectionTypeGuid: LPGUID, - pub SectionFriendlyName: PUCHAR, - pub Flags: PUCHAR, -} -#[test] -fn bindgen_test_layout__WHEA_DRIVER_BUFFER_SET() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_DRIVER_BUFFER_SET> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_DRIVER_BUFFER_SET>(), - 40usize, - concat!("Size of: ", stringify!(_WHEA_DRIVER_BUFFER_SET)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_DRIVER_BUFFER_SET>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_DRIVER_BUFFER_SET)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DRIVER_BUFFER_SET), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DRIVER_BUFFER_SET), - "::", - stringify!(Data), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataSize) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DRIVER_BUFFER_SET), - "::", - stringify!(DataSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectionTypeGuid) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DRIVER_BUFFER_SET), - "::", - stringify!(SectionTypeGuid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SectionFriendlyName) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DRIVER_BUFFER_SET), - "::", - stringify!(SectionFriendlyName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DRIVER_BUFFER_SET), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _WHEA_DRIVER_BUFFER_SET { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_DRIVER_BUFFER_SET = _WHEA_DRIVER_BUFFER_SET; -pub type PWHEA_DRIVER_BUFFER_SET = *mut _WHEA_DRIVER_BUFFER_SET; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_NOTIFICATION_FLAGS { - pub __bindgen_anon_1: _WHEA_NOTIFICATION_FLAGS__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_NOTIFICATION_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_NOTIFICATION_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_NOTIFICATION_FLAGS__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_WHEA_NOTIFICATION_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_NOTIFICATION_FLAGS__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_NOTIFICATION_FLAGS__bindgen_ty_1)), - ); -} -impl _WHEA_NOTIFICATION_FLAGS__bindgen_ty_1 { - #[inline] - pub fn PollIntervalRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_PollIntervalRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn SwitchToPollingThresholdRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_SwitchToPollingThresholdRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn SwitchToPollingWindowRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_SwitchToPollingWindowRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorThresholdRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_ErrorThresholdRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorThresholdWindowRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_ErrorThresholdWindowRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 11u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 11u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PollIntervalRW: USHORT, - SwitchToPollingThresholdRW: USHORT, - SwitchToPollingWindowRW: USHORT, - ErrorThresholdRW: USHORT, - ErrorThresholdWindowRW: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let PollIntervalRW: u16 = unsafe { - ::core::mem::transmute(PollIntervalRW) - }; - PollIntervalRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let SwitchToPollingThresholdRW: u16 = unsafe { - ::core::mem::transmute(SwitchToPollingThresholdRW) - }; - SwitchToPollingThresholdRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let SwitchToPollingWindowRW: u16 = unsafe { - ::core::mem::transmute(SwitchToPollingWindowRW) - }; - SwitchToPollingWindowRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ErrorThresholdRW: u16 = unsafe { - ::core::mem::transmute(ErrorThresholdRW) - }; - ErrorThresholdRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let ErrorThresholdWindowRW: u16 = unsafe { - ::core::mem::transmute(ErrorThresholdWindowRW) - }; - ErrorThresholdWindowRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 11u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_NOTIFICATION_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_NOTIFICATION_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_NOTIFICATION_FLAGS>(), - 2usize, - concat!("Size of: ", stringify!(_WHEA_NOTIFICATION_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_NOTIFICATION_FLAGS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_NOTIFICATION_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_FLAGS), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _WHEA_NOTIFICATION_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_NOTIFICATION_FLAGS = _WHEA_NOTIFICATION_FLAGS; -pub type PWHEA_NOTIFICATION_FLAGS = *mut _WHEA_NOTIFICATION_FLAGS; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _XPF_MC_BANK_FLAGS { - pub __bindgen_anon_1: _XPF_MC_BANK_FLAGS__bindgen_ty_1, - pub AsUCHAR: UCHAR, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _XPF_MC_BANK_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__XPF_MC_BANK_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_XPF_MC_BANK_FLAGS__bindgen_ty_1>(), - 1usize, - concat!("Size of: ", stringify!(_XPF_MC_BANK_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_XPF_MC_BANK_FLAGS__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_XPF_MC_BANK_FLAGS__bindgen_ty_1)), - ); -} -impl _XPF_MC_BANK_FLAGS__bindgen_ty_1 { - #[inline] - pub fn ClearOnInitializationRW(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_ClearOnInitializationRW(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ControlDataRW(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_ControlDataRW(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u8) } - } - #[inline] - pub fn set_Reserved(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 6u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ClearOnInitializationRW: UCHAR, - ControlDataRW: UCHAR, - Reserved: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ClearOnInitializationRW: u8 = unsafe { - ::core::mem::transmute(ClearOnInitializationRW) - }; - ClearOnInitializationRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ControlDataRW: u8 = unsafe { - ::core::mem::transmute(ControlDataRW) - }; - ControlDataRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 6u8, - { - let Reserved: u8 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__XPF_MC_BANK_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_XPF_MC_BANK_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_XPF_MC_BANK_FLAGS>(), - 1usize, - concat!("Size of: ", stringify!(_XPF_MC_BANK_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_XPF_MC_BANK_FLAGS>(), - 1usize, - concat!("Alignment of ", stringify!(_XPF_MC_BANK_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUCHAR) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XPF_MC_BANK_FLAGS), - "::", - stringify!(AsUCHAR), - ), - ); -} -impl Default for _XPF_MC_BANK_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type XPF_MC_BANK_FLAGS = _XPF_MC_BANK_FLAGS; -pub type PXPF_MC_BANK_FLAGS = *mut _XPF_MC_BANK_FLAGS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _XPF_MCE_FLAGS { - pub __bindgen_anon_1: _XPF_MCE_FLAGS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _XPF_MCE_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__XPF_MCE_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_XPF_MCE_FLAGS__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_XPF_MCE_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_XPF_MCE_FLAGS__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_XPF_MCE_FLAGS__bindgen_ty_1)), - ); -} -impl _XPF_MCE_FLAGS__bindgen_ty_1 { - #[inline] - pub fn MCG_CapabilityRW(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_MCG_CapabilityRW(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn MCG_GlobalControlRW(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_MCG_GlobalControlRW(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 30u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MCG_CapabilityRW: ULONG, - MCG_GlobalControlRW: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let MCG_CapabilityRW: u32 = unsafe { - ::core::mem::transmute(MCG_CapabilityRW) - }; - MCG_CapabilityRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let MCG_GlobalControlRW: u32 = unsafe { - ::core::mem::transmute(MCG_GlobalControlRW) - }; - MCG_GlobalControlRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 30u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__XPF_MCE_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_XPF_MCE_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_XPF_MCE_FLAGS>(), - 4usize, - concat!("Size of: ", stringify!(_XPF_MCE_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_XPF_MCE_FLAGS>(), - 1usize, - concat!("Alignment of ", stringify!(_XPF_MCE_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XPF_MCE_FLAGS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _XPF_MCE_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type XPF_MCE_FLAGS = _XPF_MCE_FLAGS; -pub type PXPF_MCE_FLAGS = *mut _XPF_MCE_FLAGS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _AER_ROOTPORT_DESCRIPTOR_FLAGS { - pub __bindgen_anon_1: _AER_ROOTPORT_DESCRIPTOR_FLAGS__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _AER_ROOTPORT_DESCRIPTOR_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__AER_ROOTPORT_DESCRIPTOR_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_AER_ROOTPORT_DESCRIPTOR_FLAGS__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_AER_ROOTPORT_DESCRIPTOR_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_AER_ROOTPORT_DESCRIPTOR_FLAGS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_AER_ROOTPORT_DESCRIPTOR_FLAGS__bindgen_ty_1), - ), - ); -} -impl _AER_ROOTPORT_DESCRIPTOR_FLAGS__bindgen_ty_1 { - #[inline] - pub fn UncorrectableErrorMaskRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_UncorrectableErrorMaskRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableErrorSeverityRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_UncorrectableErrorSeverityRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn CorrectableErrorMaskRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_CorrectableErrorMaskRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AdvancedCapsAndControlRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_AdvancedCapsAndControlRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn RootErrorCommandRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_RootErrorCommandRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 11u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 11u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - UncorrectableErrorMaskRW: USHORT, - UncorrectableErrorSeverityRW: USHORT, - CorrectableErrorMaskRW: USHORT, - AdvancedCapsAndControlRW: USHORT, - RootErrorCommandRW: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let UncorrectableErrorMaskRW: u16 = unsafe { - ::core::mem::transmute(UncorrectableErrorMaskRW) - }; - UncorrectableErrorMaskRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let UncorrectableErrorSeverityRW: u16 = unsafe { - ::core::mem::transmute(UncorrectableErrorSeverityRW) - }; - UncorrectableErrorSeverityRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let CorrectableErrorMaskRW: u16 = unsafe { - ::core::mem::transmute(CorrectableErrorMaskRW) - }; - CorrectableErrorMaskRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AdvancedCapsAndControlRW: u16 = unsafe { - ::core::mem::transmute(AdvancedCapsAndControlRW) - }; - AdvancedCapsAndControlRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let RootErrorCommandRW: u16 = unsafe { - ::core::mem::transmute(RootErrorCommandRW) - }; - RootErrorCommandRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 11u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__AER_ROOTPORT_DESCRIPTOR_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_AER_ROOTPORT_DESCRIPTOR_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_AER_ROOTPORT_DESCRIPTOR_FLAGS>(), - 2usize, - concat!("Size of: ", stringify!(_AER_ROOTPORT_DESCRIPTOR_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_AER_ROOTPORT_DESCRIPTOR_FLAGS>(), - 1usize, - concat!("Alignment of ", stringify!(_AER_ROOTPORT_DESCRIPTOR_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_AER_ROOTPORT_DESCRIPTOR_FLAGS), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _AER_ROOTPORT_DESCRIPTOR_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type AER_ROOTPORT_DESCRIPTOR_FLAGS = _AER_ROOTPORT_DESCRIPTOR_FLAGS; -pub type PAER_ROOTPORT_DESCRIPTOR_FLAGS = *mut _AER_ROOTPORT_DESCRIPTOR_FLAGS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _AER_ENDPOINT_DESCRIPTOR_FLAGS { - pub __bindgen_anon_1: _AER_ENDPOINT_DESCRIPTOR_FLAGS__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _AER_ENDPOINT_DESCRIPTOR_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__AER_ENDPOINT_DESCRIPTOR_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_AER_ENDPOINT_DESCRIPTOR_FLAGS__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_AER_ENDPOINT_DESCRIPTOR_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_AER_ENDPOINT_DESCRIPTOR_FLAGS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_AER_ENDPOINT_DESCRIPTOR_FLAGS__bindgen_ty_1), - ), - ); -} -impl _AER_ENDPOINT_DESCRIPTOR_FLAGS__bindgen_ty_1 { - #[inline] - pub fn UncorrectableErrorMaskRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_UncorrectableErrorMaskRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableErrorSeverityRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_UncorrectableErrorSeverityRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn CorrectableErrorMaskRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_CorrectableErrorMaskRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AdvancedCapsAndControlRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_AdvancedCapsAndControlRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 12u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 12u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - UncorrectableErrorMaskRW: USHORT, - UncorrectableErrorSeverityRW: USHORT, - CorrectableErrorMaskRW: USHORT, - AdvancedCapsAndControlRW: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let UncorrectableErrorMaskRW: u16 = unsafe { - ::core::mem::transmute(UncorrectableErrorMaskRW) - }; - UncorrectableErrorMaskRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let UncorrectableErrorSeverityRW: u16 = unsafe { - ::core::mem::transmute(UncorrectableErrorSeverityRW) - }; - UncorrectableErrorSeverityRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let CorrectableErrorMaskRW: u16 = unsafe { - ::core::mem::transmute(CorrectableErrorMaskRW) - }; - CorrectableErrorMaskRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AdvancedCapsAndControlRW: u16 = unsafe { - ::core::mem::transmute(AdvancedCapsAndControlRW) - }; - AdvancedCapsAndControlRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 12u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__AER_ENDPOINT_DESCRIPTOR_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_AER_ENDPOINT_DESCRIPTOR_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_AER_ENDPOINT_DESCRIPTOR_FLAGS>(), - 2usize, - concat!("Size of: ", stringify!(_AER_ENDPOINT_DESCRIPTOR_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_AER_ENDPOINT_DESCRIPTOR_FLAGS>(), - 1usize, - concat!("Alignment of ", stringify!(_AER_ENDPOINT_DESCRIPTOR_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_AER_ENDPOINT_DESCRIPTOR_FLAGS), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _AER_ENDPOINT_DESCRIPTOR_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type AER_ENDPOINT_DESCRIPTOR_FLAGS = _AER_ENDPOINT_DESCRIPTOR_FLAGS; -pub type PAER_ENDPOINT_DESCRIPTOR_FLAGS = *mut _AER_ENDPOINT_DESCRIPTOR_FLAGS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _AER_BRIDGE_DESCRIPTOR_FLAGS { - pub __bindgen_anon_1: _AER_BRIDGE_DESCRIPTOR_FLAGS__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _AER_BRIDGE_DESCRIPTOR_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__AER_BRIDGE_DESCRIPTOR_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_AER_BRIDGE_DESCRIPTOR_FLAGS__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_AER_BRIDGE_DESCRIPTOR_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_AER_BRIDGE_DESCRIPTOR_FLAGS__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_AER_BRIDGE_DESCRIPTOR_FLAGS__bindgen_ty_1)), - ); -} -impl _AER_BRIDGE_DESCRIPTOR_FLAGS__bindgen_ty_1 { - #[inline] - pub fn UncorrectableErrorMaskRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_UncorrectableErrorMaskRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectableErrorSeverityRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_UncorrectableErrorSeverityRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn CorrectableErrorMaskRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_CorrectableErrorMaskRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn AdvancedCapsAndControlRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_AdvancedCapsAndControlRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn SecondaryUncorrectableErrorMaskRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_SecondaryUncorrectableErrorMaskRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn SecondaryUncorrectableErrorSevRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_SecondaryUncorrectableErrorSevRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn SecondaryCapsAndControlRW(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set_SecondaryCapsAndControlRW(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 9u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 9u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - UncorrectableErrorMaskRW: USHORT, - UncorrectableErrorSeverityRW: USHORT, - CorrectableErrorMaskRW: USHORT, - AdvancedCapsAndControlRW: USHORT, - SecondaryUncorrectableErrorMaskRW: USHORT, - SecondaryUncorrectableErrorSevRW: USHORT, - SecondaryCapsAndControlRW: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let UncorrectableErrorMaskRW: u16 = unsafe { - ::core::mem::transmute(UncorrectableErrorMaskRW) - }; - UncorrectableErrorMaskRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let UncorrectableErrorSeverityRW: u16 = unsafe { - ::core::mem::transmute(UncorrectableErrorSeverityRW) - }; - UncorrectableErrorSeverityRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let CorrectableErrorMaskRW: u16 = unsafe { - ::core::mem::transmute(CorrectableErrorMaskRW) - }; - CorrectableErrorMaskRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let AdvancedCapsAndControlRW: u16 = unsafe { - ::core::mem::transmute(AdvancedCapsAndControlRW) - }; - AdvancedCapsAndControlRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let SecondaryUncorrectableErrorMaskRW: u16 = unsafe { - ::core::mem::transmute(SecondaryUncorrectableErrorMaskRW) - }; - SecondaryUncorrectableErrorMaskRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let SecondaryUncorrectableErrorSevRW: u16 = unsafe { - ::core::mem::transmute(SecondaryUncorrectableErrorSevRW) - }; - SecondaryUncorrectableErrorSevRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let SecondaryCapsAndControlRW: u16 = unsafe { - ::core::mem::transmute(SecondaryCapsAndControlRW) - }; - SecondaryCapsAndControlRW as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 9u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__AER_BRIDGE_DESCRIPTOR_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_AER_BRIDGE_DESCRIPTOR_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_AER_BRIDGE_DESCRIPTOR_FLAGS>(), - 2usize, - concat!("Size of: ", stringify!(_AER_BRIDGE_DESCRIPTOR_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_AER_BRIDGE_DESCRIPTOR_FLAGS>(), - 1usize, - concat!("Alignment of ", stringify!(_AER_BRIDGE_DESCRIPTOR_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_AER_BRIDGE_DESCRIPTOR_FLAGS), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _AER_BRIDGE_DESCRIPTOR_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type AER_BRIDGE_DESCRIPTOR_FLAGS = _AER_BRIDGE_DESCRIPTOR_FLAGS; -pub type PAER_BRIDGE_DESCRIPTOR_FLAGS = *mut _AER_BRIDGE_DESCRIPTOR_FLAGS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_NOTIFICATION_DESCRIPTOR { - pub Type: UCHAR, - pub Length: UCHAR, - pub Flags: WHEA_NOTIFICATION_FLAGS, - pub u: _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1 { - pub Polled: _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - pub Interrupt: _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2, - pub LocalInterrupt: _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3, - pub Sci: _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4, - pub Nmi: _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5, - pub Sea: _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6, - pub Sei: _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7, - pub Gsiv: _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8, -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1 { - pub PollInterval: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PollInterval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(PollInterval), - ), - ); -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2 { - pub PollInterval: ULONG, - pub Vector: ULONG, - pub SwitchToPollingThreshold: ULONG, - pub SwitchToPollingWindow: ULONG, - pub ErrorThreshold: ULONG, - pub ErrorThresholdWindow: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2, - >(), - 24usize, - concat!( - "Size of: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PollInterval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(PollInterval), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Vector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingThreshold) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(SwitchToPollingThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingWindow) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(SwitchToPollingWindow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorThreshold) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(ErrorThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrorThresholdWindow) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(ErrorThresholdWindow), - ), - ); -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3 { - pub PollInterval: ULONG, - pub Vector: ULONG, - pub SwitchToPollingThreshold: ULONG, - pub SwitchToPollingWindow: ULONG, - pub ErrorThreshold: ULONG, - pub ErrorThresholdWindow: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3, - >(), - 24usize, - concat!( - "Size of: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PollInterval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(PollInterval), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Vector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingThreshold) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(SwitchToPollingThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingWindow) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(SwitchToPollingWindow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorThreshold) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(ErrorThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrorThresholdWindow) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(ErrorThresholdWindow), - ), - ); -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4 { - pub PollInterval: ULONG, - pub Vector: ULONG, - pub SwitchToPollingThreshold: ULONG, - pub SwitchToPollingWindow: ULONG, - pub ErrorThreshold: ULONG, - pub ErrorThresholdWindow: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4, - >(), - 24usize, - concat!( - "Size of: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PollInterval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(PollInterval), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(Vector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingThreshold) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(SwitchToPollingThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingWindow) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(SwitchToPollingWindow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorThreshold) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(ErrorThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrorThresholdWindow) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(ErrorThresholdWindow), - ), - ); -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5 { - pub PollInterval: ULONG, - pub Vector: ULONG, - pub SwitchToPollingThreshold: ULONG, - pub SwitchToPollingWindow: ULONG, - pub ErrorThreshold: ULONG, - pub ErrorThresholdWindow: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5, - >(), - 24usize, - concat!( - "Size of: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PollInterval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(PollInterval), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(Vector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingThreshold) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(SwitchToPollingThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingWindow) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(SwitchToPollingWindow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorThreshold) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(ErrorThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrorThresholdWindow) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(ErrorThresholdWindow), - ), - ); -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6 { - pub PollInterval: ULONG, - pub Vector: ULONG, - pub SwitchToPollingThreshold: ULONG, - pub SwitchToPollingWindow: ULONG, - pub ErrorThreshold: ULONG, - pub ErrorThresholdWindow: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6, - >(), - 24usize, - concat!( - "Size of: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PollInterval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(PollInterval), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(Vector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingThreshold) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(SwitchToPollingThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingWindow) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(SwitchToPollingWindow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorThreshold) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(ErrorThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrorThresholdWindow) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_6), - "::", - stringify!(ErrorThresholdWindow), - ), - ); -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7 { - pub PollInterval: ULONG, - pub Vector: ULONG, - pub SwitchToPollingThreshold: ULONG, - pub SwitchToPollingWindow: ULONG, - pub ErrorThreshold: ULONG, - pub ErrorThresholdWindow: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7, - >(), - 24usize, - concat!( - "Size of: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PollInterval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(PollInterval), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(Vector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingThreshold) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(SwitchToPollingThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingWindow) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(SwitchToPollingWindow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorThreshold) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(ErrorThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrorThresholdWindow) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_7), - "::", - stringify!(ErrorThresholdWindow), - ), - ); -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8 { - pub PollInterval: ULONG, - pub Vector: ULONG, - pub SwitchToPollingThreshold: ULONG, - pub SwitchToPollingWindow: ULONG, - pub ErrorThreshold: ULONG, - pub ErrorThresholdWindow: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8, - >(), - 24usize, - concat!( - "Size of: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PollInterval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(PollInterval), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(Vector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingThreshold) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(SwitchToPollingThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SwitchToPollingWindow) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(SwitchToPollingWindow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorThreshold) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(ErrorThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrorThresholdWindow) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1__bindgen_ty_8), - "::", - stringify!(ErrorThresholdWindow), - ), - ); -} -#[test] -fn bindgen_test_layout__WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1>(), - 24usize, - concat!("Size of: ", stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Polled) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Polled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Interrupt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Interrupt), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LocalInterrupt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(LocalInterrupt), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sci) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Sci), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Nmi) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Nmi), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sea) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Sea), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sei) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Sei), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Gsiv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(Gsiv), - ), - ); -} -impl Default for _WHEA_NOTIFICATION_DESCRIPTOR__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WHEA_NOTIFICATION_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_NOTIFICATION_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_NOTIFICATION_DESCRIPTOR>(), - 28usize, - concat!("Size of: ", stringify!(_WHEA_NOTIFICATION_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_NOTIFICATION_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_NOTIFICATION_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NOTIFICATION_DESCRIPTOR), - "::", - stringify!(u), - ), - ); -} -impl Default for _WHEA_NOTIFICATION_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_NOTIFICATION_DESCRIPTOR = _WHEA_NOTIFICATION_DESCRIPTOR; -pub type PWHEA_NOTIFICATION_DESCRIPTOR = *mut _WHEA_NOTIFICATION_DESCRIPTOR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_XPF_MC_BANK_DESCRIPTOR { - pub BankNumber: UCHAR, - pub ClearOnInitialization: BOOLEAN, - pub StatusDataFormat: UCHAR, - pub Flags: XPF_MC_BANK_FLAGS, - pub ControlMsr: ULONG, - pub StatusMsr: ULONG, - pub AddressMsr: ULONG, - pub MiscMsr: ULONG, - pub ControlData: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_XPF_MC_BANK_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_MC_BANK_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_MC_BANK_DESCRIPTOR>(), - 28usize, - concat!("Size of: ", stringify!(_WHEA_XPF_MC_BANK_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_MC_BANK_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_MC_BANK_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BankNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MC_BANK_DESCRIPTOR), - "::", - stringify!(BankNumber), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClearOnInitialization) as usize - ptr as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MC_BANK_DESCRIPTOR), - "::", - stringify!(ClearOnInitialization), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StatusDataFormat) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MC_BANK_DESCRIPTOR), - "::", - stringify!(StatusDataFormat), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MC_BANK_DESCRIPTOR), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ControlMsr) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MC_BANK_DESCRIPTOR), - "::", - stringify!(ControlMsr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StatusMsr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MC_BANK_DESCRIPTOR), - "::", - stringify!(StatusMsr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AddressMsr) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MC_BANK_DESCRIPTOR), - "::", - stringify!(AddressMsr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MiscMsr) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MC_BANK_DESCRIPTOR), - "::", - stringify!(MiscMsr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ControlData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MC_BANK_DESCRIPTOR), - "::", - stringify!(ControlData), - ), - ); -} -impl Default for _WHEA_XPF_MC_BANK_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_XPF_MC_BANK_DESCRIPTOR = _WHEA_XPF_MC_BANK_DESCRIPTOR; -pub type PWHEA_XPF_MC_BANK_DESCRIPTOR = *mut _WHEA_XPF_MC_BANK_DESCRIPTOR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_XPF_MCE_DESCRIPTOR { - pub Type: USHORT, - pub Enabled: UCHAR, - pub NumberOfBanks: UCHAR, - pub Flags: XPF_MCE_FLAGS, - pub MCG_Capability: ULONGLONG, - pub MCG_GlobalControl: ULONGLONG, - pub Banks: [WHEA_XPF_MC_BANK_DESCRIPTOR; 32usize], -} -#[test] -fn bindgen_test_layout__WHEA_XPF_MCE_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_MCE_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_MCE_DESCRIPTOR>(), - 920usize, - concat!("Size of: ", stringify!(_WHEA_XPF_MCE_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_MCE_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_MCE_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MCE_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MCE_DESCRIPTOR), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfBanks) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MCE_DESCRIPTOR), - "::", - stringify!(NumberOfBanks), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MCE_DESCRIPTOR), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MCG_Capability) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MCE_DESCRIPTOR), - "::", - stringify!(MCG_Capability), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MCG_GlobalControl) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MCE_DESCRIPTOR), - "::", - stringify!(MCG_GlobalControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Banks) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MCE_DESCRIPTOR), - "::", - stringify!(Banks), - ), - ); -} -impl Default for _WHEA_XPF_MCE_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_XPF_MCE_DESCRIPTOR = _WHEA_XPF_MCE_DESCRIPTOR; -pub type PWHEA_XPF_MCE_DESCRIPTOR = *mut _WHEA_XPF_MCE_DESCRIPTOR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_XPF_CMC_DESCRIPTOR { - pub Type: USHORT, - pub Enabled: BOOLEAN, - pub NumberOfBanks: UCHAR, - pub Reserved: ULONG, - pub Notify: WHEA_NOTIFICATION_DESCRIPTOR, - pub Banks: [WHEA_XPF_MC_BANK_DESCRIPTOR; 32usize], -} -#[test] -fn bindgen_test_layout__WHEA_XPF_CMC_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_CMC_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_CMC_DESCRIPTOR>(), - 932usize, - concat!("Size of: ", stringify!(_WHEA_XPF_CMC_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_CMC_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_CMC_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_CMC_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_CMC_DESCRIPTOR), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfBanks) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_CMC_DESCRIPTOR), - "::", - stringify!(NumberOfBanks), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_CMC_DESCRIPTOR), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Notify) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_CMC_DESCRIPTOR), - "::", - stringify!(Notify), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Banks) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_CMC_DESCRIPTOR), - "::", - stringify!(Banks), - ), - ); -} -impl Default for _WHEA_XPF_CMC_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_XPF_CMC_DESCRIPTOR = _WHEA_XPF_CMC_DESCRIPTOR; -pub type PWHEA_XPF_CMC_DESCRIPTOR = *mut _WHEA_XPF_CMC_DESCRIPTOR; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_PCI_SLOT_NUMBER { - pub u: _WHEA_PCI_SLOT_NUMBER__bindgen_ty_1, -} -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PCI_SLOT_NUMBER__bindgen_ty_1 { - pub bits: _WHEA_PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_WHEA_PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _WHEA_PCI_SLOT_NUMBER__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn DeviceNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u32) } - } - #[inline] - pub fn set_DeviceNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 5u8, val as u64) - } - } - #[inline] - pub fn FunctionNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u32) } - } - #[inline] - pub fn set_FunctionNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 3u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 24u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 24u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - DeviceNumber: ULONG, - FunctionNumber: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 5u8, - { - let DeviceNumber: u32 = unsafe { - ::core::mem::transmute(DeviceNumber) - }; - DeviceNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 3u8, - { - let FunctionNumber: u32 = unsafe { - ::core::mem::transmute(FunctionNumber) - }; - FunctionNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 24u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_PCI_SLOT_NUMBER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCI_SLOT_NUMBER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCI_SLOT_NUMBER__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_PCI_SLOT_NUMBER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCI_SLOT_NUMBER__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCI_SLOT_NUMBER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCI_SLOT_NUMBER__bindgen_ty_1), - "::", - stringify!(bits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCI_SLOT_NUMBER__bindgen_ty_1), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_PCI_SLOT_NUMBER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WHEA_PCI_SLOT_NUMBER() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCI_SLOT_NUMBER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCI_SLOT_NUMBER>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_PCI_SLOT_NUMBER)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCI_SLOT_NUMBER>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCI_SLOT_NUMBER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCI_SLOT_NUMBER), - "::", - stringify!(u), - ), - ); -} -impl Default for _WHEA_PCI_SLOT_NUMBER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCI_SLOT_NUMBER = _WHEA_PCI_SLOT_NUMBER; -pub type PWHEA_PCI_SLOT_NUMBER = *mut _WHEA_PCI_SLOT_NUMBER; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_XPF_NMI_DESCRIPTOR { - pub Type: USHORT, - pub Enabled: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEA_XPF_NMI_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_NMI_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_NMI_DESCRIPTOR>(), - 3usize, - concat!("Size of: ", stringify!(_WHEA_XPF_NMI_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_NMI_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_NMI_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_NMI_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_NMI_DESCRIPTOR), - "::", - stringify!(Enabled), - ), - ); -} -pub type WHEA_XPF_NMI_DESCRIPTOR = _WHEA_XPF_NMI_DESCRIPTOR; -pub type PWHEA_XPF_NMI_DESCRIPTOR = *mut _WHEA_XPF_NMI_DESCRIPTOR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_AER_ROOTPORT_DESCRIPTOR { - pub Type: USHORT, - pub Enabled: BOOLEAN, - pub Reserved: UCHAR, - pub BusNumber: ULONG, - pub Slot: WHEA_PCI_SLOT_NUMBER, - pub DeviceControl: USHORT, - pub Flags: AER_ROOTPORT_DESCRIPTOR_FLAGS, - pub UncorrectableErrorMask: ULONG, - pub UncorrectableErrorSeverity: ULONG, - pub CorrectableErrorMask: ULONG, - pub AdvancedCapsAndControl: ULONG, - pub RootErrorCommand: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_AER_ROOTPORT_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_AER_ROOTPORT_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_AER_ROOTPORT_DESCRIPTOR>(), - 36usize, - concat!("Size of: ", stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_AER_ROOTPORT_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusNumber) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR), - "::", - stringify!(BusNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Slot) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR), - "::", - stringify!(Slot), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceControl) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR), - "::", - stringify!(DeviceControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorMask) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR), - "::", - stringify!(UncorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorSeverity) as usize - - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR), - "::", - stringify!(UncorrectableErrorSeverity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CorrectableErrorMask) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR), - "::", - stringify!(CorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AdvancedCapsAndControl) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR), - "::", - stringify!(AdvancedCapsAndControl), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RootErrorCommand) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ROOTPORT_DESCRIPTOR), - "::", - stringify!(RootErrorCommand), - ), - ); -} -impl Default for _WHEA_AER_ROOTPORT_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_AER_ROOTPORT_DESCRIPTOR = _WHEA_AER_ROOTPORT_DESCRIPTOR; -pub type PWHEA_AER_ROOTPORT_DESCRIPTOR = *mut _WHEA_AER_ROOTPORT_DESCRIPTOR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_AER_ENDPOINT_DESCRIPTOR { - pub Type: USHORT, - pub Enabled: BOOLEAN, - pub Reserved: UCHAR, - pub BusNumber: ULONG, - pub Slot: WHEA_PCI_SLOT_NUMBER, - pub DeviceControl: USHORT, - pub Flags: AER_ENDPOINT_DESCRIPTOR_FLAGS, - pub UncorrectableErrorMask: ULONG, - pub UncorrectableErrorSeverity: ULONG, - pub CorrectableErrorMask: ULONG, - pub AdvancedCapsAndControl: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_AER_ENDPOINT_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_AER_ENDPOINT_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_AER_ENDPOINT_DESCRIPTOR>(), - 32usize, - concat!("Size of: ", stringify!(_WHEA_AER_ENDPOINT_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_AER_ENDPOINT_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_AER_ENDPOINT_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ENDPOINT_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ENDPOINT_DESCRIPTOR), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ENDPOINT_DESCRIPTOR), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusNumber) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ENDPOINT_DESCRIPTOR), - "::", - stringify!(BusNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Slot) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ENDPOINT_DESCRIPTOR), - "::", - stringify!(Slot), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceControl) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ENDPOINT_DESCRIPTOR), - "::", - stringify!(DeviceControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ENDPOINT_DESCRIPTOR), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorMask) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ENDPOINT_DESCRIPTOR), - "::", - stringify!(UncorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorSeverity) as usize - - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ENDPOINT_DESCRIPTOR), - "::", - stringify!(UncorrectableErrorSeverity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CorrectableErrorMask) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ENDPOINT_DESCRIPTOR), - "::", - stringify!(CorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AdvancedCapsAndControl) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_ENDPOINT_DESCRIPTOR), - "::", - stringify!(AdvancedCapsAndControl), - ), - ); -} -impl Default for _WHEA_AER_ENDPOINT_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_AER_ENDPOINT_DESCRIPTOR = _WHEA_AER_ENDPOINT_DESCRIPTOR; -pub type PWHEA_AER_ENDPOINT_DESCRIPTOR = *mut _WHEA_AER_ENDPOINT_DESCRIPTOR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_AER_BRIDGE_DESCRIPTOR { - pub Type: USHORT, - pub Enabled: BOOLEAN, - pub Reserved: UCHAR, - pub BusNumber: ULONG, - pub Slot: WHEA_PCI_SLOT_NUMBER, - pub DeviceControl: USHORT, - pub Flags: AER_BRIDGE_DESCRIPTOR_FLAGS, - pub UncorrectableErrorMask: ULONG, - pub UncorrectableErrorSeverity: ULONG, - pub CorrectableErrorMask: ULONG, - pub AdvancedCapsAndControl: ULONG, - pub SecondaryUncorrectableErrorMask: ULONG, - pub SecondaryUncorrectableErrorSev: ULONG, - pub SecondaryCapsAndControl: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_AER_BRIDGE_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_AER_BRIDGE_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_AER_BRIDGE_DESCRIPTOR>(), - 44usize, - concat!("Size of: ", stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_AER_BRIDGE_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusNumber) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(BusNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Slot) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(Slot), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceControl) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(DeviceControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorMask) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(UncorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorSeverity) as usize - - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(UncorrectableErrorSeverity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CorrectableErrorMask) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(CorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AdvancedCapsAndControl) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(AdvancedCapsAndControl), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecondaryUncorrectableErrorMask) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(SecondaryUncorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecondaryUncorrectableErrorSev) as usize - - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(SecondaryUncorrectableErrorSev), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecondaryCapsAndControl) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AER_BRIDGE_DESCRIPTOR), - "::", - stringify!(SecondaryCapsAndControl), - ), - ); -} -impl Default for _WHEA_AER_BRIDGE_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_AER_BRIDGE_DESCRIPTOR = _WHEA_AER_BRIDGE_DESCRIPTOR; -pub type PWHEA_AER_BRIDGE_DESCRIPTOR = *mut _WHEA_AER_BRIDGE_DESCRIPTOR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_GENERIC_ERROR_DESCRIPTOR { - pub Type: USHORT, - pub Reserved: UCHAR, - pub Enabled: UCHAR, - pub ErrStatusBlockLength: ULONG, - pub RelatedErrorSourceId: ULONG, - pub ErrStatusAddressSpaceID: UCHAR, - pub ErrStatusAddressBitWidth: UCHAR, - pub ErrStatusAddressBitOffset: UCHAR, - pub ErrStatusAddressAccessSize: UCHAR, - pub ErrStatusAddress: LARGE_INTEGER, - pub Notify: WHEA_NOTIFICATION_DESCRIPTOR, -} -#[test] -fn bindgen_test_layout__WHEA_GENERIC_ERROR_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_GENERIC_ERROR_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_GENERIC_ERROR_DESCRIPTOR>(), - 52usize, - concat!("Size of: ", stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_GENERIC_ERROR_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrStatusBlockLength) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR), - "::", - stringify!(ErrStatusBlockLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RelatedErrorSourceId) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR), - "::", - stringify!(RelatedErrorSourceId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrStatusAddressSpaceID) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR), - "::", - stringify!(ErrStatusAddressSpaceID), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrStatusAddressBitWidth) as usize - - ptr as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR), - "::", - stringify!(ErrStatusAddressBitWidth), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrStatusAddressBitOffset) as usize - - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR), - "::", - stringify!(ErrStatusAddressBitOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrStatusAddressAccessSize) as usize - - ptr as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR), - "::", - stringify!(ErrStatusAddressAccessSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrStatusAddress) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR), - "::", - stringify!(ErrStatusAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Notify) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR), - "::", - stringify!(Notify), - ), - ); -} -impl Default for _WHEA_GENERIC_ERROR_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_GENERIC_ERROR_DESCRIPTOR = _WHEA_GENERIC_ERROR_DESCRIPTOR; -pub type PWHEA_GENERIC_ERROR_DESCRIPTOR = *mut _WHEA_GENERIC_ERROR_DESCRIPTOR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_GENERIC_ERROR_DESCRIPTOR_V2 { - pub Type: USHORT, - pub Reserved: UCHAR, - pub Enabled: UCHAR, - pub ErrStatusBlockLength: ULONG, - pub RelatedErrorSourceId: ULONG, - pub ErrStatusAddressSpaceID: UCHAR, - pub ErrStatusAddressBitWidth: UCHAR, - pub ErrStatusAddressBitOffset: UCHAR, - pub ErrStatusAddressAccessSize: UCHAR, - pub ErrStatusAddress: LARGE_INTEGER, - pub Notify: WHEA_NOTIFICATION_DESCRIPTOR, - pub ReadAckAddressSpaceID: UCHAR, - pub ReadAckAddressBitWidth: UCHAR, - pub ReadAckAddressBitOffset: UCHAR, - pub ReadAckAddressAccessSize: UCHAR, - pub ReadAckAddress: LARGE_INTEGER, - pub ReadAckPreserveMask: ULONGLONG, - pub ReadAckWriteMask: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_GENERIC_ERROR_DESCRIPTOR_V2() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_GENERIC_ERROR_DESCRIPTOR_V2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_GENERIC_ERROR_DESCRIPTOR_V2>(), - 80usize, - concat!("Size of: ", stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_GENERIC_ERROR_DESCRIPTOR_V2>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrStatusBlockLength) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(ErrStatusBlockLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RelatedErrorSourceId) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(RelatedErrorSourceId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrStatusAddressSpaceID) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(ErrStatusAddressSpaceID), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrStatusAddressBitWidth) as usize - - ptr as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(ErrStatusAddressBitWidth), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrStatusAddressBitOffset) as usize - - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(ErrStatusAddressBitOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrStatusAddressAccessSize) as usize - - ptr as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(ErrStatusAddressAccessSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrStatusAddress) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(ErrStatusAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Notify) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(Notify), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadAckAddressSpaceID) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(ReadAckAddressSpaceID), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadAckAddressBitWidth) as usize - ptr as usize - }, - 53usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(ReadAckAddressBitWidth), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadAckAddressBitOffset) as usize - ptr as usize - }, - 54usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(ReadAckAddressBitOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadAckAddressAccessSize) as usize - - ptr as usize - }, - 55usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(ReadAckAddressAccessSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadAckAddress) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(ReadAckAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadAckPreserveMask) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(ReadAckPreserveMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadAckWriteMask) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DESCRIPTOR_V2), - "::", - stringify!(ReadAckWriteMask), - ), - ); -} -impl Default for _WHEA_GENERIC_ERROR_DESCRIPTOR_V2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_GENERIC_ERROR_DESCRIPTOR_V2 = _WHEA_GENERIC_ERROR_DESCRIPTOR_V2; -pub type PWHEA_GENERIC_ERROR_DESCRIPTOR_V2 = *mut _WHEA_GENERIC_ERROR_DESCRIPTOR_V2; -#[repr(C, packed)] -#[derive(Debug, Copy, Clone)] -pub struct _WHEA_DEVICE_DRIVER_DESCRIPTOR { - pub Type: USHORT, - pub Enabled: BOOLEAN, - pub Reserved: UCHAR, - pub SourceGuid: GUID, - pub LogTag: USHORT, - pub Reserved2: USHORT, - pub PacketLength: ULONG, - pub PacketCount: ULONG, - pub PacketBuffer: PUCHAR, - pub Config: WHEA_ERROR_SOURCE_CONFIGURATION_DD, - pub CreatorId: GUID, - pub PartitionId: GUID, - pub MaxSectionDataLength: ULONG, - pub MaxSectionsPerRecord: ULONG, - pub PacketStateBuffer: PUCHAR, - pub OpenHandles: LONG, -} -#[test] -fn bindgen_test_layout__WHEA_DEVICE_DRIVER_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_DEVICE_DRIVER_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_DEVICE_DRIVER_DESCRIPTOR>(), - 116usize, - concat!("Size of: ", stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_DEVICE_DRIVER_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceGuid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(SourceGuid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogTag) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(LogTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PacketLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(PacketLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PacketCount) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(PacketCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PacketBuffer) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(PacketBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Config) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(Config), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreatorId) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(CreatorId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PartitionId) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(PartitionId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxSectionDataLength) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(MaxSectionDataLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxSectionsPerRecord) as usize - ptr as usize - }, - 100usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(MaxSectionsPerRecord), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PacketStateBuffer) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(PacketStateBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OpenHandles) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_DEVICE_DRIVER_DESCRIPTOR), - "::", - stringify!(OpenHandles), - ), - ); -} -impl Default for _WHEA_DEVICE_DRIVER_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_DEVICE_DRIVER_DESCRIPTOR = _WHEA_DEVICE_DRIVER_DESCRIPTOR; -pub type PWHEA_DEVICE_DRIVER_DESCRIPTOR = *mut _WHEA_DEVICE_DRIVER_DESCRIPTOR; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_IPF_MCA_DESCRIPTOR { - pub Type: USHORT, - pub Enabled: UCHAR, - pub Reserved: UCHAR, -} -#[test] -fn bindgen_test_layout__WHEA_IPF_MCA_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_IPF_MCA_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_IPF_MCA_DESCRIPTOR>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_IPF_MCA_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_IPF_MCA_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_IPF_MCA_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_IPF_MCA_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_IPF_MCA_DESCRIPTOR), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_IPF_MCA_DESCRIPTOR), - "::", - stringify!(Reserved), - ), - ); -} -pub type WHEA_IPF_MCA_DESCRIPTOR = _WHEA_IPF_MCA_DESCRIPTOR; -pub type PWHEA_IPF_MCA_DESCRIPTOR = *mut _WHEA_IPF_MCA_DESCRIPTOR; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_IPF_CMC_DESCRIPTOR { - pub Type: USHORT, - pub Enabled: UCHAR, - pub Reserved: UCHAR, -} -#[test] -fn bindgen_test_layout__WHEA_IPF_CMC_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_IPF_CMC_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_IPF_CMC_DESCRIPTOR>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_IPF_CMC_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_IPF_CMC_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_IPF_CMC_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_IPF_CMC_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_IPF_CMC_DESCRIPTOR), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_IPF_CMC_DESCRIPTOR), - "::", - stringify!(Reserved), - ), - ); -} -pub type WHEA_IPF_CMC_DESCRIPTOR = _WHEA_IPF_CMC_DESCRIPTOR; -pub type PWHEA_IPF_CMC_DESCRIPTOR = *mut _WHEA_IPF_CMC_DESCRIPTOR; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_IPF_CPE_DESCRIPTOR { - pub Type: USHORT, - pub Enabled: UCHAR, - pub Reserved: UCHAR, -} -#[test] -fn bindgen_test_layout__WHEA_IPF_CPE_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_IPF_CPE_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_IPF_CPE_DESCRIPTOR>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_IPF_CPE_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_IPF_CPE_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_IPF_CPE_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_IPF_CPE_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_IPF_CPE_DESCRIPTOR), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_IPF_CPE_DESCRIPTOR), - "::", - stringify!(Reserved), - ), - ); -} -pub type WHEA_IPF_CPE_DESCRIPTOR = _WHEA_IPF_CPE_DESCRIPTOR; -pub type PWHEA_IPF_CPE_DESCRIPTOR = *mut _WHEA_IPF_CPE_DESCRIPTOR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_ERROR_SOURCE_DESCRIPTOR { - pub Length: ULONG, - pub Version: ULONG, - pub Type: WHEA_ERROR_SOURCE_TYPE, - pub State: WHEA_ERROR_SOURCE_STATE, - pub MaxRawDataLength: ULONG, - pub NumRecordsToPreallocate: ULONG, - pub MaxSectionsPerRecord: ULONG, - pub ErrorSourceId: ULONG, - pub PlatformErrorSourceId: ULONG, - pub Flags: ULONG, - pub Info: _WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1 { - pub XpfMceDescriptor: WHEA_XPF_MCE_DESCRIPTOR, - pub XpfCmcDescriptor: WHEA_XPF_CMC_DESCRIPTOR, - pub XpfNmiDescriptor: WHEA_XPF_NMI_DESCRIPTOR, - pub IpfMcaDescriptor: WHEA_IPF_MCA_DESCRIPTOR, - pub IpfCmcDescriptor: WHEA_IPF_CMC_DESCRIPTOR, - pub IpfCpeDescriptor: WHEA_IPF_CPE_DESCRIPTOR, - pub AerRootportDescriptor: WHEA_AER_ROOTPORT_DESCRIPTOR, - pub AerEndpointDescriptor: WHEA_AER_ENDPOINT_DESCRIPTOR, - pub AerBridgeDescriptor: WHEA_AER_BRIDGE_DESCRIPTOR, - pub GenErrDescriptor: WHEA_GENERIC_ERROR_DESCRIPTOR, - pub GenErrDescriptorV2: WHEA_GENERIC_ERROR_DESCRIPTOR_V2, - pub DeviceDriverDescriptor: WHEA_DEVICE_DRIVER_DESCRIPTOR, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1>(), - 932usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).XpfMceDescriptor) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(XpfMceDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).XpfCmcDescriptor) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(XpfCmcDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).XpfNmiDescriptor) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(XpfNmiDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IpfMcaDescriptor) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(IpfMcaDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IpfCmcDescriptor) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(IpfCmcDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IpfCpeDescriptor) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(IpfCpeDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AerRootportDescriptor) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(AerRootportDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AerEndpointDescriptor) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(AerEndpointDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AerBridgeDescriptor) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(AerBridgeDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GenErrDescriptor) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(GenErrDescriptor), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GenErrDescriptorV2) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(GenErrDescriptorV2), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceDriverDescriptor) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(DeviceDriverDescriptor), - ), - ); -} -impl Default for _WHEA_ERROR_SOURCE_DESCRIPTOR__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_SOURCE_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_SOURCE_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_SOURCE_DESCRIPTOR>(), - 972usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_SOURCE_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).State) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR), - "::", - stringify!(State), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxRawDataLength) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR), - "::", - stringify!(MaxRawDataLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumRecordsToPreallocate) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR), - "::", - stringify!(NumRecordsToPreallocate), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxSectionsPerRecord) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR), - "::", - stringify!(MaxSectionsPerRecord), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSourceId) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR), - "::", - stringify!(ErrorSourceId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PlatformErrorSourceId) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR), - "::", - stringify!(PlatformErrorSourceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Info) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_DESCRIPTOR), - "::", - stringify!(Info), - ), - ); -} -impl Default for _WHEA_ERROR_SOURCE_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_SOURCE_DESCRIPTOR = _WHEA_ERROR_SOURCE_DESCRIPTOR; -pub mod _IPMI_OS_SEL_RECORD_TYPE { - pub type Type = ::core::ffi::c_int; - pub const IpmiOsSelRecordTypeWhea: Type = 0; - pub const IpmiOsSelRecordTypeOther: Type = 1; - pub const IpmiOsSelRecordTypeWheaErrorXpfMca: Type = 2; - pub const IpmiOsSelRecordTypeWheaErrorPci: Type = 3; - pub const IpmiOsSelRecordTypeWheaErrorNmi: Type = 4; - pub const IpmiOsSelRecordTypeWheaErrorOther: Type = 5; - pub const IpmiOsSelRecordTypeRaw: Type = 6; - pub const IpmiOsSelRecordTypeDriver: Type = 7; - pub const IpmiOsSelRecordTypeBugcheckRecovery: Type = 8; - pub const IpmiOsSelRecordTypeBugcheckData: Type = 9; - pub const IpmiOsSelRecordTypeMax: Type = 10; -} -pub use self::_IPMI_OS_SEL_RECORD_TYPE::Type as IPMI_OS_SEL_RECORD_TYPE; -pub type PIPMI_OS_SEL_RECORD_TYPE = *mut _IPMI_OS_SEL_RECORD_TYPE::Type; -#[repr(C, packed)] -#[derive(Debug, Copy, Clone)] -pub struct _IPMI_OS_SEL_RECORD { - pub Signature: ULONG, - pub Version: ULONG, - pub Length: ULONG, - pub RecordType: IPMI_OS_SEL_RECORD_TYPE, - pub DataLength: ULONG, - pub Data: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__IPMI_OS_SEL_RECORD() { - const UNINIT: ::core::mem::MaybeUninit<_IPMI_OS_SEL_RECORD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IPMI_OS_SEL_RECORD>(), - 21usize, - concat!("Size of: ", stringify!(_IPMI_OS_SEL_RECORD)), - ); - assert_eq!( - ::core::mem::align_of::<_IPMI_OS_SEL_RECORD>(), - 1usize, - concat!("Alignment of ", stringify!(_IPMI_OS_SEL_RECORD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IPMI_OS_SEL_RECORD), - "::", - stringify!(Signature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IPMI_OS_SEL_RECORD), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IPMI_OS_SEL_RECORD), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecordType) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_IPMI_OS_SEL_RECORD), - "::", - stringify!(RecordType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IPMI_OS_SEL_RECORD), - "::", - stringify!(DataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_IPMI_OS_SEL_RECORD), - "::", - stringify!(Data), - ), - ); -} -impl Default for _IPMI_OS_SEL_RECORD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IPMI_OS_SEL_RECORD = _IPMI_OS_SEL_RECORD; -pub type PIPMI_OS_SEL_RECORD = *mut _IPMI_OS_SEL_RECORD; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_REVISION { - pub __bindgen_anon_1: _WHEA_REVISION__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_REVISION__bindgen_ty_1 { - pub MinorRevision: UCHAR, - pub MajorRevision: UCHAR, -} -#[test] -fn bindgen_test_layout__WHEA_REVISION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_REVISION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_REVISION__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_WHEA_REVISION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_REVISION__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_REVISION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorRevision) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_REVISION__bindgen_ty_1), - "::", - stringify!(MinorRevision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorRevision) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_REVISION__bindgen_ty_1), - "::", - stringify!(MajorRevision), - ), - ); -} -#[test] -fn bindgen_test_layout__WHEA_REVISION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_REVISION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_REVISION>(), - 2usize, - concat!("Size of: ", stringify!(_WHEA_REVISION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_REVISION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_REVISION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_REVISION), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _WHEA_REVISION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_REVISION = _WHEA_REVISION; -pub type PWHEA_REVISION = *mut _WHEA_REVISION; -pub mod _WHEA_ERROR_SEVERITY { - pub type Type = ::core::ffi::c_int; - pub const WheaErrSevRecoverable: Type = 0; - pub const WheaErrSevFatal: Type = 1; - pub const WheaErrSevCorrected: Type = 2; - pub const WheaErrSevInformational: Type = 3; -} -pub use self::_WHEA_ERROR_SEVERITY::Type as WHEA_ERROR_SEVERITY; -pub type PWHEA_ERROR_SEVERITY = *mut _WHEA_ERROR_SEVERITY::Type; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_TIMESTAMP { - pub __bindgen_anon_1: _WHEA_TIMESTAMP__bindgen_ty_1, - pub AsLARGE_INTEGER: LARGE_INTEGER, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_TIMESTAMP__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_TIMESTAMP__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_TIMESTAMP__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_TIMESTAMP__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_TIMESTAMP__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_TIMESTAMP__bindgen_ty_1)), - ); -} -impl _WHEA_TIMESTAMP__bindgen_ty_1 { - #[inline] - pub fn Seconds(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u64) } - } - #[inline] - pub fn set_Seconds(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn Minutes(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u64) } - } - #[inline] - pub fn set_Minutes(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn Hours(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 8u8) as u64) } - } - #[inline] - pub fn set_Hours(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 8u8, val as u64) - } - } - #[inline] - pub fn Precise(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } - } - #[inline] - pub fn set_Precise(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 7u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(25usize, 7u8, val as u64) - } - } - #[inline] - pub fn Day(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u64) } - } - #[inline] - pub fn set_Day(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(32usize, 8u8, val as u64) - } - } - #[inline] - pub fn Month(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(40usize, 8u8) as u64) } - } - #[inline] - pub fn set_Month(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(40usize, 8u8, val as u64) - } - } - #[inline] - pub fn Year(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(48usize, 8u8) as u64) } - } - #[inline] - pub fn set_Year(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(48usize, 8u8, val as u64) - } - } - #[inline] - pub fn Century(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(56usize, 8u8) as u64) } - } - #[inline] - pub fn set_Century(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(56usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Seconds: ULONGLONG, - Minutes: ULONGLONG, - Hours: ULONGLONG, - Precise: ULONGLONG, - Reserved: ULONGLONG, - Day: ULONGLONG, - Month: ULONGLONG, - Year: ULONGLONG, - Century: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let Seconds: u64 = unsafe { ::core::mem::transmute(Seconds) }; - Seconds as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let Minutes: u64 = unsafe { ::core::mem::transmute(Minutes) }; - Minutes as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 8u8, - { - let Hours: u64 = unsafe { ::core::mem::transmute(Hours) }; - Hours as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 1u8, - { - let Precise: u64 = unsafe { ::core::mem::transmute(Precise) }; - Precise as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 25usize, - 7u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 32usize, - 8u8, - { - let Day: u64 = unsafe { ::core::mem::transmute(Day) }; - Day as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 40usize, - 8u8, - { - let Month: u64 = unsafe { ::core::mem::transmute(Month) }; - Month as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 48usize, - 8u8, - { - let Year: u64 = unsafe { ::core::mem::transmute(Year) }; - Year as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 56usize, - 8u8, - { - let Century: u64 = unsafe { ::core::mem::transmute(Century) }; - Century as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_TIMESTAMP() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_TIMESTAMP> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_TIMESTAMP>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_TIMESTAMP)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_TIMESTAMP>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_TIMESTAMP)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsLARGE_INTEGER) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_TIMESTAMP), - "::", - stringify!(AsLARGE_INTEGER), - ), - ); -} -impl Default for _WHEA_TIMESTAMP { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_TIMESTAMP = _WHEA_TIMESTAMP; -pub type PWHEA_TIMESTAMP = *mut _WHEA_TIMESTAMP; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PERSISTENCE_INFO { - pub __bindgen_anon_1: _WHEA_PERSISTENCE_INFO__bindgen_ty_1, - pub AsULONGLONG: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PERSISTENCE_INFO__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_PERSISTENCE_INFO__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_PERSISTENCE_INFO__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_PERSISTENCE_INFO__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PERSISTENCE_INFO__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PERSISTENCE_INFO__bindgen_ty_1)), - ); -} -impl _WHEA_PERSISTENCE_INFO__bindgen_ty_1 { - #[inline] - pub fn Signature(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u64) } - } - #[inline] - pub fn set_Signature(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn Length(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 24u8) as u64) } - } - #[inline] - pub fn set_Length(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 24u8, val as u64) - } - } - #[inline] - pub fn Identifier(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(40usize, 16u8) as u64) } - } - #[inline] - pub fn set_Identifier(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(40usize, 16u8, val as u64) - } - } - #[inline] - pub fn Attributes(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(56usize, 2u8) as u64) } - } - #[inline] - pub fn set_Attributes(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(56usize, 2u8, val as u64) - } - } - #[inline] - pub fn DoNotLog(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(58usize, 1u8) as u64) } - } - #[inline] - pub fn set_DoNotLog(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(58usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(59usize, 5u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(59usize, 5u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Signature: ULONGLONG, - Length: ULONGLONG, - Identifier: ULONGLONG, - Attributes: ULONGLONG, - DoNotLog: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 16u8, - { - let Signature: u64 = unsafe { ::core::mem::transmute(Signature) }; - Signature as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 24u8, - { - let Length: u64 = unsafe { ::core::mem::transmute(Length) }; - Length as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 40usize, - 16u8, - { - let Identifier: u64 = unsafe { ::core::mem::transmute(Identifier) }; - Identifier as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 56usize, - 2u8, - { - let Attributes: u64 = unsafe { ::core::mem::transmute(Attributes) }; - Attributes as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 58usize, - 1u8, - { - let DoNotLog: u64 = unsafe { ::core::mem::transmute(DoNotLog) }; - DoNotLog as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 59usize, - 5u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_PERSISTENCE_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PERSISTENCE_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PERSISTENCE_INFO>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_PERSISTENCE_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PERSISTENCE_INFO>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PERSISTENCE_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONGLONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PERSISTENCE_INFO), - "::", - stringify!(AsULONGLONG), - ), - ); -} -impl Default for _WHEA_PERSISTENCE_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PERSISTENCE_INFO = _WHEA_PERSISTENCE_INFO; -pub type PWHEA_PERSISTENCE_INFO = *mut _WHEA_PERSISTENCE_INFO; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_ERROR_STATUS { - pub ErrorStatus: ULONGLONG, - pub __bindgen_anon_1: _WHEA_ERROR_STATUS__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ERROR_STATUS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_STATUS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_STATUS__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_STATUS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_STATUS__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_STATUS__bindgen_ty_1)), - ); -} -impl _WHEA_ERROR_STATUS__bindgen_ty_1 { - #[inline] - pub fn Reserved1(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u64) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn ErrorType(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u64) } - } - #[inline] - pub fn set_ErrorType(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn Address(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u64) } - } - #[inline] - pub fn set_Address(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn Control(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } - } - #[inline] - pub fn set_Control(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn Data(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } - } - #[inline] - pub fn set_Data(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn Responder(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } - } - #[inline] - pub fn set_Responder(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 1u8, val as u64) - } - } - #[inline] - pub fn Requester(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } - } - #[inline] - pub fn set_Requester(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 1u8, val as u64) - } - } - #[inline] - pub fn FirstError(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } - } - #[inline] - pub fn set_FirstError(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 1u8, val as u64) - } - } - #[inline] - pub fn Overflow(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } - } - #[inline] - pub fn set_Overflow(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 41u8) as u64) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(23usize, 41u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Reserved1: ULONGLONG, - ErrorType: ULONGLONG, - Address: ULONGLONG, - Control: ULONGLONG, - Data: ULONGLONG, - Responder: ULONGLONG, - Requester: ULONGLONG, - FirstError: ULONGLONG, - Overflow: ULONGLONG, - Reserved2: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let Reserved1: u64 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let ErrorType: u64 = unsafe { ::core::mem::transmute(ErrorType) }; - ErrorType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let Address: u64 = unsafe { ::core::mem::transmute(Address) }; - Address as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let Control: u64 = unsafe { ::core::mem::transmute(Control) }; - Control as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let Data: u64 = unsafe { ::core::mem::transmute(Data) }; - Data as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 1u8, - { - let Responder: u64 = unsafe { ::core::mem::transmute(Responder) }; - Responder as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 1u8, - { - let Requester: u64 = unsafe { ::core::mem::transmute(Requester) }; - Requester as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 1u8, - { - let FirstError: u64 = unsafe { ::core::mem::transmute(FirstError) }; - FirstError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 1u8, - { - let Overflow: u64 = unsafe { ::core::mem::transmute(Overflow) }; - Overflow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 23usize, - 41u8, - { - let Reserved2: u64 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_STATUS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_STATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_STATUS>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_STATUS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorStatus) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_STATUS), - "::", - stringify!(ErrorStatus), - ), - ); -} -impl Default for _WHEA_ERROR_STATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_STATUS = _WHEA_ERROR_STATUS; -pub type PWHEA_ERROR_STATUS = *mut _WHEA_ERROR_STATUS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_ERROR_RECORD_HEADER_VALIDBITS { - pub __bindgen_anon_1: _WHEA_ERROR_RECORD_HEADER_VALIDBITS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ERROR_RECORD_HEADER_VALIDBITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECORD_HEADER_VALIDBITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_RECORD_HEADER_VALIDBITS__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_WHEA_ERROR_RECORD_HEADER_VALIDBITS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_RECORD_HEADER_VALIDBITS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ERROR_RECORD_HEADER_VALIDBITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_ERROR_RECORD_HEADER_VALIDBITS__bindgen_ty_1 { - #[inline] - pub fn PlatformId(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_PlatformId(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Timestamp(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_Timestamp(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn PartitionId(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_PartitionId(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 29u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PlatformId: ULONG, - Timestamp: ULONG, - PartitionId: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let PlatformId: u32 = unsafe { ::core::mem::transmute(PlatformId) }; - PlatformId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Timestamp: u32 = unsafe { ::core::mem::transmute(Timestamp) }; - Timestamp as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let PartitionId: u32 = unsafe { - ::core::mem::transmute(PartitionId) - }; - PartitionId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 29u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECORD_HEADER_VALIDBITS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_RECORD_HEADER_VALIDBITS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_RECORD_HEADER_VALIDBITS>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_RECORD_HEADER_VALIDBITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_RECORD_HEADER_VALIDBITS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_RECORD_HEADER_VALIDBITS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER_VALIDBITS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_ERROR_RECORD_HEADER_VALIDBITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_RECORD_HEADER_VALIDBITS = _WHEA_ERROR_RECORD_HEADER_VALIDBITS; -pub type PWHEA_ERROR_RECORD_HEADER_VALIDBITS = *mut _WHEA_ERROR_RECORD_HEADER_VALIDBITS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_ERROR_RECORD_HEADER_FLAGS { - pub __bindgen_anon_1: _WHEA_ERROR_RECORD_HEADER_FLAGS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ERROR_RECORD_HEADER_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECORD_HEADER_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_RECORD_HEADER_FLAGS__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_RECORD_HEADER_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_RECORD_HEADER_FLAGS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ERROR_RECORD_HEADER_FLAGS__bindgen_ty_1), - ), - ); -} -impl _WHEA_ERROR_RECORD_HEADER_FLAGS__bindgen_ty_1 { - #[inline] - pub fn Recovered(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_Recovered(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn PreviousError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_PreviousError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Simulated(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_Simulated(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn DeviceDriver(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_DeviceDriver(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn CriticalEvent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_CriticalEvent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn PersistPfn(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_PersistPfn(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn SectionsTruncated(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_SectionsTruncated(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn RecoveryInProgress(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_RecoveryInProgress(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn Throttle(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_Throttle(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 23u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 23u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Recovered: ULONG, - PreviousError: ULONG, - Simulated: ULONG, - DeviceDriver: ULONG, - CriticalEvent: ULONG, - PersistPfn: ULONG, - SectionsTruncated: ULONG, - RecoveryInProgress: ULONG, - Throttle: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Recovered: u32 = unsafe { ::core::mem::transmute(Recovered) }; - Recovered as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let PreviousError: u32 = unsafe { - ::core::mem::transmute(PreviousError) - }; - PreviousError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Simulated: u32 = unsafe { ::core::mem::transmute(Simulated) }; - Simulated as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let DeviceDriver: u32 = unsafe { - ::core::mem::transmute(DeviceDriver) - }; - DeviceDriver as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let CriticalEvent: u32 = unsafe { - ::core::mem::transmute(CriticalEvent) - }; - CriticalEvent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let PersistPfn: u32 = unsafe { ::core::mem::transmute(PersistPfn) }; - PersistPfn as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let SectionsTruncated: u32 = unsafe { - ::core::mem::transmute(SectionsTruncated) - }; - SectionsTruncated as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let RecoveryInProgress: u32 = unsafe { - ::core::mem::transmute(RecoveryInProgress) - }; - RecoveryInProgress as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let Throttle: u32 = unsafe { ::core::mem::transmute(Throttle) }; - Throttle as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 23u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECORD_HEADER_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_RECORD_HEADER_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_RECORD_HEADER_FLAGS>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_RECORD_HEADER_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_RECORD_HEADER_FLAGS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_RECORD_HEADER_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER_FLAGS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_ERROR_RECORD_HEADER_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_RECORD_HEADER_FLAGS = _WHEA_ERROR_RECORD_HEADER_FLAGS; -pub type PWHEA_ERROR_RECORD_HEADER_FLAGS = *mut _WHEA_ERROR_RECORD_HEADER_FLAGS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_ERROR_RECORD_HEADER { - pub Signature: ULONG, - pub Revision: WHEA_REVISION, - pub SignatureEnd: ULONG, - pub SectionCount: USHORT, - pub Severity: WHEA_ERROR_SEVERITY, - pub ValidBits: WHEA_ERROR_RECORD_HEADER_VALIDBITS, - pub Length: ULONG, - pub Timestamp: WHEA_TIMESTAMP, - pub PlatformId: GUID, - pub PartitionId: GUID, - pub CreatorId: GUID, - pub NotifyType: GUID, - pub RecordId: ULONGLONG, - pub Flags: WHEA_ERROR_RECORD_HEADER_FLAGS, - pub PersistenceInfo: WHEA_PERSISTENCE_INFO, - pub __bindgen_anon_1: _WHEA_ERROR_RECORD_HEADER__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WHEA_ERROR_RECORD_HEADER__bindgen_ty_1 { - pub __bindgen_anon_1: _WHEA_ERROR_RECORD_HEADER__bindgen_ty_1__bindgen_ty_1, - pub Reserved: [UCHAR; 12usize], -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ERROR_RECORD_HEADER__bindgen_ty_1__bindgen_ty_1 { - pub OsBuildNumber: ULONG, - pub Reserved2: [UCHAR; 8usize], -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECORD_HEADER__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_ERROR_RECORD_HEADER__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_RECORD_HEADER__bindgen_ty_1__bindgen_ty_1>(), - 12usize, - concat!( - "Size of: ", - stringify!(_WHEA_ERROR_RECORD_HEADER__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_RECORD_HEADER__bindgen_ty_1__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ERROR_RECORD_HEADER__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OsBuildNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(OsBuildNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Reserved2), - ), - ); -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECORD_HEADER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_RECORD_HEADER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_RECORD_HEADER__bindgen_ty_1>(), - 12usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_RECORD_HEADER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_RECORD_HEADER__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_RECORD_HEADER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER__bindgen_ty_1), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _WHEA_ERROR_RECORD_HEADER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECORD_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_RECORD_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_RECORD_HEADER>(), - 128usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_RECORD_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_RECORD_HEADER>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_RECORD_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(Signature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SignatureEnd) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(SignatureEnd), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectionCount) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(SectionCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Severity) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(Severity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Timestamp) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(Timestamp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PlatformId) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(PlatformId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PartitionId) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(PartitionId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreatorId) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(CreatorId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NotifyType) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(NotifyType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecordId) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(RecordId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PersistenceInfo) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_HEADER), - "::", - stringify!(PersistenceInfo), - ), - ); -} -impl Default for _WHEA_ERROR_RECORD_HEADER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_RECORD_HEADER = _WHEA_ERROR_RECORD_HEADER; -pub type PWHEA_ERROR_RECORD_HEADER = *mut _WHEA_ERROR_RECORD_HEADER; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS { - pub __bindgen_anon_1: _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS__bindgen_ty_1), - ), - ); -} -impl _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS__bindgen_ty_1 { - #[inline] - pub fn Primary(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_Primary(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ContainmentWarning(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_ContainmentWarning(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reset(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_Reset(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ThresholdExceeded(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_ThresholdExceeded(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn ResourceNotAvailable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_ResourceNotAvailable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn LatentError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_LatentError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Propagated(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_Propagated(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn FruTextByPlugin(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_FruTextByPlugin(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 24u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 24u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Primary: ULONG, - ContainmentWarning: ULONG, - Reset: ULONG, - ThresholdExceeded: ULONG, - ResourceNotAvailable: ULONG, - LatentError: ULONG, - Propagated: ULONG, - FruTextByPlugin: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Primary: u32 = unsafe { ::core::mem::transmute(Primary) }; - Primary as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ContainmentWarning: u32 = unsafe { - ::core::mem::transmute(ContainmentWarning) - }; - ContainmentWarning as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Reset: u32 = unsafe { ::core::mem::transmute(Reset) }; - Reset as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ThresholdExceeded: u32 = unsafe { - ::core::mem::transmute(ThresholdExceeded) - }; - ThresholdExceeded as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let ResourceNotAvailable: u32 = unsafe { - ::core::mem::transmute(ResourceNotAvailable) - }; - ResourceNotAvailable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let LatentError: u32 = unsafe { - ::core::mem::transmute(LatentError) - }; - LatentError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let Propagated: u32 = unsafe { ::core::mem::transmute(Propagated) }; - Propagated as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let FruTextByPlugin: u32 = unsafe { - ::core::mem::transmute(FruTextByPlugin) - }; - FruTextByPlugin as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 24u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS = _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS; -pub type PWHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS = *mut _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS { - pub __bindgen_anon_1: _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS__bindgen_ty_1, - pub AsUCHAR: UCHAR, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS__bindgen_ty_1, - >(), - 1usize, - concat!( - "Size of: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS__bindgen_ty_1 { - #[inline] - pub fn FRUId(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_FRUId(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn FRUText(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_FRUText(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u8) } - } - #[inline] - pub fn set_Reserved(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 6u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - FRUId: UCHAR, - FRUText: UCHAR, - Reserved: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let FRUId: u8 = unsafe { ::core::mem::transmute(FRUId) }; - FRUId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let FRUText: u8 = unsafe { ::core::mem::transmute(FRUText) }; - FRUText as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 6u8, - { - let Reserved: u8 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS>(), - 1usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUCHAR) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS), - "::", - stringify!(AsUCHAR), - ), - ); -} -impl Default for _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS = _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS; -pub type PWHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS = *mut _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR { - pub SectionOffset: ULONG, - pub SectionLength: ULONG, - pub Revision: WHEA_REVISION, - pub ValidBits: WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_VALIDBITS, - pub Reserved: UCHAR, - pub Flags: WHEA_ERROR_RECORD_SECTION_DESCRIPTOR_FLAGS, - pub SectionType: GUID, - pub FRUId: GUID, - pub SectionSeverity: WHEA_ERROR_SEVERITY, - pub FRUText: [CCHAR; 20usize], -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECORD_SECTION_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR>(), - 72usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectionOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR), - "::", - stringify!(SectionOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectionLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR), - "::", - stringify!(SectionLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 11usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectionType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR), - "::", - stringify!(SectionType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FRUId) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR), - "::", - stringify!(FRUId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectionSeverity) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR), - "::", - stringify!(SectionSeverity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FRUText) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD_SECTION_DESCRIPTOR), - "::", - stringify!(FRUText), - ), - ); -} -impl Default for _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_RECORD_SECTION_DESCRIPTOR = _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR; -pub type PWHEA_ERROR_RECORD_SECTION_DESCRIPTOR = *mut _WHEA_ERROR_RECORD_SECTION_DESCRIPTOR; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_ERROR_RECORD { - pub Header: WHEA_ERROR_RECORD_HEADER, - pub SectionDescriptor: [WHEA_ERROR_RECORD_SECTION_DESCRIPTOR; 1usize], -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECORD() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_RECORD> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_RECORD>(), - 200usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_RECORD)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_RECORD>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_RECORD)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SectionDescriptor) as usize - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECORD), - "::", - stringify!(SectionDescriptor), - ), - ); -} -impl Default for _WHEA_ERROR_RECORD { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_RECORD = _WHEA_ERROR_RECORD; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PROCESSOR_FAMILY_INFO { - pub __bindgen_anon_1: _WHEA_PROCESSOR_FAMILY_INFO__bindgen_ty_1, - pub AsULONGLONG: ULONGLONG, -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PROCESSOR_FAMILY_INFO__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, - pub NativeModelId: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_PROCESSOR_FAMILY_INFO__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PROCESSOR_FAMILY_INFO__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PROCESSOR_FAMILY_INFO__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_PROCESSOR_FAMILY_INFO__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PROCESSOR_FAMILY_INFO__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PROCESSOR_FAMILY_INFO__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NativeModelId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_FAMILY_INFO__bindgen_ty_1), - "::", - stringify!(NativeModelId), - ), - ); -} -impl _WHEA_PROCESSOR_FAMILY_INFO__bindgen_ty_1 { - #[inline] - pub fn Stepping(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u32) } - } - #[inline] - pub fn set_Stepping(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn Model(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u32) } - } - #[inline] - pub fn set_Model(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 4u8, val as u64) - } - } - #[inline] - pub fn Family(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 4u8) as u32) } - } - #[inline] - pub fn set_Family(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 4u8, val as u64) - } - } - #[inline] - pub fn ProcessorType(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u32) } - } - #[inline] - pub fn set_ProcessorType(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 2u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 2u8, val as u64) - } - } - #[inline] - pub fn ExtendedModel(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 4u8) as u32) } - } - #[inline] - pub fn set_ExtendedModel(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 4u8, val as u64) - } - } - #[inline] - pub fn ExtendedFamily(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 8u8) as u32) } - } - #[inline] - pub fn set_ExtendedFamily(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 8u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 4u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(28usize, 4u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Stepping: ULONG, - Model: ULONG, - Family: ULONG, - ProcessorType: ULONG, - Reserved1: ULONG, - ExtendedModel: ULONG, - ExtendedFamily: ULONG, - Reserved2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let Stepping: u32 = unsafe { ::core::mem::transmute(Stepping) }; - Stepping as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 4u8, - { - let Model: u32 = unsafe { ::core::mem::transmute(Model) }; - Model as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 4u8, - { - let Family: u32 = unsafe { ::core::mem::transmute(Family) }; - Family as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 2u8, - { - let ProcessorType: u32 = unsafe { - ::core::mem::transmute(ProcessorType) - }; - ProcessorType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 2u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 4u8, - { - let ExtendedModel: u32 = unsafe { - ::core::mem::transmute(ExtendedModel) - }; - ExtendedModel as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 8u8, - { - let ExtendedFamily: u32 = unsafe { - ::core::mem::transmute(ExtendedFamily) - }; - ExtendedFamily as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 28usize, - 4u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_PROCESSOR_FAMILY_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PROCESSOR_FAMILY_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PROCESSOR_FAMILY_INFO>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_PROCESSOR_FAMILY_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PROCESSOR_FAMILY_INFO>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PROCESSOR_FAMILY_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONGLONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_FAMILY_INFO), - "::", - stringify!(AsULONGLONG), - ), - ); -} -impl Default for _WHEA_PROCESSOR_FAMILY_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PROCESSOR_FAMILY_INFO = _WHEA_PROCESSOR_FAMILY_INFO; -pub type PWHEA_PROCESSOR_FAMILY_INFO = *mut _WHEA_PROCESSOR_FAMILY_INFO; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS { - pub __bindgen_anon_1: _WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - pub ValidBits: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - #[inline] - pub fn ProcessorType(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_ProcessorType(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn InstructionSet(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_InstructionSet(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorType(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_ErrorType(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Operation(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } - } - #[inline] - pub fn set_Operation(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Flags(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } - } - #[inline] - pub fn set_Flags(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Level(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } - } - #[inline] - pub fn set_Level(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn CPUVersion(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } - } - #[inline] - pub fn set_CPUVersion(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn CPUBrandString(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } - } - #[inline] - pub fn set_CPUBrandString(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn ProcessorId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } - } - #[inline] - pub fn set_ProcessorId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn TargetAddress(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } - } - #[inline] - pub fn set_TargetAddress(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn RequesterId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } - } - #[inline] - pub fn set_RequesterId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn ResponderId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } - } - #[inline] - pub fn set_ResponderId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn InstructionPointer(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } - } - #[inline] - pub fn set_InstructionPointer(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn NativeModelId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } - } - #[inline] - pub fn set_NativeModelId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 50u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 50u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ProcessorType: ULONGLONG, - InstructionSet: ULONGLONG, - ErrorType: ULONGLONG, - Operation: ULONGLONG, - Flags: ULONGLONG, - Level: ULONGLONG, - CPUVersion: ULONGLONG, - CPUBrandString: ULONGLONG, - ProcessorId: ULONGLONG, - TargetAddress: ULONGLONG, - RequesterId: ULONGLONG, - ResponderId: ULONGLONG, - InstructionPointer: ULONGLONG, - NativeModelId: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ProcessorType: u64 = unsafe { - ::core::mem::transmute(ProcessorType) - }; - ProcessorType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let InstructionSet: u64 = unsafe { - ::core::mem::transmute(InstructionSet) - }; - InstructionSet as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let ErrorType: u64 = unsafe { ::core::mem::transmute(ErrorType) }; - ErrorType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let Operation: u64 = unsafe { ::core::mem::transmute(Operation) }; - Operation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let Flags: u64 = unsafe { ::core::mem::transmute(Flags) }; - Flags as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let Level: u64 = unsafe { ::core::mem::transmute(Level) }; - Level as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let CPUVersion: u64 = unsafe { ::core::mem::transmute(CPUVersion) }; - CPUVersion as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let CPUBrandString: u64 = unsafe { - ::core::mem::transmute(CPUBrandString) - }; - CPUBrandString as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let ProcessorId: u64 = unsafe { - ::core::mem::transmute(ProcessorId) - }; - ProcessorId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let TargetAddress: u64 = unsafe { - ::core::mem::transmute(TargetAddress) - }; - TargetAddress as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let RequesterId: u64 = unsafe { - ::core::mem::transmute(RequesterId) - }; - RequesterId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let ResponderId: u64 = unsafe { - ::core::mem::transmute(ResponderId) - }; - ResponderId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let InstructionPointer: u64 = unsafe { - ::core::mem::transmute(InstructionPointer) - }; - InstructionPointer as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 1u8, - { - let NativeModelId: u64 = unsafe { - ::core::mem::transmute(NativeModelId) - }; - NativeModelId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 50u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS), - "::", - stringify!(ValidBits), - ), - ); -} -impl Default for _WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS = _WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS; -pub type PWHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS = *mut _WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_PROCESSOR_GENERIC_ERROR_SECTION { - pub ValidBits: WHEA_PROCESSOR_GENERIC_ERROR_SECTION_VALIDBITS, - pub ProcessorType: UCHAR, - pub InstructionSet: UCHAR, - pub ErrorType: UCHAR, - pub Operation: UCHAR, - pub Flags: UCHAR, - pub Level: UCHAR, - pub Reserved: USHORT, - pub CPUVersion: ULONGLONG, - pub CPUBrandString: [UCHAR; 128usize], - pub ProcessorId: ULONGLONG, - pub TargetAddress: ULONGLONG, - pub RequesterId: ULONGLONG, - pub ResponderId: ULONGLONG, - pub InstructionPointer: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_PROCESSOR_GENERIC_ERROR_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PROCESSOR_GENERIC_ERROR_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PROCESSOR_GENERIC_ERROR_SECTION>(), - 192usize, - concat!("Size of: ", stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PROCESSOR_GENERIC_ERROR_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProcessorType) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(ProcessorType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InstructionSet) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(InstructionSet), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorType) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(ErrorType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Operation) as usize - ptr as usize }, - 11usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(Operation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Level) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(Level), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CPUVersion) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(CPUVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CPUBrandString) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(CPUBrandString), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProcessorId) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(ProcessorId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TargetAddress) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(TargetAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequesterId) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(RequesterId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResponderId) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(ResponderId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InstructionPointer) as usize - ptr as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PROCESSOR_GENERIC_ERROR_SECTION), - "::", - stringify!(InstructionPointer), - ), - ); -} -impl Default for _WHEA_PROCESSOR_GENERIC_ERROR_SECTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PROCESSOR_GENERIC_ERROR_SECTION = _WHEA_PROCESSOR_GENERIC_ERROR_SECTION; -pub type PWHEA_PROCESSOR_GENERIC_ERROR_SECTION = *mut _WHEA_PROCESSOR_GENERIC_ERROR_SECTION; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_XPF_CACHE_CHECK { - pub __bindgen_anon_1: _WHEA_XPF_CACHE_CHECK__bindgen_ty_1, - pub XpfCacheCheck: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_XPF_CACHE_CHECK__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_XPF_CACHE_CHECK__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_CACHE_CHECK__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_XPF_CACHE_CHECK__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_CACHE_CHECK__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_CACHE_CHECK__bindgen_ty_1)), - ); -} -impl _WHEA_XPF_CACHE_CHECK__bindgen_ty_1 { - #[inline] - pub fn TransactionTypeValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_TransactionTypeValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn OperationValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_OperationValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn LevelValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_LevelValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ProcessorContextCorruptValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } - } - #[inline] - pub fn set_ProcessorContextCorruptValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectedValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } - } - #[inline] - pub fn set_UncorrectedValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn PreciseIPValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } - } - #[inline] - pub fn set_PreciseIPValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestartableIPValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } - } - #[inline] - pub fn set_RestartableIPValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn OverflowValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } - } - #[inline] - pub fn set_OverflowValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u64) } - } - #[inline] - pub fn set_ReservedValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn TransactionType(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u64) } - } - #[inline] - pub fn set_TransactionType(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 2u8, val as u64) - } - } - #[inline] - pub fn Operation(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 4u8) as u64) } - } - #[inline] - pub fn set_Operation(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 4u8, val as u64) - } - } - #[inline] - pub fn Level(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 3u8) as u64) } - } - #[inline] - pub fn set_Level(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 3u8, val as u64) - } - } - #[inline] - pub fn ProcessorContextCorrupt(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } - } - #[inline] - pub fn set_ProcessorContextCorrupt(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(25usize, 1u8, val as u64) - } - } - #[inline] - pub fn Uncorrected(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } - } - #[inline] - pub fn set_Uncorrected(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(26usize, 1u8, val as u64) - } - } - #[inline] - pub fn PreciseIP(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } - } - #[inline] - pub fn set_PreciseIP(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(27usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestartableIP(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } - } - #[inline] - pub fn set_RestartableIP(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(28usize, 1u8, val as u64) - } - } - #[inline] - pub fn Overflow(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } - } - #[inline] - pub fn set_Overflow(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(29usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 34u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(30usize, 34u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TransactionTypeValid: ULONGLONG, - OperationValid: ULONGLONG, - LevelValid: ULONGLONG, - ProcessorContextCorruptValid: ULONGLONG, - UncorrectedValid: ULONGLONG, - PreciseIPValid: ULONGLONG, - RestartableIPValid: ULONGLONG, - OverflowValid: ULONGLONG, - ReservedValid: ULONGLONG, - TransactionType: ULONGLONG, - Operation: ULONGLONG, - Level: ULONGLONG, - ProcessorContextCorrupt: ULONGLONG, - Uncorrected: ULONGLONG, - PreciseIP: ULONGLONG, - RestartableIP: ULONGLONG, - Overflow: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let TransactionTypeValid: u64 = unsafe { - ::core::mem::transmute(TransactionTypeValid) - }; - TransactionTypeValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let OperationValid: u64 = unsafe { - ::core::mem::transmute(OperationValid) - }; - OperationValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let LevelValid: u64 = unsafe { ::core::mem::transmute(LevelValid) }; - LevelValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ProcessorContextCorruptValid: u64 = unsafe { - ::core::mem::transmute(ProcessorContextCorruptValid) - }; - ProcessorContextCorruptValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let UncorrectedValid: u64 = unsafe { - ::core::mem::transmute(UncorrectedValid) - }; - UncorrectedValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let PreciseIPValid: u64 = unsafe { - ::core::mem::transmute(PreciseIPValid) - }; - PreciseIPValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let RestartableIPValid: u64 = unsafe { - ::core::mem::transmute(RestartableIPValid) - }; - RestartableIPValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let OverflowValid: u64 = unsafe { - ::core::mem::transmute(OverflowValid) - }; - OverflowValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let ReservedValid: u64 = unsafe { - ::core::mem::transmute(ReservedValid) - }; - ReservedValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 2u8, - { - let TransactionType: u64 = unsafe { - ::core::mem::transmute(TransactionType) - }; - TransactionType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 4u8, - { - let Operation: u64 = unsafe { ::core::mem::transmute(Operation) }; - Operation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 3u8, - { - let Level: u64 = unsafe { ::core::mem::transmute(Level) }; - Level as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 25usize, - 1u8, - { - let ProcessorContextCorrupt: u64 = unsafe { - ::core::mem::transmute(ProcessorContextCorrupt) - }; - ProcessorContextCorrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 26usize, - 1u8, - { - let Uncorrected: u64 = unsafe { - ::core::mem::transmute(Uncorrected) - }; - Uncorrected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 27usize, - 1u8, - { - let PreciseIP: u64 = unsafe { ::core::mem::transmute(PreciseIP) }; - PreciseIP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 28usize, - 1u8, - { - let RestartableIP: u64 = unsafe { - ::core::mem::transmute(RestartableIP) - }; - RestartableIP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 29usize, - 1u8, - { - let Overflow: u64 = unsafe { ::core::mem::transmute(Overflow) }; - Overflow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 30usize, - 34u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_XPF_CACHE_CHECK() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_CACHE_CHECK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_CACHE_CHECK>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_XPF_CACHE_CHECK)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_CACHE_CHECK>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_CACHE_CHECK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).XpfCacheCheck) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_CACHE_CHECK), - "::", - stringify!(XpfCacheCheck), - ), - ); -} -impl Default for _WHEA_XPF_CACHE_CHECK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_XPF_CACHE_CHECK = _WHEA_XPF_CACHE_CHECK; -pub type PWHEA_XPF_CACHE_CHECK = *mut _WHEA_XPF_CACHE_CHECK; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_XPF_TLB_CHECK { - pub __bindgen_anon_1: _WHEA_XPF_TLB_CHECK__bindgen_ty_1, - pub XpfTLBCheck: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_XPF_TLB_CHECK__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_XPF_TLB_CHECK__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_TLB_CHECK__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_XPF_TLB_CHECK__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_TLB_CHECK__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_TLB_CHECK__bindgen_ty_1)), - ); -} -impl _WHEA_XPF_TLB_CHECK__bindgen_ty_1 { - #[inline] - pub fn TransactionTypeValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_TransactionTypeValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn OperationValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_OperationValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn LevelValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_LevelValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ProcessorContextCorruptValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } - } - #[inline] - pub fn set_ProcessorContextCorruptValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectedValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } - } - #[inline] - pub fn set_UncorrectedValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn PreciseIPValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } - } - #[inline] - pub fn set_PreciseIPValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestartableIPValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } - } - #[inline] - pub fn set_RestartableIPValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn OverflowValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } - } - #[inline] - pub fn set_OverflowValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u64) } - } - #[inline] - pub fn set_ReservedValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn TransactionType(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u64) } - } - #[inline] - pub fn set_TransactionType(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 2u8, val as u64) - } - } - #[inline] - pub fn Operation(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 4u8) as u64) } - } - #[inline] - pub fn set_Operation(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 4u8, val as u64) - } - } - #[inline] - pub fn Level(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 3u8) as u64) } - } - #[inline] - pub fn set_Level(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 3u8, val as u64) - } - } - #[inline] - pub fn ProcessorContextCorrupt(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } - } - #[inline] - pub fn set_ProcessorContextCorrupt(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(25usize, 1u8, val as u64) - } - } - #[inline] - pub fn Uncorrected(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } - } - #[inline] - pub fn set_Uncorrected(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(26usize, 1u8, val as u64) - } - } - #[inline] - pub fn PreciseIP(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } - } - #[inline] - pub fn set_PreciseIP(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(27usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestartableIP(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } - } - #[inline] - pub fn set_RestartableIP(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(28usize, 1u8, val as u64) - } - } - #[inline] - pub fn Overflow(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } - } - #[inline] - pub fn set_Overflow(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(29usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 34u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(30usize, 34u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TransactionTypeValid: ULONGLONG, - OperationValid: ULONGLONG, - LevelValid: ULONGLONG, - ProcessorContextCorruptValid: ULONGLONG, - UncorrectedValid: ULONGLONG, - PreciseIPValid: ULONGLONG, - RestartableIPValid: ULONGLONG, - OverflowValid: ULONGLONG, - ReservedValid: ULONGLONG, - TransactionType: ULONGLONG, - Operation: ULONGLONG, - Level: ULONGLONG, - ProcessorContextCorrupt: ULONGLONG, - Uncorrected: ULONGLONG, - PreciseIP: ULONGLONG, - RestartableIP: ULONGLONG, - Overflow: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let TransactionTypeValid: u64 = unsafe { - ::core::mem::transmute(TransactionTypeValid) - }; - TransactionTypeValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let OperationValid: u64 = unsafe { - ::core::mem::transmute(OperationValid) - }; - OperationValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let LevelValid: u64 = unsafe { ::core::mem::transmute(LevelValid) }; - LevelValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ProcessorContextCorruptValid: u64 = unsafe { - ::core::mem::transmute(ProcessorContextCorruptValid) - }; - ProcessorContextCorruptValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let UncorrectedValid: u64 = unsafe { - ::core::mem::transmute(UncorrectedValid) - }; - UncorrectedValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let PreciseIPValid: u64 = unsafe { - ::core::mem::transmute(PreciseIPValid) - }; - PreciseIPValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let RestartableIPValid: u64 = unsafe { - ::core::mem::transmute(RestartableIPValid) - }; - RestartableIPValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let OverflowValid: u64 = unsafe { - ::core::mem::transmute(OverflowValid) - }; - OverflowValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 8u8, - { - let ReservedValid: u64 = unsafe { - ::core::mem::transmute(ReservedValid) - }; - ReservedValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 2u8, - { - let TransactionType: u64 = unsafe { - ::core::mem::transmute(TransactionType) - }; - TransactionType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 4u8, - { - let Operation: u64 = unsafe { ::core::mem::transmute(Operation) }; - Operation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 3u8, - { - let Level: u64 = unsafe { ::core::mem::transmute(Level) }; - Level as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 25usize, - 1u8, - { - let ProcessorContextCorrupt: u64 = unsafe { - ::core::mem::transmute(ProcessorContextCorrupt) - }; - ProcessorContextCorrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 26usize, - 1u8, - { - let Uncorrected: u64 = unsafe { - ::core::mem::transmute(Uncorrected) - }; - Uncorrected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 27usize, - 1u8, - { - let PreciseIP: u64 = unsafe { ::core::mem::transmute(PreciseIP) }; - PreciseIP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 28usize, - 1u8, - { - let RestartableIP: u64 = unsafe { - ::core::mem::transmute(RestartableIP) - }; - RestartableIP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 29usize, - 1u8, - { - let Overflow: u64 = unsafe { ::core::mem::transmute(Overflow) }; - Overflow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 30usize, - 34u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_XPF_TLB_CHECK() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_TLB_CHECK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_TLB_CHECK>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_XPF_TLB_CHECK)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_TLB_CHECK>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_TLB_CHECK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).XpfTLBCheck) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_TLB_CHECK), - "::", - stringify!(XpfTLBCheck), - ), - ); -} -impl Default for _WHEA_XPF_TLB_CHECK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_XPF_TLB_CHECK = _WHEA_XPF_TLB_CHECK; -pub type PWHEA_XPF_TLB_CHECK = *mut _WHEA_XPF_TLB_CHECK; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_XPF_BUS_CHECK { - pub __bindgen_anon_1: _WHEA_XPF_BUS_CHECK__bindgen_ty_1, - pub XpfBusCheck: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_XPF_BUS_CHECK__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_XPF_BUS_CHECK__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_BUS_CHECK__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_XPF_BUS_CHECK__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_BUS_CHECK__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_BUS_CHECK__bindgen_ty_1)), - ); -} -impl _WHEA_XPF_BUS_CHECK__bindgen_ty_1 { - #[inline] - pub fn TransactionTypeValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_TransactionTypeValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn OperationValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_OperationValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn LevelValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_LevelValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ProcessorContextCorruptValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } - } - #[inline] - pub fn set_ProcessorContextCorruptValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectedValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } - } - #[inline] - pub fn set_UncorrectedValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn PreciseIPValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } - } - #[inline] - pub fn set_PreciseIPValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestartableIPValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } - } - #[inline] - pub fn set_RestartableIPValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn OverflowValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } - } - #[inline] - pub fn set_OverflowValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn ParticipationValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } - } - #[inline] - pub fn set_ParticipationValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn TimeoutValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } - } - #[inline] - pub fn set_TimeoutValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn AddressSpaceValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } - } - #[inline] - pub fn set_AddressSpaceValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 5u8) as u64) } - } - #[inline] - pub fn set_ReservedValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 5u8, val as u64) - } - } - #[inline] - pub fn TransactionType(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u64) } - } - #[inline] - pub fn set_TransactionType(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 2u8, val as u64) - } - } - #[inline] - pub fn Operation(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 4u8) as u64) } - } - #[inline] - pub fn set_Operation(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 4u8, val as u64) - } - } - #[inline] - pub fn Level(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 3u8) as u64) } - } - #[inline] - pub fn set_Level(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 3u8, val as u64) - } - } - #[inline] - pub fn ProcessorContextCorrupt(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } - } - #[inline] - pub fn set_ProcessorContextCorrupt(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(25usize, 1u8, val as u64) - } - } - #[inline] - pub fn Uncorrected(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } - } - #[inline] - pub fn set_Uncorrected(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(26usize, 1u8, val as u64) - } - } - #[inline] - pub fn PreciseIP(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } - } - #[inline] - pub fn set_PreciseIP(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(27usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestartableIP(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } - } - #[inline] - pub fn set_RestartableIP(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(28usize, 1u8, val as u64) - } - } - #[inline] - pub fn Overflow(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } - } - #[inline] - pub fn set_Overflow(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(29usize, 1u8, val as u64) - } - } - #[inline] - pub fn Participation(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 2u8) as u64) } - } - #[inline] - pub fn set_Participation(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(30usize, 2u8, val as u64) - } - } - #[inline] - pub fn Timeout(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } - } - #[inline] - pub fn set_Timeout(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(32usize, 1u8, val as u64) - } - } - #[inline] - pub fn AddressSpace(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 2u8) as u64) } - } - #[inline] - pub fn set_AddressSpace(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(33usize, 2u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 29u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(35usize, 29u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TransactionTypeValid: ULONGLONG, - OperationValid: ULONGLONG, - LevelValid: ULONGLONG, - ProcessorContextCorruptValid: ULONGLONG, - UncorrectedValid: ULONGLONG, - PreciseIPValid: ULONGLONG, - RestartableIPValid: ULONGLONG, - OverflowValid: ULONGLONG, - ParticipationValid: ULONGLONG, - TimeoutValid: ULONGLONG, - AddressSpaceValid: ULONGLONG, - ReservedValid: ULONGLONG, - TransactionType: ULONGLONG, - Operation: ULONGLONG, - Level: ULONGLONG, - ProcessorContextCorrupt: ULONGLONG, - Uncorrected: ULONGLONG, - PreciseIP: ULONGLONG, - RestartableIP: ULONGLONG, - Overflow: ULONGLONG, - Participation: ULONGLONG, - Timeout: ULONGLONG, - AddressSpace: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let TransactionTypeValid: u64 = unsafe { - ::core::mem::transmute(TransactionTypeValid) - }; - TransactionTypeValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let OperationValid: u64 = unsafe { - ::core::mem::transmute(OperationValid) - }; - OperationValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let LevelValid: u64 = unsafe { ::core::mem::transmute(LevelValid) }; - LevelValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ProcessorContextCorruptValid: u64 = unsafe { - ::core::mem::transmute(ProcessorContextCorruptValid) - }; - ProcessorContextCorruptValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let UncorrectedValid: u64 = unsafe { - ::core::mem::transmute(UncorrectedValid) - }; - UncorrectedValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let PreciseIPValid: u64 = unsafe { - ::core::mem::transmute(PreciseIPValid) - }; - PreciseIPValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let RestartableIPValid: u64 = unsafe { - ::core::mem::transmute(RestartableIPValid) - }; - RestartableIPValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let OverflowValid: u64 = unsafe { - ::core::mem::transmute(OverflowValid) - }; - OverflowValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let ParticipationValid: u64 = unsafe { - ::core::mem::transmute(ParticipationValid) - }; - ParticipationValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let TimeoutValid: u64 = unsafe { - ::core::mem::transmute(TimeoutValid) - }; - TimeoutValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let AddressSpaceValid: u64 = unsafe { - ::core::mem::transmute(AddressSpaceValid) - }; - AddressSpaceValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 5u8, - { - let ReservedValid: u64 = unsafe { - ::core::mem::transmute(ReservedValid) - }; - ReservedValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 2u8, - { - let TransactionType: u64 = unsafe { - ::core::mem::transmute(TransactionType) - }; - TransactionType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 4u8, - { - let Operation: u64 = unsafe { ::core::mem::transmute(Operation) }; - Operation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 3u8, - { - let Level: u64 = unsafe { ::core::mem::transmute(Level) }; - Level as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 25usize, - 1u8, - { - let ProcessorContextCorrupt: u64 = unsafe { - ::core::mem::transmute(ProcessorContextCorrupt) - }; - ProcessorContextCorrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 26usize, - 1u8, - { - let Uncorrected: u64 = unsafe { - ::core::mem::transmute(Uncorrected) - }; - Uncorrected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 27usize, - 1u8, - { - let PreciseIP: u64 = unsafe { ::core::mem::transmute(PreciseIP) }; - PreciseIP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 28usize, - 1u8, - { - let RestartableIP: u64 = unsafe { - ::core::mem::transmute(RestartableIP) - }; - RestartableIP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 29usize, - 1u8, - { - let Overflow: u64 = unsafe { ::core::mem::transmute(Overflow) }; - Overflow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 30usize, - 2u8, - { - let Participation: u64 = unsafe { - ::core::mem::transmute(Participation) - }; - Participation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 32usize, - 1u8, - { - let Timeout: u64 = unsafe { ::core::mem::transmute(Timeout) }; - Timeout as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 33usize, - 2u8, - { - let AddressSpace: u64 = unsafe { - ::core::mem::transmute(AddressSpace) - }; - AddressSpace as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 35usize, - 29u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_XPF_BUS_CHECK() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_BUS_CHECK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_BUS_CHECK>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_XPF_BUS_CHECK)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_BUS_CHECK>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_BUS_CHECK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).XpfBusCheck) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_BUS_CHECK), - "::", - stringify!(XpfBusCheck), - ), - ); -} -impl Default for _WHEA_XPF_BUS_CHECK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_XPF_BUS_CHECK = _WHEA_XPF_BUS_CHECK; -pub type PWHEA_XPF_BUS_CHECK = *mut _WHEA_XPF_BUS_CHECK; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_XPF_MS_CHECK { - pub __bindgen_anon_1: _WHEA_XPF_MS_CHECK__bindgen_ty_1, - pub XpfMsCheck: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_XPF_MS_CHECK__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_XPF_MS_CHECK__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_MS_CHECK__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_XPF_MS_CHECK__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_MS_CHECK__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_MS_CHECK__bindgen_ty_1)), - ); -} -impl _WHEA_XPF_MS_CHECK__bindgen_ty_1 { - #[inline] - pub fn ErrorTypeValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_ErrorTypeValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ProcessorContextCorruptValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_ProcessorContextCorruptValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectedValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_UncorrectedValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn PreciseIPValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } - } - #[inline] - pub fn set_PreciseIPValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestartableIPValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } - } - #[inline] - pub fn set_RestartableIPValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn OverflowValid(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } - } - #[inline] - pub fn set_OverflowValid(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn ReservedValue(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 10u8) as u64) } - } - #[inline] - pub fn set_ReservedValue(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 10u8, val as u64) - } - } - #[inline] - pub fn ErrorType(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 3u8) as u64) } - } - #[inline] - pub fn set_ErrorType(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 3u8, val as u64) - } - } - #[inline] - pub fn ProcessorContextCorrupt(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } - } - #[inline] - pub fn set_ProcessorContextCorrupt(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 1u8, val as u64) - } - } - #[inline] - pub fn Uncorrected(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } - } - #[inline] - pub fn set_Uncorrected(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 1u8, val as u64) - } - } - #[inline] - pub fn PreciseIP(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } - } - #[inline] - pub fn set_PreciseIP(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestartableIP(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } - } - #[inline] - pub fn set_RestartableIP(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 1u8, val as u64) - } - } - #[inline] - pub fn Overflow(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } - } - #[inline] - pub fn set_Overflow(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(23usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 40u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 40u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ErrorTypeValid: ULONGLONG, - ProcessorContextCorruptValid: ULONGLONG, - UncorrectedValid: ULONGLONG, - PreciseIPValid: ULONGLONG, - RestartableIPValid: ULONGLONG, - OverflowValid: ULONGLONG, - ReservedValue: ULONGLONG, - ErrorType: ULONGLONG, - ProcessorContextCorrupt: ULONGLONG, - Uncorrected: ULONGLONG, - PreciseIP: ULONGLONG, - RestartableIP: ULONGLONG, - Overflow: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ErrorTypeValid: u64 = unsafe { - ::core::mem::transmute(ErrorTypeValid) - }; - ErrorTypeValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ProcessorContextCorruptValid: u64 = unsafe { - ::core::mem::transmute(ProcessorContextCorruptValid) - }; - ProcessorContextCorruptValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let UncorrectedValid: u64 = unsafe { - ::core::mem::transmute(UncorrectedValid) - }; - UncorrectedValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let PreciseIPValid: u64 = unsafe { - ::core::mem::transmute(PreciseIPValid) - }; - PreciseIPValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let RestartableIPValid: u64 = unsafe { - ::core::mem::transmute(RestartableIPValid) - }; - RestartableIPValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let OverflowValid: u64 = unsafe { - ::core::mem::transmute(OverflowValid) - }; - OverflowValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 10u8, - { - let ReservedValue: u64 = unsafe { - ::core::mem::transmute(ReservedValue) - }; - ReservedValue as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 3u8, - { - let ErrorType: u64 = unsafe { ::core::mem::transmute(ErrorType) }; - ErrorType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 1u8, - { - let ProcessorContextCorrupt: u64 = unsafe { - ::core::mem::transmute(ProcessorContextCorrupt) - }; - ProcessorContextCorrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 1u8, - { - let Uncorrected: u64 = unsafe { - ::core::mem::transmute(Uncorrected) - }; - Uncorrected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 1u8, - { - let PreciseIP: u64 = unsafe { ::core::mem::transmute(PreciseIP) }; - PreciseIP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 1u8, - { - let RestartableIP: u64 = unsafe { - ::core::mem::transmute(RestartableIP) - }; - RestartableIP as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 23usize, - 1u8, - { - let Overflow: u64 = unsafe { ::core::mem::transmute(Overflow) }; - Overflow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 40u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_XPF_MS_CHECK() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_MS_CHECK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_MS_CHECK>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_XPF_MS_CHECK)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_MS_CHECK>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_MS_CHECK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).XpfMsCheck) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MS_CHECK), - "::", - stringify!(XpfMsCheck), - ), - ); -} -impl Default for _WHEA_XPF_MS_CHECK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_XPF_MS_CHECK = _WHEA_XPF_MS_CHECK; -pub type PWHEA_XPF_MS_CHECK = *mut _WHEA_XPF_MS_CHECK; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_XPF_PROCINFO_VALIDBITS { - pub __bindgen_anon_1: _WHEA_XPF_PROCINFO_VALIDBITS__bindgen_ty_1, - pub ValidBits: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_XPF_PROCINFO_VALIDBITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_XPF_PROCINFO_VALIDBITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_PROCINFO_VALIDBITS__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_XPF_PROCINFO_VALIDBITS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_PROCINFO_VALIDBITS__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_PROCINFO_VALIDBITS__bindgen_ty_1)), - ); -} -impl _WHEA_XPF_PROCINFO_VALIDBITS__bindgen_ty_1 { - #[inline] - pub fn CheckInfo(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_CheckInfo(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn TargetId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_TargetId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn RequesterId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_RequesterId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ResponderId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } - } - #[inline] - pub fn set_ResponderId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn InstructionPointer(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } - } - #[inline] - pub fn set_InstructionPointer(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 59u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 59u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - CheckInfo: ULONGLONG, - TargetId: ULONGLONG, - RequesterId: ULONGLONG, - ResponderId: ULONGLONG, - InstructionPointer: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let CheckInfo: u64 = unsafe { ::core::mem::transmute(CheckInfo) }; - CheckInfo as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let TargetId: u64 = unsafe { ::core::mem::transmute(TargetId) }; - TargetId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let RequesterId: u64 = unsafe { - ::core::mem::transmute(RequesterId) - }; - RequesterId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ResponderId: u64 = unsafe { - ::core::mem::transmute(ResponderId) - }; - ResponderId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let InstructionPointer: u64 = unsafe { - ::core::mem::transmute(InstructionPointer) - }; - InstructionPointer as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 59u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_XPF_PROCINFO_VALIDBITS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_PROCINFO_VALIDBITS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_PROCINFO_VALIDBITS>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_XPF_PROCINFO_VALIDBITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_PROCINFO_VALIDBITS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_PROCINFO_VALIDBITS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCINFO_VALIDBITS), - "::", - stringify!(ValidBits), - ), - ); -} -impl Default for _WHEA_XPF_PROCINFO_VALIDBITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_XPF_PROCINFO_VALIDBITS = _WHEA_XPF_PROCINFO_VALIDBITS; -pub type PWHEA_XPF_PROCINFO_VALIDBITS = *mut _WHEA_XPF_PROCINFO_VALIDBITS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_XPF_PROCINFO { - pub CheckInfoId: GUID, - pub ValidBits: WHEA_XPF_PROCINFO_VALIDBITS, - pub CheckInfo: _WHEA_XPF_PROCINFO__bindgen_ty_1, - pub TargetId: ULONGLONG, - pub RequesterId: ULONGLONG, - pub ResponderId: ULONGLONG, - pub InstructionPointer: ULONGLONG, -} -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_XPF_PROCINFO__bindgen_ty_1 { - pub CacheCheck: WHEA_XPF_CACHE_CHECK, - pub TlbCheck: WHEA_XPF_TLB_CHECK, - pub BusCheck: WHEA_XPF_BUS_CHECK, - pub MsCheck: WHEA_XPF_MS_CHECK, - pub AsULONGLONG: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_XPF_PROCINFO__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_PROCINFO__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_PROCINFO__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_XPF_PROCINFO__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_PROCINFO__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_PROCINFO__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CacheCheck) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCINFO__bindgen_ty_1), - "::", - stringify!(CacheCheck), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TlbCheck) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCINFO__bindgen_ty_1), - "::", - stringify!(TlbCheck), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusCheck) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCINFO__bindgen_ty_1), - "::", - stringify!(BusCheck), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MsCheck) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCINFO__bindgen_ty_1), - "::", - stringify!(MsCheck), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONGLONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCINFO__bindgen_ty_1), - "::", - stringify!(AsULONGLONG), - ), - ); -} -impl Default for _WHEA_XPF_PROCINFO__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WHEA_XPF_PROCINFO() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_PROCINFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_PROCINFO>(), - 64usize, - concat!("Size of: ", stringify!(_WHEA_XPF_PROCINFO)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_PROCINFO>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_PROCINFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CheckInfoId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCINFO), - "::", - stringify!(CheckInfoId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCINFO), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CheckInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCINFO), - "::", - stringify!(CheckInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TargetId) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCINFO), - "::", - stringify!(TargetId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequesterId) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCINFO), - "::", - stringify!(RequesterId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResponderId) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCINFO), - "::", - stringify!(ResponderId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InstructionPointer) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCINFO), - "::", - stringify!(InstructionPointer), - ), - ); -} -impl Default for _WHEA_XPF_PROCINFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_XPF_PROCINFO = _WHEA_XPF_PROCINFO; -pub type PWHEA_XPF_PROCINFO = *mut _WHEA_XPF_PROCINFO; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_X86_REGISTER_STATE { - pub Eax: ULONG, - pub Ebx: ULONG, - pub Ecx: ULONG, - pub Edx: ULONG, - pub Esi: ULONG, - pub Edi: ULONG, - pub Ebp: ULONG, - pub Esp: ULONG, - pub Cs: USHORT, - pub Ds: USHORT, - pub Ss: USHORT, - pub Es: USHORT, - pub Fs: USHORT, - pub Gs: USHORT, - pub Eflags: ULONG, - pub Eip: ULONG, - pub Cr0: ULONG, - pub Cr1: ULONG, - pub Cr2: ULONG, - pub Cr3: ULONG, - pub Cr4: ULONG, - pub Gdtr: ULONGLONG, - pub Idtr: ULONGLONG, - pub Ldtr: USHORT, - pub Tr: USHORT, -} -#[test] -fn bindgen_test_layout__WHEA_X86_REGISTER_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_X86_REGISTER_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_X86_REGISTER_STATE>(), - 92usize, - concat!("Size of: ", stringify!(_WHEA_X86_REGISTER_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_X86_REGISTER_STATE>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_X86_REGISTER_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Eax) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Eax), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ebx) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Ebx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ecx) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Ecx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Edx) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Edx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Esi) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Esi), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Edi) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Edi), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ebp) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Ebp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Esp) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Esp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cs) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Cs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ds) as usize - ptr as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Ds), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ss) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Ss), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Es) as usize - ptr as usize }, - 38usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Es), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Fs) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Fs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Gs) as usize - ptr as usize }, - 42usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Gs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Eflags) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Eflags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Eip) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Eip), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cr0) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Cr0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cr1) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Cr1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cr2) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Cr2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cr3) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Cr3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cr4) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Cr4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Gdtr) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Gdtr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Idtr) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Idtr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ldtr) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Ldtr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Tr) as usize - ptr as usize }, - 90usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X86_REGISTER_STATE), - "::", - stringify!(Tr), - ), - ); -} -pub type WHEA_X86_REGISTER_STATE = _WHEA_X86_REGISTER_STATE; -pub type PWHEA_X86_REGISTER_STATE = *mut _WHEA_X86_REGISTER_STATE; -#[repr(C)] -#[repr(align(16))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA128A { - pub Low: ULONGLONG, - pub High: LONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA128A() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA128A> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA128A>(), - 16usize, - concat!("Size of: ", stringify!(_WHEA128A)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA128A>(), - 16usize, - concat!("Alignment of ", stringify!(_WHEA128A)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Low) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_WHEA128A), "::", stringify!(Low)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).High) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_WHEA128A), "::", stringify!(High)), - ); -} -pub type WHEA128A = _WHEA128A; -pub type PWHEA128A = *mut _WHEA128A; -#[repr(C)] -#[repr(align(16))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_X64_REGISTER_STATE { - pub Rax: ULONGLONG, - pub Rbx: ULONGLONG, - pub Rcx: ULONGLONG, - pub Rdx: ULONGLONG, - pub Rsi: ULONGLONG, - pub Rdi: ULONGLONG, - pub Rbp: ULONGLONG, - pub Rsp: ULONGLONG, - pub R8: ULONGLONG, - pub R9: ULONGLONG, - pub R10: ULONGLONG, - pub R11: ULONGLONG, - pub R12: ULONGLONG, - pub R13: ULONGLONG, - pub R14: ULONGLONG, - pub R15: ULONGLONG, - pub Cs: USHORT, - pub Ds: USHORT, - pub Ss: USHORT, - pub Es: USHORT, - pub Fs: USHORT, - pub Gs: USHORT, - pub Reserved: ULONG, - pub Rflags: ULONGLONG, - pub Eip: ULONGLONG, - pub Cr0: ULONGLONG, - pub Cr1: ULONGLONG, - pub Cr2: ULONGLONG, - pub Cr3: ULONGLONG, - pub Cr4: ULONGLONG, - pub Cr8: ULONGLONG, - pub Gdtr: WHEA128A, - pub Idtr: WHEA128A, - pub Ldtr: USHORT, - pub Tr: USHORT, -} -#[test] -fn bindgen_test_layout__WHEA_X64_REGISTER_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_X64_REGISTER_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_X64_REGISTER_STATE>(), - 256usize, - concat!("Size of: ", stringify!(_WHEA_X64_REGISTER_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_X64_REGISTER_STATE>(), - 16usize, - concat!("Alignment of ", stringify!(_WHEA_X64_REGISTER_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rax) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Rax), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rbx) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Rbx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rcx) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Rcx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rdx) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Rdx), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rsi) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Rsi), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rdi) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Rdi), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rbp) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Rbp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rsp) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Rsp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R8) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(R8), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R9) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(R9), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R10) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(R10), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R11) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(R11), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R12) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(R12), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R13) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(R13), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R14) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(R14), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R15) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(R15), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cs) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Cs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ds) as usize - ptr as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Ds), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ss) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Ss), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Es) as usize - ptr as usize }, - 134usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Es), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Fs) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Fs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Gs) as usize - ptr as usize }, - 138usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Gs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Rflags) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Rflags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Eip) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Eip), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cr0) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Cr0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cr1) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Cr1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cr2) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Cr2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cr3) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Cr3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cr4) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Cr4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cr8) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Cr8), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Gdtr) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Gdtr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Idtr) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Idtr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ldtr) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Ldtr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Tr) as usize - ptr as usize }, - 242usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_X64_REGISTER_STATE), - "::", - stringify!(Tr), - ), - ); -} -pub type WHEA_X64_REGISTER_STATE = _WHEA_X64_REGISTER_STATE; -pub type PWHEA_X64_REGISTER_STATE = *mut _WHEA_X64_REGISTER_STATE; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_XPF_CONTEXT_INFO { - pub RegisterContextType: USHORT, - pub RegisterDataSize: USHORT, - pub MSRAddress: ULONG, - pub MmRegisterAddress: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_XPF_CONTEXT_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_CONTEXT_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_CONTEXT_INFO>(), - 16usize, - concat!("Size of: ", stringify!(_WHEA_XPF_CONTEXT_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_CONTEXT_INFO>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_CONTEXT_INFO)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RegisterContextType) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_CONTEXT_INFO), - "::", - stringify!(RegisterContextType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RegisterDataSize) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_CONTEXT_INFO), - "::", - stringify!(RegisterDataSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MSRAddress) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_CONTEXT_INFO), - "::", - stringify!(MSRAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MmRegisterAddress) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_CONTEXT_INFO), - "::", - stringify!(MmRegisterAddress), - ), - ); -} -pub type WHEA_XPF_CONTEXT_INFO = _WHEA_XPF_CONTEXT_INFO; -pub type PWHEA_XPF_CONTEXT_INFO = *mut _WHEA_XPF_CONTEXT_INFO; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS { - pub __bindgen_anon_1: _WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - pub ValidBits: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - #[inline] - pub fn LocalAPICId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_LocalAPICId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn CpuId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_CpuId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ProcInfoCount(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u64) } - } - #[inline] - pub fn set_ProcInfoCount(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 6u8, val as u64) - } - } - #[inline] - pub fn ContextInfoCount(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 6u8) as u64) } - } - #[inline] - pub fn set_ContextInfoCount(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 6u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 50u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 50u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - LocalAPICId: ULONGLONG, - CpuId: ULONGLONG, - ProcInfoCount: ULONGLONG, - ContextInfoCount: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let LocalAPICId: u64 = unsafe { - ::core::mem::transmute(LocalAPICId) - }; - LocalAPICId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let CpuId: u64 = unsafe { ::core::mem::transmute(CpuId) }; - CpuId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 6u8, - { - let ProcInfoCount: u64 = unsafe { - ::core::mem::transmute(ProcInfoCount) - }; - ProcInfoCount as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 6u8, - { - let ContextInfoCount: u64 = unsafe { - ::core::mem::transmute(ContextInfoCount) - }; - ContextInfoCount as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 50u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS), - "::", - stringify!(ValidBits), - ), - ); -} -impl Default for _WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS = _WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS; -pub type PWHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS = *mut _WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_XPF_PROCESSOR_ERROR_SECTION { - pub ValidBits: WHEA_XPF_PROCESSOR_ERROR_SECTION_VALIDBITS, - pub LocalAPICId: ULONGLONG, - pub CpuId: [UCHAR; 48usize], - pub VariableInfo: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__WHEA_XPF_PROCESSOR_ERROR_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_PROCESSOR_ERROR_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_PROCESSOR_ERROR_SECTION>(), - 65usize, - concat!("Size of: ", stringify!(_WHEA_XPF_PROCESSOR_ERROR_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_PROCESSOR_ERROR_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_PROCESSOR_ERROR_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCESSOR_ERROR_SECTION), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LocalAPICId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCESSOR_ERROR_SECTION), - "::", - stringify!(LocalAPICId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CpuId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCESSOR_ERROR_SECTION), - "::", - stringify!(CpuId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VariableInfo) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_PROCESSOR_ERROR_SECTION), - "::", - stringify!(VariableInfo), - ), - ); -} -impl Default for _WHEA_XPF_PROCESSOR_ERROR_SECTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_XPF_PROCESSOR_ERROR_SECTION = _WHEA_XPF_PROCESSOR_ERROR_SECTION; -pub type PWHEA_XPF_PROCESSOR_ERROR_SECTION = *mut _WHEA_XPF_PROCESSOR_ERROR_SECTION; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_MEMORY_ERROR_SECTION_VALIDBITS { - pub __bindgen_anon_1: _WHEA_MEMORY_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - pub ValidBits: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_MEMORY_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_MEMORY_ERROR_SECTION_VALIDBITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_MEMORY_ERROR_SECTION_VALIDBITS__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_MEMORY_ERROR_SECTION_VALIDBITS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_MEMORY_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_MEMORY_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - #[inline] - pub fn ErrorStatus(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_ErrorStatus(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn PhysicalAddress(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_PhysicalAddress(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn PhysicalAddressMask(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_PhysicalAddressMask(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Node(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } - } - #[inline] - pub fn set_Node(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Card(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } - } - #[inline] - pub fn set_Card(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Module(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } - } - #[inline] - pub fn set_Module(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Bank(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } - } - #[inline] - pub fn set_Bank(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn Device(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } - } - #[inline] - pub fn set_Device(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn Row(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } - } - #[inline] - pub fn set_Row(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn Column(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } - } - #[inline] - pub fn set_Column(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn BitPosition(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } - } - #[inline] - pub fn set_BitPosition(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn RequesterId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } - } - #[inline] - pub fn set_RequesterId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn ResponderId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } - } - #[inline] - pub fn set_ResponderId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn TargetId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } - } - #[inline] - pub fn set_TargetId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorType(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } - } - #[inline] - pub fn set_ErrorType(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn RankNumber(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u64) } - } - #[inline] - pub fn set_RankNumber(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn CardHandle(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u64) } - } - #[inline] - pub fn set_CardHandle(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn ModuleHandle(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } - } - #[inline] - pub fn set_ModuleHandle(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn ExtendedRow(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } - } - #[inline] - pub fn set_ExtendedRow(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn BankGroup(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } - } - #[inline] - pub fn set_BankGroup(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(19usize, 1u8, val as u64) - } - } - #[inline] - pub fn BankAddress(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } - } - #[inline] - pub fn set_BankAddress(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 1u8, val as u64) - } - } - #[inline] - pub fn ChipIdentification(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } - } - #[inline] - pub fn set_ChipIdentification(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 42u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 42u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ErrorStatus: ULONGLONG, - PhysicalAddress: ULONGLONG, - PhysicalAddressMask: ULONGLONG, - Node: ULONGLONG, - Card: ULONGLONG, - Module: ULONGLONG, - Bank: ULONGLONG, - Device: ULONGLONG, - Row: ULONGLONG, - Column: ULONGLONG, - BitPosition: ULONGLONG, - RequesterId: ULONGLONG, - ResponderId: ULONGLONG, - TargetId: ULONGLONG, - ErrorType: ULONGLONG, - RankNumber: ULONGLONG, - CardHandle: ULONGLONG, - ModuleHandle: ULONGLONG, - ExtendedRow: ULONGLONG, - BankGroup: ULONGLONG, - BankAddress: ULONGLONG, - ChipIdentification: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ErrorStatus: u64 = unsafe { - ::core::mem::transmute(ErrorStatus) - }; - ErrorStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let PhysicalAddress: u64 = unsafe { - ::core::mem::transmute(PhysicalAddress) - }; - PhysicalAddress as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let PhysicalAddressMask: u64 = unsafe { - ::core::mem::transmute(PhysicalAddressMask) - }; - PhysicalAddressMask as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let Node: u64 = unsafe { ::core::mem::transmute(Node) }; - Node as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let Card: u64 = unsafe { ::core::mem::transmute(Card) }; - Card as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let Module: u64 = unsafe { ::core::mem::transmute(Module) }; - Module as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let Bank: u64 = unsafe { ::core::mem::transmute(Bank) }; - Bank as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let Device: u64 = unsafe { ::core::mem::transmute(Device) }; - Device as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let Row: u64 = unsafe { ::core::mem::transmute(Row) }; - Row as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let Column: u64 = unsafe { ::core::mem::transmute(Column) }; - Column as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let BitPosition: u64 = unsafe { - ::core::mem::transmute(BitPosition) - }; - BitPosition as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let RequesterId: u64 = unsafe { - ::core::mem::transmute(RequesterId) - }; - RequesterId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let ResponderId: u64 = unsafe { - ::core::mem::transmute(ResponderId) - }; - ResponderId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 1u8, - { - let TargetId: u64 = unsafe { ::core::mem::transmute(TargetId) }; - TargetId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 1u8, - { - let ErrorType: u64 = unsafe { ::core::mem::transmute(ErrorType) }; - ErrorType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let RankNumber: u64 = unsafe { ::core::mem::transmute(RankNumber) }; - RankNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let CardHandle: u64 = unsafe { ::core::mem::transmute(CardHandle) }; - CardHandle as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 1u8, - { - let ModuleHandle: u64 = unsafe { - ::core::mem::transmute(ModuleHandle) - }; - ModuleHandle as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 18usize, - 1u8, - { - let ExtendedRow: u64 = unsafe { - ::core::mem::transmute(ExtendedRow) - }; - ExtendedRow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 19usize, - 1u8, - { - let BankGroup: u64 = unsafe { ::core::mem::transmute(BankGroup) }; - BankGroup as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 1u8, - { - let BankAddress: u64 = unsafe { - ::core::mem::transmute(BankAddress) - }; - BankAddress as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 1u8, - { - let ChipIdentification: u64 = unsafe { - ::core::mem::transmute(ChipIdentification) - }; - ChipIdentification as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 42u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_MEMORY_ERROR_SECTION_VALIDBITS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_MEMORY_ERROR_SECTION_VALIDBITS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_MEMORY_ERROR_SECTION_VALIDBITS>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_MEMORY_ERROR_SECTION_VALIDBITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_MEMORY_ERROR_SECTION_VALIDBITS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_MEMORY_ERROR_SECTION_VALIDBITS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION_VALIDBITS), - "::", - stringify!(ValidBits), - ), - ); -} -impl Default for _WHEA_MEMORY_ERROR_SECTION_VALIDBITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_MEMORY_ERROR_SECTION_VALIDBITS = _WHEA_MEMORY_ERROR_SECTION_VALIDBITS; -pub type PWHEA_MEMORY_ERROR_SECTION_VALIDBITS = *mut _WHEA_MEMORY_ERROR_SECTION_VALIDBITS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_MEMORY_ERROR_SECTION { - pub ValidBits: WHEA_MEMORY_ERROR_SECTION_VALIDBITS, - pub ErrorStatus: WHEA_ERROR_STATUS, - pub PhysicalAddress: ULONGLONG, - pub PhysicalAddressMask: ULONGLONG, - pub Node: USHORT, - pub Card: USHORT, - pub Module: USHORT, - pub Bank: USHORT, - pub Device: USHORT, - pub Row: USHORT, - pub Column: USHORT, - pub BitPosition: USHORT, - pub RequesterId: ULONGLONG, - pub ResponderId: ULONGLONG, - pub TargetId: ULONGLONG, - pub ErrorType: UCHAR, - pub Extended: UCHAR, - pub RankNumber: USHORT, - pub CardHandle: USHORT, - pub ModuleHandle: USHORT, -} -#[test] -fn bindgen_test_layout__WHEA_MEMORY_ERROR_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_MEMORY_ERROR_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_MEMORY_ERROR_SECTION>(), - 80usize, - concat!("Size of: ", stringify!(_WHEA_MEMORY_ERROR_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_MEMORY_ERROR_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_MEMORY_ERROR_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorStatus) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(ErrorStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PhysicalAddress) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(PhysicalAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PhysicalAddressMask) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(PhysicalAddressMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Node) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(Node), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Card) as usize - ptr as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(Card), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Module) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(Module), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bank) as usize - ptr as usize }, - 38usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(Bank), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Device) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(Device), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Row) as usize - ptr as usize }, - 42usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(Row), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Column) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(Column), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BitPosition) as usize - ptr as usize }, - 46usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(BitPosition), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequesterId) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(RequesterId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResponderId) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(ResponderId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TargetId) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(TargetId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorType) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(ErrorType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Extended) as usize - ptr as usize }, - 73usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(Extended), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RankNumber) as usize - ptr as usize }, - 74usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(RankNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CardHandle) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(CardHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ModuleHandle) as usize - ptr as usize }, - 78usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_ERROR_SECTION), - "::", - stringify!(ModuleHandle), - ), - ); -} -impl Default for _WHEA_MEMORY_ERROR_SECTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_MEMORY_ERROR_SECTION = _WHEA_MEMORY_ERROR_SECTION; -pub type PWHEA_MEMORY_ERROR_SECTION = *mut _WHEA_MEMORY_ERROR_SECTION; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PMEM_ERROR_SECTION_VALIDBITS { - pub __bindgen_anon_1: _WHEA_PMEM_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - pub ValidBits: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PMEM_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_PMEM_ERROR_SECTION_VALIDBITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_PMEM_ERROR_SECTION_VALIDBITS__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(_WHEA_PMEM_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PMEM_ERROR_SECTION_VALIDBITS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_PMEM_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_PMEM_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - #[inline] - pub fn ErrorStatus(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_ErrorStatus(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn NFITHandle(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_NFITHandle(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn LocationInfo(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_LocationInfo(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 61u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 61u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ErrorStatus: ULONGLONG, - NFITHandle: ULONGLONG, - LocationInfo: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ErrorStatus: u64 = unsafe { - ::core::mem::transmute(ErrorStatus) - }; - ErrorStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let NFITHandle: u64 = unsafe { ::core::mem::transmute(NFITHandle) }; - NFITHandle as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let LocationInfo: u64 = unsafe { - ::core::mem::transmute(LocationInfo) - }; - LocationInfo as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 61u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_PMEM_ERROR_SECTION_VALIDBITS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PMEM_ERROR_SECTION_VALIDBITS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PMEM_ERROR_SECTION_VALIDBITS>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_PMEM_ERROR_SECTION_VALIDBITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PMEM_ERROR_SECTION_VALIDBITS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PMEM_ERROR_SECTION_VALIDBITS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PMEM_ERROR_SECTION_VALIDBITS), - "::", - stringify!(ValidBits), - ), - ); -} -impl Default for _WHEA_PMEM_ERROR_SECTION_VALIDBITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PMEM_ERROR_SECTION_VALIDBITS = _WHEA_PMEM_ERROR_SECTION_VALIDBITS; -pub type PWHEA_PMEM_ERROR_SECTION_VALIDBITS = *mut _WHEA_PMEM_ERROR_SECTION_VALIDBITS; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PMEM_PAGE_RANGE { - pub StartingPfn: ULONG64, - pub PageCount: ULONG64, - pub MarkedBadBitmap: ULONG64, -} -#[test] -fn bindgen_test_layout__WHEA_PMEM_PAGE_RANGE() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PMEM_PAGE_RANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PMEM_PAGE_RANGE>(), - 24usize, - concat!("Size of: ", stringify!(_WHEA_PMEM_PAGE_RANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PMEM_PAGE_RANGE>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PMEM_PAGE_RANGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingPfn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PMEM_PAGE_RANGE), - "::", - stringify!(StartingPfn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PageCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PMEM_PAGE_RANGE), - "::", - stringify!(PageCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MarkedBadBitmap) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PMEM_PAGE_RANGE), - "::", - stringify!(MarkedBadBitmap), - ), - ); -} -pub type WHEA_PMEM_PAGE_RANGE = _WHEA_PMEM_PAGE_RANGE; -pub type PWHEA_PMEM_PAGE_RANGE = *mut _WHEA_PMEM_PAGE_RANGE; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_PMEM_ERROR_SECTION { - pub ValidBits: WHEA_PMEM_ERROR_SECTION_VALIDBITS, - pub LocationInfo: [UCHAR; 64usize], - pub ErrorStatus: WHEA_ERROR_STATUS, - pub NFITHandle: ULONG, - pub PageRangeCount: ULONG, - pub PageRange: [WHEA_PMEM_PAGE_RANGE; 1usize], -} -#[test] -fn bindgen_test_layout__WHEA_PMEM_ERROR_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PMEM_ERROR_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PMEM_ERROR_SECTION>(), - 112usize, - concat!("Size of: ", stringify!(_WHEA_PMEM_ERROR_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PMEM_ERROR_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PMEM_ERROR_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PMEM_ERROR_SECTION), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LocationInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PMEM_ERROR_SECTION), - "::", - stringify!(LocationInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorStatus) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PMEM_ERROR_SECTION), - "::", - stringify!(ErrorStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NFITHandle) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PMEM_ERROR_SECTION), - "::", - stringify!(NFITHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PageRangeCount) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PMEM_ERROR_SECTION), - "::", - stringify!(PageRangeCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PageRange) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PMEM_ERROR_SECTION), - "::", - stringify!(PageRange), - ), - ); -} -impl Default for _WHEA_PMEM_ERROR_SECTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PMEM_ERROR_SECTION = _WHEA_PMEM_ERROR_SECTION; -pub type PWHEA_PMEM_ERROR_SECTION = *mut _WHEA_PMEM_ERROR_SECTION; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCIE_ADDRESS { - pub Segment: UINT32, - pub Bus: UINT32, - pub Device: UINT32, - pub Function: UINT32, -} -#[test] -fn bindgen_test_layout__WHEA_PCIE_ADDRESS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIE_ADDRESS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIE_ADDRESS>(), - 16usize, - concat!("Size of: ", stringify!(_WHEA_PCIE_ADDRESS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIE_ADDRESS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIE_ADDRESS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Segment) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIE_ADDRESS), - "::", - stringify!(Segment), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bus) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIE_ADDRESS), - "::", - stringify!(Bus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Device) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIE_ADDRESS), - "::", - stringify!(Device), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Function) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIE_ADDRESS), - "::", - stringify!(Function), - ), - ); -} -pub type WHEA_PCIE_ADDRESS = _WHEA_PCIE_ADDRESS; -pub type PWHEA_PCIE_ADDRESS = *mut _WHEA_PCIE_ADDRESS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS { - pub __bindgen_anon_1: _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS__bindgen_ty_1, - pub ValidBits: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS__bindgen_ty_1 { - #[inline] - pub fn Segment(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_Segment(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Bus(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_Bus(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Device(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_Device(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Function(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } - } - #[inline] - pub fn set_Function(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Mask(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } - } - #[inline] - pub fn set_Mask(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn CorrectableErrorCount(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } - } - #[inline] - pub fn set_CorrectableErrorCount(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 58u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Segment: ULONGLONG, - Bus: ULONGLONG, - Device: ULONGLONG, - Function: ULONGLONG, - Mask: ULONGLONG, - CorrectableErrorCount: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Segment: u64 = unsafe { ::core::mem::transmute(Segment) }; - Segment as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Bus: u64 = unsafe { ::core::mem::transmute(Bus) }; - Bus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Device: u64 = unsafe { ::core::mem::transmute(Device) }; - Device as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let Function: u64 = unsafe { ::core::mem::transmute(Function) }; - Function as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let Mask: u64 = unsafe { ::core::mem::transmute(Mask) }; - Mask as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let CorrectableErrorCount: u64 = unsafe { - ::core::mem::transmute(CorrectableErrorCount) - }; - CorrectableErrorCount as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 58u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS), - "::", - stringify!(ValidBits), - ), - ); -} -impl Default for _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS = _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS; -pub type PWHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS = *mut _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES { - pub ValidBits: WHEA_PCIE_CORRECTABLE_ERROR_DEVICES_VALIDBITS, - pub Address: WHEA_PCIE_ADDRESS, - pub Mask: UINT32, - pub CorrectableErrorCount: [UINT32; 32usize], -} -#[test] -fn bindgen_test_layout__WHEA_PCIE_CORRECTABLE_ERROR_DEVICES() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES>(), - 156usize, - concat!("Size of: ", stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES), - "::", - stringify!(Mask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CorrectableErrorCount) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_DEVICES), - "::", - stringify!(CorrectableErrorCount), - ), - ); -} -impl Default for _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIE_CORRECTABLE_ERROR_DEVICES = _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES; -pub type PWHEA_PCIE_CORRECTABLE_ERROR_DEVICES = *mut _WHEA_PCIE_CORRECTABLE_ERROR_DEVICES; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER { - pub Version: UINT16, - pub Count: UINT16, -} -#[test] -fn bindgen_test_layout__WHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER), - "::", - stringify!(Count), - ), - ); -} -pub type WHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER = _WHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER; -pub type PWHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER = *mut _WHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_PCIE_CORRECTABLE_ERROR_SECTION { - pub Header: WHEA_PCIE_CORRECTABLE_ERROR_SECTION_HEADER, - pub Devices: [WHEA_PCIE_CORRECTABLE_ERROR_DEVICES; 1usize], -} -#[test] -fn bindgen_test_layout__WHEA_PCIE_CORRECTABLE_ERROR_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIE_CORRECTABLE_ERROR_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIE_CORRECTABLE_ERROR_SECTION>(), - 160usize, - concat!("Size of: ", stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIE_CORRECTABLE_ERROR_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_SECTION), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Devices) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIE_CORRECTABLE_ERROR_SECTION), - "::", - stringify!(Devices), - ), - ); -} -impl Default for _WHEA_PCIE_CORRECTABLE_ERROR_SECTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIE_CORRECTABLE_ERROR_SECTION = _WHEA_PCIE_CORRECTABLE_ERROR_SECTION; -pub type PWHEA_PCIE_CORRECTABLE_ERROR_SECTION = *mut _WHEA_PCIE_CORRECTABLE_ERROR_SECTION; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS { - pub __bindgen_anon_1: _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - pub ValidBits: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - #[inline] - pub fn SocketId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_SocketId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ChannelId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_ChannelId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn DimmSlot(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_DimmSlot(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn CorrectableErrorCount(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } - } - #[inline] - pub fn set_CorrectableErrorCount(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 60u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 60u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - SocketId: ULONGLONG, - ChannelId: ULONGLONG, - DimmSlot: ULONGLONG, - CorrectableErrorCount: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let SocketId: u64 = unsafe { ::core::mem::transmute(SocketId) }; - SocketId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ChannelId: u64 = unsafe { ::core::mem::transmute(ChannelId) }; - ChannelId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let DimmSlot: u64 = unsafe { ::core::mem::transmute(DimmSlot) }; - DimmSlot as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let CorrectableErrorCount: u64 = unsafe { - ::core::mem::transmute(CorrectableErrorCount) - }; - CorrectableErrorCount as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 60u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS>(), - 8usize, - concat!( - "Size of: ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS), - "::", - stringify!(ValidBits), - ), - ); -} -impl Default for _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS = _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS; -pub type PWHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS = *mut _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_MEMORY_CORRECTABLE_ERROR_HEADER { - pub Version: UINT16, - pub Count: UINT16, -} -#[test] -fn bindgen_test_layout__WHEA_MEMORY_CORRECTABLE_ERROR_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_MEMORY_CORRECTABLE_ERROR_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_MEMORY_CORRECTABLE_ERROR_HEADER>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_MEMORY_CORRECTABLE_ERROR_HEADER>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_HEADER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_HEADER), - "::", - stringify!(Count), - ), - ); -} -pub type WHEA_MEMORY_CORRECTABLE_ERROR_HEADER = _WHEA_MEMORY_CORRECTABLE_ERROR_HEADER; -pub type PWHEA_MEMORY_CORRECTABLE_ERROR_HEADER = *mut _WHEA_MEMORY_CORRECTABLE_ERROR_HEADER; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_MEMORY_CORRECTABLE_ERROR_DATA { - pub ValidBits: WHEA_MEMORY_CORRECTABLE_ERROR_SECTION_VALIDBITS, - pub SocketId: UINT32, - pub ChannelId: UINT32, - pub DimmSlot: UINT32, - pub CorrectableErrorCount: UINT32, -} -#[test] -fn bindgen_test_layout__WHEA_MEMORY_CORRECTABLE_ERROR_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_MEMORY_CORRECTABLE_ERROR_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_MEMORY_CORRECTABLE_ERROR_DATA>(), - 24usize, - concat!("Size of: ", stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_MEMORY_CORRECTABLE_ERROR_DATA>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_DATA), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SocketId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_DATA), - "::", - stringify!(SocketId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChannelId) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_DATA), - "::", - stringify!(ChannelId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DimmSlot) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_DATA), - "::", - stringify!(DimmSlot), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CorrectableErrorCount) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_DATA), - "::", - stringify!(CorrectableErrorCount), - ), - ); -} -impl Default for _WHEA_MEMORY_CORRECTABLE_ERROR_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_MEMORY_CORRECTABLE_ERROR_DATA = _WHEA_MEMORY_CORRECTABLE_ERROR_DATA; -pub type PWHEA_MEMORY_CORRECTABLE_ERROR_DATA = *mut _WHEA_MEMORY_CORRECTABLE_ERROR_DATA; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION { - pub Header: WHEA_MEMORY_CORRECTABLE_ERROR_HEADER, - pub Data: [WHEA_MEMORY_CORRECTABLE_ERROR_DATA; 1usize], -} -#[test] -fn bindgen_test_layout__WHEA_MEMORY_CORRECTABLE_ERROR_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION>(), - 28usize, - concat!("Size of: ", stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_CORRECTABLE_ERROR_SECTION), - "::", - stringify!(Data), - ), - ); -} -impl Default for _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_MEMORY_CORRECTABLE_ERROR_SECTION = _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION; -pub type PWHEA_MEMORY_CORRECTABLE_ERROR_SECTION = *mut _WHEA_MEMORY_CORRECTABLE_ERROR_SECTION; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS { - pub __bindgen_anon_1: _WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - pub ValidBits: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - #[inline] - pub fn PortType(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_PortType(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Version(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_Version(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn CommandStatus(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_CommandStatus(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn DeviceId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } - } - #[inline] - pub fn set_DeviceId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn DeviceSerialNumber(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } - } - #[inline] - pub fn set_DeviceSerialNumber(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn BridgeControlStatus(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } - } - #[inline] - pub fn set_BridgeControlStatus(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn ExpressCapability(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } - } - #[inline] - pub fn set_ExpressCapability(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn AerInfo(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } - } - #[inline] - pub fn set_AerInfo(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 56u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 56u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PortType: ULONGLONG, - Version: ULONGLONG, - CommandStatus: ULONGLONG, - DeviceId: ULONGLONG, - DeviceSerialNumber: ULONGLONG, - BridgeControlStatus: ULONGLONG, - ExpressCapability: ULONGLONG, - AerInfo: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let PortType: u64 = unsafe { ::core::mem::transmute(PortType) }; - PortType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Version: u64 = unsafe { ::core::mem::transmute(Version) }; - Version as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let CommandStatus: u64 = unsafe { - ::core::mem::transmute(CommandStatus) - }; - CommandStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let DeviceId: u64 = unsafe { ::core::mem::transmute(DeviceId) }; - DeviceId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let DeviceSerialNumber: u64 = unsafe { - ::core::mem::transmute(DeviceSerialNumber) - }; - DeviceSerialNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let BridgeControlStatus: u64 = unsafe { - ::core::mem::transmute(BridgeControlStatus) - }; - BridgeControlStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let ExpressCapability: u64 = unsafe { - ::core::mem::transmute(ExpressCapability) - }; - ExpressCapability as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let AerInfo: u64 = unsafe { ::core::mem::transmute(AerInfo) }; - AerInfo as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 56u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS), - "::", - stringify!(ValidBits), - ), - ); -} -impl Default for _WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS = _WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS; -pub type PWHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS = *mut _WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCIEXPRESS_DEVICE_ID { - pub VendorID: USHORT, - pub DeviceID: USHORT, - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 12usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_PCIEXPRESS_DEVICE_ID() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIEXPRESS_DEVICE_ID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIEXPRESS_DEVICE_ID>(), - 16usize, - concat!("Size of: ", stringify!(_WHEA_PCIEXPRESS_DEVICE_ID)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIEXPRESS_DEVICE_ID>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIEXPRESS_DEVICE_ID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VendorID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_DEVICE_ID), - "::", - stringify!(VendorID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceID) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_DEVICE_ID), - "::", - stringify!(DeviceID), - ), - ); -} -impl _WHEA_PCIEXPRESS_DEVICE_ID { - #[inline] - pub fn ClassCode(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } - } - #[inline] - pub fn set_ClassCode(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 24u8, val as u64) - } - } - #[inline] - pub fn FunctionNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_FunctionNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn DeviceNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } - } - #[inline] - pub fn set_DeviceNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(32usize, 8u8, val as u64) - } - } - #[inline] - pub fn Segment(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(40usize, 16u8) as u32) } - } - #[inline] - pub fn set_Segment(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(40usize, 16u8, val as u64) - } - } - #[inline] - pub fn PrimaryBusNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(56usize, 8u8) as u32) } - } - #[inline] - pub fn set_PrimaryBusNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(56usize, 8u8, val as u64) - } - } - #[inline] - pub fn SecondaryBusNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(64usize, 8u8) as u32) } - } - #[inline] - pub fn set_SecondaryBusNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(64usize, 8u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(72usize, 3u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(72usize, 3u8, val as u64) - } - } - #[inline] - pub fn SlotNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(75usize, 13u8) as u32) } - } - #[inline] - pub fn set_SlotNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(75usize, 13u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(88usize, 8u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(88usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ClassCode: ULONG, - FunctionNumber: ULONG, - DeviceNumber: ULONG, - Segment: ULONG, - PrimaryBusNumber: ULONG, - SecondaryBusNumber: ULONG, - Reserved1: ULONG, - SlotNumber: ULONG, - Reserved2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 12usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 12usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 24u8, - { - let ClassCode: u32 = unsafe { ::core::mem::transmute(ClassCode) }; - ClassCode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let FunctionNumber: u32 = unsafe { - ::core::mem::transmute(FunctionNumber) - }; - FunctionNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 32usize, - 8u8, - { - let DeviceNumber: u32 = unsafe { - ::core::mem::transmute(DeviceNumber) - }; - DeviceNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 40usize, - 16u8, - { - let Segment: u32 = unsafe { ::core::mem::transmute(Segment) }; - Segment as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 56usize, - 8u8, - { - let PrimaryBusNumber: u32 = unsafe { - ::core::mem::transmute(PrimaryBusNumber) - }; - PrimaryBusNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 64usize, - 8u8, - { - let SecondaryBusNumber: u32 = unsafe { - ::core::mem::transmute(SecondaryBusNumber) - }; - SecondaryBusNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 72usize, - 3u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 75usize, - 13u8, - { - let SlotNumber: u32 = unsafe { ::core::mem::transmute(SlotNumber) }; - SlotNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 88usize, - 8u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type WHEA_PCIEXPRESS_DEVICE_ID = _WHEA_PCIEXPRESS_DEVICE_ID; -pub type PWHEA_PCIEXPRESS_DEVICE_ID = *mut _WHEA_PCIEXPRESS_DEVICE_ID; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PCIEXPRESS_VERSION { - pub __bindgen_anon_1: _WHEA_PCIEXPRESS_VERSION__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCIEXPRESS_VERSION__bindgen_ty_1 { - pub MinorVersion: UCHAR, - pub MajorVersion: UCHAR, - pub Reserved: USHORT, -} -#[test] -fn bindgen_test_layout__WHEA_PCIEXPRESS_VERSION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIEXPRESS_VERSION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIEXPRESS_VERSION__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_PCIEXPRESS_VERSION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIEXPRESS_VERSION__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIEXPRESS_VERSION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_VERSION__bindgen_ty_1), - "::", - stringify!(MinorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorVersion) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_VERSION__bindgen_ty_1), - "::", - stringify!(MajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_VERSION__bindgen_ty_1), - "::", - stringify!(Reserved), - ), - ); -} -#[test] -fn bindgen_test_layout__WHEA_PCIEXPRESS_VERSION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIEXPRESS_VERSION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIEXPRESS_VERSION>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_PCIEXPRESS_VERSION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIEXPRESS_VERSION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIEXPRESS_VERSION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_VERSION), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_PCIEXPRESS_VERSION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIEXPRESS_VERSION = _WHEA_PCIEXPRESS_VERSION; -pub type PWHEA_PCIEXPRESS_VERSION = *mut _WHEA_PCIEXPRESS_VERSION; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PCIEXPRESS_COMMAND_STATUS { - pub __bindgen_anon_1: _WHEA_PCIEXPRESS_COMMAND_STATUS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCIEXPRESS_COMMAND_STATUS__bindgen_ty_1 { - pub Command: USHORT, - pub Status: USHORT, -} -#[test] -fn bindgen_test_layout__WHEA_PCIEXPRESS_COMMAND_STATUS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_PCIEXPRESS_COMMAND_STATUS__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIEXPRESS_COMMAND_STATUS__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_PCIEXPRESS_COMMAND_STATUS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIEXPRESS_COMMAND_STATUS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_PCIEXPRESS_COMMAND_STATUS__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Command) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_COMMAND_STATUS__bindgen_ty_1), - "::", - stringify!(Command), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_COMMAND_STATUS__bindgen_ty_1), - "::", - stringify!(Status), - ), - ); -} -#[test] -fn bindgen_test_layout__WHEA_PCIEXPRESS_COMMAND_STATUS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIEXPRESS_COMMAND_STATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIEXPRESS_COMMAND_STATUS>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_PCIEXPRESS_COMMAND_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIEXPRESS_COMMAND_STATUS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIEXPRESS_COMMAND_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_COMMAND_STATUS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_PCIEXPRESS_COMMAND_STATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIEXPRESS_COMMAND_STATUS = _WHEA_PCIEXPRESS_COMMAND_STATUS; -pub type PWHEA_PCIEXPRESS_COMMAND_STATUS = *mut _WHEA_PCIEXPRESS_COMMAND_STATUS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS { - pub __bindgen_anon_1: _WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS__bindgen_ty_1 { - pub BridgeSecondaryStatus: USHORT, - pub BridgeControl: USHORT, -} -#[test] -fn bindgen_test_layout__WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BridgeSecondaryStatus) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS__bindgen_ty_1), - "::", - stringify!(BridgeSecondaryStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BridgeControl) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS__bindgen_ty_1), - "::", - stringify!(BridgeControl), - ), - ); -} -#[test] -fn bindgen_test_layout__WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS = _WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS; -pub type PWHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS = *mut _WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS; -pub mod _WHEA_PCIEXPRESS_DEVICE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WheaPciExpressEndpoint: Type = 0; - pub const WheaPciExpressLegacyEndpoint: Type = 1; - pub const WheaPciExpressRootPort: Type = 4; - pub const WheaPciExpressUpstreamSwitchPort: Type = 5; - pub const WheaPciExpressDownstreamSwitchPort: Type = 6; - pub const WheaPciExpressToPciXBridge: Type = 7; - pub const WheaPciXToExpressBridge: Type = 8; - pub const WheaPciExpressRootComplexIntegratedEndpoint: Type = 9; - pub const WheaPciExpressRootComplexEventCollector: Type = 10; -} -pub use self::_WHEA_PCIEXPRESS_DEVICE_TYPE::Type as WHEA_PCIEXPRESS_DEVICE_TYPE; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_PCIEXPRESS_ERROR_SECTION { - pub ValidBits: WHEA_PCIEXPRESS_ERROR_SECTION_VALIDBITS, - pub PortType: WHEA_PCIEXPRESS_DEVICE_TYPE, - pub Version: WHEA_PCIEXPRESS_VERSION, - pub CommandStatus: WHEA_PCIEXPRESS_COMMAND_STATUS, - pub Reserved: ULONG, - pub DeviceId: WHEA_PCIEXPRESS_DEVICE_ID, - pub DeviceSerialNumber: ULONGLONG, - pub BridgeControlStatus: WHEA_PCIEXPRESS_BRIDGE_CONTROL_STATUS, - pub ExpressCapability: [UCHAR; 60usize], - pub AerInfo: [UCHAR; 96usize], -} -#[test] -fn bindgen_test_layout__WHEA_PCIEXPRESS_ERROR_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIEXPRESS_ERROR_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIEXPRESS_ERROR_SECTION>(), - 208usize, - concat!("Size of: ", stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIEXPRESS_ERROR_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PortType) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION), - "::", - stringify!(PortType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CommandStatus) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION), - "::", - stringify!(CommandStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceId) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION), - "::", - stringify!(DeviceId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceSerialNumber) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION), - "::", - stringify!(DeviceSerialNumber), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BridgeControlStatus) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION), - "::", - stringify!(BridgeControlStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExpressCapability) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION), - "::", - stringify!(ExpressCapability), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AerInfo) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIEXPRESS_ERROR_SECTION), - "::", - stringify!(AerInfo), - ), - ); -} -impl Default for _WHEA_PCIEXPRESS_ERROR_SECTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIEXPRESS_ERROR_SECTION = _WHEA_PCIEXPRESS_ERROR_SECTION; -pub type PWHEA_PCIEXPRESS_ERROR_SECTION = *mut _WHEA_PCIEXPRESS_ERROR_SECTION; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS { - pub __bindgen_anon_1: _WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - pub ValidBits: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - #[inline] - pub fn ErrorStatus(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_ErrorStatus(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorType(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_ErrorType(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn BusId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_BusId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn BusAddress(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } - } - #[inline] - pub fn set_BusAddress(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn BusData(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } - } - #[inline] - pub fn set_BusData(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn BusCommand(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } - } - #[inline] - pub fn set_BusCommand(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn RequesterId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } - } - #[inline] - pub fn set_RequesterId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn CompleterId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } - } - #[inline] - pub fn set_CompleterId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn TargetId(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } - } - #[inline] - pub fn set_TargetId(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 55u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 55u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ErrorStatus: ULONGLONG, - ErrorType: ULONGLONG, - BusId: ULONGLONG, - BusAddress: ULONGLONG, - BusData: ULONGLONG, - BusCommand: ULONGLONG, - RequesterId: ULONGLONG, - CompleterId: ULONGLONG, - TargetId: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ErrorStatus: u64 = unsafe { - ::core::mem::transmute(ErrorStatus) - }; - ErrorStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ErrorType: u64 = unsafe { ::core::mem::transmute(ErrorType) }; - ErrorType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let BusId: u64 = unsafe { ::core::mem::transmute(BusId) }; - BusId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let BusAddress: u64 = unsafe { ::core::mem::transmute(BusAddress) }; - BusAddress as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let BusData: u64 = unsafe { ::core::mem::transmute(BusData) }; - BusData as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let BusCommand: u64 = unsafe { ::core::mem::transmute(BusCommand) }; - BusCommand as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let RequesterId: u64 = unsafe { - ::core::mem::transmute(RequesterId) - }; - RequesterId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let CompleterId: u64 = unsafe { - ::core::mem::transmute(CompleterId) - }; - CompleterId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let TargetId: u64 = unsafe { ::core::mem::transmute(TargetId) }; - TargetId as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 55u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS), - "::", - stringify!(ValidBits), - ), - ); -} -impl Default for _WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS = _WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS; -pub type PWHEA_PCIXBUS_ERROR_SECTION_VALIDBITS = *mut _WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PCIXBUS_ID { - pub __bindgen_anon_1: _WHEA_PCIXBUS_ID__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCIXBUS_ID__bindgen_ty_1 { - pub BusNumber: UCHAR, - pub BusSegment: UCHAR, -} -#[test] -fn bindgen_test_layout__WHEA_PCIXBUS_ID__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIXBUS_ID__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIXBUS_ID__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_WHEA_PCIXBUS_ID__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIXBUS_ID__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIXBUS_ID__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ID__bindgen_ty_1), - "::", - stringify!(BusNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusSegment) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ID__bindgen_ty_1), - "::", - stringify!(BusSegment), - ), - ); -} -#[test] -fn bindgen_test_layout__WHEA_PCIXBUS_ID() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIXBUS_ID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIXBUS_ID>(), - 2usize, - concat!("Size of: ", stringify!(_WHEA_PCIXBUS_ID)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIXBUS_ID>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIXBUS_ID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ID), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _WHEA_PCIXBUS_ID { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIXBUS_ID = _WHEA_PCIXBUS_ID; -pub type PWHEA_PCIXBUS_ID = *mut _WHEA_PCIXBUS_ID; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PCIXBUS_COMMAND { - pub __bindgen_anon_1: _WHEA_PCIXBUS_COMMAND__bindgen_ty_1, - pub AsULONGLONG: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCIXBUS_COMMAND__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_PCIXBUS_COMMAND__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIXBUS_COMMAND__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_PCIXBUS_COMMAND__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIXBUS_COMMAND__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIXBUS_COMMAND__bindgen_ty_1)), - ); -} -impl _WHEA_PCIXBUS_COMMAND__bindgen_ty_1 { - #[inline] - pub fn Command(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 56u8) as u64) } - } - #[inline] - pub fn set_Command(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 56u8, val as u64) - } - } - #[inline] - pub fn PCIXCommand(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(56usize, 1u8) as u64) } - } - #[inline] - pub fn set_PCIXCommand(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(56usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(57usize, 7u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(57usize, 7u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Command: ULONGLONG, - PCIXCommand: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 56u8, - { - let Command: u64 = unsafe { ::core::mem::transmute(Command) }; - Command as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 56usize, - 1u8, - { - let PCIXCommand: u64 = unsafe { - ::core::mem::transmute(PCIXCommand) - }; - PCIXCommand as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 57usize, - 7u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_PCIXBUS_COMMAND() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIXBUS_COMMAND> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIXBUS_COMMAND>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_PCIXBUS_COMMAND)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIXBUS_COMMAND>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIXBUS_COMMAND)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONGLONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_COMMAND), - "::", - stringify!(AsULONGLONG), - ), - ); -} -impl Default for _WHEA_PCIXBUS_COMMAND { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIXBUS_COMMAND = _WHEA_PCIXBUS_COMMAND; -pub type PWHEA_PCIXBUS_COMMAND = *mut _WHEA_PCIXBUS_COMMAND; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_PCIXBUS_ERROR_SECTION { - pub ValidBits: WHEA_PCIXBUS_ERROR_SECTION_VALIDBITS, - pub ErrorStatus: WHEA_ERROR_STATUS, - pub ErrorType: USHORT, - pub BusId: WHEA_PCIXBUS_ID, - pub Reserved: ULONG, - pub BusAddress: ULONGLONG, - pub BusData: ULONGLONG, - pub BusCommand: WHEA_PCIXBUS_COMMAND, - pub RequesterId: ULONGLONG, - pub CompleterId: ULONGLONG, - pub TargetId: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_PCIXBUS_ERROR_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIXBUS_ERROR_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIXBUS_ERROR_SECTION>(), - 72usize, - concat!("Size of: ", stringify!(_WHEA_PCIXBUS_ERROR_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIXBUS_ERROR_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIXBUS_ERROR_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorStatus) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION), - "::", - stringify!(ErrorStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION), - "::", - stringify!(ErrorType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusId) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION), - "::", - stringify!(BusId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusAddress) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION), - "::", - stringify!(BusAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION), - "::", - stringify!(BusData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BusCommand) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION), - "::", - stringify!(BusCommand), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequesterId) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION), - "::", - stringify!(RequesterId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompleterId) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION), - "::", - stringify!(CompleterId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TargetId) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXBUS_ERROR_SECTION), - "::", - stringify!(TargetId), - ), - ); -} -impl Default for _WHEA_PCIXBUS_ERROR_SECTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIXBUS_ERROR_SECTION = _WHEA_PCIXBUS_ERROR_SECTION; -pub type PWHEA_PCIXBUS_ERROR_SECTION = *mut _WHEA_PCIXBUS_ERROR_SECTION; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS { - pub __bindgen_anon_1: _WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - pub ValidBits: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(_WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS__bindgen_ty_1 { - #[inline] - pub fn ErrorStatus(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } - } - #[inline] - pub fn set_ErrorStatus(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn IdInfo(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } - } - #[inline] - pub fn set_IdInfo(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemoryNumber(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } - } - #[inline] - pub fn set_MemoryNumber(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn IoNumber(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } - } - #[inline] - pub fn set_IoNumber(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn RegisterDataPairs(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } - } - #[inline] - pub fn set_RegisterDataPairs(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 59u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 59u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ErrorStatus: ULONGLONG, - IdInfo: ULONGLONG, - MemoryNumber: ULONGLONG, - IoNumber: ULONGLONG, - RegisterDataPairs: ULONGLONG, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ErrorStatus: u64 = unsafe { - ::core::mem::transmute(ErrorStatus) - }; - ErrorStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let IdInfo: u64 = unsafe { ::core::mem::transmute(IdInfo) }; - IdInfo as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let MemoryNumber: u64 = unsafe { - ::core::mem::transmute(MemoryNumber) - }; - MemoryNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let IoNumber: u64 = unsafe { ::core::mem::transmute(IoNumber) }; - IoNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let RegisterDataPairs: u64 = unsafe { - ::core::mem::transmute(RegisterDataPairs) - }; - RegisterDataPairs as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 59u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS), - "::", - stringify!(ValidBits), - ), - ); -} -impl Default for _WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS = _WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS; -pub type PWHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS = *mut _WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCIXDEVICE_ID { - pub VendorId: USHORT, - pub DeviceId: USHORT, - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, - pub Reserved2: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_PCIXDEVICE_ID() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIXDEVICE_ID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIXDEVICE_ID>(), - 16usize, - concat!("Size of: ", stringify!(_WHEA_PCIXDEVICE_ID)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIXDEVICE_ID>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIXDEVICE_ID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VendorId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXDEVICE_ID), - "::", - stringify!(VendorId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceId) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXDEVICE_ID), - "::", - stringify!(DeviceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXDEVICE_ID), - "::", - stringify!(Reserved2), - ), - ); -} -impl _WHEA_PCIXDEVICE_ID { - #[inline] - pub fn ClassCode(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } - } - #[inline] - pub fn set_ClassCode(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 24u8, val as u64) - } - } - #[inline] - pub fn FunctionNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_FunctionNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn DeviceNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } - } - #[inline] - pub fn set_DeviceNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(32usize, 8u8, val as u64) - } - } - #[inline] - pub fn BusNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(40usize, 8u8) as u32) } - } - #[inline] - pub fn set_BusNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(40usize, 8u8, val as u64) - } - } - #[inline] - pub fn SegmentNumber(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(48usize, 8u8) as u32) } - } - #[inline] - pub fn set_SegmentNumber(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(48usize, 8u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(56usize, 8u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(56usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ClassCode: ULONG, - FunctionNumber: ULONG, - DeviceNumber: ULONG, - BusNumber: ULONG, - SegmentNumber: ULONG, - Reserved1: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 24u8, - { - let ClassCode: u32 = unsafe { ::core::mem::transmute(ClassCode) }; - ClassCode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let FunctionNumber: u32 = unsafe { - ::core::mem::transmute(FunctionNumber) - }; - FunctionNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 32usize, - 8u8, - { - let DeviceNumber: u32 = unsafe { - ::core::mem::transmute(DeviceNumber) - }; - DeviceNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 40usize, - 8u8, - { - let BusNumber: u32 = unsafe { ::core::mem::transmute(BusNumber) }; - BusNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 48usize, - 8u8, - { - let SegmentNumber: u32 = unsafe { - ::core::mem::transmute(SegmentNumber) - }; - SegmentNumber as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 56usize, - 8u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type WHEA_PCIXDEVICE_ID = _WHEA_PCIXDEVICE_ID; -pub type PWHEA_PCIXDEVICE_ID = *mut _WHEA_PCIXDEVICE_ID; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WHEA_PCIXDEVICE_REGISTER_PAIR { - pub Register: ULONGLONG, - pub Data: ULONGLONG, -} -#[test] -fn bindgen_test_layout_WHEA_PCIXDEVICE_REGISTER_PAIR() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(WHEA_PCIXDEVICE_REGISTER_PAIR)), - ); - assert_eq!( - ::core::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(WHEA_PCIXDEVICE_REGISTER_PAIR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Register) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WHEA_PCIXDEVICE_REGISTER_PAIR), - "::", - stringify!(Register), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(WHEA_PCIXDEVICE_REGISTER_PAIR), - "::", - stringify!(Data), - ), - ); -} -pub type PWHEA_PCIXDEVICE_REGISTER_PAIR = *mut WHEA_PCIXDEVICE_REGISTER_PAIR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_PCIXDEVICE_ERROR_SECTION { - pub ValidBits: WHEA_PCIXDEVICE_ERROR_SECTION_VALIDBITS, - pub ErrorStatus: WHEA_ERROR_STATUS, - pub IdInfo: WHEA_PCIXDEVICE_ID, - pub MemoryNumber: ULONG, - pub IoNumber: ULONG, - pub RegisterDataPairs: [WHEA_PCIXDEVICE_REGISTER_PAIR; 1usize], -} -#[test] -fn bindgen_test_layout__WHEA_PCIXDEVICE_ERROR_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCIXDEVICE_ERROR_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCIXDEVICE_ERROR_SECTION>(), - 56usize, - concat!("Size of: ", stringify!(_WHEA_PCIXDEVICE_ERROR_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCIXDEVICE_ERROR_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCIXDEVICE_ERROR_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXDEVICE_ERROR_SECTION), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorStatus) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXDEVICE_ERROR_SECTION), - "::", - stringify!(ErrorStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXDEVICE_ERROR_SECTION), - "::", - stringify!(IdInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MemoryNumber) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXDEVICE_ERROR_SECTION), - "::", - stringify!(MemoryNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoNumber) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXDEVICE_ERROR_SECTION), - "::", - stringify!(IoNumber), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RegisterDataPairs) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCIXDEVICE_ERROR_SECTION), - "::", - stringify!(RegisterDataPairs), - ), - ); -} -impl Default for _WHEA_PCIXDEVICE_ERROR_SECTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PCIXDEVICE_ERROR_SECTION = _WHEA_PCIXDEVICE_ERROR_SECTION; -pub type PWHEA_PCIXDEVICE_ERROR_SECTION = *mut _WHEA_PCIXDEVICE_ERROR_SECTION; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_FIRMWARE_ERROR_RECORD_REFERENCE { - pub Type: UCHAR, - pub Reserved: [UCHAR; 7usize], - pub FirmwareRecordId: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_FIRMWARE_ERROR_RECORD_REFERENCE() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_FIRMWARE_ERROR_RECORD_REFERENCE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_FIRMWARE_ERROR_RECORD_REFERENCE>(), - 16usize, - concat!("Size of: ", stringify!(_WHEA_FIRMWARE_ERROR_RECORD_REFERENCE)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_FIRMWARE_ERROR_RECORD_REFERENCE>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_FIRMWARE_ERROR_RECORD_REFERENCE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_FIRMWARE_ERROR_RECORD_REFERENCE), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_FIRMWARE_ERROR_RECORD_REFERENCE), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FirmwareRecordId) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_FIRMWARE_ERROR_RECORD_REFERENCE), - "::", - stringify!(FirmwareRecordId), - ), - ); -} -pub type WHEA_FIRMWARE_ERROR_RECORD_REFERENCE = _WHEA_FIRMWARE_ERROR_RECORD_REFERENCE; -pub type PWHEA_FIRMWARE_ERROR_RECORD_REFERENCE = *mut _WHEA_FIRMWARE_ERROR_RECORD_REFERENCE; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _MCG_STATUS { - pub __bindgen_anon_1: _MCG_STATUS__bindgen_ty_1, - pub QuadPart: ULONGLONG, -} -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MCG_STATUS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, - pub Reserved2: ULONG, -} -#[test] -fn bindgen_test_layout__MCG_STATUS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_MCG_STATUS__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MCG_STATUS__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_MCG_STATUS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_MCG_STATUS__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_MCG_STATUS__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MCG_STATUS__bindgen_ty_1), - "::", - stringify!(Reserved2), - ), - ); -} -impl _MCG_STATUS__bindgen_ty_1 { - #[inline] - pub fn RestartIpValid(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_RestartIpValid(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorIpValid(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_ErrorIpValid(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn MachineCheckInProgress(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_MachineCheckInProgress(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn LocalMceValid(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_LocalMceValid(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 28u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - RestartIpValid: ULONG, - ErrorIpValid: ULONG, - MachineCheckInProgress: ULONG, - LocalMceValid: ULONG, - Reserved1: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let RestartIpValid: u32 = unsafe { - ::core::mem::transmute(RestartIpValid) - }; - RestartIpValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ErrorIpValid: u32 = unsafe { - ::core::mem::transmute(ErrorIpValid) - }; - ErrorIpValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let MachineCheckInProgress: u32 = unsafe { - ::core::mem::transmute(MachineCheckInProgress) - }; - MachineCheckInProgress as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let LocalMceValid: u32 = unsafe { - ::core::mem::transmute(LocalMceValid) - }; - LocalMceValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 28u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__MCG_STATUS() { - const UNINIT: ::core::mem::MaybeUninit<_MCG_STATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MCG_STATUS>(), - 8usize, - concat!("Size of: ", stringify!(_MCG_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_MCG_STATUS>(), - 1usize, - concat!("Alignment of ", stringify!(_MCG_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QuadPart) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_MCG_STATUS), "::", stringify!(QuadPart)), - ); -} -impl Default for _MCG_STATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MCG_STATUS = _MCG_STATUS; -pub type PMCG_STATUS = *mut _MCG_STATUS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MCI_STATUS_BITS_COMMON { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__MCI_STATUS_BITS_COMMON() { - assert_eq!( - ::core::mem::size_of::<_MCI_STATUS_BITS_COMMON>(), - 8usize, - concat!("Size of: ", stringify!(_MCI_STATUS_BITS_COMMON)), - ); - assert_eq!( - ::core::mem::align_of::<_MCI_STATUS_BITS_COMMON>(), - 1usize, - concat!("Alignment of ", stringify!(_MCI_STATUS_BITS_COMMON)), - ); -} -impl _MCI_STATUS_BITS_COMMON { - #[inline] - pub fn McaErrorCode(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u64) } - } - #[inline] - pub fn set_McaErrorCode(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn ModelErrorCode(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u64) } - } - #[inline] - pub fn set_ModelErrorCode(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 25u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(32usize, 25u8, val as u64) - } - } - #[inline] - pub fn ContextCorrupt(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(57usize, 1u8) as u64) } - } - #[inline] - pub fn set_ContextCorrupt(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(57usize, 1u8, val as u64) - } - } - #[inline] - pub fn AddressValid(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(58usize, 1u8) as u64) } - } - #[inline] - pub fn set_AddressValid(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(58usize, 1u8, val as u64) - } - } - #[inline] - pub fn MiscValid(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(59usize, 1u8) as u64) } - } - #[inline] - pub fn set_MiscValid(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(59usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorEnabled(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(60usize, 1u8) as u64) } - } - #[inline] - pub fn set_ErrorEnabled(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(60usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectedError(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(61usize, 1u8) as u64) } - } - #[inline] - pub fn set_UncorrectedError(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(61usize, 1u8, val as u64) - } - } - #[inline] - pub fn StatusOverFlow(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(62usize, 1u8) as u64) } - } - #[inline] - pub fn set_StatusOverFlow(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(62usize, 1u8, val as u64) - } - } - #[inline] - pub fn Valid(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(63usize, 1u8) as u64) } - } - #[inline] - pub fn set_Valid(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(63usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - McaErrorCode: ULONG64, - ModelErrorCode: ULONG64, - Reserved: ULONG64, - ContextCorrupt: ULONG64, - AddressValid: ULONG64, - MiscValid: ULONG64, - ErrorEnabled: ULONG64, - UncorrectedError: ULONG64, - StatusOverFlow: ULONG64, - Valid: ULONG64, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 16u8, - { - let McaErrorCode: u64 = unsafe { - ::core::mem::transmute(McaErrorCode) - }; - McaErrorCode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 16u8, - { - let ModelErrorCode: u64 = unsafe { - ::core::mem::transmute(ModelErrorCode) - }; - ModelErrorCode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 32usize, - 25u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 57usize, - 1u8, - { - let ContextCorrupt: u64 = unsafe { - ::core::mem::transmute(ContextCorrupt) - }; - ContextCorrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 58usize, - 1u8, - { - let AddressValid: u64 = unsafe { - ::core::mem::transmute(AddressValid) - }; - AddressValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 59usize, - 1u8, - { - let MiscValid: u64 = unsafe { ::core::mem::transmute(MiscValid) }; - MiscValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 60usize, - 1u8, - { - let ErrorEnabled: u64 = unsafe { - ::core::mem::transmute(ErrorEnabled) - }; - ErrorEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 61usize, - 1u8, - { - let UncorrectedError: u64 = unsafe { - ::core::mem::transmute(UncorrectedError) - }; - UncorrectedError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 62usize, - 1u8, - { - let StatusOverFlow: u64 = unsafe { - ::core::mem::transmute(StatusOverFlow) - }; - StatusOverFlow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 63usize, - 1u8, - { - let Valid: u64 = unsafe { ::core::mem::transmute(Valid) }; - Valid as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type MCI_STATUS_BITS_COMMON = _MCI_STATUS_BITS_COMMON; -pub type PMCI_STATUS_BITS_COMMON = *mut _MCI_STATUS_BITS_COMMON; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MCI_STATUS_AMD_BITS { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__MCI_STATUS_AMD_BITS() { - assert_eq!( - ::core::mem::size_of::<_MCI_STATUS_AMD_BITS>(), - 8usize, - concat!("Size of: ", stringify!(_MCI_STATUS_AMD_BITS)), - ); - assert_eq!( - ::core::mem::align_of::<_MCI_STATUS_AMD_BITS>(), - 1usize, - concat!("Alignment of ", stringify!(_MCI_STATUS_AMD_BITS)), - ); -} -impl _MCI_STATUS_AMD_BITS { - #[inline] - pub fn McaErrorCode(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u64) } - } - #[inline] - pub fn set_McaErrorCode(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn ModelErrorCode(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u64) } - } - #[inline] - pub fn set_ModelErrorCode(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn ImplementationSpecific2(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 11u8) as u64) } - } - #[inline] - pub fn set_ImplementationSpecific2(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(32usize, 11u8, val as u64) - } - } - #[inline] - pub fn Poison(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(43usize, 1u8) as u64) } - } - #[inline] - pub fn set_Poison(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(43usize, 1u8, val as u64) - } - } - #[inline] - pub fn Deferred(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(44usize, 1u8) as u64) } - } - #[inline] - pub fn set_Deferred(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(44usize, 1u8, val as u64) - } - } - #[inline] - pub fn ImplementationSpecific1(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(45usize, 12u8) as u64) } - } - #[inline] - pub fn set_ImplementationSpecific1(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(45usize, 12u8, val as u64) - } - } - #[inline] - pub fn ContextCorrupt(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(57usize, 1u8) as u64) } - } - #[inline] - pub fn set_ContextCorrupt(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(57usize, 1u8, val as u64) - } - } - #[inline] - pub fn AddressValid(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(58usize, 1u8) as u64) } - } - #[inline] - pub fn set_AddressValid(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(58usize, 1u8, val as u64) - } - } - #[inline] - pub fn MiscValid(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(59usize, 1u8) as u64) } - } - #[inline] - pub fn set_MiscValid(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(59usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorEnabled(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(60usize, 1u8) as u64) } - } - #[inline] - pub fn set_ErrorEnabled(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(60usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectedError(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(61usize, 1u8) as u64) } - } - #[inline] - pub fn set_UncorrectedError(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(61usize, 1u8, val as u64) - } - } - #[inline] - pub fn StatusOverFlow(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(62usize, 1u8) as u64) } - } - #[inline] - pub fn set_StatusOverFlow(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(62usize, 1u8, val as u64) - } - } - #[inline] - pub fn Valid(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(63usize, 1u8) as u64) } - } - #[inline] - pub fn set_Valid(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(63usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - McaErrorCode: ULONG64, - ModelErrorCode: ULONG64, - ImplementationSpecific2: ULONG64, - Poison: ULONG64, - Deferred: ULONG64, - ImplementationSpecific1: ULONG64, - ContextCorrupt: ULONG64, - AddressValid: ULONG64, - MiscValid: ULONG64, - ErrorEnabled: ULONG64, - UncorrectedError: ULONG64, - StatusOverFlow: ULONG64, - Valid: ULONG64, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 16u8, - { - let McaErrorCode: u64 = unsafe { - ::core::mem::transmute(McaErrorCode) - }; - McaErrorCode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 16u8, - { - let ModelErrorCode: u64 = unsafe { - ::core::mem::transmute(ModelErrorCode) - }; - ModelErrorCode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 32usize, - 11u8, - { - let ImplementationSpecific2: u64 = unsafe { - ::core::mem::transmute(ImplementationSpecific2) - }; - ImplementationSpecific2 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 43usize, - 1u8, - { - let Poison: u64 = unsafe { ::core::mem::transmute(Poison) }; - Poison as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 44usize, - 1u8, - { - let Deferred: u64 = unsafe { ::core::mem::transmute(Deferred) }; - Deferred as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 45usize, - 12u8, - { - let ImplementationSpecific1: u64 = unsafe { - ::core::mem::transmute(ImplementationSpecific1) - }; - ImplementationSpecific1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 57usize, - 1u8, - { - let ContextCorrupt: u64 = unsafe { - ::core::mem::transmute(ContextCorrupt) - }; - ContextCorrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 58usize, - 1u8, - { - let AddressValid: u64 = unsafe { - ::core::mem::transmute(AddressValid) - }; - AddressValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 59usize, - 1u8, - { - let MiscValid: u64 = unsafe { ::core::mem::transmute(MiscValid) }; - MiscValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 60usize, - 1u8, - { - let ErrorEnabled: u64 = unsafe { - ::core::mem::transmute(ErrorEnabled) - }; - ErrorEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 61usize, - 1u8, - { - let UncorrectedError: u64 = unsafe { - ::core::mem::transmute(UncorrectedError) - }; - UncorrectedError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 62usize, - 1u8, - { - let StatusOverFlow: u64 = unsafe { - ::core::mem::transmute(StatusOverFlow) - }; - StatusOverFlow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 63usize, - 1u8, - { - let Valid: u64 = unsafe { ::core::mem::transmute(Valid) }; - Valid as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type MCI_STATUS_AMD_BITS = _MCI_STATUS_AMD_BITS; -pub type PMCI_STATUS_AMD_BITS = *mut _MCI_STATUS_AMD_BITS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MCI_STATUS_INTEL_BITS { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, -} -#[test] -fn bindgen_test_layout__MCI_STATUS_INTEL_BITS() { - assert_eq!( - ::core::mem::size_of::<_MCI_STATUS_INTEL_BITS>(), - 8usize, - concat!("Size of: ", stringify!(_MCI_STATUS_INTEL_BITS)), - ); - assert_eq!( - ::core::mem::align_of::<_MCI_STATUS_INTEL_BITS>(), - 1usize, - concat!("Alignment of ", stringify!(_MCI_STATUS_INTEL_BITS)), - ); -} -impl _MCI_STATUS_INTEL_BITS { - #[inline] - pub fn McaErrorCode(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u64) } - } - #[inline] - pub fn set_McaErrorCode(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn ModelErrorCode(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u64) } - } - #[inline] - pub fn set_ModelErrorCode(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn OtherInfo(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 5u8) as u64) } - } - #[inline] - pub fn set_OtherInfo(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(32usize, 5u8, val as u64) - } - } - #[inline] - pub fn FirmwareUpdateError(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } - } - #[inline] - pub fn set_FirmwareUpdateError(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(37usize, 1u8, val as u64) - } - } - #[inline] - pub fn CorrectedErrorCount(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 15u8) as u64) } - } - #[inline] - pub fn set_CorrectedErrorCount(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(38usize, 15u8, val as u64) - } - } - #[inline] - pub fn ThresholdErrorStatus(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(53usize, 2u8) as u64) } - } - #[inline] - pub fn set_ThresholdErrorStatus(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(53usize, 2u8, val as u64) - } - } - #[inline] - pub fn ActionRequired(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(55usize, 1u8) as u64) } - } - #[inline] - pub fn set_ActionRequired(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(55usize, 1u8, val as u64) - } - } - #[inline] - pub fn Signalling(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(56usize, 1u8) as u64) } - } - #[inline] - pub fn set_Signalling(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(56usize, 1u8, val as u64) - } - } - #[inline] - pub fn ContextCorrupt(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(57usize, 1u8) as u64) } - } - #[inline] - pub fn set_ContextCorrupt(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(57usize, 1u8, val as u64) - } - } - #[inline] - pub fn AddressValid(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(58usize, 1u8) as u64) } - } - #[inline] - pub fn set_AddressValid(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(58usize, 1u8, val as u64) - } - } - #[inline] - pub fn MiscValid(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(59usize, 1u8) as u64) } - } - #[inline] - pub fn set_MiscValid(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(59usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorEnabled(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(60usize, 1u8) as u64) } - } - #[inline] - pub fn set_ErrorEnabled(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(60usize, 1u8, val as u64) - } - } - #[inline] - pub fn UncorrectedError(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(61usize, 1u8) as u64) } - } - #[inline] - pub fn set_UncorrectedError(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(61usize, 1u8, val as u64) - } - } - #[inline] - pub fn StatusOverFlow(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(62usize, 1u8) as u64) } - } - #[inline] - pub fn set_StatusOverFlow(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(62usize, 1u8, val as u64) - } - } - #[inline] - pub fn Valid(&self) -> ULONG64 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(63usize, 1u8) as u64) } - } - #[inline] - pub fn set_Valid(&mut self, val: ULONG64) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(63usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - McaErrorCode: ULONG64, - ModelErrorCode: ULONG64, - OtherInfo: ULONG64, - FirmwareUpdateError: ULONG64, - CorrectedErrorCount: ULONG64, - ThresholdErrorStatus: ULONG64, - ActionRequired: ULONG64, - Signalling: ULONG64, - ContextCorrupt: ULONG64, - AddressValid: ULONG64, - MiscValid: ULONG64, - ErrorEnabled: ULONG64, - UncorrectedError: ULONG64, - StatusOverFlow: ULONG64, - Valid: ULONG64, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 16u8, - { - let McaErrorCode: u64 = unsafe { - ::core::mem::transmute(McaErrorCode) - }; - McaErrorCode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 16u8, - { - let ModelErrorCode: u64 = unsafe { - ::core::mem::transmute(ModelErrorCode) - }; - ModelErrorCode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 32usize, - 5u8, - { - let OtherInfo: u64 = unsafe { ::core::mem::transmute(OtherInfo) }; - OtherInfo as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 37usize, - 1u8, - { - let FirmwareUpdateError: u64 = unsafe { - ::core::mem::transmute(FirmwareUpdateError) - }; - FirmwareUpdateError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 38usize, - 15u8, - { - let CorrectedErrorCount: u64 = unsafe { - ::core::mem::transmute(CorrectedErrorCount) - }; - CorrectedErrorCount as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 53usize, - 2u8, - { - let ThresholdErrorStatus: u64 = unsafe { - ::core::mem::transmute(ThresholdErrorStatus) - }; - ThresholdErrorStatus as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 55usize, - 1u8, - { - let ActionRequired: u64 = unsafe { - ::core::mem::transmute(ActionRequired) - }; - ActionRequired as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 56usize, - 1u8, - { - let Signalling: u64 = unsafe { ::core::mem::transmute(Signalling) }; - Signalling as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 57usize, - 1u8, - { - let ContextCorrupt: u64 = unsafe { - ::core::mem::transmute(ContextCorrupt) - }; - ContextCorrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 58usize, - 1u8, - { - let AddressValid: u64 = unsafe { - ::core::mem::transmute(AddressValid) - }; - AddressValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 59usize, - 1u8, - { - let MiscValid: u64 = unsafe { ::core::mem::transmute(MiscValid) }; - MiscValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 60usize, - 1u8, - { - let ErrorEnabled: u64 = unsafe { - ::core::mem::transmute(ErrorEnabled) - }; - ErrorEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 61usize, - 1u8, - { - let UncorrectedError: u64 = unsafe { - ::core::mem::transmute(UncorrectedError) - }; - UncorrectedError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 62usize, - 1u8, - { - let StatusOverFlow: u64 = unsafe { - ::core::mem::transmute(StatusOverFlow) - }; - StatusOverFlow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 63usize, - 1u8, - { - let Valid: u64 = unsafe { ::core::mem::transmute(Valid) }; - Valid as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type MCI_STATUS_INTEL_BITS = _MCI_STATUS_INTEL_BITS; -pub type PMCI_STATUS_INTEL_BITS = *mut _MCI_STATUS_INTEL_BITS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _MCI_STATUS { - pub CommonBits: MCI_STATUS_BITS_COMMON, - pub AmdBits: MCI_STATUS_AMD_BITS, - pub IntelBits: MCI_STATUS_INTEL_BITS, - pub QuadPart: ULONG64, -} -#[test] -fn bindgen_test_layout__MCI_STATUS() { - const UNINIT: ::core::mem::MaybeUninit<_MCI_STATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MCI_STATUS>(), - 8usize, - concat!("Size of: ", stringify!(_MCI_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_MCI_STATUS>(), - 1usize, - concat!("Alignment of ", stringify!(_MCI_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CommonBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MCI_STATUS), - "::", - stringify!(CommonBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AmdBits) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_MCI_STATUS), "::", stringify!(AmdBits)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IntelBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MCI_STATUS), - "::", - stringify!(IntelBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QuadPart) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_MCI_STATUS), "::", stringify!(QuadPart)), - ); -} -impl Default for _MCI_STATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MCI_STATUS = _MCI_STATUS; -pub type PMCI_STATUS = *mut _MCI_STATUS; -pub mod _WHEA_CPU_VENDOR { - pub type Type = ::core::ffi::c_int; - pub const WheaCpuVendorOther: Type = 0; - pub const WheaCpuVendorIntel: Type = 1; - pub const WheaCpuVendorAmd: Type = 2; -} -pub use self::_WHEA_CPU_VENDOR::Type as WHEA_CPU_VENDOR; -pub type PWHEA_CPU_VENDOR = *mut _WHEA_CPU_VENDOR::Type; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_AMD_EXTENDED_REGISTERS { - pub IPID: ULONGLONG, - pub SYND: ULONGLONG, - pub CONFIG: ULONGLONG, - pub DESTAT: ULONGLONG, - pub DEADDR: ULONGLONG, - pub MISC1: ULONGLONG, - pub MISC2: ULONGLONG, - pub MISC3: ULONGLONG, - pub MISC4: ULONGLONG, - pub RasCap: ULONGLONG, - pub Reserved: [ULONGLONG; 14usize], -} -#[test] -fn bindgen_test_layout__WHEA_AMD_EXTENDED_REGISTERS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_AMD_EXTENDED_REGISTERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_AMD_EXTENDED_REGISTERS>(), - 192usize, - concat!("Size of: ", stringify!(_WHEA_AMD_EXTENDED_REGISTERS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_AMD_EXTENDED_REGISTERS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_AMD_EXTENDED_REGISTERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IPID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AMD_EXTENDED_REGISTERS), - "::", - stringify!(IPID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SYND) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AMD_EXTENDED_REGISTERS), - "::", - stringify!(SYND), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CONFIG) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AMD_EXTENDED_REGISTERS), - "::", - stringify!(CONFIG), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DESTAT) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AMD_EXTENDED_REGISTERS), - "::", - stringify!(DESTAT), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DEADDR) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AMD_EXTENDED_REGISTERS), - "::", - stringify!(DEADDR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MISC1) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AMD_EXTENDED_REGISTERS), - "::", - stringify!(MISC1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MISC2) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AMD_EXTENDED_REGISTERS), - "::", - stringify!(MISC2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MISC3) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AMD_EXTENDED_REGISTERS), - "::", - stringify!(MISC3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MISC4) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AMD_EXTENDED_REGISTERS), - "::", - stringify!(MISC4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RasCap) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AMD_EXTENDED_REGISTERS), - "::", - stringify!(RasCap), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AMD_EXTENDED_REGISTERS), - "::", - stringify!(Reserved), - ), - ); -} -pub type WHEA_AMD_EXTENDED_REGISTERS = _WHEA_AMD_EXTENDED_REGISTERS; -pub type PWHEA_AMD_EXTENDED_REGISTERS = *mut _WHEA_AMD_EXTENDED_REGISTERS; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _XPF_RECOVERY_INFO { - pub FailureReason: _XPF_RECOVERY_INFO__bindgen_ty_1, - pub Action: _XPF_RECOVERY_INFO__bindgen_ty_2, - pub ActionRequired: BOOLEAN, - pub RecoverySucceeded: BOOLEAN, - pub RecoveryKernel: BOOLEAN, - pub Reserved: UINT8, - pub Reserved2: UINT16, - pub Reserved3: UINT16, - pub Reserved4: UINT32, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _XPF_RECOVERY_INFO__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__XPF_RECOVERY_INFO__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_XPF_RECOVERY_INFO__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_XPF_RECOVERY_INFO__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_XPF_RECOVERY_INFO__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_XPF_RECOVERY_INFO__bindgen_ty_1)), - ); -} -impl _XPF_RECOVERY_INFO__bindgen_ty_1 { - #[inline] - pub fn NotSupported(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_NotSupported(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Overflow(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_Overflow(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ContextCorrupt(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_ContextCorrupt(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestartIpErrorIpNotValid(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_RestartIpErrorIpNotValid(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn NoRecoveryContext(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_NoRecoveryContext(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn MiscOrAddrNotValid(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_MiscOrAddrNotValid(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn InvalidAddressMode(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_InvalidAddressMode(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn HighIrql(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_HighIrql(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn InterruptsDisabled(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_InterruptsDisabled(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn SwapBusy(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_SwapBusy(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn StackOverflow(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_StackOverflow(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 21u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 21u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - NotSupported: UINT32, - Overflow: UINT32, - ContextCorrupt: UINT32, - RestartIpErrorIpNotValid: UINT32, - NoRecoveryContext: UINT32, - MiscOrAddrNotValid: UINT32, - InvalidAddressMode: UINT32, - HighIrql: UINT32, - InterruptsDisabled: UINT32, - SwapBusy: UINT32, - StackOverflow: UINT32, - Reserved: UINT32, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let NotSupported: u32 = unsafe { - ::core::mem::transmute(NotSupported) - }; - NotSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Overflow: u32 = unsafe { ::core::mem::transmute(Overflow) }; - Overflow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let ContextCorrupt: u32 = unsafe { - ::core::mem::transmute(ContextCorrupt) - }; - ContextCorrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let RestartIpErrorIpNotValid: u32 = unsafe { - ::core::mem::transmute(RestartIpErrorIpNotValid) - }; - RestartIpErrorIpNotValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let NoRecoveryContext: u32 = unsafe { - ::core::mem::transmute(NoRecoveryContext) - }; - NoRecoveryContext as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let MiscOrAddrNotValid: u32 = unsafe { - ::core::mem::transmute(MiscOrAddrNotValid) - }; - MiscOrAddrNotValid as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let InvalidAddressMode: u32 = unsafe { - ::core::mem::transmute(InvalidAddressMode) - }; - InvalidAddressMode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let HighIrql: u32 = unsafe { ::core::mem::transmute(HighIrql) }; - HighIrql as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let InterruptsDisabled: u32 = unsafe { - ::core::mem::transmute(InterruptsDisabled) - }; - InterruptsDisabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let SwapBusy: u32 = unsafe { ::core::mem::transmute(SwapBusy) }; - SwapBusy as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let StackOverflow: u32 = unsafe { - ::core::mem::transmute(StackOverflow) - }; - StackOverflow as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 21u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _XPF_RECOVERY_INFO__bindgen_ty_2 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__XPF_RECOVERY_INFO__bindgen_ty_2() { - assert_eq!( - ::core::mem::size_of::<_XPF_RECOVERY_INFO__bindgen_ty_2>(), - 4usize, - concat!("Size of: ", stringify!(_XPF_RECOVERY_INFO__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_XPF_RECOVERY_INFO__bindgen_ty_2>(), - 1usize, - concat!("Alignment of ", stringify!(_XPF_RECOVERY_INFO__bindgen_ty_2)), - ); -} -impl _XPF_RECOVERY_INFO__bindgen_ty_2 { - #[inline] - pub fn RecoveryAttempted(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_RecoveryAttempted(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn HvHandled(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_HvHandled(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> UINT32 { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: UINT32) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 30u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - RecoveryAttempted: UINT32, - HvHandled: UINT32, - Reserved: UINT32, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let RecoveryAttempted: u32 = unsafe { - ::core::mem::transmute(RecoveryAttempted) - }; - RecoveryAttempted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let HvHandled: u32 = unsafe { ::core::mem::transmute(HvHandled) }; - HvHandled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 30u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__XPF_RECOVERY_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_XPF_RECOVERY_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_XPF_RECOVERY_INFO>(), - 20usize, - concat!("Size of: ", stringify!(_XPF_RECOVERY_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_XPF_RECOVERY_INFO>(), - 1usize, - concat!("Alignment of ", stringify!(_XPF_RECOVERY_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FailureReason) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XPF_RECOVERY_INFO), - "::", - stringify!(FailureReason), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Action) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_XPF_RECOVERY_INFO), - "::", - stringify!(Action), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ActionRequired) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XPF_RECOVERY_INFO), - "::", - stringify!(ActionRequired), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RecoverySucceeded) as usize - ptr as usize - }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_XPF_RECOVERY_INFO), - "::", - stringify!(RecoverySucceeded), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecoveryKernel) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_XPF_RECOVERY_INFO), - "::", - stringify!(RecoveryKernel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 11usize, - concat!( - "Offset of field: ", - stringify!(_XPF_RECOVERY_INFO), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_XPF_RECOVERY_INFO), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved3) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_XPF_RECOVERY_INFO), - "::", - stringify!(Reserved3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved4) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_XPF_RECOVERY_INFO), - "::", - stringify!(Reserved4), - ), - ); -} -pub type XPF_RECOVERY_INFO = _XPF_RECOVERY_INFO; -pub type PXPF_RECOVERY_INFO = *mut _XPF_RECOVERY_INFO; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_XPF_MCA_SECTION__bindgen_ty_1 { - pub ExtendedRegisters: [ULONGLONG; 24usize], - pub AMDExtendedRegisters: WHEA_AMD_EXTENDED_REGISTERS, -} -#[test] -fn bindgen_test_layout__WHEA_XPF_MCA_SECTION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_XPF_MCA_SECTION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_XPF_MCA_SECTION__bindgen_ty_1>(), - 192usize, - concat!("Size of: ", stringify!(_WHEA_XPF_MCA_SECTION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_XPF_MCA_SECTION__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_XPF_MCA_SECTION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExtendedRegisters) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MCA_SECTION__bindgen_ty_1), - "::", - stringify!(ExtendedRegisters), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AMDExtendedRegisters) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_XPF_MCA_SECTION__bindgen_ty_1), - "::", - stringify!(AMDExtendedRegisters), - ), - ); -} -impl Default for _WHEA_XPF_MCA_SECTION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_NMI_ERROR_SECTION_FLAGS { - pub __bindgen_anon_1: _WHEA_NMI_ERROR_SECTION_FLAGS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_NMI_ERROR_SECTION_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_NMI_ERROR_SECTION_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_NMI_ERROR_SECTION_FLAGS__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_NMI_ERROR_SECTION_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_NMI_ERROR_SECTION_FLAGS__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_NMI_ERROR_SECTION_FLAGS__bindgen_ty_1)), - ); -} -impl _WHEA_NMI_ERROR_SECTION_FLAGS__bindgen_ty_1 { - #[inline] - pub fn HypervisorError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_HypervisorError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 31u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - HypervisorError: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let HypervisorError: u32 = unsafe { - ::core::mem::transmute(HypervisorError) - }; - HypervisorError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 31u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_NMI_ERROR_SECTION_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_NMI_ERROR_SECTION_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_NMI_ERROR_SECTION_FLAGS>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_NMI_ERROR_SECTION_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_NMI_ERROR_SECTION_FLAGS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_NMI_ERROR_SECTION_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NMI_ERROR_SECTION_FLAGS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_NMI_ERROR_SECTION_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_NMI_ERROR_SECTION_FLAGS = _WHEA_NMI_ERROR_SECTION_FLAGS; -pub type PWHEA_NMI_ERROR_SECTION_FLAGS = *mut _WHEA_NMI_ERROR_SECTION_FLAGS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_NMI_ERROR_SECTION { - pub Data: [UCHAR; 8usize], - pub Flags: WHEA_NMI_ERROR_SECTION_FLAGS, -} -#[test] -fn bindgen_test_layout__WHEA_NMI_ERROR_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_NMI_ERROR_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_NMI_ERROR_SECTION>(), - 12usize, - concat!("Size of: ", stringify!(_WHEA_NMI_ERROR_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_NMI_ERROR_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_NMI_ERROR_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NMI_ERROR_SECTION), - "::", - stringify!(Data), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_NMI_ERROR_SECTION), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _WHEA_NMI_ERROR_SECTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_NMI_ERROR_SECTION = _WHEA_NMI_ERROR_SECTION; -pub type PWHEA_NMI_ERROR_SECTION = *mut _WHEA_NMI_ERROR_SECTION; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_MSR_DUMP_SECTION { - pub MsrDumpBuffer: UCHAR, - pub MsrDumpLength: ULONG, - pub MsrDumpData: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__WHEA_MSR_DUMP_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_MSR_DUMP_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_MSR_DUMP_SECTION>(), - 6usize, - concat!("Size of: ", stringify!(_WHEA_MSR_DUMP_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_MSR_DUMP_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_MSR_DUMP_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MsrDumpBuffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MSR_DUMP_SECTION), - "::", - stringify!(MsrDumpBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MsrDumpLength) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MSR_DUMP_SECTION), - "::", - stringify!(MsrDumpLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MsrDumpData) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MSR_DUMP_SECTION), - "::", - stringify!(MsrDumpData), - ), - ); -} -pub type WHEA_MSR_DUMP_SECTION = _WHEA_MSR_DUMP_SECTION; -pub type PWHEA_MSR_DUMP_SECTION = *mut _WHEA_MSR_DUMP_SECTION; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MU_TELEMETRY_SECTION { - pub ComponentID: GUID, - pub SubComponentID: GUID, - pub Reserved: UINT32, - pub ErrorStatusValue: UINT32, - pub AdditionalInfo1: UINT64, - pub AdditionalInfo2: UINT64, -} -#[test] -fn bindgen_test_layout__MU_TELEMETRY_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_MU_TELEMETRY_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MU_TELEMETRY_SECTION>(), - 56usize, - concat!("Size of: ", stringify!(_MU_TELEMETRY_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_MU_TELEMETRY_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_MU_TELEMETRY_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ComponentID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MU_TELEMETRY_SECTION), - "::", - stringify!(ComponentID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubComponentID) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MU_TELEMETRY_SECTION), - "::", - stringify!(SubComponentID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_MU_TELEMETRY_SECTION), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrorStatusValue) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_MU_TELEMETRY_SECTION), - "::", - stringify!(ErrorStatusValue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AdditionalInfo1) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_MU_TELEMETRY_SECTION), - "::", - stringify!(AdditionalInfo1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AdditionalInfo2) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_MU_TELEMETRY_SECTION), - "::", - stringify!(AdditionalInfo2), - ), - ); -} -pub type MU_TELEMETRY_SECTION = _MU_TELEMETRY_SECTION; -pub type PMU_TELEMETRY_SECTION = *mut _MU_TELEMETRY_SECTION; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS { - pub __bindgen_anon_1: _WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS__bindgen_ty_1 { - #[inline] - pub fn MPIDR(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_MPIDR(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn AffinityLevel(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_AffinityLevel(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn RunningState(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_RunningState(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn VendorSpecificInfo(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_VendorSpecificInfo(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 28u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MPIDR: ULONG, - AffinityLevel: ULONG, - RunningState: ULONG, - VendorSpecificInfo: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let MPIDR: u32 = unsafe { ::core::mem::transmute(MPIDR) }; - MPIDR as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let AffinityLevel: u32 = unsafe { - ::core::mem::transmute(AffinityLevel) - }; - AffinityLevel as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let RunningState: u32 = unsafe { - ::core::mem::transmute(RunningState) - }; - RunningState as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let VendorSpecificInfo: u32 = unsafe { - ::core::mem::transmute(VendorSpecificInfo) - }; - VendorSpecificInfo as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 28u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS = _WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS; -pub type PWHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS = *mut _WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_ARM_PROCESSOR_ERROR_SECTION { - pub ValidBits: WHEA_ARM_PROCESSOR_ERROR_SECTION_VALID_BITS, - pub ErrorInformationStructures: USHORT, - pub ContextInformationStructures: USHORT, - pub SectionLength: ULONG, - pub ErrorAffinityLevel: UCHAR, - pub Reserved: [UCHAR; 3usize], - pub MPIDR_EL1: ULONGLONG, - pub MIDR_EL1: ULONGLONG, - pub RunningState: ULONG, - pub PSCIState: ULONG, - pub Data: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__WHEA_ARM_PROCESSOR_ERROR_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARM_PROCESSOR_ERROR_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_PROCESSOR_ERROR_SECTION>(), - 41usize, - concat!("Size of: ", stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_PROCESSOR_ERROR_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrorInformationStructures) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION), - "::", - stringify!(ErrorInformationStructures), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ContextInformationStructures) as usize - - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION), - "::", - stringify!(ContextInformationStructures), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectionLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION), - "::", - stringify!(SectionLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrorAffinityLevel) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION), - "::", - stringify!(ErrorAffinityLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MPIDR_EL1) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION), - "::", - stringify!(MPIDR_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MIDR_EL1) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION), - "::", - stringify!(MIDR_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RunningState) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION), - "::", - stringify!(RunningState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PSCIState) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION), - "::", - stringify!(PSCIState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_SECTION), - "::", - stringify!(Data), - ), - ); -} -impl Default for _WHEA_ARM_PROCESSOR_ERROR_SECTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ARM_PROCESSOR_ERROR_SECTION = _WHEA_ARM_PROCESSOR_ERROR_SECTION; -pub type PWHEA_ARM_PROCESSOR_ERROR_SECTION = *mut _WHEA_ARM_PROCESSOR_ERROR_SECTION; -pub mod _WHEA_RECOVERY_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WheaRecoveryTypeActionRequired: Type = 1; - pub const WheaRecoveryTypeActionOptional: Type = 2; - pub const WheaRecoveryTypeMax: Type = 3; -} -pub use self::_WHEA_RECOVERY_TYPE::Type as WHEA_RECOVERY_TYPE; -pub type PWHEA_RECOVERY_TYPE = *mut _WHEA_RECOVERY_TYPE::Type; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_RECOVERY_ACTION { - pub __bindgen_anon_1: _WHEA_RECOVERY_ACTION__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_RECOVERY_ACTION__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 5usize]>, - pub __bindgen_padding_0: [u8; 3usize], -} -#[test] -fn bindgen_test_layout__WHEA_RECOVERY_ACTION__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_RECOVERY_ACTION__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_RECOVERY_ACTION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_RECOVERY_ACTION__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_RECOVERY_ACTION__bindgen_ty_1)), - ); -} -impl _WHEA_RECOVERY_ACTION__bindgen_ty_1 { - #[inline] - pub fn NoneAttempted(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_NoneAttempted(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn TerminateProcess(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_TerminateProcess(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ForwardedToVm(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_ForwardedToVm(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn MarkPageBad(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_MarkPageBad(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn PoisonNotPresent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_PoisonNotPresent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 28u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 28u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - NoneAttempted: ULONG, - TerminateProcess: ULONG, - ForwardedToVm: ULONG, - MarkPageBad: ULONG, - PoisonNotPresent: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 5usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 5usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let NoneAttempted: u32 = unsafe { - ::core::mem::transmute(NoneAttempted) - }; - NoneAttempted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let TerminateProcess: u32 = unsafe { - ::core::mem::transmute(TerminateProcess) - }; - TerminateProcess as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let ForwardedToVm: u32 = unsafe { - ::core::mem::transmute(ForwardedToVm) - }; - ForwardedToVm as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let MarkPageBad: u32 = unsafe { - ::core::mem::transmute(MarkPageBad) - }; - MarkPageBad as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let PoisonNotPresent: u32 = unsafe { - ::core::mem::transmute(PoisonNotPresent) - }; - PoisonNotPresent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 28u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_RECOVERY_ACTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_RECOVERY_ACTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_RECOVERY_ACTION>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_RECOVERY_ACTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_RECOVERY_ACTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_RECOVERY_ACTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_RECOVERY_ACTION), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_RECOVERY_ACTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_RECOVERY_ACTION = _WHEA_RECOVERY_ACTION; -pub type PWHEA_RECOVERY_ACTION = *mut _WHEA_RECOVERY_ACTION; -pub mod _WHEA_RECOVERY_FAILURE_REASON { - pub type Type = ::core::ffi::c_int; - pub const WheaRecoveryFailureReasonKernelCouldNotMarkMemoryBad: Type = 1; - pub const WheaRecoveryFailureReasonKernelMarkMemoryBadTimedOut: Type = 2; - pub const WheaRecoveryFailureReasonNoRecoveryContext: Type = 3; - pub const WheaRecoveryFailureReasonNotContinuable: Type = 4; - pub const WheaRecoveryFailureReasonPcc: Type = 5; - pub const WheaRecoveryFailureReasonOverflow: Type = 6; - pub const WheaRecoveryFailureReasonNotSupported: Type = 7; - pub const WheaRecoveryFailureReasonMiscOrAddrNotValid: Type = 8; - pub const WheaRecoveryFailureReasonInvalidAddressMode: Type = 9; - pub const WheaRecoveryFailureReasonHighIrql: Type = 10; - pub const WheaRecoveryFailureReasonInsufficientAltContextWrappers: Type = 11; - pub const WheaRecoveryFailureReasonInterruptsDisabled: Type = 12; - pub const WheaRecoveryFailureReasonSwapBusy: Type = 13; - pub const WheaRecoveryFailureReasonStackOverflow: Type = 14; - pub const WheaRecoveryFailureReasonUnexpectedFailure: Type = 15; - pub const WheaRecoveryFailureReasonKernelWillPageFaultBCAtCurrentIrql: Type = 16; - pub const WheaRecoveryFailureReasonFarNotValid: Type = 17; - pub const WheaRecoveryFailureReasonMax: Type = 18; -} -pub use self::_WHEA_RECOVERY_FAILURE_REASON::Type as WHEA_RECOVERY_FAILURE_REASON; -pub type PWHEA_RECOVERY_FAILURE_REASON = *mut _WHEA_RECOVERY_FAILURE_REASON::Type; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_ERROR_RECOVERY_INFO_SECTION { - pub RecoveryKernel: BOOLEAN, - pub RecoveryAction: WHEA_RECOVERY_ACTION, - pub RecoveryType: WHEA_RECOVERY_TYPE, - pub Irql: KIRQL, - pub RecoverySucceeded: BOOLEAN, - pub FailureReason: WHEA_RECOVERY_FAILURE_REASON, - pub ProcessName: [CCHAR; 20usize], -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_RECOVERY_INFO_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_RECOVERY_INFO_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_RECOVERY_INFO_SECTION>(), - 39usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_RECOVERY_INFO_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_RECOVERY_INFO_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_RECOVERY_INFO_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecoveryKernel) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECOVERY_INFO_SECTION), - "::", - stringify!(RecoveryKernel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecoveryAction) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECOVERY_INFO_SECTION), - "::", - stringify!(RecoveryAction), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecoveryType) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECOVERY_INFO_SECTION), - "::", - stringify!(RecoveryType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Irql) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECOVERY_INFO_SECTION), - "::", - stringify!(Irql), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RecoverySucceeded) as usize - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECOVERY_INFO_SECTION), - "::", - stringify!(RecoverySucceeded), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FailureReason) as usize - ptr as usize }, - 15usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECOVERY_INFO_SECTION), - "::", - stringify!(FailureReason), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProcessName) as usize - ptr as usize }, - 19usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_RECOVERY_INFO_SECTION), - "::", - stringify!(ProcessName), - ), - ); -} -impl Default for _WHEA_ERROR_RECOVERY_INFO_SECTION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_RECOVERY_INFO_SECTION = _WHEA_ERROR_RECOVERY_INFO_SECTION; -pub type PWHEA_ERROR_RECOVERY_INFO_SECTION = *mut _WHEA_ERROR_RECOVERY_INFO_SECTION; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS { - pub __bindgen_anon_1: _WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS__bindgen_ty_1, - >(), - 2usize, - concat!( - "Size of: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS__bindgen_ty_1 { - #[inline] - pub fn MultipleError(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_MultipleError(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Flags(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_Flags(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorInformation(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_ErrorInformation(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn VirtualFaultAddress(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_VirtualFaultAddress(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn PhysicalFaultAddress(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_PhysicalFaultAddress(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 11u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 11u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MultipleError: USHORT, - Flags: USHORT, - ErrorInformation: USHORT, - VirtualFaultAddress: USHORT, - PhysicalFaultAddress: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let MultipleError: u16 = unsafe { - ::core::mem::transmute(MultipleError) - }; - MultipleError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Flags: u16 = unsafe { ::core::mem::transmute(Flags) }; - Flags as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let ErrorInformation: u16 = unsafe { - ::core::mem::transmute(ErrorInformation) - }; - ErrorInformation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let VirtualFaultAddress: u16 = unsafe { - ::core::mem::transmute(VirtualFaultAddress) - }; - VirtualFaultAddress as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let PhysicalFaultAddress: u16 = unsafe { - ::core::mem::transmute(PhysicalFaultAddress) - }; - PhysicalFaultAddress as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 11u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS>(), - 2usize, - concat!( - "Size of: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS = _WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS; -pub type PWHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS = *mut _WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_ARM_CACHE_ERROR_VALID_BITS { - pub __bindgen_anon_1: _WHEA_ARM_CACHE_ERROR_VALID_BITS__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARM_CACHE_ERROR_VALID_BITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_ARM_CACHE_ERROR_VALID_BITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_CACHE_ERROR_VALID_BITS__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_WHEA_ARM_CACHE_ERROR_VALID_BITS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_CACHE_ERROR_VALID_BITS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ARM_CACHE_ERROR_VALID_BITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_ARM_CACHE_ERROR_VALID_BITS__bindgen_ty_1 { - #[inline] - pub fn TransactionType(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_TransactionType(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Operation(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_Operation(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Level(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_Level(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ProcessorContextCorrupt(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_ProcessorContextCorrupt(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Corrected(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_Corrected(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn PrecisePC(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_PrecisePC(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestartablePC(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set_RestartablePC(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 9u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 9u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TransactionType: USHORT, - Operation: USHORT, - Level: USHORT, - ProcessorContextCorrupt: USHORT, - Corrected: USHORT, - PrecisePC: USHORT, - RestartablePC: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let TransactionType: u16 = unsafe { - ::core::mem::transmute(TransactionType) - }; - TransactionType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Operation: u16 = unsafe { ::core::mem::transmute(Operation) }; - Operation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Level: u16 = unsafe { ::core::mem::transmute(Level) }; - Level as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ProcessorContextCorrupt: u16 = unsafe { - ::core::mem::transmute(ProcessorContextCorrupt) - }; - ProcessorContextCorrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let Corrected: u16 = unsafe { ::core::mem::transmute(Corrected) }; - Corrected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let PrecisePC: u16 = unsafe { ::core::mem::transmute(PrecisePC) }; - PrecisePC as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let RestartablePC: u16 = unsafe { - ::core::mem::transmute(RestartablePC) - }; - RestartablePC as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 9u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_ARM_CACHE_ERROR_VALID_BITS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARM_CACHE_ERROR_VALID_BITS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_CACHE_ERROR_VALID_BITS>(), - 2usize, - concat!("Size of: ", stringify!(_WHEA_ARM_CACHE_ERROR_VALID_BITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_CACHE_ERROR_VALID_BITS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARM_CACHE_ERROR_VALID_BITS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_CACHE_ERROR_VALID_BITS), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _WHEA_ARM_CACHE_ERROR_VALID_BITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ARM_CACHE_ERROR_VALID_BITS = _WHEA_ARM_CACHE_ERROR_VALID_BITS; -pub type PWHEA_ARM_CACHE_ERROR_VALID_BITS = *mut _WHEA_ARM_CACHE_ERROR_VALID_BITS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_ARM_TLB_ERROR_VALID_BITS { - pub __bindgen_anon_1: _WHEA_ARM_TLB_ERROR_VALID_BITS__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARM_TLB_ERROR_VALID_BITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_ARM_TLB_ERROR_VALID_BITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_TLB_ERROR_VALID_BITS__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_WHEA_ARM_TLB_ERROR_VALID_BITS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_TLB_ERROR_VALID_BITS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ARM_TLB_ERROR_VALID_BITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_ARM_TLB_ERROR_VALID_BITS__bindgen_ty_1 { - #[inline] - pub fn TransactionType(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_TransactionType(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Operation(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_Operation(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Level(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_Level(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ProcessorContextCorrupt(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_ProcessorContextCorrupt(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Corrected(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_Corrected(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn PrecisePC(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_PrecisePC(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestartablePC(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set_RestartablePC(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 9u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 9u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TransactionType: USHORT, - Operation: USHORT, - Level: USHORT, - ProcessorContextCorrupt: USHORT, - Corrected: USHORT, - PrecisePC: USHORT, - RestartablePC: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let TransactionType: u16 = unsafe { - ::core::mem::transmute(TransactionType) - }; - TransactionType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Operation: u16 = unsafe { ::core::mem::transmute(Operation) }; - Operation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Level: u16 = unsafe { ::core::mem::transmute(Level) }; - Level as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ProcessorContextCorrupt: u16 = unsafe { - ::core::mem::transmute(ProcessorContextCorrupt) - }; - ProcessorContextCorrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let Corrected: u16 = unsafe { ::core::mem::transmute(Corrected) }; - Corrected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let PrecisePC: u16 = unsafe { ::core::mem::transmute(PrecisePC) }; - PrecisePC as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let RestartablePC: u16 = unsafe { - ::core::mem::transmute(RestartablePC) - }; - RestartablePC as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 9u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_ARM_TLB_ERROR_VALID_BITS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARM_TLB_ERROR_VALID_BITS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_TLB_ERROR_VALID_BITS>(), - 2usize, - concat!("Size of: ", stringify!(_WHEA_ARM_TLB_ERROR_VALID_BITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_TLB_ERROR_VALID_BITS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARM_TLB_ERROR_VALID_BITS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_TLB_ERROR_VALID_BITS), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _WHEA_ARM_TLB_ERROR_VALID_BITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ARM_TLB_ERROR_VALID_BITS = _WHEA_ARM_TLB_ERROR_VALID_BITS; -pub type PWHEA_ARM_TLB_ERROR_VALID_BITS = *mut _WHEA_ARM_TLB_ERROR_VALID_BITS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_ARM_TLB_ERROR { - pub ValidationBit: WHEA_ARM_TLB_ERROR_VALID_BITS, - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 7usize]>, - pub __bindgen_padding_0: [u8; 3usize], -} -#[test] -fn bindgen_test_layout__WHEA_ARM_TLB_ERROR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARM_TLB_ERROR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_TLB_ERROR>(), - 12usize, - concat!("Size of: ", stringify!(_WHEA_ARM_TLB_ERROR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_TLB_ERROR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARM_TLB_ERROR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidationBit) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_TLB_ERROR), - "::", - stringify!(ValidationBit), - ), - ); -} -impl Default for _WHEA_ARM_TLB_ERROR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -impl _WHEA_ARM_TLB_ERROR { - #[inline] - pub fn TransactionType(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u8) } - } - #[inline] - pub fn set_TransactionType(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 2u8, val as u64) - } - } - #[inline] - pub fn Operation(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 4u8) as u8) } - } - #[inline] - pub fn set_Operation(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 4u8, val as u64) - } - } - #[inline] - pub fn Level(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 3u8) as u8) } - } - #[inline] - pub fn set_Level(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 3u8, val as u64) - } - } - #[inline] - pub fn ProcessorContextCorrupt(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u8) } - } - #[inline] - pub fn set_ProcessorContextCorrupt(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn Corrected(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u8) } - } - #[inline] - pub fn set_Corrected(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn PrecisePC(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u8) } - } - #[inline] - pub fn set_PrecisePC(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestartablePC(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u8) } - } - #[inline] - pub fn set_RestartablePC(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONGLONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 36u8) as u64) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONGLONG) { - unsafe { - let val: u64 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 36u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TransactionType: UCHAR, - Operation: UCHAR, - Level: UCHAR, - ProcessorContextCorrupt: UCHAR, - Corrected: UCHAR, - PrecisePC: UCHAR, - RestartablePC: UCHAR, - Reserved: ULONGLONG, - ) -> __BindgenBitfieldUnit<[u8; 7usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 7usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 2u8, - { - let TransactionType: u8 = unsafe { - ::core::mem::transmute(TransactionType) - }; - TransactionType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 4u8, - { - let Operation: u8 = unsafe { ::core::mem::transmute(Operation) }; - Operation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 3u8, - { - let Level: u8 = unsafe { ::core::mem::transmute(Level) }; - Level as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let ProcessorContextCorrupt: u8 = unsafe { - ::core::mem::transmute(ProcessorContextCorrupt) - }; - ProcessorContextCorrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let Corrected: u8 = unsafe { ::core::mem::transmute(Corrected) }; - Corrected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let PrecisePC: u8 = unsafe { ::core::mem::transmute(PrecisePC) }; - PrecisePC as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let RestartablePC: u8 = unsafe { - ::core::mem::transmute(RestartablePC) - }; - RestartablePC as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 36u8, - { - let Reserved: u64 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type WHEA_ARM_TLB_ERROR = _WHEA_ARM_TLB_ERROR; -pub type PWHEA_ARM_TLB_ERROR = *mut _WHEA_ARM_TLB_ERROR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_ARM_BUS_ERROR_VALID_BITS { - pub __bindgen_anon_1: _WHEA_ARM_BUS_ERROR_VALID_BITS__bindgen_ty_1, - pub AsUSHORT: USHORT, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARM_BUS_ERROR_VALID_BITS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_ARM_BUS_ERROR_VALID_BITS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_BUS_ERROR_VALID_BITS__bindgen_ty_1>(), - 2usize, - concat!("Size of: ", stringify!(_WHEA_ARM_BUS_ERROR_VALID_BITS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_BUS_ERROR_VALID_BITS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ARM_BUS_ERROR_VALID_BITS__bindgen_ty_1), - ), - ); -} -impl _WHEA_ARM_BUS_ERROR_VALID_BITS__bindgen_ty_1 { - #[inline] - pub fn TransactionType(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set_TransactionType(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Operation(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set_Operation(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn Level(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set_Level(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ProcessorContextCorrupt(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set_ProcessorContextCorrupt(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn Corrected(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set_Corrected(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn PrecisePC(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set_PrecisePC(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn RestartablePC(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set_RestartablePC(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn ParticipationType(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } - } - #[inline] - pub fn set_ParticipationType(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn Timeout(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } - } - #[inline] - pub fn set_Timeout(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn AddressSpace(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } - } - #[inline] - pub fn set_AddressSpace(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemoryAttributes(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } - } - #[inline] - pub fn set_MemoryAttributes(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn AccessMode(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } - } - #[inline] - pub fn set_AccessMode(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> USHORT { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 4u8) as u16) } - } - #[inline] - pub fn set_Reserved(&mut self, val: USHORT) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 4u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - TransactionType: USHORT, - Operation: USHORT, - Level: USHORT, - ProcessorContextCorrupt: USHORT, - Corrected: USHORT, - PrecisePC: USHORT, - RestartablePC: USHORT, - ParticipationType: USHORT, - Timeout: USHORT, - AddressSpace: USHORT, - MemoryAttributes: USHORT, - AccessMode: USHORT, - Reserved: USHORT, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let TransactionType: u16 = unsafe { - ::core::mem::transmute(TransactionType) - }; - TransactionType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let Operation: u16 = unsafe { ::core::mem::transmute(Operation) }; - Operation as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let Level: u16 = unsafe { ::core::mem::transmute(Level) }; - Level as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ProcessorContextCorrupt: u16 = unsafe { - ::core::mem::transmute(ProcessorContextCorrupt) - }; - ProcessorContextCorrupt as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let Corrected: u16 = unsafe { ::core::mem::transmute(Corrected) }; - Corrected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let PrecisePC: u16 = unsafe { ::core::mem::transmute(PrecisePC) }; - PrecisePC as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let RestartablePC: u16 = unsafe { - ::core::mem::transmute(RestartablePC) - }; - RestartablePC as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let ParticipationType: u16 = unsafe { - ::core::mem::transmute(ParticipationType) - }; - ParticipationType as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let Timeout: u16 = unsafe { ::core::mem::transmute(Timeout) }; - Timeout as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let AddressSpace: u16 = unsafe { - ::core::mem::transmute(AddressSpace) - }; - AddressSpace as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let MemoryAttributes: u16 = unsafe { - ::core::mem::transmute(MemoryAttributes) - }; - MemoryAttributes as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let AccessMode: u16 = unsafe { ::core::mem::transmute(AccessMode) }; - AccessMode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 4u8, - { - let Reserved: u16 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_ARM_BUS_ERROR_VALID_BITS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARM_BUS_ERROR_VALID_BITS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_BUS_ERROR_VALID_BITS>(), - 2usize, - concat!("Size of: ", stringify!(_WHEA_ARM_BUS_ERROR_VALID_BITS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_BUS_ERROR_VALID_BITS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARM_BUS_ERROR_VALID_BITS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUSHORT) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_BUS_ERROR_VALID_BITS), - "::", - stringify!(AsUSHORT), - ), - ); -} -impl Default for _WHEA_ARM_BUS_ERROR_VALID_BITS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ARM_BUS_ERROR_VALID_BITS = _WHEA_ARM_BUS_ERROR_VALID_BITS; -pub type PWHEA_ARM_BUS_ERROR_VALID_BITS = *mut _WHEA_ARM_BUS_ERROR_VALID_BITS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_ARM_PROCESSOR_ERROR_INFORMATION { - pub Version: UCHAR, - pub Length: UCHAR, - pub ValidationBit: WHEA_ARM_PROCESSOR_ERROR_INFORMATION_VALID_BITS, - pub Type: UCHAR, - pub MultipleError: USHORT, - pub Flags: UCHAR, - pub ErrorInformation: ULONGLONG, - pub VirtualFaultAddress: ULONGLONG, - pub PhysicalFaultAddress: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_ARM_PROCESSOR_ERROR_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARM_PROCESSOR_ERROR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_PROCESSOR_ERROR_INFORMATION>(), - 32usize, - concat!("Size of: ", stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_PROCESSOR_ERROR_INFORMATION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidationBit) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION), - "::", - stringify!(ValidationBit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MultipleError) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION), - "::", - stringify!(MultipleError), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrorInformation) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION), - "::", - stringify!(ErrorInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VirtualFaultAddress) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION), - "::", - stringify!(VirtualFaultAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PhysicalFaultAddress) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_INFORMATION), - "::", - stringify!(PhysicalFaultAddress), - ), - ); -} -impl Default for _WHEA_ARM_PROCESSOR_ERROR_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ARM_PROCESSOR_ERROR_INFORMATION = _WHEA_ARM_PROCESSOR_ERROR_INFORMATION; -pub type PWHEA_ARM_PROCESSOR_ERROR_INFORMATION = *mut _WHEA_ARM_PROCESSOR_ERROR_INFORMATION; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS { - pub __bindgen_anon_1: _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!( - _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS__bindgen_ty_1 - ), - ), - ); -} -impl _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS__bindgen_ty_1 { - #[inline] - pub fn ExceptionLevel(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_ExceptionLevel(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn NonSecure(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_NonSecure(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn AArch64(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_AArch64(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 29u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ExceptionLevel: ULONG, - NonSecure: ULONG, - AArch64: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ExceptionLevel: u32 = unsafe { - ::core::mem::transmute(ExceptionLevel) - }; - ExceptionLevel as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let NonSecure: u32 = unsafe { ::core::mem::transmute(NonSecure) }; - NonSecure as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let AArch64: u32 = unsafe { ::core::mem::transmute(AArch64) }; - AArch64 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 29u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS = _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS; -pub type PWHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS = *mut _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER_FLAGS; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARMV8_AARCH32_GPRS { - pub R0: ULONG, - pub R1: ULONG, - pub R2: ULONG, - pub R3: ULONG, - pub R4: ULONG, - pub R5: ULONG, - pub R6: ULONG, - pub R7: ULONG, - pub R8: ULONG, - pub R9: ULONG, - pub R10: ULONG, - pub R11: ULONG, - pub R12: ULONG, - pub R13: ULONG, - pub R14: ULONG, - pub R15: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_ARMV8_AARCH32_GPRS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARMV8_AARCH32_GPRS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARMV8_AARCH32_GPRS>(), - 64usize, - concat!("Size of: ", stringify!(_WHEA_ARMV8_AARCH32_GPRS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARMV8_AARCH32_GPRS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARMV8_AARCH32_GPRS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R0) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R3) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R4) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R5) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R5), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R6) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R7) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R7), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R8) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R8), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R9) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R9), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R10) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R10), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R11) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R11), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R12) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R12), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R13) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R13), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R14) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R14), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).R15) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH32_GPRS), - "::", - stringify!(R15), - ), - ); -} -pub type WHEA_ARMV8_AARCH32_GPRS = _WHEA_ARMV8_AARCH32_GPRS; -pub type PWHEA_ARMV8_AARCH32_GPRS = *mut _WHEA_ARMV8_AARCH32_GPRS; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARM_AARCH32_EL1_CSR { - pub DFAR: ULONG, - pub DFSR: ULONG, - pub IFAR: ULONG, - pub ISR: ULONG, - pub MAIR0: ULONG, - pub MAIR1: ULONG, - pub MIDR: ULONG, - pub MPIDR: ULONG, - pub NMRR: ULONG, - pub PRRR: ULONG, - pub SCTLR: ULONG, - pub SPSR: ULONG, - pub SPSR_abt: ULONG, - pub SPSR_fiq: ULONG, - pub SPSR_irq: ULONG, - pub SPSR_svc: ULONG, - pub SPSR_und: ULONG, - pub TPIDRPRW: ULONG, - pub TPIDRURO: ULONG, - pub TPIDRURW: ULONG, - pub TTBCR: ULONG, - pub TTBR0: ULONG, - pub TTBR1: ULONG, - pub DACR: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_ARM_AARCH32_EL1_CSR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARM_AARCH32_EL1_CSR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_AARCH32_EL1_CSR>(), - 96usize, - concat!("Size of: ", stringify!(_WHEA_ARM_AARCH32_EL1_CSR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_AARCH32_EL1_CSR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARM_AARCH32_EL1_CSR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DFAR) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(DFAR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DFSR) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(DFSR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IFAR) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(IFAR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ISR) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(ISR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MAIR0) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(MAIR0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MAIR1) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(MAIR1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MIDR) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(MIDR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MPIDR) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(MPIDR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NMRR) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(NMRR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PRRR) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(PRRR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SCTLR) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(SCTLR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SPSR) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(SPSR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SPSR_abt) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(SPSR_abt), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SPSR_fiq) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(SPSR_fiq), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SPSR_irq) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(SPSR_irq), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SPSR_svc) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(SPSR_svc), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SPSR_und) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(SPSR_und), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TPIDRPRW) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(TPIDRPRW), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TPIDRURO) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(TPIDRURO), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TPIDRURW) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(TPIDRURW), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TTBCR) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(TTBCR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TTBR0) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(TTBR0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TTBR1) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(TTBR1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DACR) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL1_CSR), - "::", - stringify!(DACR), - ), - ); -} -pub type WHEA_ARM_AARCH32_EL1_CSR = _WHEA_ARM_AARCH32_EL1_CSR; -pub type PWHEA_ARM_AARCH32_EL1 = *mut _WHEA_ARM_AARCH32_EL1_CSR; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARM_AARCH32_EL2_CSR { - pub ELR_hyp: ULONG, - pub HAMAIR0: ULONG, - pub HAMAIR1: ULONG, - pub HCR: ULONG, - pub HCR2: ULONG, - pub HDFAR: ULONG, - pub HIFAR: ULONG, - pub HPFAR: ULONG, - pub HSR: ULONG, - pub HTCR: ULONG, - pub HTPIDR: ULONG, - pub HTTBR: ULONG, - pub SPSR_hyp: ULONG, - pub VTCR: ULONG, - pub VTTBR: ULONG, - pub DACR32_EL2: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_ARM_AARCH32_EL2_CSR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARM_AARCH32_EL2_CSR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_AARCH32_EL2_CSR>(), - 64usize, - concat!("Size of: ", stringify!(_WHEA_ARM_AARCH32_EL2_CSR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_AARCH32_EL2_CSR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARM_AARCH32_EL2_CSR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ELR_hyp) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(ELR_hyp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HAMAIR0) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(HAMAIR0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HAMAIR1) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(HAMAIR1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HCR) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(HCR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HCR2) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(HCR2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HDFAR) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(HDFAR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HIFAR) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(HIFAR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HPFAR) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(HPFAR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HSR) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(HSR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HTCR) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(HTCR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HTPIDR) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(HTPIDR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HTTBR) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(HTTBR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SPSR_hyp) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(SPSR_hyp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VTCR) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(VTCR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VTTBR) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(VTTBR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DACR32_EL2) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_EL2_CSR), - "::", - stringify!(DACR32_EL2), - ), - ); -} -pub type WHEA_ARM_AARCH32_EL2_CSR = _WHEA_ARM_AARCH32_EL2_CSR; -pub type PWHEA_ARM_AARCH32_EL2_CSR = *mut _WHEA_ARM_AARCH32_EL2_CSR; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARM_AARCH32_SECURE_CSR { - pub SCTLR: ULONG, - pub SPSR_mon: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_ARM_AARCH32_SECURE_CSR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARM_AARCH32_SECURE_CSR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_AARCH32_SECURE_CSR>(), - 8usize, - concat!("Size of: ", stringify!(_WHEA_ARM_AARCH32_SECURE_CSR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_AARCH32_SECURE_CSR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARM_AARCH32_SECURE_CSR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SCTLR) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_SECURE_CSR), - "::", - stringify!(SCTLR), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SPSR_mon) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH32_SECURE_CSR), - "::", - stringify!(SPSR_mon), - ), - ); -} -pub type WHEA_ARM_AARCH32_SECURE_CSR = _WHEA_ARM_AARCH32_SECURE_CSR; -pub type PWHEA_ARM_AARCH32_SECURE_CSR = *mut _WHEA_ARM_AARCH32_SECURE_CSR; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARMV8_AARCH64_GPRS { - pub X0: ULONGLONG, - pub X1: ULONGLONG, - pub X2: ULONGLONG, - pub X3: ULONGLONG, - pub X4: ULONGLONG, - pub X5: ULONGLONG, - pub X6: ULONGLONG, - pub X7: ULONGLONG, - pub X8: ULONGLONG, - pub X9: ULONGLONG, - pub X10: ULONGLONG, - pub X11: ULONGLONG, - pub X12: ULONGLONG, - pub X13: ULONGLONG, - pub X14: ULONGLONG, - pub X15: ULONGLONG, - pub X16: ULONGLONG, - pub X17: ULONGLONG, - pub X18: ULONGLONG, - pub X19: ULONGLONG, - pub X20: ULONGLONG, - pub X21: ULONGLONG, - pub X22: ULONGLONG, - pub X23: ULONGLONG, - pub X24: ULONGLONG, - pub X25: ULONGLONG, - pub X26: ULONGLONG, - pub X27: ULONGLONG, - pub X28: ULONGLONG, - pub X29: ULONGLONG, - pub X30: ULONGLONG, - pub SP: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_ARMV8_AARCH64_GPRS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARMV8_AARCH64_GPRS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARMV8_AARCH64_GPRS>(), - 256usize, - concat!("Size of: ", stringify!(_WHEA_ARMV8_AARCH64_GPRS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARMV8_AARCH64_GPRS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARMV8_AARCH64_GPRS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X0) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X1) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X2) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X3) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X4) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X5) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X5), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X6) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X6), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X7) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X7), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X8) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X8), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X9) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X9), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X10) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X10), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X11) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X11), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X12) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X12), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X13) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X13), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X14) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X14), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X15) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X15), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X16) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X16), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X17) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X17), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X18) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X18), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X19) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X19), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X20) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X20), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X21) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X21), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X22) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X22), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X23) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X23), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X24) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X24), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X25) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X25), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X26) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X26), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X27) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X27), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X28) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X28), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X29) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X29), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).X30) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(X30), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SP) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_GPRS), - "::", - stringify!(SP), - ), - ); -} -pub type WHEA_ARMV8_AARCH64_GPRS = _WHEA_ARMV8_AARCH64_GPRS; -pub type PWHEA_ARMV8_AARCH64_GPRS = *mut _WHEA_ARMV8_AARCH64_GPRS; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARM_AARCH64_EL1_CSR { - pub ELR_EL1: ULONGLONG, - pub ESR_EL2: ULONGLONG, - pub FAR_EL1: ULONGLONG, - pub ISR_EL1: ULONGLONG, - pub MAIR_EL1: ULONGLONG, - pub MIDR_EL1: ULONGLONG, - pub MPIDR_EL1: ULONGLONG, - pub SCTLR_EL1: ULONGLONG, - pub SP_EL0: ULONGLONG, - pub SP_EL1: ULONGLONG, - pub SPSR_EL1: ULONGLONG, - pub TCR_EL1: ULONGLONG, - pub TPIDR_EL0: ULONGLONG, - pub TPIDR_EL1: ULONGLONG, - pub TPIDRRO_EL0: ULONGLONG, - pub TTBR0_EL1: ULONGLONG, - pub TTBR1_EL1: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_ARM_AARCH64_EL1_CSR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARM_AARCH64_EL1_CSR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_AARCH64_EL1_CSR>(), - 136usize, - concat!("Size of: ", stringify!(_WHEA_ARM_AARCH64_EL1_CSR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_AARCH64_EL1_CSR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARM_AARCH64_EL1_CSR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ELR_EL1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(ELR_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ESR_EL2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(ESR_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FAR_EL1) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(FAR_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ISR_EL1) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(ISR_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MAIR_EL1) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(MAIR_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MIDR_EL1) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(MIDR_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MPIDR_EL1) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(MPIDR_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SCTLR_EL1) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(SCTLR_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SP_EL0) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(SP_EL0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SP_EL1) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(SP_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SPSR_EL1) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(SPSR_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TCR_EL1) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(TCR_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TPIDR_EL0) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(TPIDR_EL0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TPIDR_EL1) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(TPIDR_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TPIDRRO_EL0) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(TPIDRRO_EL0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TTBR0_EL1) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(TTBR0_EL1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TTBR1_EL1) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL1_CSR), - "::", - stringify!(TTBR1_EL1), - ), - ); -} -pub type WHEA_ARM_AARCH64_EL1_CSR = _WHEA_ARM_AARCH64_EL1_CSR; -pub type PWHEA_ARM_AARCH64_EL1_CSR = *mut _WHEA_ARM_AARCH64_EL1_CSR; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARM_AARCH64_EL2_CSR { - pub ELR_EL2: ULONGLONG, - pub ESR_EL2: ULONGLONG, - pub FAR_EL2: ULONGLONG, - pub HACR_EL2: ULONGLONG, - pub HCR_EL2: ULONGLONG, - pub HPFAR_EL2: ULONGLONG, - pub MAIR_EL2: ULONGLONG, - pub SCTLR_EL2: ULONGLONG, - pub SP_EL2: ULONGLONG, - pub SPSR_EL2: ULONGLONG, - pub TCR_EL2: ULONGLONG, - pub TPIDR_EL2: ULONGLONG, - pub TTBR0_EL2: ULONGLONG, - pub VTCR_EL2: ULONGLONG, - pub VTTBR_EL2: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_ARM_AARCH64_EL2_CSR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARM_AARCH64_EL2_CSR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_AARCH64_EL2_CSR>(), - 120usize, - concat!("Size of: ", stringify!(_WHEA_ARM_AARCH64_EL2_CSR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_AARCH64_EL2_CSR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARM_AARCH64_EL2_CSR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ELR_EL2) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(ELR_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ESR_EL2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(ESR_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FAR_EL2) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(FAR_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HACR_EL2) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(HACR_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HCR_EL2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(HCR_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HPFAR_EL2) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(HPFAR_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MAIR_EL2) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(MAIR_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SCTLR_EL2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(SCTLR_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SP_EL2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(SP_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SPSR_EL2) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(SPSR_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TCR_EL2) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(TCR_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TPIDR_EL2) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(TPIDR_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TTBR0_EL2) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(TTBR0_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VTCR_EL2) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(VTCR_EL2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VTTBR_EL2) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_AARCH64_EL2_CSR), - "::", - stringify!(VTTBR_EL2), - ), - ); -} -pub type WHEA_ARM_AARCH64_EL2_CSR = _WHEA_ARM_AARCH64_EL2_CSR; -pub type PWHEA_ARM_AARCH64_EL2_CSR = *mut _WHEA_ARM_AARCH64_EL2_CSR; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARMV8_AARCH64_EL3_CSR { - pub ELR_EL3: ULONGLONG, - pub ESR_EL3: ULONGLONG, - pub FAR_EL3: ULONGLONG, - pub MAIR_EL3: ULONGLONG, - pub SCTLR_EL3: ULONGLONG, - pub SP_EL3: ULONGLONG, - pub SPSR_EL3: ULONGLONG, - pub TCR_EL3: ULONGLONG, - pub TPIDR_EL3: ULONGLONG, - pub TTBR0_EL3: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_ARMV8_AARCH64_EL3_CSR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARMV8_AARCH64_EL3_CSR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARMV8_AARCH64_EL3_CSR>(), - 80usize, - concat!("Size of: ", stringify!(_WHEA_ARMV8_AARCH64_EL3_CSR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARMV8_AARCH64_EL3_CSR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARMV8_AARCH64_EL3_CSR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ELR_EL3) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_EL3_CSR), - "::", - stringify!(ELR_EL3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ESR_EL3) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_EL3_CSR), - "::", - stringify!(ESR_EL3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FAR_EL3) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_EL3_CSR), - "::", - stringify!(FAR_EL3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MAIR_EL3) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_EL3_CSR), - "::", - stringify!(MAIR_EL3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SCTLR_EL3) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_EL3_CSR), - "::", - stringify!(SCTLR_EL3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SP_EL3) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_EL3_CSR), - "::", - stringify!(SP_EL3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SPSR_EL3) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_EL3_CSR), - "::", - stringify!(SPSR_EL3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TCR_EL3) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_EL3_CSR), - "::", - stringify!(TCR_EL3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TPIDR_EL3) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_EL3_CSR), - "::", - stringify!(TPIDR_EL3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TTBR0_EL3) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARMV8_AARCH64_EL3_CSR), - "::", - stringify!(TTBR0_EL3), - ), - ); -} -pub type WHEA_ARMV8_AARCH64_EL3_CSR = _WHEA_ARMV8_AARCH64_EL3_CSR; -pub type PWHEA_ARMV8_AARCH64_EL3_CSR = *mut _WHEA_ARMV8_AARCH64_EL3_CSR; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARM_MISC_CSR { - pub MRSEncoding: USHORT, - pub Value: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_ARM_MISC_CSR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ARM_MISC_CSR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_MISC_CSR>(), - 10usize, - concat!("Size of: ", stringify!(_WHEA_ARM_MISC_CSR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_MISC_CSR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ARM_MISC_CSR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MRSEncoding) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_MISC_CSR), - "::", - stringify!(MRSEncoding), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Value) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_MISC_CSR), - "::", - stringify!(Value), - ), - ); -} -pub type WHEA_ARM_MISC_CSR = _WHEA_ARM_MISC_CSR; -pub type PWHEA_ARM_MISC_CSR = *mut _WHEA_ARM_MISC_CSR; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER { - pub Version: USHORT, - pub RegisterContextType: USHORT, - pub RegisterArraySize: ULONG, - pub RegisterArray: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER>(), - 9usize, - concat!( - "Size of: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RegisterContextType) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER), - "::", - stringify!(RegisterContextType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RegisterArraySize) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER), - "::", - stringify!(RegisterArraySize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RegisterArray) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER), - "::", - stringify!(RegisterArray), - ), - ); -} -pub type WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER = _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER; -pub type PWHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER = *mut _WHEA_ARM_PROCESSOR_ERROR_CONTEXT_INFORMATION_HEADER; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_SEA_SECTION { - pub Esr: ULONG, - pub Far: ULONG64, - pub Par: ULONG64, - pub WasKernel: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEA_SEA_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_SEA_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_SEA_SECTION>(), - 21usize, - concat!("Size of: ", stringify!(_WHEA_SEA_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_SEA_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_SEA_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Esr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEA_SECTION), - "::", - stringify!(Esr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Far) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEA_SECTION), - "::", - stringify!(Far), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Par) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEA_SECTION), - "::", - stringify!(Par), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WasKernel) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEA_SECTION), - "::", - stringify!(WasKernel), - ), - ); -} -pub type WHEA_SEA_SECTION = _WHEA_SEA_SECTION; -pub type PWHEA_SEA_SECTION = *mut _WHEA_SEA_SECTION; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_SEI_SECTION { - pub Esr: ULONG, - pub Far: ULONG64, -} -#[test] -fn bindgen_test_layout__WHEA_SEI_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_SEI_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_SEI_SECTION>(), - 12usize, - concat!("Size of: ", stringify!(_WHEA_SEI_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_SEI_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_SEI_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Esr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEI_SECTION), - "::", - stringify!(Esr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Far) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEI_SECTION), - "::", - stringify!(Far), - ), - ); -} -pub type WHEA_SEI_SECTION = _WHEA_SEI_SECTION; -pub type PWHEA_SEI_SECTION = *mut _WHEA_SEI_SECTION; -pub mod _WHEA_PCI_RECOVERY_SIGNAL { - pub type Type = ::core::ffi::c_int; - pub const WheaPciRecoverySignalUnknown: Type = 0; - pub const WheaPciRecoverySignalAer: Type = 1; - pub const WheaPciRecoverySignalDpc: Type = 2; -} -pub use self::_WHEA_PCI_RECOVERY_SIGNAL::Type as WHEA_PCI_RECOVERY_SIGNAL; -pub type PWHEA_PCI_RECOVERY_SIGNAL = *mut _WHEA_PCI_RECOVERY_SIGNAL::Type; -pub mod _WHEA_PCI_RECOVERY_STATUS { - pub type Type = ::core::ffi::c_int; - pub const WheaPciREcoveryStatusUnknown: Type = 0; - pub const WheaPciRecoveryStatusNoError: Type = 1; - pub const WheaPciRecoveryStatusLinkDisableTimeout: Type = 2; - pub const WheaPciRecoveryStatusLinkEnableTimeout: Type = 3; - pub const WheaPciRecoveryStatusRpBusyTimeout: Type = 4; - pub const WheaPciRecoveryStatusComplexTree: Type = 5; - pub const WheaPciRecoveryStatusBusNotFound: Type = 6; -} -pub use self::_WHEA_PCI_RECOVERY_STATUS::Type as WHEA_PCI_RECOVERY_STATUS; -pub type PWHEA_PCI_RECOVERY_STATUS = *mut _WHEA_PCI_RECOVERY_STATUS::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_PCI_RECOVERY_SECTION { - pub SignalType: UINT8, - pub RecoveryAttempted: BOOLEAN, - pub RecoveryStatus: UINT8, -} -#[test] -fn bindgen_test_layout__WHEA_PCI_RECOVERY_SECTION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PCI_RECOVERY_SECTION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PCI_RECOVERY_SECTION>(), - 3usize, - concat!("Size of: ", stringify!(_WHEA_PCI_RECOVERY_SECTION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PCI_RECOVERY_SECTION>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PCI_RECOVERY_SECTION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SignalType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCI_RECOVERY_SECTION), - "::", - stringify!(SignalType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RecoveryAttempted) as usize - ptr as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCI_RECOVERY_SECTION), - "::", - stringify!(RecoveryAttempted), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecoveryStatus) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PCI_RECOVERY_SECTION), - "::", - stringify!(RecoveryStatus), - ), - ); -} -pub type WHEA_PCI_RECOVERY_SECTION = _WHEA_PCI_RECOVERY_SECTION; -pub type PWHEA_PCI_RECOVERY_SECTION = *mut _WHEA_PCI_RECOVERY_SECTION; -pub mod _WHEA_ERROR_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WheaErrTypeProcessor: Type = 0; - pub const WheaErrTypeMemory: Type = 1; - pub const WheaErrTypePCIExpress: Type = 2; - pub const WheaErrTypeNMI: Type = 3; - pub const WheaErrTypePCIXBus: Type = 4; - pub const WheaErrTypePCIXDevice: Type = 5; - pub const WheaErrTypeGeneric: Type = 6; - pub const WheaErrTypePmem: Type = 7; -} -pub use self::_WHEA_ERROR_TYPE::Type as WHEA_ERROR_TYPE; -pub type PWHEA_ERROR_TYPE = *mut _WHEA_ERROR_TYPE::Type; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_ERROR_PACKET_FLAGS { - pub __bindgen_anon_1: _WHEA_ERROR_PACKET_FLAGS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ERROR_PACKET_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_PACKET_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_PACKET_FLAGS__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_PACKET_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_PACKET_FLAGS__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_PACKET_FLAGS__bindgen_ty_1)), - ); -} -impl _WHEA_ERROR_PACKET_FLAGS__bindgen_ty_1 { - #[inline] - pub fn PreviousError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_PreviousError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn CriticalEvent(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_CriticalEvent(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn HypervisorError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_HypervisorError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn Simulated(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_Simulated(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn PlatformPfaControl(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_PlatformPfaControl(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn PlatformDirectedOffline(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_PlatformDirectedOffline(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn AddressTranslationRequired(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_AddressTranslationRequired(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn AddressTranslationCompleted(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_AddressTranslationCompleted(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn RecoveryOptional(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_RecoveryOptional(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 23u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 23u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PreviousError: ULONG, - CriticalEvent: ULONG, - HypervisorError: ULONG, - Simulated: ULONG, - PlatformPfaControl: ULONG, - PlatformDirectedOffline: ULONG, - AddressTranslationRequired: ULONG, - AddressTranslationCompleted: ULONG, - RecoveryOptional: ULONG, - Reserved2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let PreviousError: u32 = unsafe { - ::core::mem::transmute(PreviousError) - }; - PreviousError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let CriticalEvent: u32 = unsafe { - ::core::mem::transmute(CriticalEvent) - }; - CriticalEvent as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let HypervisorError: u32 = unsafe { - ::core::mem::transmute(HypervisorError) - }; - HypervisorError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let Simulated: u32 = unsafe { ::core::mem::transmute(Simulated) }; - Simulated as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let PlatformPfaControl: u32 = unsafe { - ::core::mem::transmute(PlatformPfaControl) - }; - PlatformPfaControl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let PlatformDirectedOffline: u32 = unsafe { - ::core::mem::transmute(PlatformDirectedOffline) - }; - PlatformDirectedOffline as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let AddressTranslationRequired: u32 = unsafe { - ::core::mem::transmute(AddressTranslationRequired) - }; - AddressTranslationRequired as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let AddressTranslationCompleted: u32 = unsafe { - ::core::mem::transmute(AddressTranslationCompleted) - }; - AddressTranslationCompleted as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let RecoveryOptional: u32 = unsafe { - ::core::mem::transmute(RecoveryOptional) - }; - RecoveryOptional as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 23u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_PACKET_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_PACKET_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_PACKET_FLAGS>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_PACKET_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_PACKET_FLAGS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_PACKET_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_FLAGS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_ERROR_PACKET_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_PACKET_FLAGS = _WHEA_ERROR_PACKET_FLAGS; -pub type PWHEA_ERROR_PACKET_FLAGS = *mut _WHEA_ERROR_PACKET_FLAGS; -pub mod _WHEA_ERROR_PACKET_DATA_FORMAT { - pub type Type = ::core::ffi::c_int; - pub const WheaDataFormatIPFSalRecord: Type = 0; - pub const WheaDataFormatXPFMCA: Type = 1; - pub const WheaDataFormatMemory: Type = 2; - pub const WheaDataFormatPCIExpress: Type = 3; - pub const WheaDataFormatNMIPort: Type = 4; - pub const WheaDataFormatPCIXBus: Type = 5; - pub const WheaDataFormatPCIXDevice: Type = 6; - pub const WheaDataFormatGeneric: Type = 7; - pub const WheaDataFormatMax: Type = 8; -} -pub use self::_WHEA_ERROR_PACKET_DATA_FORMAT::Type as WHEA_ERROR_PACKET_DATA_FORMAT; -pub type PWHEA_ERROR_PACKET_DATA_FORMAT = *mut _WHEA_ERROR_PACKET_DATA_FORMAT::Type; -pub mod _WHEA_RAW_DATA_FORMAT { - pub type Type = ::core::ffi::c_int; - pub const WheaRawDataFormatIPFSalRecord: Type = 0; - pub const WheaRawDataFormatIA32MCA: Type = 1; - pub const WheaRawDataFormatIntel64MCA: Type = 2; - pub const WheaRawDataFormatAMD64MCA: Type = 3; - pub const WheaRawDataFormatMemory: Type = 4; - pub const WheaRawDataFormatPCIExpress: Type = 5; - pub const WheaRawDataFormatNMIPort: Type = 6; - pub const WheaRawDataFormatPCIXBus: Type = 7; - pub const WheaRawDataFormatPCIXDevice: Type = 8; - pub const WheaRawDataFormatGeneric: Type = 9; - pub const WheaRawDataFormatMax: Type = 10; -} -pub use self::_WHEA_RAW_DATA_FORMAT::Type as WHEA_RAW_DATA_FORMAT; -pub type PWHEA_RAW_DATA_FORMAT = *mut _WHEA_RAW_DATA_FORMAT::Type; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_ERROR_PACKET_V1 { - pub Signature: ULONG, - pub Flags: WHEA_ERROR_PACKET_FLAGS, - pub Size: ULONG, - pub RawDataLength: ULONG, - pub Reserved1: ULONGLONG, - pub Context: ULONGLONG, - pub ErrorType: WHEA_ERROR_TYPE, - pub ErrorSeverity: WHEA_ERROR_SEVERITY, - pub ErrorSourceId: ULONG, - pub ErrorSourceType: WHEA_ERROR_SOURCE_TYPE, - pub Reserved2: ULONG, - pub Version: ULONG, - pub Cpu: ULONGLONG, - pub u: _WHEA_ERROR_PACKET_V1__bindgen_ty_1, - pub RawDataFormat: WHEA_RAW_DATA_FORMAT, - pub RawDataOffset: ULONG, - pub RawData: [UCHAR; 1usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WHEA_ERROR_PACKET_V1__bindgen_ty_1 { - pub ProcessorError: WHEA_PROCESSOR_GENERIC_ERROR_SECTION, - pub MemoryError: WHEA_MEMORY_ERROR_SECTION, - pub NmiError: WHEA_NMI_ERROR_SECTION, - pub PciExpressError: WHEA_PCIEXPRESS_ERROR_SECTION, - pub PciXBusError: WHEA_PCIXBUS_ERROR_SECTION, - pub PciXDeviceError: WHEA_PCIXDEVICE_ERROR_SECTION, - pub PmemError: WHEA_PMEM_ERROR_SECTION, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_PACKET_V1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_PACKET_V1__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_PACKET_V1__bindgen_ty_1>(), - 208usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_PACKET_V1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_PACKET_V1__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_PACKET_V1__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProcessorError) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1__bindgen_ty_1), - "::", - stringify!(ProcessorError), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MemoryError) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1__bindgen_ty_1), - "::", - stringify!(MemoryError), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NmiError) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1__bindgen_ty_1), - "::", - stringify!(NmiError), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PciExpressError) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1__bindgen_ty_1), - "::", - stringify!(PciExpressError), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PciXBusError) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1__bindgen_ty_1), - "::", - stringify!(PciXBusError), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PciXDeviceError) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1__bindgen_ty_1), - "::", - stringify!(PciXDeviceError), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PmemError) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1__bindgen_ty_1), - "::", - stringify!(PmemError), - ), - ); -} -impl Default for _WHEA_ERROR_PACKET_V1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_PACKET_V1() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_PACKET_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_PACKET_V1>(), - 281usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_PACKET_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_PACKET_V1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_PACKET_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(Signature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RawDataLength) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(RawDataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorType) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(ErrorType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSeverity) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(ErrorSeverity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSourceId) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(ErrorSourceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSourceType) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(ErrorSourceType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cpu) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(Cpu), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(u), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RawDataFormat) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(RawDataFormat), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RawDataOffset) as usize - ptr as usize }, - 276usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(RawDataOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RawData) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V1), - "::", - stringify!(RawData), - ), - ); -} -impl Default for _WHEA_ERROR_PACKET_V1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_PACKET_V1 = _WHEA_ERROR_PACKET_V1; -pub type PWHEA_ERROR_PACKET_V1 = *mut _WHEA_ERROR_PACKET_V1; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_ERROR_PACKET_V2 { - pub Signature: ULONG, - pub Version: ULONG, - pub Length: ULONG, - pub Flags: WHEA_ERROR_PACKET_FLAGS, - pub ErrorType: WHEA_ERROR_TYPE, - pub ErrorSeverity: WHEA_ERROR_SEVERITY, - pub ErrorSourceId: ULONG, - pub ErrorSourceType: WHEA_ERROR_SOURCE_TYPE, - pub NotifyType: GUID, - pub Context: ULONGLONG, - pub DataFormat: WHEA_ERROR_PACKET_DATA_FORMAT, - pub Reserved1: ULONG, - pub DataOffset: ULONG, - pub DataLength: ULONG, - pub PshedDataOffset: ULONG, - pub PshedDataLength: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_PACKET_V2() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_PACKET_V2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_PACKET_V2>(), - 80usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_PACKET_V2)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_PACKET_V2>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_PACKET_V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(Signature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(ErrorType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSeverity) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(ErrorSeverity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSourceId) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(ErrorSourceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSourceType) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(ErrorSourceType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NotifyType) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(NotifyType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataFormat) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(DataFormat), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataOffset) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(DataOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataLength) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(DataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PshedDataOffset) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(PshedDataOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PshedDataLength) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_PACKET_V2), - "::", - stringify!(PshedDataLength), - ), - ); -} -impl Default for _WHEA_ERROR_PACKET_V2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_PACKET_V2 = _WHEA_ERROR_PACKET_V2; -pub type PWHEA_ERROR_PACKET_V2 = *mut _WHEA_ERROR_PACKET_V2; -pub type WHEA_ERROR_PACKET = _WHEA_ERROR_PACKET_V2; -pub type PWHEA_ERROR_PACKET = *mut _WHEA_ERROR_PACKET_V2; -pub type WHEA_PCI_DPC_SECTION = PCI_EXPRESS_DPC_CAPABILITY; -pub type PWHEA_PCI_DPC_SECTION = *mut PCI_EXPRESS_DPC_CAPABILITY; -pub mod _WHEA_EVENT_LOG_ENTRY_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WheaEventLogEntryTypeInformational: Type = 0; - pub const WheaEventLogEntryTypeWarning: Type = 1; - pub const WheaEventLogEntryTypeError: Type = 2; -} -pub use self::_WHEA_EVENT_LOG_ENTRY_TYPE::Type as WHEA_EVENT_LOG_ENTRY_TYPE; -pub type PWHEA_EVENT_LOG_ENTRY_TYPE = *mut _WHEA_EVENT_LOG_ENTRY_TYPE::Type; -pub mod _WHEA_EVENT_LOG_ENTRY_ID { - pub type Type = ::core::ffi::c_int; - pub const WheaEventLogEntryIdCmcPollingTimeout: Type = -2147483647; - pub const WheaEventLogEntryIdWheaInit: Type = -2147483646; - pub const WheaEventLogEntryIdCmcSwitchToPolling: Type = -2147483645; - pub const WheaEventLogEntryIdDroppedCorrectedError: Type = -2147483644; - pub const WheaEventLogEntryIdStartedReportHwError: Type = -2147483643; - pub const WheaEventLogEntryIdPFAMemoryOfflined: Type = -2147483642; - pub const WheaEventLogEntryIdPFAMemoryRemoveMonitor: Type = -2147483641; - pub const WheaEventLogEntryIdPFAMemoryPolicy: Type = -2147483640; - pub const WheaEventLogEntryIdPshedInjectError: Type = -2147483639; - pub const WheaEventLogEntryIdOscCapabilities: Type = -2147483638; - pub const WheaEventLogEntryIdPshedPluginRegister: Type = -2147483637; - pub const WheaEventLogEntryIdAddRemoveErrorSource: Type = -2147483636; - pub const WheaEventLogEntryIdWorkQueueItem: Type = -2147483635; - pub const WheaEventLogEntryIdAttemptErrorRecovery: Type = -2147483634; - pub const WheaEventLogEntryIdMcaFoundErrorInBank: Type = -2147483633; - pub const WheaEventLogEntryIdMcaStuckErrorCheck: Type = -2147483632; - pub const WheaEventLogEntryIdMcaErrorCleared: Type = -2147483631; - pub const WheaEventLogEntryIdClearedPoison: Type = -2147483630; - pub const WheaEventLogEntryIdProcessEINJ: Type = -2147483629; - pub const WheaEventLogEntryIdProcessHEST: Type = -2147483628; - pub const WheaEventLogEntryIdCreateGenericRecord: Type = -2147483627; - pub const WheaEventLogEntryIdErrorRecord: Type = -2147483626; - pub const WheaEventLogEntryIdErrorRecordLimit: Type = -2147483625; - pub const WheaEventLogEntryIdAerNotGrantedToOs: Type = -2147483624; - pub const WheaEventLogEntryIdErrSrcArrayInvalid: Type = -2147483623; - pub const WheaEventLogEntryIdAcpiTimeOut: Type = -2147483622; - pub const WheaEventLogCmciRestart: Type = -2147483621; - pub const WheaEventLogCmciFinalRestart: Type = -2147483620; - pub const WheaEventLogEntryEtwOverFlow: Type = -2147483619; - pub const WheaEventLogAzccRootBusSearchErr: Type = -2147483618; - pub const WheaEventLogAzccRootBusList: Type = -2147483617; - pub const WheaEventLogEntryIdErrSrcInvalid: Type = -2147483616; - pub const WheaEventLogEntryIdGenericErrMemMap: Type = -2147483615; - pub const WheaEventLogEntryIdPshedCallbackCollision: Type = -2147483614; - pub const WheaEventLogEntryIdSELBugCheckProgress: Type = -2147483613; - pub const WheaEventLogEntryIdPshedPluginLoad: Type = -2147483612; - pub const WheaEventLogEntryIdPshedPluginUnload: Type = -2147483611; - pub const WheaEventLogEntryIdPshedPluginSupported: Type = -2147483610; - pub const WheaEventLogEntryIdDeviceDriver: Type = -2147483609; - pub const WheaEventLogEntryIdCmciImplPresent: Type = -2147483608; - pub const WheaEventLogEntryIdCmciInitError: Type = -2147483607; - pub const WheaEventLogEntryIdSELBugCheckRecovery: Type = -2147483606; - pub const WheaEventLogEntryIdDrvErrSrcInvalid: Type = -2147483605; - pub const WheaEventLogEntryIdDrvHandleBusy: Type = -2147483604; - pub const WheaEventLogEntryIdWheaHeartbeat: Type = -2147483603; - pub const WheaEventLogAzccRootBusPoisonSet: Type = -2147483602; - pub const WheaEventLogEntryIdSELBugCheckInfo: Type = -2147483601; - pub const WheaEventLogEntryIdErrDimmInfoMismatch: Type = -2147483600; - pub const WheaEventLogEntryIdeDpcEnabled: Type = -2147483599; - pub const WheaEventLogEntryPageOfflineDone: Type = -2147483598; - pub const WheaEventLogEntryPageOfflinePendMax: Type = -2147483597; - pub const WheaEventLogEntryIdBadPageLimitReached: Type = -2147483596; - pub const WheaEventLogEntrySrarDetail: Type = -2147483595; - pub const WheaEventLogEntryEarlyError: Type = -2147483594; - pub const WheaEventLogEntryIdPcieOverrideInfo: Type = -2147483593; - pub const WheaEventLogEntryIdReadPcieOverridesErr: Type = -2147483592; - pub const WheaEventLogEntryIdPcieConfigInfo: Type = -2147483591; - pub const WheaEventLogEntryIdPcieSummaryFailed: Type = -2147483584; - pub const WheaEventLogEntryIdThrottleRegCorrupt: Type = -2147483583; - pub const WheaEventLogEntryIdThrottleAddErrSrcFailed: Type = -2147483582; - pub const WheaEventLogEntryIdThrottleRegDataIgnored: Type = -2147483581; - pub const WheaEventLogEntryIdEnableKeyNotifFailed: Type = -2147483580; - pub const WheaEventLogEntryIdKeyNotificationFailed: Type = -2147483579; - pub const WheaEventLogEntryIdPcieRemoveDevice: Type = -2147483578; - pub const WheaEventLogEntryIdPcieAddDevice: Type = -2147483577; - pub const WheaEventLogEntryIdPcieSpuriousErrSource: Type = -2147483576; - pub const WheaEventLogEntryIdMemoryAddDevice: Type = -2147483575; - pub const WheaEventLogEntryIdMemoryRemoveDevice: Type = -2147483574; - pub const WheaEventLogEntryIdMemorySummaryFailed: Type = -2147483573; - pub const WheaEventLogEntryIdPcieDpcError: Type = -2147483572; - pub const WheaEventLogEntryIdCpuBusesInitFailed: Type = -2147483571; - pub const WheaEventLogEntryIdPshedPluginInitFailed: Type = -2147483570; - pub const WheaEventLogEntryIdFailedAddToDefectList: Type = -2147483569; - pub const WheaEventLogEntryIdDefectListFull: Type = -2147483568; - pub const WheaEventLogEntryIdDefectListUEFIVarFailed: Type = -2147483567; - pub const WheaEventLogEntryIdDefectListCorrupt: Type = -2147483566; - pub const WheaEventLogEntryIdBadHestNotifyData: Type = -2147483565; - pub const WheaEventLogEntryIdSrasTableNotFound: Type = -2147483564; - pub const WheaEventLogEntryIdSrasTableError: Type = -2147483563; - pub const WheaEventLogEntryIdSrasTableEntries: Type = -2147483562; - pub const WheaEventLogEntryIdRowFailure: Type = -2147483561; - pub const WheaEventLogEntryIdCpusFrozen: Type = -2147483552; - pub const WheaEventLogEntryIdCpusFrozenNoCrashDump: Type = -2147483551; - pub const WheaEventLogEntryIdPshedPiTraceLog: Type = -2147221488; -} -pub use self::_WHEA_EVENT_LOG_ENTRY_ID::Type as WHEA_EVENT_LOG_ENTRY_ID; -pub type PWHEA_EVENT_LOG_ENTRY_ID = *mut _WHEA_EVENT_LOG_ENTRY_ID::Type; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_EVENT_LOG_ENTRY_FLAGS { - pub __bindgen_anon_1: _WHEA_EVENT_LOG_ENTRY_FLAGS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_EVENT_LOG_ENTRY_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_EVENT_LOG_ENTRY_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_EVENT_LOG_ENTRY_FLAGS__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_EVENT_LOG_ENTRY_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_EVENT_LOG_ENTRY_FLAGS__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_EVENT_LOG_ENTRY_FLAGS__bindgen_ty_1)), - ); -} -impl _WHEA_EVENT_LOG_ENTRY_FLAGS__bindgen_ty_1 { - #[inline] - pub fn Reserved1(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_Reserved1(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn LogInternalEtw(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_LogInternalEtw(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn LogBlackbox(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_LogBlackbox(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn LogSel(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_LogSel(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn RawSel(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_RawSel(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn NoFormat(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_NoFormat(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn Driver(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_Driver(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved2(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 25u8) as u32) } - } - #[inline] - pub fn set_Reserved2(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 25u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Reserved1: ULONG, - LogInternalEtw: ULONG, - LogBlackbox: ULONG, - LogSel: ULONG, - RawSel: ULONG, - NoFormat: ULONG, - Driver: ULONG, - Reserved2: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let Reserved1: u32 = unsafe { ::core::mem::transmute(Reserved1) }; - Reserved1 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let LogInternalEtw: u32 = unsafe { - ::core::mem::transmute(LogInternalEtw) - }; - LogInternalEtw as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let LogBlackbox: u32 = unsafe { - ::core::mem::transmute(LogBlackbox) - }; - LogBlackbox as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let LogSel: u32 = unsafe { ::core::mem::transmute(LogSel) }; - LogSel as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let RawSel: u32 = unsafe { ::core::mem::transmute(RawSel) }; - RawSel as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let NoFormat: u32 = unsafe { ::core::mem::transmute(NoFormat) }; - NoFormat as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let Driver: u32 = unsafe { ::core::mem::transmute(Driver) }; - Driver as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 25u8, - { - let Reserved2: u32 = unsafe { ::core::mem::transmute(Reserved2) }; - Reserved2 as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_EVENT_LOG_ENTRY_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_EVENT_LOG_ENTRY_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_EVENT_LOG_ENTRY_FLAGS>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_EVENT_LOG_ENTRY_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_EVENT_LOG_ENTRY_FLAGS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_EVENT_LOG_ENTRY_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_EVENT_LOG_ENTRY_FLAGS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_EVENT_LOG_ENTRY_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_EVENT_LOG_ENTRY_FLAGS = _WHEA_EVENT_LOG_ENTRY_FLAGS; -pub type PWHEA_EVENT_LOG_ENTRY_FLAGS = *mut _WHEA_EVENT_LOG_ENTRY_FLAGS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_EVENT_LOG_ENTRY_HEADER { - pub Signature: ULONG, - pub Version: ULONG, - pub Length: ULONG, - pub Type: WHEA_EVENT_LOG_ENTRY_TYPE, - pub OwnerTag: ULONG, - pub Id: WHEA_EVENT_LOG_ENTRY_ID, - pub Flags: WHEA_EVENT_LOG_ENTRY_FLAGS, - pub PayloadLength: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_EVENT_LOG_ENTRY_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_EVENT_LOG_ENTRY_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_EVENT_LOG_ENTRY_HEADER>(), - 32usize, - concat!("Size of: ", stringify!(_WHEA_EVENT_LOG_ENTRY_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_EVENT_LOG_ENTRY_HEADER>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_EVENT_LOG_ENTRY_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_EVENT_LOG_ENTRY_HEADER), - "::", - stringify!(Signature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_EVENT_LOG_ENTRY_HEADER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_EVENT_LOG_ENTRY_HEADER), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_EVENT_LOG_ENTRY_HEADER), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OwnerTag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_EVENT_LOG_ENTRY_HEADER), - "::", - stringify!(OwnerTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Id) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_EVENT_LOG_ENTRY_HEADER), - "::", - stringify!(Id), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_EVENT_LOG_ENTRY_HEADER), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PayloadLength) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_EVENT_LOG_ENTRY_HEADER), - "::", - stringify!(PayloadLength), - ), - ); -} -impl Default for _WHEA_EVENT_LOG_ENTRY_HEADER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_EVENT_LOG_ENTRY_HEADER = _WHEA_EVENT_LOG_ENTRY_HEADER; -pub type PWHEA_EVENT_LOG_ENTRY_HEADER = *mut _WHEA_EVENT_LOG_ENTRY_HEADER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_EVENT_LOG_ENTRY { - pub Header: WHEA_EVENT_LOG_ENTRY_HEADER, -} -#[test] -fn bindgen_test_layout__WHEA_EVENT_LOG_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_EVENT_LOG_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_EVENT_LOG_ENTRY>(), - 32usize, - concat!("Size of: ", stringify!(_WHEA_EVENT_LOG_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_EVENT_LOG_ENTRY>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_EVENT_LOG_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_EVENT_LOG_ENTRY), - "::", - stringify!(Header), - ), - ); -} -impl Default for _WHEA_EVENT_LOG_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_EVENT_LOG_ENTRY = _WHEA_EVENT_LOG_ENTRY; -pub type PWHEA_EVENT_LOG_ENTRY = *mut _WHEA_EVENT_LOG_ENTRY; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_DEFERRED_EVENT { - pub ListEntry: LIST_ENTRY, - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, -} -#[test] -fn bindgen_test_layout__WHEAP_DEFERRED_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_DEFERRED_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_DEFERRED_EVENT>(), - 48usize, - concat!("Size of: ", stringify!(_WHEAP_DEFERRED_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_DEFERRED_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_DEFERRED_EVENT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ListEntry) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DEFERRED_EVENT), - "::", - stringify!(ListEntry), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DEFERRED_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); -} -impl Default for _WHEAP_DEFERRED_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_DEFERRED_EVENT = _WHEAP_DEFERRED_EVENT; -pub type PWHEAP_DEFERRED_EVENT = *mut _WHEAP_DEFERRED_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_BAD_HEST_NOTIFY_DATA_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub SourceId: USHORT, - pub Reserved: USHORT, - pub NotifyDesc: WHEA_NOTIFICATION_DESCRIPTOR, -} -#[test] -fn bindgen_test_layout__WHEAP_BAD_HEST_NOTIFY_DATA_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_BAD_HEST_NOTIFY_DATA_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_BAD_HEST_NOTIFY_DATA_EVENT>(), - 64usize, - concat!("Size of: ", stringify!(_WHEAP_BAD_HEST_NOTIFY_DATA_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_BAD_HEST_NOTIFY_DATA_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_BAD_HEST_NOTIFY_DATA_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_BAD_HEST_NOTIFY_DATA_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceId) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_BAD_HEST_NOTIFY_DATA_EVENT), - "::", - stringify!(SourceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_BAD_HEST_NOTIFY_DATA_EVENT), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NotifyDesc) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_BAD_HEST_NOTIFY_DATA_EVENT), - "::", - stringify!(NotifyDesc), - ), - ); -} -impl Default for _WHEAP_BAD_HEST_NOTIFY_DATA_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_BAD_HEST_NOTIFY_DATA_EVENT = _WHEAP_BAD_HEST_NOTIFY_DATA_EVENT; -pub type PWHEAP_BAD_HEST_NOTIFY_DATA_EVENT = *mut _WHEAP_BAD_HEST_NOTIFY_DATA_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_STARTED_REPORT_HW_ERROR { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub ErrorPacket: PWHEA_ERROR_PACKET, -} -#[test] -fn bindgen_test_layout__WHEAP_STARTED_REPORT_HW_ERROR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_STARTED_REPORT_HW_ERROR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_STARTED_REPORT_HW_ERROR>(), - 40usize, - concat!("Size of: ", stringify!(_WHEAP_STARTED_REPORT_HW_ERROR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_STARTED_REPORT_HW_ERROR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_STARTED_REPORT_HW_ERROR)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_STARTED_REPORT_HW_ERROR), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorPacket) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_STARTED_REPORT_HW_ERROR), - "::", - stringify!(ErrorPacket), - ), - ); -} -impl Default for _WHEAP_STARTED_REPORT_HW_ERROR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_STARTED_REPORT_HW_ERROR = _WHEAP_STARTED_REPORT_HW_ERROR; -pub type PWHEAP_STARTED_REPORT_HW_ERROR = *mut _WHEAP_STARTED_REPORT_HW_ERROR; -pub mod _WHEAP_PFA_OFFLINE_DECISION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WheapPfaOfflinePredictiveFailure: Type = 1; - pub const WheapPfaOfflineUncorrectedError: Type = 2; -} -pub use self::_WHEAP_PFA_OFFLINE_DECISION_TYPE::Type as WHEAP_PFA_OFFLINE_DECISION_TYPE; -pub type PWHEAP_PFA_OFFLINE_DECISION_TYPE = *mut _WHEAP_PFA_OFFLINE_DECISION_TYPE::Type; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PFA_MEMORY_OFFLINED { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub DecisionType: WHEAP_PFA_OFFLINE_DECISION_TYPE, - pub ImmediateSuccess: BOOLEAN, - pub Page: ULONG, -} -#[test] -fn bindgen_test_layout__WHEAP_PFA_MEMORY_OFFLINED() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PFA_MEMORY_OFFLINED> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PFA_MEMORY_OFFLINED>(), - 41usize, - concat!("Size of: ", stringify!(_WHEAP_PFA_MEMORY_OFFLINED)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PFA_MEMORY_OFFLINED>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PFA_MEMORY_OFFLINED)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_OFFLINED), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DecisionType) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_OFFLINED), - "::", - stringify!(DecisionType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ImmediateSuccess) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_OFFLINED), - "::", - stringify!(ImmediateSuccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Page) as usize - ptr as usize }, - 37usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_OFFLINED), - "::", - stringify!(Page), - ), - ); -} -impl Default for _WHEAP_PFA_MEMORY_OFFLINED { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PFA_MEMORY_OFFLINED = _WHEAP_PFA_MEMORY_OFFLINED; -pub type PWHEAP_PFA_MEMORY_OFFLINED = *mut _WHEAP_PFA_MEMORY_OFFLINED; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PSHED_INJECT_ERROR { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub ErrorType: ULONG, - pub Parameter1: ULONGLONG, - pub Parameter2: ULONGLONG, - pub Parameter3: ULONGLONG, - pub Parameter4: ULONGLONG, - pub InjectionStatus: NTSTATUS, - pub InjectionAttempted: BOOLEAN, - pub InjectionByPlugin: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEAP_PSHED_INJECT_ERROR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PSHED_INJECT_ERROR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PSHED_INJECT_ERROR>(), - 74usize, - concat!("Size of: ", stringify!(_WHEAP_PSHED_INJECT_ERROR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PSHED_INJECT_ERROR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PSHED_INJECT_ERROR)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_INJECT_ERROR), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorType) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_INJECT_ERROR), - "::", - stringify!(ErrorType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameter1) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_INJECT_ERROR), - "::", - stringify!(Parameter1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameter2) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_INJECT_ERROR), - "::", - stringify!(Parameter2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameter3) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_INJECT_ERROR), - "::", - stringify!(Parameter3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameter4) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_INJECT_ERROR), - "::", - stringify!(Parameter4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InjectionStatus) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_INJECT_ERROR), - "::", - stringify!(InjectionStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InjectionAttempted) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_INJECT_ERROR), - "::", - stringify!(InjectionAttempted), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InjectionByPlugin) as usize - ptr as usize - }, - 73usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_INJECT_ERROR), - "::", - stringify!(InjectionByPlugin), - ), - ); -} -impl Default for _WHEAP_PSHED_INJECT_ERROR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PSHED_INJECT_ERROR = _WHEAP_PSHED_INJECT_ERROR; -pub type PWHEAP_PSHED_INJECT_ERROR = *mut _WHEAP_PSHED_INJECT_ERROR; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEAP_OSC_IMPLEMENTED { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub OscImplemented: BOOLEAN, - pub DebugChecked: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEAP_OSC_IMPLEMENTED() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_OSC_IMPLEMENTED> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_OSC_IMPLEMENTED>(), - 34usize, - concat!("Size of: ", stringify!(_WHEAP_OSC_IMPLEMENTED)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_OSC_IMPLEMENTED>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_OSC_IMPLEMENTED)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_OSC_IMPLEMENTED), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OscImplemented) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_OSC_IMPLEMENTED), - "::", - stringify!(OscImplemented), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DebugChecked) as usize - ptr as usize }, - 33usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_OSC_IMPLEMENTED), - "::", - stringify!(DebugChecked), - ), - ); -} -impl Default for _WHEAP_OSC_IMPLEMENTED { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_OSC_IMPLEMENTED = _WHEAP_OSC_IMPLEMENTED; -pub type PWHEAP_OSC_IMPLEMENTED = *mut _WHEAP_OSC_IMPLEMENTED; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PSHED_PLUGIN_REGISTER { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Version: ULONG, - pub Length: ULONG, - pub FunctionalAreaMask: ULONG, - pub Status: NTSTATUS, -} -#[test] -fn bindgen_test_layout__WHEAP_PSHED_PLUGIN_REGISTER() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PSHED_PLUGIN_REGISTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PSHED_PLUGIN_REGISTER>(), - 48usize, - concat!("Size of: ", stringify!(_WHEAP_PSHED_PLUGIN_REGISTER)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PSHED_PLUGIN_REGISTER>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PSHED_PLUGIN_REGISTER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_PLUGIN_REGISTER), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_PLUGIN_REGISTER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_PLUGIN_REGISTER), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FunctionalAreaMask) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_PLUGIN_REGISTER), - "::", - stringify!(FunctionalAreaMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PSHED_PLUGIN_REGISTER), - "::", - stringify!(Status), - ), - ); -} -impl Default for _WHEAP_PSHED_PLUGIN_REGISTER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PSHED_PLUGIN_REGISTER = _WHEAP_PSHED_PLUGIN_REGISTER; -pub type PWHEAP_PSHED_PLUGIN_REGISTER = *mut _WHEAP_PSHED_PLUGIN_REGISTER; -pub mod _WHEA_PFA_REMOVE_TRIGGER { - pub type Type = ::core::ffi::c_int; - pub const WheaPfaRemoveErrorThreshold: Type = 1; - pub const WheaPfaRemoveTimeout: Type = 2; - pub const WheaPfaRemoveCapacity: Type = 3; -} -pub use self::_WHEA_PFA_REMOVE_TRIGGER::Type as WHEA_PFA_REMOVE_TRIGGER; -pub type PWHEA_PFA_REMOVE_TRIGGER = *mut _WHEA_PFA_REMOVE_TRIGGER::Type; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PFA_MEMORY_REMOVE_MONITOR { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub RemoveTrigger: WHEA_PFA_REMOVE_TRIGGER, - pub TimeInList: ULONG, - pub ErrorCount: ULONG, - pub Page: ULONG, -} -#[test] -fn bindgen_test_layout__WHEAP_PFA_MEMORY_REMOVE_MONITOR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PFA_MEMORY_REMOVE_MONITOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PFA_MEMORY_REMOVE_MONITOR>(), - 48usize, - concat!("Size of: ", stringify!(_WHEAP_PFA_MEMORY_REMOVE_MONITOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PFA_MEMORY_REMOVE_MONITOR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PFA_MEMORY_REMOVE_MONITOR)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_REMOVE_MONITOR), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RemoveTrigger) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_REMOVE_MONITOR), - "::", - stringify!(RemoveTrigger), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimeInList) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_REMOVE_MONITOR), - "::", - stringify!(TimeInList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorCount) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_REMOVE_MONITOR), - "::", - stringify!(ErrorCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Page) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_REMOVE_MONITOR), - "::", - stringify!(Page), - ), - ); -} -impl Default for _WHEAP_PFA_MEMORY_REMOVE_MONITOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PFA_MEMORY_REMOVE_MONITOR = _WHEAP_PFA_MEMORY_REMOVE_MONITOR; -pub type PWHEAP_PFA_MEMORY_REMOVE_MONITOR = *mut _WHEAP_PFA_MEMORY_REMOVE_MONITOR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PFA_MEMORY_POLICY { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub RegistryKeysPresent: ULONG, - pub DisableOffline: BOOLEAN, - pub PersistOffline: BOOLEAN, - pub PfaDisabled: BOOLEAN, - pub PageCount: ULONG, - pub ErrorThreshold: ULONG, - pub TimeOut: ULONG, -} -#[test] -fn bindgen_test_layout__WHEAP_PFA_MEMORY_POLICY() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PFA_MEMORY_POLICY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PFA_MEMORY_POLICY>(), - 51usize, - concat!("Size of: ", stringify!(_WHEAP_PFA_MEMORY_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PFA_MEMORY_POLICY>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PFA_MEMORY_POLICY)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_POLICY), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RegistryKeysPresent) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_POLICY), - "::", - stringify!(RegistryKeysPresent), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DisableOffline) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_POLICY), - "::", - stringify!(DisableOffline), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PersistOffline) as usize - ptr as usize }, - 37usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_POLICY), - "::", - stringify!(PersistOffline), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PfaDisabled) as usize - ptr as usize }, - 38usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_POLICY), - "::", - stringify!(PfaDisabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PageCount) as usize - ptr as usize }, - 39usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_POLICY), - "::", - stringify!(PageCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorThreshold) as usize - ptr as usize }, - 43usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_POLICY), - "::", - stringify!(ErrorThreshold), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimeOut) as usize - ptr as usize }, - 47usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PFA_MEMORY_POLICY), - "::", - stringify!(TimeOut), - ), - ); -} -impl Default for _WHEAP_PFA_MEMORY_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PFA_MEMORY_POLICY = _WHEAP_PFA_MEMORY_POLICY; -pub type PWHEAP_PFA_MEMORY_POLICY = *mut _WHEAP_PFA_MEMORY_POLICY; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_DROPPED_CORRECTED_ERROR_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub ErrorSourceType: WHEA_ERROR_SOURCE_TYPE, - pub ErrorSourceId: ULONG, -} -#[test] -fn bindgen_test_layout__WHEAP_DROPPED_CORRECTED_ERROR_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_DROPPED_CORRECTED_ERROR_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_DROPPED_CORRECTED_ERROR_EVENT>(), - 40usize, - concat!("Size of: ", stringify!(_WHEAP_DROPPED_CORRECTED_ERROR_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_DROPPED_CORRECTED_ERROR_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_DROPPED_CORRECTED_ERROR_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DROPPED_CORRECTED_ERROR_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSourceType) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DROPPED_CORRECTED_ERROR_EVENT), - "::", - stringify!(ErrorSourceType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSourceId) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DROPPED_CORRECTED_ERROR_EVENT), - "::", - stringify!(ErrorSourceId), - ), - ); -} -impl Default for _WHEAP_DROPPED_CORRECTED_ERROR_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_DROPPED_CORRECTED_ERROR_EVENT = _WHEAP_DROPPED_CORRECTED_ERROR_EVENT; -pub type PWHEAP_DROPPED_CORRECTED_ERROR_EVENT = *mut _WHEAP_DROPPED_CORRECTED_ERROR_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_CLEARED_POISON_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub PhysicalAddress: ULONG64, -} -#[test] -fn bindgen_test_layout__WHEAP_CLEARED_POISON_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_CLEARED_POISON_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_CLEARED_POISON_EVENT>(), - 40usize, - concat!("Size of: ", stringify!(_WHEAP_CLEARED_POISON_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_CLEARED_POISON_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_CLEARED_POISON_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CLEARED_POISON_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PhysicalAddress) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CLEARED_POISON_EVENT), - "::", - stringify!(PhysicalAddress), - ), - ); -} -impl Default for _WHEAP_CLEARED_POISON_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_CLEARED_POISON_EVENT = _WHEAP_CLEARED_POISON_EVENT; -pub type PWHEAP_CLEARED_POISON_EVENT = *mut _WHEAP_CLEARED_POISON_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Descriptor: WHEA_ERROR_SOURCE_DESCRIPTOR, - pub Status: NTSTATUS, - pub IsRemove: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT>(), - 1009usize, - concat!("Size of: ", stringify!(_WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Descriptor) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT), - "::", - stringify!(Descriptor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 1004usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsRemove) as usize - ptr as usize }, - 1008usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT), - "::", - stringify!(IsRemove), - ), - ); -} -impl Default for _WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT = _WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT; -pub type PWHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT = *mut _WHEAP_ADD_REMOVE_ERROR_SOURCE_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_ATTEMPT_RECOVERY_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub ErrorHeader: WHEA_ERROR_RECORD_HEADER, - pub ArchitecturalRecovery: BOOLEAN, - pub PshedRecovery: BOOLEAN, - pub Status: NTSTATUS, -} -#[test] -fn bindgen_test_layout__WHEAP_ATTEMPT_RECOVERY_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_ATTEMPT_RECOVERY_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_ATTEMPT_RECOVERY_EVENT>(), - 166usize, - concat!("Size of: ", stringify!(_WHEAP_ATTEMPT_RECOVERY_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_ATTEMPT_RECOVERY_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_ATTEMPT_RECOVERY_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ATTEMPT_RECOVERY_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ATTEMPT_RECOVERY_EVENT), - "::", - stringify!(ErrorHeader), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ArchitecturalRecovery) as usize - ptr as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ATTEMPT_RECOVERY_EVENT), - "::", - stringify!(ArchitecturalRecovery), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PshedRecovery) as usize - ptr as usize }, - 161usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ATTEMPT_RECOVERY_EVENT), - "::", - stringify!(PshedRecovery), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 162usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ATTEMPT_RECOVERY_EVENT), - "::", - stringify!(Status), - ), - ); -} -impl Default for _WHEAP_ATTEMPT_RECOVERY_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_ATTEMPT_RECOVERY_EVENT = _WHEAP_ATTEMPT_RECOVERY_EVENT; -pub type PWHEAP_ATTEMPT_RECOVERY_EVENT = *mut _WHEAP_ATTEMPT_RECOVERY_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_FOUND_ERROR_IN_BANK_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub EpIndex: ULONG, - pub Bank: ULONG, - pub MciStatus: ULONG64, - pub ErrorType: ULONG, -} -#[test] -fn bindgen_test_layout__WHEAP_FOUND_ERROR_IN_BANK_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_FOUND_ERROR_IN_BANK_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_FOUND_ERROR_IN_BANK_EVENT>(), - 52usize, - concat!("Size of: ", stringify!(_WHEAP_FOUND_ERROR_IN_BANK_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_FOUND_ERROR_IN_BANK_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_FOUND_ERROR_IN_BANK_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_FOUND_ERROR_IN_BANK_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EpIndex) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_FOUND_ERROR_IN_BANK_EVENT), - "::", - stringify!(EpIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bank) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_FOUND_ERROR_IN_BANK_EVENT), - "::", - stringify!(Bank), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MciStatus) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_FOUND_ERROR_IN_BANK_EVENT), - "::", - stringify!(MciStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorType) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_FOUND_ERROR_IN_BANK_EVENT), - "::", - stringify!(ErrorType), - ), - ); -} -impl Default for _WHEAP_FOUND_ERROR_IN_BANK_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_FOUND_ERROR_IN_BANK_EVENT = _WHEAP_FOUND_ERROR_IN_BANK_EVENT; -pub type PWHEAP_FOUND_ERROR_IN_BANK_EVENT = *mut _WHEAP_FOUND_ERROR_IN_BANK_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_STUCK_ERROR_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub EpIndex: ULONG, - pub Bank: ULONG, - pub MciStatus: ULONG64, -} -#[test] -fn bindgen_test_layout__WHEAP_STUCK_ERROR_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_STUCK_ERROR_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_STUCK_ERROR_EVENT>(), - 48usize, - concat!("Size of: ", stringify!(_WHEAP_STUCK_ERROR_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_STUCK_ERROR_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_STUCK_ERROR_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_STUCK_ERROR_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EpIndex) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_STUCK_ERROR_EVENT), - "::", - stringify!(EpIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bank) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_STUCK_ERROR_EVENT), - "::", - stringify!(Bank), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MciStatus) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_STUCK_ERROR_EVENT), - "::", - stringify!(MciStatus), - ), - ); -} -impl Default for _WHEAP_STUCK_ERROR_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_STUCK_ERROR_EVENT = _WHEAP_STUCK_ERROR_EVENT; -pub type PWHEAP_STUCK_ERROR_EVENT = *mut _WHEAP_STUCK_ERROR_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_ERROR_CLEARED_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub EpIndex: ULONG, - pub Bank: ULONG, -} -#[test] -fn bindgen_test_layout__WHEAP_ERROR_CLEARED_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_ERROR_CLEARED_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_ERROR_CLEARED_EVENT>(), - 40usize, - concat!("Size of: ", stringify!(_WHEAP_ERROR_CLEARED_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_ERROR_CLEARED_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_ERROR_CLEARED_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ERROR_CLEARED_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EpIndex) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ERROR_CLEARED_EVENT), - "::", - stringify!(EpIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bank) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ERROR_CLEARED_EVENT), - "::", - stringify!(Bank), - ), - ); -} -impl Default for _WHEAP_ERROR_CLEARED_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_ERROR_CLEARED_EVENT = _WHEAP_ERROR_CLEARED_EVENT; -pub type PWHEAP_ERROR_CLEARED_EVENT = *mut _WHEAP_ERROR_CLEARED_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PROCESS_EINJ_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Error: [CHAR; 32usize], - pub InjectionActionTableValid: BOOLEAN, - pub BeginInjectionInstructionCount: ULONG, - pub GetTriggerErrorActionTableInstructionCount: ULONG, - pub SetErrorTypeInstructionCount: ULONG, - pub GetErrorTypeInstructionCount: ULONG, - pub EndOperationInstructionCount: ULONG, - pub ExecuteOperationInstructionCount: ULONG, - pub CheckBusyStatusInstructionCount: ULONG, - pub GetCommandStatusInstructionCount: ULONG, - pub SetErrorTypeWithAddressInstructionCount: ULONG, - pub GetExecuteOperationTimingsInstructionCount: ULONG, -} -#[test] -fn bindgen_test_layout__WHEAP_PROCESS_EINJ_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PROCESS_EINJ_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PROCESS_EINJ_EVENT>(), - 105usize, - concat!("Size of: ", stringify!(_WHEAP_PROCESS_EINJ_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PROCESS_EINJ_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PROCESS_EINJ_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_EINJ_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Error) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_EINJ_EVENT), - "::", - stringify!(Error), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InjectionActionTableValid) as usize - - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_EINJ_EVENT), - "::", - stringify!(InjectionActionTableValid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BeginInjectionInstructionCount) as usize - - ptr as usize - }, - 65usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_EINJ_EVENT), - "::", - stringify!(BeginInjectionInstructionCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetTriggerErrorActionTableInstructionCount) - as usize - ptr as usize - }, - 69usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_EINJ_EVENT), - "::", - stringify!(GetTriggerErrorActionTableInstructionCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetErrorTypeInstructionCount) as usize - - ptr as usize - }, - 73usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_EINJ_EVENT), - "::", - stringify!(SetErrorTypeInstructionCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetErrorTypeInstructionCount) as usize - - ptr as usize - }, - 77usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_EINJ_EVENT), - "::", - stringify!(GetErrorTypeInstructionCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EndOperationInstructionCount) as usize - - ptr as usize - }, - 81usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_EINJ_EVENT), - "::", - stringify!(EndOperationInstructionCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExecuteOperationInstructionCount) as usize - - ptr as usize - }, - 85usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_EINJ_EVENT), - "::", - stringify!(ExecuteOperationInstructionCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CheckBusyStatusInstructionCount) as usize - - ptr as usize - }, - 89usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_EINJ_EVENT), - "::", - stringify!(CheckBusyStatusInstructionCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetCommandStatusInstructionCount) as usize - - ptr as usize - }, - 93usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_EINJ_EVENT), - "::", - stringify!(GetCommandStatusInstructionCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetErrorTypeWithAddressInstructionCount) - as usize - ptr as usize - }, - 97usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_EINJ_EVENT), - "::", - stringify!(SetErrorTypeWithAddressInstructionCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetExecuteOperationTimingsInstructionCount) - as usize - ptr as usize - }, - 101usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_EINJ_EVENT), - "::", - stringify!(GetExecuteOperationTimingsInstructionCount), - ), - ); -} -impl Default for _WHEAP_PROCESS_EINJ_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PROCESS_EINJ_EVENT = _WHEAP_PROCESS_EINJ_EVENT; -pub type PWHEAP_PROCESS_EINJ_EVENT = *mut _WHEAP_PROCESS_EINJ_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PROCESS_HEST_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Error: [CHAR; 32usize], - pub EntryType: [CHAR; 32usize], - pub EntryIndex: ULONG, - pub HestValid: BOOLEAN, - pub CmcCount: ULONG, - pub MceCount: ULONG, - pub NmiCount: ULONG, - pub AerRootCount: ULONG, - pub AerBridgeCount: ULONG, - pub AerEndPointCount: ULONG, - pub GenericV1Count: ULONG, - pub GenericV2Count: ULONG, -} -#[test] -fn bindgen_test_layout__WHEAP_PROCESS_HEST_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PROCESS_HEST_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PROCESS_HEST_EVENT>(), - 133usize, - concat!("Size of: ", stringify!(_WHEAP_PROCESS_HEST_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PROCESS_HEST_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PROCESS_HEST_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_HEST_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Error) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_HEST_EVENT), - "::", - stringify!(Error), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntryType) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_HEST_EVENT), - "::", - stringify!(EntryType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntryIndex) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_HEST_EVENT), - "::", - stringify!(EntryIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HestValid) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_HEST_EVENT), - "::", - stringify!(HestValid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CmcCount) as usize - ptr as usize }, - 101usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_HEST_EVENT), - "::", - stringify!(CmcCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MceCount) as usize - ptr as usize }, - 105usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_HEST_EVENT), - "::", - stringify!(MceCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NmiCount) as usize - ptr as usize }, - 109usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_HEST_EVENT), - "::", - stringify!(NmiCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AerRootCount) as usize - ptr as usize }, - 113usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_HEST_EVENT), - "::", - stringify!(AerRootCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AerBridgeCount) as usize - ptr as usize }, - 117usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_HEST_EVENT), - "::", - stringify!(AerBridgeCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AerEndPointCount) as usize - ptr as usize - }, - 121usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_HEST_EVENT), - "::", - stringify!(AerEndPointCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GenericV1Count) as usize - ptr as usize }, - 125usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_HEST_EVENT), - "::", - stringify!(GenericV1Count), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GenericV2Count) as usize - ptr as usize }, - 129usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PROCESS_HEST_EVENT), - "::", - stringify!(GenericV2Count), - ), - ); -} -impl Default for _WHEAP_PROCESS_HEST_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PROCESS_HEST_EVENT = _WHEAP_PROCESS_HEST_EVENT; -pub type PWHEAP_PROCESS_HEST_EVENT = *mut _WHEAP_PROCESS_HEST_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_CREATE_GENERIC_RECORD_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Error: [CHAR; 32usize], - pub EntryCount: ULONG, - pub Status: NTSTATUS, -} -#[test] -fn bindgen_test_layout__WHEAP_CREATE_GENERIC_RECORD_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_CREATE_GENERIC_RECORD_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_CREATE_GENERIC_RECORD_EVENT>(), - 72usize, - concat!("Size of: ", stringify!(_WHEAP_CREATE_GENERIC_RECORD_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_CREATE_GENERIC_RECORD_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_CREATE_GENERIC_RECORD_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CREATE_GENERIC_RECORD_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Error) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CREATE_GENERIC_RECORD_EVENT), - "::", - stringify!(Error), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntryCount) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CREATE_GENERIC_RECORD_EVENT), - "::", - stringify!(EntryCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CREATE_GENERIC_RECORD_EVENT), - "::", - stringify!(Status), - ), - ); -} -impl Default for _WHEAP_CREATE_GENERIC_RECORD_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_CREATE_GENERIC_RECORD_EVENT = _WHEAP_CREATE_GENERIC_RECORD_EVENT; -pub type PWHEAP_CREATE_GENERIC_RECORD_EVENT = *mut _WHEAP_CREATE_GENERIC_RECORD_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_ERROR_RECORD_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Record: PWHEA_ERROR_RECORD, -} -#[test] -fn bindgen_test_layout__WHEAP_ERROR_RECORD_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_ERROR_RECORD_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_ERROR_RECORD_EVENT>(), - 40usize, - concat!("Size of: ", stringify!(_WHEAP_ERROR_RECORD_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_ERROR_RECORD_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_ERROR_RECORD_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ERROR_RECORD_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Record) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ERROR_RECORD_EVENT), - "::", - stringify!(Record), - ), - ); -} -impl Default for _WHEAP_ERROR_RECORD_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_ERROR_RECORD_EVENT = _WHEAP_ERROR_RECORD_EVENT; -pub type PWHEAP_ERROR_RECORD_EVENT = *mut _WHEAP_ERROR_RECORD_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_ERR_SRC_ARRAY_INVALID_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub ErrorSourceCount: ULONG, - pub ReportedLength: ULONG, - pub ExpectedLength: ULONG, -} -#[test] -fn bindgen_test_layout__WHEAP_ERR_SRC_ARRAY_INVALID_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_ERR_SRC_ARRAY_INVALID_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_ERR_SRC_ARRAY_INVALID_EVENT>(), - 44usize, - concat!("Size of: ", stringify!(_WHEAP_ERR_SRC_ARRAY_INVALID_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_ERR_SRC_ARRAY_INVALID_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_ERR_SRC_ARRAY_INVALID_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ERR_SRC_ARRAY_INVALID_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrorSourceCount) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ERR_SRC_ARRAY_INVALID_EVENT), - "::", - stringify!(ErrorSourceCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReportedLength) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ERR_SRC_ARRAY_INVALID_EVENT), - "::", - stringify!(ReportedLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExpectedLength) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ERR_SRC_ARRAY_INVALID_EVENT), - "::", - stringify!(ExpectedLength), - ), - ); -} -impl Default for _WHEAP_ERR_SRC_ARRAY_INVALID_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_ERR_SRC_ARRAY_INVALID_EVENT = _WHEAP_ERR_SRC_ARRAY_INVALID_EVENT; -pub type PWHEAP_ERR_SRC_ARRAY_INVALID_EVENT = *mut _WHEAP_ERR_SRC_ARRAY_INVALID_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEAP_ERR_SRC_INVALID_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub ErrDescriptor: WHEA_ERROR_SOURCE_DESCRIPTOR, - pub Error: [CHAR; 32usize], -} -#[test] -fn bindgen_test_layout__WHEAP_ERR_SRC_INVALID_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_ERR_SRC_INVALID_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_ERR_SRC_INVALID_EVENT>(), - 1036usize, - concat!("Size of: ", stringify!(_WHEAP_ERR_SRC_INVALID_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_ERR_SRC_INVALID_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_ERR_SRC_INVALID_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ERR_SRC_INVALID_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrDescriptor) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ERR_SRC_INVALID_EVENT), - "::", - stringify!(ErrDescriptor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Error) as usize - ptr as usize }, - 1004usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ERR_SRC_INVALID_EVENT), - "::", - stringify!(Error), - ), - ); -} -impl Default for _WHEAP_ERR_SRC_INVALID_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_ERR_SRC_INVALID_EVENT = _WHEAP_ERR_SRC_INVALID_EVENT; -pub type PWHEAP_ERR_SRC_INVALID_EVENT = *mut _WHEAP_ERR_SRC_INVALID_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_GENERIC_ERR_MEM_MAP_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub MapReason: [CHAR; 32usize], - pub PhysicalAddress: ULONG64, - pub Length: ULONG64, -} -#[test] -fn bindgen_test_layout__WHEAP_GENERIC_ERR_MEM_MAP_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_GENERIC_ERR_MEM_MAP_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_GENERIC_ERR_MEM_MAP_EVENT>(), - 80usize, - concat!("Size of: ", stringify!(_WHEAP_GENERIC_ERR_MEM_MAP_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_GENERIC_ERR_MEM_MAP_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_GENERIC_ERR_MEM_MAP_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_GENERIC_ERR_MEM_MAP_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MapReason) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_GENERIC_ERR_MEM_MAP_EVENT), - "::", - stringify!(MapReason), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PhysicalAddress) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_GENERIC_ERR_MEM_MAP_EVENT), - "::", - stringify!(PhysicalAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_GENERIC_ERR_MEM_MAP_EVENT), - "::", - stringify!(Length), - ), - ); -} -impl Default for _WHEAP_GENERIC_ERR_MEM_MAP_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_GENERIC_ERR_MEM_MAP_EVENT = _WHEAP_GENERIC_ERR_MEM_MAP_EVENT; -pub type PWHEAP_GENERIC_ERR_MEM_MAP_EVENT = *mut _WHEAP_GENERIC_ERR_MEM_MAP_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEAP_ACPI_TIMEOUT_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub TableType: [CHAR; 32usize], - pub TableRequest: [CHAR; 32usize], -} -#[test] -fn bindgen_test_layout__WHEAP_ACPI_TIMEOUT_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_ACPI_TIMEOUT_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_ACPI_TIMEOUT_EVENT>(), - 96usize, - concat!("Size of: ", stringify!(_WHEAP_ACPI_TIMEOUT_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_ACPI_TIMEOUT_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_ACPI_TIMEOUT_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ACPI_TIMEOUT_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TableType) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ACPI_TIMEOUT_EVENT), - "::", - stringify!(TableType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TableRequest) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ACPI_TIMEOUT_EVENT), - "::", - stringify!(TableRequest), - ), - ); -} -impl Default for _WHEAP_ACPI_TIMEOUT_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_ACPI_TIMEOUT_EVENT = _WHEAP_ACPI_TIMEOUT_EVENT; -pub type PWHEAP_ACPI_TIMEOUT_EVENT = *mut _WHEAP_ACPI_TIMEOUT_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_CMCI_RESTART_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub CmciRestoreAttempts: ULONG, - pub MaxCmciRestoreLimit: ULONG, - pub MaxCorrectedErrorsFound: ULONG, - pub MaxCorrectedErrorLimit: ULONG, -} -#[test] -fn bindgen_test_layout__WHEAP_CMCI_RESTART_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_CMCI_RESTART_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_CMCI_RESTART_EVENT>(), - 48usize, - concat!("Size of: ", stringify!(_WHEAP_CMCI_RESTART_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_CMCI_RESTART_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_CMCI_RESTART_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CMCI_RESTART_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CmciRestoreAttempts) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CMCI_RESTART_EVENT), - "::", - stringify!(CmciRestoreAttempts), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxCmciRestoreLimit) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CMCI_RESTART_EVENT), - "::", - stringify!(MaxCmciRestoreLimit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxCorrectedErrorsFound) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CMCI_RESTART_EVENT), - "::", - stringify!(MaxCorrectedErrorsFound), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxCorrectedErrorLimit) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CMCI_RESTART_EVENT), - "::", - stringify!(MaxCorrectedErrorLimit), - ), - ); -} -impl Default for _WHEAP_CMCI_RESTART_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_CMCI_RESTART_EVENT = _WHEAP_CMCI_RESTART_EVENT; -pub type PWHEAP_CMCI_RESTART_EVENT = *mut _WHEAP_CMCI_RESTART_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_SEL_BUGCHECK_PROGRESS { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub BugCheckCode: ULONG, - pub BugCheckProgressSummary: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_SEL_BUGCHECK_PROGRESS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_SEL_BUGCHECK_PROGRESS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_SEL_BUGCHECK_PROGRESS>(), - 40usize, - concat!("Size of: ", stringify!(_WHEA_SEL_BUGCHECK_PROGRESS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_SEL_BUGCHECK_PROGRESS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_SEL_BUGCHECK_PROGRESS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_PROGRESS), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BugCheckCode) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_PROGRESS), - "::", - stringify!(BugCheckCode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BugCheckProgressSummary) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_PROGRESS), - "::", - stringify!(BugCheckProgressSummary), - ), - ); -} -impl Default for _WHEA_SEL_BUGCHECK_PROGRESS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_SEL_BUGCHECK_PROGRESS = _WHEA_SEL_BUGCHECK_PROGRESS; -pub type PWHEA_SEL_BUGCHECK_PROGRESS = *mut _WHEA_SEL_BUGCHECK_PROGRESS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub StartingIrql: KIRQL, -} -#[test] -fn bindgen_test_layout__WHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT>(), - 33usize, - concat!("Size of: ", stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingIrql) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT), - "::", - stringify!(StartingIrql), - ), - ); -} -impl Default for _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT = _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT; -pub type PWHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT = *mut _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_START_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Success: BOOLEAN, - pub Version: UCHAR, - pub EntryCount: USHORT, - pub Data: _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT__bindgen_ty_1 { - pub DumpPolicy: UCHAR, - pub Reserved: [UCHAR; 3usize], -} -#[test] -fn bindgen_test_layout__WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DumpPolicy) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT__bindgen_ty_1), - "::", - stringify!(DumpPolicy), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT__bindgen_ty_1), - "::", - stringify!(Reserved), - ), - ); -} -#[test] -fn bindgen_test_layout__WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT>(), - 40usize, - concat!("Size of: ", stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Success) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT), - "::", - stringify!(Success), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 33usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntryCount) as usize - ptr as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT), - "::", - stringify!(EntryCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT), - "::", - stringify!(Data), - ), - ); -} -impl Default for _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT = _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT; -pub type PWHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT = *mut _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE1_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub BootId: ULONG, - pub Success: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT>(), - 37usize, - concat!("Size of: ", stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BootId) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT), - "::", - stringify!(BootId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Success) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT), - "::", - stringify!(Success), - ), - ); -} -impl Default for _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT = _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT; -pub type PWHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT = *mut _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_PHASE2_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub IsBugcheckOwner: BOOLEAN, - pub RecursionCount: UCHAR, - pub IsBugcheckRecoveryOwner: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT, - >(), - 35usize, - concat!( - "Size of: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsBugcheckOwner) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT), - "::", - stringify!(IsBugcheckOwner), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecursionCount) as usize - ptr as usize }, - 33usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT), - "::", - stringify!(RecursionCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IsBugcheckRecoveryOwner) as usize - ptr as usize - }, - 34usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT), - "::", - stringify!(IsBugcheckRecoveryOwner), - ), - ); -} -impl Default for _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT = _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT; -pub type PWHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT = *mut _WHEA_SEL_BUGCHECK_RECOVERY_STATUS_MULTIPLE_BUGCHECK_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_PSHED_PLUGIN_LOAD_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub PluginName: [WCHAR; 32usize], - pub MajorVersion: ULONG, - pub MinorVersion: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_PSHED_PLUGIN_LOAD_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PSHED_PLUGIN_LOAD_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PSHED_PLUGIN_LOAD_EVENT>(), - 104usize, - concat!("Size of: ", stringify!(_WHEA_PSHED_PLUGIN_LOAD_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PSHED_PLUGIN_LOAD_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PSHED_PLUGIN_LOAD_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_LOAD_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PluginName) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_LOAD_EVENT), - "::", - stringify!(PluginName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorVersion) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_LOAD_EVENT), - "::", - stringify!(MajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorVersion) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_LOAD_EVENT), - "::", - stringify!(MinorVersion), - ), - ); -} -impl Default for _WHEA_PSHED_PLUGIN_LOAD_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PSHED_PLUGIN_LOAD_EVENT = _WHEA_PSHED_PLUGIN_LOAD_EVENT; -pub type PWHEA_PSHED_PLUGIN_LOAD_EVENT = *mut _WHEA_PSHED_PLUGIN_LOAD_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_PSHED_PLUGIN_UNLOAD_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub PluginName: [WCHAR; 32usize], -} -#[test] -fn bindgen_test_layout__WHEA_PSHED_PLUGIN_UNLOAD_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PSHED_PLUGIN_UNLOAD_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PSHED_PLUGIN_UNLOAD_EVENT>(), - 96usize, - concat!("Size of: ", stringify!(_WHEA_PSHED_PLUGIN_UNLOAD_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PSHED_PLUGIN_UNLOAD_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PSHED_PLUGIN_UNLOAD_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_UNLOAD_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PluginName) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_UNLOAD_EVENT), - "::", - stringify!(PluginName), - ), - ); -} -impl Default for _WHEA_PSHED_PLUGIN_UNLOAD_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PSHED_PLUGIN_UNLOAD_EVENT = _WHEA_PSHED_PLUGIN_UNLOAD_EVENT; -pub type PWHEA_PSHED_PLUGIN_UNLOAD_EVENT = *mut _WHEA_PSHED_PLUGIN_UNLOAD_EVENT; -pub mod _WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_ERRORS { - pub type Type = ::core::ffi::c_int; - pub const PshedPiEnableNotifyErrorCreateNotifyEvent: Type = 1; - pub const PshedPiEnableNotifyErrorCreateSystemThread: Type = 2; - pub const PshedPiEnableNotifyErrorMax: Type = 3; -} -pub use self::_WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_ERRORS::Type as WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_ERRORS; -pub type PWHEA_PSHED_PLUGIN_ENABLE_NOTIFY_ERRORS = *mut _WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_ERRORS::Type; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub EnableError: WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_ERRORS, -} -#[test] -fn bindgen_test_layout__WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT>(), - 36usize, - concat!("Size of: ", stringify!(_WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EnableError) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT), - "::", - stringify!(EnableError), - ), - ); -} -impl Default for _WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT = _WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT; -pub type PWHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT = *mut _WHEA_PSHED_PLUGIN_ENABLE_NOTIFY_FAILED_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub PluginName: [WCHAR; 32usize], - pub Supported: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT>(), - 97usize, - concat!("Size of: ", stringify!(_WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PluginName) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT), - "::", - stringify!(PluginName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Supported) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT), - "::", - stringify!(Supported), - ), - ); -} -impl Default for _WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT = _WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT; -pub type PWHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT = *mut _WHEA_PSHED_PLUGIN_PLATFORM_SUPPORT_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_PSHED_PLUGIN_INIT_FAILED_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Status: NTSTATUS, -} -#[test] -fn bindgen_test_layout__WHEA_PSHED_PLUGIN_INIT_FAILED_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PSHED_PLUGIN_INIT_FAILED_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PSHED_PLUGIN_INIT_FAILED_EVENT>(), - 36usize, - concat!("Size of: ", stringify!(_WHEA_PSHED_PLUGIN_INIT_FAILED_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PSHED_PLUGIN_INIT_FAILED_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PSHED_PLUGIN_INIT_FAILED_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_INIT_FAILED_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_INIT_FAILED_EVENT), - "::", - stringify!(Status), - ), - ); -} -impl Default for _WHEA_PSHED_PLUGIN_INIT_FAILED_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PSHED_PLUGIN_INIT_FAILED_EVENT = _WHEA_PSHED_PLUGIN_INIT_FAILED_EVENT; -pub type PWHEA_PSHED_PLUGIN_INIT_FAILED_EVENT = *mut _WHEA_PSHED_PLUGIN_INIT_FAILED_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_PSHED_PLUGIN_HEARTBEAT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, -} -#[test] -fn bindgen_test_layout__WHEA_PSHED_PLUGIN_HEARTBEAT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PSHED_PLUGIN_HEARTBEAT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PSHED_PLUGIN_HEARTBEAT>(), - 32usize, - concat!("Size of: ", stringify!(_WHEA_PSHED_PLUGIN_HEARTBEAT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PSHED_PLUGIN_HEARTBEAT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PSHED_PLUGIN_HEARTBEAT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_HEARTBEAT), - "::", - stringify!(WheaEventLogEntry), - ), - ); -} -impl Default for _WHEA_PSHED_PLUGIN_HEARTBEAT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PSHED_PLUGIN_HEARTBEAT = _WHEA_PSHED_PLUGIN_HEARTBEAT; -pub type PWHEA_PSHED_PLUGIN_HEARTBEAT = *mut _WHEA_PSHED_PLUGIN_HEARTBEAT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_PSHED_PLUGIN_DIMM_MISMATCH { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub FirmwareBank: UINT16, - pub FirmwareCol: UINT16, - pub FirmwareRow: UINT16, - pub RetryRdBank: UINT16, - pub RetryRdCol: UINT16, - pub RetryRdRow: UINT16, - pub TaBank: UINT16, - pub TaCol: UINT16, - pub TaRow: UINT16, -} -#[test] -fn bindgen_test_layout__WHEA_PSHED_PLUGIN_DIMM_MISMATCH() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PSHED_PLUGIN_DIMM_MISMATCH> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PSHED_PLUGIN_DIMM_MISMATCH>(), - 50usize, - concat!("Size of: ", stringify!(_WHEA_PSHED_PLUGIN_DIMM_MISMATCH)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PSHED_PLUGIN_DIMM_MISMATCH>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PSHED_PLUGIN_DIMM_MISMATCH)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_DIMM_MISMATCH), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FirmwareBank) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_DIMM_MISMATCH), - "::", - stringify!(FirmwareBank), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FirmwareCol) as usize - ptr as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_DIMM_MISMATCH), - "::", - stringify!(FirmwareCol), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FirmwareRow) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_DIMM_MISMATCH), - "::", - stringify!(FirmwareRow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RetryRdBank) as usize - ptr as usize }, - 38usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_DIMM_MISMATCH), - "::", - stringify!(RetryRdBank), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RetryRdCol) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_DIMM_MISMATCH), - "::", - stringify!(RetryRdCol), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RetryRdRow) as usize - ptr as usize }, - 42usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_DIMM_MISMATCH), - "::", - stringify!(RetryRdRow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TaBank) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_DIMM_MISMATCH), - "::", - stringify!(TaBank), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TaCol) as usize - ptr as usize }, - 46usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_DIMM_MISMATCH), - "::", - stringify!(TaCol), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TaRow) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_DIMM_MISMATCH), - "::", - stringify!(TaRow), - ), - ); -} -impl Default for _WHEA_PSHED_PLUGIN_DIMM_MISMATCH { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PSHED_PLUGIN_DIMM_MISMATCH = _WHEA_PSHED_PLUGIN_DIMM_MISMATCH; -pub type PWHEA_PSHED_PLUGIN_DIMM_MISMATCH = *mut _WHEA_PSHED_PLUGIN_DIMM_MISMATCH; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_ETW_OVERFLOW_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub RecordId: ULONGLONG, -} -#[test] -fn bindgen_test_layout__WHEA_ETW_OVERFLOW_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ETW_OVERFLOW_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ETW_OVERFLOW_EVENT>(), - 40usize, - concat!("Size of: ", stringify!(_WHEA_ETW_OVERFLOW_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ETW_OVERFLOW_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ETW_OVERFLOW_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ETW_OVERFLOW_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecordId) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ETW_OVERFLOW_EVENT), - "::", - stringify!(RecordId), - ), - ); -} -impl Default for _WHEA_ETW_OVERFLOW_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ETW_OVERFLOW_EVENT = _WHEA_ETW_OVERFLOW_EVENT; -pub type PWHEA_ETW_OVERFLOW_EVENT = *mut _WHEA_ETW_OVERFLOW_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEAP_CMCI_IMPLEMENTED_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub CmciAvailable: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEAP_CMCI_IMPLEMENTED_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_CMCI_IMPLEMENTED_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_CMCI_IMPLEMENTED_EVENT>(), - 33usize, - concat!("Size of: ", stringify!(_WHEAP_CMCI_IMPLEMENTED_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_CMCI_IMPLEMENTED_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_CMCI_IMPLEMENTED_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CMCI_IMPLEMENTED_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CmciAvailable) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CMCI_IMPLEMENTED_EVENT), - "::", - stringify!(CmciAvailable), - ), - ); -} -impl Default for _WHEAP_CMCI_IMPLEMENTED_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_CMCI_IMPLEMENTED_EVENT = _WHEAP_CMCI_IMPLEMENTED_EVENT; -pub type PWHEAP_CMCI_IMPLEMENTED_EVENT = *mut _WHEAP_CMCI_IMPLEMENTED_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEAP_DEVICE_DRV_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Function: [CHAR; 32usize], -} -#[test] -fn bindgen_test_layout__WHEAP_DEVICE_DRV_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_DEVICE_DRV_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_DEVICE_DRV_EVENT>(), - 64usize, - concat!("Size of: ", stringify!(_WHEAP_DEVICE_DRV_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_DEVICE_DRV_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_DEVICE_DRV_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DEVICE_DRV_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Function) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DEVICE_DRV_EVENT), - "::", - stringify!(Function), - ), - ); -} -impl Default for _WHEAP_DEVICE_DRV_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_DEVICE_DRV_EVENT = _WHEAP_DEVICE_DRV_EVENT; -pub type PWHEAP_DEVICE_DRV_EVENT = *mut _WHEAP_DEVICE_DRV_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PLUGIN_PFA_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub NoFurtherPfa: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEAP_PLUGIN_PFA_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PLUGIN_PFA_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PLUGIN_PFA_EVENT>(), - 33usize, - concat!("Size of: ", stringify!(_WHEAP_PLUGIN_PFA_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PLUGIN_PFA_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PLUGIN_PFA_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PLUGIN_PFA_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NoFurtherPfa) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PLUGIN_PFA_EVENT), - "::", - stringify!(NoFurtherPfa), - ), - ); -} -impl Default for _WHEAP_PLUGIN_PFA_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PLUGIN_PFA_EVENT = _WHEAP_PLUGIN_PFA_EVENT; -pub type PWHEAP_PLUGIN_PFA_EVENT = *mut _WHEAP_PLUGIN_PFA_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_CMCI_INITERR_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Msr: ULONGLONG, - pub Type: ULONG, - pub Bank: ULONG, - pub EpIndex: ULONG, -} -#[test] -fn bindgen_test_layout__WHEAP_CMCI_INITERR_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_CMCI_INITERR_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_CMCI_INITERR_EVENT>(), - 52usize, - concat!("Size of: ", stringify!(_WHEAP_CMCI_INITERR_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_CMCI_INITERR_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_CMCI_INITERR_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CMCI_INITERR_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Msr) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CMCI_INITERR_EVENT), - "::", - stringify!(Msr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CMCI_INITERR_EVENT), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bank) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CMCI_INITERR_EVENT), - "::", - stringify!(Bank), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EpIndex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_CMCI_INITERR_EVENT), - "::", - stringify!(EpIndex), - ), - ); -} -impl Default for _WHEAP_CMCI_INITERR_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_CMCI_INITERR_EVENT = _WHEAP_CMCI_INITERR_EVENT; -pub type PWHEAP_CMCI_INITERR_EVENT = *mut _WHEAP_CMCI_INITERR_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_AZCC_ROOT_BUS_ERR_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub MaxBusCountPassed: BOOLEAN, - pub InvalidBusMSR: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEA_AZCC_ROOT_BUS_ERR_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_AZCC_ROOT_BUS_ERR_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_AZCC_ROOT_BUS_ERR_EVENT>(), - 34usize, - concat!("Size of: ", stringify!(_WHEA_AZCC_ROOT_BUS_ERR_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_AZCC_ROOT_BUS_ERR_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_AZCC_ROOT_BUS_ERR_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AZCC_ROOT_BUS_ERR_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxBusCountPassed) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AZCC_ROOT_BUS_ERR_EVENT), - "::", - stringify!(MaxBusCountPassed), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InvalidBusMSR) as usize - ptr as usize }, - 33usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AZCC_ROOT_BUS_ERR_EVENT), - "::", - stringify!(InvalidBusMSR), - ), - ); -} -impl Default for _WHEA_AZCC_ROOT_BUS_ERR_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_AZCC_ROOT_BUS_ERR_EVENT = _WHEA_AZCC_ROOT_BUS_ERR_EVENT; -pub type PWHEA_AZCC_ROOT_BUS_ERR_EVENT = *mut _WHEA_AZCC_ROOT_BUS_ERR_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_AZCC_ROOT_BUS_LIST_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub RootBusCount: UINT32, - pub RootBuses: [UINT32; 8usize], -} -#[test] -fn bindgen_test_layout__WHEA_AZCC_ROOT_BUS_LIST_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_AZCC_ROOT_BUS_LIST_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_AZCC_ROOT_BUS_LIST_EVENT>(), - 68usize, - concat!("Size of: ", stringify!(_WHEA_AZCC_ROOT_BUS_LIST_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_AZCC_ROOT_BUS_LIST_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_AZCC_ROOT_BUS_LIST_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AZCC_ROOT_BUS_LIST_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootBusCount) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AZCC_ROOT_BUS_LIST_EVENT), - "::", - stringify!(RootBusCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootBuses) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AZCC_ROOT_BUS_LIST_EVENT), - "::", - stringify!(RootBuses), - ), - ); -} -impl Default for _WHEA_AZCC_ROOT_BUS_LIST_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_AZCC_ROOT_BUS_LIST_EVENT = _WHEA_AZCC_ROOT_BUS_LIST_EVENT; -pub type PWHEA_AZCC_ROOT_BUS_LIST_EVENT = *mut _WHEA_AZCC_ROOT_BUS_LIST_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_AZCC_SET_POISON_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Bus: UINT32, - pub ReadSuccess: BOOLEAN, - pub WriteSuccess: BOOLEAN, - pub IsEnable: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEA_AZCC_SET_POISON_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_AZCC_SET_POISON_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_AZCC_SET_POISON_EVENT>(), - 39usize, - concat!("Size of: ", stringify!(_WHEA_AZCC_SET_POISON_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_AZCC_SET_POISON_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_AZCC_SET_POISON_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AZCC_SET_POISON_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bus) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AZCC_SET_POISON_EVENT), - "::", - stringify!(Bus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadSuccess) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AZCC_SET_POISON_EVENT), - "::", - stringify!(ReadSuccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WriteSuccess) as usize - ptr as usize }, - 37usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AZCC_SET_POISON_EVENT), - "::", - stringify!(WriteSuccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsEnable) as usize - ptr as usize }, - 38usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_AZCC_SET_POISON_EVENT), - "::", - stringify!(IsEnable), - ), - ); -} -impl Default for _WHEA_AZCC_SET_POISON_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_AZCC_SET_POISON_EVENT = _WHEA_AZCC_SET_POISON_EVENT; -pub type PWHEA_AZCC_SET_POISON_EVENT = *mut _WHEA_AZCC_SET_POISON_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_OFFLINE_DONE_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Address: ULONG64, -} -#[test] -fn bindgen_test_layout__WHEA_OFFLINE_DONE_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_OFFLINE_DONE_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_OFFLINE_DONE_EVENT>(), - 40usize, - concat!("Size of: ", stringify!(_WHEA_OFFLINE_DONE_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_OFFLINE_DONE_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_OFFLINE_DONE_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_OFFLINE_DONE_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_OFFLINE_DONE_EVENT), - "::", - stringify!(Address), - ), - ); -} -impl Default for _WHEA_OFFLINE_DONE_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_OFFLINE_DONE_EVENT = _WHEA_OFFLINE_DONE_EVENT; -pub type PWHEA_OFFLINE_DONE_EVENT = *mut _WHEA_OFFLINE_DONE_EVENT; -pub mod _WHEA_BUGCHECK_RECOVERY_LOG_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WheaEventBugCheckRecoveryEntry: Type = 0; - pub const WheaEventBugCheckRecoveryReturn: Type = 1; - pub const WheaEventBugCheckRecoveryMax: Type = 2; -} -pub use self::_WHEA_BUGCHECK_RECOVERY_LOG_TYPE::Type as WHEA_BUGCHECK_RECOVERY_LOG_TYPE; -pub type PWHEA_BUGCHECK_RECOVERY_LOG_TYPE = *mut _WHEA_BUGCHECK_RECOVERY_LOG_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEAP_EDPC_ENABLED_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub eDPCEnabled: BOOLEAN, - pub eDPCRecovEnabled: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEAP_EDPC_ENABLED_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_EDPC_ENABLED_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_EDPC_ENABLED_EVENT>(), - 34usize, - concat!("Size of: ", stringify!(_WHEAP_EDPC_ENABLED_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_EDPC_ENABLED_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_EDPC_ENABLED_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_EDPC_ENABLED_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).eDPCEnabled) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_EDPC_ENABLED_EVENT), - "::", - stringify!(eDPCEnabled), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).eDPCRecovEnabled) as usize - ptr as usize - }, - 33usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_EDPC_ENABLED_EVENT), - "::", - stringify!(eDPCRecovEnabled), - ), - ); -} -impl Default for _WHEAP_EDPC_ENABLED_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_EDPC_ENABLED_EVENT = _WHEAP_EDPC_ENABLED_EVENT; -pub type PWHEAP_EDPC_ENABLED_EVENT = *mut _WHEAP_EDPC_ENABLED_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_SRAR_DETAIL_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub RecoveryContextFlags: UINT32, - pub RecoveryContextPa: UINT64, - pub PageOfflineStatus: NTSTATUS, - pub KernelConsumerError: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEA_SRAR_DETAIL_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_SRAR_DETAIL_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_SRAR_DETAIL_EVENT>(), - 49usize, - concat!("Size of: ", stringify!(_WHEA_SRAR_DETAIL_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_SRAR_DETAIL_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_SRAR_DETAIL_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SRAR_DETAIL_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RecoveryContextFlags) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SRAR_DETAIL_EVENT), - "::", - stringify!(RecoveryContextFlags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RecoveryContextPa) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SRAR_DETAIL_EVENT), - "::", - stringify!(RecoveryContextPa), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PageOfflineStatus) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SRAR_DETAIL_EVENT), - "::", - stringify!(PageOfflineStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KernelConsumerError) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SRAR_DETAIL_EVENT), - "::", - stringify!(KernelConsumerError), - ), - ); -} -impl Default for _WHEA_SRAR_DETAIL_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_SRAR_DETAIL_EVENT = _WHEA_SRAR_DETAIL_EVENT; -pub type PWHEA_SRAR_DETAIL_EVENT = *mut _WHEA_SRAR_DETAIL_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_FAILED_ADD_DEFECT_LIST_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, -} -#[test] -fn bindgen_test_layout__WHEA_FAILED_ADD_DEFECT_LIST_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_FAILED_ADD_DEFECT_LIST_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_FAILED_ADD_DEFECT_LIST_EVENT>(), - 32usize, - concat!("Size of: ", stringify!(_WHEA_FAILED_ADD_DEFECT_LIST_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_FAILED_ADD_DEFECT_LIST_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_FAILED_ADD_DEFECT_LIST_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_FAILED_ADD_DEFECT_LIST_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); -} -impl Default for _WHEA_FAILED_ADD_DEFECT_LIST_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_FAILED_ADD_DEFECT_LIST_EVENT = _WHEA_FAILED_ADD_DEFECT_LIST_EVENT; -pub type PWHEA_FAILED_ADD_DEFECT_LIST_EVENT = *mut _WHEA_FAILED_ADD_DEFECT_LIST_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PLUGIN_DEFECT_LIST_FULL_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, -} -#[test] -fn bindgen_test_layout__WHEAP_PLUGIN_DEFECT_LIST_FULL_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PLUGIN_DEFECT_LIST_FULL_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PLUGIN_DEFECT_LIST_FULL_EVENT>(), - 32usize, - concat!("Size of: ", stringify!(_WHEAP_PLUGIN_DEFECT_LIST_FULL_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PLUGIN_DEFECT_LIST_FULL_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PLUGIN_DEFECT_LIST_FULL_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PLUGIN_DEFECT_LIST_FULL_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); -} -impl Default for _WHEAP_PLUGIN_DEFECT_LIST_FULL_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PLUGIN_DEFECT_LIST_FULL_EVENT = _WHEAP_PLUGIN_DEFECT_LIST_FULL_EVENT; -pub type PWHEAP_PLUGIN_DEFECT_LIST_FULL_EVENT = *mut _WHEAP_PLUGIN_DEFECT_LIST_FULL_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PLUGIN_DEFECT_LIST_UEFI_VAR_FAILED { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, -} -#[test] -fn bindgen_test_layout__WHEAP_PLUGIN_DEFECT_LIST_UEFI_VAR_FAILED() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PLUGIN_DEFECT_LIST_UEFI_VAR_FAILED> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PLUGIN_DEFECT_LIST_UEFI_VAR_FAILED>(), - 32usize, - concat!("Size of: ", stringify!(_WHEAP_PLUGIN_DEFECT_LIST_UEFI_VAR_FAILED)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PLUGIN_DEFECT_LIST_UEFI_VAR_FAILED>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PLUGIN_DEFECT_LIST_UEFI_VAR_FAILED)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PLUGIN_DEFECT_LIST_UEFI_VAR_FAILED), - "::", - stringify!(WheaEventLogEntry), - ), - ); -} -impl Default for _WHEAP_PLUGIN_DEFECT_LIST_UEFI_VAR_FAILED { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PLUGIN_DEFECT_LIST_UEFI_VAR_FAILED = _WHEAP_PLUGIN_DEFECT_LIST_UEFI_VAR_FAILED; -pub type PWHEAP_PLUGIN_DEFECT_LIST_UEFI_VAR_FAILED = *mut _WHEAP_PLUGIN_DEFECT_LIST_UEFI_VAR_FAILED; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PLUGIN_DEFECT_LIST_CORRUPT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, -} -#[test] -fn bindgen_test_layout__WHEAP_PLUGIN_DEFECT_LIST_CORRUPT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PLUGIN_DEFECT_LIST_CORRUPT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PLUGIN_DEFECT_LIST_CORRUPT>(), - 32usize, - concat!("Size of: ", stringify!(_WHEAP_PLUGIN_DEFECT_LIST_CORRUPT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PLUGIN_DEFECT_LIST_CORRUPT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PLUGIN_DEFECT_LIST_CORRUPT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PLUGIN_DEFECT_LIST_CORRUPT), - "::", - stringify!(WheaEventLogEntry), - ), - ); -} -impl Default for _WHEAP_PLUGIN_DEFECT_LIST_CORRUPT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PLUGIN_DEFECT_LIST_CORRUPT = _WHEAP_PLUGIN_DEFECT_LIST_CORRUPT; -pub type PWHEAP_PLUGIN_DEFECT_LIST_CORRUPT = *mut _WHEAP_PLUGIN_DEFECT_LIST_CORRUPT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_SPURIOUS_AER_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub ErrorSeverity: WHEA_ERROR_SEVERITY, - pub ErrorHandlerType: ULONG, - pub SpuriousErrorSourceId: ULONG, - pub RootErrorCommand: ULONG, - pub RootErrorStatus: ULONG, - pub DeviceAssociationBitmap: ULONG, -} -#[test] -fn bindgen_test_layout__WHEAP_SPURIOUS_AER_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_SPURIOUS_AER_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_SPURIOUS_AER_EVENT>(), - 56usize, - concat!("Size of: ", stringify!(_WHEAP_SPURIOUS_AER_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_SPURIOUS_AER_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_SPURIOUS_AER_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_SPURIOUS_AER_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSeverity) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_SPURIOUS_AER_EVENT), - "::", - stringify!(ErrorSeverity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ErrorHandlerType) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_SPURIOUS_AER_EVENT), - "::", - stringify!(ErrorHandlerType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SpuriousErrorSourceId) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_SPURIOUS_AER_EVENT), - "::", - stringify!(SpuriousErrorSourceId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RootErrorCommand) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_SPURIOUS_AER_EVENT), - "::", - stringify!(RootErrorCommand), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootErrorStatus) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_SPURIOUS_AER_EVENT), - "::", - stringify!(RootErrorStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceAssociationBitmap) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_SPURIOUS_AER_EVENT), - "::", - stringify!(DeviceAssociationBitmap), - ), - ); -} -impl Default for _WHEAP_SPURIOUS_AER_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_SPURIOUS_AER_EVENT = _WHEAP_SPURIOUS_AER_EVENT; -pub type PWHEAP_SPURIOUS_AER_EVENT = *mut _WHEAP_SPURIOUS_AER_EVENT; -pub mod _WHEAP_DPC_ERROR_EVENT_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WheapDpcErrNoErr: Type = 0; - pub const WheapDpcErrBusNotFound: Type = 1; - pub const WheapDpcErrDpcedSubtree: Type = 2; - pub const WheapDpcErrDeviceIdBad: Type = 3; - pub const WheapDpcErrResetFailed: Type = 4; - pub const WheapDpcErrNoChildren: Type = 5; -} -pub use self::_WHEAP_DPC_ERROR_EVENT_TYPE::Type as WHEAP_DPC_ERROR_EVENT_TYPE; -pub type PWHEAP_DPC_ERROR_EVENT_TYPE = *mut _WHEAP_DPC_ERROR_EVENT_TYPE::Type; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_DPC_ERROR_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub ErrType: WHEAP_DPC_ERROR_EVENT_TYPE, - pub Bus: ULONG, - pub Device: ULONG, - pub Function: ULONG, - pub DeviceId: USHORT, - pub VendorId: USHORT, -} -#[test] -fn bindgen_test_layout__WHEAP_DPC_ERROR_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_DPC_ERROR_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_DPC_ERROR_EVENT>(), - 52usize, - concat!("Size of: ", stringify!(_WHEAP_DPC_ERROR_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_DPC_ERROR_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_DPC_ERROR_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DPC_ERROR_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrType) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DPC_ERROR_EVENT), - "::", - stringify!(ErrType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bus) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DPC_ERROR_EVENT), - "::", - stringify!(Bus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Device) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DPC_ERROR_EVENT), - "::", - stringify!(Device), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Function) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DPC_ERROR_EVENT), - "::", - stringify!(Function), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceId) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DPC_ERROR_EVENT), - "::", - stringify!(DeviceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VendorId) as usize - ptr as usize }, - 50usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_DPC_ERROR_EVENT), - "::", - stringify!(VendorId), - ), - ); -} -impl Default for _WHEAP_DPC_ERROR_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_DPC_ERROR_EVENT = _WHEAP_DPC_ERROR_EVENT; -pub type PWHEAP_DPC_ERROR_EVENT = *mut _WHEAP_DPC_ERROR_EVENT; -pub mod _PSHED_PI_ERR_READING_PCIE_OVERRIDES { - pub type Type = ::core::ffi::c_int; - pub const PshedPiErrReadingPcieOverridesNoErr: Type = 0; - pub const PshedPiErrReadingPcieOverridesNoMemory: Type = 1; - pub const PshedPiErrReadingPcieOverridesQueryErr: Type = 2; - pub const PshedPiErrReadingPcieOverridesBadSize: Type = 3; - pub const PshedPiErrReadingPcieOverridesBadSignature: Type = 4; - pub const PshedPiErrReadingPcieOverridesNoCapOffset: Type = 5; - pub const PshedPiErrReadingPcieOverridesNotBinary: Type = 6; -} -pub use self::_PSHED_PI_ERR_READING_PCIE_OVERRIDES::Type as PSHED_PI_ERR_READING_PCIE_OVERRIDES; -pub type PPSHED_PI_ERR_READING_PCIE_OVERRIDES = *mut _PSHED_PI_ERR_READING_PCIE_OVERRIDES::Type; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PCIE_OVERRIDE_INFO { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Segment: UINT32, - pub Bus: UINT32, - pub Device: UINT32, - pub Function: UINT32, - pub ValidBits: UINT8, - pub Reserved: [UINT8; 3usize], - pub UncorrectableErrorMask: UINT32, - pub UncorrectableErrorSeverity: UINT32, - pub CorrectableErrorMask: UINT32, - pub CapAndControl: UINT32, -} -#[test] -fn bindgen_test_layout__WHEAP_PCIE_OVERRIDE_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PCIE_OVERRIDE_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PCIE_OVERRIDE_INFO>(), - 68usize, - concat!("Size of: ", stringify!(_WHEAP_PCIE_OVERRIDE_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PCIE_OVERRIDE_INFO>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PCIE_OVERRIDE_INFO)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_OVERRIDE_INFO), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Segment) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_OVERRIDE_INFO), - "::", - stringify!(Segment), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bus) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_OVERRIDE_INFO), - "::", - stringify!(Bus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Device) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_OVERRIDE_INFO), - "::", - stringify!(Device), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Function) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_OVERRIDE_INFO), - "::", - stringify!(Function), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_OVERRIDE_INFO), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 49usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_OVERRIDE_INFO), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorMask) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_OVERRIDE_INFO), - "::", - stringify!(UncorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UncorrectableErrorSeverity) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_OVERRIDE_INFO), - "::", - stringify!(UncorrectableErrorSeverity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CorrectableErrorMask) as usize - ptr as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_OVERRIDE_INFO), - "::", - stringify!(CorrectableErrorMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CapAndControl) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_OVERRIDE_INFO), - "::", - stringify!(CapAndControl), - ), - ); -} -impl Default for _WHEAP_PCIE_OVERRIDE_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PCIE_OVERRIDE_INFO = _WHEAP_PCIE_OVERRIDE_INFO; -pub type PWHEAP_PCIE_OVERRIDE_INFO = *mut _WHEAP_PCIE_OVERRIDE_INFO; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PCIE_READ_OVERRIDES_ERR { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub FailureReason: UINT32, - pub FailureStatus: NTSTATUS, -} -#[test] -fn bindgen_test_layout__WHEAP_PCIE_READ_OVERRIDES_ERR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PCIE_READ_OVERRIDES_ERR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PCIE_READ_OVERRIDES_ERR>(), - 40usize, - concat!("Size of: ", stringify!(_WHEAP_PCIE_READ_OVERRIDES_ERR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PCIE_READ_OVERRIDES_ERR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PCIE_READ_OVERRIDES_ERR)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_READ_OVERRIDES_ERR), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FailureReason) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_READ_OVERRIDES_ERR), - "::", - stringify!(FailureReason), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FailureStatus) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_READ_OVERRIDES_ERR), - "::", - stringify!(FailureStatus), - ), - ); -} -impl Default for _WHEAP_PCIE_READ_OVERRIDES_ERR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PCIE_READ_OVERRIDES_ERR = _WHEAP_PCIE_READ_OVERRIDES_ERR; -pub type PWHEAP_PCIE_READ_OVERRIDES_ERR = *mut _WHEAP_PCIE_READ_OVERRIDES_ERR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_PCIE_CONFIG_INFO { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Segment: UINT32, - pub Bus: UINT32, - pub Device: UINT32, - pub Function: UINT32, - pub Offset: UINT32, - pub Length: UINT32, - pub Value: UINT64, - pub Succeeded: UINT8, - pub Reserved: [UINT8; 3usize], -} -#[test] -fn bindgen_test_layout__WHEAP_PCIE_CONFIG_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_PCIE_CONFIG_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_PCIE_CONFIG_INFO>(), - 68usize, - concat!("Size of: ", stringify!(_WHEAP_PCIE_CONFIG_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_PCIE_CONFIG_INFO>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_PCIE_CONFIG_INFO)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_CONFIG_INFO), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Segment) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_CONFIG_INFO), - "::", - stringify!(Segment), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bus) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_CONFIG_INFO), - "::", - stringify!(Bus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Device) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_CONFIG_INFO), - "::", - stringify!(Device), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Function) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_CONFIG_INFO), - "::", - stringify!(Function), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_CONFIG_INFO), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_CONFIG_INFO), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Value) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_CONFIG_INFO), - "::", - stringify!(Value), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Succeeded) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_CONFIG_INFO), - "::", - stringify!(Succeeded), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 65usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_PCIE_CONFIG_INFO), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _WHEAP_PCIE_CONFIG_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_PCIE_CONFIG_INFO = _WHEAP_PCIE_CONFIG_INFO; -pub type PWHEAP_PCIE_CONFIG_INFO = *mut _WHEAP_PCIE_CONFIG_INFO; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_THROTTLE_PCIE_ADD_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Address: WHEA_PCIE_ADDRESS, - pub Mask: UINT32, - pub Updated: BOOLEAN, - pub Status: NTSTATUS, -} -#[test] -fn bindgen_test_layout__WHEA_THROTTLE_PCIE_ADD_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_THROTTLE_PCIE_ADD_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_THROTTLE_PCIE_ADD_EVENT>(), - 57usize, - concat!("Size of: ", stringify!(_WHEA_THROTTLE_PCIE_ADD_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_THROTTLE_PCIE_ADD_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_THROTTLE_PCIE_ADD_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_PCIE_ADD_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_PCIE_ADD_EVENT), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_PCIE_ADD_EVENT), - "::", - stringify!(Mask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Updated) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_PCIE_ADD_EVENT), - "::", - stringify!(Updated), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 53usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_PCIE_ADD_EVENT), - "::", - stringify!(Status), - ), - ); -} -impl Default for _WHEA_THROTTLE_PCIE_ADD_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_THROTTLE_PCIE_ADD_EVENT = _WHEA_THROTTLE_PCIE_ADD_EVENT; -pub type PWHEA_THROTTLE_PCIE_ADD_EVENT = *mut _WHEA_THROTTLE_PCIE_ADD_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub SocketId: UINT32, - pub ChannelId: UINT32, - pub DimmSlot: UINT32, -} -#[test] -fn bindgen_test_layout__WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT>(), - 44usize, - concat!("Size of: ", stringify!(_WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SocketId) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT), - "::", - stringify!(SocketId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChannelId) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT), - "::", - stringify!(ChannelId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DimmSlot) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT), - "::", - stringify!(DimmSlot), - ), - ); -} -impl Default for _WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT = _WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT; -pub type PWHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT = *mut _WHEA_THROTTLE_MEMORY_ADD_OR_REMOVE_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_THROTTLE_PCIE_REMOVE_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Address: WHEA_PCIE_ADDRESS, - pub Mask: UINT32, -} -#[test] -fn bindgen_test_layout__WHEA_THROTTLE_PCIE_REMOVE_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_THROTTLE_PCIE_REMOVE_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_THROTTLE_PCIE_REMOVE_EVENT>(), - 52usize, - concat!("Size of: ", stringify!(_WHEA_THROTTLE_PCIE_REMOVE_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_THROTTLE_PCIE_REMOVE_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_THROTTLE_PCIE_REMOVE_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_PCIE_REMOVE_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_PCIE_REMOVE_EVENT), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_PCIE_REMOVE_EVENT), - "::", - stringify!(Mask), - ), - ); -} -impl Default for _WHEA_THROTTLE_PCIE_REMOVE_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_THROTTLE_PCIE_REMOVE_EVENT = _WHEA_THROTTLE_PCIE_REMOVE_EVENT; -pub type PWHEA_THROTTLE_PCIE_REMOVE_EVENT = *mut _WHEA_THROTTLE_PCIE_REMOVE_EVENT; -pub mod _WHEA_THROTTLE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WheaPcieThrottle: Type = 0; - pub const WheaMemoryThrottle: Type = 1; -} -pub use self::_WHEA_THROTTLE_TYPE::Type as WHEA_THROTTLE_TYPE; -pub type PWHEA_THROTTLE_TYPE = *mut _WHEA_THROTTLE_TYPE::Type; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_THROTTLE_REGISTRY_CORRUPT_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub ThrottleType: WHEA_THROTTLE_TYPE, -} -#[test] -fn bindgen_test_layout__WHEA_THROTTLE_REGISTRY_CORRUPT_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_THROTTLE_REGISTRY_CORRUPT_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_THROTTLE_REGISTRY_CORRUPT_EVENT>(), - 36usize, - concat!("Size of: ", stringify!(_WHEA_THROTTLE_REGISTRY_CORRUPT_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_THROTTLE_REGISTRY_CORRUPT_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_THROTTLE_REGISTRY_CORRUPT_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_REGISTRY_CORRUPT_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ThrottleType) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_REGISTRY_CORRUPT_EVENT), - "::", - stringify!(ThrottleType), - ), - ); -} -impl Default for _WHEA_THROTTLE_REGISTRY_CORRUPT_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_THROTTLE_REGISTRY_CORRUPT_EVENT = _WHEA_THROTTLE_REGISTRY_CORRUPT_EVENT; -pub type PWHEA_THROTTLE_REGISTRY_CORRUPT_EVENT = *mut _WHEA_THROTTLE_REGISTRY_CORRUPT_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_THROTTLE_ADD_ERR_SRC_FAILED_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, -} -#[test] -fn bindgen_test_layout__WHEA_THROTTLE_ADD_ERR_SRC_FAILED_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_THROTTLE_ADD_ERR_SRC_FAILED_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_THROTTLE_ADD_ERR_SRC_FAILED_EVENT>(), - 32usize, - concat!("Size of: ", stringify!(_WHEA_THROTTLE_ADD_ERR_SRC_FAILED_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_THROTTLE_ADD_ERR_SRC_FAILED_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_THROTTLE_ADD_ERR_SRC_FAILED_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_ADD_ERR_SRC_FAILED_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); -} -impl Default for _WHEA_THROTTLE_ADD_ERR_SRC_FAILED_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_THROTTLE_ADD_ERR_SRC_FAILED_EVENT = _WHEA_THROTTLE_ADD_ERR_SRC_FAILED_EVENT; -pub type PWHEA_THROTTLE_ADD_ERR_SRC_FAILED_EVENT = *mut _WHEA_THROTTLE_ADD_ERR_SRC_FAILED_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_THROTTLE_REG_DATA_IGNORED_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub ThrottleType: WHEA_THROTTLE_TYPE, -} -#[test] -fn bindgen_test_layout__WHEA_THROTTLE_REG_DATA_IGNORED_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_THROTTLE_REG_DATA_IGNORED_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_THROTTLE_REG_DATA_IGNORED_EVENT>(), - 36usize, - concat!("Size of: ", stringify!(_WHEA_THROTTLE_REG_DATA_IGNORED_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_THROTTLE_REG_DATA_IGNORED_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_THROTTLE_REG_DATA_IGNORED_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_REG_DATA_IGNORED_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ThrottleType) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_THROTTLE_REG_DATA_IGNORED_EVENT), - "::", - stringify!(ThrottleType), - ), - ); -} -impl Default for _WHEA_THROTTLE_REG_DATA_IGNORED_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_THROTTLE_REG_DATA_IGNORED_EVENT = _WHEA_THROTTLE_REG_DATA_IGNORED_EVENT; -pub type PWHEA_THROTTLE_REG_DATA_IGNORED_EVENT = *mut _WHEA_THROTTLE_REG_DATA_IGNORED_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_REGISTER_KEY_NOTIFICATION_FAILED_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, -} -#[test] -fn bindgen_test_layout__WHEA_REGISTER_KEY_NOTIFICATION_FAILED_EVENT() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_REGISTER_KEY_NOTIFICATION_FAILED_EVENT, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_REGISTER_KEY_NOTIFICATION_FAILED_EVENT>(), - 32usize, - concat!("Size of: ", stringify!(_WHEA_REGISTER_KEY_NOTIFICATION_FAILED_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_REGISTER_KEY_NOTIFICATION_FAILED_EVENT>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_REGISTER_KEY_NOTIFICATION_FAILED_EVENT), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_REGISTER_KEY_NOTIFICATION_FAILED_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); -} -impl Default for _WHEA_REGISTER_KEY_NOTIFICATION_FAILED_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_REGISTER_KEY_NOTIFICATION_FAILED_EVENT = _WHEA_REGISTER_KEY_NOTIFICATION_FAILED_EVENT; -pub type PWHEA_REGISTER_KEY_NOTIFICATION_FAILED_EVENT = *mut _WHEA_REGISTER_KEY_NOTIFICATION_FAILED_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Status: NTSTATUS, -} -#[test] -fn bindgen_test_layout__WHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT>(), - 36usize, - concat!("Size of: ", stringify!(_WHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT), - "::", - stringify!(Status), - ), - ); -} -impl Default for _WHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT = _WHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT; -pub type PWHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT = *mut _WHEA_MEMORY_THROTTLE_SUMMARY_FAILED_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Status: NTSTATUS, -} -#[test] -fn bindgen_test_layout__WHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT>(), - 36usize, - concat!("Size of: ", stringify!(_WHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT), - "::", - stringify!(Status), - ), - ); -} -impl Default for _WHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT = _WHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT; -pub type PWHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT = *mut _WHEA_PSHED_PI_CPU_BUSES_INIT_FAILED_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_PSHED_PI_TRACE_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub Buffer: [CCHAR; 256usize], -} -#[test] -fn bindgen_test_layout__WHEA_PSHED_PI_TRACE_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PSHED_PI_TRACE_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PSHED_PI_TRACE_EVENT>(), - 288usize, - concat!("Size of: ", stringify!(_WHEA_PSHED_PI_TRACE_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PSHED_PI_TRACE_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_PSHED_PI_TRACE_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PI_TRACE_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PI_TRACE_EVENT), - "::", - stringify!(Buffer), - ), - ); -} -impl Default for _WHEA_PSHED_PI_TRACE_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PSHED_PI_TRACE_EVENT = _WHEA_PSHED_PI_TRACE_EVENT; -pub type PWHEA_PSHED_PI_TRACE_EVENT = *mut _WHEA_PSHED_PI_TRACE_EVENT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_SRAS_TABLE_NOT_FOUND { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, -} -#[test] -fn bindgen_test_layout__WHEA_SRAS_TABLE_NOT_FOUND() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_SRAS_TABLE_NOT_FOUND> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_SRAS_TABLE_NOT_FOUND>(), - 32usize, - concat!("Size of: ", stringify!(_WHEA_SRAS_TABLE_NOT_FOUND)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_SRAS_TABLE_NOT_FOUND>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_SRAS_TABLE_NOT_FOUND)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SRAS_TABLE_NOT_FOUND), - "::", - stringify!(WheaEventLogEntry), - ), - ); -} -impl Default for _WHEA_SRAS_TABLE_NOT_FOUND { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_SRAS_TABLE_NOT_FOUND = _WHEA_SRAS_TABLE_NOT_FOUND; -pub type PWHEA_SRAS_TABLE_NOT_FOUND = *mut _WHEA_SRAS_TABLE_NOT_FOUND; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_SRAS_TABLE_ERROR { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, -} -#[test] -fn bindgen_test_layout__WHEA_SRAS_TABLE_ERROR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_SRAS_TABLE_ERROR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_SRAS_TABLE_ERROR>(), - 32usize, - concat!("Size of: ", stringify!(_WHEA_SRAS_TABLE_ERROR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_SRAS_TABLE_ERROR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_SRAS_TABLE_ERROR)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SRAS_TABLE_ERROR), - "::", - stringify!(WheaEventLogEntry), - ), - ); -} -impl Default for _WHEA_SRAS_TABLE_ERROR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_SRAS_TABLE_ERROR = _WHEA_SRAS_TABLE_ERROR; -pub type PWHEA_SRAS_TABLE_ERROR = *mut _WHEA_SRAS_TABLE_ERROR; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ACPI_HEADER { - pub Signature: UINT32, - pub Length: UINT32, - pub Revision: UINT8, - pub Checksum: UINT8, - pub OemId: [UINT8; 6usize], - pub OemTableId: UINT64, - pub OemRevision: UINT32, - pub CreatorId: UINT32, - pub CreatorRevision: UINT32, -} -#[test] -fn bindgen_test_layout__WHEA_ACPI_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ACPI_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ACPI_HEADER>(), - 36usize, - concat!("Size of: ", stringify!(_WHEA_ACPI_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ACPI_HEADER>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_ACPI_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Signature) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ACPI_HEADER), - "::", - stringify!(Signature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ACPI_HEADER), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ACPI_HEADER), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Checksum) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ACPI_HEADER), - "::", - stringify!(Checksum), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OemId) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ACPI_HEADER), - "::", - stringify!(OemId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OemTableId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ACPI_HEADER), - "::", - stringify!(OemTableId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OemRevision) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ACPI_HEADER), - "::", - stringify!(OemRevision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreatorId) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ACPI_HEADER), - "::", - stringify!(CreatorId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreatorRevision) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ACPI_HEADER), - "::", - stringify!(CreatorRevision), - ), - ); -} -pub type WHEA_ACPI_HEADER = _WHEA_ACPI_HEADER; -pub type PWHEA_ACPI_HEADER = *mut _WHEA_ACPI_HEADER; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SIGNAL_REG_VALUE { - pub RegName: [UINT8; 32usize], - pub MsrAddr: UINT32, - pub Value: UINT64, -} -#[test] -fn bindgen_test_layout__SIGNAL_REG_VALUE() { - const UNINIT: ::core::mem::MaybeUninit<_SIGNAL_REG_VALUE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SIGNAL_REG_VALUE>(), - 44usize, - concat!("Size of: ", stringify!(_SIGNAL_REG_VALUE)), - ); - assert_eq!( - ::core::mem::align_of::<_SIGNAL_REG_VALUE>(), - 1usize, - concat!("Alignment of ", stringify!(_SIGNAL_REG_VALUE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RegName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SIGNAL_REG_VALUE), - "::", - stringify!(RegName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MsrAddr) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SIGNAL_REG_VALUE), - "::", - stringify!(MsrAddr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Value) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_SIGNAL_REG_VALUE), - "::", - stringify!(Value), - ), - ); -} -pub type SIGNAL_REG_VALUE = _SIGNAL_REG_VALUE; -pub type PSIGNAL_REG_VALUE = *mut _SIGNAL_REG_VALUE; -#[repr(C, packed)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EFI_ACPI_RAS_SIGNAL_TABLE { - pub Header: WHEA_ACPI_HEADER, - pub NumberRecord: UINT32, - pub Entries: [SIGNAL_REG_VALUE; 1usize], -} -#[test] -fn bindgen_test_layout__EFI_ACPI_RAS_SIGNAL_TABLE() { - const UNINIT: ::core::mem::MaybeUninit<_EFI_ACPI_RAS_SIGNAL_TABLE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EFI_ACPI_RAS_SIGNAL_TABLE>(), - 84usize, - concat!("Size of: ", stringify!(_EFI_ACPI_RAS_SIGNAL_TABLE)), - ); - assert_eq!( - ::core::mem::align_of::<_EFI_ACPI_RAS_SIGNAL_TABLE>(), - 1usize, - concat!("Alignment of ", stringify!(_EFI_ACPI_RAS_SIGNAL_TABLE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EFI_ACPI_RAS_SIGNAL_TABLE), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberRecord) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_EFI_ACPI_RAS_SIGNAL_TABLE), - "::", - stringify!(NumberRecord), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Entries) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_EFI_ACPI_RAS_SIGNAL_TABLE), - "::", - stringify!(Entries), - ), - ); -} -pub type EFI_ACPI_RAS_SIGNAL_TABLE = _EFI_ACPI_RAS_SIGNAL_TABLE; -pub type PEFI_ACPI_RAS_SIGNAL_TABLE = *mut _EFI_ACPI_RAS_SIGNAL_TABLE; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_SRAS_TABLE_ENTRIES_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub LogNumber: UINT32, - pub NumberSignals: UINT32, - pub Data: [UINT8; 1usize], -} -#[test] -fn bindgen_test_layout__WHEA_SRAS_TABLE_ENTRIES_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_SRAS_TABLE_ENTRIES_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_SRAS_TABLE_ENTRIES_EVENT>(), - 41usize, - concat!("Size of: ", stringify!(_WHEA_SRAS_TABLE_ENTRIES_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_SRAS_TABLE_ENTRIES_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_SRAS_TABLE_ENTRIES_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SRAS_TABLE_ENTRIES_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogNumber) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SRAS_TABLE_ENTRIES_EVENT), - "::", - stringify!(LogNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberSignals) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SRAS_TABLE_ENTRIES_EVENT), - "::", - stringify!(NumberSignals), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_SRAS_TABLE_ENTRIES_EVENT), - "::", - stringify!(Data), - ), - ); -} -impl Default for _WHEA_SRAS_TABLE_ENTRIES_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_SRAS_TABLE_ENTRIES_EVENT = _WHEA_SRAS_TABLE_ENTRIES_EVENT; -pub type PWHEA_SRAS_TABLE_ENTRIES_EVENT = *mut _WHEA_SRAS_TABLE_ENTRIES_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEAP_ROW_FAILURE_EVENT { - pub WheaEventLogEntry: WHEA_EVENT_LOG_ENTRY, - pub LowOrderPage: PFN_NUMBER, - pub HighOrderPage: PFN_NUMBER, -} -#[test] -fn bindgen_test_layout__WHEAP_ROW_FAILURE_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEAP_ROW_FAILURE_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEAP_ROW_FAILURE_EVENT>(), - 48usize, - concat!("Size of: ", stringify!(_WHEAP_ROW_FAILURE_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEAP_ROW_FAILURE_EVENT>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEAP_ROW_FAILURE_EVENT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WheaEventLogEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ROW_FAILURE_EVENT), - "::", - stringify!(WheaEventLogEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowOrderPage) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ROW_FAILURE_EVENT), - "::", - stringify!(LowOrderPage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HighOrderPage) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEAP_ROW_FAILURE_EVENT), - "::", - stringify!(HighOrderPage), - ), - ); -} -impl Default for _WHEAP_ROW_FAILURE_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEAP_ROW_FAILURE_EVENT = _WHEAP_ROW_FAILURE_EVENT; -pub type PWHEAP_ROW_FAILURE_EVENT = *mut _WHEAP_ROW_FAILURE_EVENT; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub union _WHEA_GENERIC_ERROR_BLOCKSTATUS { - pub __bindgen_anon_1: _WHEA_GENERIC_ERROR_BLOCKSTATUS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_GENERIC_ERROR_BLOCKSTATUS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_GENERIC_ERROR_BLOCKSTATUS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_GENERIC_ERROR_BLOCKSTATUS__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_GENERIC_ERROR_BLOCKSTATUS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_GENERIC_ERROR_BLOCKSTATUS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_GENERIC_ERROR_BLOCKSTATUS__bindgen_ty_1), - ), - ); -} -impl _WHEA_GENERIC_ERROR_BLOCKSTATUS__bindgen_ty_1 { - #[inline] - pub fn UncorrectableError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_UncorrectableError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn CorrectableError(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_CorrectableError(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn MultipleUncorrectableErrors(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_MultipleUncorrectableErrors(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn MultipleCorrectableErrors(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_MultipleCorrectableErrors(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn ErrorDataEntryCount(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 10u8) as u32) } - } - #[inline] - pub fn set_ErrorDataEntryCount(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 10u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 18u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 18u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - UncorrectableError: ULONG, - CorrectableError: ULONG, - MultipleUncorrectableErrors: ULONG, - MultipleCorrectableErrors: ULONG, - ErrorDataEntryCount: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let UncorrectableError: u32 = unsafe { - ::core::mem::transmute(UncorrectableError) - }; - UncorrectableError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let CorrectableError: u32 = unsafe { - ::core::mem::transmute(CorrectableError) - }; - CorrectableError as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let MultipleUncorrectableErrors: u32 = unsafe { - ::core::mem::transmute(MultipleUncorrectableErrors) - }; - MultipleUncorrectableErrors as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let MultipleCorrectableErrors: u32 = unsafe { - ::core::mem::transmute(MultipleCorrectableErrors) - }; - MultipleCorrectableErrors as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 10u8, - { - let ErrorDataEntryCount: u32 = unsafe { - ::core::mem::transmute(ErrorDataEntryCount) - }; - ErrorDataEntryCount as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 18u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_GENERIC_ERROR_BLOCKSTATUS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_GENERIC_ERROR_BLOCKSTATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_GENERIC_ERROR_BLOCKSTATUS>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_GENERIC_ERROR_BLOCKSTATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_GENERIC_ERROR_BLOCKSTATUS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_GENERIC_ERROR_BLOCKSTATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_BLOCKSTATUS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_GENERIC_ERROR_BLOCKSTATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_GENERIC_ERROR_BLOCKSTATUS = _WHEA_GENERIC_ERROR_BLOCKSTATUS; -pub type PWHEA_GENERIC_ERROR_BLOCKSTATUS = *mut _WHEA_GENERIC_ERROR_BLOCKSTATUS; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_GENERIC_ERROR { - pub BlockStatus: WHEA_GENERIC_ERROR_BLOCKSTATUS, - pub RawDataOffset: ULONG, - pub RawDataLength: ULONG, - pub DataLength: ULONG, - pub ErrorSeverity: WHEA_ERROR_SEVERITY, - pub Data: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__WHEA_GENERIC_ERROR() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_GENERIC_ERROR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_GENERIC_ERROR>(), - 21usize, - concat!("Size of: ", stringify!(_WHEA_GENERIC_ERROR)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_GENERIC_ERROR>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_GENERIC_ERROR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BlockStatus) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR), - "::", - stringify!(BlockStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RawDataOffset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR), - "::", - stringify!(RawDataOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RawDataLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR), - "::", - stringify!(RawDataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataLength) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR), - "::", - stringify!(DataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSeverity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR), - "::", - stringify!(ErrorSeverity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR), - "::", - stringify!(Data), - ), - ); -} -impl Default for _WHEA_GENERIC_ERROR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_GENERIC_ERROR = _WHEA_GENERIC_ERROR; -pub type PWHEA_GENERIC_ERROR = *mut _WHEA_GENERIC_ERROR; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_GENERIC_ERROR_DATA_ENTRY_V1 { - pub SectionType: GUID, - pub ErrorSeverity: WHEA_ERROR_SEVERITY, - pub Revision: WHEA_REVISION, - pub ValidBits: UCHAR, - pub Flags: UCHAR, - pub ErrorDataLength: ULONG, - pub FRUId: GUID, - pub FRUText: [UCHAR; 20usize], - pub Data: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__WHEA_GENERIC_ERROR_DATA_ENTRY_V1() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_GENERIC_ERROR_DATA_ENTRY_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_GENERIC_ERROR_DATA_ENTRY_V1>(), - 65usize, - concat!("Size of: ", stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_GENERIC_ERROR_DATA_ENTRY_V1>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectionType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V1), - "::", - stringify!(SectionType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSeverity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V1), - "::", - stringify!(ErrorSeverity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V1), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V1), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 23usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V1), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorDataLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V1), - "::", - stringify!(ErrorDataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FRUId) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V1), - "::", - stringify!(FRUId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FRUText) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V1), - "::", - stringify!(FRUText), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V1), - "::", - stringify!(Data), - ), - ); -} -impl Default for _WHEA_GENERIC_ERROR_DATA_ENTRY_V1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_GENERIC_ERROR_DATA_ENTRY_V1 = _WHEA_GENERIC_ERROR_DATA_ENTRY_V1; -pub type PWHEA_GENERIC_ERROR_DATA_ENTRY_V1 = *mut _WHEA_GENERIC_ERROR_DATA_ENTRY_V1; -#[repr(C, packed)] -#[derive(Copy, Clone)] -pub struct _WHEA_GENERIC_ERROR_DATA_ENTRY_V2 { - pub SectionType: GUID, - pub ErrorSeverity: WHEA_ERROR_SEVERITY, - pub Revision: WHEA_REVISION, - pub ValidBits: UCHAR, - pub Flags: UCHAR, - pub ErrorDataLength: ULONG, - pub FRUId: GUID, - pub FRUText: [UCHAR; 20usize], - pub Timestamp: WHEA_TIMESTAMP, - pub Data: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__WHEA_GENERIC_ERROR_DATA_ENTRY_V2() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_GENERIC_ERROR_DATA_ENTRY_V2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_GENERIC_ERROR_DATA_ENTRY_V2>(), - 73usize, - concat!("Size of: ", stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V2)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_GENERIC_ERROR_DATA_ENTRY_V2>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectionType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V2), - "::", - stringify!(SectionType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorSeverity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V2), - "::", - stringify!(ErrorSeverity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V2), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidBits) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V2), - "::", - stringify!(ValidBits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 23usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V2), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorDataLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V2), - "::", - stringify!(ErrorDataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FRUId) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V2), - "::", - stringify!(FRUId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FRUText) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V2), - "::", - stringify!(FRUText), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Timestamp) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V2), - "::", - stringify!(Timestamp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_GENERIC_ERROR_DATA_ENTRY_V2), - "::", - stringify!(Data), - ), - ); -} -impl Default for _WHEA_GENERIC_ERROR_DATA_ENTRY_V2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_GENERIC_ERROR_DATA_ENTRY_V2 = _WHEA_GENERIC_ERROR_DATA_ENTRY_V2; -pub type PWHEA_GENERIC_ERROR_DATA_ENTRY_V2 = *mut _WHEA_GENERIC_ERROR_DATA_ENTRY_V2; -pub type WHEA_GENERIC_ERROR_DATA_ENTRY = _WHEA_GENERIC_ERROR_DATA_ENTRY_V2; -pub type PWHEA_GENERIC_ERROR_DATA_ENTRY = *mut _WHEA_GENERIC_ERROR_DATA_ENTRY_V2; -pub type _WHEA_ERROR_SOURCE_CORRECT = ::core::option::Option< - unsafe extern "C" fn( - ErrorSource: PWHEA_ERROR_SOURCE_DESCRIPTOR, - MaximumSectionLength: PULONG, - ) -> NTSTATUS, ->; -pub type WHEA_ERROR_SOURCE_CORRECT = _WHEA_ERROR_SOURCE_CORRECT; -pub type _WHEA_ERROR_SOURCE_INITIALIZE = ::core::option::Option< - unsafe extern "C" fn( - Phase: ULONG, - ErrorSource: PWHEA_ERROR_SOURCE_DESCRIPTOR, - Context: PVOID, - ) -> NTSTATUS, ->; -pub type WHEA_ERROR_SOURCE_INITIALIZE = _WHEA_ERROR_SOURCE_INITIALIZE; -pub type _WHEA_ERROR_SOURCE_CREATE_RECORD = ::core::option::Option< - unsafe extern "C" fn( - ErrorSource: PWHEA_ERROR_SOURCE_DESCRIPTOR, - ErrorPacket: PWHEA_ERROR_PACKET, - ErrorRecord: PWHEA_ERROR_RECORD, - BufferSize: ULONG, - Context: PVOID, - ) -> NTSTATUS, ->; -pub type WHEA_ERROR_SOURCE_CREATE_RECORD = _WHEA_ERROR_SOURCE_CREATE_RECORD; -pub type _WHEA_ERROR_SOURCE_RECOVER = ::core::option::Option< - unsafe extern "C" fn( - RecoveryContext: PVOID, - Severity: PWHEA_ERROR_SEVERITY, - ) -> NTSTATUS, ->; -pub type WHEA_ERROR_SOURCE_RECOVER = _WHEA_ERROR_SOURCE_RECOVER; -pub type _WHEA_ERROR_SOURCE_UNINITIALIZE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID), ->; -pub type WHEA_ERROR_SOURCE_UNINITIALIZE = _WHEA_ERROR_SOURCE_UNINITIALIZE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WHEA_ERROR_SOURCE_CONFIGURATION { - pub Flags: ULONG, - pub Correct: WHEA_ERROR_SOURCE_CORRECT, - pub Initialize: WHEA_ERROR_SOURCE_INITIALIZE, - pub CreateRecord: WHEA_ERROR_SOURCE_CREATE_RECORD, - pub Recover: WHEA_ERROR_SOURCE_RECOVER, - pub Uninitialize: WHEA_ERROR_SOURCE_UNINITIALIZE, - pub Reserved: PVOID, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_SOURCE_CONFIGURATION() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_SOURCE_CONFIGURATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_SOURCE_CONFIGURATION>(), - 56usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_SOURCE_CONFIGURATION>(), - 8usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Correct) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION), - "::", - stringify!(Correct), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Initialize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION), - "::", - stringify!(Initialize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateRecord) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION), - "::", - stringify!(CreateRecord), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Recover) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION), - "::", - stringify!(Recover), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Uninitialize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION), - "::", - stringify!(Uninitialize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_CONFIGURATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _WHEA_ERROR_SOURCE_CONFIGURATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_SOURCE_CONFIGURATION = _WHEA_ERROR_SOURCE_CONFIGURATION; -pub type PWHEA_ERROR_SOURCE_CONFIGURATION = *mut _WHEA_ERROR_SOURCE_CONFIGURATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS { - pub __bindgen_anon_1: _WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS__bindgen_ty_1), - ), - ); -} -impl _WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS__bindgen_ty_1 { - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 32u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 32u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1(Reserved: ULONG) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 32u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS>(), - 4usize, - concat!("Alignment of ", stringify!(_WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS = _WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS; -pub type PWHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS = *mut _WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_PACKET_LOG_DATA { - pub LogData: [UCHAR; 36usize], - pub ExtraBytes: [UCHAR; 36usize], - pub BcParam3: ULONG_PTR, - pub BcParam4: ULONG_PTR, - pub LogDataLength: ULONG, - pub LogTag: USHORT, - pub Reserved: USHORT, - pub Flags: WHEA_REPORT_HW_ERROR_DEVICE_DRIVER_FLAGS, -} -#[test] -fn bindgen_test_layout__WHEA_PACKET_LOG_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PACKET_LOG_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PACKET_LOG_DATA>(), - 104usize, - concat!("Size of: ", stringify!(_WHEA_PACKET_LOG_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PACKET_LOG_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_WHEA_PACKET_LOG_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PACKET_LOG_DATA), - "::", - stringify!(LogData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtraBytes) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PACKET_LOG_DATA), - "::", - stringify!(ExtraBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BcParam3) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PACKET_LOG_DATA), - "::", - stringify!(BcParam3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BcParam4) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PACKET_LOG_DATA), - "::", - stringify!(BcParam4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogDataLength) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PACKET_LOG_DATA), - "::", - stringify!(LogDataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogTag) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PACKET_LOG_DATA), - "::", - stringify!(LogTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 94usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PACKET_LOG_DATA), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PACKET_LOG_DATA), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _WHEA_PACKET_LOG_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PACKET_LOG_DATA = _WHEA_PACKET_LOG_DATA; -pub type PWHEA_PACKET_LOG_DATA = *mut _WHEA_PACKET_LOG_DATA; -pub type _WHEA_SIGNAL_HANDLER_OVERRIDE_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: UINT_PTR) -> BOOLEAN, ->; -pub type WHEA_SIGNAL_HANDLER_OVERRIDE_CALLBACK = _WHEA_SIGNAL_HANDLER_OVERRIDE_CALLBACK; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS { - pub Type: WHEA_ERROR_SOURCE_TYPE, - pub MaxRawDataLength: ULONG, - pub NumRecordsToPreallocate: ULONG, - pub MaxSectionsPerRecord: ULONG, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS>(), - 16usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS>(), - 4usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxRawDataLength) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS), - "::", - stringify!(MaxRawDataLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumRecordsToPreallocate) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS), - "::", - stringify!(NumRecordsToPreallocate), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxSectionsPerRecord) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS), - "::", - stringify!(MaxSectionsPerRecord), - ), - ); -} -impl Default for _WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS = _WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS; -pub type PWHEA_ERROR_SOURCE_OVERRIDE_SETTINGS = *mut _WHEA_ERROR_SOURCE_OVERRIDE_SETTINGS; -pub type PFN_WHEA_HIGH_IRQL_LOG_SEL_EVENT_HANDLER = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, OsSelRecord: PIPMI_OS_SEL_RECORD) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WHEA_ERROR_INJECTION_CAPABILITIES { - pub __bindgen_anon_1: _WHEA_ERROR_INJECTION_CAPABILITIES__bindgen_ty_1, - pub AsULONG: ULONG, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_ERROR_INJECTION_CAPABILITIES__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_INJECTION_CAPABILITIES__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_INJECTION_CAPABILITIES__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_WHEA_ERROR_INJECTION_CAPABILITIES__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_INJECTION_CAPABILITIES__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_WHEA_ERROR_INJECTION_CAPABILITIES__bindgen_ty_1), - ), - ); -} -impl _WHEA_ERROR_INJECTION_CAPABILITIES__bindgen_ty_1 { - #[inline] - pub fn ProcessorCorrectable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_ProcessorCorrectable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn ProcessorUncorrectableNonFatal(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_ProcessorUncorrectableNonFatal(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn ProcessorUncorrectableFatal(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_ProcessorUncorrectableFatal(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemoryCorrectable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemoryCorrectable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemoryUncorrectableNonFatal(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemoryUncorrectableNonFatal(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn MemoryUncorrectableFatal(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_MemoryUncorrectableFatal(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn PCIExpressCorrectable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_PCIExpressCorrectable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn PCIExpressUncorrectableNonFatal(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_PCIExpressUncorrectableNonFatal(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn PCIExpressUncorrectableFatal(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } - } - #[inline] - pub fn set_PCIExpressUncorrectableFatal(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn PlatformCorrectable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } - } - #[inline] - pub fn set_PlatformCorrectable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn PlatformUncorrectableNonFatal(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } - } - #[inline] - pub fn set_PlatformUncorrectableNonFatal(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn PlatformUncorrectableFatal(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } - } - #[inline] - pub fn set_PlatformUncorrectableFatal(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(11usize, 1u8, val as u64) - } - } - #[inline] - pub fn IA64Corrected(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } - } - #[inline] - pub fn set_IA64Corrected(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(12usize, 1u8, val as u64) - } - } - #[inline] - pub fn IA64Recoverable(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } - } - #[inline] - pub fn set_IA64Recoverable(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 1u8, val as u64) - } - } - #[inline] - pub fn IA64Fatal(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } - } - #[inline] - pub fn set_IA64Fatal(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn IA64RecoverableCache(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } - } - #[inline] - pub fn set_IA64RecoverableCache(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn IA64RecoverableRegFile(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_IA64RecoverableRegFile(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 15u8) as u32) } - } - #[inline] - pub fn set_Reserved(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(17usize, 15u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - ProcessorCorrectable: ULONG, - ProcessorUncorrectableNonFatal: ULONG, - ProcessorUncorrectableFatal: ULONG, - MemoryCorrectable: ULONG, - MemoryUncorrectableNonFatal: ULONG, - MemoryUncorrectableFatal: ULONG, - PCIExpressCorrectable: ULONG, - PCIExpressUncorrectableNonFatal: ULONG, - PCIExpressUncorrectableFatal: ULONG, - PlatformCorrectable: ULONG, - PlatformUncorrectableNonFatal: ULONG, - PlatformUncorrectableFatal: ULONG, - IA64Corrected: ULONG, - IA64Recoverable: ULONG, - IA64Fatal: ULONG, - IA64RecoverableCache: ULONG, - IA64RecoverableRegFile: ULONG, - Reserved: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let ProcessorCorrectable: u32 = unsafe { - ::core::mem::transmute(ProcessorCorrectable) - }; - ProcessorCorrectable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let ProcessorUncorrectableNonFatal: u32 = unsafe { - ::core::mem::transmute(ProcessorUncorrectableNonFatal) - }; - ProcessorUncorrectableNonFatal as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let ProcessorUncorrectableFatal: u32 = unsafe { - ::core::mem::transmute(ProcessorUncorrectableFatal) - }; - ProcessorUncorrectableFatal as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let MemoryCorrectable: u32 = unsafe { - ::core::mem::transmute(MemoryCorrectable) - }; - MemoryCorrectable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 1u8, - { - let MemoryUncorrectableNonFatal: u32 = unsafe { - ::core::mem::transmute(MemoryUncorrectableNonFatal) - }; - MemoryUncorrectableNonFatal as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 5usize, - 1u8, - { - let MemoryUncorrectableFatal: u32 = unsafe { - ::core::mem::transmute(MemoryUncorrectableFatal) - }; - MemoryUncorrectableFatal as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let PCIExpressCorrectable: u32 = unsafe { - ::core::mem::transmute(PCIExpressCorrectable) - }; - PCIExpressCorrectable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let PCIExpressUncorrectableNonFatal: u32 = unsafe { - ::core::mem::transmute(PCIExpressUncorrectableNonFatal) - }; - PCIExpressUncorrectableNonFatal as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 1u8, - { - let PCIExpressUncorrectableFatal: u32 = unsafe { - ::core::mem::transmute(PCIExpressUncorrectableFatal) - }; - PCIExpressUncorrectableFatal as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 1u8, - { - let PlatformCorrectable: u32 = unsafe { - ::core::mem::transmute(PlatformCorrectable) - }; - PlatformCorrectable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 10usize, - 1u8, - { - let PlatformUncorrectableNonFatal: u32 = unsafe { - ::core::mem::transmute(PlatformUncorrectableNonFatal) - }; - PlatformUncorrectableNonFatal as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 11usize, - 1u8, - { - let PlatformUncorrectableFatal: u32 = unsafe { - ::core::mem::transmute(PlatformUncorrectableFatal) - }; - PlatformUncorrectableFatal as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 12usize, - 1u8, - { - let IA64Corrected: u32 = unsafe { - ::core::mem::transmute(IA64Corrected) - }; - IA64Corrected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 1u8, - { - let IA64Recoverable: u32 = unsafe { - ::core::mem::transmute(IA64Recoverable) - }; - IA64Recoverable as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 14usize, - 1u8, - { - let IA64Fatal: u32 = unsafe { ::core::mem::transmute(IA64Fatal) }; - IA64Fatal as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let IA64RecoverableCache: u32 = unsafe { - ::core::mem::transmute(IA64RecoverableCache) - }; - IA64RecoverableCache as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 1u8, - { - let IA64RecoverableRegFile: u32 = unsafe { - ::core::mem::transmute(IA64RecoverableRegFile) - }; - IA64RecoverableRegFile as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 17usize, - 15u8, - { - let Reserved: u32 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_ERROR_INJECTION_CAPABILITIES() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_ERROR_INJECTION_CAPABILITIES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_ERROR_INJECTION_CAPABILITIES>(), - 4usize, - concat!("Size of: ", stringify!(_WHEA_ERROR_INJECTION_CAPABILITIES)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_ERROR_INJECTION_CAPABILITIES>(), - 4usize, - concat!("Alignment of ", stringify!(_WHEA_ERROR_INJECTION_CAPABILITIES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsULONG) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_ERROR_INJECTION_CAPABILITIES), - "::", - stringify!(AsULONG), - ), - ); -} -impl Default for _WHEA_ERROR_INJECTION_CAPABILITIES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_ERROR_INJECTION_CAPABILITIES = _WHEA_ERROR_INJECTION_CAPABILITIES; -pub type PWHEA_ERROR_INJECTION_CAPABILITIES = *mut _WHEA_ERROR_INJECTION_CAPABILITIES; -pub type PFN_IN_USE_PAGE_OFFLINE_NOTIFY = ::core::option::Option< - unsafe extern "C" fn( - Page: PFN_NUMBER, - Flags: BOOLEAN, - Poisoned: BOOLEAN, - Context: PVOID, - ) -> BOOLEAN, ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WHEA_IN_USE_PAGE_NOTIFY_FLAGS { - pub Bits: _WHEA_IN_USE_PAGE_NOTIFY_FLAGS__bindgen_ty_1, - pub AsUCHAR: UINT8, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_IN_USE_PAGE_NOTIFY_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__WHEA_IN_USE_PAGE_NOTIFY_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_WHEA_IN_USE_PAGE_NOTIFY_FLAGS__bindgen_ty_1>(), - 1usize, - concat!("Size of: ", stringify!(_WHEA_IN_USE_PAGE_NOTIFY_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_IN_USE_PAGE_NOTIFY_FLAGS__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_WHEA_IN_USE_PAGE_NOTIFY_FLAGS__bindgen_ty_1), - ), - ); -} -impl _WHEA_IN_USE_PAGE_NOTIFY_FLAGS__bindgen_ty_1 { - #[inline] - pub fn PlatformDirected(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_PlatformDirected(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn Reserved(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 5u8) as u8) } - } - #[inline] - pub fn set_Reserved(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 5u8, val as u64) - } - } - #[inline] - pub fn NotifyAllOfflines(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) } - } - #[inline] - pub fn set_NotifyAllOfflines(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn PageOfflined(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) } - } - #[inline] - pub fn set_PageOfflined(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - PlatformDirected: UCHAR, - Reserved: UCHAR, - NotifyAllOfflines: UCHAR, - PageOfflined: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let PlatformDirected: u8 = unsafe { - ::core::mem::transmute(PlatformDirected) - }; - PlatformDirected as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 5u8, - { - let Reserved: u8 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let NotifyAllOfflines: u8 = unsafe { - ::core::mem::transmute(NotifyAllOfflines) - }; - NotifyAllOfflines as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 1u8, - { - let PageOfflined: u8 = unsafe { - ::core::mem::transmute(PageOfflined) - }; - PageOfflined as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__WHEA_IN_USE_PAGE_NOTIFY_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_IN_USE_PAGE_NOTIFY_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_IN_USE_PAGE_NOTIFY_FLAGS>(), - 1usize, - concat!("Size of: ", stringify!(_WHEA_IN_USE_PAGE_NOTIFY_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_IN_USE_PAGE_NOTIFY_FLAGS>(), - 1usize, - concat!("Alignment of ", stringify!(_WHEA_IN_USE_PAGE_NOTIFY_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_IN_USE_PAGE_NOTIFY_FLAGS), - "::", - stringify!(Bits), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AsUCHAR) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_IN_USE_PAGE_NOTIFY_FLAGS), - "::", - stringify!(AsUCHAR), - ), - ); -} -impl Default for _WHEA_IN_USE_PAGE_NOTIFY_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_IN_USE_PAGE_NOTIFY_FLAGS = _WHEA_IN_USE_PAGE_NOTIFY_FLAGS; -pub type PWHEA_IN_USE_PAGE_NOTIFY_FLAGS = *mut _WHEA_IN_USE_PAGE_NOTIFY_FLAGS; -pub mod _WHEA_RECOVERY_CONTEXT_ERROR_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WheaRecoveryContextErrorTypeMemory: Type = 1; - pub const WheaRecoveryContextErrorTypePmem: Type = 2; - pub const WheaRecoveryContextErrorTypeMax: Type = 3; -} -pub use self::_WHEA_RECOVERY_CONTEXT_ERROR_TYPE::Type as WHEA_RECOVERY_CONTEXT_ERROR_TYPE; -pub type PWHEA_RECOVERY_CONTEXT_ERROR_TYPE = *mut _WHEA_RECOVERY_CONTEXT_ERROR_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WHEA_RECOVERY_CONTEXT { - pub __bindgen_anon_1: _WHEA_RECOVERY_CONTEXT__bindgen_ty_1, - pub PartitionId: UINT64, - pub VpIndex: UINT32, - pub ErrorType: WHEA_RECOVERY_CONTEXT_ERROR_TYPE, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WHEA_RECOVERY_CONTEXT__bindgen_ty_1 { - pub MemoryError: _WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1, - pub PmemError: _WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1 { - pub Address: ULONG_PTR, - pub Consumed: BOOLEAN, - pub ErrorCode: UINT16, - pub ErrorIpValid: BOOLEAN, - pub RestartIpValid: BOOLEAN, - pub ClearPoison: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 16usize, - concat!( - "Size of: ", - stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Consumed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Consumed), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorCode) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ErrorCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorIpValid) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ErrorIpValid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RestartIpValid) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(RestartIpValid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClearPoison) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ClearPoison), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_2 { - pub PmemErrInfo: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_2>(), - 8usize, - concat!( - "Size of: ", - stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_2>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PmemErrInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(PmemErrInfo), - ), - ); -} -#[test] -fn bindgen_test_layout__WHEA_RECOVERY_CONTEXT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_RECOVERY_CONTEXT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_RECOVERY_CONTEXT__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_RECOVERY_CONTEXT__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MemoryError) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1), - "::", - stringify!(MemoryError), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PmemError) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_RECOVERY_CONTEXT__bindgen_ty_1), - "::", - stringify!(PmemError), - ), - ); -} -impl Default for _WHEA_RECOVERY_CONTEXT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WHEA_RECOVERY_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_RECOVERY_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_RECOVERY_CONTEXT>(), - 32usize, - concat!("Size of: ", stringify!(_WHEA_RECOVERY_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_RECOVERY_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_WHEA_RECOVERY_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PartitionId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_RECOVERY_CONTEXT), - "::", - stringify!(PartitionId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VpIndex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_RECOVERY_CONTEXT), - "::", - stringify!(VpIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorType) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_RECOVERY_CONTEXT), - "::", - stringify!(ErrorType), - ), - ); -} -impl Default for _WHEA_RECOVERY_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_RECOVERY_CONTEXT = _WHEA_RECOVERY_CONTEXT; -pub type PWHEA_RECOVERY_CONTEXT = *mut _WHEA_RECOVERY_CONTEXT; -pub type HVL_WHEA_ERROR_NOTIFICATION = ::core::option::Option< - unsafe extern "C" fn( - RecoveryContext: PWHEA_RECOVERY_CONTEXT, - PlatformDirected: BOOLEAN, - Poisoned: BOOLEAN, - ) -> NTSTATUS, ->; -pub type PHVL_WHEA_ERROR_NOTIFICATION = HVL_WHEA_ERROR_NOTIFICATION; -pub type PSHED_PI_GET_ALL_ERROR_SOURCES = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - Count: PULONG, - ErrorSrcs: *mut PWHEA_ERROR_SOURCE_DESCRIPTOR, - Length: PULONG, - ) -> NTSTATUS, ->; -pub type PSHED_PI_GET_ERROR_SOURCE_INFO = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - ErrorSource: PWHEA_ERROR_SOURCE_DESCRIPTOR, - ) -> NTSTATUS, ->; -pub type PSHED_PI_SET_ERROR_SOURCE_INFO = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - ErrorSource: PWHEA_ERROR_SOURCE_DESCRIPTOR, - ) -> NTSTATUS, ->; -pub type PSHED_PI_ENABLE_ERROR_SOURCE = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - ErrorSource: PWHEA_ERROR_SOURCE_DESCRIPTOR, - ) -> NTSTATUS, ->; -pub type PSHED_PI_DISABLE_ERROR_SOURCE = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - ErrorSource: PWHEA_ERROR_SOURCE_DESCRIPTOR, - ) -> NTSTATUS, ->; -pub type PSHED_PI_WRITE_ERROR_RECORD = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - Flags: ULONG, - RecordLength: ULONG, - ErrorRecord: PWHEA_ERROR_RECORD, - ) -> NTSTATUS, ->; -pub type PSHED_PI_READ_ERROR_RECORD = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - Flags: ULONG, - ErrorRecordId: ULONGLONG, - NextErrorRecordId: PULONGLONG, - RecordLength: PULONG, - ErrorRecord: PWHEA_ERROR_RECORD, - ) -> NTSTATUS, ->; -pub type PSHED_PI_CLEAR_ERROR_RECORD = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - Flags: ULONG, - ErrorRecordId: ULONGLONG, - ) -> NTSTATUS, ->; -pub type PSHED_PI_RETRIEVE_ERROR_INFO = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - ErrorSource: PWHEA_ERROR_SOURCE_DESCRIPTOR, - BufferLength: ULONGLONG, - Packet: PWHEA_ERROR_PACKET, - ) -> NTSTATUS, ->; -pub type PSHED_PI_FINALIZE_ERROR_RECORD = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - ErrorSource: PWHEA_ERROR_SOURCE_DESCRIPTOR, - BufferLength: ULONG, - ErrorRecord: PWHEA_ERROR_RECORD, - ) -> NTSTATUS, ->; -pub type PSHED_PI_CLEAR_ERROR_STATUS = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - ErrorSource: PWHEA_ERROR_SOURCE_DESCRIPTOR, - BufferLength: ULONG, - ErrorRecord: PWHEA_ERROR_RECORD, - ) -> NTSTATUS, ->; -pub type PSHED_PI_ATTEMPT_ERROR_RECOVERY = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - BufferLength: ULONG, - ErrorRecord: PWHEA_ERROR_RECORD, - ) -> NTSTATUS, ->; -pub type PSHED_PI_GET_INJECTION_CAPABILITIES = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - Capabilities: PWHEA_ERROR_INJECTION_CAPABILITIES, - ) -> NTSTATUS, ->; -pub type PSHED_PI_INJECT_ERROR = ::core::option::Option< - unsafe extern "C" fn( - PluginContext: PVOID, - ErrorType: ULONGLONG, - Parameter1: ULONGLONG, - Parameter2: ULONGLONG, - Parameter3: ULONGLONG, - Parameter4: ULONGLONG, - ) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WHEA_PSHED_PLUGIN_CALLBACKS { - pub GetAllErrorSources: PSHED_PI_GET_ALL_ERROR_SOURCES, - pub Reserved: PVOID, - pub GetErrorSourceInfo: PSHED_PI_GET_ERROR_SOURCE_INFO, - pub SetErrorSourceInfo: PSHED_PI_SET_ERROR_SOURCE_INFO, - pub EnableErrorSource: PSHED_PI_ENABLE_ERROR_SOURCE, - pub DisableErrorSource: PSHED_PI_DISABLE_ERROR_SOURCE, - pub WriteErrorRecord: PSHED_PI_WRITE_ERROR_RECORD, - pub ReadErrorRecord: PSHED_PI_READ_ERROR_RECORD, - pub ClearErrorRecord: PSHED_PI_CLEAR_ERROR_RECORD, - pub RetrieveErrorInfo: PSHED_PI_RETRIEVE_ERROR_INFO, - pub FinalizeErrorRecord: PSHED_PI_FINALIZE_ERROR_RECORD, - pub ClearErrorStatus: PSHED_PI_CLEAR_ERROR_STATUS, - pub AttemptRecovery: PSHED_PI_ATTEMPT_ERROR_RECOVERY, - pub GetInjectionCapabilities: PSHED_PI_GET_INJECTION_CAPABILITIES, - pub InjectError: PSHED_PI_INJECT_ERROR, -} -#[test] -fn bindgen_test_layout__WHEA_PSHED_PLUGIN_CALLBACKS() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PSHED_PLUGIN_CALLBACKS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PSHED_PLUGIN_CALLBACKS>(), - 120usize, - concat!("Size of: ", stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PSHED_PLUGIN_CALLBACKS>(), - 8usize, - concat!("Alignment of ", stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetAllErrorSources) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(GetAllErrorSources), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetErrorSourceInfo) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(GetErrorSourceInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetErrorSourceInfo) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(SetErrorSourceInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EnableErrorSource) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(EnableErrorSource), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DisableErrorSource) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(DisableErrorSource), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WriteErrorRecord) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(WriteErrorRecord), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadErrorRecord) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(ReadErrorRecord), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClearErrorRecord) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(ClearErrorRecord), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RetrieveErrorInfo) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(RetrieveErrorInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FinalizeErrorRecord) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(FinalizeErrorRecord), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClearErrorStatus) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(ClearErrorStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AttemptRecovery) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(AttemptRecovery), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GetInjectionCapabilities) as usize - - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(GetInjectionCapabilities), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InjectError) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_CALLBACKS), - "::", - stringify!(InjectError), - ), - ); -} -impl Default for _WHEA_PSHED_PLUGIN_CALLBACKS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PSHED_PLUGIN_CALLBACKS = _WHEA_PSHED_PLUGIN_CALLBACKS; -pub type PWHEA_PSHED_PLUGIN_CALLBACKS = *mut _WHEA_PSHED_PLUGIN_CALLBACKS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1 { - pub Length: ULONG, - pub Version: ULONG, - pub Context: PVOID, - pub FunctionalAreaMask: ULONG, - pub Reserved: ULONG, - pub Callbacks: WHEA_PSHED_PLUGIN_CALLBACKS, -} -#[test] -fn bindgen_test_layout__WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1>(), - 144usize, - concat!("Size of: ", stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1>(), - 8usize, - concat!("Alignment of ", stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FunctionalAreaMask) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1), - "::", - stringify!(FunctionalAreaMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Callbacks) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1), - "::", - stringify!(Callbacks), - ), - ); -} -impl Default for _WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1 = _WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V1; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2 { - pub Length: ULONG, - pub Version: ULONG, - pub Context: PVOID, - pub FunctionalAreaMask: ULONG, - pub Reserved: ULONG, - pub Callbacks: WHEA_PSHED_PLUGIN_CALLBACKS, - pub PluginHandle: PVOID, -} -#[test] -fn bindgen_test_layout__WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2() { - const UNINIT: ::core::mem::MaybeUninit<_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2>(), - 152usize, - concat!("Size of: ", stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2)), - ); - assert_eq!( - ::core::mem::align_of::<_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2>(), - 8usize, - concat!("Alignment of ", stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FunctionalAreaMask) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2), - "::", - stringify!(FunctionalAreaMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Callbacks) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2), - "::", - stringify!(Callbacks), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PluginHandle) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2), - "::", - stringify!(PluginHandle), - ), - ); -} -impl Default for _WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2 = _WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2; -pub type WHEA_PSHED_PLUGIN_REGISTRATION_PACKET = WHEA_PSHED_PLUGIN_REGISTRATION_PACKET_V2; -pub type PWHEA_PSHED_PLUGIN_REGISTRATION_PACKET = *mut WHEA_PSHED_PLUGIN_REGISTRATION_PACKET; -pub mod _SOC_SUBSYSTEM_TYPE { - pub type Type = ::core::ffi::c_int; - pub const SOC_SUBSYS_WIRELESS_MODEM: Type = 0; - pub const SOC_SUBSYS_AUDIO_DSP: Type = 1; - pub const SOC_SUBSYS_WIRELSS_CONNECTIVITY: Type = 2; - pub const SOC_SUBSYS_SENSORS: Type = 3; - pub const SOC_SUBSYS_COMPUTE_DSP: Type = 4; - pub const SOC_SUBSYS_SECURE_PROC: Type = 5; - pub const SOC_SUBSYS_VENDOR_DEFINED: Type = 65536; -} -pub use self::_SOC_SUBSYSTEM_TYPE::Type as SOC_SUBSYSTEM_TYPE; -pub type PSOC_SUBSYSTEM_TYPE = *mut _SOC_SUBSYSTEM_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SOC_SUBSYSTEM_FAILURE_DETAILS { - pub SubsysType: SOC_SUBSYSTEM_TYPE, - pub FirmwareVersion: ULONG64, - pub HardwareVersion: ULONG64, - pub UnifiedFailureRegionSize: ULONG, - pub UnifiedFailureRegion: [CHAR; 1usize], -} -#[test] -fn bindgen_test_layout__SOC_SUBSYSTEM_FAILURE_DETAILS() { - const UNINIT: ::core::mem::MaybeUninit<_SOC_SUBSYSTEM_FAILURE_DETAILS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SOC_SUBSYSTEM_FAILURE_DETAILS>(), - 32usize, - concat!("Size of: ", stringify!(_SOC_SUBSYSTEM_FAILURE_DETAILS)), - ); - assert_eq!( - ::core::mem::align_of::<_SOC_SUBSYSTEM_FAILURE_DETAILS>(), - 8usize, - concat!("Alignment of ", stringify!(_SOC_SUBSYSTEM_FAILURE_DETAILS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubsysType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SOC_SUBSYSTEM_FAILURE_DETAILS), - "::", - stringify!(SubsysType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FirmwareVersion) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SOC_SUBSYSTEM_FAILURE_DETAILS), - "::", - stringify!(FirmwareVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HardwareVersion) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SOC_SUBSYSTEM_FAILURE_DETAILS), - "::", - stringify!(HardwareVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnifiedFailureRegionSize) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SOC_SUBSYSTEM_FAILURE_DETAILS), - "::", - stringify!(UnifiedFailureRegionSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnifiedFailureRegion) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_SOC_SUBSYSTEM_FAILURE_DETAILS), - "::", - stringify!(UnifiedFailureRegion), - ), - ); -} -impl Default for _SOC_SUBSYSTEM_FAILURE_DETAILS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SOC_SUBSYSTEM_FAILURE_DETAILS = _SOC_SUBSYSTEM_FAILURE_DETAILS; -pub type PSOC_SUBSYSTEM_FAILURE_DETAILS = *mut _SOC_SUBSYSTEM_FAILURE_DETAILS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CPTABLEINFO { - pub CodePage: USHORT, - pub MaximumCharacterSize: USHORT, - pub DefaultChar: USHORT, - pub UniDefaultChar: USHORT, - pub TransDefaultChar: USHORT, - pub TransUniDefaultChar: USHORT, - pub DBCSCodePage: USHORT, - pub LeadByte: [UCHAR; 12usize], - pub MultiByteTable: PUSHORT, - pub WideCharTable: PVOID, - pub DBCSRanges: PUSHORT, - pub DBCSOffsets: PUSHORT, -} -#[test] -fn bindgen_test_layout__CPTABLEINFO() { - const UNINIT: ::core::mem::MaybeUninit<_CPTABLEINFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CPTABLEINFO>(), - 64usize, - concat!("Size of: ", stringify!(_CPTABLEINFO)), - ); - assert_eq!( - ::core::mem::align_of::<_CPTABLEINFO>(), - 8usize, - concat!("Alignment of ", stringify!(_CPTABLEINFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CodePage) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CPTABLEINFO), - "::", - stringify!(CodePage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumCharacterSize) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CPTABLEINFO), - "::", - stringify!(MaximumCharacterSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DefaultChar) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CPTABLEINFO), - "::", - stringify!(DefaultChar), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UniDefaultChar) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_CPTABLEINFO), - "::", - stringify!(UniDefaultChar), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TransDefaultChar) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CPTABLEINFO), - "::", - stringify!(TransDefaultChar), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TransUniDefaultChar) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_CPTABLEINFO), - "::", - stringify!(TransUniDefaultChar), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DBCSCodePage) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CPTABLEINFO), - "::", - stringify!(DBCSCodePage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LeadByte) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_CPTABLEINFO), - "::", - stringify!(LeadByte), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MultiByteTable) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_CPTABLEINFO), - "::", - stringify!(MultiByteTable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WideCharTable) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_CPTABLEINFO), - "::", - stringify!(WideCharTable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DBCSRanges) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_CPTABLEINFO), - "::", - stringify!(DBCSRanges), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DBCSOffsets) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_CPTABLEINFO), - "::", - stringify!(DBCSOffsets), - ), - ); -} -impl Default for _CPTABLEINFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CPTABLEINFO = _CPTABLEINFO; -pub type PCPTABLEINFO = *mut _CPTABLEINFO; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _NLSTABLEINFO { - pub OemTableInfo: CPTABLEINFO, - pub AnsiTableInfo: CPTABLEINFO, - pub UpperCaseTable: PUSHORT, - pub LowerCaseTable: PUSHORT, -} -#[test] -fn bindgen_test_layout__NLSTABLEINFO() { - const UNINIT: ::core::mem::MaybeUninit<_NLSTABLEINFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NLSTABLEINFO>(), - 144usize, - concat!("Size of: ", stringify!(_NLSTABLEINFO)), - ); - assert_eq!( - ::core::mem::align_of::<_NLSTABLEINFO>(), - 8usize, - concat!("Alignment of ", stringify!(_NLSTABLEINFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OemTableInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NLSTABLEINFO), - "::", - stringify!(OemTableInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AnsiTableInfo) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_NLSTABLEINFO), - "::", - stringify!(AnsiTableInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UpperCaseTable) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_NLSTABLEINFO), - "::", - stringify!(UpperCaseTable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowerCaseTable) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_NLSTABLEINFO), - "::", - stringify!(LowerCaseTable), - ), - ); -} -impl Default for _NLSTABLEINFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type NLSTABLEINFO = _NLSTABLEINFO; -pub type PNLSTABLEINFO = *mut _NLSTABLEINFO; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RTL_NLS_STATE { - pub DefaultAcpTableInfo: CPTABLEINFO, - pub DefaultOemTableInfo: CPTABLEINFO, - pub ActiveCodePageData: PUSHORT, - pub OemCodePageData: PUSHORT, - pub LeadByteInfo: PUSHORT, - pub OemLeadByteInfo: PUSHORT, - pub CaseMappingData: PUSHORT, - pub UnicodeUpcaseTable844: PUSHORT, - pub UnicodeLowercaseTable844: PUSHORT, -} -#[test] -fn bindgen_test_layout__RTL_NLS_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_NLS_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_NLS_STATE>(), - 184usize, - concat!("Size of: ", stringify!(_RTL_NLS_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_NLS_STATE>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_NLS_STATE)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DefaultAcpTableInfo) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_NLS_STATE), - "::", - stringify!(DefaultAcpTableInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DefaultOemTableInfo) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_RTL_NLS_STATE), - "::", - stringify!(DefaultOemTableInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ActiveCodePageData) as usize - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_RTL_NLS_STATE), - "::", - stringify!(ActiveCodePageData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OemCodePageData) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_RTL_NLS_STATE), - "::", - stringify!(OemCodePageData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LeadByteInfo) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_RTL_NLS_STATE), - "::", - stringify!(LeadByteInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OemLeadByteInfo) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_RTL_NLS_STATE), - "::", - stringify!(OemLeadByteInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CaseMappingData) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_RTL_NLS_STATE), - "::", - stringify!(CaseMappingData), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnicodeUpcaseTable844) as usize - ptr as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_RTL_NLS_STATE), - "::", - stringify!(UnicodeUpcaseTable844), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UnicodeLowercaseTable844) as usize - - ptr as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_RTL_NLS_STATE), - "::", - stringify!(UnicodeLowercaseTable844), - ), - ); -} -impl Default for _RTL_NLS_STATE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_NLS_STATE = _RTL_NLS_STATE; -pub type PRTL_NLS_STATE = *mut _RTL_NLS_STATE; -pub type LSA_UNICODE_STRING = UNICODE_STRING; -pub type PLSA_UNICODE_STRING = *mut UNICODE_STRING; -pub type LSA_STRING = STRING; -pub type PLSA_STRING = *mut STRING; -pub type LSA_OBJECT_ATTRIBUTES = OBJECT_ATTRIBUTES; -pub type PLSA_OBJECT_ATTRIBUTES = *mut OBJECT_ATTRIBUTES; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SID_IDENTIFIER_AUTHORITY { - pub Value: [UCHAR; 6usize], -} -#[test] -fn bindgen_test_layout__SID_IDENTIFIER_AUTHORITY() { - const UNINIT: ::core::mem::MaybeUninit<_SID_IDENTIFIER_AUTHORITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SID_IDENTIFIER_AUTHORITY>(), - 6usize, - concat!("Size of: ", stringify!(_SID_IDENTIFIER_AUTHORITY)), - ); - assert_eq!( - ::core::mem::align_of::<_SID_IDENTIFIER_AUTHORITY>(), - 1usize, - concat!("Alignment of ", stringify!(_SID_IDENTIFIER_AUTHORITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SID_IDENTIFIER_AUTHORITY), - "::", - stringify!(Value), - ), - ); -} -pub type SID_IDENTIFIER_AUTHORITY = _SID_IDENTIFIER_AUTHORITY; -pub type PSID_IDENTIFIER_AUTHORITY = *mut _SID_IDENTIFIER_AUTHORITY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SID { - pub Revision: UCHAR, - pub SubAuthorityCount: UCHAR, - pub IdentifierAuthority: SID_IDENTIFIER_AUTHORITY, - pub SubAuthority: [ULONG; 1usize], -} -#[test] -fn bindgen_test_layout__SID() { - const UNINIT: ::core::mem::MaybeUninit<_SID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SID>(), - 12usize, - concat!("Size of: ", stringify!(_SID)), - ); - assert_eq!( - ::core::mem::align_of::<_SID>(), - 4usize, - concat!("Alignment of ", stringify!(_SID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_SID), "::", stringify!(Revision)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SubAuthorityCount) as usize - ptr as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_SID), - "::", - stringify!(SubAuthorityCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IdentifierAuthority) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_SID), - "::", - stringify!(IdentifierAuthority), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubAuthority) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_SID), "::", stringify!(SubAuthority)), - ); -} -pub type SID = _SID; -pub type PISID = *mut _SID; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _SE_SID { - pub Sid: SID, - pub Buffer: [UCHAR; 68usize], -} -#[test] -fn bindgen_test_layout__SE_SID() { - const UNINIT: ::core::mem::MaybeUninit<_SE_SID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_SID>(), - 68usize, - concat!("Size of: ", stringify!(_SE_SID)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_SID>(), - 4usize, - concat!("Alignment of ", stringify!(_SE_SID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sid) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_SE_SID), "::", stringify!(Sid)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_SE_SID), "::", stringify!(Buffer)), - ); -} -impl Default for _SE_SID { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SE_SID = _SE_SID; -pub type PSE_SID = *mut _SE_SID; -pub mod _SID_NAME_USE { - pub type Type = ::core::ffi::c_int; - pub const SidTypeUser: Type = 1; - pub const SidTypeGroup: Type = 2; - pub const SidTypeDomain: Type = 3; - pub const SidTypeAlias: Type = 4; - pub const SidTypeWellKnownGroup: Type = 5; - pub const SidTypeDeletedAccount: Type = 6; - pub const SidTypeInvalid: Type = 7; - pub const SidTypeUnknown: Type = 8; - pub const SidTypeComputer: Type = 9; - pub const SidTypeLabel: Type = 10; - pub const SidTypeLogonSession: Type = 11; -} -pub use self::_SID_NAME_USE::Type as SID_NAME_USE; -pub type PSID_NAME_USE = *mut _SID_NAME_USE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SID_AND_ATTRIBUTES { - pub Sid: PSID, - pub Attributes: ULONG, -} -#[test] -fn bindgen_test_layout__SID_AND_ATTRIBUTES() { - const UNINIT: ::core::mem::MaybeUninit<_SID_AND_ATTRIBUTES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SID_AND_ATTRIBUTES>(), - 16usize, - concat!("Size of: ", stringify!(_SID_AND_ATTRIBUTES)), - ); - assert_eq!( - ::core::mem::align_of::<_SID_AND_ATTRIBUTES>(), - 8usize, - concat!("Alignment of ", stringify!(_SID_AND_ATTRIBUTES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SID_AND_ATTRIBUTES), - "::", - stringify!(Sid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Attributes) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SID_AND_ATTRIBUTES), - "::", - stringify!(Attributes), - ), - ); -} -impl Default for _SID_AND_ATTRIBUTES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SID_AND_ATTRIBUTES = _SID_AND_ATTRIBUTES; -pub type PSID_AND_ATTRIBUTES = *mut _SID_AND_ATTRIBUTES; -pub type SID_AND_ATTRIBUTES_ARRAY = [SID_AND_ATTRIBUTES; 1usize]; -pub type PSID_AND_ATTRIBUTES_ARRAY = *mut SID_AND_ATTRIBUTES_ARRAY; -pub type SID_HASH_ENTRY = ULONG_PTR; -pub type PSID_HASH_ENTRY = *mut ULONG_PTR; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SID_AND_ATTRIBUTES_HASH { - pub SidCount: ULONG, - pub SidAttr: PSID_AND_ATTRIBUTES, - pub Hash: [SID_HASH_ENTRY; 32usize], -} -#[test] -fn bindgen_test_layout__SID_AND_ATTRIBUTES_HASH() { - const UNINIT: ::core::mem::MaybeUninit<_SID_AND_ATTRIBUTES_HASH> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SID_AND_ATTRIBUTES_HASH>(), - 272usize, - concat!("Size of: ", stringify!(_SID_AND_ATTRIBUTES_HASH)), - ); - assert_eq!( - ::core::mem::align_of::<_SID_AND_ATTRIBUTES_HASH>(), - 8usize, - concat!("Alignment of ", stringify!(_SID_AND_ATTRIBUTES_HASH)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SID_AND_ATTRIBUTES_HASH), - "::", - stringify!(SidCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidAttr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SID_AND_ATTRIBUTES_HASH), - "::", - stringify!(SidAttr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Hash) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SID_AND_ATTRIBUTES_HASH), - "::", - stringify!(Hash), - ), - ); -} -impl Default for _SID_AND_ATTRIBUTES_HASH { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SID_AND_ATTRIBUTES_HASH = _SID_AND_ATTRIBUTES_HASH; -pub type PSID_AND_ATTRIBUTES_HASH = *mut _SID_AND_ATTRIBUTES_HASH; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ACE_HEADER { - pub AceType: UCHAR, - pub AceFlags: UCHAR, - pub AceSize: USHORT, -} -#[test] -fn bindgen_test_layout__ACE_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_ACE_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ACE_HEADER>(), - 4usize, - concat!("Size of: ", stringify!(_ACE_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_ACE_HEADER>(), - 2usize, - concat!("Alignment of ", stringify!(_ACE_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AceType) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_ACE_HEADER), "::", stringify!(AceType)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AceFlags) as usize - ptr as usize }, - 1usize, - concat!("Offset of field: ", stringify!(_ACE_HEADER), "::", stringify!(AceFlags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AceSize) as usize - ptr as usize }, - 2usize, - concat!("Offset of field: ", stringify!(_ACE_HEADER), "::", stringify!(AceSize)), - ); -} -pub type ACE_HEADER = _ACE_HEADER; -pub type PACE_HEADER = *mut ACE_HEADER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ACCESS_ALLOWED_ACE { - pub Header: ACE_HEADER, - pub Mask: ACCESS_MASK, - pub SidStart: ULONG, -} -#[test] -fn bindgen_test_layout__ACCESS_ALLOWED_ACE() { - const UNINIT: ::core::mem::MaybeUninit<_ACCESS_ALLOWED_ACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ACCESS_ALLOWED_ACE>(), - 12usize, - concat!("Size of: ", stringify!(_ACCESS_ALLOWED_ACE)), - ); - assert_eq!( - ::core::mem::align_of::<_ACCESS_ALLOWED_ACE>(), - 4usize, - concat!("Alignment of ", stringify!(_ACCESS_ALLOWED_ACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_ALLOWED_ACE), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_ALLOWED_ACE), - "::", - stringify!(Mask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidStart) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_ALLOWED_ACE), - "::", - stringify!(SidStart), - ), - ); -} -pub type ACCESS_ALLOWED_ACE = _ACCESS_ALLOWED_ACE; -pub type PACCESS_ALLOWED_ACE = *mut ACCESS_ALLOWED_ACE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ACCESS_DENIED_ACE { - pub Header: ACE_HEADER, - pub Mask: ACCESS_MASK, - pub SidStart: ULONG, -} -#[test] -fn bindgen_test_layout__ACCESS_DENIED_ACE() { - const UNINIT: ::core::mem::MaybeUninit<_ACCESS_DENIED_ACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ACCESS_DENIED_ACE>(), - 12usize, - concat!("Size of: ", stringify!(_ACCESS_DENIED_ACE)), - ); - assert_eq!( - ::core::mem::align_of::<_ACCESS_DENIED_ACE>(), - 4usize, - concat!("Alignment of ", stringify!(_ACCESS_DENIED_ACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_DENIED_ACE), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_DENIED_ACE), - "::", - stringify!(Mask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidStart) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ACCESS_DENIED_ACE), - "::", - stringify!(SidStart), - ), - ); -} -pub type ACCESS_DENIED_ACE = _ACCESS_DENIED_ACE; -pub type PACCESS_DENIED_ACE = *mut ACCESS_DENIED_ACE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SYSTEM_AUDIT_ACE { - pub Header: ACE_HEADER, - pub Mask: ACCESS_MASK, - pub SidStart: ULONG, -} -#[test] -fn bindgen_test_layout__SYSTEM_AUDIT_ACE() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_AUDIT_ACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_AUDIT_ACE>(), - 12usize, - concat!("Size of: ", stringify!(_SYSTEM_AUDIT_ACE)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_AUDIT_ACE>(), - 4usize, - concat!("Alignment of ", stringify!(_SYSTEM_AUDIT_ACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_AUDIT_ACE), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_AUDIT_ACE), - "::", - stringify!(Mask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidStart) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_AUDIT_ACE), - "::", - stringify!(SidStart), - ), - ); -} -pub type SYSTEM_AUDIT_ACE = _SYSTEM_AUDIT_ACE; -pub type PSYSTEM_AUDIT_ACE = *mut SYSTEM_AUDIT_ACE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SYSTEM_ALARM_ACE { - pub Header: ACE_HEADER, - pub Mask: ACCESS_MASK, - pub SidStart: ULONG, -} -#[test] -fn bindgen_test_layout__SYSTEM_ALARM_ACE() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_ALARM_ACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_ALARM_ACE>(), - 12usize, - concat!("Size of: ", stringify!(_SYSTEM_ALARM_ACE)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_ALARM_ACE>(), - 4usize, - concat!("Alignment of ", stringify!(_SYSTEM_ALARM_ACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_ALARM_ACE), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_ALARM_ACE), - "::", - stringify!(Mask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidStart) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_ALARM_ACE), - "::", - stringify!(SidStart), - ), - ); -} -pub type SYSTEM_ALARM_ACE = _SYSTEM_ALARM_ACE; -pub type PSYSTEM_ALARM_ACE = *mut SYSTEM_ALARM_ACE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SYSTEM_RESOURCE_ATTRIBUTE_ACE { - pub Header: ACE_HEADER, - pub Mask: ACCESS_MASK, - pub SidStart: ULONG, -} -#[test] -fn bindgen_test_layout__SYSTEM_RESOURCE_ATTRIBUTE_ACE() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_RESOURCE_ATTRIBUTE_ACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_RESOURCE_ATTRIBUTE_ACE>(), - 12usize, - concat!("Size of: ", stringify!(_SYSTEM_RESOURCE_ATTRIBUTE_ACE)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_RESOURCE_ATTRIBUTE_ACE>(), - 4usize, - concat!("Alignment of ", stringify!(_SYSTEM_RESOURCE_ATTRIBUTE_ACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_RESOURCE_ATTRIBUTE_ACE), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_RESOURCE_ATTRIBUTE_ACE), - "::", - stringify!(Mask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidStart) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_RESOURCE_ATTRIBUTE_ACE), - "::", - stringify!(SidStart), - ), - ); -} -pub type SYSTEM_RESOURCE_ATTRIBUTE_ACE = _SYSTEM_RESOURCE_ATTRIBUTE_ACE; -pub type PSYSTEM_RESOURCE_ATTRIBUTE_ACE = *mut _SYSTEM_RESOURCE_ATTRIBUTE_ACE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SYSTEM_SCOPED_POLICY_ID_ACE { - pub Header: ACE_HEADER, - pub Mask: ACCESS_MASK, - pub SidStart: ULONG, -} -#[test] -fn bindgen_test_layout__SYSTEM_SCOPED_POLICY_ID_ACE() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_SCOPED_POLICY_ID_ACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_SCOPED_POLICY_ID_ACE>(), - 12usize, - concat!("Size of: ", stringify!(_SYSTEM_SCOPED_POLICY_ID_ACE)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_SCOPED_POLICY_ID_ACE>(), - 4usize, - concat!("Alignment of ", stringify!(_SYSTEM_SCOPED_POLICY_ID_ACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_SCOPED_POLICY_ID_ACE), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_SCOPED_POLICY_ID_ACE), - "::", - stringify!(Mask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidStart) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_SCOPED_POLICY_ID_ACE), - "::", - stringify!(SidStart), - ), - ); -} -pub type SYSTEM_SCOPED_POLICY_ID_ACE = _SYSTEM_SCOPED_POLICY_ID_ACE; -pub type PSYSTEM_SCOPED_POLICY_ID_ACE = *mut _SYSTEM_SCOPED_POLICY_ID_ACE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SYSTEM_MANDATORY_LABEL_ACE { - pub Header: ACE_HEADER, - pub Mask: ACCESS_MASK, - pub SidStart: ULONG, -} -#[test] -fn bindgen_test_layout__SYSTEM_MANDATORY_LABEL_ACE() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_MANDATORY_LABEL_ACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_MANDATORY_LABEL_ACE>(), - 12usize, - concat!("Size of: ", stringify!(_SYSTEM_MANDATORY_LABEL_ACE)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_MANDATORY_LABEL_ACE>(), - 4usize, - concat!("Alignment of ", stringify!(_SYSTEM_MANDATORY_LABEL_ACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_MANDATORY_LABEL_ACE), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_MANDATORY_LABEL_ACE), - "::", - stringify!(Mask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidStart) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_MANDATORY_LABEL_ACE), - "::", - stringify!(SidStart), - ), - ); -} -pub type SYSTEM_MANDATORY_LABEL_ACE = _SYSTEM_MANDATORY_LABEL_ACE; -pub type PSYSTEM_MANDATORY_LABEL_ACE = *mut _SYSTEM_MANDATORY_LABEL_ACE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SYSTEM_PROCESS_TRUST_LABEL_ACE { - pub Header: ACE_HEADER, - pub Mask: ACCESS_MASK, - pub SidStart: ULONG, -} -#[test] -fn bindgen_test_layout__SYSTEM_PROCESS_TRUST_LABEL_ACE() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_PROCESS_TRUST_LABEL_ACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_PROCESS_TRUST_LABEL_ACE>(), - 12usize, - concat!("Size of: ", stringify!(_SYSTEM_PROCESS_TRUST_LABEL_ACE)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_PROCESS_TRUST_LABEL_ACE>(), - 4usize, - concat!("Alignment of ", stringify!(_SYSTEM_PROCESS_TRUST_LABEL_ACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_PROCESS_TRUST_LABEL_ACE), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_PROCESS_TRUST_LABEL_ACE), - "::", - stringify!(Mask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidStart) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_PROCESS_TRUST_LABEL_ACE), - "::", - stringify!(SidStart), - ), - ); -} -pub type SYSTEM_PROCESS_TRUST_LABEL_ACE = _SYSTEM_PROCESS_TRUST_LABEL_ACE; -pub type PSYSTEM_PROCESS_TRUST_LABEL_ACE = *mut _SYSTEM_PROCESS_TRUST_LABEL_ACE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SYSTEM_ACCESS_FILTER_ACE { - pub Header: ACE_HEADER, - pub Mask: ACCESS_MASK, - pub SidStart: ULONG, -} -#[test] -fn bindgen_test_layout__SYSTEM_ACCESS_FILTER_ACE() { - const UNINIT: ::core::mem::MaybeUninit<_SYSTEM_ACCESS_FILTER_ACE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SYSTEM_ACCESS_FILTER_ACE>(), - 12usize, - concat!("Size of: ", stringify!(_SYSTEM_ACCESS_FILTER_ACE)), - ); - assert_eq!( - ::core::mem::align_of::<_SYSTEM_ACCESS_FILTER_ACE>(), - 4usize, - concat!("Alignment of ", stringify!(_SYSTEM_ACCESS_FILTER_ACE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_ACCESS_FILTER_ACE), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_ACCESS_FILTER_ACE), - "::", - stringify!(Mask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidStart) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SYSTEM_ACCESS_FILTER_ACE), - "::", - stringify!(SidStart), - ), - ); -} -pub type SYSTEM_ACCESS_FILTER_ACE = _SYSTEM_ACCESS_FILTER_ACE; -pub type PSYSTEM_ACCESS_FILTER_ACE = *mut _SYSTEM_ACCESS_FILTER_ACE; -pub type SECURITY_DESCRIPTOR_CONTROL = USHORT; -pub type PSECURITY_DESCRIPTOR_CONTROL = *mut USHORT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SECURITY_DESCRIPTOR_RELATIVE { - pub Revision: UCHAR, - pub Sbz1: UCHAR, - pub Control: SECURITY_DESCRIPTOR_CONTROL, - pub Owner: ULONG, - pub Group: ULONG, - pub Sacl: ULONG, - pub Dacl: ULONG, -} -#[test] -fn bindgen_test_layout__SECURITY_DESCRIPTOR_RELATIVE() { - const UNINIT: ::core::mem::MaybeUninit<_SECURITY_DESCRIPTOR_RELATIVE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SECURITY_DESCRIPTOR_RELATIVE>(), - 20usize, - concat!("Size of: ", stringify!(_SECURITY_DESCRIPTOR_RELATIVE)), - ); - assert_eq!( - ::core::mem::align_of::<_SECURITY_DESCRIPTOR_RELATIVE>(), - 4usize, - concat!("Alignment of ", stringify!(_SECURITY_DESCRIPTOR_RELATIVE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR_RELATIVE), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sbz1) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR_RELATIVE), - "::", - stringify!(Sbz1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR_RELATIVE), - "::", - stringify!(Control), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Owner) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR_RELATIVE), - "::", - stringify!(Owner), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Group) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR_RELATIVE), - "::", - stringify!(Group), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sacl) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR_RELATIVE), - "::", - stringify!(Sacl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dacl) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR_RELATIVE), - "::", - stringify!(Dacl), - ), - ); -} -pub type SECURITY_DESCRIPTOR_RELATIVE = _SECURITY_DESCRIPTOR_RELATIVE; -pub type PISECURITY_DESCRIPTOR_RELATIVE = *mut _SECURITY_DESCRIPTOR_RELATIVE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SECURITY_DESCRIPTOR { - pub Revision: UCHAR, - pub Sbz1: UCHAR, - pub Control: SECURITY_DESCRIPTOR_CONTROL, - pub Owner: PSID, - pub Group: PSID, - pub Sacl: PACL, - pub Dacl: PACL, -} -#[test] -fn bindgen_test_layout__SECURITY_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_SECURITY_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SECURITY_DESCRIPTOR>(), - 40usize, - concat!("Size of: ", stringify!(_SECURITY_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_SECURITY_DESCRIPTOR>(), - 8usize, - concat!("Alignment of ", stringify!(_SECURITY_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Revision) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR), - "::", - stringify!(Revision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sbz1) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR), - "::", - stringify!(Sbz1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Control) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR), - "::", - stringify!(Control), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Owner) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR), - "::", - stringify!(Owner), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Group) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR), - "::", - stringify!(Group), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sacl) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR), - "::", - stringify!(Sacl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Dacl) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_DESCRIPTOR), - "::", - stringify!(Dacl), - ), - ); -} -impl Default for _SECURITY_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SECURITY_DESCRIPTOR = _SECURITY_DESCRIPTOR; -pub type PISECURITY_DESCRIPTOR = *mut _SECURITY_DESCRIPTOR; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SECURITY_OBJECT_AI_PARAMS { - pub Size: ULONG, - pub ConstraintMask: ULONG, -} -#[test] -fn bindgen_test_layout__SECURITY_OBJECT_AI_PARAMS() { - const UNINIT: ::core::mem::MaybeUninit<_SECURITY_OBJECT_AI_PARAMS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SECURITY_OBJECT_AI_PARAMS>(), - 8usize, - concat!("Size of: ", stringify!(_SECURITY_OBJECT_AI_PARAMS)), - ); - assert_eq!( - ::core::mem::align_of::<_SECURITY_OBJECT_AI_PARAMS>(), - 4usize, - concat!("Alignment of ", stringify!(_SECURITY_OBJECT_AI_PARAMS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_OBJECT_AI_PARAMS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ConstraintMask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_OBJECT_AI_PARAMS), - "::", - stringify!(ConstraintMask), - ), - ); -} -pub type SECURITY_OBJECT_AI_PARAMS = _SECURITY_OBJECT_AI_PARAMS; -pub type PSECURITY_OBJECT_AI_PARAMS = *mut _SECURITY_OBJECT_AI_PARAMS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OBJECT_TYPE_LIST { - pub Level: USHORT, - pub Sbz: USHORT, - pub ObjectType: *mut GUID, -} -#[test] -fn bindgen_test_layout__OBJECT_TYPE_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_OBJECT_TYPE_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OBJECT_TYPE_LIST>(), - 16usize, - concat!("Size of: ", stringify!(_OBJECT_TYPE_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_OBJECT_TYPE_LIST>(), - 8usize, - concat!("Alignment of ", stringify!(_OBJECT_TYPE_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Level) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_TYPE_LIST), - "::", - stringify!(Level), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sbz) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_TYPE_LIST), - "::", - stringify!(Sbz), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectType) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OBJECT_TYPE_LIST), - "::", - stringify!(ObjectType), - ), - ); -} -impl Default for _OBJECT_TYPE_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OBJECT_TYPE_LIST = _OBJECT_TYPE_LIST; -pub type POBJECT_TYPE_LIST = *mut _OBJECT_TYPE_LIST; -pub mod _AUDIT_EVENT_TYPE { - pub type Type = ::core::ffi::c_int; - pub const AuditEventObjectAccess: Type = 0; - pub const AuditEventDirectoryServiceAccess: Type = 1; -} -pub use self::_AUDIT_EVENT_TYPE::Type as AUDIT_EVENT_TYPE; -pub type PAUDIT_EVENT_TYPE = *mut _AUDIT_EVENT_TYPE::Type; -pub mod _ACCESS_REASON_TYPE { - pub type Type = ::core::ffi::c_int; - pub const AccessReasonNone: Type = 0; - pub const AccessReasonAllowedAce: Type = 65536; - pub const AccessReasonDeniedAce: Type = 131072; - pub const AccessReasonAllowedParentAce: Type = 196608; - pub const AccessReasonDeniedParentAce: Type = 262144; - pub const AccessReasonNotGrantedByCape: Type = 327680; - pub const AccessReasonNotGrantedByParentCape: Type = 393216; - pub const AccessReasonNotGrantedToAppContainer: Type = 458752; - pub const AccessReasonMissingPrivilege: Type = 1048576; - pub const AccessReasonFromPrivilege: Type = 2097152; - pub const AccessReasonIntegrityLevel: Type = 3145728; - pub const AccessReasonOwnership: Type = 4194304; - pub const AccessReasonNullDacl: Type = 5242880; - pub const AccessReasonEmptyDacl: Type = 6291456; - pub const AccessReasonNoSD: Type = 7340032; - pub const AccessReasonNoGrant: Type = 8388608; - pub const AccessReasonTrustLabel: Type = 9437184; - pub const AccessReasonFilterAce: Type = 10485760; -} -pub use self::_ACCESS_REASON_TYPE::Type as ACCESS_REASON_TYPE; -pub type ACCESS_REASON = ULONG; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ACCESS_REASONS { - pub Data: [ACCESS_REASON; 32usize], -} -#[test] -fn bindgen_test_layout__ACCESS_REASONS() { - const UNINIT: ::core::mem::MaybeUninit<_ACCESS_REASONS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ACCESS_REASONS>(), - 128usize, - concat!("Size of: ", stringify!(_ACCESS_REASONS)), - ); - assert_eq!( - ::core::mem::align_of::<_ACCESS_REASONS>(), - 4usize, - concat!("Alignment of ", stringify!(_ACCESS_REASONS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_ACCESS_REASONS), "::", stringify!(Data)), - ); -} -pub type ACCESS_REASONS = _ACCESS_REASONS; -pub type PACCESS_REASONS = *mut _ACCESS_REASONS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SE_SECURITY_DESCRIPTOR { - pub Size: ULONG, - pub Flags: ULONG, - pub SecurityDescriptor: PSECURITY_DESCRIPTOR, -} -#[test] -fn bindgen_test_layout__SE_SECURITY_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_SE_SECURITY_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_SECURITY_DESCRIPTOR>(), - 16usize, - concat!("Size of: ", stringify!(_SE_SECURITY_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_SECURITY_DESCRIPTOR>(), - 8usize, - concat!("Alignment of ", stringify!(_SE_SECURITY_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_SECURITY_DESCRIPTOR), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SE_SECURITY_DESCRIPTOR), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityDescriptor) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SE_SECURITY_DESCRIPTOR), - "::", - stringify!(SecurityDescriptor), - ), - ); -} -impl Default for _SE_SECURITY_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SE_SECURITY_DESCRIPTOR = _SE_SECURITY_DESCRIPTOR; -pub type PSE_SECURITY_DESCRIPTOR = *mut _SE_SECURITY_DESCRIPTOR; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SE_ACCESS_REQUEST { - pub Size: ULONG, - pub SeSecurityDescriptor: PSE_SECURITY_DESCRIPTOR, - pub DesiredAccess: ACCESS_MASK, - pub PreviouslyGrantedAccess: ACCESS_MASK, - pub PrincipalSelfSid: PSID, - pub GenericMapping: PGENERIC_MAPPING, - pub ObjectTypeListCount: ULONG, - pub ObjectTypeList: POBJECT_TYPE_LIST, -} -#[test] -fn bindgen_test_layout__SE_ACCESS_REQUEST() { - const UNINIT: ::core::mem::MaybeUninit<_SE_ACCESS_REQUEST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_ACCESS_REQUEST>(), - 56usize, - concat!("Size of: ", stringify!(_SE_ACCESS_REQUEST)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_ACCESS_REQUEST>(), - 8usize, - concat!("Alignment of ", stringify!(_SE_ACCESS_REQUEST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REQUEST), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeSecurityDescriptor) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REQUEST), - "::", - stringify!(SeSecurityDescriptor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DesiredAccess) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REQUEST), - "::", - stringify!(DesiredAccess), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PreviouslyGrantedAccess) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REQUEST), - "::", - stringify!(PreviouslyGrantedAccess), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PrincipalSelfSid) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REQUEST), - "::", - stringify!(PrincipalSelfSid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GenericMapping) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REQUEST), - "::", - stringify!(GenericMapping), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ObjectTypeListCount) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REQUEST), - "::", - stringify!(ObjectTypeListCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectTypeList) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REQUEST), - "::", - stringify!(ObjectTypeList), - ), - ); -} -impl Default for _SE_ACCESS_REQUEST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SE_ACCESS_REQUEST = _SE_ACCESS_REQUEST; -pub type PSE_ACCESS_REQUEST = *mut _SE_ACCESS_REQUEST; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SE_ACCESS_REPLY { - pub Size: ULONG, - pub ResultListCount: ULONG, - pub GrantedAccess: PACCESS_MASK, - pub AccessStatus: PNTSTATUS, - pub AccessReason: PACCESS_REASONS, - pub Privileges: *mut PPRIVILEGE_SET, -} -#[test] -fn bindgen_test_layout__SE_ACCESS_REPLY() { - const UNINIT: ::core::mem::MaybeUninit<_SE_ACCESS_REPLY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_ACCESS_REPLY>(), - 40usize, - concat!("Size of: ", stringify!(_SE_ACCESS_REPLY)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_ACCESS_REPLY>(), - 8usize, - concat!("Alignment of ", stringify!(_SE_ACCESS_REPLY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REPLY), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResultListCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REPLY), - "::", - stringify!(ResultListCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GrantedAccess) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REPLY), - "::", - stringify!(GrantedAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AccessStatus) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REPLY), - "::", - stringify!(AccessStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AccessReason) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REPLY), - "::", - stringify!(AccessReason), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Privileges) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SE_ACCESS_REPLY), - "::", - stringify!(Privileges), - ), - ); -} -impl Default for _SE_ACCESS_REPLY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SE_ACCESS_REPLY = _SE_ACCESS_REPLY; -pub type PSE_ACCESS_REPLY = *mut _SE_ACCESS_REPLY; -pub mod _SE_AUDIT_OPERATION { - pub type Type = ::core::ffi::c_int; - pub const AuditPrivilegeObject: Type = 0; - pub const AuditPrivilegeService: Type = 1; - pub const AuditAccessCheck: Type = 2; - pub const AuditOpenObject: Type = 3; - pub const AuditOpenObjectWithTransaction: Type = 4; - pub const AuditCloseObject: Type = 5; - pub const AuditDeleteObject: Type = 6; - pub const AuditOpenObjectForDelete: Type = 7; - pub const AuditOpenObjectForDeleteWithTransaction: Type = 8; - pub const AuditCloseNonObject: Type = 9; - pub const AuditOpenNonObject: Type = 10; - pub const AuditObjectReference: Type = 11; - pub const AuditHandleCreation: Type = 12; -} -pub use self::_SE_AUDIT_OPERATION::Type as SE_AUDIT_OPERATION; -pub type PSE_AUDIT_OPERATION = *mut _SE_AUDIT_OPERATION::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SE_AUDIT_INFO { - pub Size: ULONG, - pub AuditType: AUDIT_EVENT_TYPE, - pub AuditOperation: SE_AUDIT_OPERATION, - pub AuditFlags: ULONG, - pub SubsystemName: UNICODE_STRING, - pub ObjectTypeName: UNICODE_STRING, - pub ObjectName: UNICODE_STRING, - pub HandleId: PVOID, - pub TransactionId: *mut GUID, - pub OperationId: *mut LUID, - pub ObjectCreation: BOOLEAN, - pub GenerateOnClose: BOOLEAN, -} -#[test] -fn bindgen_test_layout__SE_AUDIT_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_SE_AUDIT_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_AUDIT_INFO>(), - 96usize, - concat!("Size of: ", stringify!(_SE_AUDIT_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_AUDIT_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_SE_AUDIT_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_SE_AUDIT_INFO), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AuditType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SE_AUDIT_INFO), - "::", - stringify!(AuditType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AuditOperation) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SE_AUDIT_INFO), - "::", - stringify!(AuditOperation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AuditFlags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SE_AUDIT_INFO), - "::", - stringify!(AuditFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SubsystemName) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SE_AUDIT_INFO), - "::", - stringify!(SubsystemName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectTypeName) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SE_AUDIT_INFO), - "::", - stringify!(ObjectTypeName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectName) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_SE_AUDIT_INFO), - "::", - stringify!(ObjectName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HandleId) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_SE_AUDIT_INFO), - "::", - stringify!(HandleId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TransactionId) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_SE_AUDIT_INFO), - "::", - stringify!(TransactionId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OperationId) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_SE_AUDIT_INFO), - "::", - stringify!(OperationId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectCreation) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_SE_AUDIT_INFO), - "::", - stringify!(ObjectCreation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GenerateOnClose) as usize - ptr as usize }, - 89usize, - concat!( - "Offset of field: ", - stringify!(_SE_AUDIT_INFO), - "::", - stringify!(GenerateOnClose), - ), - ); -} -impl Default for _SE_AUDIT_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SE_AUDIT_INFO = _SE_AUDIT_INFO; -pub type PSE_AUDIT_INFO = *mut _SE_AUDIT_INFO; -pub mod _TOKEN_TYPE { - pub type Type = ::core::ffi::c_int; - pub const TokenPrimary: Type = 1; - pub const TokenImpersonation: Type = 2; -} -pub use self::_TOKEN_TYPE::Type as TOKEN_TYPE; -pub type PTOKEN_TYPE = *mut TOKEN_TYPE; -pub mod _TOKEN_ELEVATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const TokenElevationTypeDefault: Type = 1; - pub const TokenElevationTypeFull: Type = 2; - pub const TokenElevationTypeLimited: Type = 3; -} -pub use self::_TOKEN_ELEVATION_TYPE::Type as TOKEN_ELEVATION_TYPE; -pub type PTOKEN_ELEVATION_TYPE = *mut _TOKEN_ELEVATION_TYPE::Type; -pub mod _TOKEN_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const TokenUser: Type = 1; - pub const TokenGroups: Type = 2; - pub const TokenPrivileges: Type = 3; - pub const TokenOwner: Type = 4; - pub const TokenPrimaryGroup: Type = 5; - pub const TokenDefaultDacl: Type = 6; - pub const TokenSource: Type = 7; - pub const TokenType: Type = 8; - pub const TokenImpersonationLevel: Type = 9; - pub const TokenStatistics: Type = 10; - pub const TokenRestrictedSids: Type = 11; - pub const TokenSessionId: Type = 12; - pub const TokenGroupsAndPrivileges: Type = 13; - pub const TokenSessionReference: Type = 14; - pub const TokenSandBoxInert: Type = 15; - pub const TokenAuditPolicy: Type = 16; - pub const TokenOrigin: Type = 17; - pub const TokenElevationType: Type = 18; - pub const TokenLinkedToken: Type = 19; - pub const TokenElevation: Type = 20; - pub const TokenHasRestrictions: Type = 21; - pub const TokenAccessInformation: Type = 22; - pub const TokenVirtualizationAllowed: Type = 23; - pub const TokenVirtualizationEnabled: Type = 24; - pub const TokenIntegrityLevel: Type = 25; - pub const TokenUIAccess: Type = 26; - pub const TokenMandatoryPolicy: Type = 27; - pub const TokenLogonSid: Type = 28; - pub const TokenIsAppContainer: Type = 29; - pub const TokenCapabilities: Type = 30; - pub const TokenAppContainerSid: Type = 31; - pub const TokenAppContainerNumber: Type = 32; - pub const TokenUserClaimAttributes: Type = 33; - pub const TokenDeviceClaimAttributes: Type = 34; - pub const TokenRestrictedUserClaimAttributes: Type = 35; - pub const TokenRestrictedDeviceClaimAttributes: Type = 36; - pub const TokenDeviceGroups: Type = 37; - pub const TokenRestrictedDeviceGroups: Type = 38; - pub const TokenSecurityAttributes: Type = 39; - pub const TokenIsRestricted: Type = 40; - pub const TokenProcessTrustLevel: Type = 41; - pub const TokenPrivateNameSpace: Type = 42; - pub const TokenSingletonAttributes: Type = 43; - pub const TokenBnoIsolation: Type = 44; - pub const TokenChildProcessFlags: Type = 45; - pub const TokenIsLessPrivilegedAppContainer: Type = 46; - pub const TokenIsSandboxed: Type = 47; - pub const TokenIsAppSilo: Type = 48; - pub const MaxTokenInfoClass: Type = 49; -} -pub use self::_TOKEN_INFORMATION_CLASS::Type as TOKEN_INFORMATION_CLASS; -pub type PTOKEN_INFORMATION_CLASS = *mut _TOKEN_INFORMATION_CLASS::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_USER { - pub User: SID_AND_ATTRIBUTES, -} -#[test] -fn bindgen_test_layout__TOKEN_USER() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_USER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_USER>(), - 16usize, - concat!("Size of: ", stringify!(_TOKEN_USER)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_USER>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_USER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).User) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_TOKEN_USER), "::", stringify!(User)), - ); -} -impl Default for _TOKEN_USER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_USER = _TOKEN_USER; -pub type PTOKEN_USER = *mut _TOKEN_USER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _SE_TOKEN_USER { - pub __bindgen_anon_1: _SE_TOKEN_USER__bindgen_ty_1, - pub __bindgen_anon_2: _SE_TOKEN_USER__bindgen_ty_2, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _SE_TOKEN_USER__bindgen_ty_1 { - pub TokenUser: TOKEN_USER, - pub User: SID_AND_ATTRIBUTES, -} -#[test] -fn bindgen_test_layout__SE_TOKEN_USER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_SE_TOKEN_USER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_TOKEN_USER__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_SE_TOKEN_USER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_TOKEN_USER__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_SE_TOKEN_USER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TokenUser) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_TOKEN_USER__bindgen_ty_1), - "::", - stringify!(TokenUser), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).User) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_TOKEN_USER__bindgen_ty_1), - "::", - stringify!(User), - ), - ); -} -impl Default for _SE_TOKEN_USER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _SE_TOKEN_USER__bindgen_ty_2 { - pub Sid: SID, - pub Buffer: [UCHAR; 68usize], -} -#[test] -fn bindgen_test_layout__SE_TOKEN_USER__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_SE_TOKEN_USER__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_TOKEN_USER__bindgen_ty_2>(), - 68usize, - concat!("Size of: ", stringify!(_SE_TOKEN_USER__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_TOKEN_USER__bindgen_ty_2>(), - 4usize, - concat!("Alignment of ", stringify!(_SE_TOKEN_USER__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_TOKEN_USER__bindgen_ty_2), - "::", - stringify!(Sid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_TOKEN_USER__bindgen_ty_2), - "::", - stringify!(Buffer), - ), - ); -} -impl Default for _SE_TOKEN_USER__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__SE_TOKEN_USER() { - assert_eq!( - ::core::mem::size_of::<_SE_TOKEN_USER>(), - 88usize, - concat!("Size of: ", stringify!(_SE_TOKEN_USER)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_TOKEN_USER>(), - 8usize, - concat!("Alignment of ", stringify!(_SE_TOKEN_USER)), - ); -} -impl Default for _SE_TOKEN_USER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SE_TOKEN_USER = _SE_TOKEN_USER; -pub type PSE_TOKEN_USER = _SE_TOKEN_USER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_GROUPS { - pub GroupCount: ULONG, - pub Groups: [SID_AND_ATTRIBUTES; 1usize], -} -#[test] -fn bindgen_test_layout__TOKEN_GROUPS() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_GROUPS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_GROUPS>(), - 24usize, - concat!("Size of: ", stringify!(_TOKEN_GROUPS)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_GROUPS>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_GROUPS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GroupCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_GROUPS), - "::", - stringify!(GroupCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Groups) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_TOKEN_GROUPS), "::", stringify!(Groups)), - ); -} -impl Default for _TOKEN_GROUPS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_GROUPS = _TOKEN_GROUPS; -pub type PTOKEN_GROUPS = *mut _TOKEN_GROUPS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TOKEN_PRIVILEGES { - pub PrivilegeCount: ULONG, - pub Privileges: [LUID_AND_ATTRIBUTES; 1usize], -} -#[test] -fn bindgen_test_layout__TOKEN_PRIVILEGES() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_PRIVILEGES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_PRIVILEGES>(), - 16usize, - concat!("Size of: ", stringify!(_TOKEN_PRIVILEGES)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_PRIVILEGES>(), - 4usize, - concat!("Alignment of ", stringify!(_TOKEN_PRIVILEGES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrivilegeCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_PRIVILEGES), - "::", - stringify!(PrivilegeCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Privileges) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_PRIVILEGES), - "::", - stringify!(Privileges), - ), - ); -} -pub type TOKEN_PRIVILEGES = _TOKEN_PRIVILEGES; -pub type PTOKEN_PRIVILEGES = *mut _TOKEN_PRIVILEGES; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_OWNER { - pub Owner: PSID, -} -#[test] -fn bindgen_test_layout__TOKEN_OWNER() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_OWNER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_OWNER>(), - 8usize, - concat!("Size of: ", stringify!(_TOKEN_OWNER)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_OWNER>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_OWNER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Owner) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_TOKEN_OWNER), "::", stringify!(Owner)), - ); -} -impl Default for _TOKEN_OWNER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_OWNER = _TOKEN_OWNER; -pub type PTOKEN_OWNER = *mut _TOKEN_OWNER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_PRIMARY_GROUP { - pub PrimaryGroup: PSID, -} -#[test] -fn bindgen_test_layout__TOKEN_PRIMARY_GROUP() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_PRIMARY_GROUP> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_PRIMARY_GROUP>(), - 8usize, - concat!("Size of: ", stringify!(_TOKEN_PRIMARY_GROUP)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_PRIMARY_GROUP>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_PRIMARY_GROUP)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrimaryGroup) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_PRIMARY_GROUP), - "::", - stringify!(PrimaryGroup), - ), - ); -} -impl Default for _TOKEN_PRIMARY_GROUP { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_PRIMARY_GROUP = _TOKEN_PRIMARY_GROUP; -pub type PTOKEN_PRIMARY_GROUP = *mut _TOKEN_PRIMARY_GROUP; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_DEFAULT_DACL { - pub DefaultDacl: PACL, -} -#[test] -fn bindgen_test_layout__TOKEN_DEFAULT_DACL() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_DEFAULT_DACL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_DEFAULT_DACL>(), - 8usize, - concat!("Size of: ", stringify!(_TOKEN_DEFAULT_DACL)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_DEFAULT_DACL>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_DEFAULT_DACL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DefaultDacl) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_DEFAULT_DACL), - "::", - stringify!(DefaultDacl), - ), - ); -} -impl Default for _TOKEN_DEFAULT_DACL { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_DEFAULT_DACL = _TOKEN_DEFAULT_DACL; -pub type PTOKEN_DEFAULT_DACL = *mut _TOKEN_DEFAULT_DACL; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_USER_CLAIMS { - pub UserClaims: PCLAIMS_BLOB, -} -#[test] -fn bindgen_test_layout__TOKEN_USER_CLAIMS() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_USER_CLAIMS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_USER_CLAIMS>(), - 8usize, - concat!("Size of: ", stringify!(_TOKEN_USER_CLAIMS)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_USER_CLAIMS>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_USER_CLAIMS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserClaims) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_USER_CLAIMS), - "::", - stringify!(UserClaims), - ), - ); -} -impl Default for _TOKEN_USER_CLAIMS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_USER_CLAIMS = _TOKEN_USER_CLAIMS; -pub type PTOKEN_USER_CLAIMS = *mut _TOKEN_USER_CLAIMS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_DEVICE_CLAIMS { - pub DeviceClaims: PCLAIMS_BLOB, -} -#[test] -fn bindgen_test_layout__TOKEN_DEVICE_CLAIMS() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_DEVICE_CLAIMS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_DEVICE_CLAIMS>(), - 8usize, - concat!("Size of: ", stringify!(_TOKEN_DEVICE_CLAIMS)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_DEVICE_CLAIMS>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_DEVICE_CLAIMS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceClaims) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_DEVICE_CLAIMS), - "::", - stringify!(DeviceClaims), - ), - ); -} -impl Default for _TOKEN_DEVICE_CLAIMS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_DEVICE_CLAIMS = _TOKEN_DEVICE_CLAIMS; -pub type PTOKEN_DEVICE_CLAIMS = *mut _TOKEN_DEVICE_CLAIMS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_GROUPS_AND_PRIVILEGES { - pub SidCount: ULONG, - pub SidLength: ULONG, - pub Sids: PSID_AND_ATTRIBUTES, - pub RestrictedSidCount: ULONG, - pub RestrictedSidLength: ULONG, - pub RestrictedSids: PSID_AND_ATTRIBUTES, - pub PrivilegeCount: ULONG, - pub PrivilegeLength: ULONG, - pub Privileges: PLUID_AND_ATTRIBUTES, - pub AuthenticationId: LUID, -} -#[test] -fn bindgen_test_layout__TOKEN_GROUPS_AND_PRIVILEGES() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_GROUPS_AND_PRIVILEGES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_GROUPS_AND_PRIVILEGES>(), - 56usize, - concat!("Size of: ", stringify!(_TOKEN_GROUPS_AND_PRIVILEGES)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_GROUPS_AND_PRIVILEGES>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_GROUPS_AND_PRIVILEGES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_GROUPS_AND_PRIVILEGES), - "::", - stringify!(SidCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_GROUPS_AND_PRIVILEGES), - "::", - stringify!(SidLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sids) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_GROUPS_AND_PRIVILEGES), - "::", - stringify!(Sids), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RestrictedSidCount) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_GROUPS_AND_PRIVILEGES), - "::", - stringify!(RestrictedSidCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RestrictedSidLength) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_GROUPS_AND_PRIVILEGES), - "::", - stringify!(RestrictedSidLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RestrictedSids) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_GROUPS_AND_PRIVILEGES), - "::", - stringify!(RestrictedSids), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrivilegeCount) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_GROUPS_AND_PRIVILEGES), - "::", - stringify!(PrivilegeCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrivilegeLength) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_GROUPS_AND_PRIVILEGES), - "::", - stringify!(PrivilegeLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Privileges) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_GROUPS_AND_PRIVILEGES), - "::", - stringify!(Privileges), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AuthenticationId) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_GROUPS_AND_PRIVILEGES), - "::", - stringify!(AuthenticationId), - ), - ); -} -impl Default for _TOKEN_GROUPS_AND_PRIVILEGES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_GROUPS_AND_PRIVILEGES = _TOKEN_GROUPS_AND_PRIVILEGES; -pub type PTOKEN_GROUPS_AND_PRIVILEGES = *mut _TOKEN_GROUPS_AND_PRIVILEGES; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_LINKED_TOKEN { - pub LinkedToken: HANDLE, -} -#[test] -fn bindgen_test_layout__TOKEN_LINKED_TOKEN() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_LINKED_TOKEN> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_LINKED_TOKEN>(), - 8usize, - concat!("Size of: ", stringify!(_TOKEN_LINKED_TOKEN)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_LINKED_TOKEN>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_LINKED_TOKEN)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LinkedToken) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_LINKED_TOKEN), - "::", - stringify!(LinkedToken), - ), - ); -} -impl Default for _TOKEN_LINKED_TOKEN { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_LINKED_TOKEN = _TOKEN_LINKED_TOKEN; -pub type PTOKEN_LINKED_TOKEN = *mut _TOKEN_LINKED_TOKEN; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TOKEN_ELEVATION { - pub TokenIsElevated: ULONG, -} -#[test] -fn bindgen_test_layout__TOKEN_ELEVATION() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_ELEVATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_ELEVATION>(), - 4usize, - concat!("Size of: ", stringify!(_TOKEN_ELEVATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_ELEVATION>(), - 4usize, - concat!("Alignment of ", stringify!(_TOKEN_ELEVATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TokenIsElevated) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ELEVATION), - "::", - stringify!(TokenIsElevated), - ), - ); -} -pub type TOKEN_ELEVATION = _TOKEN_ELEVATION; -pub type PTOKEN_ELEVATION = *mut _TOKEN_ELEVATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_MANDATORY_LABEL { - pub Label: SID_AND_ATTRIBUTES, -} -#[test] -fn bindgen_test_layout__TOKEN_MANDATORY_LABEL() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_MANDATORY_LABEL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_MANDATORY_LABEL>(), - 16usize, - concat!("Size of: ", stringify!(_TOKEN_MANDATORY_LABEL)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_MANDATORY_LABEL>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_MANDATORY_LABEL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Label) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_MANDATORY_LABEL), - "::", - stringify!(Label), - ), - ); -} -impl Default for _TOKEN_MANDATORY_LABEL { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_MANDATORY_LABEL = _TOKEN_MANDATORY_LABEL; -pub type PTOKEN_MANDATORY_LABEL = *mut _TOKEN_MANDATORY_LABEL; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TOKEN_MANDATORY_POLICY { - pub Policy: ULONG, -} -#[test] -fn bindgen_test_layout__TOKEN_MANDATORY_POLICY() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_MANDATORY_POLICY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_MANDATORY_POLICY>(), - 4usize, - concat!("Size of: ", stringify!(_TOKEN_MANDATORY_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_MANDATORY_POLICY>(), - 4usize, - concat!("Alignment of ", stringify!(_TOKEN_MANDATORY_POLICY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Policy) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_MANDATORY_POLICY), - "::", - stringify!(Policy), - ), - ); -} -pub type TOKEN_MANDATORY_POLICY = _TOKEN_MANDATORY_POLICY; -pub type PTOKEN_MANDATORY_POLICY = *mut _TOKEN_MANDATORY_POLICY; -pub type PSECURITY_ATTRIBUTES_OPAQUE = PVOID; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_ACCESS_INFORMATION { - pub SidHash: PSID_AND_ATTRIBUTES_HASH, - pub RestrictedSidHash: PSID_AND_ATTRIBUTES_HASH, - pub Privileges: PTOKEN_PRIVILEGES, - pub AuthenticationId: LUID, - pub TokenType: TOKEN_TYPE, - pub ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, - pub MandatoryPolicy: TOKEN_MANDATORY_POLICY, - pub Flags: ULONG, - pub AppContainerNumber: ULONG, - pub PackageSid: PSID, - pub CapabilitiesHash: PSID_AND_ATTRIBUTES_HASH, - pub TrustLevelSid: PSID, - pub SecurityAttributes: PSECURITY_ATTRIBUTES_OPAQUE, -} -#[test] -fn bindgen_test_layout__TOKEN_ACCESS_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_ACCESS_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_ACCESS_INFORMATION>(), - 88usize, - concat!("Size of: ", stringify!(_TOKEN_ACCESS_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_ACCESS_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_ACCESS_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidHash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ACCESS_INFORMATION), - "::", - stringify!(SidHash), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RestrictedSidHash) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ACCESS_INFORMATION), - "::", - stringify!(RestrictedSidHash), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Privileges) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ACCESS_INFORMATION), - "::", - stringify!(Privileges), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AuthenticationId) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ACCESS_INFORMATION), - "::", - stringify!(AuthenticationId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TokenType) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ACCESS_INFORMATION), - "::", - stringify!(TokenType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ImpersonationLevel) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ACCESS_INFORMATION), - "::", - stringify!(ImpersonationLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MandatoryPolicy) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ACCESS_INFORMATION), - "::", - stringify!(MandatoryPolicy), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ACCESS_INFORMATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AppContainerNumber) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ACCESS_INFORMATION), - "::", - stringify!(AppContainerNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PackageSid) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ACCESS_INFORMATION), - "::", - stringify!(PackageSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CapabilitiesHash) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ACCESS_INFORMATION), - "::", - stringify!(CapabilitiesHash), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TrustLevelSid) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ACCESS_INFORMATION), - "::", - stringify!(TrustLevelSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SecurityAttributes) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ACCESS_INFORMATION), - "::", - stringify!(SecurityAttributes), - ), - ); -} -impl Default for _TOKEN_ACCESS_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_ACCESS_INFORMATION = _TOKEN_ACCESS_INFORMATION; -pub type PTOKEN_ACCESS_INFORMATION = *mut _TOKEN_ACCESS_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TOKEN_AUDIT_POLICY { - pub PerUserPolicy: [UCHAR; 30usize], -} -#[test] -fn bindgen_test_layout__TOKEN_AUDIT_POLICY() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_AUDIT_POLICY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_AUDIT_POLICY>(), - 30usize, - concat!("Size of: ", stringify!(_TOKEN_AUDIT_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_AUDIT_POLICY>(), - 1usize, - concat!("Alignment of ", stringify!(_TOKEN_AUDIT_POLICY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PerUserPolicy) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_AUDIT_POLICY), - "::", - stringify!(PerUserPolicy), - ), - ); -} -pub type TOKEN_AUDIT_POLICY = _TOKEN_AUDIT_POLICY; -pub type PTOKEN_AUDIT_POLICY = *mut _TOKEN_AUDIT_POLICY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TOKEN_SOURCE { - pub SourceName: [CHAR; 8usize], - pub SourceIdentifier: LUID, -} -#[test] -fn bindgen_test_layout__TOKEN_SOURCE() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_SOURCE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_SOURCE>(), - 16usize, - concat!("Size of: ", stringify!(_TOKEN_SOURCE)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_SOURCE>(), - 4usize, - concat!("Alignment of ", stringify!(_TOKEN_SOURCE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_SOURCE), - "::", - stringify!(SourceName), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceIdentifier) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_SOURCE), - "::", - stringify!(SourceIdentifier), - ), - ); -} -pub type TOKEN_SOURCE = _TOKEN_SOURCE; -pub type PTOKEN_SOURCE = *mut _TOKEN_SOURCE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _TOKEN_STATISTICS { - pub TokenId: LUID, - pub AuthenticationId: LUID, - pub ExpirationTime: LARGE_INTEGER, - pub TokenType: TOKEN_TYPE, - pub ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, - pub DynamicCharged: ULONG, - pub DynamicAvailable: ULONG, - pub GroupCount: ULONG, - pub PrivilegeCount: ULONG, - pub ModifiedId: LUID, -} -#[test] -fn bindgen_test_layout__TOKEN_STATISTICS() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_STATISTICS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_STATISTICS>(), - 56usize, - concat!("Size of: ", stringify!(_TOKEN_STATISTICS)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_STATISTICS>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_STATISTICS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TokenId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_STATISTICS), - "::", - stringify!(TokenId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AuthenticationId) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_STATISTICS), - "::", - stringify!(AuthenticationId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExpirationTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_STATISTICS), - "::", - stringify!(ExpirationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TokenType) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_STATISTICS), - "::", - stringify!(TokenType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ImpersonationLevel) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_STATISTICS), - "::", - stringify!(ImpersonationLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DynamicCharged) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_STATISTICS), - "::", - stringify!(DynamicCharged), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DynamicAvailable) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_STATISTICS), - "::", - stringify!(DynamicAvailable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GroupCount) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_STATISTICS), - "::", - stringify!(GroupCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrivilegeCount) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_STATISTICS), - "::", - stringify!(PrivilegeCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ModifiedId) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_STATISTICS), - "::", - stringify!(ModifiedId), - ), - ); -} -impl Default for _TOKEN_STATISTICS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_STATISTICS = _TOKEN_STATISTICS; -pub type PTOKEN_STATISTICS = *mut _TOKEN_STATISTICS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TOKEN_CONTROL { - pub TokenId: LUID, - pub AuthenticationId: LUID, - pub ModifiedId: LUID, - pub TokenSource: TOKEN_SOURCE, -} -#[test] -fn bindgen_test_layout__TOKEN_CONTROL() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_CONTROL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_CONTROL>(), - 40usize, - concat!("Size of: ", stringify!(_TOKEN_CONTROL)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_CONTROL>(), - 4usize, - concat!("Alignment of ", stringify!(_TOKEN_CONTROL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TokenId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_CONTROL), - "::", - stringify!(TokenId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AuthenticationId) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_CONTROL), - "::", - stringify!(AuthenticationId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ModifiedId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_CONTROL), - "::", - stringify!(ModifiedId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TokenSource) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_CONTROL), - "::", - stringify!(TokenSource), - ), - ); -} -pub type TOKEN_CONTROL = _TOKEN_CONTROL; -pub type PTOKEN_CONTROL = *mut _TOKEN_CONTROL; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TOKEN_ORIGIN { - pub OriginatingLogonSession: LUID, -} -#[test] -fn bindgen_test_layout__TOKEN_ORIGIN() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_ORIGIN> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_ORIGIN>(), - 8usize, - concat!("Size of: ", stringify!(_TOKEN_ORIGIN)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_ORIGIN>(), - 4usize, - concat!("Alignment of ", stringify!(_TOKEN_ORIGIN)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OriginatingLogonSession) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_ORIGIN), - "::", - stringify!(OriginatingLogonSession), - ), - ); -} -pub type TOKEN_ORIGIN = _TOKEN_ORIGIN; -pub type PTOKEN_ORIGIN = *mut _TOKEN_ORIGIN; -pub mod _MANDATORY_LEVEL { - pub type Type = ::core::ffi::c_int; - pub const MandatoryLevelUntrusted: Type = 0; - pub const MandatoryLevelLow: Type = 1; - pub const MandatoryLevelMedium: Type = 2; - pub const MandatoryLevelHigh: Type = 3; - pub const MandatoryLevelSystem: Type = 4; - pub const MandatoryLevelSecureProcess: Type = 5; - pub const MandatoryLevelCount: Type = 6; -} -pub use self::_MANDATORY_LEVEL::Type as MANDATORY_LEVEL; -pub type PMANDATORY_LEVEL = *mut _MANDATORY_LEVEL::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_APPCONTAINER_INFORMATION { - pub TokenAppContainer: PSID, -} -#[test] -fn bindgen_test_layout__TOKEN_APPCONTAINER_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_APPCONTAINER_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_APPCONTAINER_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_TOKEN_APPCONTAINER_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_APPCONTAINER_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_APPCONTAINER_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TokenAppContainer) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_APPCONTAINER_INFORMATION), - "::", - stringify!(TokenAppContainer), - ), - ); -} -impl Default for _TOKEN_APPCONTAINER_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_APPCONTAINER_INFORMATION = _TOKEN_APPCONTAINER_INFORMATION; -pub type PTOKEN_APPCONTAINER_INFORMATION = *mut _TOKEN_APPCONTAINER_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_SID_INFORMATION { - pub Sid: PSID, -} -#[test] -fn bindgen_test_layout__TOKEN_SID_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_SID_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_SID_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_TOKEN_SID_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_SID_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_SID_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_SID_INFORMATION), - "::", - stringify!(Sid), - ), - ); -} -impl Default for _TOKEN_SID_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_SID_INFORMATION = _TOKEN_SID_INFORMATION; -pub type PTOKEN_SID_INFORMATION = *mut _TOKEN_SID_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TOKEN_BNO_ISOLATION_INFORMATION { - pub IsolationPrefix: PWSTR, - pub IsolationEnabled: BOOLEAN, -} -#[test] -fn bindgen_test_layout__TOKEN_BNO_ISOLATION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TOKEN_BNO_ISOLATION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TOKEN_BNO_ISOLATION_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_TOKEN_BNO_ISOLATION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TOKEN_BNO_ISOLATION_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TOKEN_BNO_ISOLATION_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsolationPrefix) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_BNO_ISOLATION_INFORMATION), - "::", - stringify!(IsolationPrefix), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IsolationEnabled) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TOKEN_BNO_ISOLATION_INFORMATION), - "::", - stringify!(IsolationEnabled), - ), - ); -} -impl Default for _TOKEN_BNO_ISOLATION_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TOKEN_BNO_ISOLATION_INFORMATION = _TOKEN_BNO_ISOLATION_INFORMATION; -pub type PTOKEN_BNO_ISOLATION_INFORMATION = *mut _TOKEN_BNO_ISOLATION_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE { - pub Version: ULONG64, - pub Name: PWSTR, -} -#[test] -fn bindgen_test_layout__CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE() { - const UNINIT: ::core::mem::MaybeUninit<_CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE>(), - 16usize, - concat!("Size of: ", stringify!(_CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE)), - ); - assert_eq!( - ::core::mem::align_of::<_CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE>(), - 8usize, - concat!("Alignment of ", stringify!(_CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE), - "::", - stringify!(Name), - ), - ); -} -impl Default for _CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE = _CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE; -pub type PCLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE = *mut _CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE { - pub pValue: PVOID, - pub ValueLength: ULONG, -} -#[test] -fn bindgen_test_layout__CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE() { - const UNINIT: ::core::mem::MaybeUninit< - _CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE>(), - 16usize, - concat!("Size of: ", stringify!(_CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE)), - ); - assert_eq!( - ::core::mem::align_of::<_CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE), - "::", - stringify!(pValue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValueLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE), - "::", - stringify!(ValueLength), - ), - ); -} -impl Default for _CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE = _CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE; -pub type PCLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE = *mut _CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CLAIM_SECURITY_ATTRIBUTE_V1 { - pub Name: PWSTR, - pub ValueType: USHORT, - pub Reserved: USHORT, - pub Flags: ULONG, - pub ValueCount: ULONG, - pub Values: _CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1 { - pub pInt64: PLONG64, - pub pUint64: PULONG64, - pub ppString: *mut PWSTR, - pub pFqbn: PCLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE, - pub pOctetString: PCLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE, -} -#[test] -fn bindgen_test_layout__CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pInt64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1), - "::", - stringify!(pInt64), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pUint64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1), - "::", - stringify!(pUint64), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ppString) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1), - "::", - stringify!(ppString), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pFqbn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1), - "::", - stringify!(pFqbn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pOctetString) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1), - "::", - stringify!(pOctetString), - ), - ); -} -impl Default for _CLAIM_SECURITY_ATTRIBUTE_V1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__CLAIM_SECURITY_ATTRIBUTE_V1() { - const UNINIT: ::core::mem::MaybeUninit<_CLAIM_SECURITY_ATTRIBUTE_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLAIM_SECURITY_ATTRIBUTE_V1>(), - 32usize, - concat!("Size of: ", stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_CLAIM_SECURITY_ATTRIBUTE_V1>(), - 8usize, - concat!("Alignment of ", stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1), - "::", - stringify!(Name), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValueType) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1), - "::", - stringify!(ValueType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValueCount) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1), - "::", - stringify!(ValueCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Values) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_V1), - "::", - stringify!(Values), - ), - ); -} -impl Default for _CLAIM_SECURITY_ATTRIBUTE_V1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLAIM_SECURITY_ATTRIBUTE_V1 = _CLAIM_SECURITY_ATTRIBUTE_V1; -pub type PCLAIM_SECURITY_ATTRIBUTE_V1 = *mut _CLAIM_SECURITY_ATTRIBUTE_V1; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 { - pub Name: ULONG, - pub ValueType: USHORT, - pub Reserved: USHORT, - pub Flags: ULONG, - pub ValueCount: ULONG, - pub Values: _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1 { - pub pInt64: [ULONG; 1usize], - pub pUint64: [ULONG; 1usize], - pub ppString: [ULONG; 1usize], - pub pFqbn: [ULONG; 1usize], - pub pOctetString: [ULONG; 1usize], -} -#[test] -fn bindgen_test_layout__CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pInt64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1), - "::", - stringify!(pInt64), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pUint64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1), - "::", - stringify!(pUint64), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ppString) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1), - "::", - stringify!(ppString), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pFqbn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1), - "::", - stringify!(pFqbn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pOctetString) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1), - "::", - stringify!(pOctetString), - ), - ); -} -impl Default for _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1() { - const UNINIT: ::core::mem::MaybeUninit<_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1>(), - 20usize, - concat!("Size of: ", stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1>(), - 4usize, - concat!("Alignment of ", stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1), - "::", - stringify!(Name), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValueType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1), - "::", - stringify!(ValueType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValueCount) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1), - "::", - stringify!(ValueCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Values) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1), - "::", - stringify!(Values), - ), - ); -} -impl Default for _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 = _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1; -pub type PCLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 = *mut _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CLAIM_SECURITY_ATTRIBUTES_INFORMATION { - pub Version: USHORT, - pub Reserved: USHORT, - pub AttributeCount: ULONG, - pub Attribute: _CLAIM_SECURITY_ATTRIBUTES_INFORMATION__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _CLAIM_SECURITY_ATTRIBUTES_INFORMATION__bindgen_ty_1 { - pub pAttributeV1: PCLAIM_SECURITY_ATTRIBUTE_V1, -} -#[test] -fn bindgen_test_layout__CLAIM_SECURITY_ATTRIBUTES_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _CLAIM_SECURITY_ATTRIBUTES_INFORMATION__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLAIM_SECURITY_ATTRIBUTES_INFORMATION__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTES_INFORMATION__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_CLAIM_SECURITY_ATTRIBUTES_INFORMATION__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_CLAIM_SECURITY_ATTRIBUTES_INFORMATION__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pAttributeV1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTES_INFORMATION__bindgen_ty_1), - "::", - stringify!(pAttributeV1), - ), - ); -} -impl Default for _CLAIM_SECURITY_ATTRIBUTES_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__CLAIM_SECURITY_ATTRIBUTES_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_CLAIM_SECURITY_ATTRIBUTES_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLAIM_SECURITY_ATTRIBUTES_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_CLAIM_SECURITY_ATTRIBUTES_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_CLAIM_SECURITY_ATTRIBUTES_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_CLAIM_SECURITY_ATTRIBUTES_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTES_INFORMATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTES_INFORMATION), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AttributeCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTES_INFORMATION), - "::", - stringify!(AttributeCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Attribute) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLAIM_SECURITY_ATTRIBUTES_INFORMATION), - "::", - stringify!(Attribute), - ), - ); -} -impl Default for _CLAIM_SECURITY_ATTRIBUTES_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLAIM_SECURITY_ATTRIBUTES_INFORMATION = _CLAIM_SECURITY_ATTRIBUTES_INFORMATION; -pub type PCLAIM_SECURITY_ATTRIBUTES_INFORMATION = *mut _CLAIM_SECURITY_ATTRIBUTES_INFORMATION; -pub type PRTL_HEAP_COMMIT_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(arg1: PVOID, arg2: *mut PVOID, arg3: PSIZE_T) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _RTL_HEAP_PARAMETERS { - pub Length: ULONG, - pub SegmentReserve: SIZE_T, - pub SegmentCommit: SIZE_T, - pub DeCommitFreeBlockThreshold: SIZE_T, - pub DeCommitTotalFreeThreshold: SIZE_T, - pub MaximumAllocationSize: SIZE_T, - pub VirtualMemoryThreshold: SIZE_T, - pub InitialCommit: SIZE_T, - pub InitialReserve: SIZE_T, - pub CommitRoutine: PRTL_HEAP_COMMIT_ROUTINE, - pub Reserved: [SIZE_T; 2usize], -} -#[test] -fn bindgen_test_layout__RTL_HEAP_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_HEAP_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_HEAP_PARAMETERS>(), - 96usize, - concat!("Size of: ", stringify!(_RTL_HEAP_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_HEAP_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_HEAP_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_PARAMETERS), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegmentReserve) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_PARAMETERS), - "::", - stringify!(SegmentReserve), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SegmentCommit) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_PARAMETERS), - "::", - stringify!(SegmentCommit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeCommitFreeBlockThreshold) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_PARAMETERS), - "::", - stringify!(DeCommitFreeBlockThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeCommitTotalFreeThreshold) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_PARAMETERS), - "::", - stringify!(DeCommitTotalFreeThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumAllocationSize) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_PARAMETERS), - "::", - stringify!(MaximumAllocationSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VirtualMemoryThreshold) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_PARAMETERS), - "::", - stringify!(VirtualMemoryThreshold), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InitialCommit) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_PARAMETERS), - "::", - stringify!(InitialCommit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InitialReserve) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_PARAMETERS), - "::", - stringify!(InitialReserve), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CommitRoutine) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_PARAMETERS), - "::", - stringify!(CommitRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_PARAMETERS), - "::", - stringify!(Reserved), - ), - ); -} -pub type RTL_HEAP_PARAMETERS = _RTL_HEAP_PARAMETERS; -pub type PRTL_HEAP_PARAMETERS = *mut _RTL_HEAP_PARAMETERS; -pub mod _RTL_MEMORY_TYPE { - pub type Type = ::core::ffi::c_int; - pub const MemoryTypePaged: Type = 0; - pub const MemoryTypeNonPaged: Type = 1; - pub const MemoryType64KPage: Type = 2; - pub const MemoryTypeLargePage: Type = 3; - pub const MemoryTypeHugePage: Type = 4; - pub const MemoryTypeCustom: Type = 5; - pub const MemoryTypeMax: Type = 6; -} -pub use self::_RTL_MEMORY_TYPE::Type as RTL_MEMORY_TYPE; -pub type PRTL_MEMORY_TYPE = *mut _RTL_MEMORY_TYPE::Type; -pub mod _HEAP_MEMORY_INFO_CLASS { - pub type Type = ::core::ffi::c_int; - pub const HeapMemoryBasicInformation: Type = 0; -} -pub use self::_HEAP_MEMORY_INFO_CLASS::Type as HEAP_MEMORY_INFO_CLASS; -pub type ALLOCATE_VIRTUAL_MEMORY_EX_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - CallbackContext: HANDLE, - ProcessHandle: HANDLE, - BaseAddress: *mut PVOID, - RegionSize: PSIZE_T, - AllocationType: ULONG, - PageProtection: ULONG, - ExtendedParameters: PMEM_EXTENDED_PARAMETER, - ExtendedParameterCount: ULONG, - ) -> NTSTATUS, ->; -pub type PALLOCATE_VIRTUAL_MEMORY_EX_CALLBACK = ALLOCATE_VIRTUAL_MEMORY_EX_CALLBACK; -pub type FREE_VIRTUAL_MEMORY_EX_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - CallbackContext: HANDLE, - ProcessHandle: HANDLE, - BaseAddress: *mut PVOID, - RegionSize: PSIZE_T, - FreeType: ULONG, - ) -> NTSTATUS, ->; -pub type PFREE_VIRTUAL_MEMORY_EX_CALLBACK = FREE_VIRTUAL_MEMORY_EX_CALLBACK; -pub type QUERY_VIRTUAL_MEMORY_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - CallbackContext: HANDLE, - ProcessHandle: HANDLE, - BaseAddress: PVOID, - MemoryInformationClass: HEAP_MEMORY_INFO_CLASS, - MemoryInformation: PVOID, - MemoryInformationLength: SIZE_T, - ReturnLength: PSIZE_T, - ) -> NTSTATUS, ->; -pub type PQUERY_VIRTUAL_MEMORY_CALLBACK = QUERY_VIRTUAL_MEMORY_CALLBACK; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _RTL_SEGMENT_HEAP_VA_CALLBACKS { - pub CallbackContext: HANDLE, - pub AllocateVirtualMemory: PALLOCATE_VIRTUAL_MEMORY_EX_CALLBACK, - pub FreeVirtualMemory: PFREE_VIRTUAL_MEMORY_EX_CALLBACK, - pub QueryVirtualMemory: PQUERY_VIRTUAL_MEMORY_CALLBACK, -} -#[test] -fn bindgen_test_layout__RTL_SEGMENT_HEAP_VA_CALLBACKS() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_SEGMENT_HEAP_VA_CALLBACKS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_SEGMENT_HEAP_VA_CALLBACKS>(), - 32usize, - concat!("Size of: ", stringify!(_RTL_SEGMENT_HEAP_VA_CALLBACKS)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_SEGMENT_HEAP_VA_CALLBACKS>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_SEGMENT_HEAP_VA_CALLBACKS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CallbackContext) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_VA_CALLBACKS), - "::", - stringify!(CallbackContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocateVirtualMemory) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_VA_CALLBACKS), - "::", - stringify!(AllocateVirtualMemory), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeVirtualMemory) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_VA_CALLBACKS), - "::", - stringify!(FreeVirtualMemory), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryVirtualMemory) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_VA_CALLBACKS), - "::", - stringify!(QueryVirtualMemory), - ), - ); -} -impl Default for _RTL_SEGMENT_HEAP_VA_CALLBACKS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_SEGMENT_HEAP_VA_CALLBACKS = _RTL_SEGMENT_HEAP_VA_CALLBACKS; -pub type PRTL_SEGMENT_HEAP_VA_CALLBACKS = *mut _RTL_SEGMENT_HEAP_VA_CALLBACKS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _RTL_SEGMENT_HEAP_MEMORY_SOURCE { - pub Flags: ULONG, - pub MemoryTypeMask: ULONG, - pub NumaNode: ULONG, - pub __bindgen_anon_1: _RTL_SEGMENT_HEAP_MEMORY_SOURCE__bindgen_ty_1, - pub Reserved: [SIZE_T; 2usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _RTL_SEGMENT_HEAP_MEMORY_SOURCE__bindgen_ty_1 { - pub PartitionHandle: HANDLE, - pub Callbacks: *mut RTL_SEGMENT_HEAP_VA_CALLBACKS, -} -#[test] -fn bindgen_test_layout__RTL_SEGMENT_HEAP_MEMORY_SOURCE__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _RTL_SEGMENT_HEAP_MEMORY_SOURCE__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_SEGMENT_HEAP_MEMORY_SOURCE__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_RTL_SEGMENT_HEAP_MEMORY_SOURCE__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_SEGMENT_HEAP_MEMORY_SOURCE__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_RTL_SEGMENT_HEAP_MEMORY_SOURCE__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PartitionHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_MEMORY_SOURCE__bindgen_ty_1), - "::", - stringify!(PartitionHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Callbacks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_MEMORY_SOURCE__bindgen_ty_1), - "::", - stringify!(Callbacks), - ), - ); -} -impl Default for _RTL_SEGMENT_HEAP_MEMORY_SOURCE__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__RTL_SEGMENT_HEAP_MEMORY_SOURCE() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_SEGMENT_HEAP_MEMORY_SOURCE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_SEGMENT_HEAP_MEMORY_SOURCE>(), - 40usize, - concat!("Size of: ", stringify!(_RTL_SEGMENT_HEAP_MEMORY_SOURCE)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_SEGMENT_HEAP_MEMORY_SOURCE>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_SEGMENT_HEAP_MEMORY_SOURCE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_MEMORY_SOURCE), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MemoryTypeMask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_MEMORY_SOURCE), - "::", - stringify!(MemoryTypeMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumaNode) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_MEMORY_SOURCE), - "::", - stringify!(NumaNode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_MEMORY_SOURCE), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _RTL_SEGMENT_HEAP_MEMORY_SOURCE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_SEGMENT_HEAP_MEMORY_SOURCE = _RTL_SEGMENT_HEAP_MEMORY_SOURCE; -pub type PRTL_SEGMENT_HEAP_MEMORY_SOURCE = *mut _RTL_SEGMENT_HEAP_MEMORY_SOURCE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _RTL_SEGMENT_HEAP_PARAMETERS { - pub Version: USHORT, - pub Size: USHORT, - pub Flags: ULONG, - pub MemorySource: RTL_SEGMENT_HEAP_MEMORY_SOURCE, - pub Reserved: [SIZE_T; 4usize], -} -#[test] -fn bindgen_test_layout__RTL_SEGMENT_HEAP_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_SEGMENT_HEAP_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_SEGMENT_HEAP_PARAMETERS>(), - 80usize, - concat!("Size of: ", stringify!(_RTL_SEGMENT_HEAP_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_SEGMENT_HEAP_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_SEGMENT_HEAP_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_PARAMETERS), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_PARAMETERS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_PARAMETERS), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MemorySource) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_PARAMETERS), - "::", - stringify!(MemorySource), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_RTL_SEGMENT_HEAP_PARAMETERS), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _RTL_SEGMENT_HEAP_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RTL_SEGMENT_HEAP_PARAMETERS = _RTL_SEGMENT_HEAP_PARAMETERS; -pub type PRTL_SEGMENT_HEAP_PARAMETERS = *mut _RTL_SEGMENT_HEAP_PARAMETERS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _RTL_HEAP_MEMORY_LIMIT_DATA { - pub CommitLimitBytes: SIZE_T, - pub CommitLimitFailureCode: ULONG_PTR, - pub MaxAllocationSizeBytes: SIZE_T, - pub AllocationLimitFailureCode: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__RTL_HEAP_MEMORY_LIMIT_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_HEAP_MEMORY_LIMIT_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_HEAP_MEMORY_LIMIT_DATA>(), - 32usize, - concat!("Size of: ", stringify!(_RTL_HEAP_MEMORY_LIMIT_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_HEAP_MEMORY_LIMIT_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_HEAP_MEMORY_LIMIT_DATA)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CommitLimitBytes) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_MEMORY_LIMIT_DATA), - "::", - stringify!(CommitLimitBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CommitLimitFailureCode) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_MEMORY_LIMIT_DATA), - "::", - stringify!(CommitLimitFailureCode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxAllocationSizeBytes) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_MEMORY_LIMIT_DATA), - "::", - stringify!(MaxAllocationSizeBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocationLimitFailureCode) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_MEMORY_LIMIT_DATA), - "::", - stringify!(AllocationLimitFailureCode), - ), - ); -} -pub type RTL_HEAP_MEMORY_LIMIT_DATA = _RTL_HEAP_MEMORY_LIMIT_DATA; -pub type PRTL_HEAP_MEMORY_LIMIT_DATA = *mut _RTL_HEAP_MEMORY_LIMIT_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _RTL_HEAP_MEMORY_LIMIT_INFO { - pub Version: ULONG, - pub Data: RTL_HEAP_MEMORY_LIMIT_DATA, -} -#[test] -fn bindgen_test_layout__RTL_HEAP_MEMORY_LIMIT_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_RTL_HEAP_MEMORY_LIMIT_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RTL_HEAP_MEMORY_LIMIT_INFO>(), - 40usize, - concat!("Size of: ", stringify!(_RTL_HEAP_MEMORY_LIMIT_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_RTL_HEAP_MEMORY_LIMIT_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_RTL_HEAP_MEMORY_LIMIT_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_MEMORY_LIMIT_INFO), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_RTL_HEAP_MEMORY_LIMIT_INFO), - "::", - stringify!(Data), - ), - ); -} -pub type RTL_HEAP_MEMORY_LIMIT_INFO = _RTL_HEAP_MEMORY_LIMIT_INFO; -pub type PRTL_HEAP_MEMORY_LIMIT_INFO = *mut _RTL_HEAP_MEMORY_LIMIT_INFO; -pub type PRTL_ALLOCATE_STRING_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(arg1: SIZE_T) -> PVOID, ->; -pub type PRTL_REALLOCATE_STRING_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(arg1: SIZE_T, arg2: PVOID) -> PVOID, ->; -pub type PRTL_FREE_STRING_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(arg1: PVOID), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _GENERATE_NAME_CONTEXT { - pub Checksum: USHORT, - pub ChecksumInserted: BOOLEAN, - pub NameLength: UCHAR, - pub NameBuffer: [WCHAR; 8usize], - pub ExtensionLength: ULONG, - pub ExtensionBuffer: [WCHAR; 4usize], - pub LastIndexValue: ULONG, -} -#[test] -fn bindgen_test_layout__GENERATE_NAME_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_GENERATE_NAME_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GENERATE_NAME_CONTEXT>(), - 36usize, - concat!("Size of: ", stringify!(_GENERATE_NAME_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_GENERATE_NAME_CONTEXT>(), - 4usize, - concat!("Alignment of ", stringify!(_GENERATE_NAME_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Checksum) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GENERATE_NAME_CONTEXT), - "::", - stringify!(Checksum), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ChecksumInserted) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_GENERATE_NAME_CONTEXT), - "::", - stringify!(ChecksumInserted), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_GENERATE_NAME_CONTEXT), - "::", - stringify!(NameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameBuffer) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_GENERATE_NAME_CONTEXT), - "::", - stringify!(NameBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtensionLength) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_GENERATE_NAME_CONTEXT), - "::", - stringify!(ExtensionLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtensionBuffer) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_GENERATE_NAME_CONTEXT), - "::", - stringify!(ExtensionBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastIndexValue) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GENERATE_NAME_CONTEXT), - "::", - stringify!(LastIndexValue), - ), - ); -} -pub type GENERATE_NAME_CONTEXT = _GENERATE_NAME_CONTEXT; -pub type PGENERATE_NAME_CONTEXT = *mut GENERATE_NAME_CONTEXT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PREFIX_TABLE_ENTRY { - pub NodeTypeCode: CSHORT, - pub NameLength: CSHORT, - pub NextPrefixTree: *mut _PREFIX_TABLE_ENTRY, - pub Links: RTL_SPLAY_LINKS, - pub Prefix: PSTRING, -} -#[test] -fn bindgen_test_layout__PREFIX_TABLE_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_PREFIX_TABLE_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PREFIX_TABLE_ENTRY>(), - 48usize, - concat!("Size of: ", stringify!(_PREFIX_TABLE_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_PREFIX_TABLE_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_PREFIX_TABLE_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NodeTypeCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PREFIX_TABLE_ENTRY), - "::", - stringify!(NodeTypeCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PREFIX_TABLE_ENTRY), - "::", - stringify!(NameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextPrefixTree) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PREFIX_TABLE_ENTRY), - "::", - stringify!(NextPrefixTree), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Links) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PREFIX_TABLE_ENTRY), - "::", - stringify!(Links), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Prefix) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PREFIX_TABLE_ENTRY), - "::", - stringify!(Prefix), - ), - ); -} -impl Default for _PREFIX_TABLE_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PREFIX_TABLE_ENTRY = _PREFIX_TABLE_ENTRY; -pub type PPREFIX_TABLE_ENTRY = *mut PREFIX_TABLE_ENTRY; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PREFIX_TABLE { - pub NodeTypeCode: CSHORT, - pub NameLength: CSHORT, - pub NextPrefixTree: PPREFIX_TABLE_ENTRY, -} -#[test] -fn bindgen_test_layout__PREFIX_TABLE() { - const UNINIT: ::core::mem::MaybeUninit<_PREFIX_TABLE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PREFIX_TABLE>(), - 16usize, - concat!("Size of: ", stringify!(_PREFIX_TABLE)), - ); - assert_eq!( - ::core::mem::align_of::<_PREFIX_TABLE>(), - 8usize, - concat!("Alignment of ", stringify!(_PREFIX_TABLE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NodeTypeCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PREFIX_TABLE), - "::", - stringify!(NodeTypeCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PREFIX_TABLE), - "::", - stringify!(NameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextPrefixTree) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PREFIX_TABLE), - "::", - stringify!(NextPrefixTree), - ), - ); -} -impl Default for _PREFIX_TABLE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PREFIX_TABLE = _PREFIX_TABLE; -pub type PPREFIX_TABLE = *mut PREFIX_TABLE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _UNICODE_PREFIX_TABLE_ENTRY { - pub NodeTypeCode: CSHORT, - pub NameLength: CSHORT, - pub NextPrefixTree: *mut _UNICODE_PREFIX_TABLE_ENTRY, - pub CaseMatch: *mut _UNICODE_PREFIX_TABLE_ENTRY, - pub Links: RTL_SPLAY_LINKS, - pub Prefix: PUNICODE_STRING, -} -#[test] -fn bindgen_test_layout__UNICODE_PREFIX_TABLE_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_UNICODE_PREFIX_TABLE_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_UNICODE_PREFIX_TABLE_ENTRY>(), - 56usize, - concat!("Size of: ", stringify!(_UNICODE_PREFIX_TABLE_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_UNICODE_PREFIX_TABLE_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_UNICODE_PREFIX_TABLE_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NodeTypeCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_UNICODE_PREFIX_TABLE_ENTRY), - "::", - stringify!(NodeTypeCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_UNICODE_PREFIX_TABLE_ENTRY), - "::", - stringify!(NameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextPrefixTree) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_UNICODE_PREFIX_TABLE_ENTRY), - "::", - stringify!(NextPrefixTree), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CaseMatch) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_UNICODE_PREFIX_TABLE_ENTRY), - "::", - stringify!(CaseMatch), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Links) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_UNICODE_PREFIX_TABLE_ENTRY), - "::", - stringify!(Links), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Prefix) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_UNICODE_PREFIX_TABLE_ENTRY), - "::", - stringify!(Prefix), - ), - ); -} -impl Default for _UNICODE_PREFIX_TABLE_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type UNICODE_PREFIX_TABLE_ENTRY = _UNICODE_PREFIX_TABLE_ENTRY; -pub type PUNICODE_PREFIX_TABLE_ENTRY = *mut UNICODE_PREFIX_TABLE_ENTRY; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _UNICODE_PREFIX_TABLE { - pub NodeTypeCode: CSHORT, - pub NameLength: CSHORT, - pub NextPrefixTree: PUNICODE_PREFIX_TABLE_ENTRY, - pub LastNextEntry: PUNICODE_PREFIX_TABLE_ENTRY, -} -#[test] -fn bindgen_test_layout__UNICODE_PREFIX_TABLE() { - const UNINIT: ::core::mem::MaybeUninit<_UNICODE_PREFIX_TABLE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_UNICODE_PREFIX_TABLE>(), - 24usize, - concat!("Size of: ", stringify!(_UNICODE_PREFIX_TABLE)), - ); - assert_eq!( - ::core::mem::align_of::<_UNICODE_PREFIX_TABLE>(), - 8usize, - concat!("Alignment of ", stringify!(_UNICODE_PREFIX_TABLE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NodeTypeCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_UNICODE_PREFIX_TABLE), - "::", - stringify!(NodeTypeCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_UNICODE_PREFIX_TABLE), - "::", - stringify!(NameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextPrefixTree) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_UNICODE_PREFIX_TABLE), - "::", - stringify!(NextPrefixTree), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastNextEntry) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_UNICODE_PREFIX_TABLE), - "::", - stringify!(LastNextEntry), - ), - ); -} -impl Default for _UNICODE_PREFIX_TABLE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type UNICODE_PREFIX_TABLE = _UNICODE_PREFIX_TABLE; -pub type PUNICODE_PREFIX_TABLE = *mut UNICODE_PREFIX_TABLE; -pub type COMPRESSED_DATA_INFO = _COMPRESSED_DATA_INFO; -pub type PCOMPRESSED_DATA_INFO = *mut COMPRESSED_DATA_INFO; -pub type LSA_OPERATIONAL_MODE = ULONG; -pub type PLSA_OPERATIONAL_MODE = *mut ULONG; -pub mod _SECURITY_LOGON_TYPE { - pub type Type = ::core::ffi::c_int; - pub const UndefinedLogonType: Type = 0; - pub const Interactive: Type = 2; - pub const Network: Type = 3; - pub const Batch: Type = 4; - pub const Service: Type = 5; - pub const Proxy: Type = 6; - pub const Unlock: Type = 7; - pub const NetworkCleartext: Type = 8; - pub const NewCredentials: Type = 9; - pub const RemoteInteractive: Type = 10; - pub const CachedInteractive: Type = 11; - pub const CachedRemoteInteractive: Type = 12; - pub const CachedUnlock: Type = 13; -} -pub use self::_SECURITY_LOGON_TYPE::Type as SECURITY_LOGON_TYPE; -pub type PSECURITY_LOGON_TYPE = *mut _SECURITY_LOGON_TYPE::Type; -pub mod _MSV1_0_LOGON_SUBMIT_TYPE { - pub type Type = ::core::ffi::c_int; - pub const MsV1_0InteractiveLogon: Type = 2; - pub const MsV1_0Lm20Logon: Type = 3; - pub const MsV1_0NetworkLogon: Type = 4; - pub const MsV1_0SubAuthLogon: Type = 5; - pub const MsV1_0WorkstationUnlockLogon: Type = 7; - pub const MsV1_0S4ULogon: Type = 12; - pub const MsV1_0VirtualLogon: Type = 82; - pub const MsV1_0NoElevationLogon: Type = 83; - pub const MsV1_0LuidLogon: Type = 84; -} -pub use self::_MSV1_0_LOGON_SUBMIT_TYPE::Type as MSV1_0_LOGON_SUBMIT_TYPE; -pub type PMSV1_0_LOGON_SUBMIT_TYPE = *mut _MSV1_0_LOGON_SUBMIT_TYPE::Type; -pub mod _MSV1_0_PROFILE_BUFFER_TYPE { - pub type Type = ::core::ffi::c_int; - pub const MsV1_0InteractiveProfile: Type = 2; - pub const MsV1_0Lm20LogonProfile: Type = 3; - pub const MsV1_0SmartCardProfile: Type = 4; -} -pub use self::_MSV1_0_PROFILE_BUFFER_TYPE::Type as MSV1_0_PROFILE_BUFFER_TYPE; -pub type PMSV1_0_PROFILE_BUFFER_TYPE = *mut _MSV1_0_PROFILE_BUFFER_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_INTERACTIVE_LOGON { - pub MessageType: MSV1_0_LOGON_SUBMIT_TYPE, - pub LogonDomainName: UNICODE_STRING, - pub UserName: UNICODE_STRING, - pub Password: UNICODE_STRING, -} -#[test] -fn bindgen_test_layout__MSV1_0_INTERACTIVE_LOGON() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_INTERACTIVE_LOGON> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_INTERACTIVE_LOGON>(), - 56usize, - concat!("Size of: ", stringify!(_MSV1_0_INTERACTIVE_LOGON)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_INTERACTIVE_LOGON>(), - 8usize, - concat!("Alignment of ", stringify!(_MSV1_0_INTERACTIVE_LOGON)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_LOGON), - "::", - stringify!(MessageType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonDomainName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_LOGON), - "::", - stringify!(LogonDomainName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserName) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_LOGON), - "::", - stringify!(UserName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Password) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_LOGON), - "::", - stringify!(Password), - ), - ); -} -impl Default for _MSV1_0_INTERACTIVE_LOGON { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_INTERACTIVE_LOGON = _MSV1_0_INTERACTIVE_LOGON; -pub type PMSV1_0_INTERACTIVE_LOGON = *mut _MSV1_0_INTERACTIVE_LOGON; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _MSV1_0_INTERACTIVE_PROFILE { - pub MessageType: MSV1_0_PROFILE_BUFFER_TYPE, - pub LogonCount: USHORT, - pub BadPasswordCount: USHORT, - pub LogonTime: LARGE_INTEGER, - pub LogoffTime: LARGE_INTEGER, - pub KickOffTime: LARGE_INTEGER, - pub PasswordLastSet: LARGE_INTEGER, - pub PasswordCanChange: LARGE_INTEGER, - pub PasswordMustChange: LARGE_INTEGER, - pub LogonScript: UNICODE_STRING, - pub HomeDirectory: UNICODE_STRING, - pub FullName: UNICODE_STRING, - pub ProfilePath: UNICODE_STRING, - pub HomeDirectoryDrive: UNICODE_STRING, - pub LogonServer: UNICODE_STRING, - pub UserFlags: ULONG, -} -#[test] -fn bindgen_test_layout__MSV1_0_INTERACTIVE_PROFILE() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_INTERACTIVE_PROFILE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_INTERACTIVE_PROFILE>(), - 160usize, - concat!("Size of: ", stringify!(_MSV1_0_INTERACTIVE_PROFILE)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_INTERACTIVE_PROFILE>(), - 8usize, - concat!("Alignment of ", stringify!(_MSV1_0_INTERACTIVE_PROFILE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(MessageType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(LogonCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BadPasswordCount) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(BadPasswordCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(LogonTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogoffTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(LogoffTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KickOffTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(KickOffTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PasswordLastSet) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(PasswordLastSet), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PasswordCanChange) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(PasswordCanChange), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PasswordMustChange) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(PasswordMustChange), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonScript) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(LogonScript), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HomeDirectory) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(HomeDirectory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FullName) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(FullName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProfilePath) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(ProfilePath), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HomeDirectoryDrive) as usize - ptr as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(HomeDirectoryDrive), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonServer) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(LogonServer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserFlags) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_INTERACTIVE_PROFILE), - "::", - stringify!(UserFlags), - ), - ); -} -impl Default for _MSV1_0_INTERACTIVE_PROFILE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_INTERACTIVE_PROFILE = _MSV1_0_INTERACTIVE_PROFILE; -pub type PMSV1_0_INTERACTIVE_PROFILE = *mut _MSV1_0_INTERACTIVE_PROFILE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_LM20_LOGON { - pub MessageType: MSV1_0_LOGON_SUBMIT_TYPE, - pub LogonDomainName: UNICODE_STRING, - pub UserName: UNICODE_STRING, - pub Workstation: UNICODE_STRING, - pub ChallengeToClient: [UCHAR; 8usize], - pub CaseSensitiveChallengeResponse: STRING, - pub CaseInsensitiveChallengeResponse: STRING, - pub ParameterControl: ULONG, -} -#[test] -fn bindgen_test_layout__MSV1_0_LM20_LOGON() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_LM20_LOGON> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_LM20_LOGON>(), - 104usize, - concat!("Size of: ", stringify!(_MSV1_0_LM20_LOGON)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_LM20_LOGON>(), - 8usize, - concat!("Alignment of ", stringify!(_MSV1_0_LM20_LOGON)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON), - "::", - stringify!(MessageType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonDomainName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON), - "::", - stringify!(LogonDomainName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserName) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON), - "::", - stringify!(UserName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Workstation) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON), - "::", - stringify!(Workstation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ChallengeToClient) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON), - "::", - stringify!(ChallengeToClient), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CaseSensitiveChallengeResponse) as usize - - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON), - "::", - stringify!(CaseSensitiveChallengeResponse), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CaseInsensitiveChallengeResponse) as usize - - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON), - "::", - stringify!(CaseInsensitiveChallengeResponse), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ParameterControl) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON), - "::", - stringify!(ParameterControl), - ), - ); -} -impl Default for _MSV1_0_LM20_LOGON { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_LM20_LOGON = _MSV1_0_LM20_LOGON; -pub type PMSV1_0_LM20_LOGON = *mut _MSV1_0_LM20_LOGON; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_SUBAUTH_LOGON { - pub MessageType: MSV1_0_LOGON_SUBMIT_TYPE, - pub LogonDomainName: UNICODE_STRING, - pub UserName: UNICODE_STRING, - pub Workstation: UNICODE_STRING, - pub ChallengeToClient: [UCHAR; 8usize], - pub AuthenticationInfo1: STRING, - pub AuthenticationInfo2: STRING, - pub ParameterControl: ULONG, - pub SubAuthPackageId: ULONG, -} -#[test] -fn bindgen_test_layout__MSV1_0_SUBAUTH_LOGON() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_SUBAUTH_LOGON> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_SUBAUTH_LOGON>(), - 104usize, - concat!("Size of: ", stringify!(_MSV1_0_SUBAUTH_LOGON)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_SUBAUTH_LOGON>(), - 8usize, - concat!("Alignment of ", stringify!(_MSV1_0_SUBAUTH_LOGON)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUBAUTH_LOGON), - "::", - stringify!(MessageType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonDomainName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUBAUTH_LOGON), - "::", - stringify!(LogonDomainName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserName) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUBAUTH_LOGON), - "::", - stringify!(UserName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Workstation) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUBAUTH_LOGON), - "::", - stringify!(Workstation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ChallengeToClient) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUBAUTH_LOGON), - "::", - stringify!(ChallengeToClient), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AuthenticationInfo1) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUBAUTH_LOGON), - "::", - stringify!(AuthenticationInfo1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AuthenticationInfo2) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUBAUTH_LOGON), - "::", - stringify!(AuthenticationInfo2), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ParameterControl) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUBAUTH_LOGON), - "::", - stringify!(ParameterControl), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SubAuthPackageId) as usize - ptr as usize - }, - 100usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUBAUTH_LOGON), - "::", - stringify!(SubAuthPackageId), - ), - ); -} -impl Default for _MSV1_0_SUBAUTH_LOGON { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_SUBAUTH_LOGON = _MSV1_0_SUBAUTH_LOGON; -pub type PMSV1_0_SUBAUTH_LOGON = *mut _MSV1_0_SUBAUTH_LOGON; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_S4U_LOGON { - pub MessageType: MSV1_0_LOGON_SUBMIT_TYPE, - pub Flags: ULONG, - pub UserPrincipalName: UNICODE_STRING, - pub DomainName: UNICODE_STRING, -} -#[test] -fn bindgen_test_layout__MSV1_0_S4U_LOGON() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_S4U_LOGON> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_S4U_LOGON>(), - 40usize, - concat!("Size of: ", stringify!(_MSV1_0_S4U_LOGON)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_S4U_LOGON>(), - 8usize, - concat!("Alignment of ", stringify!(_MSV1_0_S4U_LOGON)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_S4U_LOGON), - "::", - stringify!(MessageType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_S4U_LOGON), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserPrincipalName) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_S4U_LOGON), - "::", - stringify!(UserPrincipalName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DomainName) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_S4U_LOGON), - "::", - stringify!(DomainName), - ), - ); -} -impl Default for _MSV1_0_S4U_LOGON { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_S4U_LOGON = _MSV1_0_S4U_LOGON; -pub type PMSV1_0_S4U_LOGON = *mut _MSV1_0_S4U_LOGON; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _MSV1_0_LM20_LOGON_PROFILE { - pub MessageType: MSV1_0_PROFILE_BUFFER_TYPE, - pub KickOffTime: LARGE_INTEGER, - pub LogoffTime: LARGE_INTEGER, - pub UserFlags: ULONG, - pub UserSessionKey: [UCHAR; 16usize], - pub LogonDomainName: UNICODE_STRING, - pub LanmanSessionKey: [UCHAR; 8usize], - pub LogonServer: UNICODE_STRING, - pub UserParameters: UNICODE_STRING, -} -#[test] -fn bindgen_test_layout__MSV1_0_LM20_LOGON_PROFILE() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_LM20_LOGON_PROFILE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_LM20_LOGON_PROFILE>(), - 104usize, - concat!("Size of: ", stringify!(_MSV1_0_LM20_LOGON_PROFILE)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_LM20_LOGON_PROFILE>(), - 8usize, - concat!("Alignment of ", stringify!(_MSV1_0_LM20_LOGON_PROFILE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON_PROFILE), - "::", - stringify!(MessageType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KickOffTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON_PROFILE), - "::", - stringify!(KickOffTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogoffTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON_PROFILE), - "::", - stringify!(LogoffTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserFlags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON_PROFILE), - "::", - stringify!(UserFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserSessionKey) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON_PROFILE), - "::", - stringify!(UserSessionKey), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonDomainName) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON_PROFILE), - "::", - stringify!(LogonDomainName), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LanmanSessionKey) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON_PROFILE), - "::", - stringify!(LanmanSessionKey), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonServer) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON_PROFILE), - "::", - stringify!(LogonServer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserParameters) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_LOGON_PROFILE), - "::", - stringify!(UserParameters), - ), - ); -} -impl Default for _MSV1_0_LM20_LOGON_PROFILE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_LM20_LOGON_PROFILE = _MSV1_0_LM20_LOGON_PROFILE; -pub type PMSV1_0_LM20_LOGON_PROFILE = *mut _MSV1_0_LM20_LOGON_PROFILE; -pub mod _MSV1_0_CREDENTIAL_KEY_TYPE { - pub type Type = ::core::ffi::c_int; - pub const InvalidCredKey: Type = 0; - pub const DeprecatedIUMCredKey: Type = 1; - pub const DomainUserCredKey: Type = 2; - pub const LocalUserCredKey: Type = 3; - pub const ExternallySuppliedCredKey: Type = 4; -} -pub use self::_MSV1_0_CREDENTIAL_KEY_TYPE::Type as MSV1_0_CREDENTIAL_KEY_TYPE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MSV1_0_CREDENTIAL_KEY { - pub Data: [UCHAR; 20usize], -} -#[test] -fn bindgen_test_layout__MSV1_0_CREDENTIAL_KEY() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_CREDENTIAL_KEY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_CREDENTIAL_KEY>(), - 20usize, - concat!("Size of: ", stringify!(_MSV1_0_CREDENTIAL_KEY)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_CREDENTIAL_KEY>(), - 1usize, - concat!("Alignment of ", stringify!(_MSV1_0_CREDENTIAL_KEY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_CREDENTIAL_KEY), - "::", - stringify!(Data), - ), - ); -} -pub type MSV1_0_CREDENTIAL_KEY = _MSV1_0_CREDENTIAL_KEY; -pub type PMSV1_0_CREDENTIAL_KEY = *mut _MSV1_0_CREDENTIAL_KEY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MSV1_0_SUPPLEMENTAL_CREDENTIAL { - pub Version: ULONG, - pub Flags: ULONG, - pub LmPassword: [UCHAR; 16usize], - pub NtPassword: [UCHAR; 16usize], -} -#[test] -fn bindgen_test_layout__MSV1_0_SUPPLEMENTAL_CREDENTIAL() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_SUPPLEMENTAL_CREDENTIAL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_SUPPLEMENTAL_CREDENTIAL>(), - 40usize, - concat!("Size of: ", stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_SUPPLEMENTAL_CREDENTIAL>(), - 4usize, - concat!("Alignment of ", stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LmPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL), - "::", - stringify!(LmPassword), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NtPassword) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL), - "::", - stringify!(NtPassword), - ), - ); -} -pub type MSV1_0_SUPPLEMENTAL_CREDENTIAL = _MSV1_0_SUPPLEMENTAL_CREDENTIAL; -pub type PMSV1_0_SUPPLEMENTAL_CREDENTIAL = *mut _MSV1_0_SUPPLEMENTAL_CREDENTIAL; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2 { - pub Version: ULONG, - pub Flags: ULONG, - pub NtPassword: [UCHAR; 16usize], - pub CredentialKey: MSV1_0_CREDENTIAL_KEY, -} -#[test] -fn bindgen_test_layout__MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2>(), - 44usize, - concat!("Size of: ", stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2>(), - 4usize, - concat!("Alignment of ", stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NtPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2), - "::", - stringify!(NtPassword), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CredentialKey) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2), - "::", - stringify!(CredentialKey), - ), - ); -} -pub type MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2 = _MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2; -pub type PMSV1_0_SUPPLEMENTAL_CREDENTIAL_V2 = *mut _MSV1_0_SUPPLEMENTAL_CREDENTIAL_V2; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3 { - pub Version: ULONG, - pub Flags: ULONG, - pub CredentialKeyType: MSV1_0_CREDENTIAL_KEY_TYPE, - pub NtPassword: [UCHAR; 16usize], - pub CredentialKey: MSV1_0_CREDENTIAL_KEY, - pub ShaPassword: [UCHAR; 20usize], -} -#[test] -fn bindgen_test_layout__MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3>(), - 68usize, - concat!("Size of: ", stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3>(), - 4usize, - concat!("Alignment of ", stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CredentialKeyType) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3), - "::", - stringify!(CredentialKeyType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NtPassword) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3), - "::", - stringify!(NtPassword), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CredentialKey) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3), - "::", - stringify!(CredentialKey), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShaPassword) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3), - "::", - stringify!(ShaPassword), - ), - ); -} -impl Default for _MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3 = _MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3; -pub type PMSV1_0_SUPPLEMENTAL_CREDENTIAL_V3 = *mut _MSV1_0_SUPPLEMENTAL_CREDENTIAL_V3; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL { - pub Version: ULONG, - pub EncryptedCredsSize: ULONG, - pub EncryptedCreds: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL>(), - 12usize, - concat!("Size of: ", stringify!(_MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL>(), - 4usize, - concat!("Alignment of ", stringify!(_MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EncryptedCredsSize) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL), - "::", - stringify!(EncryptedCredsSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EncryptedCreds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL), - "::", - stringify!(EncryptedCreds), - ), - ); -} -pub type MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL = _MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL; -pub type PMSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL = *mut _MSV1_0_IUM_SUPPLEMENTAL_CREDENTIAL; -#[repr(C, packed)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL { - pub Version: ULONG, - pub Flags: ULONG, - pub CredentialKey: MSV1_0_CREDENTIAL_KEY, - pub CredentialKeyType: MSV1_0_CREDENTIAL_KEY_TYPE, - pub EncryptedCredsSize: ULONG, - pub EncryptedCreds: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL>(), - 37usize, - concat!("Size of: ", stringify!(_MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL>(), - 1usize, - concat!("Alignment of ", stringify!(_MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CredentialKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL), - "::", - stringify!(CredentialKey), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CredentialKeyType) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL), - "::", - stringify!(CredentialKeyType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EncryptedCredsSize) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL), - "::", - stringify!(EncryptedCredsSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EncryptedCreds) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL), - "::", - stringify!(EncryptedCreds), - ), - ); -} -impl Default for _MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL = _MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL; -pub type PMSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL = *mut _MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MSV1_0_NTLM3_RESPONSE { - pub Response: [UCHAR; 16usize], - pub RespType: UCHAR, - pub HiRespType: UCHAR, - pub Flags: USHORT, - pub MsgWord: ULONG, - pub TimeStamp: ULONGLONG, - pub ChallengeFromClient: [UCHAR; 8usize], - pub AvPairsOff: ULONG, - pub Buffer: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__MSV1_0_NTLM3_RESPONSE() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_NTLM3_RESPONSE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_NTLM3_RESPONSE>(), - 48usize, - concat!("Size of: ", stringify!(_MSV1_0_NTLM3_RESPONSE)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_NTLM3_RESPONSE>(), - 8usize, - concat!("Alignment of ", stringify!(_MSV1_0_NTLM3_RESPONSE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Response) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_NTLM3_RESPONSE), - "::", - stringify!(Response), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RespType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_NTLM3_RESPONSE), - "::", - stringify!(RespType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HiRespType) as usize - ptr as usize }, - 17usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_NTLM3_RESPONSE), - "::", - stringify!(HiRespType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_NTLM3_RESPONSE), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MsgWord) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_NTLM3_RESPONSE), - "::", - stringify!(MsgWord), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimeStamp) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_NTLM3_RESPONSE), - "::", - stringify!(TimeStamp), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ChallengeFromClient) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_NTLM3_RESPONSE), - "::", - stringify!(ChallengeFromClient), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AvPairsOff) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_NTLM3_RESPONSE), - "::", - stringify!(AvPairsOff), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_NTLM3_RESPONSE), - "::", - stringify!(Buffer), - ), - ); -} -pub type MSV1_0_NTLM3_RESPONSE = _MSV1_0_NTLM3_RESPONSE; -pub type PMSV1_0_NTLM3_RESPONSE = *mut _MSV1_0_NTLM3_RESPONSE; -pub mod MSV1_0_AVID { - pub type Type = ::core::ffi::c_int; - pub const MsvAvEOL: Type = 0; - pub const MsvAvNbComputerName: Type = 1; - pub const MsvAvNbDomainName: Type = 2; - pub const MsvAvDnsComputerName: Type = 3; - pub const MsvAvDnsDomainName: Type = 4; - pub const MsvAvDnsTreeName: Type = 5; - pub const MsvAvFlags: Type = 6; - pub const MsvAvTimestamp: Type = 7; - pub const MsvAvRestrictions: Type = 8; - pub const MsvAvTargetName: Type = 9; - pub const MsvAvChannelBindings: Type = 10; -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MSV1_0_AV_PAIR { - pub AvId: USHORT, - pub AvLen: USHORT, -} -#[test] -fn bindgen_test_layout__MSV1_0_AV_PAIR() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_AV_PAIR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_AV_PAIR>(), - 4usize, - concat!("Size of: ", stringify!(_MSV1_0_AV_PAIR)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_AV_PAIR>(), - 2usize, - concat!("Alignment of ", stringify!(_MSV1_0_AV_PAIR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AvId) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_MSV1_0_AV_PAIR), "::", stringify!(AvId)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AvLen) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_AV_PAIR), - "::", - stringify!(AvLen), - ), - ); -} -pub type MSV1_0_AV_PAIR = _MSV1_0_AV_PAIR; -pub type PMSV1_0_AV_PAIR = *mut _MSV1_0_AV_PAIR; -pub mod _MSV1_0_PROTOCOL_MESSAGE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const MsV1_0Lm20ChallengeRequest: Type = 0; - pub const MsV1_0Lm20GetChallengeResponse: Type = 1; - pub const MsV1_0EnumerateUsers: Type = 2; - pub const MsV1_0GetUserInfo: Type = 3; - pub const MsV1_0ReLogonUsers: Type = 4; - pub const MsV1_0ChangePassword: Type = 5; - pub const MsV1_0ChangeCachedPassword: Type = 6; - pub const MsV1_0GenericPassthrough: Type = 7; - pub const MsV1_0CacheLogon: Type = 8; - pub const MsV1_0SubAuth: Type = 9; - pub const MsV1_0DeriveCredential: Type = 10; - pub const MsV1_0CacheLookup: Type = 11; - pub const MsV1_0SetProcessOption: Type = 12; - pub const MsV1_0ConfigLocalAliases: Type = 13; - pub const MsV1_0ClearCachedCredentials: Type = 14; - pub const MsV1_0LookupToken: Type = 15; - pub const MsV1_0ValidateAuth: Type = 16; - pub const MsV1_0CacheLookupEx: Type = 17; - pub const MsV1_0GetCredentialKey: Type = 18; - pub const MsV1_0SetThreadOption: Type = 19; - pub const MsV1_0DecryptDpapiMasterKey: Type = 20; - pub const MsV1_0GetStrongCredentialKey: Type = 21; - pub const MsV1_0TransferCred: Type = 22; - pub const MsV1_0ProvisionTbal: Type = 23; - pub const MsV1_0DeleteTbalSecrets: Type = 24; -} -pub use self::_MSV1_0_PROTOCOL_MESSAGE_TYPE::Type as MSV1_0_PROTOCOL_MESSAGE_TYPE; -pub type PMSV1_0_PROTOCOL_MESSAGE_TYPE = *mut _MSV1_0_PROTOCOL_MESSAGE_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_LM20_CHALLENGE_REQUEST { - pub MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE, -} -#[test] -fn bindgen_test_layout__MSV1_0_LM20_CHALLENGE_REQUEST() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_LM20_CHALLENGE_REQUEST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_LM20_CHALLENGE_REQUEST>(), - 4usize, - concat!("Size of: ", stringify!(_MSV1_0_LM20_CHALLENGE_REQUEST)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_LM20_CHALLENGE_REQUEST>(), - 4usize, - concat!("Alignment of ", stringify!(_MSV1_0_LM20_CHALLENGE_REQUEST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_CHALLENGE_REQUEST), - "::", - stringify!(MessageType), - ), - ); -} -impl Default for _MSV1_0_LM20_CHALLENGE_REQUEST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_LM20_CHALLENGE_REQUEST = _MSV1_0_LM20_CHALLENGE_REQUEST; -pub type PMSV1_0_LM20_CHALLENGE_REQUEST = *mut _MSV1_0_LM20_CHALLENGE_REQUEST; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_LM20_CHALLENGE_RESPONSE { - pub MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE, - pub ChallengeToClient: [UCHAR; 8usize], -} -#[test] -fn bindgen_test_layout__MSV1_0_LM20_CHALLENGE_RESPONSE() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_LM20_CHALLENGE_RESPONSE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_LM20_CHALLENGE_RESPONSE>(), - 12usize, - concat!("Size of: ", stringify!(_MSV1_0_LM20_CHALLENGE_RESPONSE)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_LM20_CHALLENGE_RESPONSE>(), - 4usize, - concat!("Alignment of ", stringify!(_MSV1_0_LM20_CHALLENGE_RESPONSE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_CHALLENGE_RESPONSE), - "::", - stringify!(MessageType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ChallengeToClient) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_LM20_CHALLENGE_RESPONSE), - "::", - stringify!(ChallengeToClient), - ), - ); -} -impl Default for _MSV1_0_LM20_CHALLENGE_RESPONSE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_LM20_CHALLENGE_RESPONSE = _MSV1_0_LM20_CHALLENGE_RESPONSE; -pub type PMSV1_0_LM20_CHALLENGE_RESPONSE = *mut _MSV1_0_LM20_CHALLENGE_RESPONSE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_GETCHALLENRESP_REQUEST_V1 { - pub MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE, - pub ParameterControl: ULONG, - pub LogonId: LUID, - pub Password: UNICODE_STRING, - pub ChallengeToClient: [UCHAR; 8usize], -} -#[test] -fn bindgen_test_layout__MSV1_0_GETCHALLENRESP_REQUEST_V1() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_GETCHALLENRESP_REQUEST_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_GETCHALLENRESP_REQUEST_V1>(), - 40usize, - concat!("Size of: ", stringify!(_MSV1_0_GETCHALLENRESP_REQUEST_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_GETCHALLENRESP_REQUEST_V1>(), - 8usize, - concat!("Alignment of ", stringify!(_MSV1_0_GETCHALLENRESP_REQUEST_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_REQUEST_V1), - "::", - stringify!(MessageType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ParameterControl) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_REQUEST_V1), - "::", - stringify!(ParameterControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_REQUEST_V1), - "::", - stringify!(LogonId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Password) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_REQUEST_V1), - "::", - stringify!(Password), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ChallengeToClient) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_REQUEST_V1), - "::", - stringify!(ChallengeToClient), - ), - ); -} -impl Default for _MSV1_0_GETCHALLENRESP_REQUEST_V1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_GETCHALLENRESP_REQUEST_V1 = _MSV1_0_GETCHALLENRESP_REQUEST_V1; -pub type PMSV1_0_GETCHALLENRESP_REQUEST_V1 = *mut _MSV1_0_GETCHALLENRESP_REQUEST_V1; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_GETCHALLENRESP_REQUEST { - pub MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE, - pub ParameterControl: ULONG, - pub LogonId: LUID, - pub Password: UNICODE_STRING, - pub ChallengeToClient: [UCHAR; 8usize], - pub UserName: UNICODE_STRING, - pub LogonDomainName: UNICODE_STRING, - pub ServerName: UNICODE_STRING, -} -#[test] -fn bindgen_test_layout__MSV1_0_GETCHALLENRESP_REQUEST() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_GETCHALLENRESP_REQUEST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_GETCHALLENRESP_REQUEST>(), - 88usize, - concat!("Size of: ", stringify!(_MSV1_0_GETCHALLENRESP_REQUEST)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_GETCHALLENRESP_REQUEST>(), - 8usize, - concat!("Alignment of ", stringify!(_MSV1_0_GETCHALLENRESP_REQUEST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_REQUEST), - "::", - stringify!(MessageType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ParameterControl) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_REQUEST), - "::", - stringify!(ParameterControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_REQUEST), - "::", - stringify!(LogonId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Password) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_REQUEST), - "::", - stringify!(Password), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ChallengeToClient) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_REQUEST), - "::", - stringify!(ChallengeToClient), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserName) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_REQUEST), - "::", - stringify!(UserName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonDomainName) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_REQUEST), - "::", - stringify!(LogonDomainName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ServerName) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_REQUEST), - "::", - stringify!(ServerName), - ), - ); -} -impl Default for _MSV1_0_GETCHALLENRESP_REQUEST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_GETCHALLENRESP_REQUEST = _MSV1_0_GETCHALLENRESP_REQUEST; -pub type PMSV1_0_GETCHALLENRESP_REQUEST = *mut _MSV1_0_GETCHALLENRESP_REQUEST; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_GETCHALLENRESP_RESPONSE { - pub MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE, - pub CaseSensitiveChallengeResponse: STRING, - pub CaseInsensitiveChallengeResponse: STRING, - pub UserName: UNICODE_STRING, - pub LogonDomainName: UNICODE_STRING, - pub UserSessionKey: [UCHAR; 16usize], - pub LanmanSessionKey: [UCHAR; 8usize], -} -#[test] -fn bindgen_test_layout__MSV1_0_GETCHALLENRESP_RESPONSE() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_GETCHALLENRESP_RESPONSE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_GETCHALLENRESP_RESPONSE>(), - 96usize, - concat!("Size of: ", stringify!(_MSV1_0_GETCHALLENRESP_RESPONSE)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_GETCHALLENRESP_RESPONSE>(), - 8usize, - concat!("Alignment of ", stringify!(_MSV1_0_GETCHALLENRESP_RESPONSE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_RESPONSE), - "::", - stringify!(MessageType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CaseSensitiveChallengeResponse) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_RESPONSE), - "::", - stringify!(CaseSensitiveChallengeResponse), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CaseInsensitiveChallengeResponse) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_RESPONSE), - "::", - stringify!(CaseInsensitiveChallengeResponse), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserName) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_RESPONSE), - "::", - stringify!(UserName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonDomainName) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_RESPONSE), - "::", - stringify!(LogonDomainName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserSessionKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_RESPONSE), - "::", - stringify!(UserSessionKey), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LanmanSessionKey) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETCHALLENRESP_RESPONSE), - "::", - stringify!(LanmanSessionKey), - ), - ); -} -impl Default for _MSV1_0_GETCHALLENRESP_RESPONSE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_GETCHALLENRESP_RESPONSE = _MSV1_0_GETCHALLENRESP_RESPONSE; -pub type PMSV1_0_GETCHALLENRESP_RESPONSE = *mut _MSV1_0_GETCHALLENRESP_RESPONSE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_ENUMUSERS_REQUEST { - pub MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE, -} -#[test] -fn bindgen_test_layout__MSV1_0_ENUMUSERS_REQUEST() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_ENUMUSERS_REQUEST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_ENUMUSERS_REQUEST>(), - 4usize, - concat!("Size of: ", stringify!(_MSV1_0_ENUMUSERS_REQUEST)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_ENUMUSERS_REQUEST>(), - 4usize, - concat!("Alignment of ", stringify!(_MSV1_0_ENUMUSERS_REQUEST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_ENUMUSERS_REQUEST), - "::", - stringify!(MessageType), - ), - ); -} -impl Default for _MSV1_0_ENUMUSERS_REQUEST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_ENUMUSERS_REQUEST = _MSV1_0_ENUMUSERS_REQUEST; -pub type PMSV1_0_ENUMUSERS_REQUEST = *mut _MSV1_0_ENUMUSERS_REQUEST; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_ENUMUSERS_RESPONSE { - pub MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE, - pub NumberOfLoggedOnUsers: ULONG, - pub LogonIds: PLUID, - pub EnumHandles: PULONG, -} -#[test] -fn bindgen_test_layout__MSV1_0_ENUMUSERS_RESPONSE() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_ENUMUSERS_RESPONSE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_ENUMUSERS_RESPONSE>(), - 24usize, - concat!("Size of: ", stringify!(_MSV1_0_ENUMUSERS_RESPONSE)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_ENUMUSERS_RESPONSE>(), - 8usize, - concat!("Alignment of ", stringify!(_MSV1_0_ENUMUSERS_RESPONSE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_ENUMUSERS_RESPONSE), - "::", - stringify!(MessageType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfLoggedOnUsers) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_ENUMUSERS_RESPONSE), - "::", - stringify!(NumberOfLoggedOnUsers), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonIds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_ENUMUSERS_RESPONSE), - "::", - stringify!(LogonIds), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EnumHandles) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_ENUMUSERS_RESPONSE), - "::", - stringify!(EnumHandles), - ), - ); -} -impl Default for _MSV1_0_ENUMUSERS_RESPONSE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_ENUMUSERS_RESPONSE = _MSV1_0_ENUMUSERS_RESPONSE; -pub type PMSV1_0_ENUMUSERS_RESPONSE = *mut _MSV1_0_ENUMUSERS_RESPONSE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_GETUSERINFO_REQUEST { - pub MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE, - pub LogonId: LUID, -} -#[test] -fn bindgen_test_layout__MSV1_0_GETUSERINFO_REQUEST() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_GETUSERINFO_REQUEST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_GETUSERINFO_REQUEST>(), - 12usize, - concat!("Size of: ", stringify!(_MSV1_0_GETUSERINFO_REQUEST)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_GETUSERINFO_REQUEST>(), - 4usize, - concat!("Alignment of ", stringify!(_MSV1_0_GETUSERINFO_REQUEST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETUSERINFO_REQUEST), - "::", - stringify!(MessageType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETUSERINFO_REQUEST), - "::", - stringify!(LogonId), - ), - ); -} -impl Default for _MSV1_0_GETUSERINFO_REQUEST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_GETUSERINFO_REQUEST = _MSV1_0_GETUSERINFO_REQUEST; -pub type PMSV1_0_GETUSERINFO_REQUEST = *mut _MSV1_0_GETUSERINFO_REQUEST; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MSV1_0_GETUSERINFO_RESPONSE { - pub MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE, - pub UserSid: PSID, - pub UserName: UNICODE_STRING, - pub LogonDomainName: UNICODE_STRING, - pub LogonServer: UNICODE_STRING, - pub LogonType: SECURITY_LOGON_TYPE, -} -#[test] -fn bindgen_test_layout__MSV1_0_GETUSERINFO_RESPONSE() { - const UNINIT: ::core::mem::MaybeUninit<_MSV1_0_GETUSERINFO_RESPONSE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MSV1_0_GETUSERINFO_RESPONSE>(), - 72usize, - concat!("Size of: ", stringify!(_MSV1_0_GETUSERINFO_RESPONSE)), - ); - assert_eq!( - ::core::mem::align_of::<_MSV1_0_GETUSERINFO_RESPONSE>(), - 8usize, - concat!("Alignment of ", stringify!(_MSV1_0_GETUSERINFO_RESPONSE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETUSERINFO_RESPONSE), - "::", - stringify!(MessageType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserSid) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETUSERINFO_RESPONSE), - "::", - stringify!(UserSid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserName) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETUSERINFO_RESPONSE), - "::", - stringify!(UserName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonDomainName) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETUSERINFO_RESPONSE), - "::", - stringify!(LogonDomainName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonServer) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETUSERINFO_RESPONSE), - "::", - stringify!(LogonServer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonType) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_MSV1_0_GETUSERINFO_RESPONSE), - "::", - stringify!(LogonType), - ), - ); -} -impl Default for _MSV1_0_GETUSERINFO_RESPONSE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MSV1_0_GETUSERINFO_RESPONSE = _MSV1_0_GETUSERINFO_RESPONSE; -pub type PMSV1_0_GETUSERINFO_RESPONSE = *mut _MSV1_0_GETUSERINFO_RESPONSE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_ID_128 { - pub Identifier: [UCHAR; 16usize], -} -#[test] -fn bindgen_test_layout__FILE_ID_128() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_128> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ID_128>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_ID_128)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ID_128>(), - 1usize, - concat!("Alignment of ", stringify!(_FILE_ID_128)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Identifier) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_128), - "::", - stringify!(Identifier), - ), - ); -} -pub type FILE_ID_128 = _FILE_ID_128; -pub type PFILE_ID_128 = *mut _FILE_ID_128; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_NOTIFY_INFORMATION { - pub NextEntryOffset: ULONG, - pub Action: ULONG, - pub FileNameLength: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_NOTIFY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_NOTIFY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_NOTIFY_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_NOTIFY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_NOTIFY_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_NOTIFY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Action) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_INFORMATION), - "::", - stringify!(Action), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -pub type FILE_NOTIFY_INFORMATION = _FILE_NOTIFY_INFORMATION; -pub type PFILE_NOTIFY_INFORMATION = *mut _FILE_NOTIFY_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_NOTIFY_EXTENDED_INFORMATION { - pub NextEntryOffset: ULONG, - pub Action: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastModificationTime: LARGE_INTEGER, - pub LastChangeTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub AllocatedLength: LARGE_INTEGER, - pub FileSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub __bindgen_anon_1: _FILE_NOTIFY_EXTENDED_INFORMATION__bindgen_ty_1, - pub FileId: LARGE_INTEGER, - pub ParentFileId: LARGE_INTEGER, - pub FileNameLength: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FILE_NOTIFY_EXTENDED_INFORMATION__bindgen_ty_1 { - pub ReparsePointTag: ULONG, - pub EaSize: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_NOTIFY_EXTENDED_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _FILE_NOTIFY_EXTENDED_INFORMATION__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_NOTIFY_EXTENDED_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_NOTIFY_EXTENDED_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparsePointTag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION__bindgen_ty_1), - "::", - stringify!(ReparsePointTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION__bindgen_ty_1), - "::", - stringify!(EaSize), - ), - ); -} -impl Default for _FILE_NOTIFY_EXTENDED_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FILE_NOTIFY_EXTENDED_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_NOTIFY_EXTENDED_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_NOTIFY_EXTENDED_INFORMATION>(), - 88usize, - concat!("Size of: ", stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_NOTIFY_EXTENDED_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Action) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION), - "::", - stringify!(Action), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastModificationTime) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION), - "::", - stringify!(LastModificationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastChangeTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION), - "::", - stringify!(LastChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocatedLength) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION), - "::", - stringify!(AllocatedLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION), - "::", - stringify!(FileSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParentFileId) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION), - "::", - stringify!(ParentFileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_EXTENDED_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_NOTIFY_EXTENDED_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_NOTIFY_EXTENDED_INFORMATION = _FILE_NOTIFY_EXTENDED_INFORMATION; -pub type PFILE_NOTIFY_EXTENDED_INFORMATION = *mut _FILE_NOTIFY_EXTENDED_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_NOTIFY_FULL_INFORMATION { - pub NextEntryOffset: ULONG, - pub Action: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastModificationTime: LARGE_INTEGER, - pub LastChangeTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub AllocatedLength: LARGE_INTEGER, - pub FileSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub __bindgen_anon_1: _FILE_NOTIFY_FULL_INFORMATION__bindgen_ty_1, - pub FileId: LARGE_INTEGER, - pub ParentFileId: LARGE_INTEGER, - pub FileNameLength: USHORT, - pub FileNameFlags: UCHAR, - pub Reserved: UCHAR, - pub FileName: [WCHAR; 1usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FILE_NOTIFY_FULL_INFORMATION__bindgen_ty_1 { - pub ReparsePointTag: ULONG, - pub EaSize: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_NOTIFY_FULL_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _FILE_NOTIFY_FULL_INFORMATION__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_NOTIFY_FULL_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_NOTIFY_FULL_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_NOTIFY_FULL_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_NOTIFY_FULL_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparsePointTag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION__bindgen_ty_1), - "::", - stringify!(ReparsePointTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION__bindgen_ty_1), - "::", - stringify!(EaSize), - ), - ); -} -impl Default for _FILE_NOTIFY_FULL_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FILE_NOTIFY_FULL_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_NOTIFY_FULL_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_NOTIFY_FULL_INFORMATION>(), - 88usize, - concat!("Size of: ", stringify!(_FILE_NOTIFY_FULL_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_NOTIFY_FULL_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_NOTIFY_FULL_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Action) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(Action), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastModificationTime) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(LastModificationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastChangeTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(LastChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocatedLength) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(AllocatedLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(FileSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParentFileId) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(ParentFileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameFlags) as usize - ptr as usize }, - 82usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(FileNameFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 83usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NOTIFY_FULL_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_NOTIFY_FULL_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_NOTIFY_FULL_INFORMATION = _FILE_NOTIFY_FULL_INFORMATION; -pub type PFILE_NOTIFY_FULL_INFORMATION = *mut _FILE_NOTIFY_FULL_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_INFORMATION_DEFINITION { - pub Class: FILE_INFORMATION_CLASS, - pub NextEntryOffset: ULONG, - pub FileNameLengthOffset: ULONG, - pub FileNameOffset: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_INFORMATION_DEFINITION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_INFORMATION_DEFINITION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_INFORMATION_DEFINITION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_INFORMATION_DEFINITION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_INFORMATION_DEFINITION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_INFORMATION_DEFINITION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_INFORMATION_DEFINITION), - "::", - stringify!(Class), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_INFORMATION_DEFINITION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileNameLengthOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_INFORMATION_DEFINITION), - "::", - stringify!(FileNameLengthOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameOffset) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_INFORMATION_DEFINITION), - "::", - stringify!(FileNameOffset), - ), - ); -} -impl Default for _FILE_INFORMATION_DEFINITION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_INFORMATION_DEFINITION = _FILE_INFORMATION_DEFINITION; -pub type PFILE_INFORMATION_DEFINITION = *mut _FILE_INFORMATION_DEFINITION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_DIRECTORY_INFORMATION { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub FileNameLength: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_DIRECTORY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_DIRECTORY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_DIRECTORY_INFORMATION>(), - 72usize, - concat!("Size of: ", stringify!(_FILE_DIRECTORY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_DIRECTORY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_DIRECTORY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DIRECTORY_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DIRECTORY_INFORMATION), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DIRECTORY_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DIRECTORY_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DIRECTORY_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DIRECTORY_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DIRECTORY_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DIRECTORY_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DIRECTORY_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DIRECTORY_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DIRECTORY_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_DIRECTORY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_DIRECTORY_INFORMATION = _FILE_DIRECTORY_INFORMATION; -pub type PFILE_DIRECTORY_INFORMATION = *mut _FILE_DIRECTORY_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_FULL_DIR_INFORMATION { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub FileNameLength: ULONG, - pub EaSize: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_FULL_DIR_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FULL_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FULL_DIR_INFORMATION>(), - 72usize, - concat!("Size of: ", stringify!(_FILE_FULL_DIR_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FULL_DIR_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_FULL_DIR_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_DIR_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_DIR_INFORMATION), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_DIR_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_DIR_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_DIR_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_DIR_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_DIR_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_DIR_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_DIR_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_DIR_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_DIR_INFORMATION), - "::", - stringify!(EaSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FULL_DIR_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_FULL_DIR_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_FULL_DIR_INFORMATION = _FILE_FULL_DIR_INFORMATION; -pub type PFILE_FULL_DIR_INFORMATION = *mut _FILE_FULL_DIR_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ID_FULL_DIR_INFORMATION { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub FileNameLength: ULONG, - pub EaSize: ULONG, - pub FileId: LARGE_INTEGER, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_ID_FULL_DIR_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_FULL_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ID_FULL_DIR_INFORMATION>(), - 88usize, - concat!("Size of: ", stringify!(_FILE_ID_FULL_DIR_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ID_FULL_DIR_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ID_FULL_DIR_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_FULL_DIR_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_FULL_DIR_INFORMATION), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_FULL_DIR_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_FULL_DIR_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_FULL_DIR_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_FULL_DIR_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_FULL_DIR_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_FULL_DIR_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_FULL_DIR_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_FULL_DIR_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_FULL_DIR_INFORMATION), - "::", - stringify!(EaSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_FULL_DIR_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_FULL_DIR_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_ID_FULL_DIR_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ID_FULL_DIR_INFORMATION = _FILE_ID_FULL_DIR_INFORMATION; -pub type PFILE_ID_FULL_DIR_INFORMATION = *mut _FILE_ID_FULL_DIR_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_BOTH_DIR_INFORMATION { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub FileNameLength: ULONG, - pub EaSize: ULONG, - pub ShortNameLength: CCHAR, - pub ShortName: [WCHAR; 12usize], - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_BOTH_DIR_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_BOTH_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_BOTH_DIR_INFORMATION>(), - 96usize, - concat!("Size of: ", stringify!(_FILE_BOTH_DIR_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_BOTH_DIR_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_BOTH_DIR_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(EaSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShortNameLength) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(ShortNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShortName) as usize - ptr as usize }, - 70usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(ShortName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 94usize, - concat!( - "Offset of field: ", - stringify!(_FILE_BOTH_DIR_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_BOTH_DIR_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_BOTH_DIR_INFORMATION = _FILE_BOTH_DIR_INFORMATION; -pub type PFILE_BOTH_DIR_INFORMATION = *mut _FILE_BOTH_DIR_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ID_BOTH_DIR_INFORMATION { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub FileNameLength: ULONG, - pub EaSize: ULONG, - pub ShortNameLength: CCHAR, - pub ShortName: [WCHAR; 12usize], - pub FileId: LARGE_INTEGER, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_ID_BOTH_DIR_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_BOTH_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ID_BOTH_DIR_INFORMATION>(), - 112usize, - concat!("Size of: ", stringify!(_FILE_ID_BOTH_DIR_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ID_BOTH_DIR_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ID_BOTH_DIR_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(EaSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShortNameLength) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(ShortNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShortName) as usize - ptr as usize }, - 70usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(ShortName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_BOTH_DIR_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_ID_BOTH_DIR_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ID_BOTH_DIR_INFORMATION = _FILE_ID_BOTH_DIR_INFORMATION; -pub type PFILE_ID_BOTH_DIR_INFORMATION = *mut _FILE_ID_BOTH_DIR_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_NAMES_INFORMATION { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub FileNameLength: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_NAMES_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_NAMES_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_NAMES_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_NAMES_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_NAMES_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_NAMES_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NAMES_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NAMES_INFORMATION), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NAMES_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NAMES_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -pub type FILE_NAMES_INFORMATION = _FILE_NAMES_INFORMATION; -pub type PFILE_NAMES_INFORMATION = *mut _FILE_NAMES_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ID_GLOBAL_TX_DIR_INFORMATION { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub FileNameLength: ULONG, - pub FileId: LARGE_INTEGER, - pub LockingTransactionId: GUID, - pub TxInfoFlags: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_ID_GLOBAL_TX_DIR_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_GLOBAL_TX_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ID_GLOBAL_TX_DIR_INFORMATION>(), - 96usize, - concat!("Size of: ", stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ID_GLOBAL_TX_DIR_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LockingTransactionId) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(LockingTransactionId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TxInfoFlags) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(TxInfoFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_GLOBAL_TX_DIR_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_ID_GLOBAL_TX_DIR_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ID_GLOBAL_TX_DIR_INFORMATION = _FILE_ID_GLOBAL_TX_DIR_INFORMATION; -pub type PFILE_ID_GLOBAL_TX_DIR_INFORMATION = *mut _FILE_ID_GLOBAL_TX_DIR_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ID_EXTD_DIR_INFORMATION { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub FileNameLength: ULONG, - pub EaSize: ULONG, - pub ReparsePointTag: ULONG, - pub FileId: FILE_ID_128, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_ID_EXTD_DIR_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_EXTD_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ID_EXTD_DIR_INFORMATION>(), - 96usize, - concat!("Size of: ", stringify!(_FILE_ID_EXTD_DIR_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ID_EXTD_DIR_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ID_EXTD_DIR_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(EaSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparsePointTag) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(ReparsePointTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_DIR_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_ID_EXTD_DIR_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ID_EXTD_DIR_INFORMATION = _FILE_ID_EXTD_DIR_INFORMATION; -pub type PFILE_ID_EXTD_DIR_INFORMATION = *mut _FILE_ID_EXTD_DIR_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ID_EXTD_BOTH_DIR_INFORMATION { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub FileNameLength: ULONG, - pub EaSize: ULONG, - pub ReparsePointTag: ULONG, - pub FileId: FILE_ID_128, - pub ShortNameLength: CCHAR, - pub ShortName: [WCHAR; 12usize], - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_ID_EXTD_BOTH_DIR_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_EXTD_BOTH_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ID_EXTD_BOTH_DIR_INFORMATION>(), - 120usize, - concat!("Size of: ", stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ID_EXTD_BOTH_DIR_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(EaSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparsePointTag) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(ReparsePointTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShortNameLength) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(ShortNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShortName) as usize - ptr as usize }, - 90usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(ShortName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 114usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_ID_EXTD_BOTH_DIR_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ID_EXTD_BOTH_DIR_INFORMATION = _FILE_ID_EXTD_BOTH_DIR_INFORMATION; -pub type PFILE_ID_EXTD_BOTH_DIR_INFORMATION = *mut _FILE_ID_EXTD_BOTH_DIR_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ID_64_EXTD_DIR_INFORMATION { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub FileNameLength: ULONG, - pub EaSize: ULONG, - pub ReparsePointTag: ULONG, - pub FileId: LARGE_INTEGER, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_ID_64_EXTD_DIR_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_64_EXTD_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ID_64_EXTD_DIR_INFORMATION>(), - 88usize, - concat!("Size of: ", stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ID_64_EXTD_DIR_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(EaSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparsePointTag) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(ReparsePointTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_ID_64_EXTD_DIR_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ID_64_EXTD_DIR_INFORMATION = _FILE_ID_64_EXTD_DIR_INFORMATION; -pub type PFILE_ID_64_EXTD_DIR_INFORMATION = *mut _FILE_ID_64_EXTD_DIR_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ID_64_EXTD_BOTH_DIR_INFORMATION { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub FileNameLength: ULONG, - pub EaSize: ULONG, - pub ReparsePointTag: ULONG, - pub FileId: LARGE_INTEGER, - pub ShortNameLength: CCHAR, - pub ShortName: [WCHAR; 12usize], - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_ID_64_EXTD_BOTH_DIR_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION>(), - 112usize, - concat!("Size of: ", stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(EaSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparsePointTag) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(ReparsePointTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShortNameLength) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(ShortNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShortName) as usize - ptr as usize }, - 82usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(ShortName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 106usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_ID_64_EXTD_BOTH_DIR_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ID_64_EXTD_BOTH_DIR_INFORMATION = _FILE_ID_64_EXTD_BOTH_DIR_INFORMATION; -pub type PFILE_ID_64_EXTD_BOTH_DIR_INFORMATION = *mut _FILE_ID_64_EXTD_BOTH_DIR_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ID_ALL_EXTD_DIR_INFORMATION { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub FileNameLength: ULONG, - pub EaSize: ULONG, - pub ReparsePointTag: ULONG, - pub FileId: LARGE_INTEGER, - pub FileId128: FILE_ID_128, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_ID_ALL_EXTD_DIR_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_ALL_EXTD_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ID_ALL_EXTD_DIR_INFORMATION>(), - 104usize, - concat!("Size of: ", stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ID_ALL_EXTD_DIR_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(EaSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparsePointTag) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(ReparsePointTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId128) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(FileId128), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_ID_ALL_EXTD_DIR_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ID_ALL_EXTD_DIR_INFORMATION = _FILE_ID_ALL_EXTD_DIR_INFORMATION; -pub type PFILE_ID_ALL_EXTD_DIR_INFORMATION = *mut _FILE_ID_ALL_EXTD_DIR_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub FileNameLength: ULONG, - pub EaSize: ULONG, - pub ReparsePointTag: ULONG, - pub FileId: LARGE_INTEGER, - pub FileId128: FILE_ID_128, - pub ShortNameLength: CCHAR, - pub ShortName: [WCHAR; 12usize], - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION>(), - 128usize, - concat!("Size of: ", stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(EaSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparsePointTag) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(ReparsePointTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId128) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileId128), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShortNameLength) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(ShortNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShortName) as usize - ptr as usize }, - 98usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(ShortName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 122usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION = _FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION; -pub type PFILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION = *mut _FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_OBJECTID_INFORMATION { - pub FileReference: LONGLONG, - pub ObjectId: [UCHAR; 16usize], - pub __bindgen_anon_1: _FILE_OBJECTID_INFORMATION__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FILE_OBJECTID_INFORMATION__bindgen_ty_1 { - pub __bindgen_anon_1: _FILE_OBJECTID_INFORMATION__bindgen_ty_1__bindgen_ty_1, - pub ExtendedInfo: [UCHAR; 48usize], -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_OBJECTID_INFORMATION__bindgen_ty_1__bindgen_ty_1 { - pub BirthVolumeId: [UCHAR; 16usize], - pub BirthObjectId: [UCHAR; 16usize], - pub DomainId: [UCHAR; 16usize], -} -#[test] -fn bindgen_test_layout__FILE_OBJECTID_INFORMATION__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _FILE_OBJECTID_INFORMATION__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_OBJECTID_INFORMATION__bindgen_ty_1__bindgen_ty_1>(), - 48usize, - concat!( - "Size of: ", - stringify!(_FILE_OBJECTID_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _FILE_OBJECTID_INFORMATION__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_FILE_OBJECTID_INFORMATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BirthVolumeId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECTID_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(BirthVolumeId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BirthObjectId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECTID_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(BirthObjectId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DomainId) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECTID_INFORMATION__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(DomainId), - ), - ); -} -#[test] -fn bindgen_test_layout__FILE_OBJECTID_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_OBJECTID_INFORMATION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_OBJECTID_INFORMATION__bindgen_ty_1>(), - 48usize, - concat!("Size of: ", stringify!(_FILE_OBJECTID_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_OBJECTID_INFORMATION__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_FILE_OBJECTID_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtendedInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECTID_INFORMATION__bindgen_ty_1), - "::", - stringify!(ExtendedInfo), - ), - ); -} -impl Default for _FILE_OBJECTID_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FILE_OBJECTID_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_OBJECTID_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_OBJECTID_INFORMATION>(), - 72usize, - concat!("Size of: ", stringify!(_FILE_OBJECTID_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_OBJECTID_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_OBJECTID_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileReference) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECTID_INFORMATION), - "::", - stringify!(FileReference), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECTID_INFORMATION), - "::", - stringify!(ObjectId), - ), - ); -} -impl Default for _FILE_OBJECTID_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_OBJECTID_INFORMATION = _FILE_OBJECTID_INFORMATION; -pub type PFILE_OBJECTID_INFORMATION = *mut _FILE_OBJECTID_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_INTERNAL_INFORMATION { - pub IndexNumber: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FILE_INTERNAL_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_INTERNAL_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_INTERNAL_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_INTERNAL_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_INTERNAL_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_INTERNAL_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IndexNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_INTERNAL_INFORMATION), - "::", - stringify!(IndexNumber), - ), - ); -} -impl Default for _FILE_INTERNAL_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_INTERNAL_INFORMATION = _FILE_INTERNAL_INFORMATION; -pub type PFILE_INTERNAL_INFORMATION = *mut _FILE_INTERNAL_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_ID_INFORMATION { - pub VolumeSerialNumber: ULONGLONG, - pub FileId: FILE_ID_128, -} -#[test] -fn bindgen_test_layout__FILE_ID_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ID_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_ID_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ID_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ID_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeSerialNumber) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_INFORMATION), - "::", - stringify!(VolumeSerialNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ID_INFORMATION), - "::", - stringify!(FileId), - ), - ); -} -pub type FILE_ID_INFORMATION = _FILE_ID_INFORMATION; -pub type PFILE_ID_INFORMATION = *mut _FILE_ID_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_EA_INFORMATION { - pub EaSize: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_EA_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_EA_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_EA_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_EA_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_EA_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_EA_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_EA_INFORMATION), - "::", - stringify!(EaSize), - ), - ); -} -pub type FILE_EA_INFORMATION = _FILE_EA_INFORMATION; -pub type PFILE_EA_INFORMATION = *mut _FILE_EA_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_ACCESS_INFORMATION { - pub AccessFlags: ACCESS_MASK, -} -#[test] -fn bindgen_test_layout__FILE_ACCESS_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ACCESS_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ACCESS_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_ACCESS_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ACCESS_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_ACCESS_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AccessFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ACCESS_INFORMATION), - "::", - stringify!(AccessFlags), - ), - ); -} -pub type FILE_ACCESS_INFORMATION = _FILE_ACCESS_INFORMATION; -pub type PFILE_ACCESS_INFORMATION = *mut _FILE_ACCESS_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_MODE_INFORMATION { - pub Mode: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_MODE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_MODE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_MODE_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_MODE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_MODE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_MODE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MODE_INFORMATION), - "::", - stringify!(Mode), - ), - ); -} -pub type FILE_MODE_INFORMATION = _FILE_MODE_INFORMATION; -pub type PFILE_MODE_INFORMATION = *mut _FILE_MODE_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ALL_INFORMATION { - pub BasicInformation: FILE_BASIC_INFORMATION, - pub StandardInformation: FILE_STANDARD_INFORMATION, - pub InternalInformation: FILE_INTERNAL_INFORMATION, - pub EaInformation: FILE_EA_INFORMATION, - pub AccessInformation: FILE_ACCESS_INFORMATION, - pub PositionInformation: FILE_POSITION_INFORMATION, - pub ModeInformation: FILE_MODE_INFORMATION, - pub AlignmentInformation: FILE_ALIGNMENT_INFORMATION, - pub NameInformation: FILE_NAME_INFORMATION, -} -#[test] -fn bindgen_test_layout__FILE_ALL_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ALL_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ALL_INFORMATION>(), - 104usize, - concat!("Size of: ", stringify!(_FILE_ALL_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ALL_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ALL_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BasicInformation) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ALL_INFORMATION), - "::", - stringify!(BasicInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StandardInformation) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ALL_INFORMATION), - "::", - stringify!(StandardInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InternalInformation) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ALL_INFORMATION), - "::", - stringify!(InternalInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaInformation) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ALL_INFORMATION), - "::", - stringify!(EaInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AccessInformation) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ALL_INFORMATION), - "::", - stringify!(AccessInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PositionInformation) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ALL_INFORMATION), - "::", - stringify!(PositionInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ModeInformation) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ALL_INFORMATION), - "::", - stringify!(ModeInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AlignmentInformation) as usize - ptr as usize - }, - 92usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ALL_INFORMATION), - "::", - stringify!(AlignmentInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameInformation) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ALL_INFORMATION), - "::", - stringify!(NameInformation), - ), - ); -} -impl Default for _FILE_ALL_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ALL_INFORMATION = _FILE_ALL_INFORMATION; -pub type PFILE_ALL_INFORMATION = *mut _FILE_ALL_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_STAT_INFORMATION { - pub FileId: LARGE_INTEGER, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub ReparseTag: ULONG, - pub NumberOfLinks: ULONG, - pub EffectiveAccess: ACCESS_MASK, -} -#[test] -fn bindgen_test_layout__FILE_STAT_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_STAT_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_STAT_INFORMATION>(), - 72usize, - concat!("Size of: ", stringify!(_FILE_STAT_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_STAT_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_STAT_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparseTag) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_INFORMATION), - "::", - stringify!(ReparseTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfLinks) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_INFORMATION), - "::", - stringify!(NumberOfLinks), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EffectiveAccess) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_INFORMATION), - "::", - stringify!(EffectiveAccess), - ), - ); -} -impl Default for _FILE_STAT_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_STAT_INFORMATION = _FILE_STAT_INFORMATION; -pub type PFILE_STAT_INFORMATION = *mut _FILE_STAT_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_STAT_LX_INFORMATION { - pub FileId: LARGE_INTEGER, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub ReparseTag: ULONG, - pub NumberOfLinks: ULONG, - pub EffectiveAccess: ACCESS_MASK, - pub LxFlags: ULONG, - pub LxUid: ULONG, - pub LxGid: ULONG, - pub LxMode: ULONG, - pub LxDeviceIdMajor: ULONG, - pub LxDeviceIdMinor: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_STAT_LX_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_STAT_LX_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_STAT_LX_INFORMATION>(), - 96usize, - concat!("Size of: ", stringify!(_FILE_STAT_LX_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_STAT_LX_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_STAT_LX_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparseTag) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(ReparseTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfLinks) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(NumberOfLinks), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EffectiveAccess) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(EffectiveAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LxFlags) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(LxFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LxUid) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(LxUid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LxGid) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(LxGid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LxMode) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(LxMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LxDeviceIdMajor) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(LxDeviceIdMajor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LxDeviceIdMinor) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STAT_LX_INFORMATION), - "::", - stringify!(LxDeviceIdMinor), - ), - ); -} -impl Default for _FILE_STAT_LX_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_STAT_LX_INFORMATION = _FILE_STAT_LX_INFORMATION; -pub type PFILE_STAT_LX_INFORMATION = *mut _FILE_STAT_LX_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_CASE_SENSITIVE_INFORMATION { - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_CASE_SENSITIVE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_CASE_SENSITIVE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_CASE_SENSITIVE_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_CASE_SENSITIVE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_CASE_SENSITIVE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_CASE_SENSITIVE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_CASE_SENSITIVE_INFORMATION), - "::", - stringify!(Flags), - ), - ); -} -pub type FILE_CASE_SENSITIVE_INFORMATION = _FILE_CASE_SENSITIVE_INFORMATION; -pub type PFILE_CASE_SENSITIVE_INFORMATION = *mut _FILE_CASE_SENSITIVE_INFORMATION; -pub mod _FILE_KNOWN_FOLDER_TYPE { - pub type Type = ::core::ffi::c_int; - pub const KnownFolderNone: Type = 0; - pub const KnownFolderDesktop: Type = 1; - pub const KnownFolderDocuments: Type = 2; - pub const KnownFolderDownloads: Type = 3; - pub const KnownFolderMusic: Type = 4; - pub const KnownFolderPictures: Type = 5; - pub const KnownFolderVideos: Type = 6; - pub const KnownFolderOther: Type = 7; - pub const KnownFolderMax: Type = 7; -} -pub use self::_FILE_KNOWN_FOLDER_TYPE::Type as FILE_KNOWN_FOLDER_TYPE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_KNOWN_FOLDER_INFORMATION { - pub Type: FILE_KNOWN_FOLDER_TYPE, -} -#[test] -fn bindgen_test_layout__FILE_KNOWN_FOLDER_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_KNOWN_FOLDER_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_KNOWN_FOLDER_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_KNOWN_FOLDER_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_KNOWN_FOLDER_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_KNOWN_FOLDER_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_KNOWN_FOLDER_INFORMATION), - "::", - stringify!(Type), - ), - ); -} -impl Default for _FILE_KNOWN_FOLDER_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_KNOWN_FOLDER_INFORMATION = _FILE_KNOWN_FOLDER_INFORMATION; -pub type PFILE_KNOWN_FOLDER_INFORMATION = *mut _FILE_KNOWN_FOLDER_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ALLOCATION_INFORMATION { - pub AllocationSize: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FILE_ALLOCATION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ALLOCATION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ALLOCATION_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_ALLOCATION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ALLOCATION_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ALLOCATION_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ALLOCATION_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); -} -impl Default for _FILE_ALLOCATION_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ALLOCATION_INFORMATION = _FILE_ALLOCATION_INFORMATION; -pub type PFILE_ALLOCATION_INFORMATION = *mut _FILE_ALLOCATION_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_COMPRESSION_INFORMATION { - pub CompressedFileSize: LARGE_INTEGER, - pub CompressionFormat: USHORT, - pub CompressionUnitShift: UCHAR, - pub ChunkShift: UCHAR, - pub ClusterShift: UCHAR, - pub Reserved: [UCHAR; 3usize], -} -#[test] -fn bindgen_test_layout__FILE_COMPRESSION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_COMPRESSION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_COMPRESSION_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_COMPRESSION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_COMPRESSION_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_COMPRESSION_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompressedFileSize) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_COMPRESSION_INFORMATION), - "::", - stringify!(CompressedFileSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompressionFormat) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_COMPRESSION_INFORMATION), - "::", - stringify!(CompressionFormat), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompressionUnitShift) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_FILE_COMPRESSION_INFORMATION), - "::", - stringify!(CompressionUnitShift), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChunkShift) as usize - ptr as usize }, - 11usize, - concat!( - "Offset of field: ", - stringify!(_FILE_COMPRESSION_INFORMATION), - "::", - stringify!(ChunkShift), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClusterShift) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_COMPRESSION_INFORMATION), - "::", - stringify!(ClusterShift), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(_FILE_COMPRESSION_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _FILE_COMPRESSION_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_COMPRESSION_INFORMATION = _FILE_COMPRESSION_INFORMATION; -pub type PFILE_COMPRESSION_INFORMATION = *mut _FILE_COMPRESSION_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_LINK_INFORMATION { - pub __bindgen_anon_1: _FILE_LINK_INFORMATION__bindgen_ty_1, - pub RootDirectory: HANDLE, - pub FileNameLength: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FILE_LINK_INFORMATION__bindgen_ty_1 { - pub ReplaceIfExists: BOOLEAN, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_LINK_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LINK_INFORMATION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LINK_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_LINK_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LINK_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_LINK_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReplaceIfExists) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINK_INFORMATION__bindgen_ty_1), - "::", - stringify!(ReplaceIfExists), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINK_INFORMATION__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _FILE_LINK_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FILE_LINK_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LINK_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LINK_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_LINK_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LINK_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_LINK_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootDirectory) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINK_INFORMATION), - "::", - stringify!(RootDirectory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINK_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINK_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_LINK_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_LINK_INFORMATION = _FILE_LINK_INFORMATION; -pub type PFILE_LINK_INFORMATION = *mut _FILE_LINK_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_MOVE_CLUSTER_INFORMATION { - pub ClusterCount: ULONG, - pub RootDirectory: HANDLE, - pub FileNameLength: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_MOVE_CLUSTER_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_MOVE_CLUSTER_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_MOVE_CLUSTER_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_MOVE_CLUSTER_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_MOVE_CLUSTER_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_MOVE_CLUSTER_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClusterCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MOVE_CLUSTER_INFORMATION), - "::", - stringify!(ClusterCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootDirectory) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MOVE_CLUSTER_INFORMATION), - "::", - stringify!(RootDirectory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MOVE_CLUSTER_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MOVE_CLUSTER_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_MOVE_CLUSTER_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_MOVE_CLUSTER_INFORMATION = _FILE_MOVE_CLUSTER_INFORMATION; -pub type PFILE_MOVE_CLUSTER_INFORMATION = *mut _FILE_MOVE_CLUSTER_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_RENAME_INFORMATION { - pub __bindgen_anon_1: _FILE_RENAME_INFORMATION__bindgen_ty_1, - pub RootDirectory: HANDLE, - pub FileNameLength: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FILE_RENAME_INFORMATION__bindgen_ty_1 { - pub ReplaceIfExists: BOOLEAN, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_RENAME_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_RENAME_INFORMATION__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_RENAME_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_RENAME_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_RENAME_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_RENAME_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReplaceIfExists) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_RENAME_INFORMATION__bindgen_ty_1), - "::", - stringify!(ReplaceIfExists), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_RENAME_INFORMATION__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _FILE_RENAME_INFORMATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FILE_RENAME_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_RENAME_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_RENAME_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_RENAME_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_RENAME_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_RENAME_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootDirectory) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_RENAME_INFORMATION), - "::", - stringify!(RootDirectory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_RENAME_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_RENAME_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _FILE_RENAME_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_RENAME_INFORMATION = _FILE_RENAME_INFORMATION; -pub type PFILE_RENAME_INFORMATION = *mut _FILE_RENAME_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_STREAM_INFORMATION { - pub NextEntryOffset: ULONG, - pub StreamNameLength: ULONG, - pub StreamSize: LARGE_INTEGER, - pub StreamAllocationSize: LARGE_INTEGER, - pub StreamName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_STREAM_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_STREAM_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_STREAM_INFORMATION>(), - 32usize, - concat!("Size of: ", stringify!(_FILE_STREAM_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_STREAM_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_STREAM_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STREAM_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StreamNameLength) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STREAM_INFORMATION), - "::", - stringify!(StreamNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StreamSize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STREAM_INFORMATION), - "::", - stringify!(StreamSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StreamAllocationSize) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STREAM_INFORMATION), - "::", - stringify!(StreamAllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StreamName) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STREAM_INFORMATION), - "::", - stringify!(StreamName), - ), - ); -} -impl Default for _FILE_STREAM_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_STREAM_INFORMATION = _FILE_STREAM_INFORMATION; -pub type PFILE_STREAM_INFORMATION = *mut _FILE_STREAM_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_TRACKING_INFORMATION { - pub DestinationFile: HANDLE, - pub ObjectInformationLength: ULONG, - pub ObjectInformation: [CHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_TRACKING_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_TRACKING_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_TRACKING_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_TRACKING_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_TRACKING_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_TRACKING_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DestinationFile) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_TRACKING_INFORMATION), - "::", - stringify!(DestinationFile), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ObjectInformationLength) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_TRACKING_INFORMATION), - "::", - stringify!(ObjectInformationLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ObjectInformation) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_TRACKING_INFORMATION), - "::", - stringify!(ObjectInformation), - ), - ); -} -impl Default for _FILE_TRACKING_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_TRACKING_INFORMATION = _FILE_TRACKING_INFORMATION; -pub type PFILE_TRACKING_INFORMATION = *mut _FILE_TRACKING_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_COMPLETION_INFORMATION { - pub Port: HANDLE, - pub Key: PVOID, -} -#[test] -fn bindgen_test_layout__FILE_COMPLETION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_COMPLETION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_COMPLETION_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_COMPLETION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_COMPLETION_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_COMPLETION_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Port) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_COMPLETION_INFORMATION), - "::", - stringify!(Port), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Key) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_COMPLETION_INFORMATION), - "::", - stringify!(Key), - ), - ); -} -impl Default for _FILE_COMPLETION_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_COMPLETION_INFORMATION = _FILE_COMPLETION_INFORMATION; -pub type PFILE_COMPLETION_INFORMATION = *mut _FILE_COMPLETION_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_PIPE_INFORMATION { - pub ReadMode: ULONG, - pub CompletionMode: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_PIPE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PIPE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PIPE_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_PIPE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PIPE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_PIPE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadMode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_INFORMATION), - "::", - stringify!(ReadMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CompletionMode) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_INFORMATION), - "::", - stringify!(CompletionMode), - ), - ); -} -pub type FILE_PIPE_INFORMATION = _FILE_PIPE_INFORMATION; -pub type PFILE_PIPE_INFORMATION = *mut _FILE_PIPE_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_PIPE_LOCAL_INFORMATION { - pub NamedPipeType: ULONG, - pub NamedPipeConfiguration: ULONG, - pub MaximumInstances: ULONG, - pub CurrentInstances: ULONG, - pub InboundQuota: ULONG, - pub ReadDataAvailable: ULONG, - pub OutboundQuota: ULONG, - pub WriteQuotaAvailable: ULONG, - pub NamedPipeState: ULONG, - pub NamedPipeEnd: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_PIPE_LOCAL_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PIPE_LOCAL_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PIPE_LOCAL_INFORMATION>(), - 40usize, - concat!("Size of: ", stringify!(_FILE_PIPE_LOCAL_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PIPE_LOCAL_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_PIPE_LOCAL_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NamedPipeType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_LOCAL_INFORMATION), - "::", - stringify!(NamedPipeType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NamedPipeConfiguration) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_LOCAL_INFORMATION), - "::", - stringify!(NamedPipeConfiguration), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumInstances) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_LOCAL_INFORMATION), - "::", - stringify!(MaximumInstances), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CurrentInstances) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_LOCAL_INFORMATION), - "::", - stringify!(CurrentInstances), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InboundQuota) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_LOCAL_INFORMATION), - "::", - stringify!(InboundQuota), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadDataAvailable) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_LOCAL_INFORMATION), - "::", - stringify!(ReadDataAvailable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OutboundQuota) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_LOCAL_INFORMATION), - "::", - stringify!(OutboundQuota), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WriteQuotaAvailable) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_LOCAL_INFORMATION), - "::", - stringify!(WriteQuotaAvailable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NamedPipeState) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_LOCAL_INFORMATION), - "::", - stringify!(NamedPipeState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NamedPipeEnd) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_LOCAL_INFORMATION), - "::", - stringify!(NamedPipeEnd), - ), - ); -} -pub type FILE_PIPE_LOCAL_INFORMATION = _FILE_PIPE_LOCAL_INFORMATION; -pub type PFILE_PIPE_LOCAL_INFORMATION = *mut _FILE_PIPE_LOCAL_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_PIPE_REMOTE_INFORMATION { - pub CollectDataTime: LARGE_INTEGER, - pub MaximumCollectionCount: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_PIPE_REMOTE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PIPE_REMOTE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PIPE_REMOTE_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_PIPE_REMOTE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PIPE_REMOTE_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_PIPE_REMOTE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CollectDataTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_REMOTE_INFORMATION), - "::", - stringify!(CollectDataTime), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumCollectionCount) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_REMOTE_INFORMATION), - "::", - stringify!(MaximumCollectionCount), - ), - ); -} -impl Default for _FILE_PIPE_REMOTE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_PIPE_REMOTE_INFORMATION = _FILE_PIPE_REMOTE_INFORMATION; -pub type PFILE_PIPE_REMOTE_INFORMATION = *mut _FILE_PIPE_REMOTE_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_MAILSLOT_QUERY_INFORMATION { - pub MaximumMessageSize: ULONG, - pub MailslotQuota: ULONG, - pub NextMessageSize: ULONG, - pub MessagesAvailable: ULONG, - pub ReadTimeout: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FILE_MAILSLOT_QUERY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_MAILSLOT_QUERY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_MAILSLOT_QUERY_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_MAILSLOT_QUERY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_MAILSLOT_QUERY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_MAILSLOT_QUERY_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumMessageSize) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MAILSLOT_QUERY_INFORMATION), - "::", - stringify!(MaximumMessageSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MailslotQuota) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MAILSLOT_QUERY_INFORMATION), - "::", - stringify!(MailslotQuota), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextMessageSize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MAILSLOT_QUERY_INFORMATION), - "::", - stringify!(NextMessageSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MessagesAvailable) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MAILSLOT_QUERY_INFORMATION), - "::", - stringify!(MessagesAvailable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadTimeout) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MAILSLOT_QUERY_INFORMATION), - "::", - stringify!(ReadTimeout), - ), - ); -} -impl Default for _FILE_MAILSLOT_QUERY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_MAILSLOT_QUERY_INFORMATION = _FILE_MAILSLOT_QUERY_INFORMATION; -pub type PFILE_MAILSLOT_QUERY_INFORMATION = *mut _FILE_MAILSLOT_QUERY_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_MAILSLOT_SET_INFORMATION { - pub ReadTimeout: PLARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FILE_MAILSLOT_SET_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_MAILSLOT_SET_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_MAILSLOT_SET_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_MAILSLOT_SET_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_MAILSLOT_SET_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_MAILSLOT_SET_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadTimeout) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MAILSLOT_SET_INFORMATION), - "::", - stringify!(ReadTimeout), - ), - ); -} -impl Default for _FILE_MAILSLOT_SET_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_MAILSLOT_SET_INFORMATION = _FILE_MAILSLOT_SET_INFORMATION; -pub type PFILE_MAILSLOT_SET_INFORMATION = *mut _FILE_MAILSLOT_SET_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_REPARSE_POINT_INFORMATION { - pub FileReference: LONGLONG, - pub Tag: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_REPARSE_POINT_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_REPARSE_POINT_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_REPARSE_POINT_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_REPARSE_POINT_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_REPARSE_POINT_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_REPARSE_POINT_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileReference) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REPARSE_POINT_INFORMATION), - "::", - stringify!(FileReference), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Tag) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REPARSE_POINT_INFORMATION), - "::", - stringify!(Tag), - ), - ); -} -pub type FILE_REPARSE_POINT_INFORMATION = _FILE_REPARSE_POINT_INFORMATION; -pub type PFILE_REPARSE_POINT_INFORMATION = *mut _FILE_REPARSE_POINT_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_LINK_ENTRY_INFORMATION { - pub NextEntryOffset: ULONG, - pub ParentFileId: LONGLONG, - pub FileNameLength: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_LINK_ENTRY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LINK_ENTRY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LINK_ENTRY_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_LINK_ENTRY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LINK_ENTRY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_LINK_ENTRY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINK_ENTRY_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParentFileId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINK_ENTRY_INFORMATION), - "::", - stringify!(ParentFileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINK_ENTRY_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINK_ENTRY_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -pub type FILE_LINK_ENTRY_INFORMATION = _FILE_LINK_ENTRY_INFORMATION; -pub type PFILE_LINK_ENTRY_INFORMATION = *mut _FILE_LINK_ENTRY_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_LINKS_INFORMATION { - pub BytesNeeded: ULONG, - pub EntriesReturned: ULONG, - pub Entry: FILE_LINK_ENTRY_INFORMATION, -} -#[test] -fn bindgen_test_layout__FILE_LINKS_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LINKS_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LINKS_INFORMATION>(), - 32usize, - concat!("Size of: ", stringify!(_FILE_LINKS_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LINKS_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_LINKS_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesNeeded) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINKS_INFORMATION), - "::", - stringify!(BytesNeeded), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntriesReturned) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINKS_INFORMATION), - "::", - stringify!(EntriesReturned), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Entry) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINKS_INFORMATION), - "::", - stringify!(Entry), - ), - ); -} -pub type FILE_LINKS_INFORMATION = _FILE_LINKS_INFORMATION; -pub type PFILE_LINKS_INFORMATION = *mut _FILE_LINKS_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_LINK_ENTRY_FULL_ID_INFORMATION { - pub NextEntryOffset: ULONG, - pub ParentFileId: FILE_ID_128, - pub FileNameLength: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_LINK_ENTRY_FULL_ID_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LINK_ENTRY_FULL_ID_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LINK_ENTRY_FULL_ID_INFORMATION>(), - 28usize, - concat!("Size of: ", stringify!(_FILE_LINK_ENTRY_FULL_ID_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LINK_ENTRY_FULL_ID_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_LINK_ENTRY_FULL_ID_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINK_ENTRY_FULL_ID_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParentFileId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINK_ENTRY_FULL_ID_INFORMATION), - "::", - stringify!(ParentFileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINK_ENTRY_FULL_ID_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINK_ENTRY_FULL_ID_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -pub type FILE_LINK_ENTRY_FULL_ID_INFORMATION = _FILE_LINK_ENTRY_FULL_ID_INFORMATION; -pub type PFILE_LINK_ENTRY_FULL_ID_INFORMATION = *mut _FILE_LINK_ENTRY_FULL_ID_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_LINKS_FULL_ID_INFORMATION { - pub BytesNeeded: ULONG, - pub EntriesReturned: ULONG, - pub Entry: FILE_LINK_ENTRY_FULL_ID_INFORMATION, -} -#[test] -fn bindgen_test_layout__FILE_LINKS_FULL_ID_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LINKS_FULL_ID_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LINKS_FULL_ID_INFORMATION>(), - 36usize, - concat!("Size of: ", stringify!(_FILE_LINKS_FULL_ID_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LINKS_FULL_ID_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_LINKS_FULL_ID_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesNeeded) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINKS_FULL_ID_INFORMATION), - "::", - stringify!(BytesNeeded), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntriesReturned) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINKS_FULL_ID_INFORMATION), - "::", - stringify!(EntriesReturned), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Entry) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LINKS_FULL_ID_INFORMATION), - "::", - stringify!(Entry), - ), - ); -} -pub type FILE_LINKS_FULL_ID_INFORMATION = _FILE_LINKS_FULL_ID_INFORMATION; -pub type PFILE_LINKS_FULL_ID_INFORMATION = *mut _FILE_LINKS_FULL_ID_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_NETWORK_PHYSICAL_NAME_INFORMATION { - pub FileNameLength: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_NETWORK_PHYSICAL_NAME_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_NETWORK_PHYSICAL_NAME_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_NETWORK_PHYSICAL_NAME_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_NETWORK_PHYSICAL_NAME_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_NETWORK_PHYSICAL_NAME_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_NETWORK_PHYSICAL_NAME_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NETWORK_PHYSICAL_NAME_INFORMATION), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_NETWORK_PHYSICAL_NAME_INFORMATION), - "::", - stringify!(FileName), - ), - ); -} -pub type FILE_NETWORK_PHYSICAL_NAME_INFORMATION = _FILE_NETWORK_PHYSICAL_NAME_INFORMATION; -pub type PFILE_NETWORK_PHYSICAL_NAME_INFORMATION = *mut _FILE_NETWORK_PHYSICAL_NAME_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_STANDARD_LINK_INFORMATION { - pub NumberOfAccessibleLinks: ULONG, - pub TotalNumberOfLinks: ULONG, - pub DeletePending: BOOLEAN, - pub Directory: BOOLEAN, -} -#[test] -fn bindgen_test_layout__FILE_STANDARD_LINK_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_STANDARD_LINK_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_STANDARD_LINK_INFORMATION>(), - 12usize, - concat!("Size of: ", stringify!(_FILE_STANDARD_LINK_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_STANDARD_LINK_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_STANDARD_LINK_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfAccessibleLinks) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_LINK_INFORMATION), - "::", - stringify!(NumberOfAccessibleLinks), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalNumberOfLinks) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_LINK_INFORMATION), - "::", - stringify!(TotalNumberOfLinks), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeletePending) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_LINK_INFORMATION), - "::", - stringify!(DeletePending), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Directory) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STANDARD_LINK_INFORMATION), - "::", - stringify!(Directory), - ), - ); -} -pub type FILE_STANDARD_LINK_INFORMATION = _FILE_STANDARD_LINK_INFORMATION; -pub type PFILE_STANDARD_LINK_INFORMATION = *mut _FILE_STANDARD_LINK_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_GET_EA_INFORMATION { - pub NextEntryOffset: ULONG, - pub EaNameLength: UCHAR, - pub EaName: [CHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_GET_EA_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_GET_EA_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_GET_EA_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_GET_EA_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_GET_EA_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_GET_EA_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_GET_EA_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaNameLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_GET_EA_INFORMATION), - "::", - stringify!(EaNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaName) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_FILE_GET_EA_INFORMATION), - "::", - stringify!(EaName), - ), - ); -} -pub type FILE_GET_EA_INFORMATION = _FILE_GET_EA_INFORMATION; -pub type PFILE_GET_EA_INFORMATION = *mut _FILE_GET_EA_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_REMOTE_PROTOCOL_INFORMATION { - pub StructureVersion: USHORT, - pub StructureSize: USHORT, - pub Protocol: ULONG, - pub ProtocolMajorVersion: USHORT, - pub ProtocolMinorVersion: USHORT, - pub ProtocolRevision: USHORT, - pub Reserved: USHORT, - pub Flags: ULONG, - pub GenericReserved: _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_1, - pub ProtocolSpecific: _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_1 { - pub Reserved: [ULONG; 8usize], -} -#[test] -fn bindgen_test_layout__FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_1>(), - 32usize, - concat!("Size of: ", stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_1), - "::", - stringify!(Reserved), - ), - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2 { - pub Smb2: _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1, - pub Reserved: [ULONG; 16usize], -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1 { - pub Server: _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1, - pub Share: _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1 { - pub Capabilities: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capabilities) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(Capabilities), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2 { - pub Capabilities: ULONG, - pub ShareFlags: ULONG, - pub ShareType: UCHAR, - pub Reserved0: [UCHAR; 3usize], - pub Reserved1: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2, - >(), - 16usize, - concat!( - "Size of: ", - stringify!( - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Capabilities) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(Capabilities), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShareFlags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!( - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(ShareFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShareType) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!( - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(ShareType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved0) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!( - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(Reserved0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!( - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(Reserved1), - ), - ); -} -#[test] -fn bindgen_test_layout__FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1, - >(), - 20usize, - concat!( - "Size of: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Server) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(Server), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Share) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(Share), - ), - ); -} -#[test] -fn bindgen_test_layout__FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2>(), - 64usize, - concat!("Size of: ", stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Smb2) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2), - "::", - stringify!(Smb2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _FILE_REMOTE_PROTOCOL_INFORMATION__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FILE_REMOTE_PROTOCOL_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_REMOTE_PROTOCOL_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_REMOTE_PROTOCOL_INFORMATION>(), - 116usize, - concat!("Size of: ", stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_REMOTE_PROTOCOL_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StructureVersion) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION), - "::", - stringify!(StructureVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StructureSize) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION), - "::", - stringify!(StructureSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Protocol) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION), - "::", - stringify!(Protocol), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProtocolMajorVersion) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION), - "::", - stringify!(ProtocolMajorVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProtocolMinorVersion) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION), - "::", - stringify!(ProtocolMinorVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProtocolRevision) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION), - "::", - stringify!(ProtocolRevision), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GenericReserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION), - "::", - stringify!(GenericReserved), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProtocolSpecific) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REMOTE_PROTOCOL_INFORMATION), - "::", - stringify!(ProtocolSpecific), - ), - ); -} -impl Default for _FILE_REMOTE_PROTOCOL_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_REMOTE_PROTOCOL_INFORMATION = _FILE_REMOTE_PROTOCOL_INFORMATION; -pub type PFILE_REMOTE_PROTOCOL_INFORMATION = *mut _FILE_REMOTE_PROTOCOL_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_GET_QUOTA_INFORMATION { - pub NextEntryOffset: ULONG, - pub SidLength: ULONG, - pub Sid: SID, -} -#[test] -fn bindgen_test_layout__FILE_GET_QUOTA_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_GET_QUOTA_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_GET_QUOTA_INFORMATION>(), - 20usize, - concat!("Size of: ", stringify!(_FILE_GET_QUOTA_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_GET_QUOTA_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_GET_QUOTA_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_GET_QUOTA_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_GET_QUOTA_INFORMATION), - "::", - stringify!(SidLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sid) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_GET_QUOTA_INFORMATION), - "::", - stringify!(Sid), - ), - ); -} -pub type FILE_GET_QUOTA_INFORMATION = _FILE_GET_QUOTA_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_QUOTA_INFORMATION { - pub NextEntryOffset: ULONG, - pub SidLength: ULONG, - pub ChangeTime: LARGE_INTEGER, - pub QuotaUsed: LARGE_INTEGER, - pub QuotaThreshold: LARGE_INTEGER, - pub QuotaLimit: LARGE_INTEGER, - pub Sid: SID, -} -#[test] -fn bindgen_test_layout__FILE_QUOTA_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_QUOTA_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_QUOTA_INFORMATION>(), - 56usize, - concat!("Size of: ", stringify!(_FILE_QUOTA_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_QUOTA_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_QUOTA_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUOTA_INFORMATION), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SidLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUOTA_INFORMATION), - "::", - stringify!(SidLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUOTA_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QuotaUsed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUOTA_INFORMATION), - "::", - stringify!(QuotaUsed), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QuotaThreshold) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUOTA_INFORMATION), - "::", - stringify!(QuotaThreshold), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QuotaLimit) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUOTA_INFORMATION), - "::", - stringify!(QuotaLimit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sid) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUOTA_INFORMATION), - "::", - stringify!(Sid), - ), - ); -} -impl Default for _FILE_QUOTA_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_QUOTA_INFORMATION = _FILE_QUOTA_INFORMATION; -pub type PFILE_QUOTA_INFORMATION = *mut _FILE_QUOTA_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_VOLUME_NAME_INFORMATION { - pub DeviceNameLength: ULONG, - pub DeviceName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_VOLUME_NAME_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_VOLUME_NAME_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_VOLUME_NAME_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_VOLUME_NAME_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_VOLUME_NAME_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_VOLUME_NAME_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceNameLength) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_VOLUME_NAME_INFORMATION), - "::", - stringify!(DeviceNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceName) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_VOLUME_NAME_INFORMATION), - "::", - stringify!(DeviceName), - ), - ); -} -pub type FILE_VOLUME_NAME_INFORMATION = _FILE_VOLUME_NAME_INFORMATION; -pub type PFILE_VOLUME_NAME_INFORMATION = *mut _FILE_VOLUME_NAME_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_FS_ATTRIBUTE_INFORMATION { - pub FileSystemAttributes: ULONG, - pub MaximumComponentNameLength: LONG, - pub FileSystemNameLength: ULONG, - pub FileSystemName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_FS_ATTRIBUTE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_ATTRIBUTE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_ATTRIBUTE_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_FS_ATTRIBUTE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_ATTRIBUTE_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_FS_ATTRIBUTE_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileSystemAttributes) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_ATTRIBUTE_INFORMATION), - "::", - stringify!(FileSystemAttributes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumComponentNameLength) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_ATTRIBUTE_INFORMATION), - "::", - stringify!(MaximumComponentNameLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileSystemNameLength) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_ATTRIBUTE_INFORMATION), - "::", - stringify!(FileSystemNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileSystemName) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_ATTRIBUTE_INFORMATION), - "::", - stringify!(FileSystemName), - ), - ); -} -pub type FILE_FS_ATTRIBUTE_INFORMATION = _FILE_FS_ATTRIBUTE_INFORMATION; -pub type PFILE_FS_ATTRIBUTE_INFORMATION = *mut _FILE_FS_ATTRIBUTE_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_FS_DRIVER_PATH_INFORMATION { - pub DriverInPath: BOOLEAN, - pub DriverNameLength: ULONG, - pub DriverName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_FS_DRIVER_PATH_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_DRIVER_PATH_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_DRIVER_PATH_INFORMATION>(), - 12usize, - concat!("Size of: ", stringify!(_FILE_FS_DRIVER_PATH_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_DRIVER_PATH_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_FS_DRIVER_PATH_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverInPath) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_DRIVER_PATH_INFORMATION), - "::", - stringify!(DriverInPath), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DriverNameLength) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_DRIVER_PATH_INFORMATION), - "::", - stringify!(DriverNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_DRIVER_PATH_INFORMATION), - "::", - stringify!(DriverName), - ), - ); -} -pub type FILE_FS_DRIVER_PATH_INFORMATION = _FILE_FS_DRIVER_PATH_INFORMATION; -pub type PFILE_FS_DRIVER_PATH_INFORMATION = *mut _FILE_FS_DRIVER_PATH_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_FS_VOLUME_FLAGS_INFORMATION { - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_FS_VOLUME_FLAGS_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_VOLUME_FLAGS_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_VOLUME_FLAGS_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_FS_VOLUME_FLAGS_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_VOLUME_FLAGS_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_FS_VOLUME_FLAGS_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_VOLUME_FLAGS_INFORMATION), - "::", - stringify!(Flags), - ), - ); -} -pub type FILE_FS_VOLUME_FLAGS_INFORMATION = _FILE_FS_VOLUME_FLAGS_INFORMATION; -pub type PFILE_FS_VOLUME_FLAGS_INFORMATION = *mut _FILE_FS_VOLUME_FLAGS_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_FS_CONTROL_INFORMATION { - pub FreeSpaceStartFiltering: LARGE_INTEGER, - pub FreeSpaceThreshold: LARGE_INTEGER, - pub FreeSpaceStopFiltering: LARGE_INTEGER, - pub DefaultQuotaThreshold: LARGE_INTEGER, - pub DefaultQuotaLimit: LARGE_INTEGER, - pub FileSystemControlFlags: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_FS_CONTROL_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_CONTROL_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_CONTROL_INFORMATION>(), - 48usize, - concat!("Size of: ", stringify!(_FILE_FS_CONTROL_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_CONTROL_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_FS_CONTROL_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeSpaceStartFiltering) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_CONTROL_INFORMATION), - "::", - stringify!(FreeSpaceStartFiltering), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeSpaceThreshold) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_CONTROL_INFORMATION), - "::", - stringify!(FreeSpaceThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeSpaceStopFiltering) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_CONTROL_INFORMATION), - "::", - stringify!(FreeSpaceStopFiltering), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DefaultQuotaThreshold) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_CONTROL_INFORMATION), - "::", - stringify!(DefaultQuotaThreshold), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DefaultQuotaLimit) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_CONTROL_INFORMATION), - "::", - stringify!(DefaultQuotaLimit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileSystemControlFlags) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_CONTROL_INFORMATION), - "::", - stringify!(FileSystemControlFlags), - ), - ); -} -impl Default for _FILE_FS_CONTROL_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_FS_CONTROL_INFORMATION = _FILE_FS_CONTROL_INFORMATION; -pub type PFILE_FS_CONTROL_INFORMATION = *mut _FILE_FS_CONTROL_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_FS_DATA_COPY_INFORMATION { - pub NumberOfCopies: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_FS_DATA_COPY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_DATA_COPY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_DATA_COPY_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_FS_DATA_COPY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_DATA_COPY_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_FS_DATA_COPY_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfCopies) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_DATA_COPY_INFORMATION), - "::", - stringify!(NumberOfCopies), - ), - ); -} -pub type FILE_FS_DATA_COPY_INFORMATION = _FILE_FS_DATA_COPY_INFORMATION; -pub type PFILE_FS_DATA_COPY_INFORMATION = *mut _FILE_FS_DATA_COPY_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_FS_GUID_INFORMATION { - pub FsGuid: GUID, -} -#[test] -fn bindgen_test_layout__FILE_FS_GUID_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_GUID_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_GUID_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_FS_GUID_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_GUID_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_FS_GUID_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FsGuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_GUID_INFORMATION), - "::", - stringify!(FsGuid), - ), - ); -} -pub type FILE_FS_GUID_INFORMATION = _FILE_FS_GUID_INFORMATION; -pub type PFILE_FS_GUID_INFORMATION = *mut _FILE_FS_GUID_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_END_OF_FILE_INFORMATION_EX { - pub EndOfFile: LARGE_INTEGER, - pub PagingFileSizeInMM: LARGE_INTEGER, - pub PagingFileMaxSize: LARGE_INTEGER, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_END_OF_FILE_INFORMATION_EX() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_END_OF_FILE_INFORMATION_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_END_OF_FILE_INFORMATION_EX>(), - 32usize, - concat!("Size of: ", stringify!(_FILE_END_OF_FILE_INFORMATION_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_END_OF_FILE_INFORMATION_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_END_OF_FILE_INFORMATION_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_END_OF_FILE_INFORMATION_EX), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PagingFileSizeInMM) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_END_OF_FILE_INFORMATION_EX), - "::", - stringify!(PagingFileSizeInMM), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PagingFileMaxSize) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_END_OF_FILE_INFORMATION_EX), - "::", - stringify!(PagingFileMaxSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_END_OF_FILE_INFORMATION_EX), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _FILE_END_OF_FILE_INFORMATION_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_END_OF_FILE_INFORMATION_EX = _FILE_END_OF_FILE_INFORMATION_EX; -pub type PFILE_END_OF_FILE_INFORMATION_EX = *mut _FILE_END_OF_FILE_INFORMATION_EX; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PATHNAME_BUFFER { - pub PathNameLength: ULONG, - pub Name: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__PATHNAME_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_PATHNAME_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PATHNAME_BUFFER>(), - 8usize, - concat!("Size of: ", stringify!(_PATHNAME_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_PATHNAME_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_PATHNAME_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PathNameLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PATHNAME_BUFFER), - "::", - stringify!(PathNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PATHNAME_BUFFER), - "::", - stringify!(Name), - ), - ); -} -pub type PATHNAME_BUFFER = _PATHNAME_BUFFER; -pub type PPATHNAME_BUFFER = *mut _PATHNAME_BUFFER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FSCTL_QUERY_FAT_BPB_BUFFER { - pub First0x24BytesOfBootSector: [UCHAR; 36usize], -} -#[test] -fn bindgen_test_layout__FSCTL_QUERY_FAT_BPB_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_QUERY_FAT_BPB_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_QUERY_FAT_BPB_BUFFER>(), - 36usize, - concat!("Size of: ", stringify!(_FSCTL_QUERY_FAT_BPB_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_QUERY_FAT_BPB_BUFFER>(), - 1usize, - concat!("Alignment of ", stringify!(_FSCTL_QUERY_FAT_BPB_BUFFER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).First0x24BytesOfBootSector) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_FAT_BPB_BUFFER), - "::", - stringify!(First0x24BytesOfBootSector), - ), - ); -} -impl Default for _FSCTL_QUERY_FAT_BPB_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSCTL_QUERY_FAT_BPB_BUFFER = _FSCTL_QUERY_FAT_BPB_BUFFER; -pub type PFSCTL_QUERY_FAT_BPB_BUFFER = *mut _FSCTL_QUERY_FAT_BPB_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct NTFS_VOLUME_DATA_BUFFER { - pub VolumeSerialNumber: LARGE_INTEGER, - pub NumberSectors: LARGE_INTEGER, - pub TotalClusters: LARGE_INTEGER, - pub FreeClusters: LARGE_INTEGER, - pub TotalReserved: LARGE_INTEGER, - pub BytesPerSector: ULONG, - pub BytesPerCluster: ULONG, - pub BytesPerFileRecordSegment: ULONG, - pub ClustersPerFileRecordSegment: ULONG, - pub MftValidDataLength: LARGE_INTEGER, - pub MftStartLcn: LARGE_INTEGER, - pub Mft2StartLcn: LARGE_INTEGER, - pub MftZoneStart: LARGE_INTEGER, - pub MftZoneEnd: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout_NTFS_VOLUME_DATA_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(NTFS_VOLUME_DATA_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(NTFS_VOLUME_DATA_BUFFER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeSerialNumber) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(VolumeSerialNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberSectors) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(NumberSectors), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalClusters) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(TotalClusters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeClusters) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(FreeClusters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalReserved) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(TotalReserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesPerSector) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(BytesPerSector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesPerCluster) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(BytesPerCluster), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BytesPerFileRecordSegment) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(BytesPerFileRecordSegment), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClustersPerFileRecordSegment) as usize - - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(ClustersPerFileRecordSegment), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftValidDataLength) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(MftValidDataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftStartLcn) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(MftStartLcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mft2StartLcn) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(Mft2StartLcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftZoneStart) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(MftZoneStart), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftZoneEnd) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(NTFS_VOLUME_DATA_BUFFER), - "::", - stringify!(MftZoneEnd), - ), - ); -} -impl Default for NTFS_VOLUME_DATA_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PNTFS_VOLUME_DATA_BUFFER = *mut NTFS_VOLUME_DATA_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct NTFS_EXTENDED_VOLUME_DATA { - pub ByteCount: ULONG, - pub MajorVersion: USHORT, - pub MinorVersion: USHORT, - pub BytesPerPhysicalSector: ULONG, - pub LfsMajorVersion: USHORT, - pub LfsMinorVersion: USHORT, - pub MaxDeviceTrimExtentCount: ULONG, - pub MaxDeviceTrimByteCount: ULONG, - pub MaxVolumeTrimExtentCount: ULONG, - pub MaxVolumeTrimByteCount: ULONG, -} -#[test] -fn bindgen_test_layout_NTFS_EXTENDED_VOLUME_DATA() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(NTFS_EXTENDED_VOLUME_DATA)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(NTFS_EXTENDED_VOLUME_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(NTFS_EXTENDED_VOLUME_DATA), - "::", - stringify!(ByteCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorVersion) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(NTFS_EXTENDED_VOLUME_DATA), - "::", - stringify!(MajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorVersion) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(NTFS_EXTENDED_VOLUME_DATA), - "::", - stringify!(MinorVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BytesPerPhysicalSector) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(NTFS_EXTENDED_VOLUME_DATA), - "::", - stringify!(BytesPerPhysicalSector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LfsMajorVersion) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(NTFS_EXTENDED_VOLUME_DATA), - "::", - stringify!(LfsMajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LfsMinorVersion) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(NTFS_EXTENDED_VOLUME_DATA), - "::", - stringify!(LfsMinorVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxDeviceTrimExtentCount) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(NTFS_EXTENDED_VOLUME_DATA), - "::", - stringify!(MaxDeviceTrimExtentCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxDeviceTrimByteCount) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(NTFS_EXTENDED_VOLUME_DATA), - "::", - stringify!(MaxDeviceTrimByteCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxVolumeTrimExtentCount) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(NTFS_EXTENDED_VOLUME_DATA), - "::", - stringify!(MaxVolumeTrimExtentCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxVolumeTrimByteCount) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(NTFS_EXTENDED_VOLUME_DATA), - "::", - stringify!(MaxVolumeTrimByteCount), - ), - ); -} -pub type PNTFS_EXTENDED_VOLUME_DATA = *mut NTFS_EXTENDED_VOLUME_DATA; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct REFS_VOLUME_DATA_BUFFER { - pub ByteCount: ULONG, - pub MajorVersion: ULONG, - pub MinorVersion: ULONG, - pub BytesPerPhysicalSector: ULONG, - pub VolumeSerialNumber: LARGE_INTEGER, - pub NumberSectors: LARGE_INTEGER, - pub TotalClusters: LARGE_INTEGER, - pub FreeClusters: LARGE_INTEGER, - pub TotalReserved: LARGE_INTEGER, - pub BytesPerSector: ULONG, - pub BytesPerCluster: ULONG, - pub MaximumSizeOfResidentFile: LARGE_INTEGER, - pub FastTierDataFillRatio: USHORT, - pub SlowTierDataFillRatio: USHORT, - pub DestagesFastTierToSlowTierRate: ULONG, - pub MetadataChecksumType: USHORT, - pub Reserved0: [UCHAR; 6usize], - pub Reserved: [LARGE_INTEGER; 8usize], -} -#[test] -fn bindgen_test_layout_REFS_VOLUME_DATA_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 152usize, - concat!("Size of: ", stringify!(REFS_VOLUME_DATA_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(REFS_VOLUME_DATA_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(ByteCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorVersion) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(MajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorVersion) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(MinorVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BytesPerPhysicalSector) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(BytesPerPhysicalSector), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeSerialNumber) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(VolumeSerialNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberSectors) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(NumberSectors), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalClusters) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(TotalClusters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeClusters) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(FreeClusters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalReserved) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(TotalReserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesPerSector) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(BytesPerSector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesPerCluster) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(BytesPerCluster), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumSizeOfResidentFile) as usize - - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(MaximumSizeOfResidentFile), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastTierDataFillRatio) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(FastTierDataFillRatio), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SlowTierDataFillRatio) as usize - ptr as usize - }, - 74usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(SlowTierDataFillRatio), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DestagesFastTierToSlowTierRate) as usize - - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(DestagesFastTierToSlowTierRate), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetadataChecksumType) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(MetadataChecksumType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved0) as usize - ptr as usize }, - 82usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(Reserved0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(REFS_VOLUME_DATA_BUFFER), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for REFS_VOLUME_DATA_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PREFS_VOLUME_DATA_BUFFER = *mut REFS_VOLUME_DATA_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct STARTING_LCN_INPUT_BUFFER { - pub StartingLcn: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout_STARTING_LCN_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(STARTING_LCN_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(STARTING_LCN_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingLcn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(STARTING_LCN_INPUT_BUFFER), - "::", - stringify!(StartingLcn), - ), - ); -} -impl Default for STARTING_LCN_INPUT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PSTARTING_LCN_INPUT_BUFFER = *mut STARTING_LCN_INPUT_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct STARTING_LCN_INPUT_BUFFER_EX { - pub StartingLcn: LARGE_INTEGER, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout_STARTING_LCN_INPUT_BUFFER_EX() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(STARTING_LCN_INPUT_BUFFER_EX)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(STARTING_LCN_INPUT_BUFFER_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingLcn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(STARTING_LCN_INPUT_BUFFER_EX), - "::", - stringify!(StartingLcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(STARTING_LCN_INPUT_BUFFER_EX), - "::", - stringify!(Flags), - ), - ); -} -impl Default for STARTING_LCN_INPUT_BUFFER_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PSTARTING_LCN_INPUT_BUFFER_EX = *mut STARTING_LCN_INPUT_BUFFER_EX; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct VOLUME_BITMAP_BUFFER { - pub StartingLcn: LARGE_INTEGER, - pub BitmapSize: LARGE_INTEGER, - pub Buffer: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout_VOLUME_BITMAP_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(VOLUME_BITMAP_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(VOLUME_BITMAP_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingLcn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(VOLUME_BITMAP_BUFFER), - "::", - stringify!(StartingLcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BitmapSize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(VOLUME_BITMAP_BUFFER), - "::", - stringify!(BitmapSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(VOLUME_BITMAP_BUFFER), - "::", - stringify!(Buffer), - ), - ); -} -impl Default for VOLUME_BITMAP_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PVOLUME_BITMAP_BUFFER = *mut VOLUME_BITMAP_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct STARTING_VCN_INPUT_BUFFER { - pub StartingVcn: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout_STARTING_VCN_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(STARTING_VCN_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(STARTING_VCN_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingVcn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(STARTING_VCN_INPUT_BUFFER), - "::", - stringify!(StartingVcn), - ), - ); -} -impl Default for STARTING_VCN_INPUT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PSTARTING_VCN_INPUT_BUFFER = *mut STARTING_VCN_INPUT_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct RETRIEVAL_POINTERS_BUFFER { - pub ExtentCount: ULONG, - pub StartingVcn: LARGE_INTEGER, - pub Extents: [RETRIEVAL_POINTERS_BUFFER__bindgen_ty_1; 1usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct RETRIEVAL_POINTERS_BUFFER__bindgen_ty_1 { - pub NextVcn: LARGE_INTEGER, - pub Lcn: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout_RETRIEVAL_POINTERS_BUFFER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(RETRIEVAL_POINTERS_BUFFER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(RETRIEVAL_POINTERS_BUFFER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextVcn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(RETRIEVAL_POINTERS_BUFFER__bindgen_ty_1), - "::", - stringify!(NextVcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lcn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(RETRIEVAL_POINTERS_BUFFER__bindgen_ty_1), - "::", - stringify!(Lcn), - ), - ); -} -impl Default for RETRIEVAL_POINTERS_BUFFER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout_RETRIEVAL_POINTERS_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(RETRIEVAL_POINTERS_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(RETRIEVAL_POINTERS_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtentCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(RETRIEVAL_POINTERS_BUFFER), - "::", - stringify!(ExtentCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingVcn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(RETRIEVAL_POINTERS_BUFFER), - "::", - stringify!(StartingVcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Extents) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(RETRIEVAL_POINTERS_BUFFER), - "::", - stringify!(Extents), - ), - ); -} -impl Default for RETRIEVAL_POINTERS_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PRETRIEVAL_POINTERS_BUFFER = *mut RETRIEVAL_POINTERS_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER { - pub ExtentCount: ULONG, - pub StartingVcn: LARGE_INTEGER, - pub Extents: [RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER__bindgen_ty_1; 1usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER__bindgen_ty_1 { - pub NextVcn: LARGE_INTEGER, - pub Lcn: LARGE_INTEGER, - pub ReferenceCount: ULONG, -} -#[test] -fn bindgen_test_layout_RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 24usize, - concat!( - "Size of: ", - stringify!(RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextVcn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER__bindgen_ty_1), - "::", - stringify!(NextVcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lcn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER__bindgen_ty_1), - "::", - stringify!(Lcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReferenceCount) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER__bindgen_ty_1), - "::", - stringify!(ReferenceCount), - ), - ); -} -impl Default for RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout_RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtentCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER), - "::", - stringify!(ExtentCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingVcn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER), - "::", - stringify!(StartingVcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Extents) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER), - "::", - stringify!(Extents), - ), - ); -} -impl Default for RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PRETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER = *mut RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct RETRIEVAL_POINTER_COUNT { - pub ExtentCount: ULONG, -} -#[test] -fn bindgen_test_layout_RETRIEVAL_POINTER_COUNT() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(RETRIEVAL_POINTER_COUNT)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(RETRIEVAL_POINTER_COUNT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtentCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(RETRIEVAL_POINTER_COUNT), - "::", - stringify!(ExtentCount), - ), - ); -} -pub type PRETRIEVAL_POINTER_COUNT = *mut RETRIEVAL_POINTER_COUNT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct NTFS_FILE_RECORD_INPUT_BUFFER { - pub FileReferenceNumber: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout_NTFS_FILE_RECORD_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(NTFS_FILE_RECORD_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(NTFS_FILE_RECORD_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileReferenceNumber) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(NTFS_FILE_RECORD_INPUT_BUFFER), - "::", - stringify!(FileReferenceNumber), - ), - ); -} -impl Default for NTFS_FILE_RECORD_INPUT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PNTFS_FILE_RECORD_INPUT_BUFFER = *mut NTFS_FILE_RECORD_INPUT_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct NTFS_FILE_RECORD_OUTPUT_BUFFER { - pub FileReferenceNumber: LARGE_INTEGER, - pub FileRecordLength: ULONG, - pub FileRecordBuffer: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout_NTFS_FILE_RECORD_OUTPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(NTFS_FILE_RECORD_OUTPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(NTFS_FILE_RECORD_OUTPUT_BUFFER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileReferenceNumber) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(NTFS_FILE_RECORD_OUTPUT_BUFFER), - "::", - stringify!(FileReferenceNumber), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileRecordLength) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(NTFS_FILE_RECORD_OUTPUT_BUFFER), - "::", - stringify!(FileRecordLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileRecordBuffer) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(NTFS_FILE_RECORD_OUTPUT_BUFFER), - "::", - stringify!(FileRecordBuffer), - ), - ); -} -impl Default for NTFS_FILE_RECORD_OUTPUT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PNTFS_FILE_RECORD_OUTPUT_BUFFER = *mut NTFS_FILE_RECORD_OUTPUT_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct MOVE_FILE_DATA { - pub FileHandle: HANDLE, - pub StartingVcn: LARGE_INTEGER, - pub StartingLcn: LARGE_INTEGER, - pub ClusterCount: ULONG, -} -#[test] -fn bindgen_test_layout_MOVE_FILE_DATA() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(MOVE_FILE_DATA)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(MOVE_FILE_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(MOVE_FILE_DATA), - "::", - stringify!(FileHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingVcn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(MOVE_FILE_DATA), - "::", - stringify!(StartingVcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingLcn) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(MOVE_FILE_DATA), - "::", - stringify!(StartingLcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClusterCount) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(MOVE_FILE_DATA), - "::", - stringify!(ClusterCount), - ), - ); -} -impl Default for MOVE_FILE_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PMOVE_FILE_DATA = *mut MOVE_FILE_DATA; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct MOVE_FILE_RECORD_DATA { - pub FileHandle: HANDLE, - pub SourceFileRecord: LARGE_INTEGER, - pub TargetFileRecord: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout_MOVE_FILE_RECORD_DATA() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(MOVE_FILE_RECORD_DATA)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(MOVE_FILE_RECORD_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(MOVE_FILE_RECORD_DATA), - "::", - stringify!(FileHandle), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceFileRecord) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(MOVE_FILE_RECORD_DATA), - "::", - stringify!(SourceFileRecord), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetFileRecord) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(MOVE_FILE_RECORD_DATA), - "::", - stringify!(TargetFileRecord), - ), - ); -} -impl Default for MOVE_FILE_RECORD_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PMOVE_FILE_RECORD_DATA = *mut MOVE_FILE_RECORD_DATA; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _MOVE_FILE_DATA32 { - pub FileHandle: UINT32, - pub StartingVcn: LARGE_INTEGER, - pub StartingLcn: LARGE_INTEGER, - pub ClusterCount: ULONG, -} -#[test] -fn bindgen_test_layout__MOVE_FILE_DATA32() { - const UNINIT: ::core::mem::MaybeUninit<_MOVE_FILE_DATA32> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MOVE_FILE_DATA32>(), - 32usize, - concat!("Size of: ", stringify!(_MOVE_FILE_DATA32)), - ); - assert_eq!( - ::core::mem::align_of::<_MOVE_FILE_DATA32>(), - 8usize, - concat!("Alignment of ", stringify!(_MOVE_FILE_DATA32)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MOVE_FILE_DATA32), - "::", - stringify!(FileHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingVcn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MOVE_FILE_DATA32), - "::", - stringify!(StartingVcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingLcn) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MOVE_FILE_DATA32), - "::", - stringify!(StartingLcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClusterCount) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_MOVE_FILE_DATA32), - "::", - stringify!(ClusterCount), - ), - ); -} -impl Default for _MOVE_FILE_DATA32 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MOVE_FILE_DATA32 = _MOVE_FILE_DATA32; -pub type PMOVE_FILE_DATA32 = *mut _MOVE_FILE_DATA32; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct FIND_BY_SID_DATA { - pub Restart: ULONG, - pub Sid: SID, -} -#[test] -fn bindgen_test_layout_FIND_BY_SID_DATA() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(FIND_BY_SID_DATA)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(FIND_BY_SID_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Restart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FIND_BY_SID_DATA), - "::", - stringify!(Restart), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Sid) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(FIND_BY_SID_DATA), "::", stringify!(Sid)), - ); -} -pub type PFIND_BY_SID_DATA = *mut FIND_BY_SID_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct FIND_BY_SID_OUTPUT { - pub NextEntryOffset: ULONG, - pub FileIndex: ULONG, - pub FileNameLength: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout_FIND_BY_SID_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(FIND_BY_SID_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(FIND_BY_SID_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FIND_BY_SID_OUTPUT), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(FIND_BY_SID_OUTPUT), - "::", - stringify!(FileIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FIND_BY_SID_OUTPUT), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(FIND_BY_SID_OUTPUT), - "::", - stringify!(FileName), - ), - ); -} -pub type PFIND_BY_SID_OUTPUT = *mut FIND_BY_SID_OUTPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct MFT_ENUM_DATA_V0 { - pub StartFileReferenceNumber: ULONGLONG, - pub LowUsn: USN, - pub HighUsn: USN, -} -#[test] -fn bindgen_test_layout_MFT_ENUM_DATA_V0() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(MFT_ENUM_DATA_V0)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(MFT_ENUM_DATA_V0)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StartFileReferenceNumber) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(MFT_ENUM_DATA_V0), - "::", - stringify!(StartFileReferenceNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowUsn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(MFT_ENUM_DATA_V0), - "::", - stringify!(LowUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HighUsn) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(MFT_ENUM_DATA_V0), - "::", - stringify!(HighUsn), - ), - ); -} -pub type PMFT_ENUM_DATA_V0 = *mut MFT_ENUM_DATA_V0; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct MFT_ENUM_DATA_V1 { - pub StartFileReferenceNumber: ULONGLONG, - pub LowUsn: USN, - pub HighUsn: USN, - pub MinMajorVersion: USHORT, - pub MaxMajorVersion: USHORT, -} -#[test] -fn bindgen_test_layout_MFT_ENUM_DATA_V1() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(MFT_ENUM_DATA_V1)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(MFT_ENUM_DATA_V1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StartFileReferenceNumber) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(MFT_ENUM_DATA_V1), - "::", - stringify!(StartFileReferenceNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowUsn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(MFT_ENUM_DATA_V1), - "::", - stringify!(LowUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HighUsn) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(MFT_ENUM_DATA_V1), - "::", - stringify!(HighUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinMajorVersion) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(MFT_ENUM_DATA_V1), - "::", - stringify!(MinMajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxMajorVersion) as usize - ptr as usize }, - 26usize, - concat!( - "Offset of field: ", - stringify!(MFT_ENUM_DATA_V1), - "::", - stringify!(MaxMajorVersion), - ), - ); -} -pub type PMFT_ENUM_DATA_V1 = *mut MFT_ENUM_DATA_V1; -pub type MFT_ENUM_DATA = MFT_ENUM_DATA_V1; -pub type PMFT_ENUM_DATA = *mut MFT_ENUM_DATA_V1; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct CREATE_USN_JOURNAL_DATA { - pub MaximumSize: ULONGLONG, - pub AllocationDelta: ULONGLONG, -} -#[test] -fn bindgen_test_layout_CREATE_USN_JOURNAL_DATA() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CREATE_USN_JOURNAL_DATA)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CREATE_USN_JOURNAL_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CREATE_USN_JOURNAL_DATA), - "::", - stringify!(MaximumSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationDelta) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CREATE_USN_JOURNAL_DATA), - "::", - stringify!(AllocationDelta), - ), - ); -} -pub type PCREATE_USN_JOURNAL_DATA = *mut CREATE_USN_JOURNAL_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct READ_FILE_USN_DATA { - pub MinMajorVersion: USHORT, - pub MaxMajorVersion: USHORT, -} -#[test] -fn bindgen_test_layout_READ_FILE_USN_DATA() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(READ_FILE_USN_DATA)), - ); - assert_eq!( - ::core::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(READ_FILE_USN_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinMajorVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(READ_FILE_USN_DATA), - "::", - stringify!(MinMajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxMajorVersion) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(READ_FILE_USN_DATA), - "::", - stringify!(MaxMajorVersion), - ), - ); -} -pub type PREAD_FILE_USN_DATA = *mut READ_FILE_USN_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct READ_USN_JOURNAL_DATA_V0 { - pub StartUsn: USN, - pub ReasonMask: ULONG, - pub ReturnOnlyOnClose: ULONG, - pub Timeout: ULONGLONG, - pub BytesToWaitFor: ULONGLONG, - pub UsnJournalID: ULONGLONG, -} -#[test] -fn bindgen_test_layout_READ_USN_JOURNAL_DATA_V0() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(READ_USN_JOURNAL_DATA_V0)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(READ_USN_JOURNAL_DATA_V0)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartUsn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V0), - "::", - stringify!(StartUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReasonMask) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V0), - "::", - stringify!(ReasonMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReturnOnlyOnClose) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V0), - "::", - stringify!(ReturnOnlyOnClose), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Timeout) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V0), - "::", - stringify!(Timeout), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesToWaitFor) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V0), - "::", - stringify!(BytesToWaitFor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UsnJournalID) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V0), - "::", - stringify!(UsnJournalID), - ), - ); -} -pub type PREAD_USN_JOURNAL_DATA_V0 = *mut READ_USN_JOURNAL_DATA_V0; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct READ_USN_JOURNAL_DATA_V1 { - pub StartUsn: USN, - pub ReasonMask: ULONG, - pub ReturnOnlyOnClose: ULONG, - pub Timeout: ULONGLONG, - pub BytesToWaitFor: ULONGLONG, - pub UsnJournalID: ULONGLONG, - pub MinMajorVersion: USHORT, - pub MaxMajorVersion: USHORT, -} -#[test] -fn bindgen_test_layout_READ_USN_JOURNAL_DATA_V1() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(READ_USN_JOURNAL_DATA_V1)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(READ_USN_JOURNAL_DATA_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartUsn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V1), - "::", - stringify!(StartUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReasonMask) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V1), - "::", - stringify!(ReasonMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReturnOnlyOnClose) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V1), - "::", - stringify!(ReturnOnlyOnClose), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Timeout) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V1), - "::", - stringify!(Timeout), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesToWaitFor) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V1), - "::", - stringify!(BytesToWaitFor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UsnJournalID) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V1), - "::", - stringify!(UsnJournalID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinMajorVersion) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V1), - "::", - stringify!(MinMajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxMajorVersion) as usize - ptr as usize }, - 42usize, - concat!( - "Offset of field: ", - stringify!(READ_USN_JOURNAL_DATA_V1), - "::", - stringify!(MaxMajorVersion), - ), - ); -} -pub type PREAD_USN_JOURNAL_DATA_V1 = *mut READ_USN_JOURNAL_DATA_V1; -pub type READ_USN_JOURNAL_DATA = READ_USN_JOURNAL_DATA_V1; -pub type PREAD_USN_JOURNAL_DATA = *mut READ_USN_JOURNAL_DATA_V1; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct USN_TRACK_MODIFIED_RANGES { - pub Flags: ULONG, - pub Unused: ULONG, - pub ChunkSize: ULONGLONG, - pub FileSizeThreshold: LONGLONG, -} -#[test] -fn bindgen_test_layout_USN_TRACK_MODIFIED_RANGES() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(USN_TRACK_MODIFIED_RANGES)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(USN_TRACK_MODIFIED_RANGES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(USN_TRACK_MODIFIED_RANGES), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(USN_TRACK_MODIFIED_RANGES), - "::", - stringify!(Unused), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChunkSize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(USN_TRACK_MODIFIED_RANGES), - "::", - stringify!(ChunkSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileSizeThreshold) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(USN_TRACK_MODIFIED_RANGES), - "::", - stringify!(FileSizeThreshold), - ), - ); -} -pub type PUSN_TRACK_MODIFIED_RANGES = *mut USN_TRACK_MODIFIED_RANGES; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct USN_RANGE_TRACK_OUTPUT { - pub Usn: USN, -} -#[test] -fn bindgen_test_layout_USN_RANGE_TRACK_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(USN_RANGE_TRACK_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(USN_RANGE_TRACK_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Usn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(USN_RANGE_TRACK_OUTPUT), - "::", - stringify!(Usn), - ), - ); -} -pub type PUSN_RANGE_TRACK_OUTPUT = *mut USN_RANGE_TRACK_OUTPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct USN_RECORD_V2 { - pub RecordLength: ULONG, - pub MajorVersion: USHORT, - pub MinorVersion: USHORT, - pub FileReferenceNumber: ULONGLONG, - pub ParentFileReferenceNumber: ULONGLONG, - pub Usn: USN, - pub TimeStamp: LARGE_INTEGER, - pub Reason: ULONG, - pub SourceInfo: ULONG, - pub SecurityId: ULONG, - pub FileAttributes: ULONG, - pub FileNameLength: USHORT, - pub FileNameOffset: USHORT, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout_USN_RECORD_V2() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(USN_RECORD_V2)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(USN_RECORD_V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecordLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V2), - "::", - stringify!(RecordLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorVersion) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V2), - "::", - stringify!(MajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorVersion) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V2), - "::", - stringify!(MinorVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileReferenceNumber) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V2), - "::", - stringify!(FileReferenceNumber), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ParentFileReferenceNumber) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V2), - "::", - stringify!(ParentFileReferenceNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Usn) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(USN_RECORD_V2), "::", stringify!(Usn)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimeStamp) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V2), - "::", - stringify!(TimeStamp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reason) as usize - ptr as usize }, - 40usize, - concat!("Offset of field: ", stringify!(USN_RECORD_V2), "::", stringify!(Reason)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceInfo) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V2), - "::", - stringify!(SourceInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecurityId) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V2), - "::", - stringify!(SecurityId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V2), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V2), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameOffset) as usize - ptr as usize }, - 58usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V2), - "::", - stringify!(FileNameOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V2), - "::", - stringify!(FileName), - ), - ); -} -impl Default for USN_RECORD_V2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PUSN_RECORD_V2 = *mut USN_RECORD_V2; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct USN_RECORD_V3 { - pub RecordLength: ULONG, - pub MajorVersion: USHORT, - pub MinorVersion: USHORT, - pub FileReferenceNumber: FILE_ID_128, - pub ParentFileReferenceNumber: FILE_ID_128, - pub Usn: USN, - pub TimeStamp: LARGE_INTEGER, - pub Reason: ULONG, - pub SourceInfo: ULONG, - pub SecurityId: ULONG, - pub FileAttributes: ULONG, - pub FileNameLength: USHORT, - pub FileNameOffset: USHORT, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout_USN_RECORD_V3() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(USN_RECORD_V3)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(USN_RECORD_V3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecordLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V3), - "::", - stringify!(RecordLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorVersion) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V3), - "::", - stringify!(MajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorVersion) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V3), - "::", - stringify!(MinorVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileReferenceNumber) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V3), - "::", - stringify!(FileReferenceNumber), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ParentFileReferenceNumber) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V3), - "::", - stringify!(ParentFileReferenceNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Usn) as usize - ptr as usize }, - 40usize, - concat!("Offset of field: ", stringify!(USN_RECORD_V3), "::", stringify!(Usn)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimeStamp) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V3), - "::", - stringify!(TimeStamp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reason) as usize - ptr as usize }, - 56usize, - concat!("Offset of field: ", stringify!(USN_RECORD_V3), "::", stringify!(Reason)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceInfo) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V3), - "::", - stringify!(SourceInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecurityId) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V3), - "::", - stringify!(SecurityId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V3), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V3), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameOffset) as usize - ptr as usize }, - 74usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V3), - "::", - stringify!(FileNameOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V3), - "::", - stringify!(FileName), - ), - ); -} -impl Default for USN_RECORD_V3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PUSN_RECORD_V3 = *mut USN_RECORD_V3; -pub type USN_RECORD = USN_RECORD_V2; -pub type PUSN_RECORD = *mut USN_RECORD_V2; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct USN_RECORD_COMMON_HEADER { - pub RecordLength: ULONG, - pub MajorVersion: USHORT, - pub MinorVersion: USHORT, -} -#[test] -fn bindgen_test_layout_USN_RECORD_COMMON_HEADER() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(USN_RECORD_COMMON_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(USN_RECORD_COMMON_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecordLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_COMMON_HEADER), - "::", - stringify!(RecordLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorVersion) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_COMMON_HEADER), - "::", - stringify!(MajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorVersion) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_COMMON_HEADER), - "::", - stringify!(MinorVersion), - ), - ); -} -pub type PUSN_RECORD_COMMON_HEADER = *mut USN_RECORD_COMMON_HEADER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct USN_RECORD_EXTENT { - pub Offset: LONGLONG, - pub Length: LONGLONG, -} -#[test] -fn bindgen_test_layout_USN_RECORD_EXTENT() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(USN_RECORD_EXTENT)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(USN_RECORD_EXTENT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_EXTENT), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_EXTENT), - "::", - stringify!(Length), - ), - ); -} -pub type PUSN_RECORD_EXTENT = *mut USN_RECORD_EXTENT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct USN_RECORD_V4 { - pub Header: USN_RECORD_COMMON_HEADER, - pub FileReferenceNumber: FILE_ID_128, - pub ParentFileReferenceNumber: FILE_ID_128, - pub Usn: USN, - pub Reason: ULONG, - pub SourceInfo: ULONG, - pub RemainingExtents: ULONG, - pub NumberOfExtents: USHORT, - pub ExtentSize: USHORT, - pub Extents: [USN_RECORD_EXTENT; 1usize], -} -#[test] -fn bindgen_test_layout_USN_RECORD_V4() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(USN_RECORD_V4)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(USN_RECORD_V4)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(USN_RECORD_V4), "::", stringify!(Header)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileReferenceNumber) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V4), - "::", - stringify!(FileReferenceNumber), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ParentFileReferenceNumber) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V4), - "::", - stringify!(ParentFileReferenceNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Usn) as usize - ptr as usize }, - 40usize, - concat!("Offset of field: ", stringify!(USN_RECORD_V4), "::", stringify!(Usn)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reason) as usize - ptr as usize }, - 48usize, - concat!("Offset of field: ", stringify!(USN_RECORD_V4), "::", stringify!(Reason)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceInfo) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V4), - "::", - stringify!(SourceInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RemainingExtents) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V4), - "::", - stringify!(RemainingExtents), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfExtents) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V4), - "::", - stringify!(NumberOfExtents), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtentSize) as usize - ptr as usize }, - 62usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V4), - "::", - stringify!(ExtentSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Extents) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_V4), - "::", - stringify!(Extents), - ), - ); -} -pub type PUSN_RECORD_V4 = *mut USN_RECORD_V4; -#[repr(C)] -#[derive(Copy, Clone)] -pub union USN_RECORD_UNION { - pub Header: USN_RECORD_COMMON_HEADER, - pub V2: USN_RECORD_V2, - pub V3: USN_RECORD_V3, - pub V4: USN_RECORD_V4, -} -#[test] -fn bindgen_test_layout_USN_RECORD_UNION() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(USN_RECORD_UNION)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(USN_RECORD_UNION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(USN_RECORD_UNION), - "::", - stringify!(Header), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).V2) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(USN_RECORD_UNION), "::", stringify!(V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).V3) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(USN_RECORD_UNION), "::", stringify!(V3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).V4) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(USN_RECORD_UNION), "::", stringify!(V4)), - ); -} -impl Default for USN_RECORD_UNION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PUSN_RECORD_UNION = *mut USN_RECORD_UNION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct USN_JOURNAL_DATA_V0 { - pub UsnJournalID: ULONGLONG, - pub FirstUsn: USN, - pub NextUsn: USN, - pub LowestValidUsn: USN, - pub MaxUsn: USN, - pub MaximumSize: ULONGLONG, - pub AllocationDelta: ULONGLONG, -} -#[test] -fn bindgen_test_layout_USN_JOURNAL_DATA_V0() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(USN_JOURNAL_DATA_V0)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(USN_JOURNAL_DATA_V0)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UsnJournalID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V0), - "::", - stringify!(UsnJournalID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FirstUsn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V0), - "::", - stringify!(FirstUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextUsn) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V0), - "::", - stringify!(NextUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowestValidUsn) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V0), - "::", - stringify!(LowestValidUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxUsn) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V0), - "::", - stringify!(MaxUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumSize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V0), - "::", - stringify!(MaximumSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationDelta) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V0), - "::", - stringify!(AllocationDelta), - ), - ); -} -pub type PUSN_JOURNAL_DATA_V0 = *mut USN_JOURNAL_DATA_V0; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct USN_JOURNAL_DATA_V1 { - pub UsnJournalID: ULONGLONG, - pub FirstUsn: USN, - pub NextUsn: USN, - pub LowestValidUsn: USN, - pub MaxUsn: USN, - pub MaximumSize: ULONGLONG, - pub AllocationDelta: ULONGLONG, - pub MinSupportedMajorVersion: USHORT, - pub MaxSupportedMajorVersion: USHORT, -} -#[test] -fn bindgen_test_layout_USN_JOURNAL_DATA_V1() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(USN_JOURNAL_DATA_V1)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(USN_JOURNAL_DATA_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UsnJournalID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V1), - "::", - stringify!(UsnJournalID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FirstUsn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V1), - "::", - stringify!(FirstUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextUsn) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V1), - "::", - stringify!(NextUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowestValidUsn) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V1), - "::", - stringify!(LowestValidUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxUsn) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V1), - "::", - stringify!(MaxUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumSize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V1), - "::", - stringify!(MaximumSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationDelta) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V1), - "::", - stringify!(AllocationDelta), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MinSupportedMajorVersion) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V1), - "::", - stringify!(MinSupportedMajorVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxSupportedMajorVersion) as usize - - ptr as usize - }, - 58usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V1), - "::", - stringify!(MaxSupportedMajorVersion), - ), - ); -} -pub type PUSN_JOURNAL_DATA_V1 = *mut USN_JOURNAL_DATA_V1; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct USN_JOURNAL_DATA_V2 { - pub UsnJournalID: ULONGLONG, - pub FirstUsn: USN, - pub NextUsn: USN, - pub LowestValidUsn: USN, - pub MaxUsn: USN, - pub MaximumSize: ULONGLONG, - pub AllocationDelta: ULONGLONG, - pub MinSupportedMajorVersion: USHORT, - pub MaxSupportedMajorVersion: USHORT, - pub Flags: ULONG, - pub RangeTrackChunkSize: ULONGLONG, - pub RangeTrackFileSizeThreshold: LONGLONG, -} -#[test] -fn bindgen_test_layout_USN_JOURNAL_DATA_V2() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(USN_JOURNAL_DATA_V2)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(USN_JOURNAL_DATA_V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UsnJournalID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V2), - "::", - stringify!(UsnJournalID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FirstUsn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V2), - "::", - stringify!(FirstUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextUsn) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V2), - "::", - stringify!(NextUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowestValidUsn) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V2), - "::", - stringify!(LowestValidUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaxUsn) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V2), - "::", - stringify!(MaxUsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumSize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V2), - "::", - stringify!(MaximumSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationDelta) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V2), - "::", - stringify!(AllocationDelta), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MinSupportedMajorVersion) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V2), - "::", - stringify!(MinSupportedMajorVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxSupportedMajorVersion) as usize - - ptr as usize - }, - 58usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V2), - "::", - stringify!(MaxSupportedMajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V2), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RangeTrackChunkSize) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V2), - "::", - stringify!(RangeTrackChunkSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RangeTrackFileSizeThreshold) as usize - - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(USN_JOURNAL_DATA_V2), - "::", - stringify!(RangeTrackFileSizeThreshold), - ), - ); -} -pub type PUSN_JOURNAL_DATA_V2 = *mut USN_JOURNAL_DATA_V2; -pub type USN_JOURNAL_DATA = USN_JOURNAL_DATA_V1; -pub type PUSN_JOURNAL_DATA = *mut USN_JOURNAL_DATA_V1; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct DELETE_USN_JOURNAL_DATA { - pub UsnJournalID: ULONGLONG, - pub DeleteFlags: ULONG, -} -#[test] -fn bindgen_test_layout_DELETE_USN_JOURNAL_DATA() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(DELETE_USN_JOURNAL_DATA)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(DELETE_USN_JOURNAL_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UsnJournalID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(DELETE_USN_JOURNAL_DATA), - "::", - stringify!(UsnJournalID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeleteFlags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(DELETE_USN_JOURNAL_DATA), - "::", - stringify!(DeleteFlags), - ), - ); -} -pub type PDELETE_USN_JOURNAL_DATA = *mut DELETE_USN_JOURNAL_DATA; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _MARK_HANDLE_INFO { - pub __bindgen_anon_1: _MARK_HANDLE_INFO__bindgen_ty_1, - pub VolumeHandle: HANDLE, - pub HandleInfo: ULONG, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _MARK_HANDLE_INFO__bindgen_ty_1 { - pub UsnSourceInfo: ULONG, - pub CopyNumber: ULONG, -} -#[test] -fn bindgen_test_layout__MARK_HANDLE_INFO__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_MARK_HANDLE_INFO__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MARK_HANDLE_INFO__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_MARK_HANDLE_INFO__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_MARK_HANDLE_INFO__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_MARK_HANDLE_INFO__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UsnSourceInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MARK_HANDLE_INFO__bindgen_ty_1), - "::", - stringify!(UsnSourceInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CopyNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MARK_HANDLE_INFO__bindgen_ty_1), - "::", - stringify!(CopyNumber), - ), - ); -} -impl Default for _MARK_HANDLE_INFO__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__MARK_HANDLE_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_MARK_HANDLE_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MARK_HANDLE_INFO>(), - 24usize, - concat!("Size of: ", stringify!(_MARK_HANDLE_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_MARK_HANDLE_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_MARK_HANDLE_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeHandle) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MARK_HANDLE_INFO), - "::", - stringify!(VolumeHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HandleInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MARK_HANDLE_INFO), - "::", - stringify!(HandleInfo), - ), - ); -} -impl Default for _MARK_HANDLE_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MARK_HANDLE_INFO = _MARK_HANDLE_INFO; -pub type PMARK_HANDLE_INFO = *mut _MARK_HANDLE_INFO; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _MARK_HANDLE_INFO32 { - pub __bindgen_anon_1: _MARK_HANDLE_INFO32__bindgen_ty_1, - pub VolumeHandle: UINT32, - pub HandleInfo: ULONG, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _MARK_HANDLE_INFO32__bindgen_ty_1 { - pub UsnSourceInfo: ULONG, - pub CopyNumber: ULONG, -} -#[test] -fn bindgen_test_layout__MARK_HANDLE_INFO32__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_MARK_HANDLE_INFO32__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MARK_HANDLE_INFO32__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_MARK_HANDLE_INFO32__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_MARK_HANDLE_INFO32__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_MARK_HANDLE_INFO32__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UsnSourceInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MARK_HANDLE_INFO32__bindgen_ty_1), - "::", - stringify!(UsnSourceInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CopyNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MARK_HANDLE_INFO32__bindgen_ty_1), - "::", - stringify!(CopyNumber), - ), - ); -} -impl Default for _MARK_HANDLE_INFO32__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__MARK_HANDLE_INFO32() { - const UNINIT: ::core::mem::MaybeUninit<_MARK_HANDLE_INFO32> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MARK_HANDLE_INFO32>(), - 12usize, - concat!("Size of: ", stringify!(_MARK_HANDLE_INFO32)), - ); - assert_eq!( - ::core::mem::align_of::<_MARK_HANDLE_INFO32>(), - 4usize, - concat!("Alignment of ", stringify!(_MARK_HANDLE_INFO32)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeHandle) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MARK_HANDLE_INFO32), - "::", - stringify!(VolumeHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HandleInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MARK_HANDLE_INFO32), - "::", - stringify!(HandleInfo), - ), - ); -} -impl Default for _MARK_HANDLE_INFO32 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MARK_HANDLE_INFO32 = _MARK_HANDLE_INFO32; -pub type PMARK_HANDLE_INFO32 = *mut _MARK_HANDLE_INFO32; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct BULK_SECURITY_TEST_DATA { - pub DesiredAccess: ACCESS_MASK, - pub SecurityIds: [ULONG; 1usize], -} -#[test] -fn bindgen_test_layout_BULK_SECURITY_TEST_DATA() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(BULK_SECURITY_TEST_DATA)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(BULK_SECURITY_TEST_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DesiredAccess) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(BULK_SECURITY_TEST_DATA), - "::", - stringify!(DesiredAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecurityIds) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(BULK_SECURITY_TEST_DATA), - "::", - stringify!(SecurityIds), - ), - ); -} -pub type PBULK_SECURITY_TEST_DATA = *mut BULK_SECURITY_TEST_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_PREFETCH { - pub Type: ULONG, - pub Count: ULONG, - pub Prefetch: [ULONGLONG; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_PREFETCH() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PREFETCH> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PREFETCH>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_PREFETCH)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PREFETCH>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_PREFETCH)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_FILE_PREFETCH), "::", stringify!(Type)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_FILE_PREFETCH), "::", stringify!(Count)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Prefetch) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PREFETCH), - "::", - stringify!(Prefetch), - ), - ); -} -pub type FILE_PREFETCH = _FILE_PREFETCH; -pub type PFILE_PREFETCH = *mut _FILE_PREFETCH; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_PREFETCH_EX { - pub Type: ULONG, - pub Count: ULONG, - pub Context: PVOID, - pub Prefetch: [ULONGLONG; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_PREFETCH_EX() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PREFETCH_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PREFETCH_EX>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_PREFETCH_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PREFETCH_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_PREFETCH_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PREFETCH_EX), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Count) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PREFETCH_EX), - "::", - stringify!(Count), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PREFETCH_EX), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Prefetch) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PREFETCH_EX), - "::", - stringify!(Prefetch), - ), - ); -} -impl Default for _FILE_PREFETCH_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_PREFETCH_EX = _FILE_PREFETCH_EX; -pub type PFILE_PREFETCH_EX = *mut _FILE_PREFETCH_EX; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILESYSTEM_STATISTICS { - pub FileSystemType: USHORT, - pub Version: USHORT, - pub SizeOfCompleteStructure: ULONG, - pub UserFileReads: ULONG, - pub UserFileReadBytes: ULONG, - pub UserDiskReads: ULONG, - pub UserFileWrites: ULONG, - pub UserFileWriteBytes: ULONG, - pub UserDiskWrites: ULONG, - pub MetaDataReads: ULONG, - pub MetaDataReadBytes: ULONG, - pub MetaDataDiskReads: ULONG, - pub MetaDataWrites: ULONG, - pub MetaDataWriteBytes: ULONG, - pub MetaDataDiskWrites: ULONG, -} -#[test] -fn bindgen_test_layout__FILESYSTEM_STATISTICS() { - const UNINIT: ::core::mem::MaybeUninit<_FILESYSTEM_STATISTICS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILESYSTEM_STATISTICS>(), - 56usize, - concat!("Size of: ", stringify!(_FILESYSTEM_STATISTICS)), - ); - assert_eq!( - ::core::mem::align_of::<_FILESYSTEM_STATISTICS>(), - 4usize, - concat!("Alignment of ", stringify!(_FILESYSTEM_STATISTICS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileSystemType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(FileSystemType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SizeOfCompleteStructure) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(SizeOfCompleteStructure), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserFileReads) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(UserFileReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserFileReadBytes) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(UserFileReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserDiskReads) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(UserDiskReads), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserFileWrites) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(UserFileWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserFileWriteBytes) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(UserFileWriteBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserDiskWrites) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(UserDiskWrites), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MetaDataReads) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(MetaDataReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetaDataReadBytes) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(MetaDataReadBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetaDataDiskReads) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(MetaDataDiskReads), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MetaDataWrites) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(MetaDataWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetaDataWriteBytes) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(MetaDataWriteBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetaDataDiskWrites) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS), - "::", - stringify!(MetaDataDiskWrites), - ), - ); -} -pub type FILESYSTEM_STATISTICS = _FILESYSTEM_STATISTICS; -pub type PFILESYSTEM_STATISTICS = *mut _FILESYSTEM_STATISTICS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FAT_STATISTICS { - pub CreateHits: ULONG, - pub SuccessfulCreates: ULONG, - pub FailedCreates: ULONG, - pub NonCachedReads: ULONG, - pub NonCachedReadBytes: ULONG, - pub NonCachedWrites: ULONG, - pub NonCachedWriteBytes: ULONG, - pub NonCachedDiskReads: ULONG, - pub NonCachedDiskWrites: ULONG, -} -#[test] -fn bindgen_test_layout__FAT_STATISTICS() { - const UNINIT: ::core::mem::MaybeUninit<_FAT_STATISTICS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FAT_STATISTICS>(), - 36usize, - concat!("Size of: ", stringify!(_FAT_STATISTICS)), - ); - assert_eq!( - ::core::mem::align_of::<_FAT_STATISTICS>(), - 4usize, - concat!("Alignment of ", stringify!(_FAT_STATISTICS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateHits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FAT_STATISTICS), - "::", - stringify!(CreateHits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SuccessfulCreates) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FAT_STATISTICS), - "::", - stringify!(SuccessfulCreates), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FailedCreates) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FAT_STATISTICS), - "::", - stringify!(FailedCreates), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NonCachedReads) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FAT_STATISTICS), - "::", - stringify!(NonCachedReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NonCachedReadBytes) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FAT_STATISTICS), - "::", - stringify!(NonCachedReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NonCachedWrites) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FAT_STATISTICS), - "::", - stringify!(NonCachedWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NonCachedWriteBytes) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FAT_STATISTICS), - "::", - stringify!(NonCachedWriteBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NonCachedDiskReads) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_FAT_STATISTICS), - "::", - stringify!(NonCachedDiskReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NonCachedDiskWrites) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FAT_STATISTICS), - "::", - stringify!(NonCachedDiskWrites), - ), - ); -} -pub type FAT_STATISTICS = _FAT_STATISTICS; -pub type PFAT_STATISTICS = *mut _FAT_STATISTICS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EXFAT_STATISTICS { - pub CreateHits: ULONG, - pub SuccessfulCreates: ULONG, - pub FailedCreates: ULONG, - pub NonCachedReads: ULONG, - pub NonCachedReadBytes: ULONG, - pub NonCachedWrites: ULONG, - pub NonCachedWriteBytes: ULONG, - pub NonCachedDiskReads: ULONG, - pub NonCachedDiskWrites: ULONG, -} -#[test] -fn bindgen_test_layout__EXFAT_STATISTICS() { - const UNINIT: ::core::mem::MaybeUninit<_EXFAT_STATISTICS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EXFAT_STATISTICS>(), - 36usize, - concat!("Size of: ", stringify!(_EXFAT_STATISTICS)), - ); - assert_eq!( - ::core::mem::align_of::<_EXFAT_STATISTICS>(), - 4usize, - concat!("Alignment of ", stringify!(_EXFAT_STATISTICS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateHits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EXFAT_STATISTICS), - "::", - stringify!(CreateHits), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SuccessfulCreates) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_EXFAT_STATISTICS), - "::", - stringify!(SuccessfulCreates), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FailedCreates) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EXFAT_STATISTICS), - "::", - stringify!(FailedCreates), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NonCachedReads) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_EXFAT_STATISTICS), - "::", - stringify!(NonCachedReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NonCachedReadBytes) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_EXFAT_STATISTICS), - "::", - stringify!(NonCachedReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NonCachedWrites) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_EXFAT_STATISTICS), - "::", - stringify!(NonCachedWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NonCachedWriteBytes) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_EXFAT_STATISTICS), - "::", - stringify!(NonCachedWriteBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NonCachedDiskReads) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_EXFAT_STATISTICS), - "::", - stringify!(NonCachedDiskReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NonCachedDiskWrites) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_EXFAT_STATISTICS), - "::", - stringify!(NonCachedDiskWrites), - ), - ); -} -pub type EXFAT_STATISTICS = _EXFAT_STATISTICS; -pub type PEXFAT_STATISTICS = *mut _EXFAT_STATISTICS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NTFS_STATISTICS { - pub LogFileFullExceptions: ULONG, - pub OtherExceptions: ULONG, - pub MftReads: ULONG, - pub MftReadBytes: ULONG, - pub MftWrites: ULONG, - pub MftWriteBytes: ULONG, - pub MftWritesUserLevel: _NTFS_STATISTICS__bindgen_ty_1, - pub MftWritesFlushForLogFileFull: USHORT, - pub MftWritesLazyWriter: USHORT, - pub MftWritesUserRequest: USHORT, - pub Mft2Writes: ULONG, - pub Mft2WriteBytes: ULONG, - pub Mft2WritesUserLevel: _NTFS_STATISTICS__bindgen_ty_2, - pub Mft2WritesFlushForLogFileFull: USHORT, - pub Mft2WritesLazyWriter: USHORT, - pub Mft2WritesUserRequest: USHORT, - pub RootIndexReads: ULONG, - pub RootIndexReadBytes: ULONG, - pub RootIndexWrites: ULONG, - pub RootIndexWriteBytes: ULONG, - pub BitmapReads: ULONG, - pub BitmapReadBytes: ULONG, - pub BitmapWrites: ULONG, - pub BitmapWriteBytes: ULONG, - pub BitmapWritesFlushForLogFileFull: USHORT, - pub BitmapWritesLazyWriter: USHORT, - pub BitmapWritesUserRequest: USHORT, - pub BitmapWritesUserLevel: _NTFS_STATISTICS__bindgen_ty_3, - pub MftBitmapReads: ULONG, - pub MftBitmapReadBytes: ULONG, - pub MftBitmapWrites: ULONG, - pub MftBitmapWriteBytes: ULONG, - pub MftBitmapWritesFlushForLogFileFull: USHORT, - pub MftBitmapWritesLazyWriter: USHORT, - pub MftBitmapWritesUserRequest: USHORT, - pub MftBitmapWritesUserLevel: _NTFS_STATISTICS__bindgen_ty_4, - pub UserIndexReads: ULONG, - pub UserIndexReadBytes: ULONG, - pub UserIndexWrites: ULONG, - pub UserIndexWriteBytes: ULONG, - pub LogFileReads: ULONG, - pub LogFileReadBytes: ULONG, - pub LogFileWrites: ULONG, - pub LogFileWriteBytes: ULONG, - pub Allocate: _NTFS_STATISTICS__bindgen_ty_5, - pub DiskResourcesExhausted: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NTFS_STATISTICS__bindgen_ty_1 { - pub Write: USHORT, - pub Create: USHORT, - pub SetInfo: USHORT, - pub Flush: USHORT, -} -#[test] -fn bindgen_test_layout__NTFS_STATISTICS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_NTFS_STATISTICS__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NTFS_STATISTICS__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_NTFS_STATISTICS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_NTFS_STATISTICS__bindgen_ty_1>(), - 2usize, - concat!("Alignment of ", stringify!(_NTFS_STATISTICS__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Write) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_1), - "::", - stringify!(Write), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Create) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_1), - "::", - stringify!(Create), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetInfo) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_1), - "::", - stringify!(SetInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flush) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_1), - "::", - stringify!(Flush), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NTFS_STATISTICS__bindgen_ty_2 { - pub Write: USHORT, - pub Create: USHORT, - pub SetInfo: USHORT, - pub Flush: USHORT, -} -#[test] -fn bindgen_test_layout__NTFS_STATISTICS__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_NTFS_STATISTICS__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NTFS_STATISTICS__bindgen_ty_2>(), - 8usize, - concat!("Size of: ", stringify!(_NTFS_STATISTICS__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_NTFS_STATISTICS__bindgen_ty_2>(), - 2usize, - concat!("Alignment of ", stringify!(_NTFS_STATISTICS__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Write) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_2), - "::", - stringify!(Write), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Create) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_2), - "::", - stringify!(Create), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetInfo) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_2), - "::", - stringify!(SetInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flush) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_2), - "::", - stringify!(Flush), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NTFS_STATISTICS__bindgen_ty_3 { - pub Write: USHORT, - pub Create: USHORT, - pub SetInfo: USHORT, -} -#[test] -fn bindgen_test_layout__NTFS_STATISTICS__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit<_NTFS_STATISTICS__bindgen_ty_3> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NTFS_STATISTICS__bindgen_ty_3>(), - 6usize, - concat!("Size of: ", stringify!(_NTFS_STATISTICS__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_NTFS_STATISTICS__bindgen_ty_3>(), - 2usize, - concat!("Alignment of ", stringify!(_NTFS_STATISTICS__bindgen_ty_3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Write) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_3), - "::", - stringify!(Write), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Create) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_3), - "::", - stringify!(Create), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetInfo) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_3), - "::", - stringify!(SetInfo), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NTFS_STATISTICS__bindgen_ty_4 { - pub Write: USHORT, - pub Create: USHORT, - pub SetInfo: USHORT, - pub Flush: USHORT, -} -#[test] -fn bindgen_test_layout__NTFS_STATISTICS__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit<_NTFS_STATISTICS__bindgen_ty_4> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NTFS_STATISTICS__bindgen_ty_4>(), - 8usize, - concat!("Size of: ", stringify!(_NTFS_STATISTICS__bindgen_ty_4)), - ); - assert_eq!( - ::core::mem::align_of::<_NTFS_STATISTICS__bindgen_ty_4>(), - 2usize, - concat!("Alignment of ", stringify!(_NTFS_STATISTICS__bindgen_ty_4)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Write) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_4), - "::", - stringify!(Write), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Create) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_4), - "::", - stringify!(Create), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetInfo) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_4), - "::", - stringify!(SetInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flush) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_4), - "::", - stringify!(Flush), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NTFS_STATISTICS__bindgen_ty_5 { - pub Calls: ULONG, - pub Clusters: ULONG, - pub Hints: ULONG, - pub RunsReturned: ULONG, - pub HintsHonored: ULONG, - pub HintsClusters: ULONG, - pub Cache: ULONG, - pub CacheClusters: ULONG, - pub CacheMiss: ULONG, - pub CacheMissClusters: ULONG, -} -#[test] -fn bindgen_test_layout__NTFS_STATISTICS__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit<_NTFS_STATISTICS__bindgen_ty_5> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NTFS_STATISTICS__bindgen_ty_5>(), - 40usize, - concat!("Size of: ", stringify!(_NTFS_STATISTICS__bindgen_ty_5)), - ); - assert_eq!( - ::core::mem::align_of::<_NTFS_STATISTICS__bindgen_ty_5>(), - 4usize, - concat!("Alignment of ", stringify!(_NTFS_STATISTICS__bindgen_ty_5)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Calls) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_5), - "::", - stringify!(Calls), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Clusters) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_5), - "::", - stringify!(Clusters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Hints) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_5), - "::", - stringify!(Hints), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RunsReturned) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_5), - "::", - stringify!(RunsReturned), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HintsHonored) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_5), - "::", - stringify!(HintsHonored), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HintsClusters) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_5), - "::", - stringify!(HintsClusters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cache) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_5), - "::", - stringify!(Cache), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CacheClusters) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_5), - "::", - stringify!(CacheClusters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CacheMiss) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_5), - "::", - stringify!(CacheMiss), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheMissClusters) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS__bindgen_ty_5), - "::", - stringify!(CacheMissClusters), - ), - ); -} -#[test] -fn bindgen_test_layout__NTFS_STATISTICS() { - const UNINIT: ::core::mem::MaybeUninit<_NTFS_STATISTICS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NTFS_STATISTICS>(), - 216usize, - concat!("Size of: ", stringify!(_NTFS_STATISTICS)), - ); - assert_eq!( - ::core::mem::align_of::<_NTFS_STATISTICS>(), - 4usize, - concat!("Alignment of ", stringify!(_NTFS_STATISTICS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogFileFullExceptions) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(LogFileFullExceptions), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OtherExceptions) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(OtherExceptions), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftReads) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftReads), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftReadBytes) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftWrites) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftWrites), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftWriteBytes) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftWriteBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftWritesUserLevel) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftWritesUserLevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftWritesFlushForLogFileFull) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftWritesFlushForLogFileFull), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftWritesLazyWriter) as usize - ptr as usize - }, - 34usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftWritesLazyWriter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftWritesUserRequest) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftWritesUserRequest), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mft2Writes) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(Mft2Writes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mft2WriteBytes) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(Mft2WriteBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Mft2WritesUserLevel) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(Mft2WritesUserLevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Mft2WritesFlushForLogFileFull) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(Mft2WritesFlushForLogFileFull), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Mft2WritesLazyWriter) as usize - ptr as usize - }, - 58usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(Mft2WritesLazyWriter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Mft2WritesUserRequest) as usize - ptr as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(Mft2WritesUserRequest), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootIndexReads) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(RootIndexReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RootIndexReadBytes) as usize - ptr as usize - }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(RootIndexReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootIndexWrites) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(RootIndexWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RootIndexWriteBytes) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(RootIndexWriteBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BitmapReads) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(BitmapReads), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BitmapReadBytes) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(BitmapReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BitmapWrites) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(BitmapWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BitmapWriteBytes) as usize - ptr as usize - }, - 92usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(BitmapWriteBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BitmapWritesFlushForLogFileFull) as usize - - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(BitmapWritesFlushForLogFileFull), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BitmapWritesLazyWriter) as usize - ptr as usize - }, - 98usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(BitmapWritesLazyWriter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BitmapWritesUserRequest) as usize - ptr as usize - }, - 100usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(BitmapWritesUserRequest), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BitmapWritesUserLevel) as usize - ptr as usize - }, - 102usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(BitmapWritesUserLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftBitmapReads) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftBitmapReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftBitmapReadBytes) as usize - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftBitmapReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftBitmapWrites) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftBitmapWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftBitmapWriteBytes) as usize - ptr as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftBitmapWriteBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftBitmapWritesFlushForLogFileFull) as usize - - ptr as usize - }, - 124usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftBitmapWritesFlushForLogFileFull), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftBitmapWritesLazyWriter) as usize - - ptr as usize - }, - 126usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftBitmapWritesLazyWriter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftBitmapWritesUserRequest) as usize - - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftBitmapWritesUserRequest), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftBitmapWritesUserLevel) as usize - - ptr as usize - }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(MftBitmapWritesUserLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserIndexReads) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(UserIndexReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserIndexReadBytes) as usize - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(UserIndexReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserIndexWrites) as usize - ptr as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(UserIndexWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserIndexWriteBytes) as usize - ptr as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(UserIndexWriteBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogFileReads) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(LogFileReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogFileReadBytes) as usize - ptr as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(LogFileReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogFileWrites) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(LogFileWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogFileWriteBytes) as usize - ptr as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(LogFileWriteBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Allocate) as usize - ptr as usize }, - 172usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(Allocate), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DiskResourcesExhausted) as usize - ptr as usize - }, - 212usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS), - "::", - stringify!(DiskResourcesExhausted), - ), - ); -} -pub type NTFS_STATISTICS = _NTFS_STATISTICS; -pub type PNTFS_STATISTICS = *mut _NTFS_STATISTICS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILESYSTEM_STATISTICS_EX { - pub FileSystemType: USHORT, - pub Version: USHORT, - pub SizeOfCompleteStructure: ULONG, - pub UserFileReads: ULONGLONG, - pub UserFileReadBytes: ULONGLONG, - pub UserDiskReads: ULONGLONG, - pub UserFileWrites: ULONGLONG, - pub UserFileWriteBytes: ULONGLONG, - pub UserDiskWrites: ULONGLONG, - pub MetaDataReads: ULONGLONG, - pub MetaDataReadBytes: ULONGLONG, - pub MetaDataDiskReads: ULONGLONG, - pub MetaDataWrites: ULONGLONG, - pub MetaDataWriteBytes: ULONGLONG, - pub MetaDataDiskWrites: ULONGLONG, -} -#[test] -fn bindgen_test_layout__FILESYSTEM_STATISTICS_EX() { - const UNINIT: ::core::mem::MaybeUninit<_FILESYSTEM_STATISTICS_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILESYSTEM_STATISTICS_EX>(), - 104usize, - concat!("Size of: ", stringify!(_FILESYSTEM_STATISTICS_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_FILESYSTEM_STATISTICS_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_FILESYSTEM_STATISTICS_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileSystemType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(FileSystemType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SizeOfCompleteStructure) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(SizeOfCompleteStructure), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserFileReads) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(UserFileReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserFileReadBytes) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(UserFileReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserDiskReads) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(UserDiskReads), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserFileWrites) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(UserFileWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserFileWriteBytes) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(UserFileWriteBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserDiskWrites) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(UserDiskWrites), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MetaDataReads) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(MetaDataReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetaDataReadBytes) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(MetaDataReadBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetaDataDiskReads) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(MetaDataDiskReads), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MetaDataWrites) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(MetaDataWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetaDataWriteBytes) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(MetaDataWriteBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetaDataDiskWrites) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_FILESYSTEM_STATISTICS_EX), - "::", - stringify!(MetaDataDiskWrites), - ), - ); -} -pub type FILESYSTEM_STATISTICS_EX = _FILESYSTEM_STATISTICS_EX; -pub type PFILESYSTEM_STATISTICS_EX = *mut _FILESYSTEM_STATISTICS_EX; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NTFS_STATISTICS_EX { - pub LogFileFullExceptions: ULONG, - pub OtherExceptions: ULONG, - pub MftReads: ULONGLONG, - pub MftReadBytes: ULONGLONG, - pub MftWrites: ULONGLONG, - pub MftWriteBytes: ULONGLONG, - pub MftWritesUserLevel: _NTFS_STATISTICS_EX__bindgen_ty_1, - pub MftWritesFlushForLogFileFull: ULONG, - pub MftWritesLazyWriter: ULONG, - pub MftWritesUserRequest: ULONG, - pub Mft2Writes: ULONGLONG, - pub Mft2WriteBytes: ULONGLONG, - pub Mft2WritesUserLevel: _NTFS_STATISTICS_EX__bindgen_ty_2, - pub Mft2WritesFlushForLogFileFull: ULONG, - pub Mft2WritesLazyWriter: ULONG, - pub Mft2WritesUserRequest: ULONG, - pub RootIndexReads: ULONGLONG, - pub RootIndexReadBytes: ULONGLONG, - pub RootIndexWrites: ULONGLONG, - pub RootIndexWriteBytes: ULONGLONG, - pub BitmapReads: ULONGLONG, - pub BitmapReadBytes: ULONGLONG, - pub BitmapWrites: ULONGLONG, - pub BitmapWriteBytes: ULONGLONG, - pub BitmapWritesFlushForLogFileFull: ULONG, - pub BitmapWritesLazyWriter: ULONG, - pub BitmapWritesUserRequest: ULONG, - pub BitmapWritesUserLevel: _NTFS_STATISTICS_EX__bindgen_ty_3, - pub MftBitmapReads: ULONGLONG, - pub MftBitmapReadBytes: ULONGLONG, - pub MftBitmapWrites: ULONGLONG, - pub MftBitmapWriteBytes: ULONGLONG, - pub MftBitmapWritesFlushForLogFileFull: ULONG, - pub MftBitmapWritesLazyWriter: ULONG, - pub MftBitmapWritesUserRequest: ULONG, - pub MftBitmapWritesUserLevel: _NTFS_STATISTICS_EX__bindgen_ty_4, - pub UserIndexReads: ULONGLONG, - pub UserIndexReadBytes: ULONGLONG, - pub UserIndexWrites: ULONGLONG, - pub UserIndexWriteBytes: ULONGLONG, - pub LogFileReads: ULONGLONG, - pub LogFileReadBytes: ULONGLONG, - pub LogFileWrites: ULONGLONG, - pub LogFileWriteBytes: ULONGLONG, - pub Allocate: _NTFS_STATISTICS_EX__bindgen_ty_5, - pub DiskResourcesExhausted: ULONG, - pub VolumeTrimCount: ULONGLONG, - pub VolumeTrimTime: ULONGLONG, - pub VolumeTrimByteCount: ULONGLONG, - pub FileLevelTrimCount: ULONGLONG, - pub FileLevelTrimTime: ULONGLONG, - pub FileLevelTrimByteCount: ULONGLONG, - pub VolumeTrimSkippedCount: ULONGLONG, - pub VolumeTrimSkippedByteCount: ULONGLONG, - pub NtfsFillStatInfoFromMftRecordCalledCount: ULONGLONG, - pub NtfsFillStatInfoFromMftRecordBailedBecauseOfAttributeListCount: ULONGLONG, - pub NtfsFillStatInfoFromMftRecordBailedBecauseOfNonResReparsePointCount: ULONGLONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NTFS_STATISTICS_EX__bindgen_ty_1 { - pub Write: ULONG, - pub Create: ULONG, - pub SetInfo: ULONG, - pub Flush: ULONG, -} -#[test] -fn bindgen_test_layout__NTFS_STATISTICS_EX__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_NTFS_STATISTICS_EX__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NTFS_STATISTICS_EX__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_NTFS_STATISTICS_EX__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_NTFS_STATISTICS_EX__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_NTFS_STATISTICS_EX__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Write) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_1), - "::", - stringify!(Write), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Create) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_1), - "::", - stringify!(Create), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_1), - "::", - stringify!(SetInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flush) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_1), - "::", - stringify!(Flush), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NTFS_STATISTICS_EX__bindgen_ty_2 { - pub Write: ULONG, - pub Create: ULONG, - pub SetInfo: ULONG, - pub Flush: ULONG, -} -#[test] -fn bindgen_test_layout__NTFS_STATISTICS_EX__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_NTFS_STATISTICS_EX__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NTFS_STATISTICS_EX__bindgen_ty_2>(), - 16usize, - concat!("Size of: ", stringify!(_NTFS_STATISTICS_EX__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_NTFS_STATISTICS_EX__bindgen_ty_2>(), - 4usize, - concat!("Alignment of ", stringify!(_NTFS_STATISTICS_EX__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Write) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_2), - "::", - stringify!(Write), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Create) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_2), - "::", - stringify!(Create), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_2), - "::", - stringify!(SetInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flush) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_2), - "::", - stringify!(Flush), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NTFS_STATISTICS_EX__bindgen_ty_3 { - pub Write: ULONG, - pub Create: ULONG, - pub SetInfo: ULONG, - pub Flush: ULONG, -} -#[test] -fn bindgen_test_layout__NTFS_STATISTICS_EX__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit<_NTFS_STATISTICS_EX__bindgen_ty_3> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NTFS_STATISTICS_EX__bindgen_ty_3>(), - 16usize, - concat!("Size of: ", stringify!(_NTFS_STATISTICS_EX__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_NTFS_STATISTICS_EX__bindgen_ty_3>(), - 4usize, - concat!("Alignment of ", stringify!(_NTFS_STATISTICS_EX__bindgen_ty_3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Write) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_3), - "::", - stringify!(Write), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Create) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_3), - "::", - stringify!(Create), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_3), - "::", - stringify!(SetInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flush) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_3), - "::", - stringify!(Flush), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NTFS_STATISTICS_EX__bindgen_ty_4 { - pub Write: ULONG, - pub Create: ULONG, - pub SetInfo: ULONG, - pub Flush: ULONG, -} -#[test] -fn bindgen_test_layout__NTFS_STATISTICS_EX__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit<_NTFS_STATISTICS_EX__bindgen_ty_4> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NTFS_STATISTICS_EX__bindgen_ty_4>(), - 16usize, - concat!("Size of: ", stringify!(_NTFS_STATISTICS_EX__bindgen_ty_4)), - ); - assert_eq!( - ::core::mem::align_of::<_NTFS_STATISTICS_EX__bindgen_ty_4>(), - 4usize, - concat!("Alignment of ", stringify!(_NTFS_STATISTICS_EX__bindgen_ty_4)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Write) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_4), - "::", - stringify!(Write), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Create) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_4), - "::", - stringify!(Create), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_4), - "::", - stringify!(SetInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flush) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_4), - "::", - stringify!(Flush), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NTFS_STATISTICS_EX__bindgen_ty_5 { - pub Calls: ULONG, - pub RunsReturned: ULONG, - pub Hints: ULONG, - pub HintsHonored: ULONG, - pub Cache: ULONG, - pub CacheMiss: ULONG, - pub Clusters: ULONGLONG, - pub HintsClusters: ULONGLONG, - pub CacheClusters: ULONGLONG, - pub CacheMissClusters: ULONGLONG, -} -#[test] -fn bindgen_test_layout__NTFS_STATISTICS_EX__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit<_NTFS_STATISTICS_EX__bindgen_ty_5> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NTFS_STATISTICS_EX__bindgen_ty_5>(), - 56usize, - concat!("Size of: ", stringify!(_NTFS_STATISTICS_EX__bindgen_ty_5)), - ); - assert_eq!( - ::core::mem::align_of::<_NTFS_STATISTICS_EX__bindgen_ty_5>(), - 8usize, - concat!("Alignment of ", stringify!(_NTFS_STATISTICS_EX__bindgen_ty_5)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Calls) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_5), - "::", - stringify!(Calls), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RunsReturned) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_5), - "::", - stringify!(RunsReturned), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Hints) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_5), - "::", - stringify!(Hints), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HintsHonored) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_5), - "::", - stringify!(HintsHonored), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cache) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_5), - "::", - stringify!(Cache), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CacheMiss) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_5), - "::", - stringify!(CacheMiss), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Clusters) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_5), - "::", - stringify!(Clusters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HintsClusters) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_5), - "::", - stringify!(HintsClusters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CacheClusters) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_5), - "::", - stringify!(CacheClusters), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheMissClusters) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX__bindgen_ty_5), - "::", - stringify!(CacheMissClusters), - ), - ); -} -#[test] -fn bindgen_test_layout__NTFS_STATISTICS_EX() { - const UNINIT: ::core::mem::MaybeUninit<_NTFS_STATISTICS_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NTFS_STATISTICS_EX>(), - 496usize, - concat!("Size of: ", stringify!(_NTFS_STATISTICS_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_NTFS_STATISTICS_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_NTFS_STATISTICS_EX)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogFileFullExceptions) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(LogFileFullExceptions), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OtherExceptions) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(OtherExceptions), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftReads) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftReads), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftReadBytes) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftWrites) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftWrites), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftWriteBytes) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftWriteBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftWritesUserLevel) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftWritesUserLevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftWritesFlushForLogFileFull) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftWritesFlushForLogFileFull), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftWritesLazyWriter) as usize - ptr as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftWritesLazyWriter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftWritesUserRequest) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftWritesUserRequest), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mft2Writes) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(Mft2Writes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mft2WriteBytes) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(Mft2WriteBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Mft2WritesUserLevel) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(Mft2WritesUserLevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Mft2WritesFlushForLogFileFull) as usize - - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(Mft2WritesFlushForLogFileFull), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Mft2WritesLazyWriter) as usize - ptr as usize - }, - 108usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(Mft2WritesLazyWriter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Mft2WritesUserRequest) as usize - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(Mft2WritesUserRequest), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootIndexReads) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(RootIndexReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RootIndexReadBytes) as usize - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(RootIndexReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RootIndexWrites) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(RootIndexWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RootIndexWriteBytes) as usize - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(RootIndexWriteBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BitmapReads) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(BitmapReads), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BitmapReadBytes) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(BitmapReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BitmapWrites) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(BitmapWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BitmapWriteBytes) as usize - ptr as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(BitmapWriteBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BitmapWritesFlushForLogFileFull) as usize - - ptr as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(BitmapWritesFlushForLogFileFull), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BitmapWritesLazyWriter) as usize - ptr as usize - }, - 188usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(BitmapWritesLazyWriter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BitmapWritesUserRequest) as usize - ptr as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(BitmapWritesUserRequest), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BitmapWritesUserLevel) as usize - ptr as usize - }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(BitmapWritesUserLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftBitmapReads) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftBitmapReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftBitmapReadBytes) as usize - ptr as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftBitmapReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MftBitmapWrites) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftBitmapWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftBitmapWriteBytes) as usize - ptr as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftBitmapWriteBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftBitmapWritesFlushForLogFileFull) as usize - - ptr as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftBitmapWritesFlushForLogFileFull), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftBitmapWritesLazyWriter) as usize - - ptr as usize - }, - 252usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftBitmapWritesLazyWriter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftBitmapWritesUserRequest) as usize - - ptr as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftBitmapWritesUserRequest), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MftBitmapWritesUserLevel) as usize - - ptr as usize - }, - 260usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(MftBitmapWritesUserLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserIndexReads) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(UserIndexReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserIndexReadBytes) as usize - ptr as usize - }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(UserIndexReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserIndexWrites) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(UserIndexWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserIndexWriteBytes) as usize - ptr as usize - }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(UserIndexWriteBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogFileReads) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(LogFileReads), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogFileReadBytes) as usize - ptr as usize - }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(LogFileReadBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogFileWrites) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(LogFileWrites), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogFileWriteBytes) as usize - ptr as usize - }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(LogFileWriteBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Allocate) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(Allocate), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DiskResourcesExhausted) as usize - ptr as usize - }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(DiskResourcesExhausted), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeTrimCount) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(VolumeTrimCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeTrimTime) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(VolumeTrimTime), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeTrimByteCount) as usize - ptr as usize - }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(VolumeTrimByteCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileLevelTrimCount) as usize - ptr as usize - }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(FileLevelTrimCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileLevelTrimTime) as usize - ptr as usize - }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(FileLevelTrimTime), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileLevelTrimByteCount) as usize - ptr as usize - }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(FileLevelTrimByteCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeTrimSkippedCount) as usize - ptr as usize - }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(VolumeTrimSkippedCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeTrimSkippedByteCount) as usize - - ptr as usize - }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(VolumeTrimSkippedByteCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NtfsFillStatInfoFromMftRecordCalledCount) - as usize - ptr as usize - }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(NtfsFillStatInfoFromMftRecordCalledCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!( - (*ptr).NtfsFillStatInfoFromMftRecordBailedBecauseOfAttributeListCount - ) as usize - ptr as usize - }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!(NtfsFillStatInfoFromMftRecordBailedBecauseOfAttributeListCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!( - (*ptr) - .NtfsFillStatInfoFromMftRecordBailedBecauseOfNonResReparsePointCount - ) as usize - ptr as usize - }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_NTFS_STATISTICS_EX), - "::", - stringify!( - NtfsFillStatInfoFromMftRecordBailedBecauseOfNonResReparsePointCount - ), - ), - ); -} -pub type NTFS_STATISTICS_EX = _NTFS_STATISTICS_EX; -pub type PNTFS_STATISTICS_EX = *mut _NTFS_STATISTICS_EX; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_OBJECTID_BUFFER { - pub ObjectId: [UCHAR; 16usize], - pub __bindgen_anon_1: _FILE_OBJECTID_BUFFER__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FILE_OBJECTID_BUFFER__bindgen_ty_1 { - pub __bindgen_anon_1: _FILE_OBJECTID_BUFFER__bindgen_ty_1__bindgen_ty_1, - pub ExtendedInfo: [UCHAR; 48usize], -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_OBJECTID_BUFFER__bindgen_ty_1__bindgen_ty_1 { - pub BirthVolumeId: [UCHAR; 16usize], - pub BirthObjectId: [UCHAR; 16usize], - pub DomainId: [UCHAR; 16usize], -} -#[test] -fn bindgen_test_layout__FILE_OBJECTID_BUFFER__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _FILE_OBJECTID_BUFFER__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_OBJECTID_BUFFER__bindgen_ty_1__bindgen_ty_1>(), - 48usize, - concat!( - "Size of: ", - stringify!(_FILE_OBJECTID_BUFFER__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_OBJECTID_BUFFER__bindgen_ty_1__bindgen_ty_1>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_FILE_OBJECTID_BUFFER__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BirthVolumeId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECTID_BUFFER__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(BirthVolumeId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BirthObjectId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECTID_BUFFER__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(BirthObjectId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DomainId) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECTID_BUFFER__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(DomainId), - ), - ); -} -#[test] -fn bindgen_test_layout__FILE_OBJECTID_BUFFER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_OBJECTID_BUFFER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_OBJECTID_BUFFER__bindgen_ty_1>(), - 48usize, - concat!("Size of: ", stringify!(_FILE_OBJECTID_BUFFER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_OBJECTID_BUFFER__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_FILE_OBJECTID_BUFFER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtendedInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECTID_BUFFER__bindgen_ty_1), - "::", - stringify!(ExtendedInfo), - ), - ); -} -impl Default for _FILE_OBJECTID_BUFFER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FILE_OBJECTID_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_OBJECTID_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_OBJECTID_BUFFER>(), - 64usize, - concat!("Size of: ", stringify!(_FILE_OBJECTID_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_OBJECTID_BUFFER>(), - 1usize, - concat!("Alignment of ", stringify!(_FILE_OBJECTID_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_OBJECTID_BUFFER), - "::", - stringify!(ObjectId), - ), - ); -} -impl Default for _FILE_OBJECTID_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_OBJECTID_BUFFER = _FILE_OBJECTID_BUFFER; -pub type PFILE_OBJECTID_BUFFER = *mut _FILE_OBJECTID_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_SET_SPARSE_BUFFER { - pub SetSparse: BOOLEAN, -} -#[test] -fn bindgen_test_layout__FILE_SET_SPARSE_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_SET_SPARSE_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_SET_SPARSE_BUFFER>(), - 1usize, - concat!("Size of: ", stringify!(_FILE_SET_SPARSE_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_SET_SPARSE_BUFFER>(), - 1usize, - concat!("Alignment of ", stringify!(_FILE_SET_SPARSE_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetSparse) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SET_SPARSE_BUFFER), - "::", - stringify!(SetSparse), - ), - ); -} -pub type FILE_SET_SPARSE_BUFFER = _FILE_SET_SPARSE_BUFFER; -pub type PFILE_SET_SPARSE_BUFFER = *mut _FILE_SET_SPARSE_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ZERO_DATA_INFORMATION { - pub FileOffset: LARGE_INTEGER, - pub BeyondFinalZero: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FILE_ZERO_DATA_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ZERO_DATA_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ZERO_DATA_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_ZERO_DATA_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ZERO_DATA_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ZERO_DATA_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ZERO_DATA_INFORMATION), - "::", - stringify!(FileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BeyondFinalZero) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ZERO_DATA_INFORMATION), - "::", - stringify!(BeyondFinalZero), - ), - ); -} -impl Default for _FILE_ZERO_DATA_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ZERO_DATA_INFORMATION = _FILE_ZERO_DATA_INFORMATION; -pub type PFILE_ZERO_DATA_INFORMATION = *mut _FILE_ZERO_DATA_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ZERO_DATA_INFORMATION_EX { - pub FileOffset: LARGE_INTEGER, - pub BeyondFinalZero: LARGE_INTEGER, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_ZERO_DATA_INFORMATION_EX() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ZERO_DATA_INFORMATION_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ZERO_DATA_INFORMATION_EX>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_ZERO_DATA_INFORMATION_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ZERO_DATA_INFORMATION_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ZERO_DATA_INFORMATION_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ZERO_DATA_INFORMATION_EX), - "::", - stringify!(FileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BeyondFinalZero) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ZERO_DATA_INFORMATION_EX), - "::", - stringify!(BeyondFinalZero), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ZERO_DATA_INFORMATION_EX), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _FILE_ZERO_DATA_INFORMATION_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ZERO_DATA_INFORMATION_EX = _FILE_ZERO_DATA_INFORMATION_EX; -pub type PFILE_ZERO_DATA_INFORMATION_EX = *mut _FILE_ZERO_DATA_INFORMATION_EX; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_ALLOCATED_RANGE_BUFFER { - pub FileOffset: LARGE_INTEGER, - pub Length: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FILE_ALLOCATED_RANGE_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_ALLOCATED_RANGE_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_ALLOCATED_RANGE_BUFFER>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_ALLOCATED_RANGE_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_ALLOCATED_RANGE_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_ALLOCATED_RANGE_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ALLOCATED_RANGE_BUFFER), - "::", - stringify!(FileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_ALLOCATED_RANGE_BUFFER), - "::", - stringify!(Length), - ), - ); -} -impl Default for _FILE_ALLOCATED_RANGE_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_ALLOCATED_RANGE_BUFFER = _FILE_ALLOCATED_RANGE_BUFFER; -pub type PFILE_ALLOCATED_RANGE_BUFFER = *mut _FILE_ALLOCATED_RANGE_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ENCRYPTION_BUFFER { - pub EncryptionOperation: ULONG, - pub Private: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__ENCRYPTION_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_ENCRYPTION_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ENCRYPTION_BUFFER>(), - 8usize, - concat!("Size of: ", stringify!(_ENCRYPTION_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_ENCRYPTION_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_ENCRYPTION_BUFFER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EncryptionOperation) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTION_BUFFER), - "::", - stringify!(EncryptionOperation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Private) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTION_BUFFER), - "::", - stringify!(Private), - ), - ); -} -pub type ENCRYPTION_BUFFER = _ENCRYPTION_BUFFER; -pub type PENCRYPTION_BUFFER = *mut _ENCRYPTION_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DECRYPTION_STATUS_BUFFER { - pub NoEncryptedStreams: BOOLEAN, -} -#[test] -fn bindgen_test_layout__DECRYPTION_STATUS_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_DECRYPTION_STATUS_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DECRYPTION_STATUS_BUFFER>(), - 1usize, - concat!("Size of: ", stringify!(_DECRYPTION_STATUS_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_DECRYPTION_STATUS_BUFFER>(), - 1usize, - concat!("Alignment of ", stringify!(_DECRYPTION_STATUS_BUFFER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NoEncryptedStreams) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DECRYPTION_STATUS_BUFFER), - "::", - stringify!(NoEncryptedStreams), - ), - ); -} -pub type DECRYPTION_STATUS_BUFFER = _DECRYPTION_STATUS_BUFFER; -pub type PDECRYPTION_STATUS_BUFFER = *mut _DECRYPTION_STATUS_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REQUEST_RAW_ENCRYPTED_DATA { - pub FileOffset: LONGLONG, - pub Length: ULONG, -} -#[test] -fn bindgen_test_layout__REQUEST_RAW_ENCRYPTED_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_REQUEST_RAW_ENCRYPTED_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REQUEST_RAW_ENCRYPTED_DATA>(), - 16usize, - concat!("Size of: ", stringify!(_REQUEST_RAW_ENCRYPTED_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_REQUEST_RAW_ENCRYPTED_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_REQUEST_RAW_ENCRYPTED_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REQUEST_RAW_ENCRYPTED_DATA), - "::", - stringify!(FileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REQUEST_RAW_ENCRYPTED_DATA), - "::", - stringify!(Length), - ), - ); -} -pub type REQUEST_RAW_ENCRYPTED_DATA = _REQUEST_RAW_ENCRYPTED_DATA; -pub type PREQUEST_RAW_ENCRYPTED_DATA = *mut _REQUEST_RAW_ENCRYPTED_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ENCRYPTED_DATA_INFO { - pub StartingFileOffset: ULONGLONG, - pub OutputBufferOffset: ULONG, - pub BytesWithinFileSize: ULONG, - pub BytesWithinValidDataLength: ULONG, - pub CompressionFormat: USHORT, - pub DataUnitShift: UCHAR, - pub ChunkShift: UCHAR, - pub ClusterShift: UCHAR, - pub EncryptionFormat: UCHAR, - pub NumberOfDataBlocks: USHORT, - pub DataBlockSize: [ULONG; 1usize], -} -#[test] -fn bindgen_test_layout__ENCRYPTED_DATA_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_ENCRYPTED_DATA_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ENCRYPTED_DATA_INFO>(), - 32usize, - concat!("Size of: ", stringify!(_ENCRYPTED_DATA_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_ENCRYPTED_DATA_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_ENCRYPTED_DATA_INFO)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StartingFileOffset) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTED_DATA_INFO), - "::", - stringify!(StartingFileOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OutputBufferOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTED_DATA_INFO), - "::", - stringify!(OutputBufferOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BytesWithinFileSize) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTED_DATA_INFO), - "::", - stringify!(BytesWithinFileSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BytesWithinValidDataLength) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTED_DATA_INFO), - "::", - stringify!(BytesWithinValidDataLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompressionFormat) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTED_DATA_INFO), - "::", - stringify!(CompressionFormat), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataUnitShift) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTED_DATA_INFO), - "::", - stringify!(DataUnitShift), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChunkShift) as usize - ptr as usize }, - 23usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTED_DATA_INFO), - "::", - stringify!(ChunkShift), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClusterShift) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTED_DATA_INFO), - "::", - stringify!(ClusterShift), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EncryptionFormat) as usize - ptr as usize - }, - 25usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTED_DATA_INFO), - "::", - stringify!(EncryptionFormat), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfDataBlocks) as usize - ptr as usize - }, - 26usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTED_DATA_INFO), - "::", - stringify!(NumberOfDataBlocks), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataBlockSize) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTED_DATA_INFO), - "::", - stringify!(DataBlockSize), - ), - ); -} -pub type ENCRYPTED_DATA_INFO = _ENCRYPTED_DATA_INFO; -pub type PENCRYPTED_DATA_INFO = *mut _ENCRYPTED_DATA_INFO; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EXTENDED_ENCRYPTED_DATA_INFO { - pub ExtendedCode: ULONG, - pub Length: ULONG, - pub Flags: ULONG, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__EXTENDED_ENCRYPTED_DATA_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_EXTENDED_ENCRYPTED_DATA_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EXTENDED_ENCRYPTED_DATA_INFO>(), - 16usize, - concat!("Size of: ", stringify!(_EXTENDED_ENCRYPTED_DATA_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_EXTENDED_ENCRYPTED_DATA_INFO>(), - 4usize, - concat!("Alignment of ", stringify!(_EXTENDED_ENCRYPTED_DATA_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtendedCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EXTENDED_ENCRYPTED_DATA_INFO), - "::", - stringify!(ExtendedCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_EXTENDED_ENCRYPTED_DATA_INFO), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EXTENDED_ENCRYPTED_DATA_INFO), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_EXTENDED_ENCRYPTED_DATA_INFO), - "::", - stringify!(Reserved), - ), - ); -} -pub type EXTENDED_ENCRYPTED_DATA_INFO = _EXTENDED_ENCRYPTED_DATA_INFO; -pub type PEXTENDED_ENCRYPTED_DATA_INFO = *mut _EXTENDED_ENCRYPTED_DATA_INFO; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PLEX_READ_DATA_REQUEST { - pub ByteOffset: LARGE_INTEGER, - pub ByteLength: ULONG, - pub PlexNumber: ULONG, -} -#[test] -fn bindgen_test_layout__PLEX_READ_DATA_REQUEST() { - const UNINIT: ::core::mem::MaybeUninit<_PLEX_READ_DATA_REQUEST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PLEX_READ_DATA_REQUEST>(), - 16usize, - concat!("Size of: ", stringify!(_PLEX_READ_DATA_REQUEST)), - ); - assert_eq!( - ::core::mem::align_of::<_PLEX_READ_DATA_REQUEST>(), - 8usize, - concat!("Alignment of ", stringify!(_PLEX_READ_DATA_REQUEST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PLEX_READ_DATA_REQUEST), - "::", - stringify!(ByteOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PLEX_READ_DATA_REQUEST), - "::", - stringify!(ByteLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PlexNumber) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PLEX_READ_DATA_REQUEST), - "::", - stringify!(PlexNumber), - ), - ); -} -impl Default for _PLEX_READ_DATA_REQUEST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PLEX_READ_DATA_REQUEST = _PLEX_READ_DATA_REQUEST; -pub type PPLEX_READ_DATA_REQUEST = *mut _PLEX_READ_DATA_REQUEST; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SI_COPYFILE { - pub SourceFileNameLength: ULONG, - pub DestinationFileNameLength: ULONG, - pub Flags: ULONG, - pub FileNameBuffer: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__SI_COPYFILE() { - const UNINIT: ::core::mem::MaybeUninit<_SI_COPYFILE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SI_COPYFILE>(), - 16usize, - concat!("Size of: ", stringify!(_SI_COPYFILE)), - ); - assert_eq!( - ::core::mem::align_of::<_SI_COPYFILE>(), - 4usize, - concat!("Alignment of ", stringify!(_SI_COPYFILE)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceFileNameLength) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SI_COPYFILE), - "::", - stringify!(SourceFileNameLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DestinationFileNameLength) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SI_COPYFILE), - "::", - stringify!(DestinationFileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_SI_COPYFILE), "::", stringify!(Flags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameBuffer) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SI_COPYFILE), - "::", - stringify!(FileNameBuffer), - ), - ); -} -pub type SI_COPYFILE = _SI_COPYFILE; -pub type PSI_COPYFILE = *mut _SI_COPYFILE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_MAKE_COMPATIBLE_BUFFER { - pub CloseDisc: BOOLEAN, -} -#[test] -fn bindgen_test_layout__FILE_MAKE_COMPATIBLE_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_MAKE_COMPATIBLE_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_MAKE_COMPATIBLE_BUFFER>(), - 1usize, - concat!("Size of: ", stringify!(_FILE_MAKE_COMPATIBLE_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_MAKE_COMPATIBLE_BUFFER>(), - 1usize, - concat!("Alignment of ", stringify!(_FILE_MAKE_COMPATIBLE_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CloseDisc) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_MAKE_COMPATIBLE_BUFFER), - "::", - stringify!(CloseDisc), - ), - ); -} -pub type FILE_MAKE_COMPATIBLE_BUFFER = _FILE_MAKE_COMPATIBLE_BUFFER; -pub type PFILE_MAKE_COMPATIBLE_BUFFER = *mut _FILE_MAKE_COMPATIBLE_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_SET_DEFECT_MGMT_BUFFER { - pub Disable: BOOLEAN, -} -#[test] -fn bindgen_test_layout__FILE_SET_DEFECT_MGMT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_SET_DEFECT_MGMT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_SET_DEFECT_MGMT_BUFFER>(), - 1usize, - concat!("Size of: ", stringify!(_FILE_SET_DEFECT_MGMT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_SET_DEFECT_MGMT_BUFFER>(), - 1usize, - concat!("Alignment of ", stringify!(_FILE_SET_DEFECT_MGMT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Disable) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SET_DEFECT_MGMT_BUFFER), - "::", - stringify!(Disable), - ), - ); -} -pub type FILE_SET_DEFECT_MGMT_BUFFER = _FILE_SET_DEFECT_MGMT_BUFFER; -pub type PFILE_SET_DEFECT_MGMT_BUFFER = *mut _FILE_SET_DEFECT_MGMT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_QUERY_SPARING_BUFFER { - pub SparingUnitBytes: ULONG, - pub SoftwareSparing: BOOLEAN, - pub TotalSpareBlocks: ULONG, - pub FreeSpareBlocks: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_QUERY_SPARING_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_QUERY_SPARING_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_QUERY_SPARING_BUFFER>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_QUERY_SPARING_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_QUERY_SPARING_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_QUERY_SPARING_BUFFER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SparingUnitBytes) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_SPARING_BUFFER), - "::", - stringify!(SparingUnitBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SoftwareSparing) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_SPARING_BUFFER), - "::", - stringify!(SoftwareSparing), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalSpareBlocks) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_SPARING_BUFFER), - "::", - stringify!(TotalSpareBlocks), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeSpareBlocks) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_SPARING_BUFFER), - "::", - stringify!(FreeSpareBlocks), - ), - ); -} -pub type FILE_QUERY_SPARING_BUFFER = _FILE_QUERY_SPARING_BUFFER; -pub type PFILE_QUERY_SPARING_BUFFER = *mut _FILE_QUERY_SPARING_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_QUERY_ON_DISK_VOL_INFO_BUFFER { - pub DirectoryCount: LARGE_INTEGER, - pub FileCount: LARGE_INTEGER, - pub FsFormatMajVersion: USHORT, - pub FsFormatMinVersion: USHORT, - pub FsFormatName: [WCHAR; 12usize], - pub FormatTime: LARGE_INTEGER, - pub LastUpdateTime: LARGE_INTEGER, - pub CopyrightInfo: [WCHAR; 34usize], - pub AbstractInfo: [WCHAR; 34usize], - pub FormattingImplementationInfo: [WCHAR; 34usize], - pub LastModifyingImplementationInfo: [WCHAR; 34usize], -} -#[test] -fn bindgen_test_layout__FILE_QUERY_ON_DISK_VOL_INFO_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER>(), - 336usize, - concat!("Size of: ", stringify!(_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DirectoryCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER), - "::", - stringify!(DirectoryCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER), - "::", - stringify!(FileCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FsFormatMajVersion) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER), - "::", - stringify!(FsFormatMajVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FsFormatMinVersion) as usize - ptr as usize - }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER), - "::", - stringify!(FsFormatMinVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FsFormatName) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER), - "::", - stringify!(FsFormatName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FormatTime) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER), - "::", - stringify!(FormatTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastUpdateTime) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER), - "::", - stringify!(LastUpdateTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CopyrightInfo) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER), - "::", - stringify!(CopyrightInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AbstractInfo) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER), - "::", - stringify!(AbstractInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FormattingImplementationInfo) as usize - - ptr as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER), - "::", - stringify!(FormattingImplementationInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastModifyingImplementationInfo) as usize - - ptr as usize - }, - 268usize, - concat!( - "Offset of field: ", - stringify!(_FILE_QUERY_ON_DISK_VOL_INFO_BUFFER), - "::", - stringify!(LastModifyingImplementationInfo), - ), - ); -} -impl Default for _FILE_QUERY_ON_DISK_VOL_INFO_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_QUERY_ON_DISK_VOL_INFO_BUFFER = _FILE_QUERY_ON_DISK_VOL_INFO_BUFFER; -pub type PFILE_QUERY_ON_DISK_VOL_INFO_BUFFER = *mut _FILE_QUERY_ON_DISK_VOL_INFO_BUFFER; -pub type CLSN = ULONGLONG; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_INITIATE_REPAIR_OUTPUT_BUFFER { - pub Hint1: ULONGLONG, - pub Hint2: ULONGLONG, - pub Clsn: CLSN, - pub Status: NTSTATUS, -} -#[test] -fn bindgen_test_layout__FILE_INITIATE_REPAIR_OUTPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_INITIATE_REPAIR_OUTPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_INITIATE_REPAIR_OUTPUT_BUFFER>(), - 32usize, - concat!("Size of: ", stringify!(_FILE_INITIATE_REPAIR_OUTPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_INITIATE_REPAIR_OUTPUT_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_INITIATE_REPAIR_OUTPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Hint1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_INITIATE_REPAIR_OUTPUT_BUFFER), - "::", - stringify!(Hint1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Hint2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_INITIATE_REPAIR_OUTPUT_BUFFER), - "::", - stringify!(Hint2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Clsn) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_INITIATE_REPAIR_OUTPUT_BUFFER), - "::", - stringify!(Clsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_INITIATE_REPAIR_OUTPUT_BUFFER), - "::", - stringify!(Status), - ), - ); -} -pub type FILE_INITIATE_REPAIR_OUTPUT_BUFFER = _FILE_INITIATE_REPAIR_OUTPUT_BUFFER; -pub type PFILE_INITIATE_REPAIR_OUTPUT_BUFFER = *mut _FILE_INITIATE_REPAIR_OUTPUT_BUFFER; -pub mod _SHRINK_VOLUME_REQUEST_TYPES { - pub type Type = ::core::ffi::c_int; - pub const ShrinkPrepare: Type = 1; - pub const ShrinkCommit: Type = 2; - pub const ShrinkAbort: Type = 3; -} -pub use self::_SHRINK_VOLUME_REQUEST_TYPES::Type as SHRINK_VOLUME_REQUEST_TYPES; -pub type PSHRINK_VOLUME_REQUEST_TYPES = *mut _SHRINK_VOLUME_REQUEST_TYPES::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SHRINK_VOLUME_INFORMATION { - pub ShrinkRequestType: SHRINK_VOLUME_REQUEST_TYPES, - pub Flags: ULONGLONG, - pub NewNumberOfSectors: LONGLONG, -} -#[test] -fn bindgen_test_layout__SHRINK_VOLUME_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_SHRINK_VOLUME_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SHRINK_VOLUME_INFORMATION>(), - 24usize, - concat!("Size of: ", stringify!(_SHRINK_VOLUME_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_SHRINK_VOLUME_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_SHRINK_VOLUME_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ShrinkRequestType) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SHRINK_VOLUME_INFORMATION), - "::", - stringify!(ShrinkRequestType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SHRINK_VOLUME_INFORMATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NewNumberOfSectors) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SHRINK_VOLUME_INFORMATION), - "::", - stringify!(NewNumberOfSectors), - ), - ); -} -impl Default for _SHRINK_VOLUME_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SHRINK_VOLUME_INFORMATION = _SHRINK_VOLUME_INFORMATION; -pub type PSHRINK_VOLUME_INFORMATION = *mut _SHRINK_VOLUME_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TXFS_MODIFY_RM { - pub Flags: ULONG, - pub LogContainerCountMax: ULONG, - pub LogContainerCountMin: ULONG, - pub LogContainerCount: ULONG, - pub LogGrowthIncrement: ULONG, - pub LogAutoShrinkPercentage: ULONG, - pub Reserved: ULONGLONG, - pub LoggingMode: USHORT, -} -#[test] -fn bindgen_test_layout__TXFS_MODIFY_RM() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_MODIFY_RM> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_MODIFY_RM>(), - 40usize, - concat!("Size of: ", stringify!(_TXFS_MODIFY_RM)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_MODIFY_RM>(), - 8usize, - concat!("Alignment of ", stringify!(_TXFS_MODIFY_RM)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_MODIFY_RM), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogContainerCountMax) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_MODIFY_RM), - "::", - stringify!(LogContainerCountMax), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogContainerCountMin) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_MODIFY_RM), - "::", - stringify!(LogContainerCountMin), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogContainerCount) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_MODIFY_RM), - "::", - stringify!(LogContainerCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogGrowthIncrement) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_MODIFY_RM), - "::", - stringify!(LogGrowthIncrement), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogAutoShrinkPercentage) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_MODIFY_RM), - "::", - stringify!(LogAutoShrinkPercentage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_MODIFY_RM), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LoggingMode) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_MODIFY_RM), - "::", - stringify!(LoggingMode), - ), - ); -} -pub type TXFS_MODIFY_RM = _TXFS_MODIFY_RM; -pub type PTXFS_MODIFY_RM = *mut _TXFS_MODIFY_RM; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _TXFS_QUERY_RM_INFORMATION { - pub BytesRequired: ULONG, - pub TailLsn: ULONGLONG, - pub CurrentLsn: ULONGLONG, - pub ArchiveTailLsn: ULONGLONG, - pub LogContainerSize: ULONGLONG, - pub HighestVirtualClock: LARGE_INTEGER, - pub LogContainerCount: ULONG, - pub LogContainerCountMax: ULONG, - pub LogContainerCountMin: ULONG, - pub LogGrowthIncrement: ULONG, - pub LogAutoShrinkPercentage: ULONG, - pub Flags: ULONG, - pub LoggingMode: USHORT, - pub Reserved: USHORT, - pub RmState: ULONG, - pub LogCapacity: ULONGLONG, - pub LogFree: ULONGLONG, - pub TopsSize: ULONGLONG, - pub TopsUsed: ULONGLONG, - pub TransactionCount: ULONGLONG, - pub OnePCCount: ULONGLONG, - pub TwoPCCount: ULONGLONG, - pub NumberLogFileFull: ULONGLONG, - pub OldestTransactionAge: ULONGLONG, - pub RMName: GUID, - pub TmLogPathOffset: ULONG, -} -#[test] -fn bindgen_test_layout__TXFS_QUERY_RM_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_QUERY_RM_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_QUERY_RM_INFORMATION>(), - 176usize, - concat!("Size of: ", stringify!(_TXFS_QUERY_RM_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_QUERY_RM_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TXFS_QUERY_RM_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesRequired) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(BytesRequired), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TailLsn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(TailLsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentLsn) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(CurrentLsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ArchiveTailLsn) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(ArchiveTailLsn), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogContainerSize) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(LogContainerSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HighestVirtualClock) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(HighestVirtualClock), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogContainerCount) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(LogContainerCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogContainerCountMax) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(LogContainerCountMax), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogContainerCountMin) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(LogContainerCountMin), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogGrowthIncrement) as usize - ptr as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(LogGrowthIncrement), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogAutoShrinkPercentage) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(LogAutoShrinkPercentage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LoggingMode) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(LoggingMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 74usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RmState) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(RmState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogCapacity) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(LogCapacity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogFree) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(LogFree), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TopsSize) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(TopsSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TopsUsed) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(TopsUsed), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TransactionCount) as usize - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(TransactionCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OnePCCount) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(OnePCCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TwoPCCount) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(TwoPCCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberLogFileFull) as usize - ptr as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(NumberLogFileFull), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OldestTransactionAge) as usize - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(OldestTransactionAge), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RMName) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(RMName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TmLogPathOffset) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_QUERY_RM_INFORMATION), - "::", - stringify!(TmLogPathOffset), - ), - ); -} -impl Default for _TXFS_QUERY_RM_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TXFS_QUERY_RM_INFORMATION = _TXFS_QUERY_RM_INFORMATION; -pub type PTXFS_QUERY_RM_INFORMATION = *mut _TXFS_QUERY_RM_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _TXFS_ROLLFORWARD_REDO_INFORMATION { - pub LastVirtualClock: LARGE_INTEGER, - pub LastRedoLsn: ULONGLONG, - pub HighestRecoveryLsn: ULONGLONG, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__TXFS_ROLLFORWARD_REDO_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_ROLLFORWARD_REDO_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_ROLLFORWARD_REDO_INFORMATION>(), - 32usize, - concat!("Size of: ", stringify!(_TXFS_ROLLFORWARD_REDO_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_ROLLFORWARD_REDO_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TXFS_ROLLFORWARD_REDO_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastVirtualClock) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_ROLLFORWARD_REDO_INFORMATION), - "::", - stringify!(LastVirtualClock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastRedoLsn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_ROLLFORWARD_REDO_INFORMATION), - "::", - stringify!(LastRedoLsn), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HighestRecoveryLsn) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_ROLLFORWARD_REDO_INFORMATION), - "::", - stringify!(HighestRecoveryLsn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_ROLLFORWARD_REDO_INFORMATION), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _TXFS_ROLLFORWARD_REDO_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TXFS_ROLLFORWARD_REDO_INFORMATION = _TXFS_ROLLFORWARD_REDO_INFORMATION; -pub type PTXFS_ROLLFORWARD_REDO_INFORMATION = *mut _TXFS_ROLLFORWARD_REDO_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TXFS_START_RM_INFORMATION { - pub Flags: ULONG, - pub LogContainerSize: ULONGLONG, - pub LogContainerCountMin: ULONG, - pub LogContainerCountMax: ULONG, - pub LogGrowthIncrement: ULONG, - pub LogAutoShrinkPercentage: ULONG, - pub TmLogPathOffset: ULONG, - pub TmLogPathLength: USHORT, - pub LoggingMode: USHORT, - pub LogPathLength: USHORT, - pub Reserved: USHORT, - pub LogPath: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__TXFS_START_RM_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_START_RM_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_START_RM_INFORMATION>(), - 48usize, - concat!("Size of: ", stringify!(_TXFS_START_RM_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_START_RM_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TXFS_START_RM_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_START_RM_INFORMATION), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogContainerSize) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_START_RM_INFORMATION), - "::", - stringify!(LogContainerSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogContainerCountMin) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_START_RM_INFORMATION), - "::", - stringify!(LogContainerCountMin), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogContainerCountMax) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_START_RM_INFORMATION), - "::", - stringify!(LogContainerCountMax), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogGrowthIncrement) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_START_RM_INFORMATION), - "::", - stringify!(LogGrowthIncrement), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LogAutoShrinkPercentage) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_START_RM_INFORMATION), - "::", - stringify!(LogAutoShrinkPercentage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TmLogPathOffset) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_START_RM_INFORMATION), - "::", - stringify!(TmLogPathOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TmLogPathLength) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_START_RM_INFORMATION), - "::", - stringify!(TmLogPathLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LoggingMode) as usize - ptr as usize }, - 38usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_START_RM_INFORMATION), - "::", - stringify!(LoggingMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogPathLength) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_START_RM_INFORMATION), - "::", - stringify!(LogPathLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 42usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_START_RM_INFORMATION), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogPath) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_START_RM_INFORMATION), - "::", - stringify!(LogPath), - ), - ); -} -pub type TXFS_START_RM_INFORMATION = _TXFS_START_RM_INFORMATION; -pub type PTXFS_START_RM_INFORMATION = *mut _TXFS_START_RM_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TXFS_GET_METADATA_INFO_OUT { - pub TxfFileId: _TXFS_GET_METADATA_INFO_OUT__bindgen_ty_1, - pub LockingTransaction: GUID, - pub LastLsn: ULONGLONG, - pub TransactionState: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TXFS_GET_METADATA_INFO_OUT__bindgen_ty_1 { - pub LowPart: LONGLONG, - pub HighPart: LONGLONG, -} -#[test] -fn bindgen_test_layout__TXFS_GET_METADATA_INFO_OUT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_GET_METADATA_INFO_OUT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_GET_METADATA_INFO_OUT__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_TXFS_GET_METADATA_INFO_OUT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_GET_METADATA_INFO_OUT__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_TXFS_GET_METADATA_INFO_OUT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LowPart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_GET_METADATA_INFO_OUT__bindgen_ty_1), - "::", - stringify!(LowPart), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HighPart) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_GET_METADATA_INFO_OUT__bindgen_ty_1), - "::", - stringify!(HighPart), - ), - ); -} -#[test] -fn bindgen_test_layout__TXFS_GET_METADATA_INFO_OUT() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_GET_METADATA_INFO_OUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_GET_METADATA_INFO_OUT>(), - 48usize, - concat!("Size of: ", stringify!(_TXFS_GET_METADATA_INFO_OUT)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_GET_METADATA_INFO_OUT>(), - 8usize, - concat!("Alignment of ", stringify!(_TXFS_GET_METADATA_INFO_OUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TxfFileId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_GET_METADATA_INFO_OUT), - "::", - stringify!(TxfFileId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LockingTransaction) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_GET_METADATA_INFO_OUT), - "::", - stringify!(LockingTransaction), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastLsn) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_GET_METADATA_INFO_OUT), - "::", - stringify!(LastLsn), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TransactionState) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_GET_METADATA_INFO_OUT), - "::", - stringify!(TransactionState), - ), - ); -} -pub type TXFS_GET_METADATA_INFO_OUT = _TXFS_GET_METADATA_INFO_OUT; -pub type PTXFS_GET_METADATA_INFO_OUT = *mut _TXFS_GET_METADATA_INFO_OUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY { - pub Offset: ULONGLONG, - pub NameFlags: ULONG, - pub FileId: LONGLONG, - pub Reserved1: ULONG, - pub Reserved2: ULONG, - pub Reserved3: LONGLONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY>(), - 48usize, - concat!("Size of: ", stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameFlags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY), - "::", - stringify!(NameFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved3) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY), - "::", - stringify!(Reserved3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY), - "::", - stringify!(FileName), - ), - ); -} -pub type TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY = _TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY; -pub type PTXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY = *mut _TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TXFS_LIST_TRANSACTION_LOCKED_FILES { - pub KtmTransaction: GUID, - pub NumberOfFiles: ULONGLONG, - pub BufferSizeRequired: ULONGLONG, - pub Offset: ULONGLONG, -} -#[test] -fn bindgen_test_layout__TXFS_LIST_TRANSACTION_LOCKED_FILES() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_LIST_TRANSACTION_LOCKED_FILES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_LIST_TRANSACTION_LOCKED_FILES>(), - 40usize, - concat!("Size of: ", stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_LIST_TRANSACTION_LOCKED_FILES>(), - 8usize, - concat!("Alignment of ", stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KtmTransaction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES), - "::", - stringify!(KtmTransaction), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfFiles) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES), - "::", - stringify!(NumberOfFiles), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BufferSizeRequired) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES), - "::", - stringify!(BufferSizeRequired), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTION_LOCKED_FILES), - "::", - stringify!(Offset), - ), - ); -} -pub type TXFS_LIST_TRANSACTION_LOCKED_FILES = _TXFS_LIST_TRANSACTION_LOCKED_FILES; -pub type PTXFS_LIST_TRANSACTION_LOCKED_FILES = *mut _TXFS_LIST_TRANSACTION_LOCKED_FILES; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TXFS_LIST_TRANSACTIONS_ENTRY { - pub TransactionId: GUID, - pub TransactionState: ULONG, - pub Reserved1: ULONG, - pub Reserved2: ULONG, - pub Reserved3: LONGLONG, -} -#[test] -fn bindgen_test_layout__TXFS_LIST_TRANSACTIONS_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_LIST_TRANSACTIONS_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_LIST_TRANSACTIONS_ENTRY>(), - 40usize, - concat!("Size of: ", stringify!(_TXFS_LIST_TRANSACTIONS_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_LIST_TRANSACTIONS_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_TXFS_LIST_TRANSACTIONS_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TransactionId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTIONS_ENTRY), - "::", - stringify!(TransactionId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TransactionState) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTIONS_ENTRY), - "::", - stringify!(TransactionState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTIONS_ENTRY), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTIONS_ENTRY), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved3) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTIONS_ENTRY), - "::", - stringify!(Reserved3), - ), - ); -} -pub type TXFS_LIST_TRANSACTIONS_ENTRY = _TXFS_LIST_TRANSACTIONS_ENTRY; -pub type PTXFS_LIST_TRANSACTIONS_ENTRY = *mut _TXFS_LIST_TRANSACTIONS_ENTRY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TXFS_LIST_TRANSACTIONS { - pub NumberOfTransactions: ULONGLONG, - pub BufferSizeRequired: ULONGLONG, -} -#[test] -fn bindgen_test_layout__TXFS_LIST_TRANSACTIONS() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_LIST_TRANSACTIONS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_LIST_TRANSACTIONS>(), - 16usize, - concat!("Size of: ", stringify!(_TXFS_LIST_TRANSACTIONS)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_LIST_TRANSACTIONS>(), - 8usize, - concat!("Alignment of ", stringify!(_TXFS_LIST_TRANSACTIONS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfTransactions) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTIONS), - "::", - stringify!(NumberOfTransactions), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BufferSizeRequired) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_LIST_TRANSACTIONS), - "::", - stringify!(BufferSizeRequired), - ), - ); -} -pub type TXFS_LIST_TRANSACTIONS = _TXFS_LIST_TRANSACTIONS; -pub type PTXFS_LIST_TRANSACTIONS = *mut _TXFS_LIST_TRANSACTIONS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _TXFS_READ_BACKUP_INFORMATION_OUT { - pub __bindgen_anon_1: _TXFS_READ_BACKUP_INFORMATION_OUT__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _TXFS_READ_BACKUP_INFORMATION_OUT__bindgen_ty_1 { - pub BufferLength: ULONG, - pub Buffer: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__TXFS_READ_BACKUP_INFORMATION_OUT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _TXFS_READ_BACKUP_INFORMATION_OUT__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_READ_BACKUP_INFORMATION_OUT__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_TXFS_READ_BACKUP_INFORMATION_OUT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_READ_BACKUP_INFORMATION_OUT__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_TXFS_READ_BACKUP_INFORMATION_OUT__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BufferLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_READ_BACKUP_INFORMATION_OUT__bindgen_ty_1), - "::", - stringify!(BufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_READ_BACKUP_INFORMATION_OUT__bindgen_ty_1), - "::", - stringify!(Buffer), - ), - ); -} -impl Default for _TXFS_READ_BACKUP_INFORMATION_OUT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__TXFS_READ_BACKUP_INFORMATION_OUT() { - assert_eq!( - ::core::mem::size_of::<_TXFS_READ_BACKUP_INFORMATION_OUT>(), - 4usize, - concat!("Size of: ", stringify!(_TXFS_READ_BACKUP_INFORMATION_OUT)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_READ_BACKUP_INFORMATION_OUT>(), - 4usize, - concat!("Alignment of ", stringify!(_TXFS_READ_BACKUP_INFORMATION_OUT)), - ); -} -impl Default for _TXFS_READ_BACKUP_INFORMATION_OUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TXFS_READ_BACKUP_INFORMATION_OUT = _TXFS_READ_BACKUP_INFORMATION_OUT; -pub type PTXFS_READ_BACKUP_INFORMATION_OUT = *mut _TXFS_READ_BACKUP_INFORMATION_OUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TXFS_WRITE_BACKUP_INFORMATION { - pub Buffer: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__TXFS_WRITE_BACKUP_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_WRITE_BACKUP_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_WRITE_BACKUP_INFORMATION>(), - 1usize, - concat!("Size of: ", stringify!(_TXFS_WRITE_BACKUP_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_WRITE_BACKUP_INFORMATION>(), - 1usize, - concat!("Alignment of ", stringify!(_TXFS_WRITE_BACKUP_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_WRITE_BACKUP_INFORMATION), - "::", - stringify!(Buffer), - ), - ); -} -pub type TXFS_WRITE_BACKUP_INFORMATION = _TXFS_WRITE_BACKUP_INFORMATION; -pub type PTXFS_WRITE_BACKUP_INFORMATION = *mut _TXFS_WRITE_BACKUP_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TXFS_GET_TRANSACTED_VERSION { - pub ThisBaseVersion: ULONG, - pub LatestVersion: ULONG, - pub ThisMiniVersion: USHORT, - pub FirstMiniVersion: USHORT, - pub LatestMiniVersion: USHORT, -} -#[test] -fn bindgen_test_layout__TXFS_GET_TRANSACTED_VERSION() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_GET_TRANSACTED_VERSION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_GET_TRANSACTED_VERSION>(), - 16usize, - concat!("Size of: ", stringify!(_TXFS_GET_TRANSACTED_VERSION)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_GET_TRANSACTED_VERSION>(), - 4usize, - concat!("Alignment of ", stringify!(_TXFS_GET_TRANSACTED_VERSION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ThisBaseVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_GET_TRANSACTED_VERSION), - "::", - stringify!(ThisBaseVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LatestVersion) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_GET_TRANSACTED_VERSION), - "::", - stringify!(LatestVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ThisMiniVersion) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_GET_TRANSACTED_VERSION), - "::", - stringify!(ThisMiniVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FirstMiniVersion) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_GET_TRANSACTED_VERSION), - "::", - stringify!(FirstMiniVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LatestMiniVersion) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_GET_TRANSACTED_VERSION), - "::", - stringify!(LatestMiniVersion), - ), - ); -} -pub type TXFS_GET_TRANSACTED_VERSION = _TXFS_GET_TRANSACTED_VERSION; -pub type PTXFS_GET_TRANSACTED_VERSION = *mut _TXFS_GET_TRANSACTED_VERSION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _TXFS_SAVEPOINT_INFORMATION { - pub KtmTransaction: HANDLE, - pub ActionCode: ULONG, - pub SavepointId: ULONG, -} -#[test] -fn bindgen_test_layout__TXFS_SAVEPOINT_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_SAVEPOINT_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_SAVEPOINT_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_TXFS_SAVEPOINT_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_SAVEPOINT_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_TXFS_SAVEPOINT_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KtmTransaction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_SAVEPOINT_INFORMATION), - "::", - stringify!(KtmTransaction), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ActionCode) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_SAVEPOINT_INFORMATION), - "::", - stringify!(ActionCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SavepointId) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_SAVEPOINT_INFORMATION), - "::", - stringify!(SavepointId), - ), - ); -} -impl Default for _TXFS_SAVEPOINT_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type TXFS_SAVEPOINT_INFORMATION = _TXFS_SAVEPOINT_INFORMATION; -pub type PTXFS_SAVEPOINT_INFORMATION = *mut _TXFS_SAVEPOINT_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TXFS_CREATE_MINIVERSION_INFO { - pub StructureVersion: USHORT, - pub StructureLength: USHORT, - pub BaseVersion: ULONG, - pub MiniVersion: USHORT, -} -#[test] -fn bindgen_test_layout__TXFS_CREATE_MINIVERSION_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_CREATE_MINIVERSION_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_CREATE_MINIVERSION_INFO>(), - 12usize, - concat!("Size of: ", stringify!(_TXFS_CREATE_MINIVERSION_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_CREATE_MINIVERSION_INFO>(), - 4usize, - concat!("Alignment of ", stringify!(_TXFS_CREATE_MINIVERSION_INFO)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StructureVersion) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_CREATE_MINIVERSION_INFO), - "::", - stringify!(StructureVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StructureLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_CREATE_MINIVERSION_INFO), - "::", - stringify!(StructureLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseVersion) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_CREATE_MINIVERSION_INFO), - "::", - stringify!(BaseVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MiniVersion) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_CREATE_MINIVERSION_INFO), - "::", - stringify!(MiniVersion), - ), - ); -} -pub type TXFS_CREATE_MINIVERSION_INFO = _TXFS_CREATE_MINIVERSION_INFO; -pub type PTXFS_CREATE_MINIVERSION_INFO = *mut _TXFS_CREATE_MINIVERSION_INFO; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _TXFS_TRANSACTION_ACTIVE_INFO { - pub TransactionsActiveAtSnapshot: BOOLEAN, -} -#[test] -fn bindgen_test_layout__TXFS_TRANSACTION_ACTIVE_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_TXFS_TRANSACTION_ACTIVE_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_TXFS_TRANSACTION_ACTIVE_INFO>(), - 1usize, - concat!("Size of: ", stringify!(_TXFS_TRANSACTION_ACTIVE_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_TXFS_TRANSACTION_ACTIVE_INFO>(), - 1usize, - concat!("Alignment of ", stringify!(_TXFS_TRANSACTION_ACTIVE_INFO)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TransactionsActiveAtSnapshot) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_TXFS_TRANSACTION_ACTIVE_INFO), - "::", - stringify!(TransactionsActiveAtSnapshot), - ), - ); -} -pub type TXFS_TRANSACTION_ACTIVE_INFO = _TXFS_TRANSACTION_ACTIVE_INFO; -pub type PTXFS_TRANSACTION_ACTIVE_INFO = *mut _TXFS_TRANSACTION_ACTIVE_INFO; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _BOOT_AREA_INFO { - pub BootSectorCount: ULONG, - pub BootSectors: [_BOOT_AREA_INFO__bindgen_ty_1; 2usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _BOOT_AREA_INFO__bindgen_ty_1 { - pub Offset: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__BOOT_AREA_INFO__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_BOOT_AREA_INFO__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_BOOT_AREA_INFO__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_BOOT_AREA_INFO__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_BOOT_AREA_INFO__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_BOOT_AREA_INFO__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_BOOT_AREA_INFO__bindgen_ty_1), - "::", - stringify!(Offset), - ), - ); -} -impl Default for _BOOT_AREA_INFO__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__BOOT_AREA_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_BOOT_AREA_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_BOOT_AREA_INFO>(), - 24usize, - concat!("Size of: ", stringify!(_BOOT_AREA_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_BOOT_AREA_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_BOOT_AREA_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BootSectorCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_BOOT_AREA_INFO), - "::", - stringify!(BootSectorCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BootSectors) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_BOOT_AREA_INFO), - "::", - stringify!(BootSectors), - ), - ); -} -impl Default for _BOOT_AREA_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type BOOT_AREA_INFO = _BOOT_AREA_INFO; -pub type PBOOT_AREA_INFO = *mut _BOOT_AREA_INFO; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _RETRIEVAL_POINTER_BASE { - pub FileAreaOffset: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__RETRIEVAL_POINTER_BASE() { - const UNINIT: ::core::mem::MaybeUninit<_RETRIEVAL_POINTER_BASE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RETRIEVAL_POINTER_BASE>(), - 8usize, - concat!("Size of: ", stringify!(_RETRIEVAL_POINTER_BASE)), - ); - assert_eq!( - ::core::mem::align_of::<_RETRIEVAL_POINTER_BASE>(), - 8usize, - concat!("Alignment of ", stringify!(_RETRIEVAL_POINTER_BASE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAreaOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RETRIEVAL_POINTER_BASE), - "::", - stringify!(FileAreaOffset), - ), - ); -} -impl Default for _RETRIEVAL_POINTER_BASE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type RETRIEVAL_POINTER_BASE = _RETRIEVAL_POINTER_BASE; -pub type PRETRIEVAL_POINTER_BASE = *mut _RETRIEVAL_POINTER_BASE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_FS_PERSISTENT_VOLUME_INFORMATION { - pub VolumeFlags: ULONG, - pub FlagMask: ULONG, - pub Version: ULONG, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_FS_PERSISTENT_VOLUME_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_PERSISTENT_VOLUME_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_FS_PERSISTENT_VOLUME_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_FS_PERSISTENT_VOLUME_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_FS_PERSISTENT_VOLUME_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_FS_PERSISTENT_VOLUME_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_PERSISTENT_VOLUME_INFORMATION), - "::", - stringify!(VolumeFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FlagMask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_PERSISTENT_VOLUME_INFORMATION), - "::", - stringify!(FlagMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_PERSISTENT_VOLUME_INFORMATION), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_FS_PERSISTENT_VOLUME_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -pub type FILE_FS_PERSISTENT_VOLUME_INFORMATION = _FILE_FS_PERSISTENT_VOLUME_INFORMATION; -pub type PFILE_FS_PERSISTENT_VOLUME_INFORMATION = *mut _FILE_FS_PERSISTENT_VOLUME_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_SYSTEM_RECOGNITION_INFORMATION { - pub FileSystem: [CHAR; 9usize], -} -#[test] -fn bindgen_test_layout__FILE_SYSTEM_RECOGNITION_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_SYSTEM_RECOGNITION_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_SYSTEM_RECOGNITION_INFORMATION>(), - 9usize, - concat!("Size of: ", stringify!(_FILE_SYSTEM_RECOGNITION_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_SYSTEM_RECOGNITION_INFORMATION>(), - 1usize, - concat!("Alignment of ", stringify!(_FILE_SYSTEM_RECOGNITION_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileSystem) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_SYSTEM_RECOGNITION_INFORMATION), - "::", - stringify!(FileSystem), - ), - ); -} -pub type FILE_SYSTEM_RECOGNITION_INFORMATION = _FILE_SYSTEM_RECOGNITION_INFORMATION; -pub type PFILE_SYSTEM_RECOGNITION_INFORMATION = *mut _FILE_SYSTEM_RECOGNITION_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REQUEST_OPLOCK_INPUT_BUFFER { - pub StructureVersion: USHORT, - pub StructureLength: USHORT, - pub RequestedOplockLevel: ULONG, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__REQUEST_OPLOCK_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_REQUEST_OPLOCK_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REQUEST_OPLOCK_INPUT_BUFFER>(), - 12usize, - concat!("Size of: ", stringify!(_REQUEST_OPLOCK_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REQUEST_OPLOCK_INPUT_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_REQUEST_OPLOCK_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StructureVersion) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REQUEST_OPLOCK_INPUT_BUFFER), - "::", - stringify!(StructureVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StructureLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_REQUEST_OPLOCK_INPUT_BUFFER), - "::", - stringify!(StructureLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RequestedOplockLevel) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REQUEST_OPLOCK_INPUT_BUFFER), - "::", - stringify!(RequestedOplockLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REQUEST_OPLOCK_INPUT_BUFFER), - "::", - stringify!(Flags), - ), - ); -} -pub type REQUEST_OPLOCK_INPUT_BUFFER = _REQUEST_OPLOCK_INPUT_BUFFER; -pub type PREQUEST_OPLOCK_INPUT_BUFFER = *mut _REQUEST_OPLOCK_INPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REQUEST_OPLOCK_OUTPUT_BUFFER { - pub StructureVersion: USHORT, - pub StructureLength: USHORT, - pub OriginalOplockLevel: ULONG, - pub NewOplockLevel: ULONG, - pub Flags: ULONG, - pub AccessMode: ACCESS_MASK, - pub ShareMode: USHORT, -} -#[test] -fn bindgen_test_layout__REQUEST_OPLOCK_OUTPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_REQUEST_OPLOCK_OUTPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REQUEST_OPLOCK_OUTPUT_BUFFER>(), - 24usize, - concat!("Size of: ", stringify!(_REQUEST_OPLOCK_OUTPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REQUEST_OPLOCK_OUTPUT_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_REQUEST_OPLOCK_OUTPUT_BUFFER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StructureVersion) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REQUEST_OPLOCK_OUTPUT_BUFFER), - "::", - stringify!(StructureVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StructureLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_REQUEST_OPLOCK_OUTPUT_BUFFER), - "::", - stringify!(StructureLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OriginalOplockLevel) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REQUEST_OPLOCK_OUTPUT_BUFFER), - "::", - stringify!(OriginalOplockLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NewOplockLevel) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REQUEST_OPLOCK_OUTPUT_BUFFER), - "::", - stringify!(NewOplockLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_REQUEST_OPLOCK_OUTPUT_BUFFER), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AccessMode) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REQUEST_OPLOCK_OUTPUT_BUFFER), - "::", - stringify!(AccessMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShareMode) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_REQUEST_OPLOCK_OUTPUT_BUFFER), - "::", - stringify!(ShareMode), - ), - ); -} -pub type REQUEST_OPLOCK_OUTPUT_BUFFER = _REQUEST_OPLOCK_OUTPUT_BUFFER; -pub type PREQUEST_OPLOCK_OUTPUT_BUFFER = *mut _REQUEST_OPLOCK_OUTPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VIRTUAL_STORAGE_TYPE { - pub DeviceId: ULONG, - pub VendorId: GUID, -} -#[test] -fn bindgen_test_layout__VIRTUAL_STORAGE_TYPE() { - const UNINIT: ::core::mem::MaybeUninit<_VIRTUAL_STORAGE_TYPE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_STORAGE_TYPE>(), - 20usize, - concat!("Size of: ", stringify!(_VIRTUAL_STORAGE_TYPE)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_STORAGE_TYPE>(), - 4usize, - concat!("Alignment of ", stringify!(_VIRTUAL_STORAGE_TYPE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_STORAGE_TYPE), - "::", - stringify!(DeviceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VendorId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_STORAGE_TYPE), - "::", - stringify!(VendorId), - ), - ); -} -pub type VIRTUAL_STORAGE_TYPE = _VIRTUAL_STORAGE_TYPE; -pub type PVIRTUAL_STORAGE_TYPE = *mut _VIRTUAL_STORAGE_TYPE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _STORAGE_QUERY_DEPENDENT_VOLUME_REQUEST { - pub RequestLevel: ULONG, - pub RequestFlags: ULONG, -} -#[test] -fn bindgen_test_layout__STORAGE_QUERY_DEPENDENT_VOLUME_REQUEST() { - const UNINIT: ::core::mem::MaybeUninit<_STORAGE_QUERY_DEPENDENT_VOLUME_REQUEST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STORAGE_QUERY_DEPENDENT_VOLUME_REQUEST>(), - 8usize, - concat!("Size of: ", stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_REQUEST)), - ); - assert_eq!( - ::core::mem::align_of::<_STORAGE_QUERY_DEPENDENT_VOLUME_REQUEST>(), - 4usize, - concat!("Alignment of ", stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_REQUEST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequestLevel) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_REQUEST), - "::", - stringify!(RequestLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequestFlags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_REQUEST), - "::", - stringify!(RequestFlags), - ), - ); -} -pub type STORAGE_QUERY_DEPENDENT_VOLUME_REQUEST = _STORAGE_QUERY_DEPENDENT_VOLUME_REQUEST; -pub type PSTORAGE_QUERY_DEPENDENT_VOLUME_REQUEST = *mut _STORAGE_QUERY_DEPENDENT_VOLUME_REQUEST; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY { - pub EntryLength: ULONG, - pub DependencyTypeFlags: ULONG, - pub ProviderSpecificFlags: ULONG, - pub VirtualStorageType: VIRTUAL_STORAGE_TYPE, -} -#[test] -fn bindgen_test_layout__STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY>(), - 32usize, - concat!("Size of: ", stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY>(), - 4usize, - concat!("Alignment of ", stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntryLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY), - "::", - stringify!(EntryLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DependencyTypeFlags) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY), - "::", - stringify!(DependencyTypeFlags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProviderSpecificFlags) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY), - "::", - stringify!(ProviderSpecificFlags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VirtualStorageType) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY), - "::", - stringify!(VirtualStorageType), - ), - ); -} -pub type STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY = _STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY; -pub type PSTORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY = *mut _STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY { - pub EntryLength: ULONG, - pub DependencyTypeFlags: ULONG, - pub ProviderSpecificFlags: ULONG, - pub VirtualStorageType: VIRTUAL_STORAGE_TYPE, - pub AncestorLevel: ULONG, - pub HostVolumeNameOffset: ULONG, - pub HostVolumeNameSize: ULONG, - pub DependentVolumeNameOffset: ULONG, - pub DependentVolumeNameSize: ULONG, - pub RelativePathOffset: ULONG, - pub RelativePathSize: ULONG, - pub DependentDeviceNameOffset: ULONG, - pub DependentDeviceNameSize: ULONG, -} -#[test] -fn bindgen_test_layout__STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY>(), - 68usize, - concat!("Size of: ", stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY>(), - 4usize, - concat!("Alignment of ", stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntryLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY), - "::", - stringify!(EntryLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DependencyTypeFlags) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY), - "::", - stringify!(DependencyTypeFlags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProviderSpecificFlags) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY), - "::", - stringify!(ProviderSpecificFlags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VirtualStorageType) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY), - "::", - stringify!(VirtualStorageType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AncestorLevel) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY), - "::", - stringify!(AncestorLevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HostVolumeNameOffset) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY), - "::", - stringify!(HostVolumeNameOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HostVolumeNameSize) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY), - "::", - stringify!(HostVolumeNameSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DependentVolumeNameOffset) as usize - - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY), - "::", - stringify!(DependentVolumeNameOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DependentVolumeNameSize) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY), - "::", - stringify!(DependentVolumeNameSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RelativePathOffset) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY), - "::", - stringify!(RelativePathOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RelativePathSize) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY), - "::", - stringify!(RelativePathSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DependentDeviceNameOffset) as usize - - ptr as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY), - "::", - stringify!(DependentDeviceNameOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DependentDeviceNameSize) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY), - "::", - stringify!(DependentDeviceNameSize), - ), - ); -} -pub type STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY = _STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY; -pub type PSTORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY = *mut _STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY; -#[repr(C)] -pub struct _STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE { - pub ResponseLevel: ULONG, - pub NumberEntries: ULONG, - pub __bindgen_anon_1: _STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE__bindgen_ty_1, -} -#[repr(C)] -pub struct _STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE__bindgen_ty_1 { - pub Lev1Depends: __BindgenUnionField< - [STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY; 0usize], - >, - pub Lev2Depends: __BindgenUnionField< - [STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY; 0usize], - >, - pub bindgen_union_field: u32, -} -#[test] -fn bindgen_test_layout__STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lev1Depends) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE__bindgen_ty_1), - "::", - stringify!(Lev1Depends), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lev2Depends) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE__bindgen_ty_1), - "::", - stringify!(Lev2Depends), - ), - ); -} -impl Default for _STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE() { - const UNINIT: ::core::mem::MaybeUninit<_STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE>(), - 12usize, - concat!("Size of: ", stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE)), - ); - assert_eq!( - ::core::mem::align_of::<_STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE>(), - 4usize, - concat!("Alignment of ", stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResponseLevel) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE), - "::", - stringify!(ResponseLevel), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberEntries) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE), - "::", - stringify!(NumberEntries), - ), - ); -} -impl Default for _STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE = _STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE; -pub type PSTORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE = *mut _STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SD_CHANGE_MACHINE_SID_INPUT { - pub CurrentMachineSIDOffset: USHORT, - pub CurrentMachineSIDLength: USHORT, - pub NewMachineSIDOffset: USHORT, - pub NewMachineSIDLength: USHORT, -} -#[test] -fn bindgen_test_layout__SD_CHANGE_MACHINE_SID_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SD_CHANGE_MACHINE_SID_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SD_CHANGE_MACHINE_SID_INPUT>(), - 8usize, - concat!("Size of: ", stringify!(_SD_CHANGE_MACHINE_SID_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SD_CHANGE_MACHINE_SID_INPUT>(), - 2usize, - concat!("Alignment of ", stringify!(_SD_CHANGE_MACHINE_SID_INPUT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CurrentMachineSIDOffset) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_CHANGE_MACHINE_SID_INPUT), - "::", - stringify!(CurrentMachineSIDOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CurrentMachineSIDLength) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_SD_CHANGE_MACHINE_SID_INPUT), - "::", - stringify!(CurrentMachineSIDLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NewMachineSIDOffset) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SD_CHANGE_MACHINE_SID_INPUT), - "::", - stringify!(NewMachineSIDOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NewMachineSIDLength) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_SD_CHANGE_MACHINE_SID_INPUT), - "::", - stringify!(NewMachineSIDLength), - ), - ); -} -pub type SD_CHANGE_MACHINE_SID_INPUT = _SD_CHANGE_MACHINE_SID_INPUT; -pub type PSD_CHANGE_MACHINE_SID_INPUT = *mut _SD_CHANGE_MACHINE_SID_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SD_CHANGE_MACHINE_SID_OUTPUT { - pub NumSDChangedSuccess: ULONGLONG, - pub NumSDChangedFail: ULONGLONG, - pub NumSDUnused: ULONGLONG, - pub NumSDTotal: ULONGLONG, - pub NumMftSDChangedSuccess: ULONGLONG, - pub NumMftSDChangedFail: ULONGLONG, - pub NumMftSDTotal: ULONGLONG, -} -#[test] -fn bindgen_test_layout__SD_CHANGE_MACHINE_SID_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SD_CHANGE_MACHINE_SID_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SD_CHANGE_MACHINE_SID_OUTPUT>(), - 56usize, - concat!("Size of: ", stringify!(_SD_CHANGE_MACHINE_SID_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SD_CHANGE_MACHINE_SID_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_SD_CHANGE_MACHINE_SID_OUTPUT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumSDChangedSuccess) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_CHANGE_MACHINE_SID_OUTPUT), - "::", - stringify!(NumSDChangedSuccess), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumSDChangedFail) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SD_CHANGE_MACHINE_SID_OUTPUT), - "::", - stringify!(NumSDChangedFail), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumSDUnused) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SD_CHANGE_MACHINE_SID_OUTPUT), - "::", - stringify!(NumSDUnused), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumSDTotal) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SD_CHANGE_MACHINE_SID_OUTPUT), - "::", - stringify!(NumSDTotal), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumMftSDChangedSuccess) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SD_CHANGE_MACHINE_SID_OUTPUT), - "::", - stringify!(NumMftSDChangedSuccess), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumMftSDChangedFail) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_SD_CHANGE_MACHINE_SID_OUTPUT), - "::", - stringify!(NumMftSDChangedFail), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumMftSDTotal) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_SD_CHANGE_MACHINE_SID_OUTPUT), - "::", - stringify!(NumMftSDTotal), - ), - ); -} -pub type SD_CHANGE_MACHINE_SID_OUTPUT = _SD_CHANGE_MACHINE_SID_OUTPUT; -pub type PSD_CHANGE_MACHINE_SID_OUTPUT = *mut _SD_CHANGE_MACHINE_SID_OUTPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SD_QUERY_STATS_INPUT { - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__SD_QUERY_STATS_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SD_QUERY_STATS_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SD_QUERY_STATS_INPUT>(), - 4usize, - concat!("Size of: ", stringify!(_SD_QUERY_STATS_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SD_QUERY_STATS_INPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_SD_QUERY_STATS_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_QUERY_STATS_INPUT), - "::", - stringify!(Reserved), - ), - ); -} -pub type SD_QUERY_STATS_INPUT = _SD_QUERY_STATS_INPUT; -pub type PSD_QUERY_STATS_INPUT = *mut _SD_QUERY_STATS_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SD_QUERY_STATS_OUTPUT { - pub SdsStreamSize: ULONGLONG, - pub SdsAllocationSize: ULONGLONG, - pub SiiStreamSize: ULONGLONG, - pub SiiAllocationSize: ULONGLONG, - pub SdhStreamSize: ULONGLONG, - pub SdhAllocationSize: ULONGLONG, - pub NumSDTotal: ULONGLONG, - pub NumSDUnused: ULONGLONG, -} -#[test] -fn bindgen_test_layout__SD_QUERY_STATS_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SD_QUERY_STATS_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SD_QUERY_STATS_OUTPUT>(), - 64usize, - concat!("Size of: ", stringify!(_SD_QUERY_STATS_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SD_QUERY_STATS_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_SD_QUERY_STATS_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SdsStreamSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_QUERY_STATS_OUTPUT), - "::", - stringify!(SdsStreamSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SdsAllocationSize) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SD_QUERY_STATS_OUTPUT), - "::", - stringify!(SdsAllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SiiStreamSize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SD_QUERY_STATS_OUTPUT), - "::", - stringify!(SiiStreamSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SiiAllocationSize) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SD_QUERY_STATS_OUTPUT), - "::", - stringify!(SiiAllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SdhStreamSize) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SD_QUERY_STATS_OUTPUT), - "::", - stringify!(SdhStreamSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SdhAllocationSize) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_SD_QUERY_STATS_OUTPUT), - "::", - stringify!(SdhAllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumSDTotal) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_SD_QUERY_STATS_OUTPUT), - "::", - stringify!(NumSDTotal), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumSDUnused) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_SD_QUERY_STATS_OUTPUT), - "::", - stringify!(NumSDUnused), - ), - ); -} -pub type SD_QUERY_STATS_OUTPUT = _SD_QUERY_STATS_OUTPUT; -pub type PSD_QUERY_STATS_OUTPUT = *mut _SD_QUERY_STATS_OUTPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SD_ENUM_SDS_INPUT { - pub StartingOffset: ULONGLONG, - pub MaxSDEntriesToReturn: ULONGLONG, -} -#[test] -fn bindgen_test_layout__SD_ENUM_SDS_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SD_ENUM_SDS_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SD_ENUM_SDS_INPUT>(), - 16usize, - concat!("Size of: ", stringify!(_SD_ENUM_SDS_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SD_ENUM_SDS_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_SD_ENUM_SDS_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_ENUM_SDS_INPUT), - "::", - stringify!(StartingOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxSDEntriesToReturn) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SD_ENUM_SDS_INPUT), - "::", - stringify!(MaxSDEntriesToReturn), - ), - ); -} -pub type SD_ENUM_SDS_INPUT = _SD_ENUM_SDS_INPUT; -pub type PSD_ENUM_SDS_INPUT = *mut _SD_ENUM_SDS_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SD_ENUM_SDS_ENTRY { - pub Hash: ULONG, - pub SecurityId: ULONG, - pub Offset: ULONGLONG, - pub Length: ULONG, - pub Descriptor: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__SD_ENUM_SDS_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_SD_ENUM_SDS_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SD_ENUM_SDS_ENTRY>(), - 24usize, - concat!("Size of: ", stringify!(_SD_ENUM_SDS_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_SD_ENUM_SDS_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_SD_ENUM_SDS_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_ENUM_SDS_ENTRY), - "::", - stringify!(Hash), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecurityId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SD_ENUM_SDS_ENTRY), - "::", - stringify!(SecurityId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SD_ENUM_SDS_ENTRY), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SD_ENUM_SDS_ENTRY), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Descriptor) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_SD_ENUM_SDS_ENTRY), - "::", - stringify!(Descriptor), - ), - ); -} -pub type SD_ENUM_SDS_ENTRY = _SD_ENUM_SDS_ENTRY; -pub type PSD_ENUM_SDS_ENTRY = *mut _SD_ENUM_SDS_ENTRY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SD_ENUM_SDS_OUTPUT { - pub NextOffset: ULONGLONG, - pub NumSDEntriesReturned: ULONGLONG, - pub NumSDBytesReturned: ULONGLONG, - pub SDEntry: [SD_ENUM_SDS_ENTRY; 1usize], -} -#[test] -fn bindgen_test_layout__SD_ENUM_SDS_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SD_ENUM_SDS_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SD_ENUM_SDS_OUTPUT>(), - 48usize, - concat!("Size of: ", stringify!(_SD_ENUM_SDS_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SD_ENUM_SDS_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_SD_ENUM_SDS_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_ENUM_SDS_OUTPUT), - "::", - stringify!(NextOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumSDEntriesReturned) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SD_ENUM_SDS_OUTPUT), - "::", - stringify!(NumSDEntriesReturned), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumSDBytesReturned) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SD_ENUM_SDS_OUTPUT), - "::", - stringify!(NumSDBytesReturned), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SDEntry) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SD_ENUM_SDS_OUTPUT), - "::", - stringify!(SDEntry), - ), - ); -} -pub type SD_ENUM_SDS_OUTPUT = _SD_ENUM_SDS_OUTPUT; -pub type PSD_ENUM_SDS_OUTPUT = *mut _SD_ENUM_SDS_OUTPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _SD_GLOBAL_CHANGE_INPUT { - pub Flags: ULONG, - pub ChangeType: ULONG, - pub __bindgen_anon_1: _SD_GLOBAL_CHANGE_INPUT__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _SD_GLOBAL_CHANGE_INPUT__bindgen_ty_1 { - pub SdChange: SD_CHANGE_MACHINE_SID_INPUT, - pub SdQueryStats: SD_QUERY_STATS_INPUT, - pub SdEnumSds: SD_ENUM_SDS_INPUT, -} -#[test] -fn bindgen_test_layout__SD_GLOBAL_CHANGE_INPUT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_SD_GLOBAL_CHANGE_INPUT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SD_GLOBAL_CHANGE_INPUT__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_SD_GLOBAL_CHANGE_INPUT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_SD_GLOBAL_CHANGE_INPUT__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_SD_GLOBAL_CHANGE_INPUT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SdChange) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_GLOBAL_CHANGE_INPUT__bindgen_ty_1), - "::", - stringify!(SdChange), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SdQueryStats) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_GLOBAL_CHANGE_INPUT__bindgen_ty_1), - "::", - stringify!(SdQueryStats), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SdEnumSds) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_GLOBAL_CHANGE_INPUT__bindgen_ty_1), - "::", - stringify!(SdEnumSds), - ), - ); -} -impl Default for _SD_GLOBAL_CHANGE_INPUT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__SD_GLOBAL_CHANGE_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SD_GLOBAL_CHANGE_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SD_GLOBAL_CHANGE_INPUT>(), - 24usize, - concat!("Size of: ", stringify!(_SD_GLOBAL_CHANGE_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SD_GLOBAL_CHANGE_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_SD_GLOBAL_CHANGE_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_GLOBAL_CHANGE_INPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SD_GLOBAL_CHANGE_INPUT), - "::", - stringify!(ChangeType), - ), - ); -} -impl Default for _SD_GLOBAL_CHANGE_INPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SD_GLOBAL_CHANGE_INPUT = _SD_GLOBAL_CHANGE_INPUT; -pub type PSD_GLOBAL_CHANGE_INPUT = *mut _SD_GLOBAL_CHANGE_INPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _SD_GLOBAL_CHANGE_OUTPUT { - pub Flags: ULONG, - pub ChangeType: ULONG, - pub __bindgen_anon_1: _SD_GLOBAL_CHANGE_OUTPUT__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _SD_GLOBAL_CHANGE_OUTPUT__bindgen_ty_1 { - pub SdChange: SD_CHANGE_MACHINE_SID_OUTPUT, - pub SdQueryStats: SD_QUERY_STATS_OUTPUT, - pub SdEnumSds: SD_ENUM_SDS_OUTPUT, -} -#[test] -fn bindgen_test_layout__SD_GLOBAL_CHANGE_OUTPUT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_SD_GLOBAL_CHANGE_OUTPUT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SD_GLOBAL_CHANGE_OUTPUT__bindgen_ty_1>(), - 64usize, - concat!("Size of: ", stringify!(_SD_GLOBAL_CHANGE_OUTPUT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_SD_GLOBAL_CHANGE_OUTPUT__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_SD_GLOBAL_CHANGE_OUTPUT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SdChange) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_GLOBAL_CHANGE_OUTPUT__bindgen_ty_1), - "::", - stringify!(SdChange), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SdQueryStats) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_GLOBAL_CHANGE_OUTPUT__bindgen_ty_1), - "::", - stringify!(SdQueryStats), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SdEnumSds) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_GLOBAL_CHANGE_OUTPUT__bindgen_ty_1), - "::", - stringify!(SdEnumSds), - ), - ); -} -impl Default for _SD_GLOBAL_CHANGE_OUTPUT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__SD_GLOBAL_CHANGE_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SD_GLOBAL_CHANGE_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SD_GLOBAL_CHANGE_OUTPUT>(), - 72usize, - concat!("Size of: ", stringify!(_SD_GLOBAL_CHANGE_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SD_GLOBAL_CHANGE_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_SD_GLOBAL_CHANGE_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SD_GLOBAL_CHANGE_OUTPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SD_GLOBAL_CHANGE_OUTPUT), - "::", - stringify!(ChangeType), - ), - ); -} -impl Default for _SD_GLOBAL_CHANGE_OUTPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SD_GLOBAL_CHANGE_OUTPUT = _SD_GLOBAL_CHANGE_OUTPUT; -pub type PSD_GLOBAL_CHANGE_OUTPUT = *mut _SD_GLOBAL_CHANGE_OUTPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _LOOKUP_STREAM_FROM_CLUSTER_INPUT { - pub Flags: ULONG, - pub NumberOfClusters: ULONG, - pub Cluster: [LARGE_INTEGER; 1usize], -} -#[test] -fn bindgen_test_layout__LOOKUP_STREAM_FROM_CLUSTER_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_LOOKUP_STREAM_FROM_CLUSTER_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LOOKUP_STREAM_FROM_CLUSTER_INPUT>(), - 16usize, - concat!("Size of: ", stringify!(_LOOKUP_STREAM_FROM_CLUSTER_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_LOOKUP_STREAM_FROM_CLUSTER_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_LOOKUP_STREAM_FROM_CLUSTER_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LOOKUP_STREAM_FROM_CLUSTER_INPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfClusters) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_LOOKUP_STREAM_FROM_CLUSTER_INPUT), - "::", - stringify!(NumberOfClusters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cluster) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_LOOKUP_STREAM_FROM_CLUSTER_INPUT), - "::", - stringify!(Cluster), - ), - ); -} -impl Default for _LOOKUP_STREAM_FROM_CLUSTER_INPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type LOOKUP_STREAM_FROM_CLUSTER_INPUT = _LOOKUP_STREAM_FROM_CLUSTER_INPUT; -pub type PLOOKUP_STREAM_FROM_CLUSTER_INPUT = *mut _LOOKUP_STREAM_FROM_CLUSTER_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _LOOKUP_STREAM_FROM_CLUSTER_OUTPUT { - pub Offset: ULONG, - pub NumberOfMatches: ULONG, - pub BufferSizeRequired: ULONG, -} -#[test] -fn bindgen_test_layout__LOOKUP_STREAM_FROM_CLUSTER_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_LOOKUP_STREAM_FROM_CLUSTER_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LOOKUP_STREAM_FROM_CLUSTER_OUTPUT>(), - 12usize, - concat!("Size of: ", stringify!(_LOOKUP_STREAM_FROM_CLUSTER_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_LOOKUP_STREAM_FROM_CLUSTER_OUTPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_LOOKUP_STREAM_FROM_CLUSTER_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LOOKUP_STREAM_FROM_CLUSTER_OUTPUT), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfMatches) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_LOOKUP_STREAM_FROM_CLUSTER_OUTPUT), - "::", - stringify!(NumberOfMatches), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BufferSizeRequired) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_LOOKUP_STREAM_FROM_CLUSTER_OUTPUT), - "::", - stringify!(BufferSizeRequired), - ), - ); -} -pub type LOOKUP_STREAM_FROM_CLUSTER_OUTPUT = _LOOKUP_STREAM_FROM_CLUSTER_OUTPUT; -pub type PLOOKUP_STREAM_FROM_CLUSTER_OUTPUT = *mut _LOOKUP_STREAM_FROM_CLUSTER_OUTPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _LOOKUP_STREAM_FROM_CLUSTER_ENTRY { - pub OffsetToNext: ULONG, - pub Flags: ULONG, - pub Reserved: LARGE_INTEGER, - pub Cluster: LARGE_INTEGER, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__LOOKUP_STREAM_FROM_CLUSTER_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_LOOKUP_STREAM_FROM_CLUSTER_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LOOKUP_STREAM_FROM_CLUSTER_ENTRY>(), - 32usize, - concat!("Size of: ", stringify!(_LOOKUP_STREAM_FROM_CLUSTER_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_LOOKUP_STREAM_FROM_CLUSTER_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_LOOKUP_STREAM_FROM_CLUSTER_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OffsetToNext) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LOOKUP_STREAM_FROM_CLUSTER_ENTRY), - "::", - stringify!(OffsetToNext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_LOOKUP_STREAM_FROM_CLUSTER_ENTRY), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_LOOKUP_STREAM_FROM_CLUSTER_ENTRY), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cluster) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_LOOKUP_STREAM_FROM_CLUSTER_ENTRY), - "::", - stringify!(Cluster), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_LOOKUP_STREAM_FROM_CLUSTER_ENTRY), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _LOOKUP_STREAM_FROM_CLUSTER_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type LOOKUP_STREAM_FROM_CLUSTER_ENTRY = _LOOKUP_STREAM_FROM_CLUSTER_ENTRY; -pub type PLOOKUP_STREAM_FROM_CLUSTER_ENTRY = *mut _LOOKUP_STREAM_FROM_CLUSTER_ENTRY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_TYPE_NOTIFICATION_INPUT { - pub Flags: ULONG, - pub NumFileTypeIDs: ULONG, - pub FileTypeID: [GUID; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_TYPE_NOTIFICATION_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_TYPE_NOTIFICATION_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_TYPE_NOTIFICATION_INPUT>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_TYPE_NOTIFICATION_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_TYPE_NOTIFICATION_INPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_TYPE_NOTIFICATION_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_TYPE_NOTIFICATION_INPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumFileTypeIDs) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_TYPE_NOTIFICATION_INPUT), - "::", - stringify!(NumFileTypeIDs), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileTypeID) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_TYPE_NOTIFICATION_INPUT), - "::", - stringify!(FileTypeID), - ), - ); -} -pub type FILE_TYPE_NOTIFICATION_INPUT = _FILE_TYPE_NOTIFICATION_INPUT; -pub type PFILE_TYPE_NOTIFICATION_INPUT = *mut _FILE_TYPE_NOTIFICATION_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CSV_MGMT_LOCK { - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__CSV_MGMT_LOCK() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_MGMT_LOCK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_MGMT_LOCK>(), - 4usize, - concat!("Size of: ", stringify!(_CSV_MGMT_LOCK)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_MGMT_LOCK>(), - 4usize, - concat!("Alignment of ", stringify!(_CSV_MGMT_LOCK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_CSV_MGMT_LOCK), "::", stringify!(Flags)), - ); -} -pub type CSV_MGMT_LOCK = _CSV_MGMT_LOCK; -pub type PCSV_MGMT_LOCK = *mut _CSV_MGMT_LOCK; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CSV_NAMESPACE_INFO { - pub Version: ULONG, - pub DeviceNumber: ULONG, - pub StartingOffset: LARGE_INTEGER, - pub SectorSize: ULONG, -} -#[test] -fn bindgen_test_layout__CSV_NAMESPACE_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_NAMESPACE_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_NAMESPACE_INFO>(), - 24usize, - concat!("Size of: ", stringify!(_CSV_NAMESPACE_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_NAMESPACE_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_CSV_NAMESPACE_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_NAMESPACE_INFO), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceNumber) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CSV_NAMESPACE_INFO), - "::", - stringify!(DeviceNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingOffset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CSV_NAMESPACE_INFO), - "::", - stringify!(StartingOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SectorSize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CSV_NAMESPACE_INFO), - "::", - stringify!(SectorSize), - ), - ); -} -impl Default for _CSV_NAMESPACE_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CSV_NAMESPACE_INFO = _CSV_NAMESPACE_INFO; -pub type PCSV_NAMESPACE_INFO = *mut _CSV_NAMESPACE_INFO; -pub mod _CSV_CONTROL_OP { - pub type Type = ::core::ffi::c_int; - pub const CsvControlStartRedirectFile: Type = 2; - pub const CsvControlStopRedirectFile: Type = 3; - pub const CsvControlQueryRedirectState: Type = 4; - pub const CsvControlQueryFileRevision: Type = 6; - pub const CsvControlQueryMdsPath: Type = 8; - pub const CsvControlQueryFileRevisionFileId128: Type = 9; - pub const CsvControlQueryVolumeRedirectState: Type = 10; - pub const CsvControlEnableUSNRangeModificationTracking: Type = 13; - pub const CsvControlMarkHandleLocalVolumeMount: Type = 14; - pub const CsvControlUnmarkHandleLocalVolumeMount: Type = 15; - pub const CsvControlGetCsvFsMdsPathV2: Type = 18; - pub const CsvControlDisableCaching: Type = 19; - pub const CsvControlEnableCaching: Type = 20; - pub const CsvControlStartForceDFO: Type = 21; - pub const CsvControlStopForceDFO: Type = 22; - pub const CsvControlQueryMdsPathNoPause: Type = 23; - pub const CsvControlSetVolumeId: Type = 24; - pub const CsvControlQueryVolumeId: Type = 25; -} -pub use self::_CSV_CONTROL_OP::Type as CSV_CONTROL_OP; -pub type PCSV_CONTROL_OP = *mut _CSV_CONTROL_OP::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CSV_CONTROL_PARAM { - pub Operation: CSV_CONTROL_OP, - pub Unused: LONGLONG, -} -#[test] -fn bindgen_test_layout__CSV_CONTROL_PARAM() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_CONTROL_PARAM> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_CONTROL_PARAM>(), - 16usize, - concat!("Size of: ", stringify!(_CSV_CONTROL_PARAM)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_CONTROL_PARAM>(), - 8usize, - concat!("Alignment of ", stringify!(_CSV_CONTROL_PARAM)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Operation) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_CONTROL_PARAM), - "::", - stringify!(Operation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CSV_CONTROL_PARAM), - "::", - stringify!(Unused), - ), - ); -} -impl Default for _CSV_CONTROL_PARAM { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CSV_CONTROL_PARAM = _CSV_CONTROL_PARAM; -pub type PCSV_CONTROL_PARAM = *mut _CSV_CONTROL_PARAM; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CSV_QUERY_REDIRECT_STATE { - pub MdsNodeId: ULONG, - pub DsNodeId: ULONG, - pub FileRedirected: BOOLEAN, -} -#[test] -fn bindgen_test_layout__CSV_QUERY_REDIRECT_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_QUERY_REDIRECT_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_QUERY_REDIRECT_STATE>(), - 12usize, - concat!("Size of: ", stringify!(_CSV_QUERY_REDIRECT_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_QUERY_REDIRECT_STATE>(), - 4usize, - concat!("Alignment of ", stringify!(_CSV_QUERY_REDIRECT_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MdsNodeId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_REDIRECT_STATE), - "::", - stringify!(MdsNodeId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DsNodeId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_REDIRECT_STATE), - "::", - stringify!(DsNodeId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileRedirected) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_REDIRECT_STATE), - "::", - stringify!(FileRedirected), - ), - ); -} -pub type CSV_QUERY_REDIRECT_STATE = _CSV_QUERY_REDIRECT_STATE; -pub type PCSV_QUERY_REDIRECT_STATE = *mut _CSV_QUERY_REDIRECT_STATE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CSV_QUERY_FILE_REVISION { - pub FileId: LONGLONG, - pub FileRevision: [LONGLONG; 3usize], -} -#[test] -fn bindgen_test_layout__CSV_QUERY_FILE_REVISION() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_QUERY_FILE_REVISION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_QUERY_FILE_REVISION>(), - 32usize, - concat!("Size of: ", stringify!(_CSV_QUERY_FILE_REVISION)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_QUERY_FILE_REVISION>(), - 8usize, - concat!("Alignment of ", stringify!(_CSV_QUERY_FILE_REVISION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_FILE_REVISION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileRevision) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_FILE_REVISION), - "::", - stringify!(FileRevision), - ), - ); -} -pub type CSV_QUERY_FILE_REVISION = _CSV_QUERY_FILE_REVISION; -pub type PCSV_QUERY_FILE_REVISION = *mut _CSV_QUERY_FILE_REVISION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CSV_QUERY_FILE_REVISION_FILE_ID_128 { - pub FileId: FILE_ID_128, - pub FileRevision: [LONGLONG; 3usize], -} -#[test] -fn bindgen_test_layout__CSV_QUERY_FILE_REVISION_FILE_ID_128() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_QUERY_FILE_REVISION_FILE_ID_128> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_QUERY_FILE_REVISION_FILE_ID_128>(), - 40usize, - concat!("Size of: ", stringify!(_CSV_QUERY_FILE_REVISION_FILE_ID_128)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_QUERY_FILE_REVISION_FILE_ID_128>(), - 8usize, - concat!("Alignment of ", stringify!(_CSV_QUERY_FILE_REVISION_FILE_ID_128)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_FILE_REVISION_FILE_ID_128), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileRevision) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_FILE_REVISION_FILE_ID_128), - "::", - stringify!(FileRevision), - ), - ); -} -pub type CSV_QUERY_FILE_REVISION_FILE_ID_128 = _CSV_QUERY_FILE_REVISION_FILE_ID_128; -pub type PCSV_QUERY_FILE_REVISION_FILE_ID_128 = *mut _CSV_QUERY_FILE_REVISION_FILE_ID_128; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CSV_QUERY_MDS_PATH { - pub MdsNodeId: ULONG, - pub DsNodeId: ULONG, - pub PathLength: ULONG, - pub Path: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__CSV_QUERY_MDS_PATH() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_QUERY_MDS_PATH> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_QUERY_MDS_PATH>(), - 16usize, - concat!("Size of: ", stringify!(_CSV_QUERY_MDS_PATH)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_QUERY_MDS_PATH>(), - 4usize, - concat!("Alignment of ", stringify!(_CSV_QUERY_MDS_PATH)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MdsNodeId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH), - "::", - stringify!(MdsNodeId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DsNodeId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH), - "::", - stringify!(DsNodeId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PathLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH), - "::", - stringify!(PathLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Path) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH), - "::", - stringify!(Path), - ), - ); -} -pub type CSV_QUERY_MDS_PATH = _CSV_QUERY_MDS_PATH; -pub type PCSV_QUERY_MDS_PATH = *mut _CSV_QUERY_MDS_PATH; -pub mod _CSVFS_DISK_CONNECTIVITY { - pub type Type = ::core::ffi::c_int; - pub const CsvFsDiskConnectivityNone: Type = 0; - pub const CsvFsDiskConnectivityMdsNodeOnly: Type = 1; - pub const CsvFsDiskConnectivitySubsetOfNodes: Type = 2; - pub const CsvFsDiskConnectivityAllNodes: Type = 3; -} -pub use self::_CSVFS_DISK_CONNECTIVITY::Type as CSVFS_DISK_CONNECTIVITY; -pub type PCSVFS_DISK_CONNECTIVITY = *mut _CSVFS_DISK_CONNECTIVITY::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CSV_QUERY_VOLUME_REDIRECT_STATE { - pub MdsNodeId: ULONG, - pub DsNodeId: ULONG, - pub IsDiskConnected: BOOLEAN, - pub ClusterEnableDirectIo: BOOLEAN, - pub DiskConnectivity: CSVFS_DISK_CONNECTIVITY, -} -#[test] -fn bindgen_test_layout__CSV_QUERY_VOLUME_REDIRECT_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_QUERY_VOLUME_REDIRECT_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_QUERY_VOLUME_REDIRECT_STATE>(), - 16usize, - concat!("Size of: ", stringify!(_CSV_QUERY_VOLUME_REDIRECT_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_QUERY_VOLUME_REDIRECT_STATE>(), - 4usize, - concat!("Alignment of ", stringify!(_CSV_QUERY_VOLUME_REDIRECT_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MdsNodeId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_VOLUME_REDIRECT_STATE), - "::", - stringify!(MdsNodeId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DsNodeId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_VOLUME_REDIRECT_STATE), - "::", - stringify!(DsNodeId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsDiskConnected) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_VOLUME_REDIRECT_STATE), - "::", - stringify!(IsDiskConnected), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClusterEnableDirectIo) as usize - ptr as usize - }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_VOLUME_REDIRECT_STATE), - "::", - stringify!(ClusterEnableDirectIo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DiskConnectivity) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_VOLUME_REDIRECT_STATE), - "::", - stringify!(DiskConnectivity), - ), - ); -} -impl Default for _CSV_QUERY_VOLUME_REDIRECT_STATE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CSV_QUERY_VOLUME_REDIRECT_STATE = _CSV_QUERY_VOLUME_REDIRECT_STATE; -pub type PCSV_QUERY_VOLUME_REDIRECT_STATE = *mut _CSV_QUERY_VOLUME_REDIRECT_STATE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CSV_QUERY_MDS_PATH_V2 { - pub Version: LONGLONG, - pub RequiredSize: ULONG, - pub MdsNodeId: ULONG, - pub DsNodeId: ULONG, - pub Flags: ULONG, - pub DiskConnectivity: CSVFS_DISK_CONNECTIVITY, - pub VolumeId: GUID, - pub IpAddressOffset: ULONG, - pub IpAddressLength: ULONG, - pub PathOffset: ULONG, - pub PathLength: ULONG, -} -#[test] -fn bindgen_test_layout__CSV_QUERY_MDS_PATH_V2() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_QUERY_MDS_PATH_V2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_QUERY_MDS_PATH_V2>(), - 64usize, - concat!("Size of: ", stringify!(_CSV_QUERY_MDS_PATH_V2)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_QUERY_MDS_PATH_V2>(), - 8usize, - concat!("Alignment of ", stringify!(_CSV_QUERY_MDS_PATH_V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH_V2), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequiredSize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH_V2), - "::", - stringify!(RequiredSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MdsNodeId) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH_V2), - "::", - stringify!(MdsNodeId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DsNodeId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH_V2), - "::", - stringify!(DsNodeId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH_V2), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DiskConnectivity) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH_V2), - "::", - stringify!(DiskConnectivity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeId) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH_V2), - "::", - stringify!(VolumeId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IpAddressOffset) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH_V2), - "::", - stringify!(IpAddressOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IpAddressLength) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH_V2), - "::", - stringify!(IpAddressLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PathOffset) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH_V2), - "::", - stringify!(PathOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PathLength) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_MDS_PATH_V2), - "::", - stringify!(PathLength), - ), - ); -} -impl Default for _CSV_QUERY_MDS_PATH_V2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CSV_QUERY_MDS_PATH_V2 = _CSV_QUERY_MDS_PATH_V2; -pub type PCSV_QUERY_MDS_PATH_V2 = *mut _CSV_QUERY_MDS_PATH_V2; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CSV_SET_VOLUME_ID { - pub VolumeId: GUID, -} -#[test] -fn bindgen_test_layout__CSV_SET_VOLUME_ID() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_SET_VOLUME_ID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_SET_VOLUME_ID>(), - 16usize, - concat!("Size of: ", stringify!(_CSV_SET_VOLUME_ID)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_SET_VOLUME_ID>(), - 4usize, - concat!("Alignment of ", stringify!(_CSV_SET_VOLUME_ID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_SET_VOLUME_ID), - "::", - stringify!(VolumeId), - ), - ); -} -pub type CSV_SET_VOLUME_ID = _CSV_SET_VOLUME_ID; -pub type PCSV_SET_VOLUME_ID = *mut _CSV_SET_VOLUME_ID; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CSV_QUERY_VOLUME_ID { - pub VolumeId: GUID, -} -#[test] -fn bindgen_test_layout__CSV_QUERY_VOLUME_ID() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_QUERY_VOLUME_ID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_QUERY_VOLUME_ID>(), - 16usize, - concat!("Size of: ", stringify!(_CSV_QUERY_VOLUME_ID)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_QUERY_VOLUME_ID>(), - 4usize, - concat!("Alignment of ", stringify!(_CSV_QUERY_VOLUME_ID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_VOLUME_ID), - "::", - stringify!(VolumeId), - ), - ); -} -pub type CSV_QUERY_VOLUME_ID = _CSV_QUERY_VOLUME_ID; -pub type PCSV_QUERY_VOLUME_ID = *mut _CSV_QUERY_VOLUME_ID; -pub mod _LMR_QUERY_INFO_CLASS { - pub type Type = ::core::ffi::c_int; - pub const LMRQuerySessionInfo: Type = 1; -} -pub use self::_LMR_QUERY_INFO_CLASS::Type as LMR_QUERY_INFO_CLASS; -pub type PLMR_QUERY_INFO_CLASS = *mut _LMR_QUERY_INFO_CLASS::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _LMR_QUERY_INFO_PARAM { - pub Operation: LMR_QUERY_INFO_CLASS, -} -#[test] -fn bindgen_test_layout__LMR_QUERY_INFO_PARAM() { - const UNINIT: ::core::mem::MaybeUninit<_LMR_QUERY_INFO_PARAM> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LMR_QUERY_INFO_PARAM>(), - 4usize, - concat!("Size of: ", stringify!(_LMR_QUERY_INFO_PARAM)), - ); - assert_eq!( - ::core::mem::align_of::<_LMR_QUERY_INFO_PARAM>(), - 4usize, - concat!("Alignment of ", stringify!(_LMR_QUERY_INFO_PARAM)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Operation) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LMR_QUERY_INFO_PARAM), - "::", - stringify!(Operation), - ), - ); -} -impl Default for _LMR_QUERY_INFO_PARAM { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type LMR_QUERY_INFO_PARAM = _LMR_QUERY_INFO_PARAM; -pub type PLMR_QUERY_INFO_PARAM = *mut _LMR_QUERY_INFO_PARAM; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _LMR_QUERY_SESSION_INFO { - pub SessionId: UINT64, -} -#[test] -fn bindgen_test_layout__LMR_QUERY_SESSION_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_LMR_QUERY_SESSION_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LMR_QUERY_SESSION_INFO>(), - 8usize, - concat!("Size of: ", stringify!(_LMR_QUERY_SESSION_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_LMR_QUERY_SESSION_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_LMR_QUERY_SESSION_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SessionId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LMR_QUERY_SESSION_INFO), - "::", - stringify!(SessionId), - ), - ); -} -pub type LMR_QUERY_SESSION_INFO = _LMR_QUERY_SESSION_INFO; -pub type PLMR_QUERY_SESSION_INFO = *mut _LMR_QUERY_SESSION_INFO; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT { - pub VetoedFromAltitudeIntegral: ULONGLONG, - pub VetoedFromAltitudeDecimal: ULONGLONG, - pub Reason: [WCHAR; 256usize], -} -#[test] -fn bindgen_test_layout__CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT>(), - 528usize, - concat!("Size of: ", stringify!(_CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VetoedFromAltitudeIntegral) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT), - "::", - stringify!(VetoedFromAltitudeIntegral), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VetoedFromAltitudeDecimal) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT), - "::", - stringify!(VetoedFromAltitudeDecimal), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reason) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT), - "::", - stringify!(Reason), - ), - ); -} -impl Default for _CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT = _CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT; -pub type PCSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT = *mut _CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT; -pub mod _STORAGE_RESERVE_ID { - pub type Type = ::core::ffi::c_int; - pub const StorageReserveIdNone: Type = 0; - pub const StorageReserveIdHard: Type = 1; - pub const StorageReserveIdSoft: Type = 2; - pub const StorageReserveIdUpdateScratch: Type = 3; - pub const StorageReserveIdMax: Type = 4; -} -pub use self::_STORAGE_RESERVE_ID::Type as STORAGE_RESERVE_ID; -pub type PSTORAGE_RESERVE_ID = *mut _STORAGE_RESERVE_ID::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CSV_IS_OWNED_BY_CSVFS { - pub OwnedByCSVFS: BOOLEAN, -} -#[test] -fn bindgen_test_layout__CSV_IS_OWNED_BY_CSVFS() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_IS_OWNED_BY_CSVFS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_IS_OWNED_BY_CSVFS>(), - 1usize, - concat!("Size of: ", stringify!(_CSV_IS_OWNED_BY_CSVFS)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_IS_OWNED_BY_CSVFS>(), - 1usize, - concat!("Alignment of ", stringify!(_CSV_IS_OWNED_BY_CSVFS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OwnedByCSVFS) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_IS_OWNED_BY_CSVFS), - "::", - stringify!(OwnedByCSVFS), - ), - ); -} -pub type CSV_IS_OWNED_BY_CSVFS = _CSV_IS_OWNED_BY_CSVFS; -pub type PCSV_IS_OWNED_BY_CSVFS = *mut _CSV_IS_OWNED_BY_CSVFS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_LEVEL_TRIM_RANGE { - pub Offset: ULONGLONG, - pub Length: ULONGLONG, -} -#[test] -fn bindgen_test_layout__FILE_LEVEL_TRIM_RANGE() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LEVEL_TRIM_RANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LEVEL_TRIM_RANGE>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_LEVEL_TRIM_RANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LEVEL_TRIM_RANGE>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_LEVEL_TRIM_RANGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LEVEL_TRIM_RANGE), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LEVEL_TRIM_RANGE), - "::", - stringify!(Length), - ), - ); -} -pub type FILE_LEVEL_TRIM_RANGE = _FILE_LEVEL_TRIM_RANGE; -pub type PFILE_LEVEL_TRIM_RANGE = *mut _FILE_LEVEL_TRIM_RANGE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_LEVEL_TRIM { - pub Key: ULONG, - pub NumRanges: ULONG, - pub Ranges: [FILE_LEVEL_TRIM_RANGE; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_LEVEL_TRIM() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LEVEL_TRIM> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LEVEL_TRIM>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_LEVEL_TRIM)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LEVEL_TRIM>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_LEVEL_TRIM)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Key) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_FILE_LEVEL_TRIM), "::", stringify!(Key)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumRanges) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LEVEL_TRIM), - "::", - stringify!(NumRanges), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ranges) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LEVEL_TRIM), - "::", - stringify!(Ranges), - ), - ); -} -pub type FILE_LEVEL_TRIM = _FILE_LEVEL_TRIM; -pub type PFILE_LEVEL_TRIM = *mut _FILE_LEVEL_TRIM; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_LEVEL_TRIM_OUTPUT { - pub NumRangesProcessed: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_LEVEL_TRIM_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LEVEL_TRIM_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LEVEL_TRIM_OUTPUT>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_LEVEL_TRIM_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LEVEL_TRIM_OUTPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_LEVEL_TRIM_OUTPUT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumRangesProcessed) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LEVEL_TRIM_OUTPUT), - "::", - stringify!(NumRangesProcessed), - ), - ); -} -pub type FILE_LEVEL_TRIM_OUTPUT = _FILE_LEVEL_TRIM_OUTPUT; -pub type PFILE_LEVEL_TRIM_OUTPUT = *mut _FILE_LEVEL_TRIM_OUTPUT; -pub mod _QUERY_FILE_LAYOUT_FILTER_TYPE { - pub type Type = ::core::ffi::c_int; - pub const QUERY_FILE_LAYOUT_FILTER_TYPE_NONE: Type = 0; - pub const QUERY_FILE_LAYOUT_FILTER_TYPE_CLUSTERS: Type = 1; - pub const QUERY_FILE_LAYOUT_FILTER_TYPE_FILEID: Type = 2; - pub const QUERY_FILE_LAYOUT_FILTER_TYPE_STORAGE_RESERVE_ID: Type = 3; - pub const QUERY_FILE_LAYOUT_NUM_FILTER_TYPES: Type = 4; -} -pub use self::_QUERY_FILE_LAYOUT_FILTER_TYPE::Type as QUERY_FILE_LAYOUT_FILTER_TYPE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CLUSTER_RANGE { - pub StartingCluster: LARGE_INTEGER, - pub ClusterCount: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__CLUSTER_RANGE() { - const UNINIT: ::core::mem::MaybeUninit<_CLUSTER_RANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CLUSTER_RANGE>(), - 16usize, - concat!("Size of: ", stringify!(_CLUSTER_RANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_CLUSTER_RANGE>(), - 8usize, - concat!("Alignment of ", stringify!(_CLUSTER_RANGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingCluster) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CLUSTER_RANGE), - "::", - stringify!(StartingCluster), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClusterCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CLUSTER_RANGE), - "::", - stringify!(ClusterCount), - ), - ); -} -impl Default for _CLUSTER_RANGE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CLUSTER_RANGE = _CLUSTER_RANGE; -pub type PCLUSTER_RANGE = *mut _CLUSTER_RANGE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_REFERENCE_RANGE { - pub StartingFileReferenceNumber: ULONGLONG, - pub EndingFileReferenceNumber: ULONGLONG, -} -#[test] -fn bindgen_test_layout__FILE_REFERENCE_RANGE() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_REFERENCE_RANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_REFERENCE_RANGE>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_REFERENCE_RANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_REFERENCE_RANGE>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_REFERENCE_RANGE)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StartingFileReferenceNumber) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REFERENCE_RANGE), - "::", - stringify!(StartingFileReferenceNumber), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EndingFileReferenceNumber) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REFERENCE_RANGE), - "::", - stringify!(EndingFileReferenceNumber), - ), - ); -} -pub type FILE_REFERENCE_RANGE = _FILE_REFERENCE_RANGE; -pub type PFILE_REFERENCE_RANGE = *mut _FILE_REFERENCE_RANGE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _QUERY_FILE_LAYOUT_INPUT { - pub __bindgen_anon_1: _QUERY_FILE_LAYOUT_INPUT__bindgen_ty_1, - pub Flags: ULONG, - pub FilterType: QUERY_FILE_LAYOUT_FILTER_TYPE, - pub Reserved: ULONG, - pub Filter: _QUERY_FILE_LAYOUT_INPUT__bindgen_ty_2, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _QUERY_FILE_LAYOUT_INPUT__bindgen_ty_1 { - pub FilterEntryCount: ULONG, - pub NumberOfPairs: ULONG, -} -#[test] -fn bindgen_test_layout__QUERY_FILE_LAYOUT_INPUT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FilterEntryCount) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_1), - "::", - stringify!(FilterEntryCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfPairs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_1), - "::", - stringify!(NumberOfPairs), - ), - ); -} -impl Default for _QUERY_FILE_LAYOUT_INPUT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _QUERY_FILE_LAYOUT_INPUT__bindgen_ty_2 { - pub ClusterRanges: [CLUSTER_RANGE; 1usize], - pub FileReferenceRanges: [FILE_REFERENCE_RANGE; 1usize], - pub StorageReserveIds: [STORAGE_RESERVE_ID; 1usize], -} -#[test] -fn bindgen_test_layout__QUERY_FILE_LAYOUT_INPUT__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_2>(), - 16usize, - concat!("Size of: ", stringify!(_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClusterRanges) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_2), - "::", - stringify!(ClusterRanges), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileReferenceRanges) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_2), - "::", - stringify!(FileReferenceRanges), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StorageReserveIds) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_FILE_LAYOUT_INPUT__bindgen_ty_2), - "::", - stringify!(StorageReserveIds), - ), - ); -} -impl Default for _QUERY_FILE_LAYOUT_INPUT__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__QUERY_FILE_LAYOUT_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_FILE_LAYOUT_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_FILE_LAYOUT_INPUT>(), - 32usize, - concat!("Size of: ", stringify!(_QUERY_FILE_LAYOUT_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_FILE_LAYOUT_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_QUERY_FILE_LAYOUT_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_FILE_LAYOUT_INPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FilterType) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_FILE_LAYOUT_INPUT), - "::", - stringify!(FilterType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_FILE_LAYOUT_INPUT), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Filter) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_FILE_LAYOUT_INPUT), - "::", - stringify!(Filter), - ), - ); -} -impl Default for _QUERY_FILE_LAYOUT_INPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type QUERY_FILE_LAYOUT_INPUT = _QUERY_FILE_LAYOUT_INPUT; -pub type PQUERY_FILE_LAYOUT_INPUT = *mut _QUERY_FILE_LAYOUT_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _QUERY_FILE_LAYOUT_OUTPUT { - pub FileEntryCount: ULONG, - pub FirstFileOffset: ULONG, - pub Flags: ULONG, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__QUERY_FILE_LAYOUT_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_FILE_LAYOUT_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_FILE_LAYOUT_OUTPUT>(), - 16usize, - concat!("Size of: ", stringify!(_QUERY_FILE_LAYOUT_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_FILE_LAYOUT_OUTPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_QUERY_FILE_LAYOUT_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileEntryCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_FILE_LAYOUT_OUTPUT), - "::", - stringify!(FileEntryCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FirstFileOffset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_FILE_LAYOUT_OUTPUT), - "::", - stringify!(FirstFileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_FILE_LAYOUT_OUTPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_FILE_LAYOUT_OUTPUT), - "::", - stringify!(Reserved), - ), - ); -} -pub type QUERY_FILE_LAYOUT_OUTPUT = _QUERY_FILE_LAYOUT_OUTPUT; -pub type PQUERY_FILE_LAYOUT_OUTPUT = *mut _QUERY_FILE_LAYOUT_OUTPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_LAYOUT_ENTRY { - pub Version: ULONG, - pub NextFileOffset: ULONG, - pub Flags: ULONG, - pub FileAttributes: ULONG, - pub FileReferenceNumber: ULONGLONG, - pub FirstNameOffset: ULONG, - pub FirstStreamOffset: ULONG, - pub ExtraInfoOffset: ULONG, - pub ExtraInfoLength: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_LAYOUT_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LAYOUT_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LAYOUT_ENTRY>(), - 40usize, - concat!("Size of: ", stringify!(_FILE_LAYOUT_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LAYOUT_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_LAYOUT_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_ENTRY), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextFileOffset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_ENTRY), - "::", - stringify!(NextFileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_ENTRY), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_ENTRY), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileReferenceNumber) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_ENTRY), - "::", - stringify!(FileReferenceNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FirstNameOffset) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_ENTRY), - "::", - stringify!(FirstNameOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FirstStreamOffset) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_ENTRY), - "::", - stringify!(FirstStreamOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtraInfoOffset) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_ENTRY), - "::", - stringify!(ExtraInfoOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtraInfoLength) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_ENTRY), - "::", - stringify!(ExtraInfoLength), - ), - ); -} -pub type FILE_LAYOUT_ENTRY = _FILE_LAYOUT_ENTRY; -pub type PFILE_LAYOUT_ENTRY = *mut _FILE_LAYOUT_ENTRY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_LAYOUT_NAME_ENTRY { - pub NextNameOffset: ULONG, - pub Flags: ULONG, - pub ParentFileReferenceNumber: ULONGLONG, - pub FileNameLength: ULONG, - pub Reserved: ULONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_LAYOUT_NAME_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LAYOUT_NAME_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LAYOUT_NAME_ENTRY>(), - 32usize, - concat!("Size of: ", stringify!(_FILE_LAYOUT_NAME_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LAYOUT_NAME_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_LAYOUT_NAME_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextNameOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_NAME_ENTRY), - "::", - stringify!(NextNameOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_NAME_ENTRY), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ParentFileReferenceNumber) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_NAME_ENTRY), - "::", - stringify!(ParentFileReferenceNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_NAME_ENTRY), - "::", - stringify!(FileNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_NAME_ENTRY), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_NAME_ENTRY), - "::", - stringify!(FileName), - ), - ); -} -pub type FILE_LAYOUT_NAME_ENTRY = _FILE_LAYOUT_NAME_ENTRY; -pub type PFILE_LAYOUT_NAME_ENTRY = *mut _FILE_LAYOUT_NAME_ENTRY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_LAYOUT_INFO_ENTRY { - pub BasicInformation: _FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1, - pub OwnerId: ULONG, - pub SecurityId: ULONG, - pub Usn: USN, - pub StorageReserveId: STORAGE_RESERVE_ID, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1 { - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub FileAttributes: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1>(), - 40usize, - concat!("Size of: ", stringify!(_FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1), - "::", - stringify!(FileAttributes), - ), - ); -} -impl Default for _FILE_LAYOUT_INFO_ENTRY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FILE_LAYOUT_INFO_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LAYOUT_INFO_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LAYOUT_INFO_ENTRY>(), - 64usize, - concat!("Size of: ", stringify!(_FILE_LAYOUT_INFO_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LAYOUT_INFO_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_LAYOUT_INFO_ENTRY)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BasicInformation) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_INFO_ENTRY), - "::", - stringify!(BasicInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OwnerId) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_INFO_ENTRY), - "::", - stringify!(OwnerId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecurityId) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_INFO_ENTRY), - "::", - stringify!(SecurityId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Usn) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_INFO_ENTRY), - "::", - stringify!(Usn), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StorageReserveId) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LAYOUT_INFO_ENTRY), - "::", - stringify!(StorageReserveId), - ), - ); -} -impl Default for _FILE_LAYOUT_INFO_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_LAYOUT_INFO_ENTRY = _FILE_LAYOUT_INFO_ENTRY; -pub type PFILE_LAYOUT_INFO_ENTRY = *mut _FILE_LAYOUT_INFO_ENTRY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _STREAM_LAYOUT_ENTRY { - pub Version: ULONG, - pub NextStreamOffset: ULONG, - pub Flags: ULONG, - pub ExtentInformationOffset: ULONG, - pub AllocationSize: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub StreamInformationOffset: ULONG, - pub AttributeTypeCode: ULONG, - pub AttributeFlags: ULONG, - pub StreamIdentifierLength: ULONG, - pub StreamIdentifier: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__STREAM_LAYOUT_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_STREAM_LAYOUT_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STREAM_LAYOUT_ENTRY>(), - 56usize, - concat!("Size of: ", stringify!(_STREAM_LAYOUT_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_STREAM_LAYOUT_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_STREAM_LAYOUT_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_LAYOUT_ENTRY), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NextStreamOffset) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_LAYOUT_ENTRY), - "::", - stringify!(NextStreamOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_LAYOUT_ENTRY), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExtentInformationOffset) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_LAYOUT_ENTRY), - "::", - stringify!(ExtentInformationOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_LAYOUT_ENTRY), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_LAYOUT_ENTRY), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StreamInformationOffset) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_LAYOUT_ENTRY), - "::", - stringify!(StreamInformationOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AttributeTypeCode) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_LAYOUT_ENTRY), - "::", - stringify!(AttributeTypeCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AttributeFlags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_LAYOUT_ENTRY), - "::", - stringify!(AttributeFlags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StreamIdentifierLength) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_LAYOUT_ENTRY), - "::", - stringify!(StreamIdentifierLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StreamIdentifier) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_LAYOUT_ENTRY), - "::", - stringify!(StreamIdentifier), - ), - ); -} -impl Default for _STREAM_LAYOUT_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type STREAM_LAYOUT_ENTRY = _STREAM_LAYOUT_ENTRY; -pub type PSTREAM_LAYOUT_ENTRY = *mut _STREAM_LAYOUT_ENTRY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _STREAM_EXTENT_ENTRY { - pub Flags: ULONG, - pub ExtentInformation: _STREAM_EXTENT_ENTRY__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _STREAM_EXTENT_ENTRY__bindgen_ty_1 { - pub RetrievalPointers: RETRIEVAL_POINTERS_BUFFER, -} -#[test] -fn bindgen_test_layout__STREAM_EXTENT_ENTRY__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_STREAM_EXTENT_ENTRY__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STREAM_EXTENT_ENTRY__bindgen_ty_1>(), - 32usize, - concat!("Size of: ", stringify!(_STREAM_EXTENT_ENTRY__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_STREAM_EXTENT_ENTRY__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_STREAM_EXTENT_ENTRY__bindgen_ty_1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RetrievalPointers) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_EXTENT_ENTRY__bindgen_ty_1), - "::", - stringify!(RetrievalPointers), - ), - ); -} -impl Default for _STREAM_EXTENT_ENTRY__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__STREAM_EXTENT_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_STREAM_EXTENT_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STREAM_EXTENT_ENTRY>(), - 40usize, - concat!("Size of: ", stringify!(_STREAM_EXTENT_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_STREAM_EXTENT_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_STREAM_EXTENT_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_EXTENT_ENTRY), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExtentInformation) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_EXTENT_ENTRY), - "::", - stringify!(ExtentInformation), - ), - ); -} -impl Default for _STREAM_EXTENT_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type STREAM_EXTENT_ENTRY = _STREAM_EXTENT_ENTRY; -pub type PSTREAM_EXTENT_ENTRY = *mut _STREAM_EXTENT_ENTRY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FSCTL_GET_INTEGRITY_INFORMATION_BUFFER { - pub ChecksumAlgorithm: USHORT, - pub Reserved: USHORT, - pub Flags: ULONG, - pub ChecksumChunkSizeInBytes: ULONG, - pub ClusterSizeInBytes: ULONG, -} -#[test] -fn bindgen_test_layout__FSCTL_GET_INTEGRITY_INFORMATION_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_GET_INTEGRITY_INFORMATION_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_GET_INTEGRITY_INFORMATION_BUFFER>(), - 16usize, - concat!("Size of: ", stringify!(_FSCTL_GET_INTEGRITY_INFORMATION_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_GET_INTEGRITY_INFORMATION_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_FSCTL_GET_INTEGRITY_INFORMATION_BUFFER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ChecksumAlgorithm) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_GET_INTEGRITY_INFORMATION_BUFFER), - "::", - stringify!(ChecksumAlgorithm), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_GET_INTEGRITY_INFORMATION_BUFFER), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_GET_INTEGRITY_INFORMATION_BUFFER), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ChecksumChunkSizeInBytes) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_GET_INTEGRITY_INFORMATION_BUFFER), - "::", - stringify!(ChecksumChunkSizeInBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClusterSizeInBytes) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_GET_INTEGRITY_INFORMATION_BUFFER), - "::", - stringify!(ClusterSizeInBytes), - ), - ); -} -pub type FSCTL_GET_INTEGRITY_INFORMATION_BUFFER = _FSCTL_GET_INTEGRITY_INFORMATION_BUFFER; -pub type PFSCTL_GET_INTEGRITY_INFORMATION_BUFFER = *mut _FSCTL_GET_INTEGRITY_INFORMATION_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FSCTL_SET_INTEGRITY_INFORMATION_BUFFER { - pub ChecksumAlgorithm: USHORT, - pub Reserved: USHORT, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__FSCTL_SET_INTEGRITY_INFORMATION_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER>(), - 8usize, - concat!("Size of: ", stringify!(_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ChecksumAlgorithm) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER), - "::", - stringify!(ChecksumAlgorithm), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER), - "::", - stringify!(Flags), - ), - ); -} -pub type FSCTL_SET_INTEGRITY_INFORMATION_BUFFER = _FSCTL_SET_INTEGRITY_INFORMATION_BUFFER; -pub type PFSCTL_SET_INTEGRITY_INFORMATION_BUFFER = *mut _FSCTL_SET_INTEGRITY_INFORMATION_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX { - pub EnableIntegrity: UCHAR, - pub KeepIntegrityStateUnchanged: UCHAR, - pub Reserved: USHORT, - pub Flags: ULONG, - pub Version: UCHAR, - pub Reserved2: [UCHAR; 7usize], -} -#[test] -fn bindgen_test_layout__FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX>(), - 16usize, - concat!("Size of: ", stringify!(_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX>(), - 4usize, - concat!("Alignment of ", stringify!(_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EnableIntegrity) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX), - "::", - stringify!(EnableIntegrity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KeepIntegrityStateUnchanged) as usize - - ptr as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX), - "::", - stringify!(KeepIntegrityStateUnchanged), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX), - "::", - stringify!(Reserved2), - ), - ); -} -pub type FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX = _FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX; -pub type PFSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX = *mut _FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FSCTL_OFFLOAD_READ_INPUT { - pub Size: ULONG, - pub Flags: ULONG, - pub TokenTimeToLive: ULONG, - pub Reserved: ULONG, - pub FileOffset: ULONGLONG, - pub CopyLength: ULONGLONG, -} -#[test] -fn bindgen_test_layout__FSCTL_OFFLOAD_READ_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_OFFLOAD_READ_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_OFFLOAD_READ_INPUT>(), - 32usize, - concat!("Size of: ", stringify!(_FSCTL_OFFLOAD_READ_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_OFFLOAD_READ_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_FSCTL_OFFLOAD_READ_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_READ_INPUT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_READ_INPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TokenTimeToLive) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_READ_INPUT), - "::", - stringify!(TokenTimeToLive), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_READ_INPUT), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileOffset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_READ_INPUT), - "::", - stringify!(FileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CopyLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_READ_INPUT), - "::", - stringify!(CopyLength), - ), - ); -} -pub type FSCTL_OFFLOAD_READ_INPUT = _FSCTL_OFFLOAD_READ_INPUT; -pub type PFSCTL_OFFLOAD_READ_INPUT = *mut _FSCTL_OFFLOAD_READ_INPUT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FSCTL_OFFLOAD_READ_OUTPUT { - pub Size: ULONG, - pub Flags: ULONG, - pub TransferLength: ULONGLONG, - pub Token: [UCHAR; 512usize], -} -#[test] -fn bindgen_test_layout__FSCTL_OFFLOAD_READ_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_OFFLOAD_READ_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_OFFLOAD_READ_OUTPUT>(), - 528usize, - concat!("Size of: ", stringify!(_FSCTL_OFFLOAD_READ_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_OFFLOAD_READ_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_FSCTL_OFFLOAD_READ_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_READ_OUTPUT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_READ_OUTPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TransferLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_READ_OUTPUT), - "::", - stringify!(TransferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Token) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_READ_OUTPUT), - "::", - stringify!(Token), - ), - ); -} -impl Default for _FSCTL_OFFLOAD_READ_OUTPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSCTL_OFFLOAD_READ_OUTPUT = _FSCTL_OFFLOAD_READ_OUTPUT; -pub type PFSCTL_OFFLOAD_READ_OUTPUT = *mut _FSCTL_OFFLOAD_READ_OUTPUT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FSCTL_OFFLOAD_WRITE_INPUT { - pub Size: ULONG, - pub Flags: ULONG, - pub FileOffset: ULONGLONG, - pub CopyLength: ULONGLONG, - pub TransferOffset: ULONGLONG, - pub Token: [UCHAR; 512usize], -} -#[test] -fn bindgen_test_layout__FSCTL_OFFLOAD_WRITE_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_OFFLOAD_WRITE_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_OFFLOAD_WRITE_INPUT>(), - 544usize, - concat!("Size of: ", stringify!(_FSCTL_OFFLOAD_WRITE_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_OFFLOAD_WRITE_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_FSCTL_OFFLOAD_WRITE_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_WRITE_INPUT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_WRITE_INPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileOffset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_WRITE_INPUT), - "::", - stringify!(FileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CopyLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_WRITE_INPUT), - "::", - stringify!(CopyLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TransferOffset) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_WRITE_INPUT), - "::", - stringify!(TransferOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Token) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_WRITE_INPUT), - "::", - stringify!(Token), - ), - ); -} -impl Default for _FSCTL_OFFLOAD_WRITE_INPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSCTL_OFFLOAD_WRITE_INPUT = _FSCTL_OFFLOAD_WRITE_INPUT; -pub type PFSCTL_OFFLOAD_WRITE_INPUT = *mut _FSCTL_OFFLOAD_WRITE_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FSCTL_OFFLOAD_WRITE_OUTPUT { - pub Size: ULONG, - pub Flags: ULONG, - pub LengthWritten: ULONGLONG, -} -#[test] -fn bindgen_test_layout__FSCTL_OFFLOAD_WRITE_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_OFFLOAD_WRITE_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_OFFLOAD_WRITE_OUTPUT>(), - 16usize, - concat!("Size of: ", stringify!(_FSCTL_OFFLOAD_WRITE_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_OFFLOAD_WRITE_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_FSCTL_OFFLOAD_WRITE_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_WRITE_OUTPUT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_WRITE_OUTPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LengthWritten) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_OFFLOAD_WRITE_OUTPUT), - "::", - stringify!(LengthWritten), - ), - ); -} -pub type FSCTL_OFFLOAD_WRITE_OUTPUT = _FSCTL_OFFLOAD_WRITE_OUTPUT; -pub type PFSCTL_OFFLOAD_WRITE_OUTPUT = *mut _FSCTL_OFFLOAD_WRITE_OUTPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SET_PURGE_FAILURE_MODE_INPUT { - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__SET_PURGE_FAILURE_MODE_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SET_PURGE_FAILURE_MODE_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SET_PURGE_FAILURE_MODE_INPUT>(), - 4usize, - concat!("Size of: ", stringify!(_SET_PURGE_FAILURE_MODE_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SET_PURGE_FAILURE_MODE_INPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_SET_PURGE_FAILURE_MODE_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SET_PURGE_FAILURE_MODE_INPUT), - "::", - stringify!(Flags), - ), - ); -} -pub type SET_PURGE_FAILURE_MODE_INPUT = _SET_PURGE_FAILURE_MODE_INPUT; -pub type PSET_PURGE_FAILURE_MODE_INPUT = *mut _SET_PURGE_FAILURE_MODE_INPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _REPAIR_COPIES_INPUT { - pub Size: ULONG, - pub Flags: ULONG, - pub FileOffset: LARGE_INTEGER, - pub Length: ULONG, - pub SourceCopy: ULONG, - pub NumberOfRepairCopies: ULONG, - pub RepairCopies: [ULONG; 1usize], -} -#[test] -fn bindgen_test_layout__REPAIR_COPIES_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_REPAIR_COPIES_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REPAIR_COPIES_INPUT>(), - 32usize, - concat!("Size of: ", stringify!(_REPAIR_COPIES_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_REPAIR_COPIES_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_REPAIR_COPIES_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPAIR_COPIES_INPUT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REPAIR_COPIES_INPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileOffset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REPAIR_COPIES_INPUT), - "::", - stringify!(FileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REPAIR_COPIES_INPUT), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceCopy) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_REPAIR_COPIES_INPUT), - "::", - stringify!(SourceCopy), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfRepairCopies) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REPAIR_COPIES_INPUT), - "::", - stringify!(NumberOfRepairCopies), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RepairCopies) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_REPAIR_COPIES_INPUT), - "::", - stringify!(RepairCopies), - ), - ); -} -impl Default for _REPAIR_COPIES_INPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REPAIR_COPIES_INPUT = _REPAIR_COPIES_INPUT; -pub type PREPAIR_COPIES_INPUT = *mut _REPAIR_COPIES_INPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _REPAIR_COPIES_OUTPUT { - pub Size: ULONG, - pub Status: NTSTATUS, - pub ResumeFileOffset: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__REPAIR_COPIES_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_REPAIR_COPIES_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REPAIR_COPIES_OUTPUT>(), - 16usize, - concat!("Size of: ", stringify!(_REPAIR_COPIES_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_REPAIR_COPIES_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_REPAIR_COPIES_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPAIR_COPIES_OUTPUT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REPAIR_COPIES_OUTPUT), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ResumeFileOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REPAIR_COPIES_OUTPUT), - "::", - stringify!(ResumeFileOffset), - ), - ); -} -impl Default for _REPAIR_COPIES_OUTPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REPAIR_COPIES_OUTPUT = _REPAIR_COPIES_OUTPUT; -pub type PREPAIR_COPIES_OUTPUT = *mut _REPAIR_COPIES_OUTPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_REGION_INFO { - pub FileOffset: LONGLONG, - pub Length: LONGLONG, - pub Usage: ULONG, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_REGION_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_REGION_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_REGION_INFO>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_REGION_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_REGION_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_REGION_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REGION_INFO), - "::", - stringify!(FileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REGION_INFO), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Usage) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REGION_INFO), - "::", - stringify!(Usage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REGION_INFO), - "::", - stringify!(Reserved), - ), - ); -} -pub type FILE_REGION_INFO = _FILE_REGION_INFO; -pub type PFILE_REGION_INFO = *mut _FILE_REGION_INFO; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_REGION_OUTPUT { - pub Flags: ULONG, - pub TotalRegionEntryCount: ULONG, - pub RegionEntryCount: ULONG, - pub Reserved: ULONG, - pub Region: [FILE_REGION_INFO; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_REGION_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_REGION_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_REGION_OUTPUT>(), - 40usize, - concat!("Size of: ", stringify!(_FILE_REGION_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_REGION_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_REGION_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REGION_OUTPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalRegionEntryCount) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REGION_OUTPUT), - "::", - stringify!(TotalRegionEntryCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RegionEntryCount) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REGION_OUTPUT), - "::", - stringify!(RegionEntryCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REGION_OUTPUT), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Region) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REGION_OUTPUT), - "::", - stringify!(Region), - ), - ); -} -pub type FILE_REGION_OUTPUT = _FILE_REGION_OUTPUT; -pub type PFILE_REGION_OUTPUT = *mut _FILE_REGION_OUTPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_REGION_INPUT { - pub FileOffset: LONGLONG, - pub Length: LONGLONG, - pub DesiredUsage: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_REGION_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_REGION_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_REGION_INPUT>(), - 24usize, - concat!("Size of: ", stringify!(_FILE_REGION_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_REGION_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_REGION_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REGION_INPUT), - "::", - stringify!(FileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REGION_INPUT), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DesiredUsage) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_REGION_INPUT), - "::", - stringify!(DesiredUsage), - ), - ); -} -pub type FILE_REGION_INPUT = _FILE_REGION_INPUT; -pub type PFILE_REGION_INPUT = *mut _FILE_REGION_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WRITE_USN_REASON_INPUT { - pub Flags: ULONG, - pub UsnReasonToWrite: ULONG, -} -#[test] -fn bindgen_test_layout__WRITE_USN_REASON_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_WRITE_USN_REASON_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WRITE_USN_REASON_INPUT>(), - 8usize, - concat!("Size of: ", stringify!(_WRITE_USN_REASON_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_WRITE_USN_REASON_INPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_WRITE_USN_REASON_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WRITE_USN_REASON_INPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UsnReasonToWrite) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WRITE_USN_REASON_INPUT), - "::", - stringify!(UsnReasonToWrite), - ), - ); -} -pub type WRITE_USN_REASON_INPUT = _WRITE_USN_REASON_INPUT; -pub type PWRITE_USN_REASON_INPUT = *mut _WRITE_USN_REASON_INPUT; -pub mod _FILE_STORAGE_TIER_MEDIA_TYPE { - pub type Type = ::core::ffi::c_int; - pub const FileStorageTierMediaTypeUnspecified: Type = 0; - pub const FileStorageTierMediaTypeDisk: Type = 1; - pub const FileStorageTierMediaTypeSsd: Type = 2; - pub const FileStorageTierMediaTypeScm: Type = 4; - pub const FileStorageTierMediaTypeMax: Type = 5; -} -pub use self::_FILE_STORAGE_TIER_MEDIA_TYPE::Type as FILE_STORAGE_TIER_MEDIA_TYPE; -pub type PFILE_STORAGE_TIER_MEDIA_TYPE = *mut _FILE_STORAGE_TIER_MEDIA_TYPE::Type; -pub mod _FILE_STORAGE_TIER_CLASS { - pub type Type = ::core::ffi::c_int; - pub const FileStorageTierClassUnspecified: Type = 0; - pub const FileStorageTierClassCapacity: Type = 1; - pub const FileStorageTierClassPerformance: Type = 2; - pub const FileStorageTierClassMax: Type = 3; -} -pub use self::_FILE_STORAGE_TIER_CLASS::Type as FILE_STORAGE_TIER_CLASS; -pub type PFILE_STORAGE_TIER_CLASS = *mut _FILE_STORAGE_TIER_CLASS::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_STORAGE_TIER { - pub Id: GUID, - pub Name: [WCHAR; 256usize], - pub Description: [WCHAR; 256usize], - pub Flags: ULONGLONG, - pub ProvisionedCapacity: ULONGLONG, - pub MediaType: FILE_STORAGE_TIER_MEDIA_TYPE, - pub Class: FILE_STORAGE_TIER_CLASS, -} -#[test] -fn bindgen_test_layout__FILE_STORAGE_TIER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_STORAGE_TIER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_STORAGE_TIER>(), - 1064usize, - concat!("Size of: ", stringify!(_FILE_STORAGE_TIER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_STORAGE_TIER>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_STORAGE_TIER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STORAGE_TIER), - "::", - stringify!(Id), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STORAGE_TIER), - "::", - stringify!(Name), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Description) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STORAGE_TIER), - "::", - stringify!(Description), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 1040usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STORAGE_TIER), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProvisionedCapacity) as usize - ptr as usize - }, - 1048usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STORAGE_TIER), - "::", - stringify!(ProvisionedCapacity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MediaType) as usize - ptr as usize }, - 1056usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STORAGE_TIER), - "::", - stringify!(MediaType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Class) as usize - ptr as usize }, - 1060usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STORAGE_TIER), - "::", - stringify!(Class), - ), - ); -} -impl Default for _FILE_STORAGE_TIER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_STORAGE_TIER = _FILE_STORAGE_TIER; -pub type PFILE_STORAGE_TIER = *mut _FILE_STORAGE_TIER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FSCTL_QUERY_STORAGE_CLASSES_OUTPUT { - pub Version: ULONG, - pub Size: ULONG, - pub Flags: ULONG, - pub TotalNumberOfTiers: ULONG, - pub NumberOfTiersReturned: ULONG, - pub Tiers: [FILE_STORAGE_TIER; 1usize], -} -#[test] -fn bindgen_test_layout__FSCTL_QUERY_STORAGE_CLASSES_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_QUERY_STORAGE_CLASSES_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_QUERY_STORAGE_CLASSES_OUTPUT>(), - 1088usize, - concat!("Size of: ", stringify!(_FSCTL_QUERY_STORAGE_CLASSES_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_QUERY_STORAGE_CLASSES_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_FSCTL_QUERY_STORAGE_CLASSES_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_STORAGE_CLASSES_OUTPUT), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_STORAGE_CLASSES_OUTPUT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_STORAGE_CLASSES_OUTPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalNumberOfTiers) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_STORAGE_CLASSES_OUTPUT), - "::", - stringify!(TotalNumberOfTiers), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfTiersReturned) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_STORAGE_CLASSES_OUTPUT), - "::", - stringify!(NumberOfTiersReturned), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Tiers) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_STORAGE_CLASSES_OUTPUT), - "::", - stringify!(Tiers), - ), - ); -} -impl Default for _FSCTL_QUERY_STORAGE_CLASSES_OUTPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSCTL_QUERY_STORAGE_CLASSES_OUTPUT = _FSCTL_QUERY_STORAGE_CLASSES_OUTPUT; -pub type PFSCTL_QUERY_STORAGE_CLASSES_OUTPUT = *mut _FSCTL_QUERY_STORAGE_CLASSES_OUTPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _STREAM_INFORMATION_ENTRY { - pub Version: ULONG, - pub Flags: ULONG, - pub StreamInformation: _STREAM_INFORMATION_ENTRY__StreamInformation, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _STREAM_INFORMATION_ENTRY__StreamInformation { - pub DesiredStorageClass: _STREAM_INFORMATION_ENTRY__StreamInformation__DesiredStorageClass, - pub DataStream: _STREAM_INFORMATION_ENTRY__StreamInformation__DataStream, - pub Reparse: _STREAM_INFORMATION_ENTRY__StreamInformation__Reparse, - pub Ea: _STREAM_INFORMATION_ENTRY__StreamInformation__Ea, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _STREAM_INFORMATION_ENTRY__StreamInformation__DesiredStorageClass { - pub Class: FILE_STORAGE_TIER_CLASS, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__STREAM_INFORMATION_ENTRY__StreamInformation__DesiredStorageClass() { - const UNINIT: ::core::mem::MaybeUninit< - _STREAM_INFORMATION_ENTRY__StreamInformation__DesiredStorageClass, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _STREAM_INFORMATION_ENTRY__StreamInformation__DesiredStorageClass, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__DesiredStorageClass), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _STREAM_INFORMATION_ENTRY__StreamInformation__DesiredStorageClass, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__DesiredStorageClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _STREAM_INFORMATION_ENTRY__StreamInformation__DesiredStorageClass - ), - "::", - stringify!(Class), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!( - _STREAM_INFORMATION_ENTRY__StreamInformation__DesiredStorageClass - ), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _STREAM_INFORMATION_ENTRY__StreamInformation__DesiredStorageClass { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _STREAM_INFORMATION_ENTRY__StreamInformation__DataStream { - pub Length: USHORT, - pub Flags: USHORT, - pub Reserved: ULONG, - pub Vdl: ULONGLONG, -} -#[test] -fn bindgen_test_layout__STREAM_INFORMATION_ENTRY__StreamInformation__DataStream() { - const UNINIT: ::core::mem::MaybeUninit< - _STREAM_INFORMATION_ENTRY__StreamInformation__DataStream, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _STREAM_INFORMATION_ENTRY__StreamInformation__DataStream, - >(), - 16usize, - concat!( - "Size of: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__DataStream), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _STREAM_INFORMATION_ENTRY__StreamInformation__DataStream, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__DataStream), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__DataStream), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__DataStream), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__DataStream), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vdl) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__DataStream), - "::", - stringify!(Vdl), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _STREAM_INFORMATION_ENTRY__StreamInformation__Reparse { - pub Length: USHORT, - pub Flags: USHORT, - pub ReparseDataSize: ULONG, - pub ReparseDataOffset: ULONG, -} -#[test] -fn bindgen_test_layout__STREAM_INFORMATION_ENTRY__StreamInformation__Reparse() { - const UNINIT: ::core::mem::MaybeUninit< - _STREAM_INFORMATION_ENTRY__StreamInformation__Reparse, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STREAM_INFORMATION_ENTRY__StreamInformation__Reparse>(), - 12usize, - concat!( - "Size of: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__Reparse), - ), - ); - assert_eq!( - ::core::mem::align_of::<_STREAM_INFORMATION_ENTRY__StreamInformation__Reparse>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__Reparse), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__Reparse), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__Reparse), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparseDataSize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__Reparse), - "::", - stringify!(ReparseDataSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReparseDataOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__Reparse), - "::", - stringify!(ReparseDataOffset), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _STREAM_INFORMATION_ENTRY__StreamInformation__Ea { - pub Length: USHORT, - pub Flags: USHORT, - pub EaSize: ULONG, - pub EaInformationOffset: ULONG, -} -#[test] -fn bindgen_test_layout__STREAM_INFORMATION_ENTRY__StreamInformation__Ea() { - const UNINIT: ::core::mem::MaybeUninit< - _STREAM_INFORMATION_ENTRY__StreamInformation__Ea, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STREAM_INFORMATION_ENTRY__StreamInformation__Ea>(), - 12usize, - concat!( - "Size of: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__Ea), - ), - ); - assert_eq!( - ::core::mem::align_of::<_STREAM_INFORMATION_ENTRY__StreamInformation__Ea>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__Ea), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__Ea), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__Ea), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__Ea), - "::", - stringify!(EaSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EaInformationOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation__Ea), - "::", - stringify!(EaInformationOffset), - ), - ); -} -#[test] -fn bindgen_test_layout__STREAM_INFORMATION_ENTRY__StreamInformation() { - const UNINIT: ::core::mem::MaybeUninit< - _STREAM_INFORMATION_ENTRY__StreamInformation, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STREAM_INFORMATION_ENTRY__StreamInformation>(), - 16usize, - concat!("Size of: ", stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation)), - ); - assert_eq!( - ::core::mem::align_of::<_STREAM_INFORMATION_ENTRY__StreamInformation>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DesiredStorageClass) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation), - "::", - stringify!(DesiredStorageClass), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataStream) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation), - "::", - stringify!(DataStream), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reparse) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation), - "::", - stringify!(Reparse), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ea) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY__StreamInformation), - "::", - stringify!(Ea), - ), - ); -} -impl Default for _STREAM_INFORMATION_ENTRY__StreamInformation { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__STREAM_INFORMATION_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_STREAM_INFORMATION_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STREAM_INFORMATION_ENTRY>(), - 24usize, - concat!("Size of: ", stringify!(_STREAM_INFORMATION_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_STREAM_INFORMATION_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_STREAM_INFORMATION_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StreamInformation) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_STREAM_INFORMATION_ENTRY), - "::", - stringify!(StreamInformation), - ), - ); -} -impl Default for _STREAM_INFORMATION_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type STREAM_INFORMATION_ENTRY = _STREAM_INFORMATION_ENTRY; -pub type PSTREAM_INFORMATION_ENTRY = *mut _STREAM_INFORMATION_ENTRY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FSCTL_QUERY_REGION_INFO_INPUT { - pub Version: ULONG, - pub Size: ULONG, - pub Flags: ULONG, - pub NumberOfTierIds: ULONG, - pub TierIds: [GUID; 1usize], -} -#[test] -fn bindgen_test_layout__FSCTL_QUERY_REGION_INFO_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_QUERY_REGION_INFO_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_QUERY_REGION_INFO_INPUT>(), - 32usize, - concat!("Size of: ", stringify!(_FSCTL_QUERY_REGION_INFO_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_QUERY_REGION_INFO_INPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_FSCTL_QUERY_REGION_INFO_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_REGION_INFO_INPUT), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_REGION_INFO_INPUT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_REGION_INFO_INPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfTierIds) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_REGION_INFO_INPUT), - "::", - stringify!(NumberOfTierIds), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TierIds) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_REGION_INFO_INPUT), - "::", - stringify!(TierIds), - ), - ); -} -pub type FSCTL_QUERY_REGION_INFO_INPUT = _FSCTL_QUERY_REGION_INFO_INPUT; -pub type PFSCTL_QUERY_REGION_INFO_INPUT = *mut _FSCTL_QUERY_REGION_INFO_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_STORAGE_TIER_REGION { - pub TierId: GUID, - pub Offset: ULONGLONG, - pub Length: ULONGLONG, -} -#[test] -fn bindgen_test_layout__FILE_STORAGE_TIER_REGION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_STORAGE_TIER_REGION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_STORAGE_TIER_REGION>(), - 32usize, - concat!("Size of: ", stringify!(_FILE_STORAGE_TIER_REGION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_STORAGE_TIER_REGION>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_STORAGE_TIER_REGION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TierId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STORAGE_TIER_REGION), - "::", - stringify!(TierId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STORAGE_TIER_REGION), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STORAGE_TIER_REGION), - "::", - stringify!(Length), - ), - ); -} -pub type FILE_STORAGE_TIER_REGION = _FILE_STORAGE_TIER_REGION; -pub type PFILE_STORAGE_TIER_REGION = *mut _FILE_STORAGE_TIER_REGION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FSCTL_QUERY_REGION_INFO_OUTPUT { - pub Version: ULONG, - pub Size: ULONG, - pub Flags: ULONG, - pub Reserved: ULONG, - pub Alignment: ULONGLONG, - pub TotalNumberOfRegions: ULONG, - pub NumberOfRegionsReturned: ULONG, - pub Regions: [FILE_STORAGE_TIER_REGION; 1usize], -} -#[test] -fn bindgen_test_layout__FSCTL_QUERY_REGION_INFO_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_QUERY_REGION_INFO_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_QUERY_REGION_INFO_OUTPUT>(), - 64usize, - concat!("Size of: ", stringify!(_FSCTL_QUERY_REGION_INFO_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_QUERY_REGION_INFO_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_FSCTL_QUERY_REGION_INFO_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_REGION_INFO_OUTPUT), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_REGION_INFO_OUTPUT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_REGION_INFO_OUTPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_REGION_INFO_OUTPUT), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Alignment) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_REGION_INFO_OUTPUT), - "::", - stringify!(Alignment), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalNumberOfRegions) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_REGION_INFO_OUTPUT), - "::", - stringify!(TotalNumberOfRegions), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfRegionsReturned) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_REGION_INFO_OUTPUT), - "::", - stringify!(NumberOfRegionsReturned), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Regions) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_REGION_INFO_OUTPUT), - "::", - stringify!(Regions), - ), - ); -} -pub type FSCTL_QUERY_REGION_INFO_OUTPUT = _FSCTL_QUERY_REGION_INFO_OUTPUT; -pub type PFSCTL_QUERY_REGION_INFO_OUTPUT = *mut _FSCTL_QUERY_REGION_INFO_OUTPUT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_DESIRED_STORAGE_CLASS_INFORMATION { - pub Class: FILE_STORAGE_TIER_CLASS, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_DESIRED_STORAGE_CLASS_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_DESIRED_STORAGE_CLASS_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_DESIRED_STORAGE_CLASS_INFORMATION>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_DESIRED_STORAGE_CLASS_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_DESIRED_STORAGE_CLASS_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_DESIRED_STORAGE_CLASS_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DESIRED_STORAGE_CLASS_INFORMATION), - "::", - stringify!(Class), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_DESIRED_STORAGE_CLASS_INFORMATION), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _FILE_DESIRED_STORAGE_CLASS_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_DESIRED_STORAGE_CLASS_INFORMATION = _FILE_DESIRED_STORAGE_CLASS_INFORMATION; -pub type PFILE_DESIRED_STORAGE_CLASS_INFORMATION = *mut _FILE_DESIRED_STORAGE_CLASS_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DUPLICATE_EXTENTS_DATA { - pub FileHandle: HANDLE, - pub SourceFileOffset: LARGE_INTEGER, - pub TargetFileOffset: LARGE_INTEGER, - pub ByteCount: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__DUPLICATE_EXTENTS_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_DUPLICATE_EXTENTS_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DUPLICATE_EXTENTS_DATA>(), - 32usize, - concat!("Size of: ", stringify!(_DUPLICATE_EXTENTS_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_DUPLICATE_EXTENTS_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_DUPLICATE_EXTENTS_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA), - "::", - stringify!(FileHandle), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceFileOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA), - "::", - stringify!(SourceFileOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetFileOffset) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA), - "::", - stringify!(TargetFileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteCount) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA), - "::", - stringify!(ByteCount), - ), - ); -} -impl Default for _DUPLICATE_EXTENTS_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DUPLICATE_EXTENTS_DATA = _DUPLICATE_EXTENTS_DATA; -pub type PDUPLICATE_EXTENTS_DATA = *mut _DUPLICATE_EXTENTS_DATA; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DUPLICATE_EXTENTS_DATA32 { - pub FileHandle: UINT32, - pub SourceFileOffset: LARGE_INTEGER, - pub TargetFileOffset: LARGE_INTEGER, - pub ByteCount: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__DUPLICATE_EXTENTS_DATA32() { - const UNINIT: ::core::mem::MaybeUninit<_DUPLICATE_EXTENTS_DATA32> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DUPLICATE_EXTENTS_DATA32>(), - 32usize, - concat!("Size of: ", stringify!(_DUPLICATE_EXTENTS_DATA32)), - ); - assert_eq!( - ::core::mem::align_of::<_DUPLICATE_EXTENTS_DATA32>(), - 8usize, - concat!("Alignment of ", stringify!(_DUPLICATE_EXTENTS_DATA32)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA32), - "::", - stringify!(FileHandle), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceFileOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA32), - "::", - stringify!(SourceFileOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetFileOffset) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA32), - "::", - stringify!(TargetFileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteCount) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA32), - "::", - stringify!(ByteCount), - ), - ); -} -impl Default for _DUPLICATE_EXTENTS_DATA32 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DUPLICATE_EXTENTS_DATA32 = _DUPLICATE_EXTENTS_DATA32; -pub type PDUPLICATE_EXTENTS_DATA32 = *mut _DUPLICATE_EXTENTS_DATA32; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DUPLICATE_EXTENTS_DATA_EX { - pub Size: SIZE_T, - pub FileHandle: HANDLE, - pub SourceFileOffset: LARGE_INTEGER, - pub TargetFileOffset: LARGE_INTEGER, - pub ByteCount: LARGE_INTEGER, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__DUPLICATE_EXTENTS_DATA_EX() { - const UNINIT: ::core::mem::MaybeUninit<_DUPLICATE_EXTENTS_DATA_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DUPLICATE_EXTENTS_DATA_EX>(), - 48usize, - concat!("Size of: ", stringify!(_DUPLICATE_EXTENTS_DATA_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_DUPLICATE_EXTENTS_DATA_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_DUPLICATE_EXTENTS_DATA_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA_EX), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileHandle) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA_EX), - "::", - stringify!(FileHandle), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceFileOffset) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA_EX), - "::", - stringify!(SourceFileOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetFileOffset) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA_EX), - "::", - stringify!(TargetFileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteCount) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA_EX), - "::", - stringify!(ByteCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA_EX), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _DUPLICATE_EXTENTS_DATA_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DUPLICATE_EXTENTS_DATA_EX = _DUPLICATE_EXTENTS_DATA_EX; -pub type PDUPLICATE_EXTENTS_DATA_EX = *mut _DUPLICATE_EXTENTS_DATA_EX; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DUPLICATE_EXTENTS_DATA_EX32 { - pub Size: ULONG32, - pub FileHandle: ULONG32, - pub SourceFileOffset: LARGE_INTEGER, - pub TargetFileOffset: LARGE_INTEGER, - pub ByteCount: LARGE_INTEGER, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__DUPLICATE_EXTENTS_DATA_EX32() { - const UNINIT: ::core::mem::MaybeUninit<_DUPLICATE_EXTENTS_DATA_EX32> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DUPLICATE_EXTENTS_DATA_EX32>(), - 40usize, - concat!("Size of: ", stringify!(_DUPLICATE_EXTENTS_DATA_EX32)), - ); - assert_eq!( - ::core::mem::align_of::<_DUPLICATE_EXTENTS_DATA_EX32>(), - 8usize, - concat!("Alignment of ", stringify!(_DUPLICATE_EXTENTS_DATA_EX32)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA_EX32), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileHandle) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA_EX32), - "::", - stringify!(FileHandle), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceFileOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA_EX32), - "::", - stringify!(SourceFileOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetFileOffset) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA_EX32), - "::", - stringify!(TargetFileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteCount) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA_EX32), - "::", - stringify!(ByteCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_EXTENTS_DATA_EX32), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _DUPLICATE_EXTENTS_DATA_EX32 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DUPLICATE_EXTENTS_DATA_EX32 = _DUPLICATE_EXTENTS_DATA_EX32; -pub type PDUPLICATE_EXTENTS_DATA_EX32 = *mut _DUPLICATE_EXTENTS_DATA_EX32; -pub mod _DUPLICATE_EXTENTS_STATE { - pub type Type = ::core::ffi::c_int; - pub const FileSnapStateInactive: Type = 0; - pub const FileSnapStateSource: Type = 1; - pub const FileSnapStateTarget: Type = 2; -} -pub use self::_DUPLICATE_EXTENTS_STATE::Type as DUPLICATE_EXTENTS_STATE; -pub type PDUPLICATE_EXTENTS_STATE = *mut _DUPLICATE_EXTENTS_STATE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ASYNC_DUPLICATE_EXTENTS_STATUS { - pub Version: ULONG, - pub State: DUPLICATE_EXTENTS_STATE, - pub SourceFileOffset: ULONGLONG, - pub TargetFileOffset: ULONGLONG, - pub ByteCount: ULONGLONG, - pub BytesDuplicated: ULONGLONG, -} -#[test] -fn bindgen_test_layout__ASYNC_DUPLICATE_EXTENTS_STATUS() { - const UNINIT: ::core::mem::MaybeUninit<_ASYNC_DUPLICATE_EXTENTS_STATUS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ASYNC_DUPLICATE_EXTENTS_STATUS>(), - 40usize, - concat!("Size of: ", stringify!(_ASYNC_DUPLICATE_EXTENTS_STATUS)), - ); - assert_eq!( - ::core::mem::align_of::<_ASYNC_DUPLICATE_EXTENTS_STATUS>(), - 8usize, - concat!("Alignment of ", stringify!(_ASYNC_DUPLICATE_EXTENTS_STATUS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ASYNC_DUPLICATE_EXTENTS_STATUS), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).State) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ASYNC_DUPLICATE_EXTENTS_STATUS), - "::", - stringify!(State), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceFileOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ASYNC_DUPLICATE_EXTENTS_STATUS), - "::", - stringify!(SourceFileOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetFileOffset) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ASYNC_DUPLICATE_EXTENTS_STATUS), - "::", - stringify!(TargetFileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteCount) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ASYNC_DUPLICATE_EXTENTS_STATUS), - "::", - stringify!(ByteCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesDuplicated) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_ASYNC_DUPLICATE_EXTENTS_STATUS), - "::", - stringify!(BytesDuplicated), - ), - ); -} -impl Default for _ASYNC_DUPLICATE_EXTENTS_STATUS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ASYNC_DUPLICATE_EXTENTS_STATUS = _ASYNC_DUPLICATE_EXTENTS_STATUS; -pub type PASYNC_DUPLICATE_EXTENTS_STATUS = *mut _ASYNC_DUPLICATE_EXTENTS_STATUS; -pub mod _REFS_SMR_VOLUME_GC_STATE { - pub type Type = ::core::ffi::c_int; - pub const SmrGcStateInactive: Type = 0; - pub const SmrGcStatePaused: Type = 1; - pub const SmrGcStateActive: Type = 2; - pub const SmrGcStateActiveFullSpeed: Type = 3; -} -pub use self::_REFS_SMR_VOLUME_GC_STATE::Type as REFS_SMR_VOLUME_GC_STATE; -pub type PREFS_SMR_VOLUME_GC_STATE = *mut _REFS_SMR_VOLUME_GC_STATE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _REFS_SMR_VOLUME_INFO_OUTPUT { - pub Version: ULONG, - pub Flags: ULONG, - pub SizeOfRandomlyWritableTier: LARGE_INTEGER, - pub FreeSpaceInRandomlyWritableTier: LARGE_INTEGER, - pub SizeofSMRTier: LARGE_INTEGER, - pub FreeSpaceInSMRTier: LARGE_INTEGER, - pub UsableFreeSpaceInSMRTier: LARGE_INTEGER, - pub VolumeGcState: REFS_SMR_VOLUME_GC_STATE, - pub VolumeGcLastStatus: NTSTATUS, - pub CurrentGcBandFillPercentage: ULONG, - pub Unused: [ULONGLONG; 6usize], -} -#[test] -fn bindgen_test_layout__REFS_SMR_VOLUME_INFO_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_REFS_SMR_VOLUME_INFO_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_SMR_VOLUME_INFO_OUTPUT>(), - 112usize, - concat!("Size of: ", stringify!(_REFS_SMR_VOLUME_INFO_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_SMR_VOLUME_INFO_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_REFS_SMR_VOLUME_INFO_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_INFO_OUTPUT), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_INFO_OUTPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SizeOfRandomlyWritableTier) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_INFO_OUTPUT), - "::", - stringify!(SizeOfRandomlyWritableTier), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeSpaceInRandomlyWritableTier) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_INFO_OUTPUT), - "::", - stringify!(FreeSpaceInRandomlyWritableTier), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SizeofSMRTier) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_INFO_OUTPUT), - "::", - stringify!(SizeofSMRTier), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeSpaceInSMRTier) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_INFO_OUTPUT), - "::", - stringify!(FreeSpaceInSMRTier), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UsableFreeSpaceInSMRTier) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_INFO_OUTPUT), - "::", - stringify!(UsableFreeSpaceInSMRTier), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeGcState) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_INFO_OUTPUT), - "::", - stringify!(VolumeGcState), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeGcLastStatus) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_INFO_OUTPUT), - "::", - stringify!(VolumeGcLastStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CurrentGcBandFillPercentage) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_INFO_OUTPUT), - "::", - stringify!(CurrentGcBandFillPercentage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_INFO_OUTPUT), - "::", - stringify!(Unused), - ), - ); -} -impl Default for _REFS_SMR_VOLUME_INFO_OUTPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REFS_SMR_VOLUME_INFO_OUTPUT = _REFS_SMR_VOLUME_INFO_OUTPUT; -pub type PREFS_SMR_VOLUME_INFO_OUTPUT = *mut _REFS_SMR_VOLUME_INFO_OUTPUT; -pub mod _REFS_SMR_VOLUME_GC_ACTION { - pub type Type = ::core::ffi::c_int; - pub const SmrGcActionStart: Type = 1; - pub const SmrGcActionStartFullSpeed: Type = 2; - pub const SmrGcActionPause: Type = 3; - pub const SmrGcActionStop: Type = 4; -} -pub use self::_REFS_SMR_VOLUME_GC_ACTION::Type as REFS_SMR_VOLUME_GC_ACTION; -pub type PREFS_SMR_VOLUME_GC_ACTION = *mut _REFS_SMR_VOLUME_GC_ACTION::Type; -pub mod _REFS_SMR_VOLUME_GC_METHOD { - pub type Type = ::core::ffi::c_int; - pub const SmrGcMethodCompaction: Type = 1; - pub const SmrGcMethodCompression: Type = 2; - pub const SmrGcMethodRotation: Type = 3; -} -pub use self::_REFS_SMR_VOLUME_GC_METHOD::Type as REFS_SMR_VOLUME_GC_METHOD; -pub type PREFS_SMR_VOLUME_GC_METHOD = *mut _REFS_SMR_VOLUME_GC_METHOD::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REFS_SMR_VOLUME_GC_PARAMETERS { - pub Version: ULONG, - pub Flags: ULONG, - pub Action: REFS_SMR_VOLUME_GC_ACTION, - pub Method: REFS_SMR_VOLUME_GC_METHOD, - pub IoGranularity: ULONG, - pub CompressionFormat: ULONG, - pub Unused: [ULONGLONG; 8usize], -} -#[test] -fn bindgen_test_layout__REFS_SMR_VOLUME_GC_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_REFS_SMR_VOLUME_GC_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_SMR_VOLUME_GC_PARAMETERS>(), - 88usize, - concat!("Size of: ", stringify!(_REFS_SMR_VOLUME_GC_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_SMR_VOLUME_GC_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_REFS_SMR_VOLUME_GC_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_GC_PARAMETERS), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_GC_PARAMETERS), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Action) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_GC_PARAMETERS), - "::", - stringify!(Action), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Method) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_GC_PARAMETERS), - "::", - stringify!(Method), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoGranularity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_GC_PARAMETERS), - "::", - stringify!(IoGranularity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompressionFormat) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_GC_PARAMETERS), - "::", - stringify!(CompressionFormat), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SMR_VOLUME_GC_PARAMETERS), - "::", - stringify!(Unused), - ), - ); -} -impl Default for _REFS_SMR_VOLUME_GC_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REFS_SMR_VOLUME_GC_PARAMETERS = _REFS_SMR_VOLUME_GC_PARAMETERS; -pub type PREFS_SMR_VOLUME_GC_PARAMETERS = *mut _REFS_SMR_VOLUME_GC_PARAMETERS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER { - pub OptimalWriteSize: ULONG, - pub StreamGranularitySize: ULONG, - pub StreamIdMin: ULONG, - pub StreamIdMax: ULONG, -} -#[test] -fn bindgen_test_layout__STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER>(), - 16usize, - concat!("Size of: ", stringify!(_STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OptimalWriteSize) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER), - "::", - stringify!(OptimalWriteSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StreamGranularitySize) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER), - "::", - stringify!(StreamGranularitySize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StreamIdMin) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER), - "::", - stringify!(StreamIdMin), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StreamIdMax) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER), - "::", - stringify!(StreamIdMax), - ), - ); -} -pub type STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER = _STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER; -pub type PSTREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER = *mut _STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _STREAMS_ASSOCIATE_ID_INPUT_BUFFER { - pub Flags: ULONG, - pub StreamId: ULONG, -} -#[test] -fn bindgen_test_layout__STREAMS_ASSOCIATE_ID_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_STREAMS_ASSOCIATE_ID_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STREAMS_ASSOCIATE_ID_INPUT_BUFFER>(), - 8usize, - concat!("Size of: ", stringify!(_STREAMS_ASSOCIATE_ID_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_STREAMS_ASSOCIATE_ID_INPUT_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_STREAMS_ASSOCIATE_ID_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAMS_ASSOCIATE_ID_INPUT_BUFFER), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StreamId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_STREAMS_ASSOCIATE_ID_INPUT_BUFFER), - "::", - stringify!(StreamId), - ), - ); -} -pub type STREAMS_ASSOCIATE_ID_INPUT_BUFFER = _STREAMS_ASSOCIATE_ID_INPUT_BUFFER; -pub type PSTREAMS_ASSOCIATE_ID_INPUT_BUFFER = *mut _STREAMS_ASSOCIATE_ID_INPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _STREAMS_QUERY_ID_OUTPUT_BUFFER { - pub StreamId: ULONG, -} -#[test] -fn bindgen_test_layout__STREAMS_QUERY_ID_OUTPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_STREAMS_QUERY_ID_OUTPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_STREAMS_QUERY_ID_OUTPUT_BUFFER>(), - 4usize, - concat!("Size of: ", stringify!(_STREAMS_QUERY_ID_OUTPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_STREAMS_QUERY_ID_OUTPUT_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_STREAMS_QUERY_ID_OUTPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StreamId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_STREAMS_QUERY_ID_OUTPUT_BUFFER), - "::", - stringify!(StreamId), - ), - ); -} -pub type STREAMS_QUERY_ID_OUTPUT_BUFFER = _STREAMS_QUERY_ID_OUTPUT_BUFFER; -pub type PSTREAMS_QUERY_ID_OUTPUT_BUFFER = *mut _STREAMS_QUERY_ID_OUTPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _QUERY_BAD_RANGES_INPUT_RANGE { - pub StartOffset: ULONGLONG, - pub LengthInBytes: ULONGLONG, -} -#[test] -fn bindgen_test_layout__QUERY_BAD_RANGES_INPUT_RANGE() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_BAD_RANGES_INPUT_RANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_BAD_RANGES_INPUT_RANGE>(), - 16usize, - concat!("Size of: ", stringify!(_QUERY_BAD_RANGES_INPUT_RANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_BAD_RANGES_INPUT_RANGE>(), - 8usize, - concat!("Alignment of ", stringify!(_QUERY_BAD_RANGES_INPUT_RANGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_BAD_RANGES_INPUT_RANGE), - "::", - stringify!(StartOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LengthInBytes) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_BAD_RANGES_INPUT_RANGE), - "::", - stringify!(LengthInBytes), - ), - ); -} -pub type QUERY_BAD_RANGES_INPUT_RANGE = _QUERY_BAD_RANGES_INPUT_RANGE; -pub type PQUERY_BAD_RANGES_INPUT_RANGE = *mut _QUERY_BAD_RANGES_INPUT_RANGE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _QUERY_BAD_RANGES_INPUT { - pub Flags: ULONG, - pub NumRanges: ULONG, - pub Ranges: [QUERY_BAD_RANGES_INPUT_RANGE; 1usize], -} -#[test] -fn bindgen_test_layout__QUERY_BAD_RANGES_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_BAD_RANGES_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_BAD_RANGES_INPUT>(), - 24usize, - concat!("Size of: ", stringify!(_QUERY_BAD_RANGES_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_BAD_RANGES_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_QUERY_BAD_RANGES_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_BAD_RANGES_INPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumRanges) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_BAD_RANGES_INPUT), - "::", - stringify!(NumRanges), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ranges) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_BAD_RANGES_INPUT), - "::", - stringify!(Ranges), - ), - ); -} -pub type QUERY_BAD_RANGES_INPUT = _QUERY_BAD_RANGES_INPUT; -pub type PQUERY_BAD_RANGES_INPUT = *mut _QUERY_BAD_RANGES_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _QUERY_BAD_RANGES_OUTPUT_RANGE { - pub Flags: ULONG, - pub Reserved: ULONG, - pub StartOffset: ULONGLONG, - pub LengthInBytes: ULONGLONG, -} -#[test] -fn bindgen_test_layout__QUERY_BAD_RANGES_OUTPUT_RANGE() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_BAD_RANGES_OUTPUT_RANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_BAD_RANGES_OUTPUT_RANGE>(), - 24usize, - concat!("Size of: ", stringify!(_QUERY_BAD_RANGES_OUTPUT_RANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_BAD_RANGES_OUTPUT_RANGE>(), - 8usize, - concat!("Alignment of ", stringify!(_QUERY_BAD_RANGES_OUTPUT_RANGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_BAD_RANGES_OUTPUT_RANGE), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_BAD_RANGES_OUTPUT_RANGE), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartOffset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_BAD_RANGES_OUTPUT_RANGE), - "::", - stringify!(StartOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LengthInBytes) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_BAD_RANGES_OUTPUT_RANGE), - "::", - stringify!(LengthInBytes), - ), - ); -} -pub type QUERY_BAD_RANGES_OUTPUT_RANGE = _QUERY_BAD_RANGES_OUTPUT_RANGE; -pub type PQUERY_BAD_RANGES_OUTPUT_RANGE = *mut _QUERY_BAD_RANGES_OUTPUT_RANGE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _QUERY_BAD_RANGES_OUTPUT { - pub Flags: ULONG, - pub NumBadRanges: ULONG, - pub NextOffsetToLookUp: ULONGLONG, - pub BadRanges: [QUERY_BAD_RANGES_OUTPUT_RANGE; 1usize], -} -#[test] -fn bindgen_test_layout__QUERY_BAD_RANGES_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_BAD_RANGES_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_BAD_RANGES_OUTPUT>(), - 40usize, - concat!("Size of: ", stringify!(_QUERY_BAD_RANGES_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_BAD_RANGES_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_QUERY_BAD_RANGES_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_BAD_RANGES_OUTPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumBadRanges) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_BAD_RANGES_OUTPUT), - "::", - stringify!(NumBadRanges), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NextOffsetToLookUp) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_BAD_RANGES_OUTPUT), - "::", - stringify!(NextOffsetToLookUp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BadRanges) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_BAD_RANGES_OUTPUT), - "::", - stringify!(BadRanges), - ), - ); -} -pub type QUERY_BAD_RANGES_OUTPUT = _QUERY_BAD_RANGES_OUTPUT; -pub type PQUERY_BAD_RANGES_OUTPUT = *mut _QUERY_BAD_RANGES_OUTPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT { - pub Flags: ULONG, - pub AlignmentShift: ULONG, - pub FileOffsetToAlign: ULONGLONG, - pub FallbackAlignmentShift: ULONG, -} -#[test] -fn bindgen_test_layout__SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT>(), - 24usize, - concat!("Size of: ", stringify!(_SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AlignmentShift) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT), - "::", - stringify!(AlignmentShift), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileOffsetToAlign) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT), - "::", - stringify!(FileOffsetToAlign), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FallbackAlignmentShift) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT), - "::", - stringify!(FallbackAlignmentShift), - ), - ); -} -pub type SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT = _SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT; -pub type PSET_DAX_ALLOC_ALIGNMENT_HINT_INPUT = *mut _SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT; -pub mod _VIRTUAL_STORAGE_BEHAVIOR_CODE { - pub type Type = ::core::ffi::c_int; - pub const VirtualStorageBehaviorUndefined: Type = 0; - pub const VirtualStorageBehaviorCacheWriteThrough: Type = 1; - pub const VirtualStorageBehaviorCacheWriteBack: Type = 2; - pub const VirtualStorageBehaviorStopIoProcessing: Type = 3; - pub const VirtualStorageBehaviorRestartIoProcessing: Type = 4; -} -pub use self::_VIRTUAL_STORAGE_BEHAVIOR_CODE::Type as VIRTUAL_STORAGE_BEHAVIOR_CODE; -pub type PVIRTUAL_STORAGE_BEHAVIOR_CODE = *mut _VIRTUAL_STORAGE_BEHAVIOR_CODE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT { - pub Size: ULONG, - pub BehaviorCode: VIRTUAL_STORAGE_BEHAVIOR_CODE, -} -#[test] -fn bindgen_test_layout__VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT>(), - 8usize, - concat!("Size of: ", stringify!(_VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BehaviorCode) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT), - "::", - stringify!(BehaviorCode), - ), - ); -} -impl Default for _VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT = _VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT; -pub type PVIRTUAL_STORAGE_SET_BEHAVIOR_INPUT = *mut _VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ENCRYPTION_KEY_CTRL_INPUT { - pub HeaderSize: ULONG, - pub StructureSize: ULONG, - pub KeyOffset: USHORT, - pub KeySize: USHORT, - pub DplLock: ULONG, - pub DplUserId: ULONGLONG, - pub DplCredentialId: ULONGLONG, -} -#[test] -fn bindgen_test_layout__ENCRYPTION_KEY_CTRL_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_ENCRYPTION_KEY_CTRL_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ENCRYPTION_KEY_CTRL_INPUT>(), - 32usize, - concat!("Size of: ", stringify!(_ENCRYPTION_KEY_CTRL_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_ENCRYPTION_KEY_CTRL_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_ENCRYPTION_KEY_CTRL_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HeaderSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTION_KEY_CTRL_INPUT), - "::", - stringify!(HeaderSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StructureSize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTION_KEY_CTRL_INPUT), - "::", - stringify!(StructureSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyOffset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTION_KEY_CTRL_INPUT), - "::", - stringify!(KeyOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeySize) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTION_KEY_CTRL_INPUT), - "::", - stringify!(KeySize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DplLock) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTION_KEY_CTRL_INPUT), - "::", - stringify!(DplLock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DplUserId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTION_KEY_CTRL_INPUT), - "::", - stringify!(DplUserId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DplCredentialId) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ENCRYPTION_KEY_CTRL_INPUT), - "::", - stringify!(DplCredentialId), - ), - ); -} -pub type ENCRYPTION_KEY_CTRL_INPUT = _ENCRYPTION_KEY_CTRL_INPUT; -pub type PENCRYPTION_KEY_CTRL_INPUT = *mut _ENCRYPTION_KEY_CTRL_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WOF_EXTERNAL_INFO { - pub Version: ULONG, - pub Provider: ULONG, -} -#[test] -fn bindgen_test_layout__WOF_EXTERNAL_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_WOF_EXTERNAL_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WOF_EXTERNAL_INFO>(), - 8usize, - concat!("Size of: ", stringify!(_WOF_EXTERNAL_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_WOF_EXTERNAL_INFO>(), - 4usize, - concat!("Alignment of ", stringify!(_WOF_EXTERNAL_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WOF_EXTERNAL_INFO), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Provider) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WOF_EXTERNAL_INFO), - "::", - stringify!(Provider), - ), - ); -} -pub type WOF_EXTERNAL_INFO = _WOF_EXTERNAL_INFO; -pub type PWOF_EXTERNAL_INFO = *mut _WOF_EXTERNAL_INFO; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WOF_EXTERNAL_FILE_ID { - pub FileId: FILE_ID_128, -} -#[test] -fn bindgen_test_layout__WOF_EXTERNAL_FILE_ID() { - const UNINIT: ::core::mem::MaybeUninit<_WOF_EXTERNAL_FILE_ID> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WOF_EXTERNAL_FILE_ID>(), - 16usize, - concat!("Size of: ", stringify!(_WOF_EXTERNAL_FILE_ID)), - ); - assert_eq!( - ::core::mem::align_of::<_WOF_EXTERNAL_FILE_ID>(), - 1usize, - concat!("Alignment of ", stringify!(_WOF_EXTERNAL_FILE_ID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WOF_EXTERNAL_FILE_ID), - "::", - stringify!(FileId), - ), - ); -} -pub type WOF_EXTERNAL_FILE_ID = _WOF_EXTERNAL_FILE_ID; -pub type PWOF_EXTERNAL_FILE_ID = *mut _WOF_EXTERNAL_FILE_ID; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WOF_VERSION_INFO { - pub WofVersion: ULONG, -} -#[test] -fn bindgen_test_layout__WOF_VERSION_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_WOF_VERSION_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WOF_VERSION_INFO>(), - 4usize, - concat!("Size of: ", stringify!(_WOF_VERSION_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_WOF_VERSION_INFO>(), - 4usize, - concat!("Alignment of ", stringify!(_WOF_VERSION_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WofVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WOF_VERSION_INFO), - "::", - stringify!(WofVersion), - ), - ); -} -pub type WOF_VERSION_INFO = _WOF_VERSION_INFO; -pub type PWOF_VERSION_INFO = *mut _WOF_VERSION_INFO; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WIM_PROVIDER_EXTERNAL_INFO { - pub Version: ULONG, - pub Flags: ULONG, - pub DataSourceId: LARGE_INTEGER, - pub ResourceHash: [UCHAR; 20usize], -} -#[test] -fn bindgen_test_layout__WIM_PROVIDER_EXTERNAL_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_WIM_PROVIDER_EXTERNAL_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WIM_PROVIDER_EXTERNAL_INFO>(), - 40usize, - concat!("Size of: ", stringify!(_WIM_PROVIDER_EXTERNAL_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_WIM_PROVIDER_EXTERNAL_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_WIM_PROVIDER_EXTERNAL_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_EXTERNAL_INFO), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_EXTERNAL_INFO), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataSourceId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_EXTERNAL_INFO), - "::", - stringify!(DataSourceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResourceHash) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_EXTERNAL_INFO), - "::", - stringify!(ResourceHash), - ), - ); -} -impl Default for _WIM_PROVIDER_EXTERNAL_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WIM_PROVIDER_EXTERNAL_INFO = _WIM_PROVIDER_EXTERNAL_INFO; -pub type PWIM_PROVIDER_EXTERNAL_INFO = *mut _WIM_PROVIDER_EXTERNAL_INFO; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WIM_PROVIDER_ADD_OVERLAY_INPUT { - pub WimType: ULONG, - pub WimIndex: ULONG, - pub WimFileNameOffset: ULONG, - pub WimFileNameLength: ULONG, -} -#[test] -fn bindgen_test_layout__WIM_PROVIDER_ADD_OVERLAY_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_WIM_PROVIDER_ADD_OVERLAY_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WIM_PROVIDER_ADD_OVERLAY_INPUT>(), - 16usize, - concat!("Size of: ", stringify!(_WIM_PROVIDER_ADD_OVERLAY_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_WIM_PROVIDER_ADD_OVERLAY_INPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_WIM_PROVIDER_ADD_OVERLAY_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WimType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_ADD_OVERLAY_INPUT), - "::", - stringify!(WimType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WimIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_ADD_OVERLAY_INPUT), - "::", - stringify!(WimIndex), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WimFileNameOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_ADD_OVERLAY_INPUT), - "::", - stringify!(WimFileNameOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WimFileNameLength) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_ADD_OVERLAY_INPUT), - "::", - stringify!(WimFileNameLength), - ), - ); -} -pub type WIM_PROVIDER_ADD_OVERLAY_INPUT = _WIM_PROVIDER_ADD_OVERLAY_INPUT; -pub type PWIM_PROVIDER_ADD_OVERLAY_INPUT = *mut _WIM_PROVIDER_ADD_OVERLAY_INPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WIM_PROVIDER_UPDATE_OVERLAY_INPUT { - pub DataSourceId: LARGE_INTEGER, - pub WimFileNameOffset: ULONG, - pub WimFileNameLength: ULONG, -} -#[test] -fn bindgen_test_layout__WIM_PROVIDER_UPDATE_OVERLAY_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_WIM_PROVIDER_UPDATE_OVERLAY_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WIM_PROVIDER_UPDATE_OVERLAY_INPUT>(), - 16usize, - concat!("Size of: ", stringify!(_WIM_PROVIDER_UPDATE_OVERLAY_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_WIM_PROVIDER_UPDATE_OVERLAY_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_WIM_PROVIDER_UPDATE_OVERLAY_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataSourceId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_UPDATE_OVERLAY_INPUT), - "::", - stringify!(DataSourceId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WimFileNameOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_UPDATE_OVERLAY_INPUT), - "::", - stringify!(WimFileNameOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WimFileNameLength) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_UPDATE_OVERLAY_INPUT), - "::", - stringify!(WimFileNameLength), - ), - ); -} -impl Default for _WIM_PROVIDER_UPDATE_OVERLAY_INPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WIM_PROVIDER_UPDATE_OVERLAY_INPUT = _WIM_PROVIDER_UPDATE_OVERLAY_INPUT; -pub type PWIM_PROVIDER_UPDATE_OVERLAY_INPUT = *mut _WIM_PROVIDER_UPDATE_OVERLAY_INPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WIM_PROVIDER_REMOVE_OVERLAY_INPUT { - pub DataSourceId: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__WIM_PROVIDER_REMOVE_OVERLAY_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_WIM_PROVIDER_REMOVE_OVERLAY_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WIM_PROVIDER_REMOVE_OVERLAY_INPUT>(), - 8usize, - concat!("Size of: ", stringify!(_WIM_PROVIDER_REMOVE_OVERLAY_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_WIM_PROVIDER_REMOVE_OVERLAY_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_WIM_PROVIDER_REMOVE_OVERLAY_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataSourceId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_REMOVE_OVERLAY_INPUT), - "::", - stringify!(DataSourceId), - ), - ); -} -impl Default for _WIM_PROVIDER_REMOVE_OVERLAY_INPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WIM_PROVIDER_REMOVE_OVERLAY_INPUT = _WIM_PROVIDER_REMOVE_OVERLAY_INPUT; -pub type PWIM_PROVIDER_REMOVE_OVERLAY_INPUT = *mut _WIM_PROVIDER_REMOVE_OVERLAY_INPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WIM_PROVIDER_SUSPEND_OVERLAY_INPUT { - pub DataSourceId: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__WIM_PROVIDER_SUSPEND_OVERLAY_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_WIM_PROVIDER_SUSPEND_OVERLAY_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WIM_PROVIDER_SUSPEND_OVERLAY_INPUT>(), - 8usize, - concat!("Size of: ", stringify!(_WIM_PROVIDER_SUSPEND_OVERLAY_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_WIM_PROVIDER_SUSPEND_OVERLAY_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_WIM_PROVIDER_SUSPEND_OVERLAY_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataSourceId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_SUSPEND_OVERLAY_INPUT), - "::", - stringify!(DataSourceId), - ), - ); -} -impl Default for _WIM_PROVIDER_SUSPEND_OVERLAY_INPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WIM_PROVIDER_SUSPEND_OVERLAY_INPUT = _WIM_PROVIDER_SUSPEND_OVERLAY_INPUT; -pub type PWIM_PROVIDER_SUSPEND_OVERLAY_INPUT = *mut _WIM_PROVIDER_SUSPEND_OVERLAY_INPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WIM_PROVIDER_OVERLAY_ENTRY { - pub NextEntryOffset: ULONG, - pub DataSourceId: LARGE_INTEGER, - pub WimGuid: GUID, - pub WimFileNameOffset: ULONG, - pub WimType: ULONG, - pub WimIndex: ULONG, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__WIM_PROVIDER_OVERLAY_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_WIM_PROVIDER_OVERLAY_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WIM_PROVIDER_OVERLAY_ENTRY>(), - 48usize, - concat!("Size of: ", stringify!(_WIM_PROVIDER_OVERLAY_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_WIM_PROVIDER_OVERLAY_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_WIM_PROVIDER_OVERLAY_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_OVERLAY_ENTRY), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataSourceId) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_OVERLAY_ENTRY), - "::", - stringify!(DataSourceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WimGuid) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_OVERLAY_ENTRY), - "::", - stringify!(WimGuid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WimFileNameOffset) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_OVERLAY_ENTRY), - "::", - stringify!(WimFileNameOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WimType) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_OVERLAY_ENTRY), - "::", - stringify!(WimType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WimIndex) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_OVERLAY_ENTRY), - "::", - stringify!(WimIndex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WIM_PROVIDER_OVERLAY_ENTRY), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _WIM_PROVIDER_OVERLAY_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WIM_PROVIDER_OVERLAY_ENTRY = _WIM_PROVIDER_OVERLAY_ENTRY; -pub type PWIM_PROVIDER_OVERLAY_ENTRY = *mut _WIM_PROVIDER_OVERLAY_ENTRY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_PROVIDER_EXTERNAL_INFO_V0 { - pub Version: ULONG, - pub Algorithm: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_PROVIDER_EXTERNAL_INFO_V0() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PROVIDER_EXTERNAL_INFO_V0> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PROVIDER_EXTERNAL_INFO_V0>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_PROVIDER_EXTERNAL_INFO_V0)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PROVIDER_EXTERNAL_INFO_V0>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_PROVIDER_EXTERNAL_INFO_V0)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PROVIDER_EXTERNAL_INFO_V0), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Algorithm) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PROVIDER_EXTERNAL_INFO_V0), - "::", - stringify!(Algorithm), - ), - ); -} -pub type FILE_PROVIDER_EXTERNAL_INFO_V0 = _FILE_PROVIDER_EXTERNAL_INFO_V0; -pub type PFILE_PROVIDER_EXTERNAL_INFO_V0 = *mut _FILE_PROVIDER_EXTERNAL_INFO_V0; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_PROVIDER_EXTERNAL_INFO_V1 { - pub Version: ULONG, - pub Algorithm: ULONG, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_PROVIDER_EXTERNAL_INFO_V1() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PROVIDER_EXTERNAL_INFO_V1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PROVIDER_EXTERNAL_INFO_V1>(), - 12usize, - concat!("Size of: ", stringify!(_FILE_PROVIDER_EXTERNAL_INFO_V1)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PROVIDER_EXTERNAL_INFO_V1>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_PROVIDER_EXTERNAL_INFO_V1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PROVIDER_EXTERNAL_INFO_V1), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Algorithm) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PROVIDER_EXTERNAL_INFO_V1), - "::", - stringify!(Algorithm), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PROVIDER_EXTERNAL_INFO_V1), - "::", - stringify!(Flags), - ), - ); -} -pub type FILE_PROVIDER_EXTERNAL_INFO_V1 = _FILE_PROVIDER_EXTERNAL_INFO_V1; -pub type PFILE_PROVIDER_EXTERNAL_INFO_V1 = *mut _FILE_PROVIDER_EXTERNAL_INFO_V1; -pub type FILE_PROVIDER_EXTERNAL_INFO = FILE_PROVIDER_EXTERNAL_INFO_V1; -pub type PFILE_PROVIDER_EXTERNAL_INFO = PFILE_PROVIDER_EXTERNAL_INFO_V1; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CONTAINER_VOLUME_STATE { - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__CONTAINER_VOLUME_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_CONTAINER_VOLUME_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CONTAINER_VOLUME_STATE>(), - 4usize, - concat!("Size of: ", stringify!(_CONTAINER_VOLUME_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_CONTAINER_VOLUME_STATE>(), - 4usize, - concat!("Alignment of ", stringify!(_CONTAINER_VOLUME_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CONTAINER_VOLUME_STATE), - "::", - stringify!(Flags), - ), - ); -} -pub type CONTAINER_VOLUME_STATE = _CONTAINER_VOLUME_STATE; -pub type PCONTAINER_VOLUME_STATE = *mut _CONTAINER_VOLUME_STATE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CONTAINER_ROOT_INFO_INPUT { - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__CONTAINER_ROOT_INFO_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_CONTAINER_ROOT_INFO_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CONTAINER_ROOT_INFO_INPUT>(), - 4usize, - concat!("Size of: ", stringify!(_CONTAINER_ROOT_INFO_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_CONTAINER_ROOT_INFO_INPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_CONTAINER_ROOT_INFO_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CONTAINER_ROOT_INFO_INPUT), - "::", - stringify!(Flags), - ), - ); -} -pub type CONTAINER_ROOT_INFO_INPUT = _CONTAINER_ROOT_INFO_INPUT; -pub type PCONTAINER_ROOT_INFO_INPUT = *mut _CONTAINER_ROOT_INFO_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CONTAINER_ROOT_INFO_OUTPUT { - pub ContainerRootIdLength: USHORT, - pub ContainerRootId: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__CONTAINER_ROOT_INFO_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_CONTAINER_ROOT_INFO_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CONTAINER_ROOT_INFO_OUTPUT>(), - 4usize, - concat!("Size of: ", stringify!(_CONTAINER_ROOT_INFO_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_CONTAINER_ROOT_INFO_OUTPUT>(), - 2usize, - concat!("Alignment of ", stringify!(_CONTAINER_ROOT_INFO_OUTPUT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ContainerRootIdLength) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CONTAINER_ROOT_INFO_OUTPUT), - "::", - stringify!(ContainerRootIdLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContainerRootId) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CONTAINER_ROOT_INFO_OUTPUT), - "::", - stringify!(ContainerRootId), - ), - ); -} -pub type CONTAINER_ROOT_INFO_OUTPUT = _CONTAINER_ROOT_INFO_OUTPUT; -pub type PCONTAINER_ROOT_INFO_OUTPUT = *mut _CONTAINER_ROOT_INFO_OUTPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VIRTUALIZATION_INSTANCE_INFO_INPUT { - pub NumberOfWorkerThreads: ULONG, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__VIRTUALIZATION_INSTANCE_INFO_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_VIRTUALIZATION_INSTANCE_INFO_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VIRTUALIZATION_INSTANCE_INFO_INPUT>(), - 8usize, - concat!("Size of: ", stringify!(_VIRTUALIZATION_INSTANCE_INFO_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUALIZATION_INSTANCE_INFO_INPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_VIRTUALIZATION_INSTANCE_INFO_INPUT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfWorkerThreads) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUALIZATION_INSTANCE_INFO_INPUT), - "::", - stringify!(NumberOfWorkerThreads), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUALIZATION_INSTANCE_INFO_INPUT), - "::", - stringify!(Flags), - ), - ); -} -pub type VIRTUALIZATION_INSTANCE_INFO_INPUT = _VIRTUALIZATION_INSTANCE_INFO_INPUT; -pub type PVIRTUALIZATION_INSTANCE_INFO_INPUT = *mut _VIRTUALIZATION_INSTANCE_INFO_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VIRTUALIZATION_INSTANCE_INFO_INPUT_EX { - pub HeaderSize: USHORT, - pub Flags: ULONG, - pub NotificationInfoSize: ULONG, - pub NotificationInfoOffset: USHORT, - pub ProviderMajorVersion: USHORT, -} -#[test] -fn bindgen_test_layout__VIRTUALIZATION_INSTANCE_INFO_INPUT_EX() { - const UNINIT: ::core::mem::MaybeUninit<_VIRTUALIZATION_INSTANCE_INFO_INPUT_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VIRTUALIZATION_INSTANCE_INFO_INPUT_EX>(), - 16usize, - concat!("Size of: ", stringify!(_VIRTUALIZATION_INSTANCE_INFO_INPUT_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUALIZATION_INSTANCE_INFO_INPUT_EX>(), - 4usize, - concat!("Alignment of ", stringify!(_VIRTUALIZATION_INSTANCE_INFO_INPUT_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HeaderSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUALIZATION_INSTANCE_INFO_INPUT_EX), - "::", - stringify!(HeaderSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUALIZATION_INSTANCE_INFO_INPUT_EX), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NotificationInfoSize) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUALIZATION_INSTANCE_INFO_INPUT_EX), - "::", - stringify!(NotificationInfoSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NotificationInfoOffset) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUALIZATION_INSTANCE_INFO_INPUT_EX), - "::", - stringify!(NotificationInfoOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProviderMajorVersion) as usize - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUALIZATION_INSTANCE_INFO_INPUT_EX), - "::", - stringify!(ProviderMajorVersion), - ), - ); -} -pub type VIRTUALIZATION_INSTANCE_INFO_INPUT_EX = _VIRTUALIZATION_INSTANCE_INFO_INPUT_EX; -pub type PVIRTUALIZATION_INSTANCE_INFO_INPUT_EX = *mut _VIRTUALIZATION_INSTANCE_INFO_INPUT_EX; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _VIRTUALIZATION_INSTANCE_INFO_OUTPUT { - pub VirtualizationInstanceID: GUID, -} -#[test] -fn bindgen_test_layout__VIRTUALIZATION_INSTANCE_INFO_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_VIRTUALIZATION_INSTANCE_INFO_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VIRTUALIZATION_INSTANCE_INFO_OUTPUT>(), - 16usize, - concat!("Size of: ", stringify!(_VIRTUALIZATION_INSTANCE_INFO_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_VIRTUALIZATION_INSTANCE_INFO_OUTPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_VIRTUALIZATION_INSTANCE_INFO_OUTPUT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VirtualizationInstanceID) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VIRTUALIZATION_INSTANCE_INFO_OUTPUT), - "::", - stringify!(VirtualizationInstanceID), - ), - ); -} -pub type VIRTUALIZATION_INSTANCE_INFO_OUTPUT = _VIRTUALIZATION_INSTANCE_INFO_OUTPUT; -pub type PVIRTUALIZATION_INSTANCE_INFO_OUTPUT = *mut _VIRTUALIZATION_INSTANCE_INFO_OUTPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _GET_FILTER_FILE_IDENTIFIER_INPUT { - pub AltitudeLength: USHORT, - pub Altitude: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__GET_FILTER_FILE_IDENTIFIER_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_GET_FILTER_FILE_IDENTIFIER_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GET_FILTER_FILE_IDENTIFIER_INPUT>(), - 4usize, - concat!("Size of: ", stringify!(_GET_FILTER_FILE_IDENTIFIER_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_GET_FILTER_FILE_IDENTIFIER_INPUT>(), - 2usize, - concat!("Alignment of ", stringify!(_GET_FILTER_FILE_IDENTIFIER_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AltitudeLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GET_FILTER_FILE_IDENTIFIER_INPUT), - "::", - stringify!(AltitudeLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Altitude) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_GET_FILTER_FILE_IDENTIFIER_INPUT), - "::", - stringify!(Altitude), - ), - ); -} -pub type GET_FILTER_FILE_IDENTIFIER_INPUT = _GET_FILTER_FILE_IDENTIFIER_INPUT; -pub type PGET_FILTER_FILE_IDENTIFIER_INPUT = *mut _GET_FILTER_FILE_IDENTIFIER_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _GET_FILTER_FILE_IDENTIFIER_OUTPUT { - pub FilterFileIdentifierLength: USHORT, - pub FilterFileIdentifier: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__GET_FILTER_FILE_IDENTIFIER_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_GET_FILTER_FILE_IDENTIFIER_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GET_FILTER_FILE_IDENTIFIER_OUTPUT>(), - 4usize, - concat!("Size of: ", stringify!(_GET_FILTER_FILE_IDENTIFIER_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_GET_FILTER_FILE_IDENTIFIER_OUTPUT>(), - 2usize, - concat!("Alignment of ", stringify!(_GET_FILTER_FILE_IDENTIFIER_OUTPUT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FilterFileIdentifierLength) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GET_FILTER_FILE_IDENTIFIER_OUTPUT), - "::", - stringify!(FilterFileIdentifierLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FilterFileIdentifier) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_GET_FILTER_FILE_IDENTIFIER_OUTPUT), - "::", - stringify!(FilterFileIdentifier), - ), - ); -} -pub type GET_FILTER_FILE_IDENTIFIER_OUTPUT = _GET_FILTER_FILE_IDENTIFIER_OUTPUT; -pub type PGET_FILTER_FILE_IDENTIFIER_OUTPUT = *mut _GET_FILTER_FILE_IDENTIFIER_OUTPUT; -pub mod _FS_BPIO_OPERATIONS { - pub type Type = ::core::ffi::c_int; - pub const FS_BPIO_OP_ENABLE: Type = 1; - pub const FS_BPIO_OP_DISABLE: Type = 2; - pub const FS_BPIO_OP_QUERY: Type = 3; - pub const FS_BPIO_OP_VOLUME_STACK_PAUSE: Type = 4; - pub const FS_BPIO_OP_VOLUME_STACK_RESUME: Type = 5; - pub const FS_BPIO_OP_STREAM_PAUSE: Type = 6; - pub const FS_BPIO_OP_STREAM_RESUME: Type = 7; - pub const FS_BPIO_OP_GET_INFO: Type = 8; - pub const FS_BPIO_OP_MAX_OPERATION: Type = 9; -} -pub use self::_FS_BPIO_OPERATIONS::Type as FS_BPIO_OPERATIONS; -pub mod _FS_BPIO_INFLAGS { - pub type Type = ::core::ffi::c_int; - pub const FSBPIO_INFL_None: Type = 0; - pub const FSBPIO_INFL_SKIP_STORAGE_STACK_QUERY: Type = 1; -} -pub use self::_FS_BPIO_INFLAGS::Type as FS_BPIO_INFLAGS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FS_BPIO_INPUT { - pub Operation: FS_BPIO_OPERATIONS, - pub InFlags: FS_BPIO_INFLAGS, - pub Reserved1: ULONGLONG, - pub Reserved2: ULONGLONG, -} -#[test] -fn bindgen_test_layout__FS_BPIO_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FS_BPIO_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_BPIO_INPUT>(), - 24usize, - concat!("Size of: ", stringify!(_FS_BPIO_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_BPIO_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_FS_BPIO_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Operation) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_INPUT), - "::", - stringify!(Operation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InFlags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_INPUT), - "::", - stringify!(InFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_INPUT), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_INPUT), - "::", - stringify!(Reserved2), - ), - ); -} -impl Default for _FS_BPIO_INPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FS_BPIO_INPUT = _FS_BPIO_INPUT; -pub type PFS_BPIO_INPUT = *mut _FS_BPIO_INPUT; -pub mod _FS_BPIO_OUTFLAGS { - pub type Type = ::core::ffi::c_int; - pub const FSBPIO_OUTFL_None: Type = 0; - pub const FSBPIO_OUTFL_VOLUME_STACK_BYPASS_PAUSED: Type = 1; - pub const FSBPIO_OUTFL_STREAM_BYPASS_PAUSED: Type = 2; - pub const FSBPIO_OUTFL_FILTER_ATTACH_BLOCKED: Type = 4; - pub const FSBPIO_OUTFL_COMPATIBLE_STORAGE_DRIVER: Type = 8; -} -pub use self::_FS_BPIO_OUTFLAGS::Type as FS_BPIO_OUTFLAGS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FS_BPIO_RESULTS { - pub OpStatus: NTSTATUS, - pub FailingDriverNameLen: USHORT, - pub FailingDriverName: [WCHAR; 32usize], - pub FailureReasonLen: USHORT, - pub FailureReason: [WCHAR; 128usize], -} -#[test] -fn bindgen_test_layout__FS_BPIO_RESULTS() { - const UNINIT: ::core::mem::MaybeUninit<_FS_BPIO_RESULTS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_BPIO_RESULTS>(), - 328usize, - concat!("Size of: ", stringify!(_FS_BPIO_RESULTS)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_BPIO_RESULTS>(), - 4usize, - concat!("Alignment of ", stringify!(_FS_BPIO_RESULTS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OpStatus) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_RESULTS), - "::", - stringify!(OpStatus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FailingDriverNameLen) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_RESULTS), - "::", - stringify!(FailingDriverNameLen), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FailingDriverName) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_RESULTS), - "::", - stringify!(FailingDriverName), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FailureReasonLen) as usize - ptr as usize - }, - 70usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_RESULTS), - "::", - stringify!(FailureReasonLen), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FailureReason) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_RESULTS), - "::", - stringify!(FailureReason), - ), - ); -} -impl Default for _FS_BPIO_RESULTS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FS_BPIO_RESULTS = _FS_BPIO_RESULTS; -pub type PFS_BPIO_RESULTS = *mut _FS_BPIO_RESULTS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FS_BPIO_INFO { - pub ActiveBypassIoCount: ULONG, - pub StorageDriverNameLen: USHORT, - pub StorageDriverName: [WCHAR; 32usize], -} -#[test] -fn bindgen_test_layout__FS_BPIO_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_FS_BPIO_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_BPIO_INFO>(), - 72usize, - concat!("Size of: ", stringify!(_FS_BPIO_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_BPIO_INFO>(), - 4usize, - concat!("Alignment of ", stringify!(_FS_BPIO_INFO)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ActiveBypassIoCount) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_INFO), - "::", - stringify!(ActiveBypassIoCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StorageDriverNameLen) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_INFO), - "::", - stringify!(StorageDriverNameLen), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StorageDriverName) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_INFO), - "::", - stringify!(StorageDriverName), - ), - ); -} -pub type FS_BPIO_INFO = _FS_BPIO_INFO; -pub type PFS_BPIO_INFO = *mut _FS_BPIO_INFO; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FS_BPIO_OUTPUT { - pub Operation: FS_BPIO_OPERATIONS, - pub OutFlags: FS_BPIO_OUTFLAGS, - pub Reserved1: ULONGLONG, - pub Reserved2: ULONGLONG, - pub __bindgen_anon_1: _FS_BPIO_OUTPUT__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FS_BPIO_OUTPUT__bindgen_ty_1 { - pub Enable: FS_BPIO_RESULTS, - pub Query: FS_BPIO_RESULTS, - pub VolumeStackResume: FS_BPIO_RESULTS, - pub StreamResume: FS_BPIO_RESULTS, - pub GetInfo: FS_BPIO_INFO, -} -#[test] -fn bindgen_test_layout__FS_BPIO_OUTPUT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_FS_BPIO_OUTPUT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_BPIO_OUTPUT__bindgen_ty_1>(), - 328usize, - concat!("Size of: ", stringify!(_FS_BPIO_OUTPUT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_BPIO_OUTPUT__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_FS_BPIO_OUTPUT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enable) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_OUTPUT__bindgen_ty_1), - "::", - stringify!(Enable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Query) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_OUTPUT__bindgen_ty_1), - "::", - stringify!(Query), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeStackResume) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_OUTPUT__bindgen_ty_1), - "::", - stringify!(VolumeStackResume), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StreamResume) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_OUTPUT__bindgen_ty_1), - "::", - stringify!(StreamResume), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GetInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_OUTPUT__bindgen_ty_1), - "::", - stringify!(GetInfo), - ), - ); -} -impl Default for _FS_BPIO_OUTPUT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FS_BPIO_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FS_BPIO_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_BPIO_OUTPUT>(), - 352usize, - concat!("Size of: ", stringify!(_FS_BPIO_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_BPIO_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_FS_BPIO_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Operation) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_OUTPUT), - "::", - stringify!(Operation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OutFlags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_OUTPUT), - "::", - stringify!(OutFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_OUTPUT), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FS_BPIO_OUTPUT), - "::", - stringify!(Reserved2), - ), - ); -} -impl Default for _FS_BPIO_OUTPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FS_BPIO_OUTPUT = _FS_BPIO_OUTPUT; -pub type PFS_BPIO_OUTPUT = *mut _FS_BPIO_OUTPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _REPARSE_DATA_BUFFER { - pub ReparseTag: ULONG, - pub ReparseDataLength: USHORT, - pub Reserved: USHORT, - pub __bindgen_anon_1: _REPARSE_DATA_BUFFER__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _REPARSE_DATA_BUFFER__bindgen_ty_1 { - pub SymbolicLinkReparseBuffer: _REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1, - pub MountPointReparseBuffer: _REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_2, - pub GenericReparseBuffer: _REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_3, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1 { - pub SubstituteNameOffset: USHORT, - pub SubstituteNameLength: USHORT, - pub PrintNameOffset: USHORT, - pub PrintNameLength: USHORT, - pub Flags: ULONG, - pub PathBuffer: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1>(), - 16usize, - concat!( - "Size of: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SubstituteNameOffset) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(SubstituteNameOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SubstituteNameLength) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(SubstituteNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrintNameOffset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(PrintNameOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrintNameLength) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(PrintNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PathBuffer) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(PathBuffer), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_2 { - pub SubstituteNameOffset: USHORT, - pub SubstituteNameLength: USHORT, - pub PrintNameOffset: USHORT, - pub PrintNameLength: USHORT, - pub PathBuffer: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_2>(), - 10usize, - concat!( - "Size of: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::<_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_2>(), - 2usize, - concat!( - "Alignment of ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SubstituteNameOffset) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(SubstituteNameOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SubstituteNameLength) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(SubstituteNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrintNameOffset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(PrintNameOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PrintNameLength) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(PrintNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PathBuffer) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(PathBuffer), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_3 { - pub DataBuffer: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_3>(), - 1usize, - concat!( - "Size of: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - ::core::mem::align_of::<_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_3>(), - 1usize, - concat!( - "Alignment of ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataBuffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(DataBuffer), - ), - ); -} -#[test] -fn bindgen_test_layout__REPARSE_DATA_BUFFER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_REPARSE_DATA_BUFFER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REPARSE_DATA_BUFFER__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_REPARSE_DATA_BUFFER__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SymbolicLinkReparseBuffer) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1), - "::", - stringify!(SymbolicLinkReparseBuffer), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MountPointReparseBuffer) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1), - "::", - stringify!(MountPointReparseBuffer), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GenericReparseBuffer) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER__bindgen_ty_1), - "::", - stringify!(GenericReparseBuffer), - ), - ); -} -impl Default for _REPARSE_DATA_BUFFER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__REPARSE_DATA_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_REPARSE_DATA_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REPARSE_DATA_BUFFER>(), - 24usize, - concat!("Size of: ", stringify!(_REPARSE_DATA_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REPARSE_DATA_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_REPARSE_DATA_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparseTag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER), - "::", - stringify!(ReparseTag), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReparseDataLength) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER), - "::", - stringify!(ReparseDataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REPARSE_DATA_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REPARSE_DATA_BUFFER = _REPARSE_DATA_BUFFER; -pub type PREPARSE_DATA_BUFFER = *mut _REPARSE_DATA_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REPARSE_GUID_DATA_BUFFER { - pub ReparseTag: ULONG, - pub ReparseDataLength: USHORT, - pub Reserved: USHORT, - pub ReparseGuid: GUID, - pub GenericReparseBuffer: _REPARSE_GUID_DATA_BUFFER__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REPARSE_GUID_DATA_BUFFER__bindgen_ty_1 { - pub DataBuffer: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__REPARSE_GUID_DATA_BUFFER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_REPARSE_GUID_DATA_BUFFER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REPARSE_GUID_DATA_BUFFER__bindgen_ty_1>(), - 1usize, - concat!("Size of: ", stringify!(_REPARSE_GUID_DATA_BUFFER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_REPARSE_GUID_DATA_BUFFER__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_REPARSE_GUID_DATA_BUFFER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DataBuffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_GUID_DATA_BUFFER__bindgen_ty_1), - "::", - stringify!(DataBuffer), - ), - ); -} -#[test] -fn bindgen_test_layout__REPARSE_GUID_DATA_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_REPARSE_GUID_DATA_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REPARSE_GUID_DATA_BUFFER>(), - 28usize, - concat!("Size of: ", stringify!(_REPARSE_GUID_DATA_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REPARSE_GUID_DATA_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_REPARSE_GUID_DATA_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparseTag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_GUID_DATA_BUFFER), - "::", - stringify!(ReparseTag), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReparseDataLength) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_GUID_DATA_BUFFER), - "::", - stringify!(ReparseDataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_GUID_DATA_BUFFER), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparseGuid) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_GUID_DATA_BUFFER), - "::", - stringify!(ReparseGuid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GenericReparseBuffer) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_GUID_DATA_BUFFER), - "::", - stringify!(GenericReparseBuffer), - ), - ); -} -pub type REPARSE_GUID_DATA_BUFFER = _REPARSE_GUID_DATA_BUFFER; -pub type PREPARSE_GUID_DATA_BUFFER = *mut _REPARSE_GUID_DATA_BUFFER; -#[repr(C, packed(4))] -#[derive(Copy, Clone)] -pub struct _REPARSE_INDEX_KEY { - pub FileReparseTag: ULONG, - pub FileId: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__REPARSE_INDEX_KEY() { - const UNINIT: ::core::mem::MaybeUninit<_REPARSE_INDEX_KEY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REPARSE_INDEX_KEY>(), - 12usize, - concat!("Size of: ", stringify!(_REPARSE_INDEX_KEY)), - ); - assert_eq!( - ::core::mem::align_of::<_REPARSE_INDEX_KEY>(), - 4usize, - concat!("Alignment of ", stringify!(_REPARSE_INDEX_KEY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileReparseTag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_INDEX_KEY), - "::", - stringify!(FileReparseTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_INDEX_KEY), - "::", - stringify!(FileId), - ), - ); -} -impl Default for _REPARSE_INDEX_KEY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REPARSE_INDEX_KEY = _REPARSE_INDEX_KEY; -pub type PREPARSE_INDEX_KEY = *mut _REPARSE_INDEX_KEY; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _REPARSE_DATA_BUFFER_EX { - pub Flags: ULONG, - pub ExistingReparseTag: ULONG, - pub ExistingReparseGuid: GUID, - pub Reserved: ULONGLONG, - pub __bindgen_anon_1: _REPARSE_DATA_BUFFER_EX__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _REPARSE_DATA_BUFFER_EX__bindgen_ty_1 { - pub ReparseDataBuffer: REPARSE_DATA_BUFFER, - pub ReparseGuidDataBuffer: REPARSE_GUID_DATA_BUFFER, -} -#[test] -fn bindgen_test_layout__REPARSE_DATA_BUFFER_EX__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_REPARSE_DATA_BUFFER_EX__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REPARSE_DATA_BUFFER_EX__bindgen_ty_1>(), - 28usize, - concat!("Size of: ", stringify!(_REPARSE_DATA_BUFFER_EX__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_REPARSE_DATA_BUFFER_EX__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_REPARSE_DATA_BUFFER_EX__bindgen_ty_1)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReparseDataBuffer) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER_EX__bindgen_ty_1), - "::", - stringify!(ReparseDataBuffer), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReparseGuidDataBuffer) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER_EX__bindgen_ty_1), - "::", - stringify!(ReparseGuidDataBuffer), - ), - ); -} -impl Default for _REPARSE_DATA_BUFFER_EX__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__REPARSE_DATA_BUFFER_EX() { - const UNINIT: ::core::mem::MaybeUninit<_REPARSE_DATA_BUFFER_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REPARSE_DATA_BUFFER_EX>(), - 64usize, - concat!("Size of: ", stringify!(_REPARSE_DATA_BUFFER_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_REPARSE_DATA_BUFFER_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_REPARSE_DATA_BUFFER_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER_EX), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExistingReparseTag) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER_EX), - "::", - stringify!(ExistingReparseTag), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExistingReparseGuid) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER_EX), - "::", - stringify!(ExistingReparseGuid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REPARSE_DATA_BUFFER_EX), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REPARSE_DATA_BUFFER_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REPARSE_DATA_BUFFER_EX = _REPARSE_DATA_BUFFER_EX; -pub type PREPARSE_DATA_BUFFER_EX = *mut _REPARSE_DATA_BUFFER_EX; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SCRUB_DATA_INPUT { - pub Size: ULONG, - pub Flags: ULONG, - pub MaximumIos: ULONG, - pub ObjectId: [ULONG; 4usize], - pub Reserved: [ULONG; 41usize], - pub ResumeContext: [UCHAR; 1040usize], -} -#[test] -fn bindgen_test_layout__SCRUB_DATA_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SCRUB_DATA_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SCRUB_DATA_INPUT>(), - 1232usize, - concat!("Size of: ", stringify!(_SCRUB_DATA_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SCRUB_DATA_INPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_SCRUB_DATA_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_INPUT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_INPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumIos) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_INPUT), - "::", - stringify!(MaximumIos), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ObjectId) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_INPUT), - "::", - stringify!(ObjectId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_INPUT), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResumeContext) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_INPUT), - "::", - stringify!(ResumeContext), - ), - ); -} -impl Default for _SCRUB_DATA_INPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SCRUB_DATA_INPUT = _SCRUB_DATA_INPUT; -pub type PSCRUB_DATA_INPUT = *mut _SCRUB_DATA_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SCRUB_PARITY_EXTENT { - pub Offset: LONGLONG, - pub Length: ULONGLONG, -} -#[test] -fn bindgen_test_layout__SCRUB_PARITY_EXTENT() { - const UNINIT: ::core::mem::MaybeUninit<_SCRUB_PARITY_EXTENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SCRUB_PARITY_EXTENT>(), - 16usize, - concat!("Size of: ", stringify!(_SCRUB_PARITY_EXTENT)), - ); - assert_eq!( - ::core::mem::align_of::<_SCRUB_PARITY_EXTENT>(), - 8usize, - concat!("Alignment of ", stringify!(_SCRUB_PARITY_EXTENT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_PARITY_EXTENT), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_PARITY_EXTENT), - "::", - stringify!(Length), - ), - ); -} -pub type SCRUB_PARITY_EXTENT = _SCRUB_PARITY_EXTENT; -pub type PSCRUB_PARITY_EXTENT = *mut _SCRUB_PARITY_EXTENT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SCRUB_PARITY_EXTENT_DATA { - pub Size: USHORT, - pub Flags: USHORT, - pub NumberOfParityExtents: USHORT, - pub MaximumNumberOfParityExtents: USHORT, - pub ParityExtents: [SCRUB_PARITY_EXTENT; 1usize], -} -#[test] -fn bindgen_test_layout__SCRUB_PARITY_EXTENT_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_SCRUB_PARITY_EXTENT_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SCRUB_PARITY_EXTENT_DATA>(), - 24usize, - concat!("Size of: ", stringify!(_SCRUB_PARITY_EXTENT_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_SCRUB_PARITY_EXTENT_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_SCRUB_PARITY_EXTENT_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_PARITY_EXTENT_DATA), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_PARITY_EXTENT_DATA), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfParityExtents) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_PARITY_EXTENT_DATA), - "::", - stringify!(NumberOfParityExtents), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumNumberOfParityExtents) as usize - - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_PARITY_EXTENT_DATA), - "::", - stringify!(MaximumNumberOfParityExtents), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParityExtents) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_PARITY_EXTENT_DATA), - "::", - stringify!(ParityExtents), - ), - ); -} -pub type SCRUB_PARITY_EXTENT_DATA = _SCRUB_PARITY_EXTENT_DATA; -pub type PSCRUB_PARITY_EXTENT_DATA = *mut _SCRUB_PARITY_EXTENT_DATA; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SCRUB_DATA_OUTPUT { - pub Size: ULONG, - pub Flags: ULONG, - pub Status: ULONG, - pub ErrorFileOffset: ULONGLONG, - pub ErrorLength: ULONGLONG, - pub NumberOfBytesRepaired: ULONGLONG, - pub NumberOfBytesFailed: ULONGLONG, - pub InternalFileReference: ULONGLONG, - pub ResumeContextLength: USHORT, - pub ParityExtentDataOffset: USHORT, - pub Reserved: [ULONG; 9usize], - pub NumberOfMetadataBytesProcessed: ULONGLONG, - pub NumberOfDataBytesProcessed: ULONGLONG, - pub TotalNumberOfMetadataBytesInUse: ULONGLONG, - pub TotalNumberOfDataBytesInUse: ULONGLONG, - pub DataBytesSkippedDueToNoAllocation: ULONGLONG, - pub DataBytesSkippedDueToInvalidRun: ULONGLONG, - pub DataBytesSkippedDueToIntegrityStream: ULONGLONG, - pub DataBytesSkippedDueToRegionBeingClean: ULONGLONG, - pub DataBytesSkippedDueToLockConflict: ULONGLONG, - pub DataBytesSkippedDueToNoScrubDataFlag: ULONGLONG, - pub DataBytesSkippedDueToNoScrubNonIntegrityStreamFlag: ULONGLONG, - pub DataBytesScrubbed: ULONGLONG, - pub ResumeContext: [UCHAR; 1040usize], -} -#[test] -fn bindgen_test_layout__SCRUB_DATA_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SCRUB_DATA_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SCRUB_DATA_OUTPUT>(), - 1232usize, - concat!("Size of: ", stringify!(_SCRUB_DATA_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SCRUB_DATA_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_SCRUB_DATA_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorFileOffset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(ErrorFileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(ErrorLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfBytesRepaired) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(NumberOfBytesRepaired), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfBytesFailed) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(NumberOfBytesFailed), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InternalFileReference) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(InternalFileReference), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ResumeContextLength) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(ResumeContextLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ParityExtentDataOffset) as usize - ptr as usize - }, - 58usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(ParityExtentDataOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfMetadataBytesProcessed) as usize - - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(NumberOfMetadataBytesProcessed), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfDataBytesProcessed) as usize - - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(NumberOfDataBytesProcessed), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalNumberOfMetadataBytesInUse) as usize - - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(TotalNumberOfMetadataBytesInUse), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalNumberOfDataBytesInUse) as usize - - ptr as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(TotalNumberOfDataBytesInUse), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataBytesSkippedDueToNoAllocation) as usize - - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(DataBytesSkippedDueToNoAllocation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataBytesSkippedDueToInvalidRun) as usize - - ptr as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(DataBytesSkippedDueToInvalidRun), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataBytesSkippedDueToIntegrityStream) as usize - - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(DataBytesSkippedDueToIntegrityStream), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataBytesSkippedDueToRegionBeingClean) as usize - - ptr as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(DataBytesSkippedDueToRegionBeingClean), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataBytesSkippedDueToLockConflict) as usize - - ptr as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(DataBytesSkippedDueToLockConflict), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataBytesSkippedDueToNoScrubDataFlag) as usize - - ptr as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(DataBytesSkippedDueToNoScrubDataFlag), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!( - (*ptr).DataBytesSkippedDueToNoScrubNonIntegrityStreamFlag - ) as usize - ptr as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(DataBytesSkippedDueToNoScrubNonIntegrityStreamFlag), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataBytesScrubbed) as usize - ptr as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(DataBytesScrubbed), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResumeContext) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_SCRUB_DATA_OUTPUT), - "::", - stringify!(ResumeContext), - ), - ); -} -impl Default for _SCRUB_DATA_OUTPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SCRUB_DATA_OUTPUT = _SCRUB_DATA_OUTPUT; -pub type PSCRUB_DATA_OUTPUT = *mut _SCRUB_DATA_OUTPUT; -pub mod _SharedVirtualDiskSupportType { - pub type Type = ::core::ffi::c_int; - pub const SharedVirtualDisksUnsupported: Type = 0; - pub const SharedVirtualDisksSupported: Type = 1; - pub const SharedVirtualDiskSnapshotsSupported: Type = 3; - pub const SharedVirtualDiskCDPSnapshotsSupported: Type = 7; -} -pub use self::_SharedVirtualDiskSupportType::Type as SharedVirtualDiskSupportType; -pub mod _SharedVirtualDiskHandleState { - pub type Type = ::core::ffi::c_int; - pub const SharedVirtualDiskHandleStateNone: Type = 0; - pub const SharedVirtualDiskHandleStateFileShared: Type = 1; - pub const SharedVirtualDiskHandleStateHandleShared: Type = 3; -} -pub use self::_SharedVirtualDiskHandleState::Type as SharedVirtualDiskHandleState; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SHARED_VIRTUAL_DISK_SUPPORT { - pub SharedVirtualDiskSupport: SharedVirtualDiskSupportType, - pub HandleState: SharedVirtualDiskHandleState, -} -#[test] -fn bindgen_test_layout__SHARED_VIRTUAL_DISK_SUPPORT() { - const UNINIT: ::core::mem::MaybeUninit<_SHARED_VIRTUAL_DISK_SUPPORT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SHARED_VIRTUAL_DISK_SUPPORT>(), - 8usize, - concat!("Size of: ", stringify!(_SHARED_VIRTUAL_DISK_SUPPORT)), - ); - assert_eq!( - ::core::mem::align_of::<_SHARED_VIRTUAL_DISK_SUPPORT>(), - 4usize, - concat!("Alignment of ", stringify!(_SHARED_VIRTUAL_DISK_SUPPORT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SharedVirtualDiskSupport) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SHARED_VIRTUAL_DISK_SUPPORT), - "::", - stringify!(SharedVirtualDiskSupport), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HandleState) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SHARED_VIRTUAL_DISK_SUPPORT), - "::", - stringify!(HandleState), - ), - ); -} -impl Default for _SHARED_VIRTUAL_DISK_SUPPORT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SHARED_VIRTUAL_DISK_SUPPORT = _SHARED_VIRTUAL_DISK_SUPPORT; -pub type PSHARED_VIRTUAL_DISK_SUPPORT = *mut _SHARED_VIRTUAL_DISK_SUPPORT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REARRANGE_FILE_DATA { - pub SourceStartingOffset: ULONGLONG, - pub TargetOffset: ULONGLONG, - pub SourceFileHandle: HANDLE, - pub Length: ULONG, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__REARRANGE_FILE_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_REARRANGE_FILE_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REARRANGE_FILE_DATA>(), - 32usize, - concat!("Size of: ", stringify!(_REARRANGE_FILE_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_REARRANGE_FILE_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_REARRANGE_FILE_DATA)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceStartingOffset) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REARRANGE_FILE_DATA), - "::", - stringify!(SourceStartingOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TargetOffset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REARRANGE_FILE_DATA), - "::", - stringify!(TargetOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceFileHandle) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REARRANGE_FILE_DATA), - "::", - stringify!(SourceFileHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REARRANGE_FILE_DATA), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_REARRANGE_FILE_DATA), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _REARRANGE_FILE_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REARRANGE_FILE_DATA = _REARRANGE_FILE_DATA; -pub type PREARRANGE_FILE_DATA = *mut _REARRANGE_FILE_DATA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REARRANGE_FILE_DATA32 { - pub SourceStartingOffset: ULONGLONG, - pub TargetOffset: ULONGLONG, - pub SourceFileHandle: UINT32, - pub Length: ULONG, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__REARRANGE_FILE_DATA32() { - const UNINIT: ::core::mem::MaybeUninit<_REARRANGE_FILE_DATA32> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REARRANGE_FILE_DATA32>(), - 32usize, - concat!("Size of: ", stringify!(_REARRANGE_FILE_DATA32)), - ); - assert_eq!( - ::core::mem::align_of::<_REARRANGE_FILE_DATA32>(), - 8usize, - concat!("Alignment of ", stringify!(_REARRANGE_FILE_DATA32)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceStartingOffset) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REARRANGE_FILE_DATA32), - "::", - stringify!(SourceStartingOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TargetOffset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REARRANGE_FILE_DATA32), - "::", - stringify!(TargetOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceFileHandle) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REARRANGE_FILE_DATA32), - "::", - stringify!(SourceFileHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_REARRANGE_FILE_DATA32), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REARRANGE_FILE_DATA32), - "::", - stringify!(Flags), - ), - ); -} -pub type REARRANGE_FILE_DATA32 = _REARRANGE_FILE_DATA32; -pub type PREARRANGE_FILE_DATA32 = *mut _REARRANGE_FILE_DATA32; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SHUFFLE_FILE_DATA { - pub StartingOffset: LONGLONG, - pub Length: LONGLONG, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__SHUFFLE_FILE_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_SHUFFLE_FILE_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SHUFFLE_FILE_DATA>(), - 24usize, - concat!("Size of: ", stringify!(_SHUFFLE_FILE_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_SHUFFLE_FILE_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_SHUFFLE_FILE_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SHUFFLE_FILE_DATA), - "::", - stringify!(StartingOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SHUFFLE_FILE_DATA), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SHUFFLE_FILE_DATA), - "::", - stringify!(Flags), - ), - ); -} -pub type SHUFFLE_FILE_DATA = _SHUFFLE_FILE_DATA; -pub type PSHUFFLE_FILE_DATA = *mut _SHUFFLE_FILE_DATA; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_PIPE_ASSIGN_EVENT_BUFFER { - pub EventHandle: HANDLE, - pub KeyValue: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_PIPE_ASSIGN_EVENT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PIPE_ASSIGN_EVENT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PIPE_ASSIGN_EVENT_BUFFER>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_PIPE_ASSIGN_EVENT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PIPE_ASSIGN_EVENT_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_PIPE_ASSIGN_EVENT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EventHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_ASSIGN_EVENT_BUFFER), - "::", - stringify!(EventHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_ASSIGN_EVENT_BUFFER), - "::", - stringify!(KeyValue), - ), - ); -} -impl Default for _FILE_PIPE_ASSIGN_EVENT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_PIPE_ASSIGN_EVENT_BUFFER = _FILE_PIPE_ASSIGN_EVENT_BUFFER; -pub type PFILE_PIPE_ASSIGN_EVENT_BUFFER = *mut _FILE_PIPE_ASSIGN_EVENT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_PIPE_PEEK_BUFFER { - pub NamedPipeState: ULONG, - pub ReadDataAvailable: ULONG, - pub NumberOfMessages: ULONG, - pub MessageLength: ULONG, - pub Data: [CHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_PIPE_PEEK_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PIPE_PEEK_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PIPE_PEEK_BUFFER>(), - 20usize, - concat!("Size of: ", stringify!(_FILE_PIPE_PEEK_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PIPE_PEEK_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_PIPE_PEEK_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NamedPipeState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_PEEK_BUFFER), - "::", - stringify!(NamedPipeState), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadDataAvailable) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_PEEK_BUFFER), - "::", - stringify!(ReadDataAvailable), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfMessages) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_PEEK_BUFFER), - "::", - stringify!(NumberOfMessages), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageLength) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_PEEK_BUFFER), - "::", - stringify!(MessageLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_PEEK_BUFFER), - "::", - stringify!(Data), - ), - ); -} -pub type FILE_PIPE_PEEK_BUFFER = _FILE_PIPE_PEEK_BUFFER; -pub type PFILE_PIPE_PEEK_BUFFER = *mut _FILE_PIPE_PEEK_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_PIPE_EVENT_BUFFER { - pub NamedPipeState: ULONG, - pub EntryType: ULONG, - pub ByteCount: ULONG, - pub KeyValue: ULONG, - pub NumberRequests: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_PIPE_EVENT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PIPE_EVENT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PIPE_EVENT_BUFFER>(), - 20usize, - concat!("Size of: ", stringify!(_FILE_PIPE_EVENT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PIPE_EVENT_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_PIPE_EVENT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NamedPipeState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_EVENT_BUFFER), - "::", - stringify!(NamedPipeState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntryType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_EVENT_BUFFER), - "::", - stringify!(EntryType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_EVENT_BUFFER), - "::", - stringify!(ByteCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyValue) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_EVENT_BUFFER), - "::", - stringify!(KeyValue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberRequests) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_EVENT_BUFFER), - "::", - stringify!(NumberRequests), - ), - ); -} -pub type FILE_PIPE_EVENT_BUFFER = _FILE_PIPE_EVENT_BUFFER; -pub type PFILE_PIPE_EVENT_BUFFER = *mut _FILE_PIPE_EVENT_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_PIPE_WAIT_FOR_BUFFER { - pub Timeout: LARGE_INTEGER, - pub NameLength: ULONG, - pub TimeoutSpecified: BOOLEAN, - pub Name: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FILE_PIPE_WAIT_FOR_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PIPE_WAIT_FOR_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PIPE_WAIT_FOR_BUFFER>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_PIPE_WAIT_FOR_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PIPE_WAIT_FOR_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_PIPE_WAIT_FOR_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Timeout) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_WAIT_FOR_BUFFER), - "::", - stringify!(Timeout), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_WAIT_FOR_BUFFER), - "::", - stringify!(NameLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TimeoutSpecified) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_WAIT_FOR_BUFFER), - "::", - stringify!(TimeoutSpecified), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_WAIT_FOR_BUFFER), - "::", - stringify!(Name), - ), - ); -} -impl Default for _FILE_PIPE_WAIT_FOR_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_PIPE_WAIT_FOR_BUFFER = _FILE_PIPE_WAIT_FOR_BUFFER; -pub type PFILE_PIPE_WAIT_FOR_BUFFER = *mut _FILE_PIPE_WAIT_FOR_BUFFER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_PIPE_CLIENT_PROCESS_BUFFER { - pub ClientSession: PVOID, - pub ClientProcess: PVOID, -} -#[test] -fn bindgen_test_layout__FILE_PIPE_CLIENT_PROCESS_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PIPE_CLIENT_PROCESS_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PIPE_CLIENT_PROCESS_BUFFER>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PIPE_CLIENT_PROCESS_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClientSession) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER), - "::", - stringify!(ClientSession), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClientProcess) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER), - "::", - stringify!(ClientProcess), - ), - ); -} -impl Default for _FILE_PIPE_CLIENT_PROCESS_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_PIPE_CLIENT_PROCESS_BUFFER = _FILE_PIPE_CLIENT_PROCESS_BUFFER; -pub type PFILE_PIPE_CLIENT_PROCESS_BUFFER = *mut _FILE_PIPE_CLIENT_PROCESS_BUFFER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_PIPE_CLIENT_PROCESS_BUFFER_V2 { - pub ClientSession: ULONGLONG, - pub ClientProcess: PVOID, -} -#[test] -fn bindgen_test_layout__FILE_PIPE_CLIENT_PROCESS_BUFFER_V2() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PIPE_CLIENT_PROCESS_BUFFER_V2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PIPE_CLIENT_PROCESS_BUFFER_V2>(), - 16usize, - concat!("Size of: ", stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER_V2)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PIPE_CLIENT_PROCESS_BUFFER_V2>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER_V2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClientSession) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER_V2), - "::", - stringify!(ClientSession), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClientProcess) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER_V2), - "::", - stringify!(ClientProcess), - ), - ); -} -impl Default for _FILE_PIPE_CLIENT_PROCESS_BUFFER_V2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_PIPE_CLIENT_PROCESS_BUFFER_V2 = _FILE_PIPE_CLIENT_PROCESS_BUFFER_V2; -pub type PFILE_PIPE_CLIENT_PROCESS_BUFFER_V2 = *mut _FILE_PIPE_CLIENT_PROCESS_BUFFER_V2; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_PIPE_CLIENT_PROCESS_BUFFER_EX { - pub ClientSession: PVOID, - pub ClientProcess: PVOID, - pub ClientComputerNameLength: USHORT, - pub ClientComputerBuffer: [WCHAR; 16usize], -} -#[test] -fn bindgen_test_layout__FILE_PIPE_CLIENT_PROCESS_BUFFER_EX() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PIPE_CLIENT_PROCESS_BUFFER_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PIPE_CLIENT_PROCESS_BUFFER_EX>(), - 56usize, - concat!("Size of: ", stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PIPE_CLIENT_PROCESS_BUFFER_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClientSession) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER_EX), - "::", - stringify!(ClientSession), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClientProcess) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER_EX), - "::", - stringify!(ClientProcess), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClientComputerNameLength) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER_EX), - "::", - stringify!(ClientComputerNameLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClientComputerBuffer) as usize - ptr as usize - }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_CLIENT_PROCESS_BUFFER_EX), - "::", - stringify!(ClientComputerBuffer), - ), - ); -} -impl Default for _FILE_PIPE_CLIENT_PROCESS_BUFFER_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_PIPE_CLIENT_PROCESS_BUFFER_EX = _FILE_PIPE_CLIENT_PROCESS_BUFFER_EX; -pub type PFILE_PIPE_CLIENT_PROCESS_BUFFER_EX = *mut _FILE_PIPE_CLIENT_PROCESS_BUFFER_EX; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_PIPE_SILO_ARRIVAL_INPUT { - pub JobHandle: HANDLE, -} -#[test] -fn bindgen_test_layout__FILE_PIPE_SILO_ARRIVAL_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PIPE_SILO_ARRIVAL_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PIPE_SILO_ARRIVAL_INPUT>(), - 8usize, - concat!("Size of: ", stringify!(_FILE_PIPE_SILO_ARRIVAL_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PIPE_SILO_ARRIVAL_INPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_PIPE_SILO_ARRIVAL_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).JobHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_SILO_ARRIVAL_INPUT), - "::", - stringify!(JobHandle), - ), - ); -} -impl Default for _FILE_PIPE_SILO_ARRIVAL_INPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_PIPE_SILO_ARRIVAL_INPUT = _FILE_PIPE_SILO_ARRIVAL_INPUT; -pub type PFILE_PIPE_SILO_ARRIVAL_INPUT = *mut _FILE_PIPE_SILO_ARRIVAL_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_PIPE_CREATE_SYMLINK_INPUT { - pub NameOffset: USHORT, - pub NameLength: USHORT, - pub SubstituteNameOffset: USHORT, - pub SubstituteNameLength: USHORT, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__FILE_PIPE_CREATE_SYMLINK_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PIPE_CREATE_SYMLINK_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PIPE_CREATE_SYMLINK_INPUT>(), - 12usize, - concat!("Size of: ", stringify!(_FILE_PIPE_CREATE_SYMLINK_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PIPE_CREATE_SYMLINK_INPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_PIPE_CREATE_SYMLINK_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_CREATE_SYMLINK_INPUT), - "::", - stringify!(NameOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_CREATE_SYMLINK_INPUT), - "::", - stringify!(NameLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SubstituteNameOffset) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_CREATE_SYMLINK_INPUT), - "::", - stringify!(SubstituteNameOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SubstituteNameLength) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_CREATE_SYMLINK_INPUT), - "::", - stringify!(SubstituteNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_CREATE_SYMLINK_INPUT), - "::", - stringify!(Flags), - ), - ); -} -pub type FILE_PIPE_CREATE_SYMLINK_INPUT = _FILE_PIPE_CREATE_SYMLINK_INPUT; -pub type PFILE_PIPE_CREATE_SYMLINK_INPUT = *mut _FILE_PIPE_CREATE_SYMLINK_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FILE_PIPE_DELETE_SYMLINK_INPUT { - pub NameOffset: USHORT, - pub NameLength: USHORT, -} -#[test] -fn bindgen_test_layout__FILE_PIPE_DELETE_SYMLINK_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_PIPE_DELETE_SYMLINK_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_PIPE_DELETE_SYMLINK_INPUT>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_PIPE_DELETE_SYMLINK_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_PIPE_DELETE_SYMLINK_INPUT>(), - 2usize, - concat!("Alignment of ", stringify!(_FILE_PIPE_DELETE_SYMLINK_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_DELETE_SYMLINK_INPUT), - "::", - stringify!(NameOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_FILE_PIPE_DELETE_SYMLINK_INPUT), - "::", - stringify!(NameLength), - ), - ); -} -pub type FILE_PIPE_DELETE_SYMLINK_INPUT = _FILE_PIPE_DELETE_SYMLINK_INPUT; -pub type PFILE_PIPE_DELETE_SYMLINK_INPUT = *mut _FILE_PIPE_DELETE_SYMLINK_INPUT; -pub mod _LINK_TRACKING_INFORMATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const NtfsLinkTrackingInformation: Type = 0; - pub const DfsLinkTrackingInformation: Type = 1; -} -pub use self::_LINK_TRACKING_INFORMATION_TYPE::Type as LINK_TRACKING_INFORMATION_TYPE; -pub type PLINK_TRACKING_INFORMATION_TYPE = *mut _LINK_TRACKING_INFORMATION_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _LINK_TRACKING_INFORMATION { - pub Type: LINK_TRACKING_INFORMATION_TYPE, - pub VolumeId: [UCHAR; 16usize], -} -#[test] -fn bindgen_test_layout__LINK_TRACKING_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_LINK_TRACKING_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LINK_TRACKING_INFORMATION>(), - 20usize, - concat!("Size of: ", stringify!(_LINK_TRACKING_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_LINK_TRACKING_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_LINK_TRACKING_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LINK_TRACKING_INFORMATION), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_LINK_TRACKING_INFORMATION), - "::", - stringify!(VolumeId), - ), - ); -} -impl Default for _LINK_TRACKING_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type LINK_TRACKING_INFORMATION = _LINK_TRACKING_INFORMATION; -pub type PLINK_TRACKING_INFORMATION = *mut _LINK_TRACKING_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REMOTE_LINK_TRACKING_INFORMATION_ { - pub TargetFileObject: PVOID, - pub TargetLinkTrackingInformationLength: ULONG, - pub TargetLinkTrackingInformationBuffer: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__REMOTE_LINK_TRACKING_INFORMATION_() { - const UNINIT: ::core::mem::MaybeUninit<_REMOTE_LINK_TRACKING_INFORMATION_> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REMOTE_LINK_TRACKING_INFORMATION_>(), - 16usize, - concat!("Size of: ", stringify!(_REMOTE_LINK_TRACKING_INFORMATION_)), - ); - assert_eq!( - ::core::mem::align_of::<_REMOTE_LINK_TRACKING_INFORMATION_>(), - 8usize, - concat!("Alignment of ", stringify!(_REMOTE_LINK_TRACKING_INFORMATION_)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetFileObject) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REMOTE_LINK_TRACKING_INFORMATION_), - "::", - stringify!(TargetFileObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetLinkTrackingInformationLength) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REMOTE_LINK_TRACKING_INFORMATION_), - "::", - stringify!(TargetLinkTrackingInformationLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetLinkTrackingInformationBuffer) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_REMOTE_LINK_TRACKING_INFORMATION_), - "::", - stringify!(TargetLinkTrackingInformationBuffer), - ), - ); -} -impl Default for _REMOTE_LINK_TRACKING_INFORMATION_ { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REMOTE_LINK_TRACKING_INFORMATION = _REMOTE_LINK_TRACKING_INFORMATION_; -pub type PREMOTE_LINK_TRACKING_INFORMATION = *mut _REMOTE_LINK_TRACKING_INFORMATION_; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _VCN_RANGE_INPUT_BUFFER { - pub StartingVcn: LARGE_INTEGER, - pub ClusterCount: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__VCN_RANGE_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_VCN_RANGE_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VCN_RANGE_INPUT_BUFFER>(), - 16usize, - concat!("Size of: ", stringify!(_VCN_RANGE_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_VCN_RANGE_INPUT_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_VCN_RANGE_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingVcn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VCN_RANGE_INPUT_BUFFER), - "::", - stringify!(StartingVcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClusterCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_VCN_RANGE_INPUT_BUFFER), - "::", - stringify!(ClusterCount), - ), - ); -} -impl Default for _VCN_RANGE_INPUT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type VCN_RANGE_INPUT_BUFFER = _VCN_RANGE_INPUT_BUFFER; -pub type PVCN_RANGE_INPUT_BUFFER = *mut _VCN_RANGE_INPUT_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _EXTENT_READ_CACHE_INFO_BUFFER { - pub AllocatedCache: LARGE_INTEGER, - pub PopulatedCache: LARGE_INTEGER, - pub InErrorCache: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__EXTENT_READ_CACHE_INFO_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_EXTENT_READ_CACHE_INFO_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EXTENT_READ_CACHE_INFO_BUFFER>(), - 24usize, - concat!("Size of: ", stringify!(_EXTENT_READ_CACHE_INFO_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_EXTENT_READ_CACHE_INFO_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_EXTENT_READ_CACHE_INFO_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocatedCache) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EXTENT_READ_CACHE_INFO_BUFFER), - "::", - stringify!(AllocatedCache), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PopulatedCache) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_EXTENT_READ_CACHE_INFO_BUFFER), - "::", - stringify!(PopulatedCache), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InErrorCache) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_EXTENT_READ_CACHE_INFO_BUFFER), - "::", - stringify!(InErrorCache), - ), - ); -} -impl Default for _EXTENT_READ_CACHE_INFO_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type EXTENT_READ_CACHE_INFO_BUFFER = _EXTENT_READ_CACHE_INFO_BUFFER; -pub type PEXTENT_READ_CACHE_INFO_BUFFER = *mut _EXTENT_READ_CACHE_INFO_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_VOLUME_COUNTER_INFO_INPUT_BUFFER { - pub ResetCounters: BOOLEAN, -} -#[test] -fn bindgen_test_layout__REFS_VOLUME_COUNTER_INFO_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_REFS_VOLUME_COUNTER_INFO_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_VOLUME_COUNTER_INFO_INPUT_BUFFER>(), - 1usize, - concat!("Size of: ", stringify!(_REFS_VOLUME_COUNTER_INFO_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_VOLUME_COUNTER_INFO_INPUT_BUFFER>(), - 1usize, - concat!("Alignment of ", stringify!(_REFS_VOLUME_COUNTER_INFO_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResetCounters) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_COUNTER_INFO_INPUT_BUFFER), - "::", - stringify!(ResetCounters), - ), - ); -} -pub type REFS_VOLUME_COUNTER_INFO_INPUT_BUFFER = _REFS_VOLUME_COUNTER_INFO_INPUT_BUFFER; -pub type PREFS_VOLUME_COUNTER_INFO_INPUT_BUFFER = *mut _REFS_VOLUME_COUNTER_INFO_INPUT_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _VOLUME_REFS_INFO_BUFFER { - pub CacheSizeInBytes: LARGE_INTEGER, - pub AllocatedCacheInBytes: LARGE_INTEGER, - pub PopulatedCacheInBytes: LARGE_INTEGER, - pub InErrorCacheInBytes: LARGE_INTEGER, - pub MemoryUsedForCacheMetadata: LARGE_INTEGER, - pub CacheLineSize: ULONG, - pub CacheTransactionsOutstanding: LONG, - pub CacheLinesFree: LONG, - pub CacheLinesInError: LONG, - pub CacheHitsInBytes: LARGE_INTEGER, - pub CacheMissesInBytes: LARGE_INTEGER, - pub CachePopulationUpdatesInBytes: LARGE_INTEGER, - pub CacheWriteThroughUpdatesInBytes: LARGE_INTEGER, - pub CacheInvalidationsInBytes: LARGE_INTEGER, - pub CacheOverReadsInBytes: LARGE_INTEGER, - pub MetadataWrittenBytes: LARGE_INTEGER, - pub CacheHitCounter: LONG, - pub CacheMissCounter: LONG, - pub CacheLineAllocationCounter: LONG, - pub CacheInvalidationsCounter: LONG, - pub CachePopulationUpdatesCounter: LONG, - pub CacheWriteThroughUpdatesCounter: LONG, - pub MaxCacheTransactionsOutstanding: LONG, - pub DataWritesReallocationCount: LONGLONG, - pub DataInPlaceWriteCount: LONGLONG, - pub MetadataAllocationsFastTierCount: LONGLONG, - pub MetadataAllocationsSlowTierCount: LONGLONG, - pub DataAllocationsFastTierCount: LONGLONG, - pub DataAllocationsSlowTierCount: LONGLONG, - pub DestagesSlowTierToFastTier: LONGLONG, - pub DestagesFastTierToSlowTier: LONGLONG, - pub SlowTierDataFillRatio: LONG, - pub FastTierDataFillRatio: LONG, - pub SlowTierMetadataFillRatio: LONG, - pub FastTierMetadataFillRatio: LONG, - pub SlowToFastDestageReadLatency: LONGLONG, - pub SlowToFastDestageReadLatencyBase: LONG, - pub SlowToFastDestageWriteLatency: LONGLONG, - pub SlowToFastDestageWriteLatencyBase: LONG, - pub FastToSlowDestageReadLatency: LONGLONG, - pub FastToSlowDestageReadLatencyBase: LONG, - pub FastToSlowDestageWriteLatency: LONGLONG, - pub FastToSlowDestageWriteLatencyBase: LONG, - pub SlowTierContainerFillRatio: LONGLONG, - pub SlowTierContainerFillRatioBase: LONG, - pub FastTierContainerFillRatio: LONGLONG, - pub FastTierContainerFillRatioBase: LONG, - pub Unused1: LONG, - pub Unused2: LONG, - pub Unused3: LONG, - pub Unused4: LONG, - pub TreeUpdateCount: LONGLONG, - pub CheckpointCount: LONGLONG, - pub LogWriteCount: LONGLONG, - pub LogFillRatio: LONG, - pub ReadCacheInvalidationsForOverwrite: LONG, - pub ReadCacheInvalidationsForReuse: LONG, - pub ReadCacheInvalidationsGeneral: LONG, - pub ReadCacheChecksOnMount: LONG, - pub ReadCacheIssuesOnMount: LONG, - pub TrimLatency: LONGLONG, - pub TrimLatencyBase: LONG, - pub DataCompactionCount: LONGLONG, - pub CompactionReadLatency: LONGLONG, - pub CompactionReadLatencyBase: LONG, - pub CompactionWriteLatency: LONGLONG, - pub CompactionWriteLatencyBase: LONG, - pub DataInPlaceWriteClusterCount: LARGE_INTEGER, - pub CompactionFailedDueToIneligibleContainer: LONG, - pub CompactionFailedDueToMaxFragmentation: LONG, - pub CompactedContainerFillRatio: LONGLONG, - pub CompactedContainerFillRatioBase: LONG, - pub ContainerMoveRetryCount: LONG, - pub ContainerMoveFailedDueToIneligibleContainer: LONG, - pub CompactionFailureCount: LONG, - pub ContainerMoveFailureCount: LONG, - pub NumberOfDirtyMetadataPages: LARGE_INTEGER, - pub NumberOfDirtyTableListEntries: LONG, - pub NumberOfDeleteQueueEntries: LONG, - pub MAAFilteredViewSize: LONG, - pub MAAFilteredViewInsertions: LONG, - pub MAAFilteredViewDeletions: LONG, - pub MAAFilteredViewCollisions: LONG, - pub MAAFilteredViewPurges: LONG, - pub MAARegionsVisitedPerAllocationSum: LONGLONG, - pub MAARegionsVisitedPerAllocationBase: LONG, - pub MAAMaxRegionsVisitedPerAllocation: LONG, - pub TreeUpdateLatencyExclusive: LONGLONG, - pub TreeUpdateLatencyTotal: LONGLONG, - pub TreeUpdateLatencyBase: LONG, - pub CheckpointLatencyTreeUpdateExclusive: LONGLONG, - pub CheckpointLatencyTreeUpdateTotal: LONGLONG, - pub CheckpointLatencyTreeUpdateBase: LONG, - pub CheckpointLatencyTotal: LONGLONG, - pub CheckpointLatencyTotalBase: LONG, -} -#[test] -fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_VOLUME_REFS_INFO_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_VOLUME_REFS_INFO_BUFFER>(), - 608usize, - concat!("Size of: ", stringify!(_VOLUME_REFS_INFO_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_VOLUME_REFS_INFO_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_VOLUME_REFS_INFO_BUFFER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheSizeInBytes) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheSizeInBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocatedCacheInBytes) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(AllocatedCacheInBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PopulatedCacheInBytes) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(PopulatedCacheInBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InErrorCacheInBytes) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(InErrorCacheInBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MemoryUsedForCacheMetadata) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(MemoryUsedForCacheMetadata), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CacheLineSize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheLineSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheTransactionsOutstanding) as usize - - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheTransactionsOutstanding), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CacheLinesFree) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheLinesFree), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheLinesInError) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheLinesInError), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheHitsInBytes) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheHitsInBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheMissesInBytes) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheMissesInBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CachePopulationUpdatesInBytes) as usize - - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CachePopulationUpdatesInBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheWriteThroughUpdatesInBytes) as usize - - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheWriteThroughUpdatesInBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheInvalidationsInBytes) as usize - - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheInvalidationsInBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheOverReadsInBytes) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheOverReadsInBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetadataWrittenBytes) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(MetadataWrittenBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CacheHitCounter) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheHitCounter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheMissCounter) as usize - ptr as usize - }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheMissCounter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheLineAllocationCounter) as usize - - ptr as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheLineAllocationCounter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheInvalidationsCounter) as usize - - ptr as usize - }, - 124usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheInvalidationsCounter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CachePopulationUpdatesCounter) as usize - - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CachePopulationUpdatesCounter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CacheWriteThroughUpdatesCounter) as usize - - ptr as usize - }, - 132usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CacheWriteThroughUpdatesCounter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaxCacheTransactionsOutstanding) as usize - - ptr as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(MaxCacheTransactionsOutstanding), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataWritesReallocationCount) as usize - - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(DataWritesReallocationCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataInPlaceWriteCount) as usize - ptr as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(DataInPlaceWriteCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetadataAllocationsFastTierCount) as usize - - ptr as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(MetadataAllocationsFastTierCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetadataAllocationsSlowTierCount) as usize - - ptr as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(MetadataAllocationsSlowTierCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataAllocationsFastTierCount) as usize - - ptr as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(DataAllocationsFastTierCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataAllocationsSlowTierCount) as usize - - ptr as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(DataAllocationsSlowTierCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DestagesSlowTierToFastTier) as usize - - ptr as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(DestagesSlowTierToFastTier), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DestagesFastTierToSlowTier) as usize - - ptr as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(DestagesFastTierToSlowTier), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SlowTierDataFillRatio) as usize - ptr as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(SlowTierDataFillRatio), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastTierDataFillRatio) as usize - ptr as usize - }, - 212usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(FastTierDataFillRatio), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SlowTierMetadataFillRatio) as usize - - ptr as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(SlowTierMetadataFillRatio), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastTierMetadataFillRatio) as usize - - ptr as usize - }, - 220usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(FastTierMetadataFillRatio), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SlowToFastDestageReadLatency) as usize - - ptr as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(SlowToFastDestageReadLatency), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SlowToFastDestageReadLatencyBase) as usize - - ptr as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(SlowToFastDestageReadLatencyBase), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SlowToFastDestageWriteLatency) as usize - - ptr as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(SlowToFastDestageWriteLatency), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SlowToFastDestageWriteLatencyBase) as usize - - ptr as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(SlowToFastDestageWriteLatencyBase), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastToSlowDestageReadLatency) as usize - - ptr as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(FastToSlowDestageReadLatency), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastToSlowDestageReadLatencyBase) as usize - - ptr as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(FastToSlowDestageReadLatencyBase), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastToSlowDestageWriteLatency) as usize - - ptr as usize - }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(FastToSlowDestageWriteLatency), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastToSlowDestageWriteLatencyBase) as usize - - ptr as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(FastToSlowDestageWriteLatencyBase), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SlowTierContainerFillRatio) as usize - - ptr as usize - }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(SlowTierContainerFillRatio), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SlowTierContainerFillRatioBase) as usize - - ptr as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(SlowTierContainerFillRatioBase), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastTierContainerFillRatio) as usize - - ptr as usize - }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(FastTierContainerFillRatio), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastTierContainerFillRatioBase) as usize - - ptr as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(FastTierContainerFillRatioBase), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused1) as usize - ptr as usize }, - 316usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(Unused1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused2) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(Unused2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused3) as usize - ptr as usize }, - 324usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(Unused3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Unused4) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(Unused4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TreeUpdateCount) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(TreeUpdateCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CheckpointCount) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CheckpointCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogWriteCount) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(LogWriteCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogFillRatio) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(LogFillRatio), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadCacheInvalidationsForOverwrite) as usize - - ptr as usize - }, - 364usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(ReadCacheInvalidationsForOverwrite), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadCacheInvalidationsForReuse) as usize - - ptr as usize - }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(ReadCacheInvalidationsForReuse), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadCacheInvalidationsGeneral) as usize - - ptr as usize - }, - 372usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(ReadCacheInvalidationsGeneral), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadCacheChecksOnMount) as usize - ptr as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(ReadCacheChecksOnMount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadCacheIssuesOnMount) as usize - ptr as usize - }, - 380usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(ReadCacheIssuesOnMount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TrimLatency) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(TrimLatency), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TrimLatencyBase) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(TrimLatencyBase), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataCompactionCount) as usize - ptr as usize - }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(DataCompactionCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompactionReadLatency) as usize - ptr as usize - }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CompactionReadLatency), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompactionReadLatencyBase) as usize - - ptr as usize - }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CompactionReadLatencyBase), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompactionWriteLatency) as usize - ptr as usize - }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CompactionWriteLatency), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompactionWriteLatencyBase) as usize - - ptr as usize - }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CompactionWriteLatencyBase), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DataInPlaceWriteClusterCount) as usize - - ptr as usize - }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(DataInPlaceWriteClusterCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompactionFailedDueToIneligibleContainer) - as usize - ptr as usize - }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CompactionFailedDueToIneligibleContainer), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompactionFailedDueToMaxFragmentation) as usize - - ptr as usize - }, - 452usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CompactionFailedDueToMaxFragmentation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompactedContainerFillRatio) as usize - - ptr as usize - }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CompactedContainerFillRatio), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompactedContainerFillRatioBase) as usize - - ptr as usize - }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CompactedContainerFillRatioBase), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ContainerMoveRetryCount) as usize - ptr as usize - }, - 468usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(ContainerMoveRetryCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ContainerMoveFailedDueToIneligibleContainer) - as usize - ptr as usize - }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(ContainerMoveFailedDueToIneligibleContainer), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompactionFailureCount) as usize - ptr as usize - }, - 476usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CompactionFailureCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ContainerMoveFailureCount) as usize - - ptr as usize - }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(ContainerMoveFailureCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfDirtyMetadataPages) as usize - - ptr as usize - }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(NumberOfDirtyMetadataPages), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfDirtyTableListEntries) as usize - - ptr as usize - }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(NumberOfDirtyTableListEntries), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfDeleteQueueEntries) as usize - - ptr as usize - }, - 500usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(NumberOfDeleteQueueEntries), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MAAFilteredViewSize) as usize - ptr as usize - }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(MAAFilteredViewSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MAAFilteredViewInsertions) as usize - - ptr as usize - }, - 508usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(MAAFilteredViewInsertions), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MAAFilteredViewDeletions) as usize - - ptr as usize - }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(MAAFilteredViewDeletions), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MAAFilteredViewCollisions) as usize - - ptr as usize - }, - 516usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(MAAFilteredViewCollisions), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MAAFilteredViewPurges) as usize - ptr as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(MAAFilteredViewPurges), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MAARegionsVisitedPerAllocationSum) as usize - - ptr as usize - }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(MAARegionsVisitedPerAllocationSum), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MAARegionsVisitedPerAllocationBase) as usize - - ptr as usize - }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(MAARegionsVisitedPerAllocationBase), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MAAMaxRegionsVisitedPerAllocation) as usize - - ptr as usize - }, - 540usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(MAAMaxRegionsVisitedPerAllocation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TreeUpdateLatencyExclusive) as usize - - ptr as usize - }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(TreeUpdateLatencyExclusive), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TreeUpdateLatencyTotal) as usize - ptr as usize - }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(TreeUpdateLatencyTotal), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TreeUpdateLatencyBase) as usize - ptr as usize - }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(TreeUpdateLatencyBase), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CheckpointLatencyTreeUpdateExclusive) as usize - - ptr as usize - }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CheckpointLatencyTreeUpdateExclusive), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CheckpointLatencyTreeUpdateTotal) as usize - - ptr as usize - }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CheckpointLatencyTreeUpdateTotal), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CheckpointLatencyTreeUpdateBase) as usize - - ptr as usize - }, - 584usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CheckpointLatencyTreeUpdateBase), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CheckpointLatencyTotal) as usize - ptr as usize - }, - 592usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CheckpointLatencyTotal), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CheckpointLatencyTotalBase) as usize - - ptr as usize - }, - 600usize, - concat!( - "Offset of field: ", - stringify!(_VOLUME_REFS_INFO_BUFFER), - "::", - stringify!(CheckpointLatencyTotalBase), - ), - ); -} -impl Default for _VOLUME_REFS_INFO_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type VOLUME_REFS_INFO_BUFFER = _VOLUME_REFS_INFO_BUFFER; -pub type PVOLUME_REFS_INFO_BUFFER = *mut _VOLUME_REFS_INFO_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _QUERY_DIRECT_ACCESS_EXTENTS { - pub FileOffset: LONGLONG, - pub Length: LONGLONG, - pub Flags: ULONG, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__QUERY_DIRECT_ACCESS_EXTENTS() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_DIRECT_ACCESS_EXTENTS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_DIRECT_ACCESS_EXTENTS>(), - 24usize, - concat!("Size of: ", stringify!(_QUERY_DIRECT_ACCESS_EXTENTS)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_DIRECT_ACCESS_EXTENTS>(), - 8usize, - concat!("Alignment of ", stringify!(_QUERY_DIRECT_ACCESS_EXTENTS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_DIRECT_ACCESS_EXTENTS), - "::", - stringify!(FileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_DIRECT_ACCESS_EXTENTS), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_DIRECT_ACCESS_EXTENTS), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_DIRECT_ACCESS_EXTENTS), - "::", - stringify!(Reserved), - ), - ); -} -pub type QUERY_DIRECT_ACCESS_EXTENTS = _QUERY_DIRECT_ACCESS_EXTENTS; -pub type PQUERY_DIRECT_ACCESS_EXTENTS = *mut _QUERY_DIRECT_ACCESS_EXTENTS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER { - pub FileOffset: LARGE_INTEGER, - pub ByteCount: LARGE_INTEGER, - pub RecallOwnerGuid: GUID, - pub RecallMetadataBufferSize: ULONG, - pub RecallMetadataBuffer: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER>(), - 40usize, - concat!("Size of: ", stringify!(_FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER), - "::", - stringify!(FileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER), - "::", - stringify!(ByteCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecallOwnerGuid) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER), - "::", - stringify!(RecallOwnerGuid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RecallMetadataBufferSize) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER), - "::", - stringify!(RecallMetadataBufferSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RecallMetadataBuffer) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER), - "::", - stringify!(RecallMetadataBuffer), - ), - ); -} -impl Default for _FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER = _FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER; -pub type PFSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER = *mut _FSCTL_GHOST_FILE_EXTENTS_INPUT_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE { - pub FileOffset: LARGE_INTEGER, - pub ByteCount: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE() { - const UNINIT: ::core::mem::MaybeUninit< - _FSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE>(), - 16usize, - concat!("Size of: ", stringify!(_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE), - "::", - stringify!(FileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE), - "::", - stringify!(ByteCount), - ), - ); -} -impl Default for _FSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE = _FSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE; -pub type PFSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE = *mut _FSCTL_QUERY_GHOSTED_FILE_EXTENTS_INPUT_RANGE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _GHOSTED_FILE_EXTENT { - pub FileOffset: LARGE_INTEGER, - pub ByteCount: LARGE_INTEGER, - pub RecallOwnerGuid: GUID, - pub NextEntryOffset: ULONG, - pub RecallMetadataBufferSize: ULONG, - pub RecallMetadataBuffer: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__GHOSTED_FILE_EXTENT() { - const UNINIT: ::core::mem::MaybeUninit<_GHOSTED_FILE_EXTENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_GHOSTED_FILE_EXTENT>(), - 48usize, - concat!("Size of: ", stringify!(_GHOSTED_FILE_EXTENT)), - ); - assert_eq!( - ::core::mem::align_of::<_GHOSTED_FILE_EXTENT>(), - 8usize, - concat!("Alignment of ", stringify!(_GHOSTED_FILE_EXTENT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_GHOSTED_FILE_EXTENT), - "::", - stringify!(FileOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ByteCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_GHOSTED_FILE_EXTENT), - "::", - stringify!(ByteCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RecallOwnerGuid) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_GHOSTED_FILE_EXTENT), - "::", - stringify!(RecallOwnerGuid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_GHOSTED_FILE_EXTENT), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RecallMetadataBufferSize) as usize - - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_GHOSTED_FILE_EXTENT), - "::", - stringify!(RecallMetadataBufferSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RecallMetadataBuffer) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_GHOSTED_FILE_EXTENT), - "::", - stringify!(RecallMetadataBuffer), - ), - ); -} -impl Default for _GHOSTED_FILE_EXTENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type GHOSTED_FILE_EXTENT = _GHOSTED_FILE_EXTENT; -pub type PGHOSTED_FILE_EXTENT = *mut _GHOSTED_FILE_EXTENT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT { - pub ExtentCount: ULONG, - pub TotalExtentCount: ULONG, - pub Extents: [UCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__FSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT>(), - 12usize, - concat!("Size of: ", stringify!(_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtentCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT), - "::", - stringify!(ExtentCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalExtentCount) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT), - "::", - stringify!(TotalExtentCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Extents) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT), - "::", - stringify!(Extents), - ), - ); -} -pub type FSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT = _FSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT; -pub type PFSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT = *mut _FSCTL_QUERY_GHOSTED_FILE_EXTENTS_OUTPUT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FSCTL_UNMAP_SPACE_INPUT_BUFFER { - pub BytesToUnmap: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FSCTL_UNMAP_SPACE_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_UNMAP_SPACE_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_UNMAP_SPACE_INPUT_BUFFER>(), - 8usize, - concat!("Size of: ", stringify!(_FSCTL_UNMAP_SPACE_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_UNMAP_SPACE_INPUT_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_FSCTL_UNMAP_SPACE_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesToUnmap) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_UNMAP_SPACE_INPUT_BUFFER), - "::", - stringify!(BytesToUnmap), - ), - ); -} -impl Default for _FSCTL_UNMAP_SPACE_INPUT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSCTL_UNMAP_SPACE_INPUT_BUFFER = _FSCTL_UNMAP_SPACE_INPUT_BUFFER; -pub type PFSCTL_UNMAP_SPACE_INPUT_BUFFER = *mut _FSCTL_UNMAP_SPACE_INPUT_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FSCTL_UNMAP_SPACE_OUTPUT { - pub BytesUnmapped: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FSCTL_UNMAP_SPACE_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_UNMAP_SPACE_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_UNMAP_SPACE_OUTPUT>(), - 8usize, - concat!("Size of: ", stringify!(_FSCTL_UNMAP_SPACE_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_UNMAP_SPACE_OUTPUT>(), - 8usize, - concat!("Alignment of ", stringify!(_FSCTL_UNMAP_SPACE_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BytesUnmapped) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_UNMAP_SPACE_OUTPUT), - "::", - stringify!(BytesUnmapped), - ), - ); -} -impl Default for _FSCTL_UNMAP_SPACE_OUTPUT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSCTL_UNMAP_SPACE_OUTPUT = _FSCTL_UNMAP_SPACE_OUTPUT; -pub type PFSCTL_UNMAP_SPACE_OUTPUT = *mut _FSCTL_UNMAP_SPACE_OUTPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FSCTL_QUERY_VOLUME_NUMA_INFO_OUTPUT { - pub NumaNode: ULONG, -} -#[test] -fn bindgen_test_layout__FSCTL_QUERY_VOLUME_NUMA_INFO_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FSCTL_QUERY_VOLUME_NUMA_INFO_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSCTL_QUERY_VOLUME_NUMA_INFO_OUTPUT>(), - 4usize, - concat!("Size of: ", stringify!(_FSCTL_QUERY_VOLUME_NUMA_INFO_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FSCTL_QUERY_VOLUME_NUMA_INFO_OUTPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_FSCTL_QUERY_VOLUME_NUMA_INFO_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumaNode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSCTL_QUERY_VOLUME_NUMA_INFO_OUTPUT), - "::", - stringify!(NumaNode), - ), - ); -} -pub type FSCTL_QUERY_VOLUME_NUMA_INFO_OUTPUT = _FSCTL_QUERY_VOLUME_NUMA_INFO_OUTPUT; -pub type PFSCTL_QUERY_VOLUME_NUMA_INFO_OUTPUT = *mut _FSCTL_QUERY_VOLUME_NUMA_INFO_OUTPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_DEALLOCATE_RANGES_RANGE { - pub StartOfRange: ULONGLONG, - pub CountOfRange: ULONGLONG, -} -#[test] -fn bindgen_test_layout__REFS_DEALLOCATE_RANGES_RANGE() { - const UNINIT: ::core::mem::MaybeUninit<_REFS_DEALLOCATE_RANGES_RANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_DEALLOCATE_RANGES_RANGE>(), - 16usize, - concat!("Size of: ", stringify!(_REFS_DEALLOCATE_RANGES_RANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_DEALLOCATE_RANGES_RANGE>(), - 8usize, - concat!("Alignment of ", stringify!(_REFS_DEALLOCATE_RANGES_RANGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartOfRange) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_DEALLOCATE_RANGES_RANGE), - "::", - stringify!(StartOfRange), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CountOfRange) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_DEALLOCATE_RANGES_RANGE), - "::", - stringify!(CountOfRange), - ), - ); -} -pub type REFS_DEALLOCATE_RANGES_RANGE = _REFS_DEALLOCATE_RANGES_RANGE; -pub type PREFS_DEALLOCATE_RANGES_RANGE = *mut _REFS_DEALLOCATE_RANGES_RANGE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_DEALLOCATE_RANGES_INPUT_BUFFER { - pub RangeCount: ULONG, - pub Ranges: [REFS_DEALLOCATE_RANGES_RANGE; 1usize], -} -#[test] -fn bindgen_test_layout__REFS_DEALLOCATE_RANGES_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_REFS_DEALLOCATE_RANGES_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_DEALLOCATE_RANGES_INPUT_BUFFER>(), - 24usize, - concat!("Size of: ", stringify!(_REFS_DEALLOCATE_RANGES_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_DEALLOCATE_RANGES_INPUT_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_REFS_DEALLOCATE_RANGES_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RangeCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_DEALLOCATE_RANGES_INPUT_BUFFER), - "::", - stringify!(RangeCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ranges) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_DEALLOCATE_RANGES_INPUT_BUFFER), - "::", - stringify!(Ranges), - ), - ); -} -pub type REFS_DEALLOCATE_RANGES_INPUT_BUFFER = _REFS_DEALLOCATE_RANGES_INPUT_BUFFER; -pub type PREFS_DEALLOCATE_RANGES_INPUT_BUFFER = *mut _REFS_DEALLOCATE_RANGES_INPUT_BUFFER; -pub mod _REFS_DEALLOCATE_RANGES_ALLOCATOR { - pub type Type = ::core::ffi::c_int; - pub const REFS_DEALLOCATE_RANGES_ALLOCATOR_NONE: Type = 0; - pub const REFS_DEALLOCATE_RANGES_ALLOCATOR_SAA: Type = 1; - pub const REFS_DEALLOCATE_RANGES_ALLOCATOR_CAA: Type = 2; - pub const REFS_DEALLOCATE_RANGES_ALLOCATOR_MAA: Type = 3; -} -pub use self::_REFS_DEALLOCATE_RANGES_ALLOCATOR::Type as REFS_DEALLOCATE_RANGES_ALLOCATOR; -pub type PREFS_DEALLOCATE_RANGES_ALLOCATOR = *mut _REFS_DEALLOCATE_RANGES_ALLOCATOR::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX { - pub RangeCount: ULONG, - pub Allocator: REFS_DEALLOCATE_RANGES_ALLOCATOR, - pub StreamReserveUpdateCount: LONGLONG, - pub OffsetToRanges: ULONG, - pub OffsetToLeakCounts: ULONG, - pub Reserved: [ULONGLONG; 2usize], -} -#[test] -fn bindgen_test_layout__REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX() { - const UNINIT: ::core::mem::MaybeUninit<_REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX>(), - 40usize, - concat!("Size of: ", stringify!(_REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RangeCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX), - "::", - stringify!(RangeCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Allocator) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX), - "::", - stringify!(Allocator), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StreamReserveUpdateCount) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX), - "::", - stringify!(StreamReserveUpdateCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OffsetToRanges) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX), - "::", - stringify!(OffsetToRanges), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OffsetToLeakCounts) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX), - "::", - stringify!(OffsetToLeakCounts), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX = _REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX; -pub type PREFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX = *mut _REFS_DEALLOCATE_RANGES_INPUT_BUFFER_EX; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_REMOVE_HARDLINK_BACKPOINTER { - pub ParentDirectory: ULONGLONG, - pub Reserved: ULONGLONG, - pub FileName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__REFS_REMOVE_HARDLINK_BACKPOINTER() { - const UNINIT: ::core::mem::MaybeUninit<_REFS_REMOVE_HARDLINK_BACKPOINTER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_REMOVE_HARDLINK_BACKPOINTER>(), - 24usize, - concat!("Size of: ", stringify!(_REFS_REMOVE_HARDLINK_BACKPOINTER)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_REMOVE_HARDLINK_BACKPOINTER>(), - 8usize, - concat!("Alignment of ", stringify!(_REFS_REMOVE_HARDLINK_BACKPOINTER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParentDirectory) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_REMOVE_HARDLINK_BACKPOINTER), - "::", - stringify!(ParentDirectory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_REMOVE_HARDLINK_BACKPOINTER), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REFS_REMOVE_HARDLINK_BACKPOINTER), - "::", - stringify!(FileName), - ), - ); -} -pub type REFS_REMOVE_HARDLINK_BACKPOINTER = _REFS_REMOVE_HARDLINK_BACKPOINTER; -pub type PREFS_REMOVE_HARDLINK_BACKPOINTER = *mut _REFS_REMOVE_HARDLINK_BACKPOINTER; -pub mod _REFS_STREAM_EXTENT_PROPERTIES { - pub type Type = ::core::ffi::c_int; - pub const REFS_STREAM_EXTENT_PROPERTY_VALID: Type = 16; - pub const REFS_STREAM_EXTENT_PROPERTY_STREAM_RESERVED: Type = 32; - pub const REFS_STREAM_EXTENT_PROPERTY_CRC32: Type = 128; - pub const REFS_STREAM_EXTENT_PROPERTY_CRC64: Type = 256; - pub const REFS_STREAM_EXTENT_PROPERTY_GHOSTED: Type = 512; - pub const REFS_STREAM_EXTENT_PROPERTY_READONLY: Type = 1024; - pub const REFS_STREAM_EXTENT_PROPERTY_SPARSE: Type = 8; -} -pub type REFS_STREAM_EXTENT_PROPERTIES = USHORT; -pub type PREFS_STREAM_EXTENT_PROPERTIES = *mut REFS_STREAM_EXTENT_PROPERTIES; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_STREAM_EXTENT { - pub Vcn: LONGLONG, - pub Lcn: LONGLONG, - pub Length: LONGLONG, - pub Properties: REFS_STREAM_EXTENT_PROPERTIES, -} -#[test] -fn bindgen_test_layout__REFS_STREAM_EXTENT() { - const UNINIT: ::core::mem::MaybeUninit<_REFS_STREAM_EXTENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_STREAM_EXTENT>(), - 32usize, - concat!("Size of: ", stringify!(_REFS_STREAM_EXTENT)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_STREAM_EXTENT>(), - 8usize, - concat!("Alignment of ", stringify!(_REFS_STREAM_EXTENT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vcn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_EXTENT), - "::", - stringify!(Vcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lcn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_EXTENT), - "::", - stringify!(Lcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_EXTENT), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Properties) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_EXTENT), - "::", - stringify!(Properties), - ), - ); -} -pub type REFS_STREAM_EXTENT = _REFS_STREAM_EXTENT; -pub type PREFS_STREAM_EXTENT = *mut _REFS_STREAM_EXTENT; -pub mod _REFS_STREAM_SNAPSHOT_OPERATION { - pub type Type = ::core::ffi::c_int; - pub const REFS_STREAM_SNAPSHOT_OPERATION_INVALID: Type = 0; - pub const REFS_STREAM_SNAPSHOT_OPERATION_CREATE: Type = 1; - pub const REFS_STREAM_SNAPSHOT_OPERATION_LIST: Type = 2; - pub const REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS: Type = 3; - pub const REFS_STREAM_SNAPSHOT_OPERATION_REVERT: Type = 4; - pub const REFS_STREAM_SNAPSHOT_OPERATION_SET_SHADOW_BTREE: Type = 5; - pub const REFS_STREAM_SNAPSHOT_OPERATION_CLEAR_SHADOW_BTREE: Type = 6; - pub const REFS_STREAM_SNAPSHOT_OPERATION_MAX: Type = 6; -} -pub use self::_REFS_STREAM_SNAPSHOT_OPERATION::Type as REFS_STREAM_SNAPSHOT_OPERATION; -pub type PREFS_STREAM_SNAPSHOT_OPERATION = *mut _REFS_STREAM_SNAPSHOT_OPERATION::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER { - pub Operation: REFS_STREAM_SNAPSHOT_OPERATION, - pub SnapshotNameLength: USHORT, - pub OperationInputBufferLength: USHORT, - pub Reserved: [ULONGLONG; 2usize], - pub NameAndInputBuffer: [USHORT; 1usize], -} -#[test] -fn bindgen_test_layout__REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER>(), - 32usize, - concat!("Size of: ", stringify!(_REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Operation) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER), - "::", - stringify!(Operation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SnapshotNameLength) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER), - "::", - stringify!(SnapshotNameLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OperationInputBufferLength) as usize - - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER), - "::", - stringify!(OperationInputBufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NameAndInputBuffer) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER), - "::", - stringify!(NameAndInputBuffer), - ), - ); -} -impl Default for _REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER = _REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER; -pub type PREFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER = *mut _REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY { - pub NextEntryOffset: ULONG, - pub SnapshotNameLength: USHORT, - pub SnapshotCreationTime: ULONGLONG, - pub StreamSize: ULONGLONG, - pub StreamAllocationSize: ULONGLONG, - pub Reserved: [ULONGLONG; 2usize], - pub SnapshotName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY>(), - 56usize, - concat!("Size of: ", stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY), - "::", - stringify!(NextEntryOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SnapshotNameLength) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY), - "::", - stringify!(SnapshotNameLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SnapshotCreationTime) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY), - "::", - stringify!(SnapshotCreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StreamSize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY), - "::", - stringify!(StreamSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StreamAllocationSize) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY), - "::", - stringify!(StreamAllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SnapshotName) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY), - "::", - stringify!(SnapshotName), - ), - ); -} -pub type REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY = _REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY; -pub type PREFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY = *mut _REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER { - pub EntryCount: ULONG, - pub BufferSizeRequiredForQuery: ULONG, - pub Reserved: [ULONG; 2usize], - pub Entries: [REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER_ENTRY; 1usize], -} -#[test] -fn bindgen_test_layout__REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER>(), - 72usize, - concat!("Size of: ", stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntryCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER), - "::", - stringify!(EntryCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BufferSizeRequiredForQuery) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER), - "::", - stringify!(BufferSizeRequiredForQuery), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Entries) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER), - "::", - stringify!(Entries), - ), - ); -} -pub type REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER = _REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER; -pub type PREFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER = *mut _REFS_STREAM_SNAPSHOT_LIST_OUTPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER { - pub StartingVcn: LONGLONG, - pub Flags: ULONG, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER>(), - 16usize, - concat!("Size of: ", stringify!(_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingVcn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER), - "::", - stringify!(StartingVcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER), - "::", - stringify!(Reserved), - ), - ); -} -pub type REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER = _REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER; -pub type PREFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER = *mut _REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER { - pub ExtentCount: ULONG, - pub Reserved: [ULONG; 2usize], - pub Extents: [REFS_STREAM_EXTENT; 1usize], -} -#[test] -fn bindgen_test_layout__REFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER>(), - 48usize, - concat!( - "Size of: ", - stringify!(_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER), - ), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExtentCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER), - "::", - stringify!(ExtentCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Extents) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER), - "::", - stringify!(Extents), - ), - ); -} -pub type REFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER = _REFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER; -pub type PREFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER = *mut _REFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _DUPLICATE_CLUSTER_DATA { - pub SourceLcn: LONGLONG, - pub TargetLcn: LONGLONG, - pub TargetFileOffset: LARGE_INTEGER, - pub DuplicationLimit: ULONG, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__DUPLICATE_CLUSTER_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_DUPLICATE_CLUSTER_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DUPLICATE_CLUSTER_DATA>(), - 32usize, - concat!("Size of: ", stringify!(_DUPLICATE_CLUSTER_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_DUPLICATE_CLUSTER_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_DUPLICATE_CLUSTER_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceLcn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_CLUSTER_DATA), - "::", - stringify!(SourceLcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TargetLcn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_CLUSTER_DATA), - "::", - stringify!(TargetLcn), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetFileOffset) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_CLUSTER_DATA), - "::", - stringify!(TargetFileOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DuplicationLimit) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_CLUSTER_DATA), - "::", - stringify!(DuplicationLimit), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_DUPLICATE_CLUSTER_DATA), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _DUPLICATE_CLUSTER_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type DUPLICATE_CLUSTER_DATA = _DUPLICATE_CLUSTER_DATA; -pub type PDUPLICATE_CLUSTER_DATA = *mut _DUPLICATE_CLUSTER_DATA; -pub mod _LCN_WEAK_REFERENCE_STATE { - pub type Type = ::core::ffi::c_int; - pub const LCN_WEAK_REFERENCE_VALID: Type = 1; - pub const LCN_WEAK_REFERENCE_BROKEN: Type = 2; - pub const LCN_CHECKSUM_VALID: Type = 4; - pub const LCN_IS_VALID: Type = 8; - pub const LCN_IS_STREAM_RESERVED: Type = 16; - pub const LCN_IS_READ_ONLY: Type = 32; -} -pub type LCN_WEAK_REFERENCE_STATE = ULONG; -pub type PLCN_WEAK_REFERENCE_STATE = *mut LCN_WEAK_REFERENCE_STATE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _LCN_WEAK_REFERENCE_BUFFER { - pub Lcn: LONGLONG, - pub LengthInClusters: LONGLONG, - pub ReferenceCount: ULONG, - pub State: LCN_WEAK_REFERENCE_STATE, -} -#[test] -fn bindgen_test_layout__LCN_WEAK_REFERENCE_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_LCN_WEAK_REFERENCE_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LCN_WEAK_REFERENCE_BUFFER>(), - 24usize, - concat!("Size of: ", stringify!(_LCN_WEAK_REFERENCE_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_LCN_WEAK_REFERENCE_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_LCN_WEAK_REFERENCE_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lcn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_BUFFER), - "::", - stringify!(Lcn), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LengthInClusters) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_BUFFER), - "::", - stringify!(LengthInClusters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReferenceCount) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_BUFFER), - "::", - stringify!(ReferenceCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).State) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_BUFFER), - "::", - stringify!(State), - ), - ); -} -pub type LCN_WEAK_REFERENCE_BUFFER = _LCN_WEAK_REFERENCE_BUFFER; -pub type PLCN_WEAK_REFERENCE_BUFFER = *mut _LCN_WEAK_REFERENCE_BUFFER; -pub type LCN_WEAK_REFERENCE_CREATE_FLAGS = ULONG; -pub type PLCN_WEAK_REFERENCE_CREATE_FLAGS = *mut LCN_WEAK_REFERENCE_CREATE_FLAGS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER { - pub Offset: LONGLONG, - pub Length: LONGLONG, - pub Flags: ULONG, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER>(), - 24usize, - concat!("Size of: ", stringify!(_LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER), - "::", - stringify!(Reserved), - ), - ); -} -pub type LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER = _LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER; -pub type PLCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER = *mut _LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _LCN_WEAK_REFERENCE_VCN_MAPPING { - pub Vcn: LONGLONG, - pub Lcn: LONGLONG, - pub CountOfRange: LONGLONG, -} -#[test] -fn bindgen_test_layout__LCN_WEAK_REFERENCE_VCN_MAPPING() { - const UNINIT: ::core::mem::MaybeUninit<_LCN_WEAK_REFERENCE_VCN_MAPPING> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LCN_WEAK_REFERENCE_VCN_MAPPING>(), - 24usize, - concat!("Size of: ", stringify!(_LCN_WEAK_REFERENCE_VCN_MAPPING)), - ); - assert_eq!( - ::core::mem::align_of::<_LCN_WEAK_REFERENCE_VCN_MAPPING>(), - 8usize, - concat!("Alignment of ", stringify!(_LCN_WEAK_REFERENCE_VCN_MAPPING)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vcn) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_VCN_MAPPING), - "::", - stringify!(Vcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lcn) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_VCN_MAPPING), - "::", - stringify!(Lcn), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CountOfRange) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_VCN_MAPPING), - "::", - stringify!(CountOfRange), - ), - ); -} -pub type LCN_WEAK_REFERENCE_VCN_MAPPING = _LCN_WEAK_REFERENCE_VCN_MAPPING; -pub type PLCN_WEAK_REFERENCE_VCN_MAPPING = *mut _LCN_WEAK_REFERENCE_VCN_MAPPING; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER { - pub MappingCount: ULONG, - pub VcnLcnMappings: [LCN_WEAK_REFERENCE_VCN_MAPPING; 1usize], -} -#[test] -fn bindgen_test_layout__LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER>(), - 32usize, - concat!("Size of: ", stringify!(_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MappingCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER), - "::", - stringify!(MappingCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VcnLcnMappings) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER), - "::", - stringify!(VcnLcnMappings), - ), - ); -} -pub type LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER = _LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER; -pub type PLCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER = *mut _LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _LCN_WEAK_REFERENCE_RANGE { - pub StartOfRange: LONGLONG, - pub CountOfRange: LONGLONG, -} -#[test] -fn bindgen_test_layout__LCN_WEAK_REFERENCE_RANGE() { - const UNINIT: ::core::mem::MaybeUninit<_LCN_WEAK_REFERENCE_RANGE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LCN_WEAK_REFERENCE_RANGE>(), - 16usize, - concat!("Size of: ", stringify!(_LCN_WEAK_REFERENCE_RANGE)), - ); - assert_eq!( - ::core::mem::align_of::<_LCN_WEAK_REFERENCE_RANGE>(), - 8usize, - concat!("Alignment of ", stringify!(_LCN_WEAK_REFERENCE_RANGE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartOfRange) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_RANGE), - "::", - stringify!(StartOfRange), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CountOfRange) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_RANGE), - "::", - stringify!(CountOfRange), - ), - ); -} -pub type LCN_WEAK_REFERENCE_RANGE = _LCN_WEAK_REFERENCE_RANGE; -pub type PLCN_WEAK_REFERENCE_RANGE = *mut _LCN_WEAK_REFERENCE_RANGE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER { - pub RangeCount: ULONG, - pub Ranges: [LCN_WEAK_REFERENCE_RANGE; 1usize], -} -#[test] -fn bindgen_test_layout__LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER>(), - 24usize, - concat!("Size of: ", stringify!(_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RangeCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER), - "::", - stringify!(RangeCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ranges) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER), - "::", - stringify!(Ranges), - ), - ); -} -pub type LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER = _LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER; -pub type PLCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER = *mut _LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER { - pub Version: ULONG, - pub SetDedupState: BOOLEAN, - pub Enable: BOOLEAN, - pub SetWeakRefState: BOOLEAN, - pub EnableWeakRef: BOOLEAN, - pub SetDirtyRangeTrackingState: BOOLEAN, - pub EnableDirtyRangeTracking: BOOLEAN, -} -#[test] -fn bindgen_test_layout__REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER>(), - 12usize, - concat!("Size of: ", stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetDedupState) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), - "::", - stringify!(SetDedupState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enable) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), - "::", - stringify!(Enable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SetWeakRefState) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), - "::", - stringify!(SetWeakRefState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EnableWeakRef) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), - "::", - stringify!(EnableWeakRef), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetDirtyRangeTrackingState) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), - "::", - stringify!(SetDirtyRangeTrackingState), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EnableDirtyRangeTracking) as usize - - ptr as usize - }, - 9usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), - "::", - stringify!(EnableDirtyRangeTracking), - ), - ); -} -pub type REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER = _REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER; -pub type PREFS_VOLUME_DEDUP_INFO_INPUT_BUFFER = *mut _REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER { - pub Version: ULONG, - pub Enabled: BOOLEAN, - pub EnabledWeakRef: BOOLEAN, - pub EnabledDirtyRangeTracking: BOOLEAN, - pub IsClustered: BOOLEAN, - pub VolumeIdHash: ULONG, - pub VolumeGuid: GUID, - pub VolumeUniqueGuid: GUID, -} -#[test] -fn bindgen_test_layout__REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER>(), - 44usize, - concat!("Size of: ", stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER>(), - 4usize, - concat!("Alignment of ", stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EnabledWeakRef) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), - "::", - stringify!(EnabledWeakRef), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EnabledDirtyRangeTracking) as usize - - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), - "::", - stringify!(EnabledDirtyRangeTracking), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsClustered) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), - "::", - stringify!(IsClustered), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeIdHash) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), - "::", - stringify!(VolumeIdHash), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeGuid) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), - "::", - stringify!(VolumeGuid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeUniqueGuid) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), - "::", - stringify!(VolumeUniqueGuid), - ), - ); -} -pub type REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER = _REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER; -pub type PREFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER = *mut _REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER { - pub Version: ULONG, - pub TotalSharedLcns: ULONGLONG, -} -#[test] -fn bindgen_test_layout__REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER>(), - 16usize, - concat!( - "Size of: ", - stringify!(_REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER), - ), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TotalSharedLcns) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER), - "::", - stringify!(TotalSharedLcns), - ), - ); -} -pub type REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER = _REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER; -pub type PREFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER = *mut _REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SET_CACHED_RUNS_STATE_INPUT_BUFFER { - pub Enable: BOOLEAN, -} -#[test] -fn bindgen_test_layout__SET_CACHED_RUNS_STATE_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_SET_CACHED_RUNS_STATE_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SET_CACHED_RUNS_STATE_INPUT_BUFFER>(), - 1usize, - concat!("Size of: ", stringify!(_SET_CACHED_RUNS_STATE_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_SET_CACHED_RUNS_STATE_INPUT_BUFFER>(), - 1usize, - concat!("Alignment of ", stringify!(_SET_CACHED_RUNS_STATE_INPUT_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enable) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SET_CACHED_RUNS_STATE_INPUT_BUFFER), - "::", - stringify!(Enable), - ), - ); -} -pub type SET_CACHED_RUNS_STATE_INPUT_BUFFER = _SET_CACHED_RUNS_STATE_INPUT_BUFFER; -pub type PSET_CACHED_RUNS_STATE_INPUT_BUFFER = *mut _SET_CACHED_RUNS_STATE_INPUT_BUFFER; -pub mod _REFS_COMPRESSION_FORMATS { - pub type Type = ::core::ffi::c_int; - pub const REFS_COMPRESSION_FORMAT_UNCHANGED: Type = 0; - pub const REFS_COMPRESSION_FORMAT_UNKNOWN: Type = 1; - pub const REFS_COMPRESSION_FORMAT_UNCOMPRESSED: Type = 2; - pub const REFS_COMPRESSION_FORMAT_LZ4: Type = 3; - pub const REFS_COMPRESSION_FORMAT_ZSTD: Type = 4; -} -pub use self::_REFS_COMPRESSION_FORMATS::Type as REFS_COMPRESSION_FORMATS; -pub type PREFS_COMPRESSION_FORMATS = *mut _REFS_COMPRESSION_FORMATS::Type; -pub mod _REFS_SET_VOLUME_COMPRESSION_INFO_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const REFS_SET_VOLUME_COMPRESSION_INFO_FLAG_START_COMPRESSION: Type = 1; - pub const REFS_SET_VOLUME_COMPRESSION_INFO_FLAG_STOP_COMPRESSION: Type = 2; - pub const REFS_SET_VOLUME_COMPRESSION_INFO_FLAG_GC_ONLY: Type = 4; - pub const REFS_SET_VOLUME_COMPRESSION_INFO_FLAG_MAX: Type = 2; -} -pub use self::_REFS_SET_VOLUME_COMPRESSION_INFO_FLAGS::Type as REFS_SET_VOLUME_COMPRESSION_INFO_FLAGS; -pub type PREFS_SET_VOLUME_COMPRESSION_INFO_FLAGS = *mut _REFS_SET_VOLUME_COMPRESSION_INFO_FLAGS::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER { - pub Version: ULONG, - pub CompressionFormat: REFS_COMPRESSION_FORMATS, - pub CompressionLevel: SHORT, - pub CompressionChunkSizeBytes: ULONG, - pub Flags: ULONG, - pub CompressionTuning: ULONG, - pub RecompressionTuning: ULONG, - pub DecompressionTuning: ULONG, - pub Reserved: [ULONG; 6usize], -} -#[test] -fn bindgen_test_layout__REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER>(), - 56usize, - concat!("Size of: ", stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompressionFormat) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), - "::", - stringify!(CompressionFormat), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompressionLevel) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), - "::", - stringify!(CompressionLevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompressionChunkSizeBytes) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), - "::", - stringify!(CompressionChunkSizeBytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompressionTuning) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), - "::", - stringify!(CompressionTuning), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RecompressionTuning) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), - "::", - stringify!(RecompressionTuning), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DecompressionTuning) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), - "::", - stringify!(DecompressionTuning), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER = _REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER; -pub type PREFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER = *mut _REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER; -pub mod _REFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const REFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS_RUNNING: Type = 1; - pub const REFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS_STOPPED: Type = 2; -} -pub use self::_REFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS::Type as REFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS; -pub type PREFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS = *mut _REFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER { - pub Version: ULONG, - pub DefaultCompressionFormat: REFS_COMPRESSION_FORMATS, - pub DefaultCompressionLevel: SHORT, - pub DefaultCompressionChunkSizeBytes: ULONG, - pub VolumeClusterSizeBytes: ULONG, - pub TotalVolumeClusters: ULONGLONG, - pub TotalAllocatedClusters: ULONGLONG, - pub TotalCompressibleClustersAllocated: ULONGLONG, - pub TotalCompressibleClustersInUse: ULONGLONG, - pub TotalCompressedClusters: ULONGLONG, - pub Flags: ULONG, - pub CompressionTuning: ULONG, - pub RecompressionTuning: ULONG, - pub DecompressionTuning: ULONG, - pub Reserved: [ULONG; 9usize], -} -#[test] -fn bindgen_test_layout__REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER>(), - 120usize, - concat!( - "Size of: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - ), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DefaultCompressionFormat) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(DefaultCompressionFormat), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DefaultCompressionLevel) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(DefaultCompressionLevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DefaultCompressionChunkSizeBytes) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(DefaultCompressionChunkSizeBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).VolumeClusterSizeBytes) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(VolumeClusterSizeBytes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalVolumeClusters) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(TotalVolumeClusters), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalAllocatedClusters) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(TotalAllocatedClusters), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalCompressibleClustersAllocated) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(TotalCompressibleClustersAllocated), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalCompressibleClustersInUse) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(TotalCompressibleClustersInUse), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalCompressedClusters) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(TotalCompressedClusters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompressionTuning) as usize - ptr as usize - }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(CompressionTuning), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RecompressionTuning) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(RecompressionTuning), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DecompressionTuning) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(DecompressionTuning), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER = _REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER; -pub type PREFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER = *mut _REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER { - pub Version: ULONG, - pub GlobalSecondsToTrack: ULONG, - pub MetricsPeriodicitySeconds: ULONG, - pub MetricsGenerationsPerContainer: ULONG, - pub Reserved: [ULONG; 8usize], -} -#[test] -fn bindgen_test_layout__REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER>(), - 48usize, - concat!("Size of: ", stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GlobalSecondsToTrack) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), - "::", - stringify!(GlobalSecondsToTrack), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetricsPeriodicitySeconds) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), - "::", - stringify!(MetricsPeriodicitySeconds), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetricsGenerationsPerContainer) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), - "::", - stringify!(MetricsGenerationsPerContainer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), - "::", - stringify!(Reserved), - ), - ); -} -pub type REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER = _REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER; -pub type PREFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER = *mut _REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER; -pub mod _REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE { - pub type Type = ::core::ffi::c_int; - pub const REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE_PARAMETERS: Type = 1; - pub const REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE_METRICS_DATA: Type = 2; -} -pub use self::_REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE::Type as REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE; -pub type PREFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE = *mut _REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER { - pub Version: ULONG, - pub QueryType: REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE, - pub Reserved: [ULONG; 6usize], - pub __bindgen_anon_1: _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1 { - pub UnusedAlign: ULONGLONG, - pub Parameters: _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, - pub MetricsData: _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 { - pub Reserved: [ULONG; 6usize], -} -#[test] -fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, - >(), - 24usize, - concat!( - "Size of: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(Reserved), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 { - pub ResumeKeyBlob: [ULONGLONG; 2usize], - pub Reserved: [ULONG; 6usize], -} -#[test] -fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, - >(), - 40usize, - concat!( - "Size of: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResumeKeyBlob) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(ResumeKeyBlob), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(Reserved), - ), - ); -} -#[test] -fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1, - >(), - 40usize, - concat!( - "Size of: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UnusedAlign) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1), - "::", - stringify!(UnusedAlign), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1), - "::", - stringify!(Parameters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MetricsData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1), - "::", - stringify!(MetricsData), - ), - ); -} -impl Default for _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER>(), - 72usize, - concat!("Size of: ", stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), - "::", - stringify!(QueryType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER = _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER; -pub type PREFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER = *mut _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA { - pub PlaceHolder: ULONGLONG, -} -#[test] -fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA>(), - 8usize, - concat!("Size of: ", stringify!(_REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PlaceHolder) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA), - "::", - stringify!(PlaceHolder), - ), - ); -} -pub type REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA = _REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA; -pub type PREFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA = *mut _REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER { - pub Version: ULONG, - pub QueryType: REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE, - pub Reserved: [ULONG; 6usize], - pub __bindgen_anon_1: _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1 { - pub UnusedAlign: ULONGLONG, - pub Parameters: _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, - pub MetricsData: _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 { - pub GlobalSecondsToTrack: ULONG, - pub MetricsPeriodicitySeconds: ULONG, - pub MetricsGenerationsPerContainer: ULONG, - pub Reserved: [ULONG; 6usize], -} -#[test] -fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, - >(), - 36usize, - concat!( - "Size of: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).GlobalSecondsToTrack) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(GlobalSecondsToTrack), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetricsPeriodicitySeconds) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(MetricsPeriodicitySeconds), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MetricsGenerationsPerContainer) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(MetricsGenerationsPerContainer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(Reserved), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 { - pub EntryCount: ULONG, - pub ResumeKeyBlob: [ULONGLONG; 2usize], - pub Reserved: [ULONG; 6usize], - pub Metrics: [REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA; 1usize], -} -#[test] -fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, - >(), - 56usize, - concat!( - "Size of: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntryCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(EntryCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ResumeKeyBlob) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(ResumeKeyBlob), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Metrics) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!( - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(Metrics), - ), - ); -} -#[test] -fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1, - >(), - 56usize, - concat!( - "Size of: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UnusedAlign) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1), - "::", - stringify!(UnusedAlign), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1), - "::", - stringify!(Parameters), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MetricsData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1), - "::", - stringify!(MetricsData), - ), - ); -} -impl Default for _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit< - _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER>(), - 88usize, - concat!( - "Size of: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER), - ), - ); - assert_eq!( - ::core::mem::align_of::<_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER), - "::", - stringify!(QueryType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER = _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER; -pub type PREFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER = *mut _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FILE_STORAGE_RESERVE_ID_INFORMATION { - pub StorageReserveId: STORAGE_RESERVE_ID, -} -#[test] -fn bindgen_test_layout__FILE_STORAGE_RESERVE_ID_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_STORAGE_RESERVE_ID_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_STORAGE_RESERVE_ID_INFORMATION>(), - 4usize, - concat!("Size of: ", stringify!(_FILE_STORAGE_RESERVE_ID_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_STORAGE_RESERVE_ID_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FILE_STORAGE_RESERVE_ID_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).StorageReserveId) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_STORAGE_RESERVE_ID_INFORMATION), - "::", - stringify!(StorageReserveId), - ), - ); -} -impl Default for _FILE_STORAGE_RESERVE_ID_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_STORAGE_RESERVE_ID_INFORMATION = _FILE_STORAGE_RESERVE_ID_INFORMATION; -pub type PFILE_STORAGE_RESERVE_ID_INFORMATION = *mut _FILE_STORAGE_RESERVE_ID_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NETWORK_APP_INSTANCE_EA { - pub AppInstanceID: GUID, - pub CsvFlags: ULONG, -} -#[test] -fn bindgen_test_layout__NETWORK_APP_INSTANCE_EA() { - const UNINIT: ::core::mem::MaybeUninit<_NETWORK_APP_INSTANCE_EA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NETWORK_APP_INSTANCE_EA>(), - 20usize, - concat!("Size of: ", stringify!(_NETWORK_APP_INSTANCE_EA)), - ); - assert_eq!( - ::core::mem::align_of::<_NETWORK_APP_INSTANCE_EA>(), - 4usize, - concat!("Alignment of ", stringify!(_NETWORK_APP_INSTANCE_EA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AppInstanceID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_APP_INSTANCE_EA), - "::", - stringify!(AppInstanceID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CsvFlags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_APP_INSTANCE_EA), - "::", - stringify!(CsvFlags), - ), - ); -} -pub type NETWORK_APP_INSTANCE_EA = _NETWORK_APP_INSTANCE_EA; -pub type PNETWORK_APP_INSTANCE_EA = *mut _NETWORK_APP_INSTANCE_EA; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SMB_SHARE_FLUSH_AND_PURGE_INPUT { - pub Version: USHORT, -} -#[test] -fn bindgen_test_layout__SMB_SHARE_FLUSH_AND_PURGE_INPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SMB_SHARE_FLUSH_AND_PURGE_INPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SMB_SHARE_FLUSH_AND_PURGE_INPUT>(), - 2usize, - concat!("Size of: ", stringify!(_SMB_SHARE_FLUSH_AND_PURGE_INPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SMB_SHARE_FLUSH_AND_PURGE_INPUT>(), - 2usize, - concat!("Alignment of ", stringify!(_SMB_SHARE_FLUSH_AND_PURGE_INPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SMB_SHARE_FLUSH_AND_PURGE_INPUT), - "::", - stringify!(Version), - ), - ); -} -pub type SMB_SHARE_FLUSH_AND_PURGE_INPUT = _SMB_SHARE_FLUSH_AND_PURGE_INPUT; -pub type PSMB_SHARE_FLUSH_AND_PURGE_INPUT = *mut _SMB_SHARE_FLUSH_AND_PURGE_INPUT; -pub type PCSMB_SHARE_FLUSH_AND_PURGE_INPUT = *const _SMB_SHARE_FLUSH_AND_PURGE_INPUT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SMB_SHARE_FLUSH_AND_PURGE_OUTPUT { - pub cEntriesPurged: ULONG, -} -#[test] -fn bindgen_test_layout__SMB_SHARE_FLUSH_AND_PURGE_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_SMB_SHARE_FLUSH_AND_PURGE_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SMB_SHARE_FLUSH_AND_PURGE_OUTPUT>(), - 4usize, - concat!("Size of: ", stringify!(_SMB_SHARE_FLUSH_AND_PURGE_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_SMB_SHARE_FLUSH_AND_PURGE_OUTPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_SMB_SHARE_FLUSH_AND_PURGE_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cEntriesPurged) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SMB_SHARE_FLUSH_AND_PURGE_OUTPUT), - "::", - stringify!(cEntriesPurged), - ), - ); -} -pub type SMB_SHARE_FLUSH_AND_PURGE_OUTPUT = _SMB_SHARE_FLUSH_AND_PURGE_OUTPUT; -pub type PSMB_SHARE_FLUSH_AND_PURGE_OUTPUT = *mut _SMB_SHARE_FLUSH_AND_PURGE_OUTPUT; -pub type PCSMB_SHARE_FLUSH_AND_PURGE_OUTPUT = *const _SMB_SHARE_FLUSH_AND_PURGE_OUTPUT; -pub mod _OBJECT_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const ObjectBasicInformation: Type = 0; - pub const ObjectTypeInformation: Type = 2; -} -pub use self::_OBJECT_INFORMATION_CLASS::Type as OBJECT_INFORMATION_CLASS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PUBLIC_OBJECT_BASIC_INFORMATION { - pub Attributes: ULONG, - pub GrantedAccess: ACCESS_MASK, - pub HandleCount: ULONG, - pub PointerCount: ULONG, - pub Reserved: [ULONG; 10usize], -} -#[test] -fn bindgen_test_layout__PUBLIC_OBJECT_BASIC_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_PUBLIC_OBJECT_BASIC_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PUBLIC_OBJECT_BASIC_INFORMATION>(), - 56usize, - concat!("Size of: ", stringify!(_PUBLIC_OBJECT_BASIC_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_PUBLIC_OBJECT_BASIC_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_PUBLIC_OBJECT_BASIC_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Attributes) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PUBLIC_OBJECT_BASIC_INFORMATION), - "::", - stringify!(Attributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GrantedAccess) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PUBLIC_OBJECT_BASIC_INFORMATION), - "::", - stringify!(GrantedAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HandleCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PUBLIC_OBJECT_BASIC_INFORMATION), - "::", - stringify!(HandleCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PointerCount) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_PUBLIC_OBJECT_BASIC_INFORMATION), - "::", - stringify!(PointerCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PUBLIC_OBJECT_BASIC_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -pub type PUBLIC_OBJECT_BASIC_INFORMATION = _PUBLIC_OBJECT_BASIC_INFORMATION; -pub type PPUBLIC_OBJECT_BASIC_INFORMATION = *mut _PUBLIC_OBJECT_BASIC_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __PUBLIC_OBJECT_TYPE_INFORMATION { - pub TypeName: UNICODE_STRING, - pub Reserved: [ULONG; 22usize], -} -#[test] -fn bindgen_test_layout___PUBLIC_OBJECT_TYPE_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<__PUBLIC_OBJECT_TYPE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<__PUBLIC_OBJECT_TYPE_INFORMATION>(), - 104usize, - concat!("Size of: ", stringify!(__PUBLIC_OBJECT_TYPE_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<__PUBLIC_OBJECT_TYPE_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(__PUBLIC_OBJECT_TYPE_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TypeName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__PUBLIC_OBJECT_TYPE_INFORMATION), - "::", - stringify!(TypeName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__PUBLIC_OBJECT_TYPE_INFORMATION), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for __PUBLIC_OBJECT_TYPE_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PUBLIC_OBJECT_TYPE_INFORMATION = __PUBLIC_OBJECT_TYPE_INFORMATION; -pub type PPUBLIC_OBJECT_TYPE_INFORMATION = *mut __PUBLIC_OBJECT_TYPE_INFORMATION; -pub mod _MEMORY_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const MemoryBasicInformation: Type = 0; -} -pub use self::_MEMORY_INFORMATION_CLASS::Type as MEMORY_INFORMATION_CLASS; -pub mod _VIRTUAL_MEMORY_INFORMATION_CLASS { - pub type Type = ::core::ffi::c_int; - pub const VmPrefetchInformation: Type = 0; -} -pub use self::_VIRTUAL_MEMORY_INFORMATION_CLASS::Type as VIRTUAL_MEMORY_INFORMATION_CLASS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MEMORY_BASIC_INFORMATION { - pub BaseAddress: PVOID, - pub AllocationBase: PVOID, - pub AllocationProtect: ULONG, - pub PartitionId: USHORT, - pub RegionSize: SIZE_T, - pub State: ULONG, - pub Protect: ULONG, - pub Type: ULONG, -} -#[test] -fn bindgen_test_layout__MEMORY_BASIC_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_MEMORY_BASIC_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MEMORY_BASIC_INFORMATION>(), - 48usize, - concat!("Size of: ", stringify!(_MEMORY_BASIC_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_MEMORY_BASIC_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_MEMORY_BASIC_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseAddress) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_BASIC_INFORMATION), - "::", - stringify!(BaseAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationBase) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_BASIC_INFORMATION), - "::", - stringify!(AllocationBase), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocationProtect) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_BASIC_INFORMATION), - "::", - stringify!(AllocationProtect), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PartitionId) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_BASIC_INFORMATION), - "::", - stringify!(PartitionId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RegionSize) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_BASIC_INFORMATION), - "::", - stringify!(RegionSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).State) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_BASIC_INFORMATION), - "::", - stringify!(State), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Protect) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_BASIC_INFORMATION), - "::", - stringify!(Protect), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_BASIC_INFORMATION), - "::", - stringify!(Type), - ), - ); -} -impl Default for _MEMORY_BASIC_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MEMORY_BASIC_INFORMATION = _MEMORY_BASIC_INFORMATION; -pub type PMEMORY_BASIC_INFORMATION = *mut _MEMORY_BASIC_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MEMORY_RANGE_ENTRY { - pub VirtualAddress: PVOID, - pub NumberOfBytes: SIZE_T, -} -#[test] -fn bindgen_test_layout__MEMORY_RANGE_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_MEMORY_RANGE_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MEMORY_RANGE_ENTRY>(), - 16usize, - concat!("Size of: ", stringify!(_MEMORY_RANGE_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_MEMORY_RANGE_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_MEMORY_RANGE_ENTRY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VirtualAddress) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_RANGE_ENTRY), - "::", - stringify!(VirtualAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfBytes) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MEMORY_RANGE_ENTRY), - "::", - stringify!(NumberOfBytes), - ), - ); -} -impl Default for _MEMORY_RANGE_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MEMORY_RANGE_ENTRY = _MEMORY_RANGE_ENTRY; -pub type PMEMORY_RANGE_ENTRY = *mut _MEMORY_RANGE_ENTRY; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SECURITY_CLIENT_CONTEXT { - pub SecurityQos: SECURITY_QUALITY_OF_SERVICE, - pub ClientToken: PACCESS_TOKEN, - pub DirectlyAccessClientToken: BOOLEAN, - pub DirectAccessEffectiveOnly: BOOLEAN, - pub ServerIsRemote: BOOLEAN, - pub ClientTokenControl: TOKEN_CONTROL, -} -#[test] -fn bindgen_test_layout__SECURITY_CLIENT_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_SECURITY_CLIENT_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SECURITY_CLIENT_CONTEXT>(), - 72usize, - concat!("Size of: ", stringify!(_SECURITY_CLIENT_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_SECURITY_CLIENT_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_SECURITY_CLIENT_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecurityQos) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_CLIENT_CONTEXT), - "::", - stringify!(SecurityQos), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ClientToken) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_CLIENT_CONTEXT), - "::", - stringify!(ClientToken), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DirectlyAccessClientToken) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_CLIENT_CONTEXT), - "::", - stringify!(DirectlyAccessClientToken), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DirectAccessEffectiveOnly) as usize - - ptr as usize - }, - 25usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_CLIENT_CONTEXT), - "::", - stringify!(DirectAccessEffectiveOnly), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ServerIsRemote) as usize - ptr as usize }, - 26usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_CLIENT_CONTEXT), - "::", - stringify!(ServerIsRemote), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClientTokenControl) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_CLIENT_CONTEXT), - "::", - stringify!(ClientTokenControl), - ), - ); -} -impl Default for _SECURITY_CLIENT_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SECURITY_CLIENT_CONTEXT = _SECURITY_CLIENT_CONTEXT; -pub type PSECURITY_CLIENT_CONTEXT = *mut _SECURITY_CLIENT_CONTEXT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KAPC_STATE { - pub ApcListHead: [LIST_ENTRY; 2usize], - pub Process: *mut _KPROCESS, - pub __bindgen_anon_1: _KAPC_STATE__bindgen_ty_1, - pub KernelApcPending: BOOLEAN, - pub __bindgen_anon_2: _KAPC_STATE__bindgen_ty_2, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KAPC_STATE__bindgen_ty_1 { - pub InProgressFlags: UCHAR, - pub __bindgen_anon_1: _KAPC_STATE__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KAPC_STATE__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__KAPC_STATE__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_KAPC_STATE__bindgen_ty_1__bindgen_ty_1>(), - 1usize, - concat!("Size of: ", stringify!(_KAPC_STATE__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KAPC_STATE__bindgen_ty_1__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_KAPC_STATE__bindgen_ty_1__bindgen_ty_1)), - ); -} -impl _KAPC_STATE__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn KernelApcInProgress(&self) -> BOOLEAN { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_KernelApcInProgress(&mut self, val: BOOLEAN) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn SpecialApcInProgress(&self) -> BOOLEAN { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_SpecialApcInProgress(&mut self, val: BOOLEAN) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - KernelApcInProgress: BOOLEAN, - SpecialApcInProgress: BOOLEAN, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let KernelApcInProgress: u8 = unsafe { - ::core::mem::transmute(KernelApcInProgress) - }; - KernelApcInProgress as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let SpecialApcInProgress: u8 = unsafe { - ::core::mem::transmute(SpecialApcInProgress) - }; - SpecialApcInProgress as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__KAPC_STATE__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KAPC_STATE__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KAPC_STATE__bindgen_ty_1>(), - 1usize, - concat!("Size of: ", stringify!(_KAPC_STATE__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KAPC_STATE__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_KAPC_STATE__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InProgressFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KAPC_STATE__bindgen_ty_1), - "::", - stringify!(InProgressFlags), - ), - ); -} -impl Default for _KAPC_STATE__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KAPC_STATE__bindgen_ty_2 { - pub UserApcPendingAll: BOOLEAN, - pub __bindgen_anon_1: _KAPC_STATE__bindgen_ty_2__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KAPC_STATE__bindgen_ty_2__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, -} -#[test] -fn bindgen_test_layout__KAPC_STATE__bindgen_ty_2__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_KAPC_STATE__bindgen_ty_2__bindgen_ty_1>(), - 1usize, - concat!("Size of: ", stringify!(_KAPC_STATE__bindgen_ty_2__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KAPC_STATE__bindgen_ty_2__bindgen_ty_1>(), - 1usize, - concat!("Alignment of ", stringify!(_KAPC_STATE__bindgen_ty_2__bindgen_ty_1)), - ); -} -impl _KAPC_STATE__bindgen_ty_2__bindgen_ty_1 { - #[inline] - pub fn SpecialUserApcPending(&self) -> BOOLEAN { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } - } - #[inline] - pub fn set_SpecialUserApcPending(&mut self, val: BOOLEAN) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn UserApcPending(&self) -> BOOLEAN { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } - } - #[inline] - pub fn set_UserApcPending(&mut self, val: BOOLEAN) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - SpecialUserApcPending: BOOLEAN, - UserApcPending: BOOLEAN, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let SpecialUserApcPending: u8 = unsafe { - ::core::mem::transmute(SpecialUserApcPending) - }; - SpecialUserApcPending as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let UserApcPending: u8 = unsafe { - ::core::mem::transmute(UserApcPending) - }; - UserApcPending as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__KAPC_STATE__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_KAPC_STATE__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KAPC_STATE__bindgen_ty_2>(), - 1usize, - concat!("Size of: ", stringify!(_KAPC_STATE__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_KAPC_STATE__bindgen_ty_2>(), - 1usize, - concat!("Alignment of ", stringify!(_KAPC_STATE__bindgen_ty_2)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserApcPendingAll) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KAPC_STATE__bindgen_ty_2), - "::", - stringify!(UserApcPendingAll), - ), - ); -} -impl Default for _KAPC_STATE__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__KAPC_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_KAPC_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KAPC_STATE>(), - 48usize, - concat!("Size of: ", stringify!(_KAPC_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_KAPC_STATE>(), - 8usize, - concat!("Alignment of ", stringify!(_KAPC_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ApcListHead) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KAPC_STATE), - "::", - stringify!(ApcListHead), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Process) as usize - ptr as usize }, - 32usize, - concat!("Offset of field: ", stringify!(_KAPC_STATE), "::", stringify!(Process)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KernelApcPending) as usize - ptr as usize - }, - 41usize, - concat!( - "Offset of field: ", - stringify!(_KAPC_STATE), - "::", - stringify!(KernelApcPending), - ), - ); -} -impl Default for _KAPC_STATE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KAPC_STATE = _KAPC_STATE; -pub type PKAPC_STATE = *mut _KAPC_STATE; -pub type PRKAPC_STATE = *mut _KAPC_STATE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KQUEUE { - pub Header: DISPATCHER_HEADER, - pub EntryListHead: LIST_ENTRY, - pub CurrentCount: ULONG, - pub MaximumCount: ULONG, - pub ThreadListHead: LIST_ENTRY, -} -#[test] -fn bindgen_test_layout__KQUEUE() { - const UNINIT: ::core::mem::MaybeUninit<_KQUEUE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KQUEUE>(), - 64usize, - concat!("Size of: ", stringify!(_KQUEUE)), - ); - assert_eq!( - ::core::mem::align_of::<_KQUEUE>(), - 8usize, - concat!("Alignment of ", stringify!(_KQUEUE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Header) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_KQUEUE), "::", stringify!(Header)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EntryListHead) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_KQUEUE), - "::", - stringify!(EntryListHead), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentCount) as usize - ptr as usize }, - 40usize, - concat!("Offset of field: ", stringify!(_KQUEUE), "::", stringify!(CurrentCount)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumCount) as usize - ptr as usize }, - 44usize, - concat!("Offset of field: ", stringify!(_KQUEUE), "::", stringify!(MaximumCount)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ThreadListHead) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_KQUEUE), - "::", - stringify!(ThreadListHead), - ), - ); -} -impl Default for _KQUEUE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KQUEUE = _KQUEUE; -pub type PKQUEUE = *mut _KQUEUE; -pub type PRKQUEUE = *mut _KQUEUE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SE_EXPORTS { - pub SeCreateTokenPrivilege: LUID, - pub SeAssignPrimaryTokenPrivilege: LUID, - pub SeLockMemoryPrivilege: LUID, - pub SeIncreaseQuotaPrivilege: LUID, - pub SeUnsolicitedInputPrivilege: LUID, - pub SeTcbPrivilege: LUID, - pub SeSecurityPrivilege: LUID, - pub SeTakeOwnershipPrivilege: LUID, - pub SeLoadDriverPrivilege: LUID, - pub SeCreatePagefilePrivilege: LUID, - pub SeIncreaseBasePriorityPrivilege: LUID, - pub SeSystemProfilePrivilege: LUID, - pub SeSystemtimePrivilege: LUID, - pub SeProfileSingleProcessPrivilege: LUID, - pub SeCreatePermanentPrivilege: LUID, - pub SeBackupPrivilege: LUID, - pub SeRestorePrivilege: LUID, - pub SeShutdownPrivilege: LUID, - pub SeDebugPrivilege: LUID, - pub SeAuditPrivilege: LUID, - pub SeSystemEnvironmentPrivilege: LUID, - pub SeChangeNotifyPrivilege: LUID, - pub SeRemoteShutdownPrivilege: LUID, - pub SeNullSid: PSID, - pub SeWorldSid: PSID, - pub SeLocalSid: PSID, - pub SeCreatorOwnerSid: PSID, - pub SeCreatorGroupSid: PSID, - pub SeNtAuthoritySid: PSID, - pub SeDialupSid: PSID, - pub SeNetworkSid: PSID, - pub SeBatchSid: PSID, - pub SeInteractiveSid: PSID, - pub SeLocalSystemSid: PSID, - pub SeAliasAdminsSid: PSID, - pub SeAliasUsersSid: PSID, - pub SeAliasGuestsSid: PSID, - pub SeAliasPowerUsersSid: PSID, - pub SeAliasAccountOpsSid: PSID, - pub SeAliasSystemOpsSid: PSID, - pub SeAliasPrintOpsSid: PSID, - pub SeAliasBackupOpsSid: PSID, - pub SeAuthenticatedUsersSid: PSID, - pub SeRestrictedSid: PSID, - pub SeAnonymousLogonSid: PSID, - pub SeUndockPrivilege: LUID, - pub SeSyncAgentPrivilege: LUID, - pub SeEnableDelegationPrivilege: LUID, - pub SeLocalServiceSid: PSID, - pub SeNetworkServiceSid: PSID, - pub SeManageVolumePrivilege: LUID, - pub SeImpersonatePrivilege: LUID, - pub SeCreateGlobalPrivilege: LUID, - pub SeTrustedCredManAccessPrivilege: LUID, - pub SeRelabelPrivilege: LUID, - pub SeIncreaseWorkingSetPrivilege: LUID, - pub SeTimeZonePrivilege: LUID, - pub SeCreateSymbolicLinkPrivilege: LUID, - pub SeIUserSid: PSID, - pub SeUntrustedMandatorySid: PSID, - pub SeLowMandatorySid: PSID, - pub SeMediumMandatorySid: PSID, - pub SeHighMandatorySid: PSID, - pub SeSystemMandatorySid: PSID, - pub SeOwnerRightsSid: PSID, - pub SeAllAppPackagesSid: PSID, - pub SeUserModeDriversSid: PSID, - pub SeProcTrustWinTcbSid: PSID, - pub SeTrustedInstallerSid: PSID, - pub SeDelegateSessionUserImpersonatePrivilege: LUID, - pub SeAppSiloSid: PSID, - pub SeAppSiloVolumeRootMinimalCapabilitySid: PSID, - pub SeAppSiloProfilesRootMinimalCapabilitySid: PSID, -} -#[test] -fn bindgen_test_layout__SE_EXPORTS() { - const UNINIT: ::core::mem::MaybeUninit<_SE_EXPORTS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SE_EXPORTS>(), - 584usize, - concat!("Size of: ", stringify!(_SE_EXPORTS)), - ); - assert_eq!( - ::core::mem::align_of::<_SE_EXPORTS>(), - 8usize, - concat!("Alignment of ", stringify!(_SE_EXPORTS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeCreateTokenPrivilege) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeCreateTokenPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAssignPrimaryTokenPrivilege) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAssignPrimaryTokenPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeLockMemoryPrivilege) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeLockMemoryPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeIncreaseQuotaPrivilege) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeIncreaseQuotaPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeUnsolicitedInputPrivilege) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeUnsolicitedInputPrivilege), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SeTcbPrivilege) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeTcbPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeSecurityPrivilege) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeSecurityPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeTakeOwnershipPrivilege) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeTakeOwnershipPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeLoadDriverPrivilege) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeLoadDriverPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeCreatePagefilePrivilege) as usize - - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeCreatePagefilePrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeIncreaseBasePriorityPrivilege) as usize - - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeIncreaseBasePriorityPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeSystemProfilePrivilege) as usize - - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeSystemProfilePrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeSystemtimePrivilege) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeSystemtimePrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeProfileSingleProcessPrivilege) as usize - - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeProfileSingleProcessPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeCreatePermanentPrivilege) as usize - - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeCreatePermanentPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeBackupPrivilege) as usize - ptr as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeBackupPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeRestorePrivilege) as usize - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeRestorePrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeShutdownPrivilege) as usize - ptr as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeShutdownPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeDebugPrivilege) as usize - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeDebugPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAuditPrivilege) as usize - ptr as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAuditPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeSystemEnvironmentPrivilege) as usize - - ptr as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeSystemEnvironmentPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeChangeNotifyPrivilege) as usize - ptr as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeChangeNotifyPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeRemoteShutdownPrivilege) as usize - - ptr as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeRemoteShutdownPrivilege), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SeNullSid) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeNullSid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SeWorldSid) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeWorldSid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SeLocalSid) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeLocalSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeCreatorOwnerSid) as usize - ptr as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeCreatorOwnerSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeCreatorGroupSid) as usize - ptr as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeCreatorGroupSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeNtAuthoritySid) as usize - ptr as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeNtAuthoritySid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SeDialupSid) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeDialupSid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SeNetworkSid) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeNetworkSid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SeBatchSid) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeBatchSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeInteractiveSid) as usize - ptr as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeInteractiveSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeLocalSystemSid) as usize - ptr as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeLocalSystemSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAliasAdminsSid) as usize - ptr as usize - }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAliasAdminsSid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SeAliasUsersSid) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAliasUsersSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAliasGuestsSid) as usize - ptr as usize - }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAliasGuestsSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAliasPowerUsersSid) as usize - ptr as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAliasPowerUsersSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAliasAccountOpsSid) as usize - ptr as usize - }, - 304usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAliasAccountOpsSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAliasSystemOpsSid) as usize - ptr as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAliasSystemOpsSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAliasPrintOpsSid) as usize - ptr as usize - }, - 320usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAliasPrintOpsSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAliasBackupOpsSid) as usize - ptr as usize - }, - 328usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAliasBackupOpsSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAuthenticatedUsersSid) as usize - ptr as usize - }, - 336usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAuthenticatedUsersSid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SeRestrictedSid) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeRestrictedSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAnonymousLogonSid) as usize - ptr as usize - }, - 352usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAnonymousLogonSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeUndockPrivilege) as usize - ptr as usize - }, - 360usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeUndockPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeSyncAgentPrivilege) as usize - ptr as usize - }, - 368usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeSyncAgentPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeEnableDelegationPrivilege) as usize - - ptr as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeEnableDelegationPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeLocalServiceSid) as usize - ptr as usize - }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeLocalServiceSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeNetworkServiceSid) as usize - ptr as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeNetworkServiceSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeManageVolumePrivilege) as usize - ptr as usize - }, - 400usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeManageVolumePrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeImpersonatePrivilege) as usize - ptr as usize - }, - 408usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeImpersonatePrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeCreateGlobalPrivilege) as usize - ptr as usize - }, - 416usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeCreateGlobalPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeTrustedCredManAccessPrivilege) as usize - - ptr as usize - }, - 424usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeTrustedCredManAccessPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeRelabelPrivilege) as usize - ptr as usize - }, - 432usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeRelabelPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeIncreaseWorkingSetPrivilege) as usize - - ptr as usize - }, - 440usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeIncreaseWorkingSetPrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeTimeZonePrivilege) as usize - ptr as usize - }, - 448usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeTimeZonePrivilege), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeCreateSymbolicLinkPrivilege) as usize - - ptr as usize - }, - 456usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeCreateSymbolicLinkPrivilege), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SeIUserSid) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeIUserSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeUntrustedMandatorySid) as usize - ptr as usize - }, - 472usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeUntrustedMandatorySid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeLowMandatorySid) as usize - ptr as usize - }, - 480usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeLowMandatorySid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeMediumMandatorySid) as usize - ptr as usize - }, - 488usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeMediumMandatorySid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeHighMandatorySid) as usize - ptr as usize - }, - 496usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeHighMandatorySid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeSystemMandatorySid) as usize - ptr as usize - }, - 504usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeSystemMandatorySid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeOwnerRightsSid) as usize - ptr as usize - }, - 512usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeOwnerRightsSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAllAppPackagesSid) as usize - ptr as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAllAppPackagesSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeUserModeDriversSid) as usize - ptr as usize - }, - 528usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeUserModeDriversSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeProcTrustWinTcbSid) as usize - ptr as usize - }, - 536usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeProcTrustWinTcbSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeTrustedInstallerSid) as usize - ptr as usize - }, - 544usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeTrustedInstallerSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeDelegateSessionUserImpersonatePrivilege) - as usize - ptr as usize - }, - 552usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeDelegateSessionUserImpersonatePrivilege), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SeAppSiloSid) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAppSiloSid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAppSiloVolumeRootMinimalCapabilitySid) - as usize - ptr as usize - }, - 568usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAppSiloVolumeRootMinimalCapabilitySid), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SeAppSiloProfilesRootMinimalCapabilitySid) - as usize - ptr as usize - }, - 576usize, - concat!( - "Offset of field: ", - stringify!(_SE_EXPORTS), - "::", - stringify!(SeAppSiloProfilesRootMinimalCapabilitySid), - ), - ); -} -impl Default for _SE_EXPORTS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SE_EXPORTS = _SE_EXPORTS; -pub type PSE_EXPORTS = *mut _SE_EXPORTS; -pub type SE_LOGON_SESSION_TERMINATED_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(LogonId: PLUID) -> NTSTATUS, ->; -pub type PSE_LOGON_SESSION_TERMINATED_ROUTINE = SE_LOGON_SESSION_TERMINATED_ROUTINE; -pub type SE_LOGON_SESSION_TERMINATED_ROUTINE_EX = ::core::option::Option< - unsafe extern "C" fn(LogonId: PLUID, pServerSilo: PESILO, Context: PVOID) -> NTSTATUS, ->; -pub type PSE_LOGON_SESSION_TERMINATED_ROUTINE_EX = SE_LOGON_SESSION_TERMINATED_ROUTINE_EX; -pub type DRIVER_FS_NOTIFICATION = ::core::option::Option< - unsafe extern "C" fn(DeviceObject: *mut _DEVICE_OBJECT, FsActive: BOOLEAN), ->; -pub type PDRIVER_FS_NOTIFICATION = DRIVER_FS_NOTIFICATION; -pub mod _FS_FILTER_SECTION_SYNC_TYPE { - pub type Type = ::core::ffi::c_int; - pub const SyncTypeOther: Type = 0; - pub const SyncTypeCreateSection: Type = 1; -} -pub use self::_FS_FILTER_SECTION_SYNC_TYPE::Type as FS_FILTER_SECTION_SYNC_TYPE; -pub type PFS_FILTER_SECTION_SYNC_TYPE = *mut _FS_FILTER_SECTION_SYNC_TYPE::Type; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FS_FILTER_SECTION_SYNC_OUTPUT { - pub StructureSize: ULONG, - pub SizeReturned: ULONG, - pub Flags: ULONG, - pub DesiredReadAlignment: ULONG, -} -#[test] -fn bindgen_test_layout__FS_FILTER_SECTION_SYNC_OUTPUT() { - const UNINIT: ::core::mem::MaybeUninit<_FS_FILTER_SECTION_SYNC_OUTPUT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_FILTER_SECTION_SYNC_OUTPUT>(), - 16usize, - concat!("Size of: ", stringify!(_FS_FILTER_SECTION_SYNC_OUTPUT)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_FILTER_SECTION_SYNC_OUTPUT>(), - 4usize, - concat!("Alignment of ", stringify!(_FS_FILTER_SECTION_SYNC_OUTPUT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StructureSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_SECTION_SYNC_OUTPUT), - "::", - stringify!(StructureSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SizeReturned) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_SECTION_SYNC_OUTPUT), - "::", - stringify!(SizeReturned), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_SECTION_SYNC_OUTPUT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DesiredReadAlignment) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_SECTION_SYNC_OUTPUT), - "::", - stringify!(DesiredReadAlignment), - ), - ); -} -pub type FS_FILTER_SECTION_SYNC_OUTPUT = _FS_FILTER_SECTION_SYNC_OUTPUT; -pub type PFS_FILTER_SECTION_SYNC_OUTPUT = *mut _FS_FILTER_SECTION_SYNC_OUTPUT; -pub mod _FS_FILTER_STREAM_FO_NOTIFICATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const NotifyTypeCreate: Type = 0; - pub const NotifyTypeRetired: Type = 1; -} -pub use self::_FS_FILTER_STREAM_FO_NOTIFICATION_TYPE::Type as FS_FILTER_STREAM_FO_NOTIFICATION_TYPE; -pub type PFS_FILTER_STREAM_FO_NOTIFICATION_TYPE = *mut _FS_FILTER_STREAM_FO_NOTIFICATION_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FS_FILTER_PARAMETERS { - pub AcquireForModifiedPageWriter: _FS_FILTER_PARAMETERS__bindgen_ty_1, - pub ReleaseForModifiedPageWriter: _FS_FILTER_PARAMETERS__bindgen_ty_2, - pub AcquireForSectionSynchronization: _FS_FILTER_PARAMETERS__bindgen_ty_3, - pub QueryOpen: _FS_FILTER_PARAMETERS__bindgen_ty_4, - pub Others: _FS_FILTER_PARAMETERS__bindgen_ty_5, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FS_FILTER_PARAMETERS__bindgen_ty_1 { - pub EndingOffset: PLARGE_INTEGER, - pub ResourceToRelease: *mut PERESOURCE, -} -#[test] -fn bindgen_test_layout__FS_FILTER_PARAMETERS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_FS_FILTER_PARAMETERS__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_FILTER_PARAMETERS__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_FILTER_PARAMETERS__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndingOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_1), - "::", - stringify!(EndingOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ResourceToRelease) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_1), - "::", - stringify!(ResourceToRelease), - ), - ); -} -impl Default for _FS_FILTER_PARAMETERS__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FS_FILTER_PARAMETERS__bindgen_ty_2 { - pub ResourceToRelease: PERESOURCE, -} -#[test] -fn bindgen_test_layout__FS_FILTER_PARAMETERS__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit<_FS_FILTER_PARAMETERS__bindgen_ty_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_FILTER_PARAMETERS__bindgen_ty_2>(), - 8usize, - concat!("Size of: ", stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_FILTER_PARAMETERS__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_2)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ResourceToRelease) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_2), - "::", - stringify!(ResourceToRelease), - ), - ); -} -impl Default for _FS_FILTER_PARAMETERS__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FS_FILTER_PARAMETERS__bindgen_ty_3 { - pub SyncType: FS_FILTER_SECTION_SYNC_TYPE, - pub PageProtection: ULONG, - pub OutputInformation: PFS_FILTER_SECTION_SYNC_OUTPUT, - pub Flags: ULONG, - pub AllocationAttributes: ULONG, -} -#[test] -fn bindgen_test_layout__FS_FILTER_PARAMETERS__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit<_FS_FILTER_PARAMETERS__bindgen_ty_3> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_FILTER_PARAMETERS__bindgen_ty_3>(), - 24usize, - concat!("Size of: ", stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_3)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_FILTER_PARAMETERS__bindgen_ty_3>(), - 8usize, - concat!("Alignment of ", stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_3)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SyncType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_3), - "::", - stringify!(SyncType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PageProtection) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_3), - "::", - stringify!(PageProtection), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OutputInformation) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_3), - "::", - stringify!(OutputInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_3), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllocationAttributes) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_3), - "::", - stringify!(AllocationAttributes), - ), - ); -} -impl Default for _FS_FILTER_PARAMETERS__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FS_FILTER_PARAMETERS__bindgen_ty_4 { - pub Irp: PIRP, - pub FileInformation: PVOID, - pub Length: PULONG, - pub FileInformationClass: FILE_INFORMATION_CLASS, - pub CompletionStatus: NTSTATUS, -} -#[test] -fn bindgen_test_layout__FS_FILTER_PARAMETERS__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit<_FS_FILTER_PARAMETERS__bindgen_ty_4> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_FILTER_PARAMETERS__bindgen_ty_4>(), - 32usize, - concat!("Size of: ", stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_4)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_FILTER_PARAMETERS__bindgen_ty_4>(), - 8usize, - concat!("Alignment of ", stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_4)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Irp) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_4), - "::", - stringify!(Irp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileInformation) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_4), - "::", - stringify!(FileInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_4), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileInformationClass) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_4), - "::", - stringify!(FileInformationClass), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompletionStatus) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_4), - "::", - stringify!(CompletionStatus), - ), - ); -} -impl Default for _FS_FILTER_PARAMETERS__bindgen_ty_4 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FS_FILTER_PARAMETERS__bindgen_ty_5 { - pub Argument1: PVOID, - pub Argument2: PVOID, - pub Argument3: PVOID, - pub Argument4: PVOID, - pub Argument5: PVOID, -} -#[test] -fn bindgen_test_layout__FS_FILTER_PARAMETERS__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit<_FS_FILTER_PARAMETERS__bindgen_ty_5> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_FILTER_PARAMETERS__bindgen_ty_5>(), - 40usize, - concat!("Size of: ", stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_5)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_FILTER_PARAMETERS__bindgen_ty_5>(), - 8usize, - concat!("Alignment of ", stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_5)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Argument1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_5), - "::", - stringify!(Argument1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Argument2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_5), - "::", - stringify!(Argument2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Argument3) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_5), - "::", - stringify!(Argument3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Argument4) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_5), - "::", - stringify!(Argument4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Argument5) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS__bindgen_ty_5), - "::", - stringify!(Argument5), - ), - ); -} -impl Default for _FS_FILTER_PARAMETERS__bindgen_ty_5 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FS_FILTER_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_FS_FILTER_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_FILTER_PARAMETERS>(), - 40usize, - concat!("Size of: ", stringify!(_FS_FILTER_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_FILTER_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_FS_FILTER_PARAMETERS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AcquireForModifiedPageWriter) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS), - "::", - stringify!(AcquireForModifiedPageWriter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReleaseForModifiedPageWriter) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS), - "::", - stringify!(ReleaseForModifiedPageWriter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AcquireForSectionSynchronization) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS), - "::", - stringify!(AcquireForSectionSynchronization), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).QueryOpen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS), - "::", - stringify!(QueryOpen), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Others) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_PARAMETERS), - "::", - stringify!(Others), - ), - ); -} -impl Default for _FS_FILTER_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FS_FILTER_PARAMETERS = _FS_FILTER_PARAMETERS; -pub type PFS_FILTER_PARAMETERS = *mut _FS_FILTER_PARAMETERS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FS_FILTER_CALLBACK_DATA { - pub SizeOfFsFilterCallbackData: ULONG, - pub Operation: UCHAR, - pub Reserved: UCHAR, - pub DeviceObject: *mut _DEVICE_OBJECT, - pub FileObject: *mut _FILE_OBJECT, - pub Parameters: FS_FILTER_PARAMETERS, -} -#[test] -fn bindgen_test_layout__FS_FILTER_CALLBACK_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_FS_FILTER_CALLBACK_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_FILTER_CALLBACK_DATA>(), - 64usize, - concat!("Size of: ", stringify!(_FS_FILTER_CALLBACK_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_FILTER_CALLBACK_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_FS_FILTER_CALLBACK_DATA)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SizeOfFsFilterCallbackData) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACK_DATA), - "::", - stringify!(SizeOfFsFilterCallbackData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Operation) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACK_DATA), - "::", - stringify!(Operation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACK_DATA), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceObject) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACK_DATA), - "::", - stringify!(DeviceObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileObject) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACK_DATA), - "::", - stringify!(FileObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACK_DATA), - "::", - stringify!(Parameters), - ), - ); -} -impl Default for _FS_FILTER_CALLBACK_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FS_FILTER_CALLBACK_DATA = _FS_FILTER_CALLBACK_DATA; -pub type PFS_FILTER_CALLBACK_DATA = *mut _FS_FILTER_CALLBACK_DATA; -pub type PFS_FILTER_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - Data: PFS_FILTER_CALLBACK_DATA, - CompletionContext: *mut PVOID, - ) -> NTSTATUS, ->; -pub type PFS_FILTER_COMPLETION_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - Data: PFS_FILTER_CALLBACK_DATA, - OperationStatus: NTSTATUS, - CompletionContext: PVOID, - ), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FS_FILTER_CALLBACKS { - pub SizeOfFsFilterCallbacks: ULONG, - pub Reserved: ULONG, - pub PreAcquireForSectionSynchronization: PFS_FILTER_CALLBACK, - pub PostAcquireForSectionSynchronization: PFS_FILTER_COMPLETION_CALLBACK, - pub PreReleaseForSectionSynchronization: PFS_FILTER_CALLBACK, - pub PostReleaseForSectionSynchronization: PFS_FILTER_COMPLETION_CALLBACK, - pub PreAcquireForCcFlush: PFS_FILTER_CALLBACK, - pub PostAcquireForCcFlush: PFS_FILTER_COMPLETION_CALLBACK, - pub PreReleaseForCcFlush: PFS_FILTER_CALLBACK, - pub PostReleaseForCcFlush: PFS_FILTER_COMPLETION_CALLBACK, - pub PreAcquireForModifiedPageWriter: PFS_FILTER_CALLBACK, - pub PostAcquireForModifiedPageWriter: PFS_FILTER_COMPLETION_CALLBACK, - pub PreReleaseForModifiedPageWriter: PFS_FILTER_CALLBACK, - pub PostReleaseForModifiedPageWriter: PFS_FILTER_COMPLETION_CALLBACK, - pub PreQueryOpen: PFS_FILTER_CALLBACK, - pub PostQueryOpen: PFS_FILTER_COMPLETION_CALLBACK, -} -#[test] -fn bindgen_test_layout__FS_FILTER_CALLBACKS() { - const UNINIT: ::core::mem::MaybeUninit<_FS_FILTER_CALLBACKS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FS_FILTER_CALLBACKS>(), - 120usize, - concat!("Size of: ", stringify!(_FS_FILTER_CALLBACKS)), - ); - assert_eq!( - ::core::mem::align_of::<_FS_FILTER_CALLBACKS>(), - 8usize, - concat!("Alignment of ", stringify!(_FS_FILTER_CALLBACKS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SizeOfFsFilterCallbacks) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(SizeOfFsFilterCallbacks), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PreAcquireForSectionSynchronization) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PreAcquireForSectionSynchronization), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PostAcquireForSectionSynchronization) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PostAcquireForSectionSynchronization), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PreReleaseForSectionSynchronization) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PreReleaseForSectionSynchronization), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PostReleaseForSectionSynchronization) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PostReleaseForSectionSynchronization), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PreAcquireForCcFlush) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PreAcquireForCcFlush), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PostAcquireForCcFlush) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PostAcquireForCcFlush), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PreReleaseForCcFlush) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PreReleaseForCcFlush), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PostReleaseForCcFlush) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PostReleaseForCcFlush), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PreAcquireForModifiedPageWriter) as usize - - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PreAcquireForModifiedPageWriter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PostAcquireForModifiedPageWriter) as usize - - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PostAcquireForModifiedPageWriter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PreReleaseForModifiedPageWriter) as usize - - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PreReleaseForModifiedPageWriter), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PostReleaseForModifiedPageWriter) as usize - - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PostReleaseForModifiedPageWriter), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PreQueryOpen) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PreQueryOpen), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PostQueryOpen) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_FS_FILTER_CALLBACKS), - "::", - stringify!(PostQueryOpen), - ), - ); -} -pub type FS_FILTER_CALLBACKS = _FS_FILTER_CALLBACKS; -pub type PFS_FILTER_CALLBACKS = *mut _FS_FILTER_CALLBACKS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_CREATE_STREAM_FILE_OPTIONS { - pub Size: USHORT, - pub Flags: USHORT, - pub TargetDeviceObject: PDEVICE_OBJECT, -} -#[test] -fn bindgen_test_layout__IO_CREATE_STREAM_FILE_OPTIONS() { - const UNINIT: ::core::mem::MaybeUninit<_IO_CREATE_STREAM_FILE_OPTIONS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_CREATE_STREAM_FILE_OPTIONS>(), - 16usize, - concat!("Size of: ", stringify!(_IO_CREATE_STREAM_FILE_OPTIONS)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_CREATE_STREAM_FILE_OPTIONS>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_CREATE_STREAM_FILE_OPTIONS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_CREATE_STREAM_FILE_OPTIONS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_IO_CREATE_STREAM_FILE_OPTIONS), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetDeviceObject) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_CREATE_STREAM_FILE_OPTIONS), - "::", - stringify!(TargetDeviceObject), - ), - ); -} -impl Default for _IO_CREATE_STREAM_FILE_OPTIONS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_CREATE_STREAM_FILE_OPTIONS = _IO_CREATE_STREAM_FILE_OPTIONS; -pub type PIO_CREATE_STREAM_FILE_OPTIONS = *mut _IO_CREATE_STREAM_FILE_OPTIONS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_PRIORITY_INFO { - pub Size: ULONG, - pub ThreadPriority: ULONG, - pub PagePriority: ULONG, - pub IoPriority: IO_PRIORITY_HINT, -} -#[test] -fn bindgen_test_layout__IO_PRIORITY_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_IO_PRIORITY_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_PRIORITY_INFO>(), - 16usize, - concat!("Size of: ", stringify!(_IO_PRIORITY_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_PRIORITY_INFO>(), - 4usize, - concat!("Alignment of ", stringify!(_IO_PRIORITY_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_PRIORITY_INFO), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ThreadPriority) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_PRIORITY_INFO), - "::", - stringify!(ThreadPriority), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PagePriority) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_PRIORITY_INFO), - "::", - stringify!(PagePriority), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoPriority) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_IO_PRIORITY_INFO), - "::", - stringify!(IoPriority), - ), - ); -} -impl Default for _IO_PRIORITY_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_PRIORITY_INFO = _IO_PRIORITY_INFO; -pub type PIO_PRIORITY_INFO = *mut _IO_PRIORITY_INFO; -pub type PIO_IRP_EXT_PROCESS_TRACKED_OFFSET_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - SourceContext: *mut _IO_IRP_EXT_TRACK_OFFSET_HEADER, - TargetContext: *mut _IO_IRP_EXT_TRACK_OFFSET_HEADER, - RelativeOffset: LONGLONG, - ), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_IRP_EXT_TRACK_OFFSET_HEADER { - pub Validation: USHORT, - pub Flags: USHORT, - pub TrackedOffsetCallback: PIO_IRP_EXT_PROCESS_TRACKED_OFFSET_CALLBACK, -} -#[test] -fn bindgen_test_layout__IO_IRP_EXT_TRACK_OFFSET_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_IO_IRP_EXT_TRACK_OFFSET_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_IRP_EXT_TRACK_OFFSET_HEADER>(), - 16usize, - concat!("Size of: ", stringify!(_IO_IRP_EXT_TRACK_OFFSET_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_IRP_EXT_TRACK_OFFSET_HEADER>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_IRP_EXT_TRACK_OFFSET_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Validation) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_IRP_EXT_TRACK_OFFSET_HEADER), - "::", - stringify!(Validation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_IO_IRP_EXT_TRACK_OFFSET_HEADER), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TrackedOffsetCallback) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_IRP_EXT_TRACK_OFFSET_HEADER), - "::", - stringify!(TrackedOffsetCallback), - ), - ); -} -pub type IO_IRP_EXT_TRACK_OFFSET_HEADER = _IO_IRP_EXT_TRACK_OFFSET_HEADER; -pub type PIO_IRP_EXT_TRACK_OFFSET_HEADER = *mut _IO_IRP_EXT_TRACK_OFFSET_HEADER; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _COPY_INFORMATION { - pub SourceFileObject: PFILE_OBJECT, - pub SourceFileOffset: LONGLONG, -} -#[test] -fn bindgen_test_layout__COPY_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_COPY_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_COPY_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_COPY_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_COPY_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_COPY_INFORMATION)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceFileObject) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_COPY_INFORMATION), - "::", - stringify!(SourceFileObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SourceFileOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_COPY_INFORMATION), - "::", - stringify!(SourceFileOffset), - ), - ); -} -impl Default for _COPY_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type COPY_INFORMATION = _COPY_INFORMATION; -pub type PCOPY_INFORMATION = *mut _COPY_INFORMATION; -pub mod _MMFLUSH_TYPE { - pub type Type = ::core::ffi::c_int; - pub const MmFlushForDelete: Type = 0; - pub const MmFlushForWrite: Type = 1; -} -pub use self::_MMFLUSH_TYPE::Type as MMFLUSH_TYPE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _READ_LIST { - pub FileObject: PFILE_OBJECT, - pub NumberOfEntries: ULONG, - pub IsImage: LOGICAL, - pub List: [FILE_SEGMENT_ELEMENT; 1usize], -} -#[test] -fn bindgen_test_layout__READ_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_READ_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_READ_LIST>(), - 24usize, - concat!("Size of: ", stringify!(_READ_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_READ_LIST>(), - 8usize, - concat!("Alignment of ", stringify!(_READ_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileObject) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_READ_LIST), - "::", - stringify!(FileObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfEntries) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_READ_LIST), - "::", - stringify!(NumberOfEntries), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsImage) as usize - ptr as usize }, - 12usize, - concat!("Offset of field: ", stringify!(_READ_LIST), "::", stringify!(IsImage)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).List) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_READ_LIST), "::", stringify!(List)), - ); -} -impl Default for _READ_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type READ_LIST = _READ_LIST; -pub type PREAD_LIST = *mut _READ_LIST; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _MM_PREFETCH_FLAGS { - pub Flags: _MM_PREFETCH_FLAGS__bindgen_ty_1, - pub AllFlags: ULONG, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _MM_PREFETCH_FLAGS__bindgen_ty_1 { - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__MM_PREFETCH_FLAGS__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::<_MM_PREFETCH_FLAGS__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_MM_PREFETCH_FLAGS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_MM_PREFETCH_FLAGS__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_MM_PREFETCH_FLAGS__bindgen_ty_1)), - ); -} -impl _MM_PREFETCH_FLAGS__bindgen_ty_1 { - #[inline] - pub fn Priority(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u32) } - } - #[inline] - pub fn set_Priority(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn RepurposePriority(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 3u8) as u32) } - } - #[inline] - pub fn set_RepurposePriority(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 3u8, val as u64) - } - } - #[inline] - pub fn PriorityProtection(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_PriorityProtection(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn MustBeZero(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 2u8) as u32) } - } - #[inline] - pub fn set_MustBeZero(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 2u8, val as u64) - } - } - #[inline] - pub fn CannotBeUsedAsFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 23u8) as u32) } - } - #[inline] - pub fn set_CannotBeUsedAsFlags(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(9usize, 23u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Priority: ULONG, - RepurposePriority: ULONG, - PriorityProtection: ULONG, - MustBeZero: ULONG, - CannotBeUsedAsFlags: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let Priority: u32 = unsafe { ::core::mem::transmute(Priority) }; - Priority as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 3u8, - { - let RepurposePriority: u32 = unsafe { - ::core::mem::transmute(RepurposePriority) - }; - RepurposePriority as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 6usize, - 1u8, - { - let PriorityProtection: u32 = unsafe { - ::core::mem::transmute(PriorityProtection) - }; - PriorityProtection as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 7usize, - 2u8, - { - let MustBeZero: u32 = unsafe { ::core::mem::transmute(MustBeZero) }; - MustBeZero as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 9usize, - 23u8, - { - let CannotBeUsedAsFlags: u32 = unsafe { - ::core::mem::transmute(CannotBeUsedAsFlags) - }; - CannotBeUsedAsFlags as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__MM_PREFETCH_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_MM_PREFETCH_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MM_PREFETCH_FLAGS>(), - 4usize, - concat!("Size of: ", stringify!(_MM_PREFETCH_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_MM_PREFETCH_FLAGS>(), - 4usize, - concat!("Alignment of ", stringify!(_MM_PREFETCH_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MM_PREFETCH_FLAGS), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MM_PREFETCH_FLAGS), - "::", - stringify!(AllFlags), - ), - ); -} -impl Default for _MM_PREFETCH_FLAGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MM_PREFETCH_FLAGS = _MM_PREFETCH_FLAGS; -pub type PMM_PREFETCH_FLAGS = *mut _MM_PREFETCH_FLAGS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PHYSICAL_MEMORY_RUN { - pub BasePage: PFN_NUMBER, - pub PageCount: PFN_NUMBER, -} -#[test] -fn bindgen_test_layout__PHYSICAL_MEMORY_RUN() { - const UNINIT: ::core::mem::MaybeUninit<_PHYSICAL_MEMORY_RUN> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PHYSICAL_MEMORY_RUN>(), - 16usize, - concat!("Size of: ", stringify!(_PHYSICAL_MEMORY_RUN)), - ); - assert_eq!( - ::core::mem::align_of::<_PHYSICAL_MEMORY_RUN>(), - 8usize, - concat!("Alignment of ", stringify!(_PHYSICAL_MEMORY_RUN)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BasePage) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_MEMORY_RUN), - "::", - stringify!(BasePage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PageCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_MEMORY_RUN), - "::", - stringify!(PageCount), - ), - ); -} -pub type PHYSICAL_MEMORY_RUN = _PHYSICAL_MEMORY_RUN; -pub type PPHYSICAL_MEMORY_RUN = *mut _PHYSICAL_MEMORY_RUN; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PHYSICAL_MEMORY_DESCRIPTOR { - pub NumberOfRuns: ULONG, - pub NumberOfPages: PFN_NUMBER, - pub Run: [PHYSICAL_MEMORY_RUN; 1usize], -} -#[test] -fn bindgen_test_layout__PHYSICAL_MEMORY_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_PHYSICAL_MEMORY_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PHYSICAL_MEMORY_DESCRIPTOR>(), - 32usize, - concat!("Size of: ", stringify!(_PHYSICAL_MEMORY_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_PHYSICAL_MEMORY_DESCRIPTOR>(), - 8usize, - concat!("Alignment of ", stringify!(_PHYSICAL_MEMORY_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfRuns) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_MEMORY_DESCRIPTOR), - "::", - stringify!(NumberOfRuns), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfPages) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_MEMORY_DESCRIPTOR), - "::", - stringify!(NumberOfPages), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Run) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_MEMORY_DESCRIPTOR), - "::", - stringify!(Run), - ), - ); -} -pub type PHYSICAL_MEMORY_DESCRIPTOR = _PHYSICAL_MEMORY_DESCRIPTOR; -pub type PPHYSICAL_MEMORY_DESCRIPTOR = *mut _PHYSICAL_MEMORY_DESCRIPTOR; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _PHYSICAL_EXTENTS_DESCRIPTOR { - pub NumberOfRuns: ULONG, - pub NumberOfValidRuns: ULONG, - pub Run: [PHYSICAL_MEMORY_RUN; 1usize], -} -#[test] -fn bindgen_test_layout__PHYSICAL_EXTENTS_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_PHYSICAL_EXTENTS_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PHYSICAL_EXTENTS_DESCRIPTOR>(), - 24usize, - concat!("Size of: ", stringify!(_PHYSICAL_EXTENTS_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_PHYSICAL_EXTENTS_DESCRIPTOR>(), - 8usize, - concat!("Alignment of ", stringify!(_PHYSICAL_EXTENTS_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfRuns) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_EXTENTS_DESCRIPTOR), - "::", - stringify!(NumberOfRuns), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfValidRuns) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_EXTENTS_DESCRIPTOR), - "::", - stringify!(NumberOfValidRuns), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Run) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PHYSICAL_EXTENTS_DESCRIPTOR), - "::", - stringify!(Run), - ), - ); -} -pub type PHYSICAL_EXTENTS_DESCRIPTOR = _PHYSICAL_EXTENTS_DESCRIPTOR; -pub type PPHYSICAL_EXTENTS_DESCRIPTOR = *mut _PHYSICAL_EXTENTS_DESCRIPTOR; -pub type LBN = ULONG; -pub type PLBN = *mut LBN; -pub type VBN = ULONG; -pub type PVBN = *mut VBN; -pub type OPLOCK = PVOID; -pub type POPLOCK = *mut PVOID; -pub mod _FAST_IO_POSSIBLE { - pub type Type = ::core::ffi::c_int; - pub const FastIoIsNotPossible: Type = 0; - pub const FastIoIsPossible: Type = 1; - pub const FastIoIsQuestionable: Type = 2; -} -pub use self::_FAST_IO_POSSIBLE::Type as FAST_IO_POSSIBLE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FSRTL_COMMON_FCB_HEADER { - pub NodeTypeCode: CSHORT, - pub NodeByteSize: CSHORT, - pub Flags: UCHAR, - pub IsFastIoPossible: UCHAR, - pub Flags2: UCHAR, - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - pub Resource: PERESOURCE, - pub PagingIoResource: PERESOURCE, - pub AllocationSize: LARGE_INTEGER, - pub FileSize: LARGE_INTEGER, - pub ValidDataLength: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FSRTL_COMMON_FCB_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_FSRTL_COMMON_FCB_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSRTL_COMMON_FCB_HEADER>(), - 48usize, - concat!("Size of: ", stringify!(_FSRTL_COMMON_FCB_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_FSRTL_COMMON_FCB_HEADER>(), - 8usize, - concat!("Alignment of ", stringify!(_FSRTL_COMMON_FCB_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NodeTypeCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_COMMON_FCB_HEADER), - "::", - stringify!(NodeTypeCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NodeByteSize) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_COMMON_FCB_HEADER), - "::", - stringify!(NodeByteSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_COMMON_FCB_HEADER), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IsFastIoPossible) as usize - ptr as usize - }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_COMMON_FCB_HEADER), - "::", - stringify!(IsFastIoPossible), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags2) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_COMMON_FCB_HEADER), - "::", - stringify!(Flags2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Resource) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_COMMON_FCB_HEADER), - "::", - stringify!(Resource), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PagingIoResource) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_COMMON_FCB_HEADER), - "::", - stringify!(PagingIoResource), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_COMMON_FCB_HEADER), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileSize) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_COMMON_FCB_HEADER), - "::", - stringify!(FileSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidDataLength) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_COMMON_FCB_HEADER), - "::", - stringify!(ValidDataLength), - ), - ); -} -impl Default for _FSRTL_COMMON_FCB_HEADER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -impl _FSRTL_COMMON_FCB_HEADER { - #[inline] - pub fn Reserved(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } - } - #[inline] - pub fn set_Reserved(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 4u8, val as u64) - } - } - #[inline] - pub fn Version(&self) -> UCHAR { - unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } - } - #[inline] - pub fn set_Version(&mut self, val: UCHAR) { - unsafe { - let val: u8 = ::core::mem::transmute(val); - self._bitfield_1.set(4usize, 4u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - Reserved: UCHAR, - Version: UCHAR, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 4u8, - { - let Reserved: u8 = unsafe { ::core::mem::transmute(Reserved) }; - Reserved as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 4usize, - 4u8, - { - let Version: u8 = unsafe { ::core::mem::transmute(Version) }; - Version as u64 - }, - ); - __bindgen_bitfield_unit - } -} -pub type FSRTL_COMMON_FCB_HEADER = _FSRTL_COMMON_FCB_HEADER; -pub type PFSRTL_COMMON_FCB_HEADER = *mut FSRTL_COMMON_FCB_HEADER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FSRTL_ADVANCED_FCB_HEADER { - pub __bindgen_padding_0: [u64; 6usize], - pub FastMutex: PFAST_MUTEX, - pub FilterContexts: LIST_ENTRY, - pub PushLock: ULONG_PTR, - pub FileContextSupportPointer: *mut PVOID, - pub __bindgen_anon_1: _FSRTL_ADVANCED_FCB_HEADER__bindgen_ty_1, - pub AePushLock: PVOID, - pub BypassIoOpenCount: ULONG, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FSRTL_ADVANCED_FCB_HEADER__bindgen_ty_1 { - pub Oplock: OPLOCK, - pub ReservedForRemote: PVOID, -} -#[test] -fn bindgen_test_layout__FSRTL_ADVANCED_FCB_HEADER__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_FSRTL_ADVANCED_FCB_HEADER__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSRTL_ADVANCED_FCB_HEADER__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_FSRTL_ADVANCED_FCB_HEADER__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FSRTL_ADVANCED_FCB_HEADER__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_FSRTL_ADVANCED_FCB_HEADER__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Oplock) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_ADVANCED_FCB_HEADER__bindgen_ty_1), - "::", - stringify!(Oplock), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReservedForRemote) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_ADVANCED_FCB_HEADER__bindgen_ty_1), - "::", - stringify!(ReservedForRemote), - ), - ); -} -impl Default for _FSRTL_ADVANCED_FCB_HEADER__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FSRTL_ADVANCED_FCB_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_FSRTL_ADVANCED_FCB_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSRTL_ADVANCED_FCB_HEADER>(), - 112usize, - concat!("Size of: ", stringify!(_FSRTL_ADVANCED_FCB_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_FSRTL_ADVANCED_FCB_HEADER>(), - 8usize, - concat!("Alignment of ", stringify!(_FSRTL_ADVANCED_FCB_HEADER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FastMutex) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_ADVANCED_FCB_HEADER), - "::", - stringify!(FastMutex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FilterContexts) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_ADVANCED_FCB_HEADER), - "::", - stringify!(FilterContexts), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PushLock) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_ADVANCED_FCB_HEADER), - "::", - stringify!(PushLock), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FileContextSupportPointer) as usize - - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_ADVANCED_FCB_HEADER), - "::", - stringify!(FileContextSupportPointer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AePushLock) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_ADVANCED_FCB_HEADER), - "::", - stringify!(AePushLock), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).BypassIoOpenCount) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_ADVANCED_FCB_HEADER), - "::", - stringify!(BypassIoOpenCount), - ), - ); -} -impl Default for _FSRTL_ADVANCED_FCB_HEADER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSRTL_ADVANCED_FCB_HEADER = _FSRTL_ADVANCED_FCB_HEADER; -pub type PFSRTL_ADVANCED_FCB_HEADER = *mut FSRTL_ADVANCED_FCB_HEADER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _EOF_WAIT_BLOCK { - pub EofWaitLinks: LIST_ENTRY, - pub Event: KEVENT, -} -#[test] -fn bindgen_test_layout__EOF_WAIT_BLOCK() { - const UNINIT: ::core::mem::MaybeUninit<_EOF_WAIT_BLOCK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_EOF_WAIT_BLOCK>(), - 40usize, - concat!("Size of: ", stringify!(_EOF_WAIT_BLOCK)), - ); - assert_eq!( - ::core::mem::align_of::<_EOF_WAIT_BLOCK>(), - 8usize, - concat!("Alignment of ", stringify!(_EOF_WAIT_BLOCK)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EofWaitLinks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_EOF_WAIT_BLOCK), - "::", - stringify!(EofWaitLinks), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Event) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_EOF_WAIT_BLOCK), - "::", - stringify!(Event), - ), - ); -} -impl Default for _EOF_WAIT_BLOCK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type EOF_WAIT_BLOCK = _EOF_WAIT_BLOCK; -pub type PEOF_WAIT_BLOCK = *mut EOF_WAIT_BLOCK; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FSRTL_AUXILIARY_BUFFER { - pub Buffer: PVOID, - pub Length: ULONG, - pub Flags: ULONG, - pub Mdl: PMDL, -} -#[test] -fn bindgen_test_layout__FSRTL_AUXILIARY_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_FSRTL_AUXILIARY_BUFFER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSRTL_AUXILIARY_BUFFER>(), - 24usize, - concat!("Size of: ", stringify!(_FSRTL_AUXILIARY_BUFFER)), - ); - assert_eq!( - ::core::mem::align_of::<_FSRTL_AUXILIARY_BUFFER>(), - 8usize, - concat!("Alignment of ", stringify!(_FSRTL_AUXILIARY_BUFFER)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_AUXILIARY_BUFFER), - "::", - stringify!(Buffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_AUXILIARY_BUFFER), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_AUXILIARY_BUFFER), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mdl) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_AUXILIARY_BUFFER), - "::", - stringify!(Mdl), - ), - ); -} -impl Default for _FSRTL_AUXILIARY_BUFFER { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSRTL_AUXILIARY_BUFFER = _FSRTL_AUXILIARY_BUFFER; -pub type PFSRTL_AUXILIARY_BUFFER = *mut FSRTL_AUXILIARY_BUFFER; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_LOCK_INFO { - pub StartingByte: LARGE_INTEGER, - pub Length: LARGE_INTEGER, - pub ExclusiveLock: BOOLEAN, - pub Key: ULONG, - pub FileObject: PFILE_OBJECT, - pub ProcessId: PVOID, - pub EndingByte: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FILE_LOCK_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LOCK_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LOCK_INFO>(), - 48usize, - concat!("Size of: ", stringify!(_FILE_LOCK_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LOCK_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_LOCK_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StartingByte) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LOCK_INFO), - "::", - stringify!(StartingByte), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LOCK_INFO), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExclusiveLock) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LOCK_INFO), - "::", - stringify!(ExclusiveLock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Key) as usize - ptr as usize }, - 20usize, - concat!("Offset of field: ", stringify!(_FILE_LOCK_INFO), "::", stringify!(Key)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileObject) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LOCK_INFO), - "::", - stringify!(FileObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProcessId) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LOCK_INFO), - "::", - stringify!(ProcessId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndingByte) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LOCK_INFO), - "::", - stringify!(EndingByte), - ), - ); -} -impl Default for _FILE_LOCK_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_LOCK_INFO = _FILE_LOCK_INFO; -pub type PFILE_LOCK_INFO = *mut FILE_LOCK_INFO; -pub type PCOMPLETE_LOCK_IRP_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Irp: PIRP) -> NTSTATUS, ->; -pub type PUNLOCK_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, FileLockInfo: PFILE_LOCK_INFO), ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_LOCK { - pub CompleteLockIrpRoutine: PCOMPLETE_LOCK_IRP_ROUTINE, - pub UnlockRoutine: PUNLOCK_ROUTINE, - pub FastIoIsQuestionable: BOOLEAN, - pub SpareC: [BOOLEAN; 3usize], - pub LockInformation: PVOID, - pub LastReturnedLockInfo: FILE_LOCK_INFO, - pub LastReturnedLock: PVOID, - pub LockRequestsInProgress: LONG, -} -#[test] -fn bindgen_test_layout__FILE_LOCK() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_LOCK> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_LOCK>(), - 96usize, - concat!("Size of: ", stringify!(_FILE_LOCK)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_LOCK>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_LOCK)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompleteLockIrpRoutine) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LOCK), - "::", - stringify!(CompleteLockIrpRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UnlockRoutine) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LOCK), - "::", - stringify!(UnlockRoutine), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FastIoIsQuestionable) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LOCK), - "::", - stringify!(FastIoIsQuestionable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SpareC) as usize - ptr as usize }, - 17usize, - concat!("Offset of field: ", stringify!(_FILE_LOCK), "::", stringify!(SpareC)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LockInformation) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LOCK), - "::", - stringify!(LockInformation), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastReturnedLockInfo) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LOCK), - "::", - stringify!(LastReturnedLockInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LastReturnedLock) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LOCK), - "::", - stringify!(LastReturnedLock), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).LockRequestsInProgress) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_FILE_LOCK), - "::", - stringify!(LockRequestsInProgress), - ), - ); -} -impl Default for _FILE_LOCK { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_LOCK = _FILE_LOCK; -pub type PFILE_LOCK = *mut FILE_LOCK; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct TUNNEL { - pub Mutex: FAST_MUTEX, - pub Cache: PRTL_SPLAY_LINKS, - pub TimerQueue: LIST_ENTRY, - pub NumEntries: USHORT, -} -#[test] -fn bindgen_test_layout_TUNNEL() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(TUNNEL)), - ); - assert_eq!( - ::core::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(TUNNEL)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mutex) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(TUNNEL), "::", stringify!(Mutex)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Cache) as usize - ptr as usize }, - 56usize, - concat!("Offset of field: ", stringify!(TUNNEL), "::", stringify!(Cache)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimerQueue) as usize - ptr as usize }, - 64usize, - concat!("Offset of field: ", stringify!(TUNNEL), "::", stringify!(TimerQueue)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumEntries) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(TUNNEL), "::", stringify!(NumEntries)), - ); -} -impl Default for TUNNEL { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PTUNNEL = *mut TUNNEL; -pub mod _FSRTL_COMPARISON_RESULT { - pub type Type = ::core::ffi::c_int; - pub const LessThan: Type = -1; - pub const EqualTo: Type = 0; - pub const GreaterThan: Type = 1; -} -pub use self::_FSRTL_COMPARISON_RESULT::Type as FSRTL_COMPARISON_RESULT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _BASE_MCB { - pub MaximumPairCount: ULONG, - pub PairCount: ULONG, - pub PoolType: USHORT, - pub Flags: USHORT, - pub Mapping: PVOID, -} -#[test] -fn bindgen_test_layout__BASE_MCB() { - const UNINIT: ::core::mem::MaybeUninit<_BASE_MCB> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_BASE_MCB>(), - 24usize, - concat!("Size of: ", stringify!(_BASE_MCB)), - ); - assert_eq!( - ::core::mem::align_of::<_BASE_MCB>(), - 8usize, - concat!("Alignment of ", stringify!(_BASE_MCB)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MaximumPairCount) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_BASE_MCB), - "::", - stringify!(MaximumPairCount), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PairCount) as usize - ptr as usize }, - 4usize, - concat!("Offset of field: ", stringify!(_BASE_MCB), "::", stringify!(PairCount)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PoolType) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_BASE_MCB), "::", stringify!(PoolType)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 10usize, - concat!("Offset of field: ", stringify!(_BASE_MCB), "::", stringify!(Flags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mapping) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_BASE_MCB), "::", stringify!(Mapping)), - ); -} -impl Default for _BASE_MCB { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type BASE_MCB = _BASE_MCB; -pub type PBASE_MCB = *mut _BASE_MCB; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _LARGE_MCB { - pub GuardedMutex: PKGUARDED_MUTEX, - pub BaseMcb: BASE_MCB, -} -#[test] -fn bindgen_test_layout__LARGE_MCB() { - const UNINIT: ::core::mem::MaybeUninit<_LARGE_MCB> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_LARGE_MCB>(), - 32usize, - concat!("Size of: ", stringify!(_LARGE_MCB)), - ); - assert_eq!( - ::core::mem::align_of::<_LARGE_MCB>(), - 8usize, - concat!("Alignment of ", stringify!(_LARGE_MCB)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).GuardedMutex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_LARGE_MCB), - "::", - stringify!(GuardedMutex), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseMcb) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_LARGE_MCB), "::", stringify!(BaseMcb)), - ); -} -impl Default for _LARGE_MCB { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type LARGE_MCB = _LARGE_MCB; -pub type PLARGE_MCB = *mut _LARGE_MCB; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _MCB { - pub DummyFieldThatSizesThisStructureCorrectly: LARGE_MCB, -} -#[test] -fn bindgen_test_layout__MCB() { - const UNINIT: ::core::mem::MaybeUninit<_MCB> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_MCB>(), - 32usize, - concat!("Size of: ", stringify!(_MCB)), - ); - assert_eq!( - ::core::mem::align_of::<_MCB>(), - 8usize, - concat!("Alignment of ", stringify!(_MCB)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DummyFieldThatSizesThisStructureCorrectly) - as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MCB), - "::", - stringify!(DummyFieldThatSizesThisStructureCorrectly), - ), - ); -} -impl Default for _MCB { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type MCB = _MCB; -pub type PMCB = *mut MCB; -pub type POPLOCK_WAIT_COMPLETE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Irp: PIRP), ->; -pub type POPLOCK_FS_PREPOST_IRP = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Irp: PIRP), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _OPLOCK_KEY_ECP_CONTEXT { - pub OplockKey: GUID, - pub Reserved: ULONG, -} -#[test] -fn bindgen_test_layout__OPLOCK_KEY_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_OPLOCK_KEY_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OPLOCK_KEY_ECP_CONTEXT>(), - 20usize, - concat!("Size of: ", stringify!(_OPLOCK_KEY_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_OPLOCK_KEY_ECP_CONTEXT>(), - 4usize, - concat!("Alignment of ", stringify!(_OPLOCK_KEY_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OplockKey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OPLOCK_KEY_ECP_CONTEXT), - "::", - stringify!(OplockKey), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OPLOCK_KEY_ECP_CONTEXT), - "::", - stringify!(Reserved), - ), - ); -} -pub type OPLOCK_KEY_ECP_CONTEXT = _OPLOCK_KEY_ECP_CONTEXT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _DUAL_OPLOCK_KEY_ECP_CONTEXT { - pub ParentOplockKey: GUID, - pub TargetOplockKey: GUID, - pub ParentOplockKeySet: BOOLEAN, - pub TargetOplockKeySet: BOOLEAN, -} -#[test] -fn bindgen_test_layout__DUAL_OPLOCK_KEY_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_DUAL_OPLOCK_KEY_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_DUAL_OPLOCK_KEY_ECP_CONTEXT>(), - 36usize, - concat!("Size of: ", stringify!(_DUAL_OPLOCK_KEY_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_DUAL_OPLOCK_KEY_ECP_CONTEXT>(), - 4usize, - concat!("Alignment of ", stringify!(_DUAL_OPLOCK_KEY_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParentOplockKey) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DUAL_OPLOCK_KEY_ECP_CONTEXT), - "::", - stringify!(ParentOplockKey), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TargetOplockKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DUAL_OPLOCK_KEY_ECP_CONTEXT), - "::", - stringify!(TargetOplockKey), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ParentOplockKeySet) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DUAL_OPLOCK_KEY_ECP_CONTEXT), - "::", - stringify!(ParentOplockKeySet), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetOplockKeySet) as usize - ptr as usize - }, - 33usize, - concat!( - "Offset of field: ", - stringify!(_DUAL_OPLOCK_KEY_ECP_CONTEXT), - "::", - stringify!(TargetOplockKeySet), - ), - ); -} -pub type DUAL_OPLOCK_KEY_ECP_CONTEXT = _DUAL_OPLOCK_KEY_ECP_CONTEXT; -pub type PDUAL_OPLOCK_KEY_ECP_CONTEXT = *mut _DUAL_OPLOCK_KEY_ECP_CONTEXT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _REAL_NOTIFY_SYNC { - _unused: [u8; 0], -} -pub type PNOTIFY_SYNC = *mut _REAL_NOTIFY_SYNC; -pub type PCHECK_FOR_TRAVERSE_ACCESS = ::core::option::Option< - unsafe extern "C" fn( - NotifyContext: PVOID, - TargetContext: PVOID, - SubjectContext: PSECURITY_SUBJECT_CONTEXT, - ) -> BOOLEAN, ->; -pub type PFILTER_REPORT_CHANGE = ::core::option::Option< - unsafe extern "C" fn(NotifyContext: PVOID, FilterContext: PVOID) -> BOOLEAN, ->; -pub type PFSRTL_STACK_OVERFLOW_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Event: PKEVENT), ->; -pub type FSRTL_UNC_PROVIDER_FLAGS = ULONG; -pub type FSRTL_UNC_HARDENING_CAPABILITIES = ULONG; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FSRTL_UNC_PROVIDER_REGISTRATION { - pub Size: USHORT, - pub Version: USHORT, - pub __bindgen_anon_1: _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1, - pub __bindgen_anon_2: _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1 { - pub ProviderFlags: FSRTL_UNC_PROVIDER_FLAGS, - pub __bindgen_anon_1: _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - pub __bindgen_padding_0: [u8; 3usize], -} -#[test] -fn bindgen_test_layout__FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1__bindgen_ty_1), - ), - ); -} -impl _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1__bindgen_ty_1 { - #[inline] - pub fn MailslotsSupported(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_MailslotsSupported(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn CscEnabled(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_CscEnabled(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn DomainSvcAware(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_DomainSvcAware(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn ContainersAware(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_ContainersAware(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - MailslotsSupported: ULONG, - CscEnabled: ULONG, - DomainSvcAware: ULONG, - ContainersAware: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let MailslotsSupported: u32 = unsafe { - ::core::mem::transmute(MailslotsSupported) - }; - MailslotsSupported as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let CscEnabled: u32 = unsafe { ::core::mem::transmute(CscEnabled) }; - CscEnabled as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let DomainSvcAware: u32 = unsafe { - ::core::mem::transmute(DomainSvcAware) - }; - DomainSvcAware as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 1u8, - { - let ContainersAware: u32 = unsafe { - ::core::mem::transmute(ContainersAware) - }; - ContainersAware as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProviderFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1), - "::", - stringify!(ProviderFlags), - ), - ); -} -impl Default for _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2 { - pub HardeningCapabilities: FSRTL_UNC_HARDENING_CAPABILITIES, - pub __bindgen_anon_1: _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2__bindgen_ty_1, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2__bindgen_ty_1 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, - pub __bindgen_padding_0: [u8; 3usize], -} -#[test] -fn bindgen_test_layout__FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::< - _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2__bindgen_ty_1, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2__bindgen_ty_1), - ), - ); -} -impl _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2__bindgen_ty_1 { - #[inline] - pub fn SupportsMutualAuth(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_SupportsMutualAuth(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn SupportsIntegrity(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_SupportsIntegrity(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn SupportsPrivacy(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_SupportsPrivacy(&mut self, val: ULONG) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - SupportsMutualAuth: ULONG, - SupportsIntegrity: ULONG, - SupportsPrivacy: ULONG, - ) -> __BindgenBitfieldUnit<[u8; 1usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 1u8, - { - let SupportsMutualAuth: u32 = unsafe { - ::core::mem::transmute(SupportsMutualAuth) - }; - SupportsMutualAuth as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 1usize, - 1u8, - { - let SupportsIntegrity: u32 = unsafe { - ::core::mem::transmute(SupportsIntegrity) - }; - SupportsIntegrity as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 2usize, - 1u8, - { - let SupportsPrivacy: u32 = unsafe { - ::core::mem::transmute(SupportsPrivacy) - }; - SupportsPrivacy as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2>(), - 4usize, - concat!("Size of: ", stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2)), - ); - assert_eq!( - ::core::mem::align_of::<_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HardeningCapabilities) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2), - "::", - stringify!(HardeningCapabilities), - ), - ); -} -impl Default for _FSRTL_UNC_PROVIDER_REGISTRATION__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__FSRTL_UNC_PROVIDER_REGISTRATION() { - const UNINIT: ::core::mem::MaybeUninit<_FSRTL_UNC_PROVIDER_REGISTRATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSRTL_UNC_PROVIDER_REGISTRATION>(), - 12usize, - concat!("Size of: ", stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION)), - ); - assert_eq!( - ::core::mem::align_of::<_FSRTL_UNC_PROVIDER_REGISTRATION>(), - 4usize, - concat!("Alignment of ", stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_UNC_PROVIDER_REGISTRATION), - "::", - stringify!(Version), - ), - ); -} -impl Default for _FSRTL_UNC_PROVIDER_REGISTRATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSRTL_UNC_PROVIDER_REGISTRATION = _FSRTL_UNC_PROVIDER_REGISTRATION; -pub type PFSRTL_UNC_PROVIDER_REGISTRATION = *mut _FSRTL_UNC_PROVIDER_REGISTRATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _FSRTL_MUP_PROVIDER_INFO_LEVEL_1 { - pub ProviderId: ULONG32, -} -#[test] -fn bindgen_test_layout__FSRTL_MUP_PROVIDER_INFO_LEVEL_1() { - const UNINIT: ::core::mem::MaybeUninit<_FSRTL_MUP_PROVIDER_INFO_LEVEL_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSRTL_MUP_PROVIDER_INFO_LEVEL_1>(), - 4usize, - concat!("Size of: ", stringify!(_FSRTL_MUP_PROVIDER_INFO_LEVEL_1)), - ); - assert_eq!( - ::core::mem::align_of::<_FSRTL_MUP_PROVIDER_INFO_LEVEL_1>(), - 4usize, - concat!("Alignment of ", stringify!(_FSRTL_MUP_PROVIDER_INFO_LEVEL_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProviderId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_MUP_PROVIDER_INFO_LEVEL_1), - "::", - stringify!(ProviderId), - ), - ); -} -pub type FSRTL_MUP_PROVIDER_INFO_LEVEL_1 = _FSRTL_MUP_PROVIDER_INFO_LEVEL_1; -pub type PFSRTL_MUP_PROVIDER_INFO_LEVEL_1 = *mut _FSRTL_MUP_PROVIDER_INFO_LEVEL_1; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FSRTL_MUP_PROVIDER_INFO_LEVEL_2 { - pub ProviderId: ULONG32, - pub ProviderName: UNICODE_STRING, -} -#[test] -fn bindgen_test_layout__FSRTL_MUP_PROVIDER_INFO_LEVEL_2() { - const UNINIT: ::core::mem::MaybeUninit<_FSRTL_MUP_PROVIDER_INFO_LEVEL_2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSRTL_MUP_PROVIDER_INFO_LEVEL_2>(), - 24usize, - concat!("Size of: ", stringify!(_FSRTL_MUP_PROVIDER_INFO_LEVEL_2)), - ); - assert_eq!( - ::core::mem::align_of::<_FSRTL_MUP_PROVIDER_INFO_LEVEL_2>(), - 8usize, - concat!("Alignment of ", stringify!(_FSRTL_MUP_PROVIDER_INFO_LEVEL_2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProviderId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_MUP_PROVIDER_INFO_LEVEL_2), - "::", - stringify!(ProviderId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProviderName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_MUP_PROVIDER_INFO_LEVEL_2), - "::", - stringify!(ProviderName), - ), - ); -} -impl Default for _FSRTL_MUP_PROVIDER_INFO_LEVEL_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSRTL_MUP_PROVIDER_INFO_LEVEL_2 = _FSRTL_MUP_PROVIDER_INFO_LEVEL_2; -pub type PFSRTL_MUP_PROVIDER_INFO_LEVEL_2 = *mut _FSRTL_MUP_PROVIDER_INFO_LEVEL_2; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FSRTL_PER_FILE_CONTEXT { - pub Links: LIST_ENTRY, - pub OwnerId: PVOID, - pub InstanceId: PVOID, - pub FreeCallback: PFREE_FUNCTION, -} -#[test] -fn bindgen_test_layout__FSRTL_PER_FILE_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_FSRTL_PER_FILE_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSRTL_PER_FILE_CONTEXT>(), - 40usize, - concat!("Size of: ", stringify!(_FSRTL_PER_FILE_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_FSRTL_PER_FILE_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_FSRTL_PER_FILE_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Links) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_PER_FILE_CONTEXT), - "::", - stringify!(Links), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OwnerId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_PER_FILE_CONTEXT), - "::", - stringify!(OwnerId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InstanceId) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_PER_FILE_CONTEXT), - "::", - stringify!(InstanceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeCallback) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_PER_FILE_CONTEXT), - "::", - stringify!(FreeCallback), - ), - ); -} -impl Default for _FSRTL_PER_FILE_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSRTL_PER_FILE_CONTEXT = _FSRTL_PER_FILE_CONTEXT; -pub type PFSRTL_PER_FILE_CONTEXT = *mut _FSRTL_PER_FILE_CONTEXT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FSRTL_PER_STREAM_CONTEXT { - pub Links: LIST_ENTRY, - pub OwnerId: PVOID, - pub InstanceId: PVOID, - pub FreeCallback: PFREE_FUNCTION, -} -#[test] -fn bindgen_test_layout__FSRTL_PER_STREAM_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_FSRTL_PER_STREAM_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSRTL_PER_STREAM_CONTEXT>(), - 40usize, - concat!("Size of: ", stringify!(_FSRTL_PER_STREAM_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_FSRTL_PER_STREAM_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_FSRTL_PER_STREAM_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Links) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_PER_STREAM_CONTEXT), - "::", - stringify!(Links), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OwnerId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_PER_STREAM_CONTEXT), - "::", - stringify!(OwnerId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InstanceId) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_PER_STREAM_CONTEXT), - "::", - stringify!(InstanceId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FreeCallback) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_PER_STREAM_CONTEXT), - "::", - stringify!(FreeCallback), - ), - ); -} -impl Default for _FSRTL_PER_STREAM_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSRTL_PER_STREAM_CONTEXT = _FSRTL_PER_STREAM_CONTEXT; -pub type PFSRTL_PER_STREAM_CONTEXT = *mut _FSRTL_PER_STREAM_CONTEXT; -pub type PFN_FSRTLTEARDOWNPERSTREAMCONTEXTS = ::core::option::Option< - unsafe extern "C" fn(AdvancedHeader: PFSRTL_ADVANCED_FCB_HEADER), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _FSRTL_PER_FILEOBJECT_CONTEXT { - pub Links: LIST_ENTRY, - pub OwnerId: PVOID, - pub InstanceId: PVOID, -} -#[test] -fn bindgen_test_layout__FSRTL_PER_FILEOBJECT_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_FSRTL_PER_FILEOBJECT_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FSRTL_PER_FILEOBJECT_CONTEXT>(), - 32usize, - concat!("Size of: ", stringify!(_FSRTL_PER_FILEOBJECT_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_FSRTL_PER_FILEOBJECT_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_FSRTL_PER_FILEOBJECT_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Links) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_PER_FILEOBJECT_CONTEXT), - "::", - stringify!(Links), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OwnerId) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_PER_FILEOBJECT_CONTEXT), - "::", - stringify!(OwnerId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InstanceId) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FSRTL_PER_FILEOBJECT_CONTEXT), - "::", - stringify!(InstanceId), - ), - ); -} -impl Default for _FSRTL_PER_FILEOBJECT_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FSRTL_PER_FILEOBJECT_CONTEXT = _FSRTL_PER_FILEOBJECT_CONTEXT; -pub type PFSRTL_PER_FILEOBJECT_CONTEXT = *mut _FSRTL_PER_FILEOBJECT_CONTEXT; -pub type ECP_LIST = _ECP_LIST; -pub type PECP_LIST = *mut _ECP_LIST; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ECP_HEADER { - _unused: [u8; 0], -} -pub type ECP_HEADER = _ECP_HEADER; -pub type PECP_HEADER = *mut _ECP_HEADER; -pub type PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(EcpContext: PVOID, EcpType: LPCGUID), ->; -pub type FSRTL_ALLOCATE_ECPLIST_FLAGS = ULONG; -pub type FSRTL_ALLOCATE_ECP_FLAGS = ULONG; -pub type FSRTL_ECP_LOOKASIDE_FLAGS = ULONG; -pub mod NETWORK_OPEN_LOCATION_QUALIFIER { - pub type Type = ::core::ffi::c_int; - pub const NetworkOpenLocationAny: Type = 0; - pub const NetworkOpenLocationRemote: Type = 1; - pub const NetworkOpenLocationLoopback: Type = 2; -} -pub mod NETWORK_OPEN_INTEGRITY_QUALIFIER { - pub type Type = ::core::ffi::c_int; - pub const NetworkOpenIntegrityAny: Type = 0; - pub const NetworkOpenIntegrityNone: Type = 1; - pub const NetworkOpenIntegritySigned: Type = 2; - pub const NetworkOpenIntegrityEncrypted: Type = 3; - pub const NetworkOpenIntegrityMaximum: Type = 4; -} -pub type NETWORK_OPEN_IN_FLAGS = ULONG; -pub type NETWORK_OPEN_OUT_FLAGS = ULONG; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _NETWORK_OPEN_ECP_CONTEXT { - pub Size: USHORT, - pub Reserved: USHORT, - pub __bindgen_anon_1: _NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1 { - pub in_: _NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_1, - pub out: _NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_1 { - pub Location: NETWORK_OPEN_LOCATION_QUALIFIER::Type, - pub Integrity: NETWORK_OPEN_INTEGRITY_QUALIFIER::Type, - pub Flags: NETWORK_OPEN_IN_FLAGS, -} -#[test] -fn bindgen_test_layout__NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 12usize, - concat!( - "Size of: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Location) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Location), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Integrity) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Integrity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_2 { - pub Location: NETWORK_OPEN_LOCATION_QUALIFIER::Type, - pub Integrity: NETWORK_OPEN_INTEGRITY_QUALIFIER::Type, - pub Flags: NETWORK_OPEN_OUT_FLAGS, -} -#[test] -fn bindgen_test_layout__NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_2>(), - 12usize, - concat!( - "Size of: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::<_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_2>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Location) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Location), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Integrity) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Integrity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1>(), - 24usize, - concat!("Size of: ", stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).in_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1), - "::", - stringify!(in_), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).out) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1), - "::", - stringify!(out), - ), - ); -} -impl Default for _NETWORK_OPEN_ECP_CONTEXT__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__NETWORK_OPEN_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_NETWORK_OPEN_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NETWORK_OPEN_ECP_CONTEXT>(), - 28usize, - concat!("Size of: ", stringify!(_NETWORK_OPEN_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_NETWORK_OPEN_ECP_CONTEXT>(), - 4usize, - concat!("Alignment of ", stringify!(_NETWORK_OPEN_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _NETWORK_OPEN_ECP_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type NETWORK_OPEN_ECP_CONTEXT = _NETWORK_OPEN_ECP_CONTEXT; -pub type PNETWORK_OPEN_ECP_CONTEXT = *mut _NETWORK_OPEN_ECP_CONTEXT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _NETWORK_OPEN_ECP_CONTEXT_V0 { - pub Size: USHORT, - pub Reserved: USHORT, - pub __bindgen_anon_1: _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1 { - pub in_: _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_1, - pub out: _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_1 { - pub Location: NETWORK_OPEN_LOCATION_QUALIFIER::Type, - pub Integrity: NETWORK_OPEN_INTEGRITY_QUALIFIER::Type, -} -#[test] -fn bindgen_test_layout__NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Location) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Location), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Integrity) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Integrity), - ), - ); -} -impl Default for _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_2 { - pub Location: NETWORK_OPEN_LOCATION_QUALIFIER::Type, - pub Integrity: NETWORK_OPEN_INTEGRITY_QUALIFIER::Type, -} -#[test] -fn bindgen_test_layout__NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_2, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Location) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Location), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Integrity) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Integrity), - ), - ); -} -impl Default for _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).in_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1), - "::", - stringify!(in_), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).out) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1), - "::", - stringify!(out), - ), - ); -} -impl Default for _NETWORK_OPEN_ECP_CONTEXT_V0__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__NETWORK_OPEN_ECP_CONTEXT_V0() { - const UNINIT: ::core::mem::MaybeUninit<_NETWORK_OPEN_ECP_CONTEXT_V0> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NETWORK_OPEN_ECP_CONTEXT_V0>(), - 20usize, - concat!("Size of: ", stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0)), - ); - assert_eq!( - ::core::mem::align_of::<_NETWORK_OPEN_ECP_CONTEXT_V0>(), - 4usize, - concat!("Alignment of ", stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_OPEN_ECP_CONTEXT_V0), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _NETWORK_OPEN_ECP_CONTEXT_V0 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type NETWORK_OPEN_ECP_CONTEXT_V0 = _NETWORK_OPEN_ECP_CONTEXT_V0; -pub type PNETWORK_OPEN_ECP_CONTEXT_V0 = *mut _NETWORK_OPEN_ECP_CONTEXT_V0; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NETWORK_APP_INSTANCE_ECP_CONTEXT { - pub Size: USHORT, - pub Reserved: USHORT, - pub AppInstanceID: GUID, -} -#[test] -fn bindgen_test_layout__NETWORK_APP_INSTANCE_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_NETWORK_APP_INSTANCE_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NETWORK_APP_INSTANCE_ECP_CONTEXT>(), - 20usize, - concat!("Size of: ", stringify!(_NETWORK_APP_INSTANCE_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_NETWORK_APP_INSTANCE_ECP_CONTEXT>(), - 4usize, - concat!("Alignment of ", stringify!(_NETWORK_APP_INSTANCE_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_APP_INSTANCE_ECP_CONTEXT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_APP_INSTANCE_ECP_CONTEXT), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AppInstanceID) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_APP_INSTANCE_ECP_CONTEXT), - "::", - stringify!(AppInstanceID), - ), - ); -} -pub type NETWORK_APP_INSTANCE_ECP_CONTEXT = _NETWORK_APP_INSTANCE_ECP_CONTEXT; -pub type PNETWORK_APP_INSTANCE_ECP_CONTEXT = *mut _NETWORK_APP_INSTANCE_ECP_CONTEXT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT { - pub Size: USHORT, - pub Reserved: USHORT, - pub VersionHigh: UINT64, - pub VersionLow: UINT64, -} -#[test] -fn bindgen_test_layout__NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT>(), - 24usize, - concat!("Size of: ", stringify!(_NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VersionHigh) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT), - "::", - stringify!(VersionHigh), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VersionLow) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT), - "::", - stringify!(VersionLow), - ), - ); -} -pub type NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT = _NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT; -pub type PNETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT = *mut _NETWORK_APP_INSTANCE_VERSION_ECP_CONTEXT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PREFETCH_OPEN_ECP_CONTEXT { - pub Context: PVOID, -} -#[test] -fn bindgen_test_layout__PREFETCH_OPEN_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_PREFETCH_OPEN_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PREFETCH_OPEN_ECP_CONTEXT>(), - 8usize, - concat!("Size of: ", stringify!(_PREFETCH_OPEN_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_PREFETCH_OPEN_ECP_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_PREFETCH_OPEN_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PREFETCH_OPEN_ECP_CONTEXT), - "::", - stringify!(Context), - ), - ); -} -impl Default for _PREFETCH_OPEN_ECP_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PREFETCH_OPEN_ECP_CONTEXT = _PREFETCH_OPEN_ECP_CONTEXT; -pub type PPREFETCH_OPEN_ECP_CONTEXT = *mut _PREFETCH_OPEN_ECP_CONTEXT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sockaddr_storage { - _unused: [u8; 0], -} -pub type PSOCKADDR_STORAGE_NFS = *mut sockaddr_storage; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _NFS_OPEN_ECP_CONTEXT { - pub ExportAlias: PUNICODE_STRING, - pub ClientSocketAddress: PSOCKADDR_STORAGE_NFS, -} -#[test] -fn bindgen_test_layout__NFS_OPEN_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_NFS_OPEN_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_NFS_OPEN_ECP_CONTEXT>(), - 16usize, - concat!("Size of: ", stringify!(_NFS_OPEN_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_NFS_OPEN_ECP_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_NFS_OPEN_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExportAlias) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_NFS_OPEN_ECP_CONTEXT), - "::", - stringify!(ExportAlias), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClientSocketAddress) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_NFS_OPEN_ECP_CONTEXT), - "::", - stringify!(ClientSocketAddress), - ), - ); -} -impl Default for _NFS_OPEN_ECP_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type NFS_OPEN_ECP_CONTEXT = _NFS_OPEN_ECP_CONTEXT; -pub type PNFS_OPEN_ECP_CONTEXT = *mut _NFS_OPEN_ECP_CONTEXT; -pub type PPNFS_OPEN_ECP_CONTEXT = *mut *mut _NFS_OPEN_ECP_CONTEXT; -pub mod _SRV_INSTANCE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const SrvInstanceTypeUndefined: Type = 0; - pub const SrvInstanceTypePrimary: Type = 1; - pub const SrvInstanceTypeCsv: Type = 2; - pub const SrvInstanceTypeSBL: Type = 3; - pub const SrvInstanceTypeSR: Type = 4; - pub const SrvInstanceTypeVSMB: Type = 5; -} -pub use self::_SRV_INSTANCE_TYPE::Type as SRV_INSTANCE_TYPE; -pub type PSRV_INSTANCE_TYPE = *mut _SRV_INSTANCE_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SRV_OPEN_ECP_CONTEXT { - pub ShareName: PUNICODE_STRING, - pub SocketAddress: PSOCKADDR_STORAGE_NFS, - pub OplockBlockState: BOOLEAN, - pub OplockAppState: BOOLEAN, - pub OplockFinalState: BOOLEAN, - pub Version: USHORT, - pub InstanceType: SRV_INSTANCE_TYPE, -} -#[test] -fn bindgen_test_layout__SRV_OPEN_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_SRV_OPEN_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SRV_OPEN_ECP_CONTEXT>(), - 32usize, - concat!("Size of: ", stringify!(_SRV_OPEN_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_SRV_OPEN_ECP_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_SRV_OPEN_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShareName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SRV_OPEN_ECP_CONTEXT), - "::", - stringify!(ShareName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SocketAddress) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SRV_OPEN_ECP_CONTEXT), - "::", - stringify!(SocketAddress), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OplockBlockState) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SRV_OPEN_ECP_CONTEXT), - "::", - stringify!(OplockBlockState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OplockAppState) as usize - ptr as usize }, - 17usize, - concat!( - "Offset of field: ", - stringify!(_SRV_OPEN_ECP_CONTEXT), - "::", - stringify!(OplockAppState), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OplockFinalState) as usize - ptr as usize - }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_SRV_OPEN_ECP_CONTEXT), - "::", - stringify!(OplockFinalState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_SRV_OPEN_ECP_CONTEXT), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InstanceType) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SRV_OPEN_ECP_CONTEXT), - "::", - stringify!(InstanceType), - ), - ); -} -impl Default for _SRV_OPEN_ECP_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SRV_OPEN_ECP_CONTEXT = _SRV_OPEN_ECP_CONTEXT; -pub type PSRV_OPEN_ECP_CONTEXT = *mut _SRV_OPEN_ECP_CONTEXT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _RKF_BYPASS_ECP_CONTEXT { - pub Reserved: INT, - pub Version: INT, -} -#[test] -fn bindgen_test_layout__RKF_BYPASS_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_RKF_BYPASS_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_RKF_BYPASS_ECP_CONTEXT>(), - 8usize, - concat!("Size of: ", stringify!(_RKF_BYPASS_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_RKF_BYPASS_ECP_CONTEXT>(), - 4usize, - concat!("Alignment of ", stringify!(_RKF_BYPASS_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_RKF_BYPASS_ECP_CONTEXT), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_RKF_BYPASS_ECP_CONTEXT), - "::", - stringify!(Version), - ), - ); -} -pub type RKF_BYPASS_ECP_CONTEXT = _RKF_BYPASS_ECP_CONTEXT; -pub type PRKF_BYPASS_ECP_CONTEXT = *mut _RKF_BYPASS_ECP_CONTEXT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_DEVICE_HINT_ECP_CONTEXT { - pub TargetDevice: PDEVICE_OBJECT, - pub RemainingName: UNICODE_STRING, -} -#[test] -fn bindgen_test_layout__IO_DEVICE_HINT_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_IO_DEVICE_HINT_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_DEVICE_HINT_ECP_CONTEXT>(), - 24usize, - concat!("Size of: ", stringify!(_IO_DEVICE_HINT_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_DEVICE_HINT_ECP_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_DEVICE_HINT_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TargetDevice) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_DEVICE_HINT_ECP_CONTEXT), - "::", - stringify!(TargetDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RemainingName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_DEVICE_HINT_ECP_CONTEXT), - "::", - stringify!(RemainingName), - ), - ); -} -impl Default for _IO_DEVICE_HINT_ECP_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type IO_DEVICE_HINT_ECP_CONTEXT = _IO_DEVICE_HINT_ECP_CONTEXT; -pub type PIO_DEVICE_HINT_ECP_CONTEXT = *mut _IO_DEVICE_HINT_ECP_CONTEXT; -pub mod _CSV_DOWN_LEVEL_FILE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const CsvDownLevelFileObject: Type = 0; - pub const CsvCsvFsInternalFileObject: Type = 1; -} -pub use self::_CSV_DOWN_LEVEL_FILE_TYPE::Type as CSV_DOWN_LEVEL_FILE_TYPE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT { - pub Version: ULONG, - pub IsResume: BOOLEAN, - pub FileType: CSV_DOWN_LEVEL_FILE_TYPE, - pub SourceNodeId: ULONG, - pub DestinationNodeId: ULONG, -} -#[test] -fn bindgen_test_layout__CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT>(), - 20usize, - concat!("Size of: ", stringify!(_CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT>(), - 4usize, - concat!("Alignment of ", stringify!(_CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IsResume) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT), - "::", - stringify!(IsResume), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileType) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT), - "::", - stringify!(FileType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SourceNodeId) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT), - "::", - stringify!(SourceNodeId), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DestinationNodeId) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT), - "::", - stringify!(DestinationNodeId), - ), - ); -} -impl Default for _CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT = _CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT; -pub type PCSV_DOWN_LEVEL_OPEN_ECP_CONTEXT = *mut _CSV_DOWN_LEVEL_OPEN_ECP_CONTEXT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CSV_QUERY_FILE_REVISION_ECP_CONTEXT { - pub FileId: LONGLONG, - pub FileRevision: [LONGLONG; 3usize], -} -#[test] -fn bindgen_test_layout__CSV_QUERY_FILE_REVISION_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_QUERY_FILE_REVISION_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_QUERY_FILE_REVISION_ECP_CONTEXT>(), - 32usize, - concat!("Size of: ", stringify!(_CSV_QUERY_FILE_REVISION_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_QUERY_FILE_REVISION_ECP_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_CSV_QUERY_FILE_REVISION_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_FILE_REVISION_ECP_CONTEXT), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileRevision) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_FILE_REVISION_ECP_CONTEXT), - "::", - stringify!(FileRevision), - ), - ); -} -pub type CSV_QUERY_FILE_REVISION_ECP_CONTEXT = _CSV_QUERY_FILE_REVISION_ECP_CONTEXT; -pub type PCSV_QUERY_FILE_REVISION_ECP_CONTEXT = *mut _CSV_QUERY_FILE_REVISION_ECP_CONTEXT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128 { - pub FileId: FILE_ID_128, - pub FileRevision: [LONGLONG; 3usize], -} -#[test] -fn bindgen_test_layout__CSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128() { - const UNINIT: ::core::mem::MaybeUninit< - _CSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128>(), - 40usize, - concat!( - "Size of: ", - stringify!(_CSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128), - ), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_CSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileRevision) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128), - "::", - stringify!(FileRevision), - ), - ); -} -pub type CSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128 = _CSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128; -pub type PCSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128 = *mut _CSV_QUERY_FILE_REVISION_ECP_CONTEXT_FILE_ID_128; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT { - pub Size: SIZE_T, - pub PauseTimeoutInSeconds: ULONG, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT>(), - 16usize, - concat!("Size of: ", stringify!(_CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PauseTimeoutInSeconds) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT), - "::", - stringify!(PauseTimeoutInSeconds), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT), - "::", - stringify!(Flags), - ), - ); -} -pub type CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT = _CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT; -pub type PCSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT = *mut _CSV_SET_HANDLE_PROPERTIES_ECP_CONTEXT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OPEN_REPARSE_LIST_ENTRY { - pub OpenReparseListEntry: LIST_ENTRY, - pub ReparseTag: ULONG, - pub Flags: ULONG, - pub ReparseGuid: GUID, - pub Size: USHORT, - pub RemainingLength: USHORT, -} -#[test] -fn bindgen_test_layout__OPEN_REPARSE_LIST_ENTRY() { - const UNINIT: ::core::mem::MaybeUninit<_OPEN_REPARSE_LIST_ENTRY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OPEN_REPARSE_LIST_ENTRY>(), - 48usize, - concat!("Size of: ", stringify!(_OPEN_REPARSE_LIST_ENTRY)), - ); - assert_eq!( - ::core::mem::align_of::<_OPEN_REPARSE_LIST_ENTRY>(), - 8usize, - concat!("Alignment of ", stringify!(_OPEN_REPARSE_LIST_ENTRY)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OpenReparseListEntry) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OPEN_REPARSE_LIST_ENTRY), - "::", - stringify!(OpenReparseListEntry), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparseTag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OPEN_REPARSE_LIST_ENTRY), - "::", - stringify!(ReparseTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_OPEN_REPARSE_LIST_ENTRY), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparseGuid) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_OPEN_REPARSE_LIST_ENTRY), - "::", - stringify!(ReparseGuid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_OPEN_REPARSE_LIST_ENTRY), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RemainingLength) as usize - ptr as usize }, - 42usize, - concat!( - "Offset of field: ", - stringify!(_OPEN_REPARSE_LIST_ENTRY), - "::", - stringify!(RemainingLength), - ), - ); -} -impl Default for _OPEN_REPARSE_LIST_ENTRY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OPEN_REPARSE_LIST_ENTRY = _OPEN_REPARSE_LIST_ENTRY; -pub type POPEN_REPARSE_LIST_ENTRY = *mut _OPEN_REPARSE_LIST_ENTRY; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OPEN_REPARSE_LIST { - pub OpenReparseList: LIST_ENTRY, -} -#[test] -fn bindgen_test_layout__OPEN_REPARSE_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_OPEN_REPARSE_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OPEN_REPARSE_LIST>(), - 16usize, - concat!("Size of: ", stringify!(_OPEN_REPARSE_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_OPEN_REPARSE_LIST>(), - 8usize, - concat!("Alignment of ", stringify!(_OPEN_REPARSE_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OpenReparseList) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OPEN_REPARSE_LIST), - "::", - stringify!(OpenReparseList), - ), - ); -} -impl Default for _OPEN_REPARSE_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OPEN_REPARSE_LIST = _OPEN_REPARSE_LIST; -pub type POPEN_REPARSE_LIST = *mut _OPEN_REPARSE_LIST; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_STOP_ON_SYMLINK_FILTER_ECP_v0 { - pub Out: _IO_STOP_ON_SYMLINK_FILTER_ECP_v0__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IO_STOP_ON_SYMLINK_FILTER_ECP_v0__bindgen_ty_1 { - pub ReparseCount: ULONG, - pub RemainingPathLength: ULONG, -} -#[test] -fn bindgen_test_layout__IO_STOP_ON_SYMLINK_FILTER_ECP_v0__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _IO_STOP_ON_SYMLINK_FILTER_ECP_v0__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STOP_ON_SYMLINK_FILTER_ECP_v0__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_IO_STOP_ON_SYMLINK_FILTER_ECP_v0__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STOP_ON_SYMLINK_FILTER_ECP_v0__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_IO_STOP_ON_SYMLINK_FILTER_ECP_v0__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparseCount) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STOP_ON_SYMLINK_FILTER_ECP_v0__bindgen_ty_1), - "::", - stringify!(ReparseCount), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RemainingPathLength) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_IO_STOP_ON_SYMLINK_FILTER_ECP_v0__bindgen_ty_1), - "::", - stringify!(RemainingPathLength), - ), - ); -} -#[test] -fn bindgen_test_layout__IO_STOP_ON_SYMLINK_FILTER_ECP_v0() { - const UNINIT: ::core::mem::MaybeUninit<_IO_STOP_ON_SYMLINK_FILTER_ECP_v0> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_IO_STOP_ON_SYMLINK_FILTER_ECP_v0>(), - 8usize, - concat!("Size of: ", stringify!(_IO_STOP_ON_SYMLINK_FILTER_ECP_v0)), - ); - assert_eq!( - ::core::mem::align_of::<_IO_STOP_ON_SYMLINK_FILTER_ECP_v0>(), - 4usize, - concat!("Alignment of ", stringify!(_IO_STOP_ON_SYMLINK_FILTER_ECP_v0)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Out) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_STOP_ON_SYMLINK_FILTER_ECP_v0), - "::", - stringify!(Out), - ), - ); -} -pub type IO_STOP_ON_SYMLINK_FILTER_ECP_v0 = _IO_STOP_ON_SYMLINK_FILTER_ECP_v0; -pub type PIO_STOP_ON_SYMLINK_FILTER_ECP_v0 = *mut _IO_STOP_ON_SYMLINK_FILTER_ECP_v0; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CREATE_REDIRECTION_ECP_CONTEXT { - pub Size: USHORT, - pub Flags: USHORT, - pub FileId: FILE_ID_128, - pub VolumeGuid: GUID, -} -#[test] -fn bindgen_test_layout__CREATE_REDIRECTION_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_CREATE_REDIRECTION_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CREATE_REDIRECTION_ECP_CONTEXT>(), - 36usize, - concat!("Size of: ", stringify!(_CREATE_REDIRECTION_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_CREATE_REDIRECTION_ECP_CONTEXT>(), - 4usize, - concat!("Alignment of ", stringify!(_CREATE_REDIRECTION_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CREATE_REDIRECTION_ECP_CONTEXT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CREATE_REDIRECTION_ECP_CONTEXT), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CREATE_REDIRECTION_ECP_CONTEXT), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VolumeGuid) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_CREATE_REDIRECTION_ECP_CONTEXT), - "::", - stringify!(VolumeGuid), - ), - ); -} -pub type CREATE_REDIRECTION_ECP_CONTEXT = _CREATE_REDIRECTION_ECP_CONTEXT; -pub type PCREATE_REDIRECTION_ECP_CONTEXT = *mut _CREATE_REDIRECTION_ECP_CONTEXT; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _FILE_TIMESTAMPS { - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__FILE_TIMESTAMPS() { - const UNINIT: ::core::mem::MaybeUninit<_FILE_TIMESTAMPS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_FILE_TIMESTAMPS>(), - 32usize, - concat!("Size of: ", stringify!(_FILE_TIMESTAMPS)), - ); - assert_eq!( - ::core::mem::align_of::<_FILE_TIMESTAMPS>(), - 8usize, - concat!("Alignment of ", stringify!(_FILE_TIMESTAMPS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_FILE_TIMESTAMPS), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_FILE_TIMESTAMPS), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_FILE_TIMESTAMPS), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_FILE_TIMESTAMPS), - "::", - stringify!(ChangeTime), - ), - ); -} -impl Default for _FILE_TIMESTAMPS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type FILE_TIMESTAMPS = _FILE_TIMESTAMPS; -pub type PFILE_TIMESTAMPS = *mut _FILE_TIMESTAMPS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ATOMIC_CREATE_ECP_CONTEXT { - pub Size: USHORT, - pub InFlags: USHORT, - pub OutFlags: USHORT, - pub ReparseBufferLength: USHORT, - pub ReparseBuffer: PREPARSE_DATA_BUFFER, - pub FileSize: LONGLONG, - pub ValidDataLength: LONGLONG, - pub FileTimestamps: PFILE_TIMESTAMPS, - pub FileAttributes: ULONG, - pub UsnSourceInfo: ULONG, - pub Usn: USN, - pub SuppressFileAttributeInheritanceMask: ULONG, - pub InOpFlags: ULONG, - pub OutOpFlags: ULONG, - pub InGenFlags: ULONG, - pub OutGenFlags: ULONG, - pub CaseSensitiveFlagsMask: ULONG, - pub InCaseSensitiveFlags: ULONG, - pub OutCaseSensitiveFlags: ULONG, -} -#[test] -fn bindgen_test_layout__ATOMIC_CREATE_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_ATOMIC_CREATE_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ATOMIC_CREATE_ECP_CONTEXT>(), - 88usize, - concat!("Size of: ", stringify!(_ATOMIC_CREATE_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_ATOMIC_CREATE_ECP_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_ATOMIC_CREATE_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InFlags) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(InFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OutFlags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(OutFlags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReparseBufferLength) as usize - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(ReparseBufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparseBuffer) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(ReparseBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileSize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(FileSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidDataLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(ValidDataLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileTimestamps) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(FileTimestamps), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UsnSourceInfo) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(UsnSourceInfo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Usn) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(Usn), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SuppressFileAttributeInheritanceMask) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(SuppressFileAttributeInheritanceMask), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InOpFlags) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(InOpFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OutOpFlags) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(OutOpFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InGenFlags) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(InGenFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OutGenFlags) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(OutGenFlags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CaseSensitiveFlagsMask) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(CaseSensitiveFlagsMask), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InCaseSensitiveFlags) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(InCaseSensitiveFlags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OutCaseSensitiveFlags) as usize - ptr as usize - }, - 84usize, - concat!( - "Offset of field: ", - stringify!(_ATOMIC_CREATE_ECP_CONTEXT), - "::", - stringify!(OutCaseSensitiveFlags), - ), - ); -} -impl Default for _ATOMIC_CREATE_ECP_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type ATOMIC_CREATE_ECP_CONTEXT = _ATOMIC_CREATE_ECP_CONTEXT; -pub type PATOMIC_CREATE_ECP_CONTEXT = *mut _ATOMIC_CREATE_ECP_CONTEXT; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ECP_OPEN_PARAMETERS { - pub Size: USHORT, - pub Reserved: USHORT, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__ECP_OPEN_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_ECP_OPEN_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_ECP_OPEN_PARAMETERS>(), - 8usize, - concat!("Size of: ", stringify!(_ECP_OPEN_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_ECP_OPEN_PARAMETERS>(), - 4usize, - concat!("Alignment of ", stringify!(_ECP_OPEN_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ECP_OPEN_PARAMETERS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_ECP_OPEN_PARAMETERS), - "::", - stringify!(Reserved), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ECP_OPEN_PARAMETERS), - "::", - stringify!(Flags), - ), - ); -} -pub type ECP_OPEN_PARAMETERS = _ECP_OPEN_PARAMETERS; -pub type PECP_OPEN_PARAMETERS = *mut _ECP_OPEN_PARAMETERS; -pub mod OPLOCK_NOTIFY_REASON { - pub type Type = ::core::ffi::c_int; - pub const OPLOCK_NOTIFY_BREAK_WAIT_INTERIM_TIMEOUT: Type = 0; - pub const OPLOCK_NOTIFY_BREAK_WAIT_TERMINATED: Type = 1; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _OPLOCK_NOTIFY_PARAMS { - pub NotifyReason: OPLOCK_NOTIFY_REASON::Type, - pub NotifyContext: PVOID, - pub Irp: PIRP, - pub Status: NTSTATUS, -} -#[test] -fn bindgen_test_layout__OPLOCK_NOTIFY_PARAMS() { - const UNINIT: ::core::mem::MaybeUninit<_OPLOCK_NOTIFY_PARAMS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_OPLOCK_NOTIFY_PARAMS>(), - 32usize, - concat!("Size of: ", stringify!(_OPLOCK_NOTIFY_PARAMS)), - ); - assert_eq!( - ::core::mem::align_of::<_OPLOCK_NOTIFY_PARAMS>(), - 8usize, - concat!("Alignment of ", stringify!(_OPLOCK_NOTIFY_PARAMS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NotifyReason) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OPLOCK_NOTIFY_PARAMS), - "::", - stringify!(NotifyReason), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NotifyContext) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_OPLOCK_NOTIFY_PARAMS), - "::", - stringify!(NotifyContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Irp) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_OPLOCK_NOTIFY_PARAMS), - "::", - stringify!(Irp), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_OPLOCK_NOTIFY_PARAMS), - "::", - stringify!(Status), - ), - ); -} -impl Default for _OPLOCK_NOTIFY_PARAMS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type OPLOCK_NOTIFY_PARAMS = _OPLOCK_NOTIFY_PARAMS; -pub type POPLOCK_NOTIFY_PARAMS = *mut _OPLOCK_NOTIFY_PARAMS; -pub type POPLOCK_NOTIFY_ROUTINE = ::core::option::Option< - unsafe extern "C" fn(NotifyParams: POPLOCK_NOTIFY_PARAMS) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _QUERY_ON_CREATE_FILE_STAT_INFORMATION { - pub FileId: LARGE_INTEGER, - pub CreationTime: LARGE_INTEGER, - pub LastAccessTime: LARGE_INTEGER, - pub LastWriteTime: LARGE_INTEGER, - pub ChangeTime: LARGE_INTEGER, - pub AllocationSize: LARGE_INTEGER, - pub EndOfFile: LARGE_INTEGER, - pub FileAttributes: ULONG, - pub ReparseTag: ULONG, - pub NumberOfLinks: ULONG, -} -#[test] -fn bindgen_test_layout__QUERY_ON_CREATE_FILE_STAT_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_ON_CREATE_FILE_STAT_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_ON_CREATE_FILE_STAT_INFORMATION>(), - 72usize, - concat!("Size of: ", stringify!(_QUERY_ON_CREATE_FILE_STAT_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_ON_CREATE_FILE_STAT_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_QUERY_ON_CREATE_FILE_STAT_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_STAT_INFORMATION), - "::", - stringify!(FileId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_STAT_INFORMATION), - "::", - stringify!(CreationTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_STAT_INFORMATION), - "::", - stringify!(LastAccessTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_STAT_INFORMATION), - "::", - stringify!(LastWriteTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_STAT_INFORMATION), - "::", - stringify!(ChangeTime), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_STAT_INFORMATION), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_STAT_INFORMATION), - "::", - stringify!(EndOfFile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_STAT_INFORMATION), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReparseTag) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_STAT_INFORMATION), - "::", - stringify!(ReparseTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NumberOfLinks) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_STAT_INFORMATION), - "::", - stringify!(NumberOfLinks), - ), - ); -} -impl Default for _QUERY_ON_CREATE_FILE_STAT_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type QUERY_ON_CREATE_FILE_STAT_INFORMATION = _QUERY_ON_CREATE_FILE_STAT_INFORMATION; -pub type PQUERY_ON_CREATE_FILE_STAT_INFORMATION = *mut _QUERY_ON_CREATE_FILE_STAT_INFORMATION; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _QUERY_ON_CREATE_FILE_LX_INFORMATION { - pub EffectiveAccess: ACCESS_MASK, - pub LxFlags: ULONG, - pub LxUid: ULONG, - pub LxGid: ULONG, - pub LxMode: ULONG, - pub LxDeviceIdMajor: ULONG, - pub LxDeviceIdMinor: ULONG, -} -#[test] -fn bindgen_test_layout__QUERY_ON_CREATE_FILE_LX_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_ON_CREATE_FILE_LX_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_ON_CREATE_FILE_LX_INFORMATION>(), - 28usize, - concat!("Size of: ", stringify!(_QUERY_ON_CREATE_FILE_LX_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_ON_CREATE_FILE_LX_INFORMATION>(), - 4usize, - concat!("Alignment of ", stringify!(_QUERY_ON_CREATE_FILE_LX_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EffectiveAccess) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_LX_INFORMATION), - "::", - stringify!(EffectiveAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LxFlags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_LX_INFORMATION), - "::", - stringify!(LxFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LxUid) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_LX_INFORMATION), - "::", - stringify!(LxUid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LxGid) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_LX_INFORMATION), - "::", - stringify!(LxGid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LxMode) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_LX_INFORMATION), - "::", - stringify!(LxMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LxDeviceIdMajor) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_LX_INFORMATION), - "::", - stringify!(LxDeviceIdMajor), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LxDeviceIdMinor) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_FILE_LX_INFORMATION), - "::", - stringify!(LxDeviceIdMinor), - ), - ); -} -pub type QUERY_ON_CREATE_FILE_LX_INFORMATION = _QUERY_ON_CREATE_FILE_LX_INFORMATION; -pub type PQUERY_ON_CREATE_FILE_LX_INFORMATION = *mut _QUERY_ON_CREATE_FILE_LX_INFORMATION; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _QUERY_ON_CREATE_EA_INFORMATION { - pub EaBufferSize: ULONG, - pub EaBuffer: PFILE_FULL_EA_INFORMATION, -} -#[test] -fn bindgen_test_layout__QUERY_ON_CREATE_EA_INFORMATION() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_ON_CREATE_EA_INFORMATION> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_ON_CREATE_EA_INFORMATION>(), - 16usize, - concat!("Size of: ", stringify!(_QUERY_ON_CREATE_EA_INFORMATION)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_ON_CREATE_EA_INFORMATION>(), - 8usize, - concat!("Alignment of ", stringify!(_QUERY_ON_CREATE_EA_INFORMATION)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaBufferSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_EA_INFORMATION), - "::", - stringify!(EaBufferSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaBuffer) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_EA_INFORMATION), - "::", - stringify!(EaBuffer), - ), - ); -} -impl Default for _QUERY_ON_CREATE_EA_INFORMATION { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type QUERY_ON_CREATE_EA_INFORMATION = _QUERY_ON_CREATE_EA_INFORMATION; -pub type PQUERY_ON_CREATE_EA_INFORMATION = *mut _QUERY_ON_CREATE_EA_INFORMATION; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _QUERY_ON_CREATE_ECP_CONTEXT { - pub RequestedClasses: ULONG, - pub ClassesProcessed: ULONG, - pub ClassesWithErrors: ULONG, - pub ClassesWithNoData: ULONG, - pub StatInformation: QUERY_ON_CREATE_FILE_STAT_INFORMATION, - pub LxInformation: QUERY_ON_CREATE_FILE_LX_INFORMATION, - pub EaInformation: QUERY_ON_CREATE_EA_INFORMATION, -} -#[test] -fn bindgen_test_layout__QUERY_ON_CREATE_ECP_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_ON_CREATE_ECP_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_ON_CREATE_ECP_CONTEXT>(), - 136usize, - concat!("Size of: ", stringify!(_QUERY_ON_CREATE_ECP_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_ON_CREATE_ECP_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_QUERY_ON_CREATE_ECP_CONTEXT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RequestedClasses) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_ECP_CONTEXT), - "::", - stringify!(RequestedClasses), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClassesProcessed) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_ECP_CONTEXT), - "::", - stringify!(ClassesProcessed), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClassesWithErrors) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_ECP_CONTEXT), - "::", - stringify!(ClassesWithErrors), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClassesWithNoData) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_ECP_CONTEXT), - "::", - stringify!(ClassesWithNoData), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).StatInformation) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_ECP_CONTEXT), - "::", - stringify!(StatInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LxInformation) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_ECP_CONTEXT), - "::", - stringify!(LxInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaInformation) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_ON_CREATE_ECP_CONTEXT), - "::", - stringify!(EaInformation), - ), - ); -} -impl Default for _QUERY_ON_CREATE_ECP_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type QUERY_ON_CREATE_ECP_CONTEXT = _QUERY_ON_CREATE_ECP_CONTEXT; -pub type PQUERY_ON_CREATE_ECP_CONTEXT = *mut _QUERY_ON_CREATE_ECP_CONTEXT; -pub mod _FSRTL_CHANGE_BACKING_TYPE { - pub type Type = ::core::ffi::c_int; - pub const ChangeDataControlArea: Type = 0; - pub const ChangeImageControlArea: Type = 1; - pub const ChangeSharedCacheMap: Type = 2; -} -pub use self::_FSRTL_CHANGE_BACKING_TYPE::Type as FSRTL_CHANGE_BACKING_TYPE; -pub type PFSRTL_CHANGE_BACKING_TYPE = *mut _FSRTL_CHANGE_BACKING_TYPE::Type; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _PUBLIC_BCB { - pub NodeTypeCode: CSHORT, - pub NodeByteSize: CSHORT, - pub MappedLength: ULONG, - pub MappedFileOffset: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__PUBLIC_BCB() { - const UNINIT: ::core::mem::MaybeUninit<_PUBLIC_BCB> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_PUBLIC_BCB>(), - 16usize, - concat!("Size of: ", stringify!(_PUBLIC_BCB)), - ); - assert_eq!( - ::core::mem::align_of::<_PUBLIC_BCB>(), - 8usize, - concat!("Alignment of ", stringify!(_PUBLIC_BCB)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NodeTypeCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PUBLIC_BCB), - "::", - stringify!(NodeTypeCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NodeByteSize) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_PUBLIC_BCB), - "::", - stringify!(NodeByteSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MappedLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_PUBLIC_BCB), - "::", - stringify!(MappedLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MappedFileOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PUBLIC_BCB), - "::", - stringify!(MappedFileOffset), - ), - ); -} -impl Default for _PUBLIC_BCB { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type PUBLIC_BCB = _PUBLIC_BCB; -pub type PPUBLIC_BCB = *mut _PUBLIC_BCB; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CC_FILE_SIZES { - pub AllocationSize: LARGE_INTEGER, - pub FileSize: LARGE_INTEGER, - pub ValidDataLength: LARGE_INTEGER, -} -#[test] -fn bindgen_test_layout__CC_FILE_SIZES() { - const UNINIT: ::core::mem::MaybeUninit<_CC_FILE_SIZES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CC_FILE_SIZES>(), - 24usize, - concat!("Size of: ", stringify!(_CC_FILE_SIZES)), - ); - assert_eq!( - ::core::mem::align_of::<_CC_FILE_SIZES>(), - 8usize, - concat!("Alignment of ", stringify!(_CC_FILE_SIZES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CC_FILE_SIZES), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileSize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CC_FILE_SIZES), - "::", - stringify!(FileSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ValidDataLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CC_FILE_SIZES), - "::", - stringify!(ValidDataLength), - ), - ); -} -impl Default for _CC_FILE_SIZES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CC_FILE_SIZES = _CC_FILE_SIZES; -pub type PCC_FILE_SIZES = *mut _CC_FILE_SIZES; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _READ_AHEAD_PARAMETERS { - pub NodeByteSize: CSHORT, - pub Granularity: ULONG, - pub PipelinedRequestSize: ULONG, - pub ReadAheadGrowthPercentage: ULONG, -} -#[test] -fn bindgen_test_layout__READ_AHEAD_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_READ_AHEAD_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_READ_AHEAD_PARAMETERS>(), - 16usize, - concat!("Size of: ", stringify!(_READ_AHEAD_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_READ_AHEAD_PARAMETERS>(), - 4usize, - concat!("Alignment of ", stringify!(_READ_AHEAD_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NodeByteSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_READ_AHEAD_PARAMETERS), - "::", - stringify!(NodeByteSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Granularity) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_READ_AHEAD_PARAMETERS), - "::", - stringify!(Granularity), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PipelinedRequestSize) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_READ_AHEAD_PARAMETERS), - "::", - stringify!(PipelinedRequestSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReadAheadGrowthPercentage) as usize - - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_READ_AHEAD_PARAMETERS), - "::", - stringify!(ReadAheadGrowthPercentage), - ), - ); -} -pub type READ_AHEAD_PARAMETERS = _READ_AHEAD_PARAMETERS; -pub type PREAD_AHEAD_PARAMETERS = *mut _READ_AHEAD_PARAMETERS; -pub type PACQUIRE_FOR_LAZY_WRITE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Wait: BOOLEAN) -> BOOLEAN, ->; -pub type PRELEASE_FROM_LAZY_WRITE = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID), ->; -pub type PACQUIRE_FOR_READ_AHEAD = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, Wait: BOOLEAN) -> BOOLEAN, ->; -pub type PRELEASE_FROM_READ_AHEAD = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CACHE_MANAGER_CALLBACKS { - pub AcquireForLazyWrite: PACQUIRE_FOR_LAZY_WRITE, - pub ReleaseFromLazyWrite: PRELEASE_FROM_LAZY_WRITE, - pub AcquireForReadAhead: PACQUIRE_FOR_READ_AHEAD, - pub ReleaseFromReadAhead: PRELEASE_FROM_READ_AHEAD, -} -#[test] -fn bindgen_test_layout__CACHE_MANAGER_CALLBACKS() { - const UNINIT: ::core::mem::MaybeUninit<_CACHE_MANAGER_CALLBACKS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CACHE_MANAGER_CALLBACKS>(), - 32usize, - concat!("Size of: ", stringify!(_CACHE_MANAGER_CALLBACKS)), - ); - assert_eq!( - ::core::mem::align_of::<_CACHE_MANAGER_CALLBACKS>(), - 8usize, - concat!("Alignment of ", stringify!(_CACHE_MANAGER_CALLBACKS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AcquireForLazyWrite) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_MANAGER_CALLBACKS), - "::", - stringify!(AcquireForLazyWrite), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReleaseFromLazyWrite) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_MANAGER_CALLBACKS), - "::", - stringify!(ReleaseFromLazyWrite), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AcquireForReadAhead) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_MANAGER_CALLBACKS), - "::", - stringify!(AcquireForReadAhead), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReleaseFromReadAhead) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_MANAGER_CALLBACKS), - "::", - stringify!(ReleaseFromReadAhead), - ), - ); -} -pub type CACHE_MANAGER_CALLBACKS = _CACHE_MANAGER_CALLBACKS; -pub type PCACHE_MANAGER_CALLBACKS = *mut _CACHE_MANAGER_CALLBACKS; -pub type PACQUIRE_FOR_LAZY_WRITE_EX = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID, InFlags: ULONG, OutFlags: PULONG) -> BOOLEAN, ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CACHE_MANAGER_CALLBACK_FUNCTIONS { - pub AcquireForLazyWriteEx: PACQUIRE_FOR_LAZY_WRITE_EX, - pub ReleaseFromLazyWrite: PRELEASE_FROM_LAZY_WRITE, - pub AcquireForReadAhead: PACQUIRE_FOR_READ_AHEAD, - pub ReleaseFromReadAhead: PRELEASE_FROM_READ_AHEAD, -} -#[test] -fn bindgen_test_layout__CACHE_MANAGER_CALLBACK_FUNCTIONS() { - const UNINIT: ::core::mem::MaybeUninit<_CACHE_MANAGER_CALLBACK_FUNCTIONS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CACHE_MANAGER_CALLBACK_FUNCTIONS>(), - 32usize, - concat!("Size of: ", stringify!(_CACHE_MANAGER_CALLBACK_FUNCTIONS)), - ); - assert_eq!( - ::core::mem::align_of::<_CACHE_MANAGER_CALLBACK_FUNCTIONS>(), - 8usize, - concat!("Alignment of ", stringify!(_CACHE_MANAGER_CALLBACK_FUNCTIONS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AcquireForLazyWriteEx) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_MANAGER_CALLBACK_FUNCTIONS), - "::", - stringify!(AcquireForLazyWriteEx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReleaseFromLazyWrite) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_MANAGER_CALLBACK_FUNCTIONS), - "::", - stringify!(ReleaseFromLazyWrite), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AcquireForReadAhead) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_MANAGER_CALLBACK_FUNCTIONS), - "::", - stringify!(AcquireForReadAhead), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReleaseFromReadAhead) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_MANAGER_CALLBACK_FUNCTIONS), - "::", - stringify!(ReleaseFromReadAhead), - ), - ); -} -pub type CACHE_MANAGER_CALLBACK_FUNCTIONS = _CACHE_MANAGER_CALLBACK_FUNCTIONS; -pub type PCACHE_MANAGER_CALLBACK_FUNCTIONS = *mut _CACHE_MANAGER_CALLBACK_FUNCTIONS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CACHE_MANAGER_CALLBACKS_EX { - pub Version: USHORT, - pub Size: USHORT, - pub Functions: CACHE_MANAGER_CALLBACK_FUNCTIONS, -} -#[test] -fn bindgen_test_layout__CACHE_MANAGER_CALLBACKS_EX() { - const UNINIT: ::core::mem::MaybeUninit<_CACHE_MANAGER_CALLBACKS_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CACHE_MANAGER_CALLBACKS_EX>(), - 40usize, - concat!("Size of: ", stringify!(_CACHE_MANAGER_CALLBACKS_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_CACHE_MANAGER_CALLBACKS_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_CACHE_MANAGER_CALLBACKS_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_MANAGER_CALLBACKS_EX), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_MANAGER_CALLBACKS_EX), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Functions) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_MANAGER_CALLBACKS_EX), - "::", - stringify!(Functions), - ), - ); -} -pub type CACHE_MANAGER_CALLBACKS_EX = _CACHE_MANAGER_CALLBACKS_EX; -pub type PCACHE_MANAGER_CALLBACKS_EX = *mut _CACHE_MANAGER_CALLBACKS_EX; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _CACHE_UNINITIALIZE_EVENT { - pub Next: *mut _CACHE_UNINITIALIZE_EVENT, - pub Event: KEVENT, -} -#[test] -fn bindgen_test_layout__CACHE_UNINITIALIZE_EVENT() { - const UNINIT: ::core::mem::MaybeUninit<_CACHE_UNINITIALIZE_EVENT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CACHE_UNINITIALIZE_EVENT>(), - 32usize, - concat!("Size of: ", stringify!(_CACHE_UNINITIALIZE_EVENT)), - ); - assert_eq!( - ::core::mem::align_of::<_CACHE_UNINITIALIZE_EVENT>(), - 8usize, - concat!("Alignment of ", stringify!(_CACHE_UNINITIALIZE_EVENT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Next) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_UNINITIALIZE_EVENT), - "::", - stringify!(Next), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Event) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CACHE_UNINITIALIZE_EVENT), - "::", - stringify!(Event), - ), - ); -} -impl Default for _CACHE_UNINITIALIZE_EVENT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CACHE_UNINITIALIZE_EVENT = _CACHE_UNINITIALIZE_EVENT; -pub type PCACHE_UNINITIALIZE_EVENT = *mut _CACHE_UNINITIALIZE_EVENT; -pub type PDIRTY_PAGE_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - FileObject: PFILE_OBJECT, - FileOffset: PLARGE_INTEGER, - Length: ULONG, - OldestLsn: PLARGE_INTEGER, - NewestLsn: PLARGE_INTEGER, - Context1: PVOID, - Context2: PVOID, - ), ->; -pub type PFLUSH_TO_LSN = ::core::option::Option< - unsafe extern "C" fn(LogHandle: PVOID, Lsn: LARGE_INTEGER), ->; -pub type PQUERY_LOG_USAGE = ::core::option::Option< - unsafe extern "C" fn(LogHandle: PVOID, PercentageFull: PUSHORT), ->; -pub type PASYNC_READ_COMPLETION_CALLBACK = ::core::option::Option< - unsafe extern "C" fn(Context: PVOID) -> BOOLEAN, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CC_ASYNC_READ_CONTEXT { - pub CompletionRoutine: PASYNC_READ_COMPLETION_CALLBACK, - pub Context: PVOID, - pub Mdl: PMDL, - pub RequestorMode: KPROCESSOR_MODE, - pub NestingLevel: ULONG, -} -#[test] -fn bindgen_test_layout__CC_ASYNC_READ_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_CC_ASYNC_READ_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CC_ASYNC_READ_CONTEXT>(), - 32usize, - concat!("Size of: ", stringify!(_CC_ASYNC_READ_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_CC_ASYNC_READ_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_CC_ASYNC_READ_CONTEXT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompletionRoutine) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CC_ASYNC_READ_CONTEXT), - "::", - stringify!(CompletionRoutine), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Context) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_CC_ASYNC_READ_CONTEXT), - "::", - stringify!(Context), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mdl) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_CC_ASYNC_READ_CONTEXT), - "::", - stringify!(Mdl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).RequestorMode) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_CC_ASYNC_READ_CONTEXT), - "::", - stringify!(RequestorMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NestingLevel) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_CC_ASYNC_READ_CONTEXT), - "::", - stringify!(NestingLevel), - ), - ); -} -impl Default for _CC_ASYNC_READ_CONTEXT { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type CC_ASYNC_READ_CONTEXT = _CC_ASYNC_READ_CONTEXT; -pub type PCC_ASYNC_READ_CONTEXT = *mut _CC_ASYNC_READ_CONTEXT; -pub type PCC_POST_DEFERRED_WRITE = ::core::option::Option< - unsafe extern "C" fn(Context1: PVOID, Context2: PVOID), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _CC_ERROR_CALLBACK_CONTEXT { - pub NodeByteSize: CSHORT, - pub ErrorCode: NTSTATUS, -} -#[test] -fn bindgen_test_layout__CC_ERROR_CALLBACK_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_CC_ERROR_CALLBACK_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_CC_ERROR_CALLBACK_CONTEXT>(), - 8usize, - concat!("Size of: ", stringify!(_CC_ERROR_CALLBACK_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_CC_ERROR_CALLBACK_CONTEXT>(), - 4usize, - concat!("Alignment of ", stringify!(_CC_ERROR_CALLBACK_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NodeByteSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_CC_ERROR_CALLBACK_CONTEXT), - "::", - stringify!(NodeByteSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ErrorCode) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_CC_ERROR_CALLBACK_CONTEXT), - "::", - stringify!(ErrorCode), - ), - ); -} -pub type CC_ERROR_CALLBACK_CONTEXT = _CC_ERROR_CALLBACK_CONTEXT; -pub type PCC_ERROR_CALLBACK_CONTEXT = *mut _CC_ERROR_CALLBACK_CONTEXT; -pub type SEC_WCHAR = WCHAR; -pub type SEC_CHAR = CHAR; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SecHandle { - pub dwLower: ULONG_PTR, - pub dwUpper: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__SecHandle() { - const UNINIT: ::core::mem::MaybeUninit<_SecHandle> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecHandle>(), - 16usize, - concat!("Size of: ", stringify!(_SecHandle)), - ); - assert_eq!( - ::core::mem::align_of::<_SecHandle>(), - 8usize, - concat!("Alignment of ", stringify!(_SecHandle)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwLower) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_SecHandle), "::", stringify!(dwLower)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwUpper) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_SecHandle), "::", stringify!(dwUpper)), - ); -} -pub type SecHandle = _SecHandle; -pub type PSecHandle = *mut _SecHandle; -pub type CredHandle = SecHandle; -pub type PCredHandle = PSecHandle; -pub type CtxtHandle = SecHandle; -pub type PCtxtHandle = PSecHandle; -pub type _SECURITY_INTEGER = LARGE_INTEGER; -pub type SECURITY_INTEGER = LARGE_INTEGER; -pub type PSECURITY_INTEGER = *mut LARGE_INTEGER; -pub type TimeStamp = SECURITY_INTEGER; -pub type PTimeStamp = *mut SECURITY_INTEGER; -pub type SECURITY_STRING = UNICODE_STRING; -pub type PSECURITY_STRING = *mut UNICODE_STRING; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgInfoW { - pub fCapabilities: ::core::ffi::c_ulong, - pub wVersion: ::core::ffi::c_ushort, - pub wRPCID: ::core::ffi::c_ushort, - pub cbMaxToken: ::core::ffi::c_ulong, - pub Name: *mut SEC_WCHAR, - pub Comment: *mut SEC_WCHAR, -} -#[test] -fn bindgen_test_layout__SecPkgInfoW() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgInfoW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgInfoW>(), - 32usize, - concat!("Size of: ", stringify!(_SecPkgInfoW)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgInfoW>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgInfoW)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).fCapabilities) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgInfoW), - "::", - stringify!(fCapabilities), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wVersion) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgInfoW), - "::", - stringify!(wVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).wRPCID) as usize - ptr as usize }, - 6usize, - concat!("Offset of field: ", stringify!(_SecPkgInfoW), "::", stringify!(wRPCID)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbMaxToken) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgInfoW), - "::", - stringify!(cbMaxToken), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 16usize, - concat!("Offset of field: ", stringify!(_SecPkgInfoW), "::", stringify!(Name)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Comment) as usize - ptr as usize }, - 24usize, - concat!("Offset of field: ", stringify!(_SecPkgInfoW), "::", stringify!(Comment)), - ); -} -impl Default for _SecPkgInfoW { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgInfoW = _SecPkgInfoW; -pub type PSecPkgInfoW = *mut _SecPkgInfoW; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecBuffer { - pub cbBuffer: ::core::ffi::c_ulong, - pub BufferType: ::core::ffi::c_ulong, - pub pvBuffer: *mut ::core::ffi::c_void, -} -#[test] -fn bindgen_test_layout__SecBuffer() { - const UNINIT: ::core::mem::MaybeUninit<_SecBuffer> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecBuffer>(), - 16usize, - concat!("Size of: ", stringify!(_SecBuffer)), - ); - assert_eq!( - ::core::mem::align_of::<_SecBuffer>(), - 8usize, - concat!("Alignment of ", stringify!(_SecBuffer)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbBuffer) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_SecBuffer), "::", stringify!(cbBuffer)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BufferType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SecBuffer), - "::", - stringify!(BufferType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pvBuffer) as usize - ptr as usize }, - 8usize, - concat!("Offset of field: ", stringify!(_SecBuffer), "::", stringify!(pvBuffer)), - ); -} -impl Default for _SecBuffer { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecBuffer = _SecBuffer; -pub type PSecBuffer = *mut _SecBuffer; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecBufferDesc { - pub ulVersion: ::core::ffi::c_ulong, - pub cBuffers: ::core::ffi::c_ulong, - pub pBuffers: PSecBuffer, -} -#[test] -fn bindgen_test_layout__SecBufferDesc() { - const UNINIT: ::core::mem::MaybeUninit<_SecBufferDesc> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecBufferDesc>(), - 16usize, - concat!("Size of: ", stringify!(_SecBufferDesc)), - ); - assert_eq!( - ::core::mem::align_of::<_SecBufferDesc>(), - 8usize, - concat!("Alignment of ", stringify!(_SecBufferDesc)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ulVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecBufferDesc), - "::", - stringify!(ulVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cBuffers) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SecBufferDesc), - "::", - stringify!(cBuffers), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pBuffers) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecBufferDesc), - "::", - stringify!(pBuffers), - ), - ); -} -impl Default for _SecBufferDesc { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecBufferDesc = _SecBufferDesc; -pub type PSecBufferDesc = *mut _SecBufferDesc; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SEC_NEGOTIATION_INFO { - pub Size: ::core::ffi::c_ulong, - pub NameLength: ::core::ffi::c_ulong, - pub Name: *mut SEC_WCHAR, - pub Reserved: *mut ::core::ffi::c_void, -} -#[test] -fn bindgen_test_layout__SEC_NEGOTIATION_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_NEGOTIATION_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_NEGOTIATION_INFO>(), - 24usize, - concat!("Size of: ", stringify!(_SEC_NEGOTIATION_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_NEGOTIATION_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_SEC_NEGOTIATION_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_NEGOTIATION_INFO), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NameLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SEC_NEGOTIATION_INFO), - "::", - stringify!(NameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Name) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SEC_NEGOTIATION_INFO), - "::", - stringify!(Name), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SEC_NEGOTIATION_INFO), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _SEC_NEGOTIATION_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SEC_NEGOTIATION_INFO = _SEC_NEGOTIATION_INFO; -pub type PSEC_NEGOTIATION_INFO = *mut _SEC_NEGOTIATION_INFO; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SEC_CHANNEL_BINDINGS { - pub dwInitiatorAddrType: ::core::ffi::c_ulong, - pub cbInitiatorLength: ::core::ffi::c_ulong, - pub dwInitiatorOffset: ::core::ffi::c_ulong, - pub dwAcceptorAddrType: ::core::ffi::c_ulong, - pub cbAcceptorLength: ::core::ffi::c_ulong, - pub dwAcceptorOffset: ::core::ffi::c_ulong, - pub cbApplicationDataLength: ::core::ffi::c_ulong, - pub dwApplicationDataOffset: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SEC_CHANNEL_BINDINGS() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_CHANNEL_BINDINGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_CHANNEL_BINDINGS>(), - 32usize, - concat!("Size of: ", stringify!(_SEC_CHANNEL_BINDINGS)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_CHANNEL_BINDINGS>(), - 4usize, - concat!("Alignment of ", stringify!(_SEC_CHANNEL_BINDINGS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwInitiatorAddrType) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS), - "::", - stringify!(dwInitiatorAddrType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).cbInitiatorLength) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS), - "::", - stringify!(cbInitiatorLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwInitiatorOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS), - "::", - stringify!(dwInitiatorOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwAcceptorAddrType) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS), - "::", - stringify!(dwAcceptorAddrType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).cbAcceptorLength) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS), - "::", - stringify!(cbAcceptorLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwAcceptorOffset) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS), - "::", - stringify!(dwAcceptorOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).cbApplicationDataLength) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS), - "::", - stringify!(cbApplicationDataLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwApplicationDataOffset) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS), - "::", - stringify!(dwApplicationDataOffset), - ), - ); -} -pub type SEC_CHANNEL_BINDINGS = _SEC_CHANNEL_BINDINGS; -pub type PSEC_CHANNEL_BINDINGS = *mut _SEC_CHANNEL_BINDINGS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SEC_CHANNEL_BINDINGS_EX { - pub magicNumber: ::core::ffi::c_ulong, - pub flags: ::core::ffi::c_ulong, - pub cbHeaderLength: ::core::ffi::c_ulong, - pub cbStructureLength: ::core::ffi::c_ulong, - pub dwInitiatorAddrType: ::core::ffi::c_ulong, - pub cbInitiatorLength: ::core::ffi::c_ulong, - pub dwInitiatorOffset: ::core::ffi::c_ulong, - pub dwAcceptorAddrType: ::core::ffi::c_ulong, - pub cbAcceptorLength: ::core::ffi::c_ulong, - pub dwAcceptorOffset: ::core::ffi::c_ulong, - pub cbApplicationDataLength: ::core::ffi::c_ulong, - pub dwApplicationDataOffset: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SEC_CHANNEL_BINDINGS_EX() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_CHANNEL_BINDINGS_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_CHANNEL_BINDINGS_EX>(), - 48usize, - concat!("Size of: ", stringify!(_SEC_CHANNEL_BINDINGS_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_CHANNEL_BINDINGS_EX>(), - 4usize, - concat!("Alignment of ", stringify!(_SEC_CHANNEL_BINDINGS_EX)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).magicNumber) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS_EX), - "::", - stringify!(magicNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS_EX), - "::", - stringify!(flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbHeaderLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS_EX), - "::", - stringify!(cbHeaderLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).cbStructureLength) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS_EX), - "::", - stringify!(cbStructureLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwInitiatorAddrType) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS_EX), - "::", - stringify!(dwInitiatorAddrType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).cbInitiatorLength) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS_EX), - "::", - stringify!(cbInitiatorLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwInitiatorOffset) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS_EX), - "::", - stringify!(dwInitiatorOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwAcceptorAddrType) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS_EX), - "::", - stringify!(dwAcceptorAddrType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).cbAcceptorLength) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS_EX), - "::", - stringify!(cbAcceptorLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwAcceptorOffset) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS_EX), - "::", - stringify!(dwAcceptorOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).cbApplicationDataLength) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS_EX), - "::", - stringify!(cbApplicationDataLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).dwApplicationDataOffset) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS_EX), - "::", - stringify!(dwApplicationDataOffset), - ), - ); -} -pub type SEC_CHANNEL_BINDINGS_EX = _SEC_CHANNEL_BINDINGS_EX; -pub type PSEC_CHANNEL_BINDINGS_EX = *mut _SEC_CHANNEL_BINDINGS_EX; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SEC_CHANNEL_BINDINGS_RESULT { - pub flags: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SEC_CHANNEL_BINDINGS_RESULT() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_CHANNEL_BINDINGS_RESULT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_CHANNEL_BINDINGS_RESULT>(), - 4usize, - concat!("Size of: ", stringify!(_SEC_CHANNEL_BINDINGS_RESULT)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_CHANNEL_BINDINGS_RESULT>(), - 4usize, - concat!("Alignment of ", stringify!(_SEC_CHANNEL_BINDINGS_RESULT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CHANNEL_BINDINGS_RESULT), - "::", - stringify!(flags), - ), - ); -} -pub type SEC_CHANNEL_BINDINGS_RESULT = _SEC_CHANNEL_BINDINGS_RESULT; -pub type PSEC_CHANNEL_BINDINGS_RESULT = *mut _SEC_CHANNEL_BINDINGS_RESULT; -pub mod _SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT { - pub type Type = ::core::ffi::c_int; - pub const SecApplicationProtocolNegotiationExt_None: Type = 0; - pub const SecApplicationProtocolNegotiationExt_NPN: Type = 1; - pub const SecApplicationProtocolNegotiationExt_ALPN: Type = 2; -} -pub use self::_SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT::Type as SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT; -pub type PSEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT = *mut _SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SEC_APPLICATION_PROTOCOL_LIST { - pub ProtoNegoExt: SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT, - pub ProtocolListSize: ::core::ffi::c_ushort, - pub ProtocolList: [::core::ffi::c_uchar; 1usize], -} -#[test] -fn bindgen_test_layout__SEC_APPLICATION_PROTOCOL_LIST() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_APPLICATION_PROTOCOL_LIST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_APPLICATION_PROTOCOL_LIST>(), - 8usize, - concat!("Size of: ", stringify!(_SEC_APPLICATION_PROTOCOL_LIST)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_APPLICATION_PROTOCOL_LIST>(), - 4usize, - concat!("Alignment of ", stringify!(_SEC_APPLICATION_PROTOCOL_LIST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProtoNegoExt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_APPLICATION_PROTOCOL_LIST), - "::", - stringify!(ProtoNegoExt), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProtocolListSize) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SEC_APPLICATION_PROTOCOL_LIST), - "::", - stringify!(ProtocolListSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProtocolList) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_SEC_APPLICATION_PROTOCOL_LIST), - "::", - stringify!(ProtocolList), - ), - ); -} -impl Default for _SEC_APPLICATION_PROTOCOL_LIST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SEC_APPLICATION_PROTOCOL_LIST = _SEC_APPLICATION_PROTOCOL_LIST; -pub type PSEC_APPLICATION_PROTOCOL_LIST = *mut _SEC_APPLICATION_PROTOCOL_LIST; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SEC_APPLICATION_PROTOCOLS { - pub ProtocolListsSize: ::core::ffi::c_ulong, - pub ProtocolLists: [SEC_APPLICATION_PROTOCOL_LIST; 1usize], -} -#[test] -fn bindgen_test_layout__SEC_APPLICATION_PROTOCOLS() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_APPLICATION_PROTOCOLS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_APPLICATION_PROTOCOLS>(), - 12usize, - concat!("Size of: ", stringify!(_SEC_APPLICATION_PROTOCOLS)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_APPLICATION_PROTOCOLS>(), - 4usize, - concat!("Alignment of ", stringify!(_SEC_APPLICATION_PROTOCOLS)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProtocolListsSize) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_APPLICATION_PROTOCOLS), - "::", - stringify!(ProtocolListsSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProtocolLists) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SEC_APPLICATION_PROTOCOLS), - "::", - stringify!(ProtocolLists), - ), - ); -} -impl Default for _SEC_APPLICATION_PROTOCOLS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SEC_APPLICATION_PROTOCOLS = _SEC_APPLICATION_PROTOCOLS; -pub type PSEC_APPLICATION_PROTOCOLS = *mut _SEC_APPLICATION_PROTOCOLS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SEC_SRTP_PROTECTION_PROFILES { - pub ProfilesSize: ::core::ffi::c_ushort, - pub ProfilesList: [::core::ffi::c_ushort; 1usize], -} -#[test] -fn bindgen_test_layout__SEC_SRTP_PROTECTION_PROFILES() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_SRTP_PROTECTION_PROFILES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_SRTP_PROTECTION_PROFILES>(), - 4usize, - concat!("Size of: ", stringify!(_SEC_SRTP_PROTECTION_PROFILES)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_SRTP_PROTECTION_PROFILES>(), - 2usize, - concat!("Alignment of ", stringify!(_SEC_SRTP_PROTECTION_PROFILES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProfilesSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_SRTP_PROTECTION_PROFILES), - "::", - stringify!(ProfilesSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProfilesList) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_SEC_SRTP_PROTECTION_PROFILES), - "::", - stringify!(ProfilesList), - ), - ); -} -pub type SEC_SRTP_PROTECTION_PROFILES = _SEC_SRTP_PROTECTION_PROFILES; -pub type PSEC_SRTP_PROTECTION_PROFILES = *mut _SEC_SRTP_PROTECTION_PROFILES; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SEC_SRTP_MASTER_KEY_IDENTIFIER { - pub MasterKeyIdentifierSize: ::core::ffi::c_uchar, - pub MasterKeyIdentifier: [::core::ffi::c_uchar; 1usize], -} -#[test] -fn bindgen_test_layout__SEC_SRTP_MASTER_KEY_IDENTIFIER() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_SRTP_MASTER_KEY_IDENTIFIER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_SRTP_MASTER_KEY_IDENTIFIER>(), - 2usize, - concat!("Size of: ", stringify!(_SEC_SRTP_MASTER_KEY_IDENTIFIER)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_SRTP_MASTER_KEY_IDENTIFIER>(), - 1usize, - concat!("Alignment of ", stringify!(_SEC_SRTP_MASTER_KEY_IDENTIFIER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MasterKeyIdentifierSize) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_SRTP_MASTER_KEY_IDENTIFIER), - "::", - stringify!(MasterKeyIdentifierSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MasterKeyIdentifier) as usize - ptr as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_SEC_SRTP_MASTER_KEY_IDENTIFIER), - "::", - stringify!(MasterKeyIdentifier), - ), - ); -} -pub type SEC_SRTP_MASTER_KEY_IDENTIFIER = _SEC_SRTP_MASTER_KEY_IDENTIFIER; -pub type PSEC_SRTP_MASTER_KEY_IDENTIFIER = *mut _SEC_SRTP_MASTER_KEY_IDENTIFIER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SEC_TOKEN_BINDING { - pub MajorVersion: ::core::ffi::c_uchar, - pub MinorVersion: ::core::ffi::c_uchar, - pub KeyParametersSize: ::core::ffi::c_ushort, - pub KeyParameters: [::core::ffi::c_uchar; 1usize], -} -#[test] -fn bindgen_test_layout__SEC_TOKEN_BINDING() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_TOKEN_BINDING> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_TOKEN_BINDING>(), - 6usize, - concat!("Size of: ", stringify!(_SEC_TOKEN_BINDING)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_TOKEN_BINDING>(), - 2usize, - concat!("Alignment of ", stringify!(_SEC_TOKEN_BINDING)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TOKEN_BINDING), - "::", - stringify!(MajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorVersion) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TOKEN_BINDING), - "::", - stringify!(MinorVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).KeyParametersSize) as usize - ptr as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TOKEN_BINDING), - "::", - stringify!(KeyParametersSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyParameters) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TOKEN_BINDING), - "::", - stringify!(KeyParameters), - ), - ); -} -pub type SEC_TOKEN_BINDING = _SEC_TOKEN_BINDING; -pub type PSEC_TOKEN_BINDING = *mut _SEC_TOKEN_BINDING; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SEC_PRESHAREDKEY { - pub KeySize: ::core::ffi::c_ushort, - pub Key: [::core::ffi::c_uchar; 1usize], -} -#[test] -fn bindgen_test_layout__SEC_PRESHAREDKEY() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_PRESHAREDKEY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_PRESHAREDKEY>(), - 4usize, - concat!("Size of: ", stringify!(_SEC_PRESHAREDKEY)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_PRESHAREDKEY>(), - 2usize, - concat!("Alignment of ", stringify!(_SEC_PRESHAREDKEY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeySize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_PRESHAREDKEY), - "::", - stringify!(KeySize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Key) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_SEC_PRESHAREDKEY), - "::", - stringify!(Key), - ), - ); -} -pub type SEC_PRESHAREDKEY = _SEC_PRESHAREDKEY; -pub type PSEC_PRESHAREDKEY = *mut _SEC_PRESHAREDKEY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SEC_PRESHAREDKEY_IDENTITY { - pub KeyIdentitySize: ::core::ffi::c_ushort, - pub KeyIdentity: [::core::ffi::c_uchar; 1usize], -} -#[test] -fn bindgen_test_layout__SEC_PRESHAREDKEY_IDENTITY() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_PRESHAREDKEY_IDENTITY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_PRESHAREDKEY_IDENTITY>(), - 4usize, - concat!("Size of: ", stringify!(_SEC_PRESHAREDKEY_IDENTITY)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_PRESHAREDKEY_IDENTITY>(), - 2usize, - concat!("Alignment of ", stringify!(_SEC_PRESHAREDKEY_IDENTITY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyIdentitySize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_PRESHAREDKEY_IDENTITY), - "::", - stringify!(KeyIdentitySize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyIdentity) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_SEC_PRESHAREDKEY_IDENTITY), - "::", - stringify!(KeyIdentity), - ), - ); -} -pub type SEC_PRESHAREDKEY_IDENTITY = _SEC_PRESHAREDKEY_IDENTITY; -pub type PSEC_PRESHAREDKEY_IDENTITY = *mut _SEC_PRESHAREDKEY_IDENTITY; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SEC_DTLS_MTU { - pub PathMTU: ::core::ffi::c_ushort, -} -#[test] -fn bindgen_test_layout__SEC_DTLS_MTU() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_DTLS_MTU> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_DTLS_MTU>(), - 2usize, - concat!("Size of: ", stringify!(_SEC_DTLS_MTU)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_DTLS_MTU>(), - 2usize, - concat!("Alignment of ", stringify!(_SEC_DTLS_MTU)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PathMTU) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_DTLS_MTU), - "::", - stringify!(PathMTU), - ), - ); -} -pub type SEC_DTLS_MTU = _SEC_DTLS_MTU; -pub type PSEC_DTLS_MTU = *mut _SEC_DTLS_MTU; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SEC_FLAGS { - pub Flags: ::core::ffi::c_ulonglong, -} -#[test] -fn bindgen_test_layout__SEC_FLAGS() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_FLAGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_FLAGS>(), - 8usize, - concat!("Size of: ", stringify!(_SEC_FLAGS)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_FLAGS>(), - 8usize, - concat!("Alignment of ", stringify!(_SEC_FLAGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_SEC_FLAGS), "::", stringify!(Flags)), - ); -} -pub type SEC_FLAGS = _SEC_FLAGS; -pub type PSEC_FLAGS = *mut _SEC_FLAGS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SEC_CERTIFICATE_REQUEST_CONTEXT { - pub cbCertificateRequestContext: ::core::ffi::c_uchar, - pub rgCertificateRequestContext: [::core::ffi::c_uchar; 1usize], -} -#[test] -fn bindgen_test_layout__SEC_CERTIFICATE_REQUEST_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_CERTIFICATE_REQUEST_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_CERTIFICATE_REQUEST_CONTEXT>(), - 2usize, - concat!("Size of: ", stringify!(_SEC_CERTIFICATE_REQUEST_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_CERTIFICATE_REQUEST_CONTEXT>(), - 1usize, - concat!("Alignment of ", stringify!(_SEC_CERTIFICATE_REQUEST_CONTEXT)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).cbCertificateRequestContext) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CERTIFICATE_REQUEST_CONTEXT), - "::", - stringify!(cbCertificateRequestContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).rgCertificateRequestContext) as usize - - ptr as usize - }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_SEC_CERTIFICATE_REQUEST_CONTEXT), - "::", - stringify!(rgCertificateRequestContext), - ), - ); -} -pub type SEC_CERTIFICATE_REQUEST_CONTEXT = _SEC_CERTIFICATE_REQUEST_CONTEXT; -pub type PSEC_CERTIFICATE_REQUEST_CONTEXT = *mut _SEC_CERTIFICATE_REQUEST_CONTEXT; -pub mod _SEC_TRAFFIC_SECRET_TYPE { - pub type Type = ::core::ffi::c_int; - pub const SecTrafficSecret_None: Type = 0; - pub const SecTrafficSecret_Client: Type = 1; - pub const SecTrafficSecret_Server: Type = 2; -} -pub use self::_SEC_TRAFFIC_SECRET_TYPE::Type as SEC_TRAFFIC_SECRET_TYPE; -pub type PSEC_TRAFFIC_SECRET_TYPE = *mut _SEC_TRAFFIC_SECRET_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SEC_TRAFFIC_SECRETS { - pub SymmetricAlgId: [wchar_t; 64usize], - pub ChainingMode: [wchar_t; 64usize], - pub HashAlgId: [wchar_t; 64usize], - pub KeySize: ::core::ffi::c_ushort, - pub IvSize: ::core::ffi::c_ushort, - pub MsgSequenceStart: ::core::ffi::c_ushort, - pub MsgSequenceEnd: ::core::ffi::c_ushort, - pub TrafficSecretType: SEC_TRAFFIC_SECRET_TYPE, - pub TrafficSecretSize: ::core::ffi::c_ushort, - pub TrafficSecret: [::core::ffi::c_uchar; 1usize], -} -#[test] -fn bindgen_test_layout__SEC_TRAFFIC_SECRETS() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_TRAFFIC_SECRETS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_TRAFFIC_SECRETS>(), - 400usize, - concat!("Size of: ", stringify!(_SEC_TRAFFIC_SECRETS)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_TRAFFIC_SECRETS>(), - 4usize, - concat!("Alignment of ", stringify!(_SEC_TRAFFIC_SECRETS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SymmetricAlgId) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TRAFFIC_SECRETS), - "::", - stringify!(SymmetricAlgId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ChainingMode) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TRAFFIC_SECRETS), - "::", - stringify!(ChainingMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HashAlgId) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TRAFFIC_SECRETS), - "::", - stringify!(HashAlgId), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeySize) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TRAFFIC_SECRETS), - "::", - stringify!(KeySize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IvSize) as usize - ptr as usize }, - 386usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TRAFFIC_SECRETS), - "::", - stringify!(IvSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MsgSequenceStart) as usize - ptr as usize - }, - 388usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TRAFFIC_SECRETS), - "::", - stringify!(MsgSequenceStart), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MsgSequenceEnd) as usize - ptr as usize }, - 390usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TRAFFIC_SECRETS), - "::", - stringify!(MsgSequenceEnd), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TrafficSecretType) as usize - ptr as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TRAFFIC_SECRETS), - "::", - stringify!(TrafficSecretType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TrafficSecretSize) as usize - ptr as usize - }, - 396usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TRAFFIC_SECRETS), - "::", - stringify!(TrafficSecretSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TrafficSecret) as usize - ptr as usize }, - 398usize, - concat!( - "Offset of field: ", - stringify!(_SEC_TRAFFIC_SECRETS), - "::", - stringify!(TrafficSecret), - ), - ); -} -impl Default for _SEC_TRAFFIC_SECRETS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SEC_TRAFFIC_SECRETS = _SEC_TRAFFIC_SECRETS; -pub type PSEC_TRAFFIC_SECRETS = *mut _SEC_TRAFFIC_SECRETS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgCredentials_NamesW { - pub sUserName: *mut SEC_WCHAR, -} -#[test] -fn bindgen_test_layout__SecPkgCredentials_NamesW() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgCredentials_NamesW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgCredentials_NamesW>(), - 8usize, - concat!("Size of: ", stringify!(_SecPkgCredentials_NamesW)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgCredentials_NamesW>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgCredentials_NamesW)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sUserName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgCredentials_NamesW), - "::", - stringify!(sUserName), - ), - ); -} -impl Default for _SecPkgCredentials_NamesW { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgCredentials_NamesW = _SecPkgCredentials_NamesW; -pub type PSecPkgCredentials_NamesW = *mut _SecPkgCredentials_NamesW; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgCredentials_SSIProviderW { - pub sProviderName: *mut SEC_WCHAR, - pub ProviderInfoLength: ::core::ffi::c_ulong, - pub ProviderInfo: *mut ::core::ffi::c_char, -} -#[test] -fn bindgen_test_layout__SecPkgCredentials_SSIProviderW() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgCredentials_SSIProviderW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgCredentials_SSIProviderW>(), - 24usize, - concat!("Size of: ", stringify!(_SecPkgCredentials_SSIProviderW)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgCredentials_SSIProviderW>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgCredentials_SSIProviderW)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sProviderName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgCredentials_SSIProviderW), - "::", - stringify!(sProviderName), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProviderInfoLength) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgCredentials_SSIProviderW), - "::", - stringify!(ProviderInfoLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProviderInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgCredentials_SSIProviderW), - "::", - stringify!(ProviderInfo), - ), - ); -} -impl Default for _SecPkgCredentials_SSIProviderW { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgCredentials_SSIProviderW = _SecPkgCredentials_SSIProviderW; -pub type PSecPkgCredentials_SSIProviderW = *mut _SecPkgCredentials_SSIProviderW; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SecPkgCredentials_KdcProxySettingsW { - pub Version: ULONG, - pub Flags: ULONG, - pub ProxyServerOffset: USHORT, - pub ProxyServerLength: USHORT, - pub ClientTlsCredOffset: USHORT, - pub ClientTlsCredLength: USHORT, -} -#[test] -fn bindgen_test_layout__SecPkgCredentials_KdcProxySettingsW() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgCredentials_KdcProxySettingsW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgCredentials_KdcProxySettingsW>(), - 16usize, - concat!("Size of: ", stringify!(_SecPkgCredentials_KdcProxySettingsW)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgCredentials_KdcProxySettingsW>(), - 4usize, - concat!("Alignment of ", stringify!(_SecPkgCredentials_KdcProxySettingsW)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgCredentials_KdcProxySettingsW), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgCredentials_KdcProxySettingsW), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProxyServerOffset) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgCredentials_KdcProxySettingsW), - "::", - stringify!(ProxyServerOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ProxyServerLength) as usize - ptr as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgCredentials_KdcProxySettingsW), - "::", - stringify!(ProxyServerLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClientTlsCredOffset) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgCredentials_KdcProxySettingsW), - "::", - stringify!(ClientTlsCredOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ClientTlsCredLength) as usize - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgCredentials_KdcProxySettingsW), - "::", - stringify!(ClientTlsCredLength), - ), - ); -} -pub type SecPkgCredentials_KdcProxySettingsW = _SecPkgCredentials_KdcProxySettingsW; -pub type PSecPkgCredentials_KdcProxySettingsW = *mut _SecPkgCredentials_KdcProxySettingsW; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgCredentials_Cert { - pub EncodedCertSize: ::core::ffi::c_ulong, - pub EncodedCert: *mut ::core::ffi::c_uchar, -} -#[test] -fn bindgen_test_layout__SecPkgCredentials_Cert() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgCredentials_Cert> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgCredentials_Cert>(), - 16usize, - concat!("Size of: ", stringify!(_SecPkgCredentials_Cert)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgCredentials_Cert>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgCredentials_Cert)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EncodedCertSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgCredentials_Cert), - "::", - stringify!(EncodedCertSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EncodedCert) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgCredentials_Cert), - "::", - stringify!(EncodedCert), - ), - ); -} -impl Default for _SecPkgCredentials_Cert { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgCredentials_Cert = _SecPkgCredentials_Cert; -pub type PSecPkgCredentials_Cert = *mut _SecPkgCredentials_Cert; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgContext_SubjectAttributes { - pub AttributeInfo: *mut ::core::ffi::c_void, -} -#[test] -fn bindgen_test_layout__SecPkgContext_SubjectAttributes() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_SubjectAttributes> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_SubjectAttributes>(), - 8usize, - concat!("Size of: ", stringify!(_SecPkgContext_SubjectAttributes)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_SubjectAttributes>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_SubjectAttributes)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AttributeInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_SubjectAttributes), - "::", - stringify!(AttributeInfo), - ), - ); -} -impl Default for _SecPkgContext_SubjectAttributes { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_SubjectAttributes = _SecPkgContext_SubjectAttributes; -pub type PSecPkgContext_SubjectAttributes = *mut _SecPkgContext_SubjectAttributes; -pub mod _SECPKG_CRED_CLASS { - pub type Type = ::core::ffi::c_int; - pub const SecPkgCredClass_None: Type = 0; - pub const SecPkgCredClass_Ephemeral: Type = 10; - pub const SecPkgCredClass_PersistedGeneric: Type = 20; - pub const SecPkgCredClass_PersistedSpecific: Type = 30; - pub const SecPkgCredClass_Explicit: Type = 40; -} -pub use self::_SECPKG_CRED_CLASS::Type as SECPKG_CRED_CLASS; -pub type PSECPKG_CRED_CLASS = *mut _SECPKG_CRED_CLASS::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgContext_CredInfo { - pub CredClass: SECPKG_CRED_CLASS, - pub IsPromptingNeeded: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SecPkgContext_CredInfo() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_CredInfo> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_CredInfo>(), - 8usize, - concat!("Size of: ", stringify!(_SecPkgContext_CredInfo)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_CredInfo>(), - 4usize, - concat!("Alignment of ", stringify!(_SecPkgContext_CredInfo)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CredClass) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_CredInfo), - "::", - stringify!(CredClass), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IsPromptingNeeded) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_CredInfo), - "::", - stringify!(IsPromptingNeeded), - ), - ); -} -impl Default for _SecPkgContext_CredInfo { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_CredInfo = _SecPkgContext_CredInfo; -pub type PSecPkgContext_CredInfo = *mut _SecPkgContext_CredInfo; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SecPkgContext_NegoPackageInfo { - pub PackageMask: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SecPkgContext_NegoPackageInfo() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_NegoPackageInfo> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_NegoPackageInfo>(), - 4usize, - concat!("Size of: ", stringify!(_SecPkgContext_NegoPackageInfo)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_NegoPackageInfo>(), - 4usize, - concat!("Alignment of ", stringify!(_SecPkgContext_NegoPackageInfo)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PackageMask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_NegoPackageInfo), - "::", - stringify!(PackageMask), - ), - ); -} -pub type SecPkgContext_NegoPackageInfo = _SecPkgContext_NegoPackageInfo; -pub type PSecPkgContext_NegoPackageInfo = *mut _SecPkgContext_NegoPackageInfo; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SecPkgContext_NegoStatus { - pub LastStatus: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SecPkgContext_NegoStatus() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_NegoStatus> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_NegoStatus>(), - 4usize, - concat!("Size of: ", stringify!(_SecPkgContext_NegoStatus)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_NegoStatus>(), - 4usize, - concat!("Alignment of ", stringify!(_SecPkgContext_NegoStatus)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LastStatus) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_NegoStatus), - "::", - stringify!(LastStatus), - ), - ); -} -pub type SecPkgContext_NegoStatus = _SecPkgContext_NegoStatus; -pub type PSecPkgContext_NegoStatus = *mut _SecPkgContext_NegoStatus; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SecPkgContext_Sizes { - pub cbMaxToken: ::core::ffi::c_ulong, - pub cbMaxSignature: ::core::ffi::c_ulong, - pub cbBlockSize: ::core::ffi::c_ulong, - pub cbSecurityTrailer: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SecPkgContext_Sizes() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_Sizes> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_Sizes>(), - 16usize, - concat!("Size of: ", stringify!(_SecPkgContext_Sizes)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_Sizes>(), - 4usize, - concat!("Alignment of ", stringify!(_SecPkgContext_Sizes)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbMaxToken) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_Sizes), - "::", - stringify!(cbMaxToken), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbMaxSignature) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_Sizes), - "::", - stringify!(cbMaxSignature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbBlockSize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_Sizes), - "::", - stringify!(cbBlockSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).cbSecurityTrailer) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_Sizes), - "::", - stringify!(cbSecurityTrailer), - ), - ); -} -pub type SecPkgContext_Sizes = _SecPkgContext_Sizes; -pub type PSecPkgContext_Sizes = *mut _SecPkgContext_Sizes; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SecPkgContext_StreamSizes { - pub cbHeader: ::core::ffi::c_ulong, - pub cbTrailer: ::core::ffi::c_ulong, - pub cbMaximumMessage: ::core::ffi::c_ulong, - pub cBuffers: ::core::ffi::c_ulong, - pub cbBlockSize: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SecPkgContext_StreamSizes() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_StreamSizes> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_StreamSizes>(), - 20usize, - concat!("Size of: ", stringify!(_SecPkgContext_StreamSizes)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_StreamSizes>(), - 4usize, - concat!("Alignment of ", stringify!(_SecPkgContext_StreamSizes)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbHeader) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_StreamSizes), - "::", - stringify!(cbHeader), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbTrailer) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_StreamSizes), - "::", - stringify!(cbTrailer), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).cbMaximumMessage) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_StreamSizes), - "::", - stringify!(cbMaximumMessage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cBuffers) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_StreamSizes), - "::", - stringify!(cBuffers), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbBlockSize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_StreamSizes), - "::", - stringify!(cbBlockSize), - ), - ); -} -pub type SecPkgContext_StreamSizes = _SecPkgContext_StreamSizes; -pub type PSecPkgContext_StreamSizes = *mut _SecPkgContext_StreamSizes; -pub type SecPkgContext_DatagramSizes = SecPkgContext_StreamSizes; -pub type PSecPkgContext_DatagramSizes = PSecPkgContext_StreamSizes; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgContext_NamesW { - pub sUserName: *mut SEC_WCHAR, -} -#[test] -fn bindgen_test_layout__SecPkgContext_NamesW() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_NamesW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_NamesW>(), - 8usize, - concat!("Size of: ", stringify!(_SecPkgContext_NamesW)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_NamesW>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_NamesW)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sUserName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_NamesW), - "::", - stringify!(sUserName), - ), - ); -} -impl Default for _SecPkgContext_NamesW { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_NamesW = _SecPkgContext_NamesW; -pub type PSecPkgContext_NamesW = *mut _SecPkgContext_NamesW; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _SecPkgContext_Lifespan { - pub tsStart: TimeStamp, - pub tsExpiry: TimeStamp, -} -#[test] -fn bindgen_test_layout__SecPkgContext_Lifespan() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_Lifespan> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_Lifespan>(), - 16usize, - concat!("Size of: ", stringify!(_SecPkgContext_Lifespan)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_Lifespan>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_Lifespan)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).tsStart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_Lifespan), - "::", - stringify!(tsStart), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).tsExpiry) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_Lifespan), - "::", - stringify!(tsExpiry), - ), - ); -} -impl Default for _SecPkgContext_Lifespan { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_Lifespan = _SecPkgContext_Lifespan; -pub type PSecPkgContext_Lifespan = *mut _SecPkgContext_Lifespan; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgContext_DceInfo { - pub AuthzSvc: ::core::ffi::c_ulong, - pub pPac: *mut ::core::ffi::c_void, -} -#[test] -fn bindgen_test_layout__SecPkgContext_DceInfo() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_DceInfo> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_DceInfo>(), - 16usize, - concat!("Size of: ", stringify!(_SecPkgContext_DceInfo)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_DceInfo>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_DceInfo)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AuthzSvc) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_DceInfo), - "::", - stringify!(AuthzSvc), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pPac) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_DceInfo), - "::", - stringify!(pPac), - ), - ); -} -impl Default for _SecPkgContext_DceInfo { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_DceInfo = _SecPkgContext_DceInfo; -pub type PSecPkgContext_DceInfo = *mut _SecPkgContext_DceInfo; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgContext_KeyInfoW { - pub sSignatureAlgorithmName: *mut SEC_WCHAR, - pub sEncryptAlgorithmName: *mut SEC_WCHAR, - pub KeySize: ::core::ffi::c_ulong, - pub SignatureAlgorithm: ::core::ffi::c_ulong, - pub EncryptAlgorithm: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SecPkgContext_KeyInfoW() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_KeyInfoW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_KeyInfoW>(), - 32usize, - concat!("Size of: ", stringify!(_SecPkgContext_KeyInfoW)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_KeyInfoW>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_KeyInfoW)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).sSignatureAlgorithmName) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_KeyInfoW), - "::", - stringify!(sSignatureAlgorithmName), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).sEncryptAlgorithmName) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_KeyInfoW), - "::", - stringify!(sEncryptAlgorithmName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeySize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_KeyInfoW), - "::", - stringify!(KeySize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SignatureAlgorithm) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_KeyInfoW), - "::", - stringify!(SignatureAlgorithm), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EncryptAlgorithm) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_KeyInfoW), - "::", - stringify!(EncryptAlgorithm), - ), - ); -} -impl Default for _SecPkgContext_KeyInfoW { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_KeyInfoW = _SecPkgContext_KeyInfoW; -pub type PSecPkgContext_KeyInfoW = *mut _SecPkgContext_KeyInfoW; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgContext_AuthorityW { - pub sAuthorityName: *mut SEC_WCHAR, -} -#[test] -fn bindgen_test_layout__SecPkgContext_AuthorityW() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_AuthorityW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_AuthorityW>(), - 8usize, - concat!("Size of: ", stringify!(_SecPkgContext_AuthorityW)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_AuthorityW>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_AuthorityW)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sAuthorityName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_AuthorityW), - "::", - stringify!(sAuthorityName), - ), - ); -} -impl Default for _SecPkgContext_AuthorityW { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_AuthorityW = _SecPkgContext_AuthorityW; -pub type PSecPkgContext_AuthorityW = *mut _SecPkgContext_AuthorityW; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgContext_ProtoInfoW { - pub sProtocolName: *mut SEC_WCHAR, - pub majorVersion: ::core::ffi::c_ulong, - pub minorVersion: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SecPkgContext_ProtoInfoW() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_ProtoInfoW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_ProtoInfoW>(), - 16usize, - concat!("Size of: ", stringify!(_SecPkgContext_ProtoInfoW)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_ProtoInfoW>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_ProtoInfoW)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sProtocolName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_ProtoInfoW), - "::", - stringify!(sProtocolName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).majorVersion) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_ProtoInfoW), - "::", - stringify!(majorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).minorVersion) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_ProtoInfoW), - "::", - stringify!(minorVersion), - ), - ); -} -impl Default for _SecPkgContext_ProtoInfoW { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_ProtoInfoW = _SecPkgContext_ProtoInfoW; -pub type PSecPkgContext_ProtoInfoW = *mut _SecPkgContext_ProtoInfoW; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _SecPkgContext_PasswordExpiry { - pub tsPasswordExpires: TimeStamp, -} -#[test] -fn bindgen_test_layout__SecPkgContext_PasswordExpiry() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_PasswordExpiry> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_PasswordExpiry>(), - 8usize, - concat!("Size of: ", stringify!(_SecPkgContext_PasswordExpiry)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_PasswordExpiry>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_PasswordExpiry)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).tsPasswordExpires) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_PasswordExpiry), - "::", - stringify!(tsPasswordExpires), - ), - ); -} -impl Default for _SecPkgContext_PasswordExpiry { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_PasswordExpiry = _SecPkgContext_PasswordExpiry; -pub type PSecPkgContext_PasswordExpiry = *mut _SecPkgContext_PasswordExpiry; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _SecPkgContext_LogoffTime { - pub tsLogoffTime: TimeStamp, -} -#[test] -fn bindgen_test_layout__SecPkgContext_LogoffTime() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_LogoffTime> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_LogoffTime>(), - 8usize, - concat!("Size of: ", stringify!(_SecPkgContext_LogoffTime)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_LogoffTime>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_LogoffTime)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).tsLogoffTime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_LogoffTime), - "::", - stringify!(tsLogoffTime), - ), - ); -} -impl Default for _SecPkgContext_LogoffTime { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_LogoffTime = _SecPkgContext_LogoffTime; -pub type PSecPkgContext_LogoffTime = *mut _SecPkgContext_LogoffTime; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgContext_SessionKey { - pub SessionKeyLength: ::core::ffi::c_ulong, - pub SessionKey: *mut ::core::ffi::c_uchar, -} -#[test] -fn bindgen_test_layout__SecPkgContext_SessionKey() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_SessionKey> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_SessionKey>(), - 16usize, - concat!("Size of: ", stringify!(_SecPkgContext_SessionKey)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_SessionKey>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_SessionKey)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SessionKeyLength) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_SessionKey), - "::", - stringify!(SessionKeyLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SessionKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_SessionKey), - "::", - stringify!(SessionKey), - ), - ); -} -impl Default for _SecPkgContext_SessionKey { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_SessionKey = _SecPkgContext_SessionKey; -pub type PSecPkgContext_SessionKey = *mut _SecPkgContext_SessionKey; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgContext_NegoKeys { - pub KeyType: ::core::ffi::c_ulong, - pub KeyLength: ::core::ffi::c_ushort, - pub KeyValue: *mut ::core::ffi::c_uchar, - pub VerifyKeyType: ::core::ffi::c_ulong, - pub VerifyKeyLength: ::core::ffi::c_ushort, - pub VerifyKeyValue: *mut ::core::ffi::c_uchar, -} -#[test] -fn bindgen_test_layout__SecPkgContext_NegoKeys() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_NegoKeys> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_NegoKeys>(), - 32usize, - concat!("Size of: ", stringify!(_SecPkgContext_NegoKeys)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_NegoKeys>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_NegoKeys)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_NegoKeys), - "::", - stringify!(KeyType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_NegoKeys), - "::", - stringify!(KeyLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).KeyValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_NegoKeys), - "::", - stringify!(KeyValue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VerifyKeyType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_NegoKeys), - "::", - stringify!(VerifyKeyType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VerifyKeyLength) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_NegoKeys), - "::", - stringify!(VerifyKeyLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VerifyKeyValue) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_NegoKeys), - "::", - stringify!(VerifyKeyValue), - ), - ); -} -impl Default for _SecPkgContext_NegoKeys { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_NegoKeys = _SecPkgContext_NegoKeys; -pub type PSecPkgContext_NegoKeys = *mut _SecPkgContext_NegoKeys; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgContext_PackageInfoW { - pub PackageInfo: PSecPkgInfoW, -} -#[test] -fn bindgen_test_layout__SecPkgContext_PackageInfoW() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_PackageInfoW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_PackageInfoW>(), - 8usize, - concat!("Size of: ", stringify!(_SecPkgContext_PackageInfoW)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_PackageInfoW>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_PackageInfoW)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PackageInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_PackageInfoW), - "::", - stringify!(PackageInfo), - ), - ); -} -impl Default for _SecPkgContext_PackageInfoW { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_PackageInfoW = _SecPkgContext_PackageInfoW; -pub type PSecPkgContext_PackageInfoW = *mut _SecPkgContext_PackageInfoW; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SecPkgContext_UserFlags { - pub UserFlags: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SecPkgContext_UserFlags() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_UserFlags> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_UserFlags>(), - 4usize, - concat!("Size of: ", stringify!(_SecPkgContext_UserFlags)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_UserFlags>(), - 4usize, - concat!("Alignment of ", stringify!(_SecPkgContext_UserFlags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserFlags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_UserFlags), - "::", - stringify!(UserFlags), - ), - ); -} -pub type SecPkgContext_UserFlags = _SecPkgContext_UserFlags; -pub type PSecPkgContext_UserFlags = *mut _SecPkgContext_UserFlags; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SecPkgContext_Flags { - pub Flags: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SecPkgContext_Flags() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_Flags> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_Flags>(), - 4usize, - concat!("Size of: ", stringify!(_SecPkgContext_Flags)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_Flags>(), - 4usize, - concat!("Alignment of ", stringify!(_SecPkgContext_Flags)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_Flags), - "::", - stringify!(Flags), - ), - ); -} -pub type SecPkgContext_Flags = _SecPkgContext_Flags; -pub type PSecPkgContext_Flags = *mut _SecPkgContext_Flags; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgContext_NegotiationInfoW { - pub PackageInfo: PSecPkgInfoW, - pub NegotiationState: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SecPkgContext_NegotiationInfoW() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_NegotiationInfoW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_NegotiationInfoW>(), - 16usize, - concat!("Size of: ", stringify!(_SecPkgContext_NegotiationInfoW)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_NegotiationInfoW>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_NegotiationInfoW)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PackageInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_NegotiationInfoW), - "::", - stringify!(PackageInfo), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NegotiationState) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_NegotiationInfoW), - "::", - stringify!(NegotiationState), - ), - ); -} -impl Default for _SecPkgContext_NegotiationInfoW { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_NegotiationInfoW = _SecPkgContext_NegotiationInfoW; -pub type PSecPkgContext_NegotiationInfoW = *mut _SecPkgContext_NegotiationInfoW; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SecPkgContext_CredentialNameW { - pub CredentialType: ::core::ffi::c_ulong, - pub sCredentialName: *mut SEC_WCHAR, -} -#[test] -fn bindgen_test_layout__SecPkgContext_CredentialNameW() { - const UNINIT: ::core::mem::MaybeUninit<_SecPkgContext_CredentialNameW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SecPkgContext_CredentialNameW>(), - 16usize, - concat!("Size of: ", stringify!(_SecPkgContext_CredentialNameW)), - ); - assert_eq!( - ::core::mem::align_of::<_SecPkgContext_CredentialNameW>(), - 8usize, - concat!("Alignment of ", stringify!(_SecPkgContext_CredentialNameW)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CredentialType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_CredentialNameW), - "::", - stringify!(CredentialType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).sCredentialName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SecPkgContext_CredentialNameW), - "::", - stringify!(sCredentialName), - ), - ); -} -impl Default for _SecPkgContext_CredentialNameW { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecPkgContext_CredentialNameW = _SecPkgContext_CredentialNameW; -pub type PSecPkgContext_CredentialNameW = *mut _SecPkgContext_CredentialNameW; -pub type SEC_GET_KEY_FN = ::core::option::Option< - unsafe extern "C" fn( - Arg: *mut ::core::ffi::c_void, - Principal: *mut ::core::ffi::c_void, - KeyVer: ::core::ffi::c_ulong, - Key: *mut *mut ::core::ffi::c_void, - Status: *mut SECURITY_STATUS, - ), ->; -pub type ACQUIRE_CREDENTIALS_HANDLE_FN_W = ::core::option::Option< - unsafe extern "C" fn( - arg1: PSECURITY_STRING, - arg2: PSECURITY_STRING, - arg3: ::core::ffi::c_ulong, - arg4: *mut ::core::ffi::c_void, - arg5: *mut ::core::ffi::c_void, - arg6: SEC_GET_KEY_FN, - arg7: *mut ::core::ffi::c_void, - arg8: PCredHandle, - arg9: PTimeStamp, - ) -> SECURITY_STATUS, ->; -pub type FREE_CREDENTIALS_HANDLE_FN = ::core::option::Option< - unsafe extern "C" fn(arg1: PCredHandle) -> SECURITY_STATUS, ->; -pub type ADD_CREDENTIALS_FN_W = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCredHandle, - arg2: PSECURITY_STRING, - arg3: PSECURITY_STRING, - arg4: ::core::ffi::c_ulong, - arg5: *mut ::core::ffi::c_void, - arg6: SEC_GET_KEY_FN, - arg7: *mut ::core::ffi::c_void, - arg8: PTimeStamp, - ) -> SECURITY_STATUS, ->; -pub type ADD_CREDENTIALS_FN_A = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCredHandle, - arg2: *mut SEC_CHAR, - arg3: *mut SEC_CHAR, - arg4: ::core::ffi::c_ulong, - arg5: *mut ::core::ffi::c_void, - arg6: SEC_GET_KEY_FN, - arg7: *mut ::core::ffi::c_void, - arg8: PTimeStamp, - ) -> SECURITY_STATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SspiAsyncContext { - _unused: [u8; 0], -} -pub type SspiAsyncContext = _SspiAsyncContext; -pub type SspiAsyncNotifyCallback = ::core::option::Option< - unsafe extern "C" fn(Handle: *mut SspiAsyncContext, CallbackData: PVOID), ->; -pub type INITIALIZE_SECURITY_CONTEXT_FN_W = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCredHandle, - arg2: PCtxtHandle, - arg3: PSECURITY_STRING, - arg4: ::core::ffi::c_ulong, - arg5: ::core::ffi::c_ulong, - arg6: ::core::ffi::c_ulong, - arg7: PSecBufferDesc, - arg8: ::core::ffi::c_ulong, - arg9: PCtxtHandle, - arg10: PSecBufferDesc, - arg11: *mut ::core::ffi::c_ulong, - arg12: PTimeStamp, - ) -> SECURITY_STATUS, ->; -pub type ACCEPT_SECURITY_CONTEXT_FN = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCredHandle, - arg2: PCtxtHandle, - arg3: PSecBufferDesc, - arg4: ::core::ffi::c_ulong, - arg5: ::core::ffi::c_ulong, - arg6: PCtxtHandle, - arg7: PSecBufferDesc, - arg8: *mut ::core::ffi::c_ulong, - arg9: PTimeStamp, - ) -> SECURITY_STATUS, ->; -pub type COMPLETE_AUTH_TOKEN_FN = ::core::option::Option< - unsafe extern "C" fn(arg1: PCtxtHandle, arg2: PSecBufferDesc) -> SECURITY_STATUS, ->; -pub type IMPERSONATE_SECURITY_CONTEXT_FN = ::core::option::Option< - unsafe extern "C" fn(arg1: PCtxtHandle) -> SECURITY_STATUS, ->; -pub type REVERT_SECURITY_CONTEXT_FN = ::core::option::Option< - unsafe extern "C" fn(arg1: PCtxtHandle) -> SECURITY_STATUS, ->; -pub type QUERY_SECURITY_CONTEXT_TOKEN_FN = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCtxtHandle, - arg2: *mut *mut ::core::ffi::c_void, - ) -> SECURITY_STATUS, ->; -pub type DELETE_SECURITY_CONTEXT_FN = ::core::option::Option< - unsafe extern "C" fn(arg1: PCtxtHandle) -> SECURITY_STATUS, ->; -pub type APPLY_CONTROL_TOKEN_FN = ::core::option::Option< - unsafe extern "C" fn(arg1: PCtxtHandle, arg2: PSecBufferDesc) -> SECURITY_STATUS, ->; -pub type QUERY_CONTEXT_ATTRIBUTES_FN_W = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCtxtHandle, - arg2: ::core::ffi::c_ulong, - arg3: *mut ::core::ffi::c_void, - ) -> SECURITY_STATUS, ->; -pub type QUERY_CONTEXT_ATTRIBUTES_EX_FN_W = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCtxtHandle, - arg2: ::core::ffi::c_ulong, - arg3: *mut ::core::ffi::c_void, - arg4: ::core::ffi::c_ulong, - ) -> SECURITY_STATUS, ->; -pub type SET_CONTEXT_ATTRIBUTES_FN_W = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCtxtHandle, - arg2: ::core::ffi::c_ulong, - arg3: *mut ::core::ffi::c_void, - arg4: ::core::ffi::c_ulong, - ) -> SECURITY_STATUS, ->; -pub type QUERY_CREDENTIALS_ATTRIBUTES_FN_W = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCredHandle, - arg2: ::core::ffi::c_ulong, - arg3: *mut ::core::ffi::c_void, - ) -> SECURITY_STATUS, ->; -pub type QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_W = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCredHandle, - arg2: ::core::ffi::c_ulong, - arg3: *mut ::core::ffi::c_void, - arg4: ::core::ffi::c_ulong, - ) -> SECURITY_STATUS, ->; -pub type SET_CREDENTIALS_ATTRIBUTES_FN_W = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCredHandle, - arg2: ::core::ffi::c_ulong, - arg3: *mut ::core::ffi::c_void, - arg4: ::core::ffi::c_ulong, - ) -> SECURITY_STATUS, ->; -pub type FREE_CONTEXT_BUFFER_FN = ::core::option::Option< - unsafe extern "C" fn(arg1: PVOID) -> SECURITY_STATUS, ->; -pub type MAKE_SIGNATURE_FN = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCtxtHandle, - arg2: ::core::ffi::c_ulong, - arg3: PSecBufferDesc, - arg4: ::core::ffi::c_ulong, - ) -> SECURITY_STATUS, ->; -pub type VERIFY_SIGNATURE_FN = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCtxtHandle, - arg2: PSecBufferDesc, - arg3: ::core::ffi::c_ulong, - arg4: *mut ::core::ffi::c_ulong, - ) -> SECURITY_STATUS, ->; -pub type ENCRYPT_MESSAGE_FN = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCtxtHandle, - arg2: ::core::ffi::c_ulong, - arg3: PSecBufferDesc, - arg4: ::core::ffi::c_ulong, - ) -> SECURITY_STATUS, ->; -pub type DECRYPT_MESSAGE_FN = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCtxtHandle, - arg2: PSecBufferDesc, - arg3: ::core::ffi::c_ulong, - arg4: *mut ::core::ffi::c_ulong, - ) -> SECURITY_STATUS, ->; -pub type ENUMERATE_SECURITY_PACKAGES_FN_W = ::core::option::Option< - unsafe extern "C" fn( - arg1: *mut ::core::ffi::c_ulong, - arg2: *mut PSecPkgInfoW, - ) -> SECURITY_STATUS, ->; -pub type QUERY_SECURITY_PACKAGE_INFO_FN_W = ::core::option::Option< - unsafe extern "C" fn( - arg1: PSECURITY_STRING, - arg2: *mut PSecPkgInfoW, - ) -> SECURITY_STATUS, ->; -pub type EXPORT_SECURITY_CONTEXT_FN = ::core::option::Option< - unsafe extern "C" fn( - arg1: PCtxtHandle, - arg2: ULONG, - arg3: PSecBuffer, - arg4: *mut *mut ::core::ffi::c_void, - ) -> SECURITY_STATUS, ->; -pub type IMPORT_SECURITY_CONTEXT_FN_W = ::core::option::Option< - unsafe extern "C" fn( - arg1: PSECURITY_STRING, - arg2: PSecBuffer, - arg3: *mut ::core::ffi::c_void, - arg4: PCtxtHandle, - ) -> SECURITY_STATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SECURITY_FUNCTION_TABLE_W { - pub dwVersion: ::core::ffi::c_ulong, - pub EnumerateSecurityPackagesW: ENUMERATE_SECURITY_PACKAGES_FN_W, - pub QueryCredentialsAttributesW: QUERY_CREDENTIALS_ATTRIBUTES_FN_W, - pub AcquireCredentialsHandleW: ACQUIRE_CREDENTIALS_HANDLE_FN_W, - pub FreeCredentialsHandle: FREE_CREDENTIALS_HANDLE_FN, - pub Reserved2: *mut ::core::ffi::c_void, - pub InitializeSecurityContextW: INITIALIZE_SECURITY_CONTEXT_FN_W, - pub AcceptSecurityContext: ACCEPT_SECURITY_CONTEXT_FN, - pub CompleteAuthToken: COMPLETE_AUTH_TOKEN_FN, - pub DeleteSecurityContext: DELETE_SECURITY_CONTEXT_FN, - pub ApplyControlToken: APPLY_CONTROL_TOKEN_FN, - pub QueryContextAttributesW: QUERY_CONTEXT_ATTRIBUTES_FN_W, - pub ImpersonateSecurityContext: IMPERSONATE_SECURITY_CONTEXT_FN, - pub RevertSecurityContext: REVERT_SECURITY_CONTEXT_FN, - pub MakeSignature: MAKE_SIGNATURE_FN, - pub VerifySignature: VERIFY_SIGNATURE_FN, - pub FreeContextBuffer: FREE_CONTEXT_BUFFER_FN, - pub QuerySecurityPackageInfoW: QUERY_SECURITY_PACKAGE_INFO_FN_W, - pub Reserved3: *mut ::core::ffi::c_void, - pub Reserved4: *mut ::core::ffi::c_void, - pub ExportSecurityContext: EXPORT_SECURITY_CONTEXT_FN, - pub ImportSecurityContextW: IMPORT_SECURITY_CONTEXT_FN_W, - pub AddCredentialsW: ADD_CREDENTIALS_FN_W, - pub Reserved8: *mut ::core::ffi::c_void, - pub QuerySecurityContextToken: QUERY_SECURITY_CONTEXT_TOKEN_FN, - pub EncryptMessage: ENCRYPT_MESSAGE_FN, - pub DecryptMessage: DECRYPT_MESSAGE_FN, - pub SetContextAttributesW: SET_CONTEXT_ATTRIBUTES_FN_W, - pub SetCredentialsAttributesW: SET_CREDENTIALS_ATTRIBUTES_FN_W, - pub Reserved9: *mut ::core::ffi::c_void, - pub QueryContextAttributesExW: QUERY_CONTEXT_ATTRIBUTES_EX_FN_W, - pub QueryCredentialsAttributesExW: QUERY_CREDENTIALS_ATTRIBUTES_EX_FN_W, -} -#[test] -fn bindgen_test_layout__SECURITY_FUNCTION_TABLE_W() { - const UNINIT: ::core::mem::MaybeUninit<_SECURITY_FUNCTION_TABLE_W> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SECURITY_FUNCTION_TABLE_W>(), - 256usize, - concat!("Size of: ", stringify!(_SECURITY_FUNCTION_TABLE_W)), - ); - assert_eq!( - ::core::mem::align_of::<_SECURITY_FUNCTION_TABLE_W>(), - 8usize, - concat!("Alignment of ", stringify!(_SECURITY_FUNCTION_TABLE_W)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(dwVersion), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EnumerateSecurityPackagesW) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(EnumerateSecurityPackagesW), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryCredentialsAttributesW) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(QueryCredentialsAttributesW), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AcquireCredentialsHandleW) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(AcquireCredentialsHandleW), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeCredentialsHandle) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(FreeCredentialsHandle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InitializeSecurityContextW) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(InitializeSecurityContextW), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AcceptSecurityContext) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(AcceptSecurityContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CompleteAuthToken) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(CompleteAuthToken), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeleteSecurityContext) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(DeleteSecurityContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ApplyControlToken) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(ApplyControlToken), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryContextAttributesW) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(QueryContextAttributesW), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ImpersonateSecurityContext) as usize - - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(ImpersonateSecurityContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).RevertSecurityContext) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(RevertSecurityContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MakeSignature) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(MakeSignature), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).VerifySignature) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(VerifySignature), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).FreeContextBuffer) as usize - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(FreeContextBuffer), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QuerySecurityPackageInfoW) as usize - - ptr as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(QuerySecurityPackageInfoW), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved3) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(Reserved3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved4) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(Reserved4), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ExportSecurityContext) as usize - ptr as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(ExportSecurityContext), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ImportSecurityContextW) as usize - ptr as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(ImportSecurityContextW), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AddCredentialsW) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(AddCredentialsW), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved8) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(Reserved8), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QuerySecurityContextToken) as usize - - ptr as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(QuerySecurityContextToken), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EncryptMessage) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(EncryptMessage), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DecryptMessage) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(DecryptMessage), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetContextAttributesW) as usize - ptr as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(SetContextAttributesW), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SetCredentialsAttributesW) as usize - - ptr as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(SetCredentialsAttributesW), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved9) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(Reserved9), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryContextAttributesExW) as usize - - ptr as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(QueryContextAttributesExW), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).QueryCredentialsAttributesExW) as usize - - ptr as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_FUNCTION_TABLE_W), - "::", - stringify!(QueryCredentialsAttributesExW), - ), - ); -} -impl Default for _SECURITY_FUNCTION_TABLE_W { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SecurityFunctionTableW = _SECURITY_FUNCTION_TABLE_W; -pub type PSecurityFunctionTableW = *mut _SECURITY_FUNCTION_TABLE_W; -pub type INIT_SECURITY_INTERFACE_W = ::core::option::Option< - unsafe extern "C" fn() -> PSecurityFunctionTableW, ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _SEC_WINNT_AUTH_IDENTITY_EX2 { - pub Version: ::core::ffi::c_ulong, - pub cbHeaderLength: ::core::ffi::c_ushort, - pub cbStructureLength: ::core::ffi::c_ulong, - pub UserOffset: ::core::ffi::c_ulong, - pub UserLength: ::core::ffi::c_ushort, - pub DomainOffset: ::core::ffi::c_ulong, - pub DomainLength: ::core::ffi::c_ushort, - pub PackedCredentialsOffset: ::core::ffi::c_ulong, - pub PackedCredentialsLength: ::core::ffi::c_ushort, - pub Flags: ::core::ffi::c_ulong, - pub PackageListOffset: ::core::ffi::c_ulong, - pub PackageListLength: ::core::ffi::c_ushort, -} -#[test] -fn bindgen_test_layout__SEC_WINNT_AUTH_IDENTITY_EX2() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_WINNT_AUTH_IDENTITY_EX2> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_WINNT_AUTH_IDENTITY_EX2>(), - 48usize, - concat!("Size of: ", stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_WINNT_AUTH_IDENTITY_EX2>(), - 4usize, - concat!("Alignment of ", stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).cbHeaderLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2), - "::", - stringify!(cbHeaderLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).cbStructureLength) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2), - "::", - stringify!(cbStructureLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserOffset) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2), - "::", - stringify!(UserOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2), - "::", - stringify!(UserLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DomainOffset) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2), - "::", - stringify!(DomainOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DomainLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2), - "::", - stringify!(DomainLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PackedCredentialsOffset) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2), - "::", - stringify!(PackedCredentialsOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PackedCredentialsLength) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2), - "::", - stringify!(PackedCredentialsLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PackageListOffset) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2), - "::", - stringify!(PackageListOffset), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PackageListLength) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EX2), - "::", - stringify!(PackageListLength), - ), - ); -} -pub type SEC_WINNT_AUTH_IDENTITY_EX2 = _SEC_WINNT_AUTH_IDENTITY_EX2; -pub type PSEC_WINNT_AUTH_IDENTITY_EX2 = *mut _SEC_WINNT_AUTH_IDENTITY_EX2; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SEC_WINNT_AUTH_IDENTITY_W { - pub User: *mut ::core::ffi::c_ushort, - pub UserLength: ::core::ffi::c_ulong, - pub Domain: *mut ::core::ffi::c_ushort, - pub DomainLength: ::core::ffi::c_ulong, - pub Password: *mut ::core::ffi::c_ushort, - pub PasswordLength: ::core::ffi::c_ulong, - pub Flags: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SEC_WINNT_AUTH_IDENTITY_W() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_WINNT_AUTH_IDENTITY_W> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_WINNT_AUTH_IDENTITY_W>(), - 48usize, - concat!("Size of: ", stringify!(_SEC_WINNT_AUTH_IDENTITY_W)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_WINNT_AUTH_IDENTITY_W>(), - 8usize, - concat!("Alignment of ", stringify!(_SEC_WINNT_AUTH_IDENTITY_W)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).User) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_W), - "::", - stringify!(User), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_W), - "::", - stringify!(UserLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Domain) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_W), - "::", - stringify!(Domain), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DomainLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_W), - "::", - stringify!(DomainLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Password) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_W), - "::", - stringify!(Password), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PasswordLength) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_W), - "::", - stringify!(PasswordLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_W), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _SEC_WINNT_AUTH_IDENTITY_W { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SEC_WINNT_AUTH_IDENTITY_W = _SEC_WINNT_AUTH_IDENTITY_W; -pub type PSEC_WINNT_AUTH_IDENTITY_W = *mut _SEC_WINNT_AUTH_IDENTITY_W; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SEC_WINNT_AUTH_IDENTITY_EXW { - pub Version: ::core::ffi::c_ulong, - pub Length: ::core::ffi::c_ulong, - pub User: *mut ::core::ffi::c_ushort, - pub UserLength: ::core::ffi::c_ulong, - pub Domain: *mut ::core::ffi::c_ushort, - pub DomainLength: ::core::ffi::c_ulong, - pub Password: *mut ::core::ffi::c_ushort, - pub PasswordLength: ::core::ffi::c_ulong, - pub Flags: ::core::ffi::c_ulong, - pub PackageList: *mut ::core::ffi::c_ushort, - pub PackageListLength: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__SEC_WINNT_AUTH_IDENTITY_EXW() { - const UNINIT: ::core::mem::MaybeUninit<_SEC_WINNT_AUTH_IDENTITY_EXW> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SEC_WINNT_AUTH_IDENTITY_EXW>(), - 72usize, - concat!("Size of: ", stringify!(_SEC_WINNT_AUTH_IDENTITY_EXW)), - ); - assert_eq!( - ::core::mem::align_of::<_SEC_WINNT_AUTH_IDENTITY_EXW>(), - 8usize, - concat!("Alignment of ", stringify!(_SEC_WINNT_AUTH_IDENTITY_EXW)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EXW), - "::", - stringify!(Version), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EXW), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).User) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EXW), - "::", - stringify!(User), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EXW), - "::", - stringify!(UserLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Domain) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EXW), - "::", - stringify!(Domain), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DomainLength) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EXW), - "::", - stringify!(DomainLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Password) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EXW), - "::", - stringify!(Password), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PasswordLength) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EXW), - "::", - stringify!(PasswordLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EXW), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PackageList) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EXW), - "::", - stringify!(PackageList), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PackageListLength) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_SEC_WINNT_AUTH_IDENTITY_EXW), - "::", - stringify!(PackageListLength), - ), - ); -} -impl Default for _SEC_WINNT_AUTH_IDENTITY_EXW { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SEC_WINNT_AUTH_IDENTITY_EXW = _SEC_WINNT_AUTH_IDENTITY_EXW; -pub type PSEC_WINNT_AUTH_IDENTITY_EXW = *mut _SEC_WINNT_AUTH_IDENTITY_EXW; -pub type PSEC_WINNT_AUTH_IDENTITY_OPAQUE = PVOID; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _SECURITY_USER_DATA { - pub UserName: SECURITY_STRING, - pub LogonDomainName: SECURITY_STRING, - pub LogonServer: SECURITY_STRING, - pub pSid: PSID, -} -#[test] -fn bindgen_test_layout__SECURITY_USER_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_SECURITY_USER_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_SECURITY_USER_DATA>(), - 56usize, - concat!("Size of: ", stringify!(_SECURITY_USER_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_SECURITY_USER_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_SECURITY_USER_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UserName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_USER_DATA), - "::", - stringify!(UserName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonDomainName) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_USER_DATA), - "::", - stringify!(LogonDomainName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LogonServer) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_USER_DATA), - "::", - stringify!(LogonServer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pSid) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_SECURITY_USER_DATA), - "::", - stringify!(pSid), - ), - ); -} -impl Default for _SECURITY_USER_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type SECURITY_USER_DATA = _SECURITY_USER_DATA; -pub type PSECURITY_USER_DATA = *mut _SECURITY_USER_DATA; -pub type SecurityUserData = SECURITY_USER_DATA; -pub type PSecurityUserData = *mut SECURITY_USER_DATA; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _QUERY_PATH_REQUEST { - pub PathNameLength: ULONG, - pub SecurityContext: PIO_SECURITY_CONTEXT, - pub FilePathName: [WCHAR; 1usize], -} -#[test] -fn bindgen_test_layout__QUERY_PATH_REQUEST() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_PATH_REQUEST> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_PATH_REQUEST>(), - 24usize, - concat!("Size of: ", stringify!(_QUERY_PATH_REQUEST)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_PATH_REQUEST>(), - 8usize, - concat!("Alignment of ", stringify!(_QUERY_PATH_REQUEST)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PathNameLength) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_PATH_REQUEST), - "::", - stringify!(PathNameLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecurityContext) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_PATH_REQUEST), - "::", - stringify!(SecurityContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FilePathName) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_PATH_REQUEST), - "::", - stringify!(FilePathName), - ), - ); -} -impl Default for _QUERY_PATH_REQUEST { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type QUERY_PATH_REQUEST = _QUERY_PATH_REQUEST; -pub type PQUERY_PATH_REQUEST = *mut _QUERY_PATH_REQUEST; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _QUERY_PATH_REQUEST_EX { - pub pSecurityContext: PIO_SECURITY_CONTEXT, - pub EaLength: ULONG, - pub pEaBuffer: PVOID, - pub PathName: UNICODE_STRING, - pub DomainServiceName: UNICODE_STRING, - pub EcpList: PECP_LIST, - pub Silo: PESILO, - pub Reserved: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__QUERY_PATH_REQUEST_EX() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_PATH_REQUEST_EX> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_PATH_REQUEST_EX>(), - 80usize, - concat!("Size of: ", stringify!(_QUERY_PATH_REQUEST_EX)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_PATH_REQUEST_EX>(), - 8usize, - concat!("Alignment of ", stringify!(_QUERY_PATH_REQUEST_EX)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).pSecurityContext) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_PATH_REQUEST_EX), - "::", - stringify!(pSecurityContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_PATH_REQUEST_EX), - "::", - stringify!(EaLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).pEaBuffer) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_PATH_REQUEST_EX), - "::", - stringify!(pEaBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PathName) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_PATH_REQUEST_EX), - "::", - stringify!(PathName), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DomainServiceName) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_PATH_REQUEST_EX), - "::", - stringify!(DomainServiceName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EcpList) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_PATH_REQUEST_EX), - "::", - stringify!(EcpList), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Silo) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_PATH_REQUEST_EX), - "::", - stringify!(Silo), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_PATH_REQUEST_EX), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _QUERY_PATH_REQUEST_EX { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type QUERY_PATH_REQUEST_EX = _QUERY_PATH_REQUEST_EX; -pub type PQUERY_PATH_REQUEST_EX = *mut _QUERY_PATH_REQUEST_EX; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _QUERY_PATH_RESPONSE { - pub LengthAccepted: ULONG, -} -#[test] -fn bindgen_test_layout__QUERY_PATH_RESPONSE() { - const UNINIT: ::core::mem::MaybeUninit<_QUERY_PATH_RESPONSE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_QUERY_PATH_RESPONSE>(), - 4usize, - concat!("Size of: ", stringify!(_QUERY_PATH_RESPONSE)), - ); - assert_eq!( - ::core::mem::align_of::<_QUERY_PATH_RESPONSE>(), - 4usize, - concat!("Alignment of ", stringify!(_QUERY_PATH_RESPONSE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LengthAccepted) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_QUERY_PATH_RESPONSE), - "::", - stringify!(LengthAccepted), - ), - ); -} -pub type QUERY_PATH_RESPONSE = _QUERY_PATH_RESPONSE; -pub type PQUERY_PATH_RESPONSE = *mut _QUERY_PATH_RESPONSE; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KGDTENTRY64 { - pub __bindgen_anon_1: _KGDTENTRY64__bindgen_ty_1, - pub Alignment: ::core::ffi::c_ulonglong, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _KGDTENTRY64__bindgen_ty_1 { - pub LimitLow: ::core::ffi::c_ushort, - pub BaseLow: ::core::ffi::c_ushort, - pub __bindgen_anon_1: _KGDTENTRY64__bindgen_ty_1__bindgen_ty_1, - pub BaseUpper: ::core::ffi::c_ulong, - pub MustBeZero: ::core::ffi::c_ulong, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KGDTENTRY64__bindgen_ty_1__bindgen_ty_1 { - pub Bytes: _KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - pub Bits: _KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { - pub BaseMiddle: ::core::ffi::c_uchar, - pub Flags1: ::core::ffi::c_uchar, - pub Flags2: ::core::ffi::c_uchar, - pub BaseHigh: ::core::ffi::c_uchar, -} -#[test] -fn bindgen_test_layout__KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, - >(), - 1usize, - concat!( - "Alignment of ", - stringify!(_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseMiddle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(BaseMiddle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags1) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Flags1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags2) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Flags2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseHigh) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(BaseHigh), - ), - ); -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout__KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2() { - assert_eq!( - ::core::mem::size_of::<_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2>(), - 4usize, - concat!( - "Size of: ", - stringify!(_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2), - ), - ); -} -impl _KGDTENTRY64__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 { - #[inline] - pub fn BaseMiddle(&self) -> ::core::ffi::c_ulong { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set_BaseMiddle(&mut self, val: ::core::ffi::c_ulong) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn Type(&self) -> ::core::ffi::c_ulong { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 5u8) as u32) } - } - #[inline] - pub fn set_Type(&mut self, val: ::core::ffi::c_ulong) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 5u8, val as u64) - } - } - #[inline] - pub fn Dpl(&self) -> ::core::ffi::c_ulong { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 2u8) as u32) } - } - #[inline] - pub fn set_Dpl(&mut self, val: ::core::ffi::c_ulong) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 2u8, val as u64) - } - } - #[inline] - pub fn Present(&self) -> ::core::ffi::c_ulong { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } - } - #[inline] - pub fn set_Present(&mut self, val: ::core::ffi::c_ulong) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn LimitHigh(&self) -> ::core::ffi::c_ulong { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 4u8) as u32) } - } - #[inline] - pub fn set_LimitHigh(&mut self, val: ::core::ffi::c_ulong) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 4u8, val as u64) - } - } - #[inline] - pub fn System(&self) -> ::core::ffi::c_ulong { - unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } - } - #[inline] - pub fn set_System(&mut self, val: ::core::ffi::c_ulong) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(20usize, 1u8, val as u64) - } - } - #[inline] - pub fn LongMode(&self) -> ::core::ffi::c_ulong { - unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } - } - #[inline] - pub fn set_LongMode(&mut self, val: ::core::ffi::c_ulong) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(21usize, 1u8, val as u64) - } - } - #[inline] - pub fn DefaultBig(&self) -> ::core::ffi::c_ulong { - unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u32) } - } - #[inline] - pub fn set_DefaultBig(&mut self, val: ::core::ffi::c_ulong) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(22usize, 1u8, val as u64) - } - } - #[inline] - pub fn Granularity(&self) -> ::core::ffi::c_ulong { - unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u32) } - } - #[inline] - pub fn set_Granularity(&mut self, val: ::core::ffi::c_ulong) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(23usize, 1u8, val as u64) - } - } - #[inline] - pub fn BaseHigh(&self) -> ::core::ffi::c_ulong { - unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } - } - #[inline] - pub fn set_BaseHigh(&mut self, val: ::core::ffi::c_ulong) { - unsafe { - let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(24usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - BaseMiddle: ::core::ffi::c_ulong, - Type: ::core::ffi::c_ulong, - Dpl: ::core::ffi::c_ulong, - Present: ::core::ffi::c_ulong, - LimitHigh: ::core::ffi::c_ulong, - System: ::core::ffi::c_ulong, - LongMode: ::core::ffi::c_ulong, - DefaultBig: ::core::ffi::c_ulong, - Granularity: ::core::ffi::c_ulong, - BaseHigh: ::core::ffi::c_ulong, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 8u8, - { - let BaseMiddle: u32 = unsafe { ::core::mem::transmute(BaseMiddle) }; - BaseMiddle as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 5u8, - { - let Type: u32 = unsafe { ::core::mem::transmute(Type) }; - Type as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 2u8, - { - let Dpl: u32 = unsafe { ::core::mem::transmute(Dpl) }; - Dpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let Present: u32 = unsafe { ::core::mem::transmute(Present) }; - Present as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 16usize, - 4u8, - { - let LimitHigh: u32 = unsafe { ::core::mem::transmute(LimitHigh) }; - LimitHigh as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 20usize, - 1u8, - { - let System: u32 = unsafe { ::core::mem::transmute(System) }; - System as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 21usize, - 1u8, - { - let LongMode: u32 = unsafe { ::core::mem::transmute(LongMode) }; - LongMode as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 22usize, - 1u8, - { - let DefaultBig: u32 = unsafe { ::core::mem::transmute(DefaultBig) }; - DefaultBig as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 23usize, - 1u8, - { - let Granularity: u32 = unsafe { - ::core::mem::transmute(Granularity) - }; - Granularity as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 24usize, - 8u8, - { - let BaseHigh: u32 = unsafe { ::core::mem::transmute(BaseHigh) }; - BaseHigh as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__KGDTENTRY64__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bytes) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Bytes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KGDTENTRY64__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Bits), - ), - ); -} -impl Default for _KGDTENTRY64__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__KGDTENTRY64__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KGDTENTRY64__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KGDTENTRY64__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_KGDTENTRY64__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KGDTENTRY64__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_KGDTENTRY64__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LimitLow) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KGDTENTRY64__bindgen_ty_1), - "::", - stringify!(LimitLow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseLow) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_KGDTENTRY64__bindgen_ty_1), - "::", - stringify!(BaseLow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BaseUpper) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KGDTENTRY64__bindgen_ty_1), - "::", - stringify!(BaseUpper), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MustBeZero) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KGDTENTRY64__bindgen_ty_1), - "::", - stringify!(MustBeZero), - ), - ); -} -impl Default for _KGDTENTRY64__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__KGDTENTRY64() { - const UNINIT: ::core::mem::MaybeUninit<_KGDTENTRY64> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KGDTENTRY64>(), - 16usize, - concat!("Size of: ", stringify!(_KGDTENTRY64)), - ); - assert_eq!( - ::core::mem::align_of::<_KGDTENTRY64>(), - 8usize, - concat!("Alignment of ", stringify!(_KGDTENTRY64)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Alignment) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KGDTENTRY64), - "::", - stringify!(Alignment), - ), - ); -} -impl Default for _KGDTENTRY64 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KGDTENTRY64 = _KGDTENTRY64; -pub type PKGDTENTRY64 = *mut _KGDTENTRY64; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _KIDTENTRY64 { - pub __bindgen_anon_1: _KIDTENTRY64__bindgen_ty_1, - pub Alignment: ::core::ffi::c_ulonglong, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KIDTENTRY64__bindgen_ty_1 { - pub OffsetLow: ::core::ffi::c_ushort, - pub Selector: ::core::ffi::c_ushort, - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, - pub OffsetMiddle: ::core::ffi::c_ushort, - pub OffsetHigh: ::core::ffi::c_ulong, - pub Reserved1: ::core::ffi::c_ulong, -} -#[test] -fn bindgen_test_layout__KIDTENTRY64__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_KIDTENTRY64__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KIDTENTRY64__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_KIDTENTRY64__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_KIDTENTRY64__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_KIDTENTRY64__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OffsetLow) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KIDTENTRY64__bindgen_ty_1), - "::", - stringify!(OffsetLow), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Selector) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_KIDTENTRY64__bindgen_ty_1), - "::", - stringify!(Selector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OffsetMiddle) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(_KIDTENTRY64__bindgen_ty_1), - "::", - stringify!(OffsetMiddle), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).OffsetHigh) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_KIDTENTRY64__bindgen_ty_1), - "::", - stringify!(OffsetHigh), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_KIDTENTRY64__bindgen_ty_1), - "::", - stringify!(Reserved1), - ), - ); -} -impl _KIDTENTRY64__bindgen_ty_1 { - #[inline] - pub fn IstIndex(&self) -> ::core::ffi::c_ushort { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u16) } - } - #[inline] - pub fn set_IstIndex(&mut self, val: ::core::ffi::c_ushort) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 3u8, val as u64) - } - } - #[inline] - pub fn Reserved0(&self) -> ::core::ffi::c_ushort { - unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u16) } - } - #[inline] - pub fn set_Reserved0(&mut self, val: ::core::ffi::c_ushort) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(3usize, 5u8, val as u64) - } - } - #[inline] - pub fn Type(&self) -> ::core::ffi::c_ushort { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 5u8) as u16) } - } - #[inline] - pub fn set_Type(&mut self, val: ::core::ffi::c_ushort) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 5u8, val as u64) - } - } - #[inline] - pub fn Dpl(&self) -> ::core::ffi::c_ushort { - unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 2u8) as u16) } - } - #[inline] - pub fn set_Dpl(&mut self, val: ::core::ffi::c_ushort) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(13usize, 2u8, val as u64) - } - } - #[inline] - pub fn Present(&self) -> ::core::ffi::c_ushort { - unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } - } - #[inline] - pub fn set_Present(&mut self, val: ::core::ffi::c_ushort) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - IstIndex: ::core::ffi::c_ushort, - Reserved0: ::core::ffi::c_ushort, - Type: ::core::ffi::c_ushort, - Dpl: ::core::ffi::c_ushort, - Present: ::core::ffi::c_ushort, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit - .set( - 0usize, - 3u8, - { - let IstIndex: u16 = unsafe { ::core::mem::transmute(IstIndex) }; - IstIndex as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 3usize, - 5u8, - { - let Reserved0: u16 = unsafe { ::core::mem::transmute(Reserved0) }; - Reserved0 as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 8usize, - 5u8, - { - let Type: u16 = unsafe { ::core::mem::transmute(Type) }; - Type as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 13usize, - 2u8, - { - let Dpl: u16 = unsafe { ::core::mem::transmute(Dpl) }; - Dpl as u64 - }, - ); - __bindgen_bitfield_unit - .set( - 15usize, - 1u8, - { - let Present: u16 = unsafe { ::core::mem::transmute(Present) }; - Present as u64 - }, - ); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout__KIDTENTRY64() { - const UNINIT: ::core::mem::MaybeUninit<_KIDTENTRY64> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_KIDTENTRY64>(), - 16usize, - concat!("Size of: ", stringify!(_KIDTENTRY64)), - ); - assert_eq!( - ::core::mem::align_of::<_KIDTENTRY64>(), - 8usize, - concat!("Alignment of ", stringify!(_KIDTENTRY64)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Alignment) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_KIDTENTRY64), - "::", - stringify!(Alignment), - ), - ); -} -impl Default for _KIDTENTRY64 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type KIDTENTRY64 = _KIDTENTRY64; -pub type PKIDTENTRY64 = *mut _KIDTENTRY64; -pub type WDFFUNC = ::core::option::Option; -pub type __prefast_analysis_mode_flag2 = ::core::ffi::c_int; -pub type BYTE = UCHAR; -pub mod _WDF_TRI_STATE { - pub type Type = ::core::ffi::c_int; - pub const WdfFalse: Type = 0; - pub const WdfTrue: Type = 1; - pub const WdfUseDefault: Type = 2; -} -pub use self::_WDF_TRI_STATE::Type as WDF_TRI_STATE; -pub type PWDF_TRI_STATE = *mut _WDF_TRI_STATE::Type; -pub type WDF_STRUCT_INFO = *mut usize; -pub type WDFCONTEXT = PVOID; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct WDFDEVICE_INIT { - _unused: [u8; 0], -} -pub type PWDFDEVICE_INIT = *mut WDFDEVICE_INIT; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct WDFCXDEVICE_INIT { - _unused: [u8; 0], -} -pub type PWDFCXDEVICE_INIT = *mut WDFCXDEVICE_INIT; -pub type PWDF_OBJECT_ATTRIBUTES = *mut _WDF_OBJECT_ATTRIBUTES; -pub type WDFOBJECT = HANDLE; -pub type PWDFOBJECT = *mut HANDLE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFDRIVER__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFDRIVER__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFDRIVER__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFDRIVER__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFDRIVER__), "::", stringify!(unused)), - ); -} -pub type WDFDRIVER = *mut WDFDRIVER__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFDEVICE__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFDEVICE__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFDEVICE__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFDEVICE__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFDEVICE__), "::", stringify!(unused)), - ); -} -pub type WDFDEVICE = *mut WDFDEVICE__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFWMIPROVIDER__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFWMIPROVIDER__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFWMIPROVIDER__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFWMIPROVIDER__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFWMIPROVIDER__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFWMIPROVIDER = *mut WDFWMIPROVIDER__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFWMIINSTANCE__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFWMIINSTANCE__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFWMIINSTANCE__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFWMIINSTANCE__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFWMIINSTANCE__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFWMIINSTANCE = *mut WDFWMIINSTANCE__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFQUEUE__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFQUEUE__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFQUEUE__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFQUEUE__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFQUEUE__), "::", stringify!(unused)), - ); -} -pub type WDFQUEUE = *mut WDFQUEUE__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFREQUEST__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFREQUEST__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFREQUEST__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFREQUEST__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFREQUEST__), "::", stringify!(unused)), - ); -} -pub type WDFREQUEST = *mut WDFREQUEST__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFFILEOBJECT__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFFILEOBJECT__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFFILEOBJECT__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFFILEOBJECT__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFFILEOBJECT__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFFILEOBJECT = *mut WDFFILEOBJECT__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFDPC__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFDPC__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFDPC__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFDPC__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFDPC__), "::", stringify!(unused)), - ); -} -pub type WDFDPC = *mut WDFDPC__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFTIMER__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFTIMER__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFTIMER__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFTIMER__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFTIMER__), "::", stringify!(unused)), - ); -} -pub type WDFTIMER = *mut WDFTIMER__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFWORKITEM__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFWORKITEM__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFWORKITEM__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFWORKITEM__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFWORKITEM__), "::", stringify!(unused)), - ); -} -pub type WDFWORKITEM = *mut WDFWORKITEM__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFINTERRUPT__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFINTERRUPT__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFINTERRUPT__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFINTERRUPT__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFINTERRUPT__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFINTERRUPT = *mut WDFINTERRUPT__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFWAITLOCK__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFWAITLOCK__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFWAITLOCK__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFWAITLOCK__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFWAITLOCK__), "::", stringify!(unused)), - ); -} -pub type WDFWAITLOCK = *mut WDFWAITLOCK__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFSPINLOCK__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFSPINLOCK__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFSPINLOCK__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFSPINLOCK__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFSPINLOCK__), "::", stringify!(unused)), - ); -} -pub type WDFSPINLOCK = *mut WDFSPINLOCK__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFMEMORY__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFMEMORY__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFMEMORY__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFMEMORY__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFMEMORY__), "::", stringify!(unused)), - ); -} -pub type WDFMEMORY = *mut WDFMEMORY__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFLOOKASIDE__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFLOOKASIDE__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFLOOKASIDE__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFLOOKASIDE__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFLOOKASIDE__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFLOOKASIDE = *mut WDFLOOKASIDE__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFIOTARGET__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFIOTARGET__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFIOTARGET__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFIOTARGET__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFIOTARGET__), "::", stringify!(unused)), - ); -} -pub type WDFIOTARGET = *mut WDFIOTARGET__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFUSBDEVICE__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFUSBDEVICE__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFUSBDEVICE__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFUSBDEVICE__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFUSBDEVICE__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFUSBDEVICE = *mut WDFUSBDEVICE__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFUSBINTERFACE__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFUSBINTERFACE__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFUSBINTERFACE__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFUSBINTERFACE__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFUSBINTERFACE__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFUSBINTERFACE = *mut WDFUSBINTERFACE__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFUSBPIPE__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFUSBPIPE__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFUSBPIPE__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFUSBPIPE__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFUSBPIPE__), "::", stringify!(unused)), - ); -} -pub type WDFUSBPIPE = *mut WDFUSBPIPE__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFDMAENABLER__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFDMAENABLER__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFDMAENABLER__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFDMAENABLER__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFDMAENABLER__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFDMAENABLER = *mut WDFDMAENABLER__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFDMATRANSACTION__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFDMATRANSACTION__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFDMATRANSACTION__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFDMATRANSACTION__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFDMATRANSACTION__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFDMATRANSACTION = *mut WDFDMATRANSACTION__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFCOMMONBUFFER__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFCOMMONBUFFER__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFCOMMONBUFFER__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFCOMMONBUFFER__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFCOMMONBUFFER__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFCOMMONBUFFER = *mut WDFCOMMONBUFFER__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFKEY__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFKEY__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFKEY__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFKEY__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFKEY__), "::", stringify!(unused)), - ); -} -pub type WDFKEY = *mut WDFKEY__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFSTRING__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFSTRING__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFSTRING__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFSTRING__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(WDFSTRING__), "::", stringify!(unused)), - ); -} -pub type WDFSTRING = *mut WDFSTRING__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFCOLLECTION__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFCOLLECTION__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFCOLLECTION__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFCOLLECTION__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFCOLLECTION__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFCOLLECTION = *mut WDFCOLLECTION__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFCHILDLIST__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFCHILDLIST__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFCHILDLIST__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFCHILDLIST__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFCHILDLIST__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFCHILDLIST = *mut WDFCHILDLIST__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFIORESREQLIST__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFIORESREQLIST__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFIORESREQLIST__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFIORESREQLIST__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFIORESREQLIST__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFIORESREQLIST = *mut WDFIORESREQLIST__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFIORESLIST__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFIORESLIST__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFIORESLIST__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFIORESLIST__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFIORESLIST__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFIORESLIST = *mut WDFIORESLIST__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFCMRESLIST__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFCMRESLIST__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFCMRESLIST__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFCMRESLIST__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFCMRESLIST__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFCMRESLIST = *mut WDFCMRESLIST__; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct WDFCOMPANIONTARGET__ { - pub unused: ::core::ffi::c_int, -} -#[test] -fn bindgen_test_layout_WDFCOMPANIONTARGET__() { - const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(WDFCOMPANIONTARGET__)), - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(WDFCOMPANIONTARGET__)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).unused) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(WDFCOMPANIONTARGET__), - "::", - stringify!(unused), - ), - ); -} -pub type WDFCOMPANIONTARGET = *mut WDFCOMPANIONTARGET__; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DRIVER_GLOBALS { - pub Driver: WDFDRIVER, - pub DriverFlags: ULONG, - pub DriverTag: ULONG, - pub DriverName: [CHAR; 32usize], - pub DisplaceDriverUnload: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WDF_DRIVER_GLOBALS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DRIVER_GLOBALS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DRIVER_GLOBALS>(), - 56usize, - concat!("Size of: ", stringify!(_WDF_DRIVER_GLOBALS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DRIVER_GLOBALS>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_DRIVER_GLOBALS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Driver) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DRIVER_GLOBALS), - "::", - stringify!(Driver), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverFlags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DRIVER_GLOBALS), - "::", - stringify!(DriverFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverTag) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DRIVER_GLOBALS), - "::", - stringify!(DriverTag), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverName) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DRIVER_GLOBALS), - "::", - stringify!(DriverName), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DisplaceDriverUnload) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DRIVER_GLOBALS), - "::", - stringify!(DisplaceDriverUnload), - ), - ); -} -impl Default for _WDF_DRIVER_GLOBALS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_DRIVER_GLOBALS = _WDF_DRIVER_GLOBALS; -pub type PWDF_DRIVER_GLOBALS = *mut _WDF_DRIVER_GLOBALS; -pub mod _WDFFUNCENUM { - pub type Type = ::core::ffi::c_int; - pub const WdfChildListCreateTableIndex: Type = 0; - pub const WdfChildListGetDeviceTableIndex: Type = 1; - pub const WdfChildListRetrievePdoTableIndex: Type = 2; - pub const WdfChildListRetrieveAddressDescriptionTableIndex: Type = 3; - pub const WdfChildListBeginScanTableIndex: Type = 4; - pub const WdfChildListEndScanTableIndex: Type = 5; - pub const WdfChildListBeginIterationTableIndex: Type = 6; - pub const WdfChildListRetrieveNextDeviceTableIndex: Type = 7; - pub const WdfChildListEndIterationTableIndex: Type = 8; - pub const WdfChildListAddOrUpdateChildDescriptionAsPresentTableIndex: Type = 9; - pub const WdfChildListUpdateChildDescriptionAsMissingTableIndex: Type = 10; - pub const WdfChildListUpdateAllChildDescriptionsAsPresentTableIndex: Type = 11; - pub const WdfChildListRequestChildEjectTableIndex: Type = 12; - pub const WdfCollectionCreateTableIndex: Type = 13; - pub const WdfCollectionGetCountTableIndex: Type = 14; - pub const WdfCollectionAddTableIndex: Type = 15; - pub const WdfCollectionRemoveTableIndex: Type = 16; - pub const WdfCollectionRemoveItemTableIndex: Type = 17; - pub const WdfCollectionGetItemTableIndex: Type = 18; - pub const WdfCollectionGetFirstItemTableIndex: Type = 19; - pub const WdfCollectionGetLastItemTableIndex: Type = 20; - pub const WdfCommonBufferCreateTableIndex: Type = 21; - pub const WdfCommonBufferGetAlignedVirtualAddressTableIndex: Type = 22; - pub const WdfCommonBufferGetAlignedLogicalAddressTableIndex: Type = 23; - pub const WdfCommonBufferGetLengthTableIndex: Type = 24; - pub const WdfControlDeviceInitAllocateTableIndex: Type = 25; - pub const WdfControlDeviceInitSetShutdownNotificationTableIndex: Type = 26; - pub const WdfControlFinishInitializingTableIndex: Type = 27; - pub const WdfDeviceGetDeviceStateTableIndex: Type = 28; - pub const WdfDeviceSetDeviceStateTableIndex: Type = 29; - pub const WdfWdmDeviceGetWdfDeviceHandleTableIndex: Type = 30; - pub const WdfDeviceWdmGetDeviceObjectTableIndex: Type = 31; - pub const WdfDeviceWdmGetAttachedDeviceTableIndex: Type = 32; - pub const WdfDeviceWdmGetPhysicalDeviceTableIndex: Type = 33; - pub const WdfDeviceWdmDispatchPreprocessedIrpTableIndex: Type = 34; - pub const WdfDeviceAddDependentUsageDeviceObjectTableIndex: Type = 35; - pub const WdfDeviceAddRemovalRelationsPhysicalDeviceTableIndex: Type = 36; - pub const WdfDeviceRemoveRemovalRelationsPhysicalDeviceTableIndex: Type = 37; - pub const WdfDeviceClearRemovalRelationsDevicesTableIndex: Type = 38; - pub const WdfDeviceGetDriverTableIndex: Type = 39; - pub const WdfDeviceRetrieveDeviceNameTableIndex: Type = 40; - pub const WdfDeviceAssignMofResourceNameTableIndex: Type = 41; - pub const WdfDeviceGetIoTargetTableIndex: Type = 42; - pub const WdfDeviceGetDevicePnpStateTableIndex: Type = 43; - pub const WdfDeviceGetDevicePowerStateTableIndex: Type = 44; - pub const WdfDeviceGetDevicePowerPolicyStateTableIndex: Type = 45; - pub const WdfDeviceAssignS0IdleSettingsTableIndex: Type = 46; - pub const WdfDeviceAssignSxWakeSettingsTableIndex: Type = 47; - pub const WdfDeviceOpenRegistryKeyTableIndex: Type = 48; - pub const WdfDeviceSetSpecialFileSupportTableIndex: Type = 49; - pub const WdfDeviceSetCharacteristicsTableIndex: Type = 50; - pub const WdfDeviceGetCharacteristicsTableIndex: Type = 51; - pub const WdfDeviceGetAlignmentRequirementTableIndex: Type = 52; - pub const WdfDeviceSetAlignmentRequirementTableIndex: Type = 53; - pub const WdfDeviceInitFreeTableIndex: Type = 54; - pub const WdfDeviceInitSetPnpPowerEventCallbacksTableIndex: Type = 55; - pub const WdfDeviceInitSetPowerPolicyEventCallbacksTableIndex: Type = 56; - pub const WdfDeviceInitSetPowerPolicyOwnershipTableIndex: Type = 57; - pub const WdfDeviceInitRegisterPnpStateChangeCallbackTableIndex: Type = 58; - pub const WdfDeviceInitRegisterPowerStateChangeCallbackTableIndex: Type = 59; - pub const WdfDeviceInitRegisterPowerPolicyStateChangeCallbackTableIndex: Type = 60; - pub const WdfDeviceInitSetIoTypeTableIndex: Type = 61; - pub const WdfDeviceInitSetExclusiveTableIndex: Type = 62; - pub const WdfDeviceInitSetPowerNotPageableTableIndex: Type = 63; - pub const WdfDeviceInitSetPowerPageableTableIndex: Type = 64; - pub const WdfDeviceInitSetPowerInrushTableIndex: Type = 65; - pub const WdfDeviceInitSetDeviceTypeTableIndex: Type = 66; - pub const WdfDeviceInitAssignNameTableIndex: Type = 67; - pub const WdfDeviceInitAssignSDDLStringTableIndex: Type = 68; - pub const WdfDeviceInitSetDeviceClassTableIndex: Type = 69; - pub const WdfDeviceInitSetCharacteristicsTableIndex: Type = 70; - pub const WdfDeviceInitSetFileObjectConfigTableIndex: Type = 71; - pub const WdfDeviceInitSetRequestAttributesTableIndex: Type = 72; - pub const WdfDeviceInitAssignWdmIrpPreprocessCallbackTableIndex: Type = 73; - pub const WdfDeviceInitSetIoInCallerContextCallbackTableIndex: Type = 74; - pub const WdfDeviceCreateTableIndex: Type = 75; - pub const WdfDeviceSetStaticStopRemoveTableIndex: Type = 76; - pub const WdfDeviceCreateDeviceInterfaceTableIndex: Type = 77; - pub const WdfDeviceSetDeviceInterfaceStateTableIndex: Type = 78; - pub const WdfDeviceRetrieveDeviceInterfaceStringTableIndex: Type = 79; - pub const WdfDeviceCreateSymbolicLinkTableIndex: Type = 80; - pub const WdfDeviceQueryPropertyTableIndex: Type = 81; - pub const WdfDeviceAllocAndQueryPropertyTableIndex: Type = 82; - pub const WdfDeviceSetPnpCapabilitiesTableIndex: Type = 83; - pub const WdfDeviceSetPowerCapabilitiesTableIndex: Type = 84; - pub const WdfDeviceSetBusInformationForChildrenTableIndex: Type = 85; - pub const WdfDeviceIndicateWakeStatusTableIndex: Type = 86; - pub const WdfDeviceSetFailedTableIndex: Type = 87; - pub const WdfDeviceStopIdleNoTrackTableIndex: Type = 88; - pub const WdfDeviceResumeIdleNoTrackTableIndex: Type = 89; - pub const WdfDeviceGetFileObjectTableIndex: Type = 90; - pub const WdfDeviceEnqueueRequestTableIndex: Type = 91; - pub const WdfDeviceGetDefaultQueueTableIndex: Type = 92; - pub const WdfDeviceConfigureRequestDispatchingTableIndex: Type = 93; - pub const WdfDmaEnablerCreateTableIndex: Type = 94; - pub const WdfDmaEnablerGetMaximumLengthTableIndex: Type = 95; - pub const WdfDmaEnablerGetMaximumScatterGatherElementsTableIndex: Type = 96; - pub const WdfDmaEnablerSetMaximumScatterGatherElementsTableIndex: Type = 97; - pub const WdfDmaTransactionCreateTableIndex: Type = 98; - pub const WdfDmaTransactionInitializeTableIndex: Type = 99; - pub const WdfDmaTransactionInitializeUsingRequestTableIndex: Type = 100; - pub const WdfDmaTransactionExecuteTableIndex: Type = 101; - pub const WdfDmaTransactionReleaseTableIndex: Type = 102; - pub const WdfDmaTransactionDmaCompletedTableIndex: Type = 103; - pub const WdfDmaTransactionDmaCompletedWithLengthTableIndex: Type = 104; - pub const WdfDmaTransactionDmaCompletedFinalTableIndex: Type = 105; - pub const WdfDmaTransactionGetBytesTransferredTableIndex: Type = 106; - pub const WdfDmaTransactionSetMaximumLengthTableIndex: Type = 107; - pub const WdfDmaTransactionGetRequestTableIndex: Type = 108; - pub const WdfDmaTransactionGetCurrentDmaTransferLengthTableIndex: Type = 109; - pub const WdfDmaTransactionGetDeviceTableIndex: Type = 110; - pub const WdfDpcCreateTableIndex: Type = 111; - pub const WdfDpcEnqueueTableIndex: Type = 112; - pub const WdfDpcCancelTableIndex: Type = 113; - pub const WdfDpcGetParentObjectTableIndex: Type = 114; - pub const WdfDpcWdmGetDpcTableIndex: Type = 115; - pub const WdfDriverCreateTableIndex: Type = 116; - pub const WdfDriverGetRegistryPathTableIndex: Type = 117; - pub const WdfDriverWdmGetDriverObjectTableIndex: Type = 118; - pub const WdfDriverOpenParametersRegistryKeyTableIndex: Type = 119; - pub const WdfWdmDriverGetWdfDriverHandleTableIndex: Type = 120; - pub const WdfDriverRegisterTraceInfoTableIndex: Type = 121; - pub const WdfDriverRetrieveVersionStringTableIndex: Type = 122; - pub const WdfDriverIsVersionAvailableTableIndex: Type = 123; - pub const WdfFdoInitWdmGetPhysicalDeviceTableIndex: Type = 124; - pub const WdfFdoInitOpenRegistryKeyTableIndex: Type = 125; - pub const WdfFdoInitQueryPropertyTableIndex: Type = 126; - pub const WdfFdoInitAllocAndQueryPropertyTableIndex: Type = 127; - pub const WdfFdoInitSetEventCallbacksTableIndex: Type = 128; - pub const WdfFdoInitSetFilterTableIndex: Type = 129; - pub const WdfFdoInitSetDefaultChildListConfigTableIndex: Type = 130; - pub const WdfFdoQueryForInterfaceTableIndex: Type = 131; - pub const WdfFdoGetDefaultChildListTableIndex: Type = 132; - pub const WdfFdoAddStaticChildTableIndex: Type = 133; - pub const WdfFdoLockStaticChildListForIterationTableIndex: Type = 134; - pub const WdfFdoRetrieveNextStaticChildTableIndex: Type = 135; - pub const WdfFdoUnlockStaticChildListFromIterationTableIndex: Type = 136; - pub const WdfFileObjectGetFileNameTableIndex: Type = 137; - pub const WdfFileObjectGetFlagsTableIndex: Type = 138; - pub const WdfFileObjectGetDeviceTableIndex: Type = 139; - pub const WdfFileObjectWdmGetFileObjectTableIndex: Type = 140; - pub const WdfInterruptCreateTableIndex: Type = 141; - pub const WdfInterruptQueueDpcForIsrTableIndex: Type = 142; - pub const WdfInterruptSynchronizeTableIndex: Type = 143; - pub const WdfInterruptAcquireLockTableIndex: Type = 144; - pub const WdfInterruptReleaseLockTableIndex: Type = 145; - pub const WdfInterruptEnableTableIndex: Type = 146; - pub const WdfInterruptDisableTableIndex: Type = 147; - pub const WdfInterruptWdmGetInterruptTableIndex: Type = 148; - pub const WdfInterruptGetInfoTableIndex: Type = 149; - pub const WdfInterruptSetPolicyTableIndex: Type = 150; - pub const WdfInterruptGetDeviceTableIndex: Type = 151; - pub const WdfIoQueueCreateTableIndex: Type = 152; - pub const WdfIoQueueGetStateTableIndex: Type = 153; - pub const WdfIoQueueStartTableIndex: Type = 154; - pub const WdfIoQueueStopTableIndex: Type = 155; - pub const WdfIoQueueStopSynchronouslyTableIndex: Type = 156; - pub const WdfIoQueueGetDeviceTableIndex: Type = 157; - pub const WdfIoQueueRetrieveNextRequestTableIndex: Type = 158; - pub const WdfIoQueueRetrieveRequestByFileObjectTableIndex: Type = 159; - pub const WdfIoQueueFindRequestTableIndex: Type = 160; - pub const WdfIoQueueRetrieveFoundRequestTableIndex: Type = 161; - pub const WdfIoQueueDrainSynchronouslyTableIndex: Type = 162; - pub const WdfIoQueueDrainTableIndex: Type = 163; - pub const WdfIoQueuePurgeSynchronouslyTableIndex: Type = 164; - pub const WdfIoQueuePurgeTableIndex: Type = 165; - pub const WdfIoQueueReadyNotifyTableIndex: Type = 166; - pub const WdfIoTargetCreateTableIndex: Type = 167; - pub const WdfIoTargetOpenTableIndex: Type = 168; - pub const WdfIoTargetCloseForQueryRemoveTableIndex: Type = 169; - pub const WdfIoTargetCloseTableIndex: Type = 170; - pub const WdfIoTargetStartTableIndex: Type = 171; - pub const WdfIoTargetStopTableIndex: Type = 172; - pub const WdfIoTargetGetStateTableIndex: Type = 173; - pub const WdfIoTargetGetDeviceTableIndex: Type = 174; - pub const WdfIoTargetQueryTargetPropertyTableIndex: Type = 175; - pub const WdfIoTargetAllocAndQueryTargetPropertyTableIndex: Type = 176; - pub const WdfIoTargetQueryForInterfaceTableIndex: Type = 177; - pub const WdfIoTargetWdmGetTargetDeviceObjectTableIndex: Type = 178; - pub const WdfIoTargetWdmGetTargetPhysicalDeviceTableIndex: Type = 179; - pub const WdfIoTargetWdmGetTargetFileObjectTableIndex: Type = 180; - pub const WdfIoTargetWdmGetTargetFileHandleTableIndex: Type = 181; - pub const WdfIoTargetSendReadSynchronouslyTableIndex: Type = 182; - pub const WdfIoTargetFormatRequestForReadTableIndex: Type = 183; - pub const WdfIoTargetSendWriteSynchronouslyTableIndex: Type = 184; - pub const WdfIoTargetFormatRequestForWriteTableIndex: Type = 185; - pub const WdfIoTargetSendIoctlSynchronouslyTableIndex: Type = 186; - pub const WdfIoTargetFormatRequestForIoctlTableIndex: Type = 187; - pub const WdfIoTargetSendInternalIoctlSynchronouslyTableIndex: Type = 188; - pub const WdfIoTargetFormatRequestForInternalIoctlTableIndex: Type = 189; - pub const WdfIoTargetSendInternalIoctlOthersSynchronouslyTableIndex: Type = 190; - pub const WdfIoTargetFormatRequestForInternalIoctlOthersTableIndex: Type = 191; - pub const WdfMemoryCreateTableIndex: Type = 192; - pub const WdfMemoryCreatePreallocatedTableIndex: Type = 193; - pub const WdfMemoryGetBufferTableIndex: Type = 194; - pub const WdfMemoryAssignBufferTableIndex: Type = 195; - pub const WdfMemoryCopyToBufferTableIndex: Type = 196; - pub const WdfMemoryCopyFromBufferTableIndex: Type = 197; - pub const WdfLookasideListCreateTableIndex: Type = 198; - pub const WdfMemoryCreateFromLookasideTableIndex: Type = 199; - pub const WdfDeviceMiniportCreateTableIndex: Type = 200; - pub const WdfDriverMiniportUnloadTableIndex: Type = 201; - pub const WdfObjectGetTypedContextWorkerTableIndex: Type = 202; - pub const WdfObjectAllocateContextTableIndex: Type = 203; - pub const WdfObjectContextGetObjectTableIndex: Type = 204; - pub const WdfObjectReferenceActualTableIndex: Type = 205; - pub const WdfObjectDereferenceActualTableIndex: Type = 206; - pub const WdfObjectCreateTableIndex: Type = 207; - pub const WdfObjectDeleteTableIndex: Type = 208; - pub const WdfObjectQueryTableIndex: Type = 209; - pub const WdfPdoInitAllocateTableIndex: Type = 210; - pub const WdfPdoInitSetEventCallbacksTableIndex: Type = 211; - pub const WdfPdoInitAssignDeviceIDTableIndex: Type = 212; - pub const WdfPdoInitAssignInstanceIDTableIndex: Type = 213; - pub const WdfPdoInitAddHardwareIDTableIndex: Type = 214; - pub const WdfPdoInitAddCompatibleIDTableIndex: Type = 215; - pub const WdfPdoInitAddDeviceTextTableIndex: Type = 216; - pub const WdfPdoInitSetDefaultLocaleTableIndex: Type = 217; - pub const WdfPdoInitAssignRawDeviceTableIndex: Type = 218; - pub const WdfPdoMarkMissingTableIndex: Type = 219; - pub const WdfPdoRequestEjectTableIndex: Type = 220; - pub const WdfPdoGetParentTableIndex: Type = 221; - pub const WdfPdoRetrieveIdentificationDescriptionTableIndex: Type = 222; - pub const WdfPdoRetrieveAddressDescriptionTableIndex: Type = 223; - pub const WdfPdoUpdateAddressDescriptionTableIndex: Type = 224; - pub const WdfPdoAddEjectionRelationsPhysicalDeviceTableIndex: Type = 225; - pub const WdfPdoRemoveEjectionRelationsPhysicalDeviceTableIndex: Type = 226; - pub const WdfPdoClearEjectionRelationsDevicesTableIndex: Type = 227; - pub const WdfDeviceAddQueryInterfaceTableIndex: Type = 228; - pub const WdfRegistryOpenKeyTableIndex: Type = 229; - pub const WdfRegistryCreateKeyTableIndex: Type = 230; - pub const WdfRegistryCloseTableIndex: Type = 231; - pub const WdfRegistryWdmGetHandleTableIndex: Type = 232; - pub const WdfRegistryRemoveKeyTableIndex: Type = 233; - pub const WdfRegistryRemoveValueTableIndex: Type = 234; - pub const WdfRegistryQueryValueTableIndex: Type = 235; - pub const WdfRegistryQueryMemoryTableIndex: Type = 236; - pub const WdfRegistryQueryMultiStringTableIndex: Type = 237; - pub const WdfRegistryQueryUnicodeStringTableIndex: Type = 238; - pub const WdfRegistryQueryStringTableIndex: Type = 239; - pub const WdfRegistryQueryULongTableIndex: Type = 240; - pub const WdfRegistryAssignValueTableIndex: Type = 241; - pub const WdfRegistryAssignMemoryTableIndex: Type = 242; - pub const WdfRegistryAssignMultiStringTableIndex: Type = 243; - pub const WdfRegistryAssignUnicodeStringTableIndex: Type = 244; - pub const WdfRegistryAssignStringTableIndex: Type = 245; - pub const WdfRegistryAssignULongTableIndex: Type = 246; - pub const WdfRequestCreateTableIndex: Type = 247; - pub const WdfRequestCreateFromIrpTableIndex: Type = 248; - pub const WdfRequestReuseTableIndex: Type = 249; - pub const WdfRequestChangeTargetTableIndex: Type = 250; - pub const WdfRequestFormatRequestUsingCurrentTypeTableIndex: Type = 251; - pub const WdfRequestWdmFormatUsingStackLocationTableIndex: Type = 252; - pub const WdfRequestSendTableIndex: Type = 253; - pub const WdfRequestGetStatusTableIndex: Type = 254; - pub const WdfRequestMarkCancelableTableIndex: Type = 255; - pub const WdfRequestUnmarkCancelableTableIndex: Type = 256; - pub const WdfRequestIsCanceledTableIndex: Type = 257; - pub const WdfRequestCancelSentRequestTableIndex: Type = 258; - pub const WdfRequestIsFrom32BitProcessTableIndex: Type = 259; - pub const WdfRequestSetCompletionRoutineTableIndex: Type = 260; - pub const WdfRequestGetCompletionParamsTableIndex: Type = 261; - pub const WdfRequestAllocateTimerTableIndex: Type = 262; - pub const WdfRequestCompleteTableIndex: Type = 263; - pub const WdfRequestCompleteWithPriorityBoostTableIndex: Type = 264; - pub const WdfRequestCompleteWithInformationTableIndex: Type = 265; - pub const WdfRequestGetParametersTableIndex: Type = 266; - pub const WdfRequestRetrieveInputMemoryTableIndex: Type = 267; - pub const WdfRequestRetrieveOutputMemoryTableIndex: Type = 268; - pub const WdfRequestRetrieveInputBufferTableIndex: Type = 269; - pub const WdfRequestRetrieveOutputBufferTableIndex: Type = 270; - pub const WdfRequestRetrieveInputWdmMdlTableIndex: Type = 271; - pub const WdfRequestRetrieveOutputWdmMdlTableIndex: Type = 272; - pub const WdfRequestRetrieveUnsafeUserInputBufferTableIndex: Type = 273; - pub const WdfRequestRetrieveUnsafeUserOutputBufferTableIndex: Type = 274; - pub const WdfRequestSetInformationTableIndex: Type = 275; - pub const WdfRequestGetInformationTableIndex: Type = 276; - pub const WdfRequestGetFileObjectTableIndex: Type = 277; - pub const WdfRequestProbeAndLockUserBufferForReadTableIndex: Type = 278; - pub const WdfRequestProbeAndLockUserBufferForWriteTableIndex: Type = 279; - pub const WdfRequestGetRequestorModeTableIndex: Type = 280; - pub const WdfRequestForwardToIoQueueTableIndex: Type = 281; - pub const WdfRequestGetIoQueueTableIndex: Type = 282; - pub const WdfRequestRequeueTableIndex: Type = 283; - pub const WdfRequestStopAcknowledgeTableIndex: Type = 284; - pub const WdfRequestWdmGetIrpTableIndex: Type = 285; - pub const WdfIoResourceRequirementsListSetSlotNumberTableIndex: Type = 286; - pub const WdfIoResourceRequirementsListSetInterfaceTypeTableIndex: Type = 287; - pub const WdfIoResourceRequirementsListAppendIoResListTableIndex: Type = 288; - pub const WdfIoResourceRequirementsListInsertIoResListTableIndex: Type = 289; - pub const WdfIoResourceRequirementsListGetCountTableIndex: Type = 290; - pub const WdfIoResourceRequirementsListGetIoResListTableIndex: Type = 291; - pub const WdfIoResourceRequirementsListRemoveTableIndex: Type = 292; - pub const WdfIoResourceRequirementsListRemoveByIoResListTableIndex: Type = 293; - pub const WdfIoResourceListCreateTableIndex: Type = 294; - pub const WdfIoResourceListAppendDescriptorTableIndex: Type = 295; - pub const WdfIoResourceListInsertDescriptorTableIndex: Type = 296; - pub const WdfIoResourceListUpdateDescriptorTableIndex: Type = 297; - pub const WdfIoResourceListGetCountTableIndex: Type = 298; - pub const WdfIoResourceListGetDescriptorTableIndex: Type = 299; - pub const WdfIoResourceListRemoveTableIndex: Type = 300; - pub const WdfIoResourceListRemoveByDescriptorTableIndex: Type = 301; - pub const WdfCmResourceListAppendDescriptorTableIndex: Type = 302; - pub const WdfCmResourceListInsertDescriptorTableIndex: Type = 303; - pub const WdfCmResourceListGetCountTableIndex: Type = 304; - pub const WdfCmResourceListGetDescriptorTableIndex: Type = 305; - pub const WdfCmResourceListRemoveTableIndex: Type = 306; - pub const WdfCmResourceListRemoveByDescriptorTableIndex: Type = 307; - pub const WdfStringCreateTableIndex: Type = 308; - pub const WdfStringGetUnicodeStringTableIndex: Type = 309; - pub const WdfObjectAcquireLockTableIndex: Type = 310; - pub const WdfObjectReleaseLockTableIndex: Type = 311; - pub const WdfWaitLockCreateTableIndex: Type = 312; - pub const WdfWaitLockAcquireTableIndex: Type = 313; - pub const WdfWaitLockReleaseTableIndex: Type = 314; - pub const WdfSpinLockCreateTableIndex: Type = 315; - pub const WdfSpinLockAcquireTableIndex: Type = 316; - pub const WdfSpinLockReleaseTableIndex: Type = 317; - pub const WdfTimerCreateTableIndex: Type = 318; - pub const WdfTimerStartTableIndex: Type = 319; - pub const WdfTimerStopTableIndex: Type = 320; - pub const WdfTimerGetParentObjectTableIndex: Type = 321; - pub const WdfUsbTargetDeviceCreateTableIndex: Type = 322; - pub const WdfUsbTargetDeviceRetrieveInformationTableIndex: Type = 323; - pub const WdfUsbTargetDeviceGetDeviceDescriptorTableIndex: Type = 324; - pub const WdfUsbTargetDeviceRetrieveConfigDescriptorTableIndex: Type = 325; - pub const WdfUsbTargetDeviceQueryStringTableIndex: Type = 326; - pub const WdfUsbTargetDeviceAllocAndQueryStringTableIndex: Type = 327; - pub const WdfUsbTargetDeviceFormatRequestForStringTableIndex: Type = 328; - pub const WdfUsbTargetDeviceGetNumInterfacesTableIndex: Type = 329; - pub const WdfUsbTargetDeviceSelectConfigTableIndex: Type = 330; - pub const WdfUsbTargetDeviceWdmGetConfigurationHandleTableIndex: Type = 331; - pub const WdfUsbTargetDeviceRetrieveCurrentFrameNumberTableIndex: Type = 332; - pub const WdfUsbTargetDeviceSendControlTransferSynchronouslyTableIndex: Type = 333; - pub const WdfUsbTargetDeviceFormatRequestForControlTransferTableIndex: Type = 334; - pub const WdfUsbTargetDeviceIsConnectedSynchronousTableIndex: Type = 335; - pub const WdfUsbTargetDeviceResetPortSynchronouslyTableIndex: Type = 336; - pub const WdfUsbTargetDeviceCyclePortSynchronouslyTableIndex: Type = 337; - pub const WdfUsbTargetDeviceFormatRequestForCyclePortTableIndex: Type = 338; - pub const WdfUsbTargetDeviceSendUrbSynchronouslyTableIndex: Type = 339; - pub const WdfUsbTargetDeviceFormatRequestForUrbTableIndex: Type = 340; - pub const WdfUsbTargetPipeGetInformationTableIndex: Type = 341; - pub const WdfUsbTargetPipeIsInEndpointTableIndex: Type = 342; - pub const WdfUsbTargetPipeIsOutEndpointTableIndex: Type = 343; - pub const WdfUsbTargetPipeGetTypeTableIndex: Type = 344; - pub const WdfUsbTargetPipeSetNoMaximumPacketSizeCheckTableIndex: Type = 345; - pub const WdfUsbTargetPipeWriteSynchronouslyTableIndex: Type = 346; - pub const WdfUsbTargetPipeFormatRequestForWriteTableIndex: Type = 347; - pub const WdfUsbTargetPipeReadSynchronouslyTableIndex: Type = 348; - pub const WdfUsbTargetPipeFormatRequestForReadTableIndex: Type = 349; - pub const WdfUsbTargetPipeConfigContinuousReaderTableIndex: Type = 350; - pub const WdfUsbTargetPipeAbortSynchronouslyTableIndex: Type = 351; - pub const WdfUsbTargetPipeFormatRequestForAbortTableIndex: Type = 352; - pub const WdfUsbTargetPipeResetSynchronouslyTableIndex: Type = 353; - pub const WdfUsbTargetPipeFormatRequestForResetTableIndex: Type = 354; - pub const WdfUsbTargetPipeSendUrbSynchronouslyTableIndex: Type = 355; - pub const WdfUsbTargetPipeFormatRequestForUrbTableIndex: Type = 356; - pub const WdfUsbInterfaceGetInterfaceNumberTableIndex: Type = 357; - pub const WdfUsbInterfaceGetNumEndpointsTableIndex: Type = 358; - pub const WdfUsbInterfaceGetDescriptorTableIndex: Type = 359; - pub const WdfUsbInterfaceSelectSettingTableIndex: Type = 360; - pub const WdfUsbInterfaceGetEndpointInformationTableIndex: Type = 361; - pub const WdfUsbTargetDeviceGetInterfaceTableIndex: Type = 362; - pub const WdfUsbInterfaceGetConfiguredSettingIndexTableIndex: Type = 363; - pub const WdfUsbInterfaceGetNumConfiguredPipesTableIndex: Type = 364; - pub const WdfUsbInterfaceGetConfiguredPipeTableIndex: Type = 365; - pub const WdfUsbTargetPipeWdmGetPipeHandleTableIndex: Type = 366; - pub const WdfVerifierDbgBreakPointTableIndex: Type = 367; - pub const WdfVerifierKeBugCheckTableIndex: Type = 368; - pub const WdfWmiProviderCreateTableIndex: Type = 369; - pub const WdfWmiProviderGetDeviceTableIndex: Type = 370; - pub const WdfWmiProviderIsEnabledTableIndex: Type = 371; - pub const WdfWmiProviderGetTracingHandleTableIndex: Type = 372; - pub const WdfWmiInstanceCreateTableIndex: Type = 373; - pub const WdfWmiInstanceRegisterTableIndex: Type = 374; - pub const WdfWmiInstanceDeregisterTableIndex: Type = 375; - pub const WdfWmiInstanceGetDeviceTableIndex: Type = 376; - pub const WdfWmiInstanceGetProviderTableIndex: Type = 377; - pub const WdfWmiInstanceFireEventTableIndex: Type = 378; - pub const WdfWorkItemCreateTableIndex: Type = 379; - pub const WdfWorkItemEnqueueTableIndex: Type = 380; - pub const WdfWorkItemGetParentObjectTableIndex: Type = 381; - pub const WdfWorkItemFlushTableIndex: Type = 382; - pub const WdfCommonBufferCreateWithConfigTableIndex: Type = 383; - pub const WdfDmaEnablerGetFragmentLengthTableIndex: Type = 384; - pub const WdfDmaEnablerWdmGetDmaAdapterTableIndex: Type = 385; - pub const WdfUsbInterfaceGetNumSettingsTableIndex: Type = 386; - pub const WdfDeviceRemoveDependentUsageDeviceObjectTableIndex: Type = 387; - pub const WdfDeviceGetSystemPowerActionTableIndex: Type = 388; - pub const WdfInterruptSetExtendedPolicyTableIndex: Type = 389; - pub const WdfIoQueueAssignForwardProgressPolicyTableIndex: Type = 390; - pub const WdfPdoInitAssignContainerIDTableIndex: Type = 391; - pub const WdfPdoInitAllowForwardingRequestToParentTableIndex: Type = 392; - pub const WdfRequestMarkCancelableExTableIndex: Type = 393; - pub const WdfRequestIsReservedTableIndex: Type = 394; - pub const WdfRequestForwardToParentDeviceIoQueueTableIndex: Type = 395; - pub const WdfCxDeviceInitAllocateTableIndex: Type = 396; - pub const WdfCxDeviceInitAssignWdmIrpPreprocessCallbackTableIndex: Type = 397; - pub const WdfCxDeviceInitSetIoInCallerContextCallbackTableIndex: Type = 398; - pub const WdfCxDeviceInitSetRequestAttributesTableIndex: Type = 399; - pub const WdfCxDeviceInitSetFileObjectConfigTableIndex: Type = 400; - pub const WdfDeviceWdmDispatchIrpTableIndex: Type = 401; - pub const WdfDeviceWdmDispatchIrpToIoQueueTableIndex: Type = 402; - pub const WdfDeviceInitSetRemoveLockOptionsTableIndex: Type = 403; - pub const WdfDeviceConfigureWdmIrpDispatchCallbackTableIndex: Type = 404; - pub const WdfDmaEnablerConfigureSystemProfileTableIndex: Type = 405; - pub const WdfDmaTransactionInitializeUsingOffsetTableIndex: Type = 406; - pub const WdfDmaTransactionGetTransferInfoTableIndex: Type = 407; - pub const WdfDmaTransactionSetChannelConfigurationCallbackTableIndex: Type = 408; - pub const WdfDmaTransactionSetTransferCompleteCallbackTableIndex: Type = 409; - pub const WdfDmaTransactionSetImmediateExecutionTableIndex: Type = 410; - pub const WdfDmaTransactionAllocateResourcesTableIndex: Type = 411; - pub const WdfDmaTransactionSetDeviceAddressOffsetTableIndex: Type = 412; - pub const WdfDmaTransactionFreeResourcesTableIndex: Type = 413; - pub const WdfDmaTransactionCancelTableIndex: Type = 414; - pub const WdfDmaTransactionWdmGetTransferContextTableIndex: Type = 415; - pub const WdfInterruptQueueWorkItemForIsrTableIndex: Type = 416; - pub const WdfInterruptTryToAcquireLockTableIndex: Type = 417; - pub const WdfIoQueueStopAndPurgeTableIndex: Type = 418; - pub const WdfIoQueueStopAndPurgeSynchronouslyTableIndex: Type = 419; - pub const WdfIoTargetPurgeTableIndex: Type = 420; - pub const WdfUsbTargetDeviceCreateWithParametersTableIndex: Type = 421; - pub const WdfUsbTargetDeviceQueryUsbCapabilityTableIndex: Type = 422; - pub const WdfUsbTargetDeviceCreateUrbTableIndex: Type = 423; - pub const WdfUsbTargetDeviceCreateIsochUrbTableIndex: Type = 424; - pub const WdfDeviceWdmAssignPowerFrameworkSettingsTableIndex: Type = 425; - pub const WdfDmaTransactionStopSystemTransferTableIndex: Type = 426; - pub const WdfCxVerifierKeBugCheckTableIndex: Type = 427; - pub const WdfInterruptReportActiveTableIndex: Type = 428; - pub const WdfInterruptReportInactiveTableIndex: Type = 429; - pub const WdfDeviceInitSetReleaseHardwareOrderOnFailureTableIndex: Type = 430; - pub const WdfGetTriageInfoTableIndex: Type = 431; - pub const WdfDeviceInitSetIoTypeExTableIndex: Type = 432; - pub const WdfDeviceQueryPropertyExTableIndex: Type = 433; - pub const WdfDeviceAllocAndQueryPropertyExTableIndex: Type = 434; - pub const WdfDeviceAssignPropertyTableIndex: Type = 435; - pub const WdfFdoInitQueryPropertyExTableIndex: Type = 436; - pub const WdfFdoInitAllocAndQueryPropertyExTableIndex: Type = 437; - pub const WdfDeviceStopIdleActualTableIndex: Type = 438; - pub const WdfDeviceResumeIdleActualTableIndex: Type = 439; - pub const WdfDeviceGetSelfIoTargetTableIndex: Type = 440; - pub const WdfDeviceInitAllowSelfIoTargetTableIndex: Type = 441; - pub const WdfIoTargetSelfAssignDefaultIoQueueTableIndex: Type = 442; - pub const WdfDeviceOpenDevicemapKeyTableIndex: Type = 443; - pub const WdfDmaTransactionSetSingleTransferRequirementTableIndex: Type = 444; - pub const WdfCxDeviceInitSetPnpPowerEventCallbacksTableIndex: Type = 445; - pub const WdfFileObjectGetInitiatorProcessIdTableIndex: Type = 446; - pub const WdfRequestGetRequestorProcessIdTableIndex: Type = 447; - pub const WdfDeviceRetrieveCompanionTargetTableIndex: Type = 448; - pub const WdfCompanionTargetSendTaskSynchronouslyTableIndex: Type = 449; - pub const WdfCompanionTargetWdmGetCompanionProcessTableIndex: Type = 450; - pub const WdfDriverOpenPersistentStateRegistryKeyTableIndex: Type = 451; - pub const WdfDriverErrorReportApiMissingTableIndex: Type = 452; - pub const WdfPdoInitRemovePowerDependencyOnParentTableIndex: Type = 453; - pub const WdfCxDeviceInitAllocateContextTableIndex: Type = 454; - pub const WdfCxDeviceInitGetTypedContextWorkerTableIndex: Type = 455; - pub const WdfCxDeviceInitSetPowerPolicyEventCallbacksTableIndex: Type = 456; - pub const WdfDeviceSetDeviceInterfaceStateExTableIndex: Type = 457; - pub const WdfFunctionTableNumEntries: Type = 458; -} -pub use self::_WDFFUNCENUM::Type as WDFFUNCENUM; -pub mod _WDFSTRUCTENUM { - pub type Type = ::core::ffi::c_int; - pub const INDEX_WDF_CHILD_ADDRESS_DESCRIPTION_HEADER: Type = 0; - pub const INDEX_WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER: Type = 1; - pub const INDEX_WDF_CHILD_LIST_CONFIG: Type = 2; - pub const INDEX_WDF_CHILD_LIST_ITERATOR: Type = 3; - pub const INDEX_WDF_CHILD_RETRIEVE_INFO: Type = 4; - pub const INDEX_WDF_CLASS_BIND_INFO: Type = 5; - pub const INDEX_WDF_CLASS_BIND_INFO2: Type = 6; - pub const INDEX_WDF_CLASS_EXTENSION_DESCRIPTOR: Type = 7; - pub const INDEX_WDF_CLASS_LIBRARY_INFO: Type = 8; - pub const INDEX_WDF_CLASS_VERSION: Type = 9; - pub const INDEX_WDF_COMMON_BUFFER_CONFIG: Type = 10; - pub const INDEX_WDF_CUSTOM_TYPE_CONTEXT: Type = 11; - pub const INDEX_WDF_DEVICE_PNP_CAPABILITIES: Type = 12; - pub const INDEX_WDF_DEVICE_PNP_NOTIFICATION_DATA: Type = 13; - pub const INDEX_WDF_DEVICE_POWER_CAPABILITIES: Type = 14; - pub const INDEX_WDF_DEVICE_POWER_NOTIFICATION_DATA: Type = 15; - pub const INDEX_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS: Type = 16; - pub const INDEX_WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA: Type = 17; - pub const INDEX_WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS: Type = 18; - pub const INDEX_WDF_DEVICE_PROPERTY_DATA: Type = 19; - pub const INDEX_WDF_DEVICE_STATE: Type = 20; - pub const INDEX_WDF_DMA_ENABLER_CONFIG: Type = 21; - pub const INDEX_WDF_DMA_SYSTEM_PROFILE_CONFIG: Type = 22; - pub const INDEX_WDF_DPC_CONFIG: Type = 23; - pub const INDEX_WDF_DRIVER_CONFIG: Type = 24; - pub const INDEX_WDF_DRIVER_GLOBALS: Type = 25; - pub const INDEX_WDF_DRIVER_VERSION_AVAILABLE_PARAMS: Type = 26; - pub const INDEX_WDF_FDO_EVENT_CALLBACKS: Type = 27; - pub const INDEX_WDF_FILEOBJECT_CONFIG: Type = 28; - pub const INDEX_WDF_INTERRUPT_CONFIG: Type = 29; - pub const INDEX_WDF_INTERRUPT_EXTENDED_POLICY: Type = 30; - pub const INDEX_WDF_INTERRUPT_INFO: Type = 31; - pub const INDEX_WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS: Type = 32; - pub const INDEX_WDF_IO_QUEUE_CONFIG: Type = 33; - pub const INDEX_WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY: Type = 34; - pub const INDEX_WDF_IO_TARGET_OPEN_PARAMS: Type = 35; - pub const INDEX_WDF_IO_TYPE_CONFIG: Type = 36; - pub const INDEX_WDF_MEMORY_DESCRIPTOR: Type = 37; - pub const INDEX_WDF_OBJECT_ATTRIBUTES: Type = 38; - pub const INDEX_WDF_OBJECT_CONTEXT_TYPE_INFO: Type = 39; - pub const INDEX_WDF_PDO_EVENT_CALLBACKS: Type = 40; - pub const INDEX_WDF_PNPPOWER_EVENT_CALLBACKS: Type = 41; - pub const INDEX_WDF_POWER_FRAMEWORK_SETTINGS: Type = 42; - pub const INDEX_WDF_POWER_POLICY_EVENT_CALLBACKS: Type = 43; - pub const INDEX_WDF_POWER_ROUTINE_TIMED_OUT_DATA: Type = 44; - pub const INDEX_WDF_QUERY_INTERFACE_CONFIG: Type = 45; - pub const INDEX_WDF_QUEUE_FATAL_ERROR_DATA: Type = 46; - pub const INDEX_WDF_REMOVE_LOCK_OPTIONS: Type = 47; - pub const INDEX_WDF_REQUEST_COMPLETION_PARAMS: Type = 48; - pub const INDEX_WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA: Type = 49; - pub const INDEX_WDF_REQUEST_FORWARD_OPTIONS: Type = 50; - pub const INDEX_WDF_REQUEST_PARAMETERS: Type = 51; - pub const INDEX_WDF_REQUEST_REUSE_PARAMS: Type = 52; - pub const INDEX_WDF_REQUEST_SEND_OPTIONS: Type = 53; - pub const INDEX_WDF_TASK_SEND_OPTIONS: Type = 54; - pub const INDEX_WDF_TIMER_CONFIG: Type = 55; - pub const INDEX_WDF_TRIAGE_INFO: Type = 56; - pub const INDEX_WDF_USB_CONTINUOUS_READER_CONFIG: Type = 57; - pub const INDEX_WDF_USB_DEVICE_CREATE_CONFIG: Type = 58; - pub const INDEX_WDF_USB_DEVICE_INFORMATION: Type = 59; - pub const INDEX_WDF_USB_DEVICE_SELECT_CONFIG_PARAMS: Type = 60; - pub const INDEX_WDF_USB_INTERFACE_SELECT_SETTING_PARAMS: Type = 61; - pub const INDEX_WDF_USB_INTERFACE_SETTING_PAIR: Type = 62; - pub const INDEX_WDF_USB_PIPE_INFORMATION: Type = 63; - pub const INDEX_WDF_USB_REQUEST_COMPLETION_PARAMS: Type = 64; - pub const INDEX_WDF_WMI_INSTANCE_CONFIG: Type = 65; - pub const INDEX_WDF_WMI_PROVIDER_CONFIG: Type = 66; - pub const INDEX_WDF_WORKITEM_CONFIG: Type = 67; - pub const INDEX_WDFCONTEXT_TRIAGE_INFO: Type = 68; - pub const INDEX_WDFCONTEXTTYPE_TRIAGE_INFO: Type = 69; - pub const INDEX_WDFCX_FILEOBJECT_CONFIG: Type = 70; - pub const INDEX_WDFCX_PNPPOWER_EVENT_CALLBACKS: Type = 71; - pub const INDEX_WDFDEVICE_TRIAGE_INFO: Type = 72; - pub const INDEX_WDFFWDPROGRESS_TRIAGE_INFO: Type = 73; - pub const INDEX_WDFIRP_TRIAGE_INFO: Type = 74; - pub const INDEX_WDFIRPQUEUE_TRIAGE_INFO: Type = 75; - pub const INDEX_WDFMEMORY_OFFSET: Type = 76; - pub const INDEX_WDFOBJECT_TRIAGE_INFO: Type = 77; - pub const INDEX_WDFQUEUE_TRIAGE_INFO: Type = 78; - pub const INDEX_WDFREQUEST_TRIAGE_INFO: Type = 79; - pub const INDEX_WDFCX_POWER_POLICY_EVENT_CALLBACKS: Type = 80; - pub const WDF_STRUCTURE_TABLE_NUM_ENTRIES: Type = 81; -} -pub use self::_WDFSTRUCTENUM::Type as WDFSTRUCTENUM; -pub type PFN_WDFVERIFIERDBGBREAKPOINT = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS), ->; -pub type PFN_WDFVERIFIERKEBUGCHECK = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - BugCheckCode: ULONG, - BugCheckParameter1: ULONG_PTR, - BugCheckParameter2: ULONG_PTR, - BugCheckParameter3: ULONG_PTR, - BugCheckParameter4: ULONG_PTR, - ), ->; -pub type PFN_WDFGETTRIAGEINFO = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS) -> PVOID, ->; -pub mod _WDF_EXECUTION_LEVEL { - pub type Type = ::core::ffi::c_int; - pub const WdfExecutionLevelInvalid: Type = 0; - pub const WdfExecutionLevelInheritFromParent: Type = 1; - pub const WdfExecutionLevelPassive: Type = 2; - pub const WdfExecutionLevelDispatch: Type = 3; -} -pub use self::_WDF_EXECUTION_LEVEL::Type as WDF_EXECUTION_LEVEL; -pub mod _WDF_SYNCHRONIZATION_SCOPE { - pub type Type = ::core::ffi::c_int; - pub const WdfSynchronizationScopeInvalid: Type = 0; - pub const WdfSynchronizationScopeInheritFromParent: Type = 1; - pub const WdfSynchronizationScopeDevice: Type = 2; - pub const WdfSynchronizationScopeQueue: Type = 3; - pub const WdfSynchronizationScopeNone: Type = 4; -} -pub use self::_WDF_SYNCHRONIZATION_SCOPE::Type as WDF_SYNCHRONIZATION_SCOPE; -pub type PFN_WDF_OBJECT_CONTEXT_CLEANUP = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFOBJECT), ->; -pub type PFN_WDF_OBJECT_CONTEXT_DESTROY = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFOBJECT), ->; -pub type PCWDF_OBJECT_CONTEXT_TYPE_INFO = *const _WDF_OBJECT_CONTEXT_TYPE_INFO; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_OBJECT_ATTRIBUTES { - pub Size: ULONG, - pub EvtCleanupCallback: PFN_WDF_OBJECT_CONTEXT_CLEANUP, - pub EvtDestroyCallback: PFN_WDF_OBJECT_CONTEXT_DESTROY, - pub ExecutionLevel: WDF_EXECUTION_LEVEL, - pub SynchronizationScope: WDF_SYNCHRONIZATION_SCOPE, - pub ParentObject: WDFOBJECT, - pub ContextSizeOverride: usize, - pub ContextTypeInfo: PCWDF_OBJECT_CONTEXT_TYPE_INFO, -} -#[test] -fn bindgen_test_layout__WDF_OBJECT_ATTRIBUTES() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_OBJECT_ATTRIBUTES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_OBJECT_ATTRIBUTES>(), - 56usize, - concat!("Size of: ", stringify!(_WDF_OBJECT_ATTRIBUTES)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_OBJECT_ATTRIBUTES>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_OBJECT_ATTRIBUTES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_OBJECT_ATTRIBUTES), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtCleanupCallback) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_OBJECT_ATTRIBUTES), - "::", - stringify!(EvtCleanupCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDestroyCallback) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_OBJECT_ATTRIBUTES), - "::", - stringify!(EvtDestroyCallback), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExecutionLevel) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_OBJECT_ATTRIBUTES), - "::", - stringify!(ExecutionLevel), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SynchronizationScope) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WDF_OBJECT_ATTRIBUTES), - "::", - stringify!(SynchronizationScope), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ParentObject) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_OBJECT_ATTRIBUTES), - "::", - stringify!(ParentObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ContextSizeOverride) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_OBJECT_ATTRIBUTES), - "::", - stringify!(ContextSizeOverride), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContextTypeInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WDF_OBJECT_ATTRIBUTES), - "::", - stringify!(ContextTypeInfo), - ), - ); -} -impl Default for _WDF_OBJECT_ATTRIBUTES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_OBJECT_ATTRIBUTES = _WDF_OBJECT_ATTRIBUTES; -pub type PFN_GET_UNIQUE_CONTEXT_TYPE = ::core::option::Option< - unsafe extern "C" fn() -> PCWDF_OBJECT_CONTEXT_TYPE_INFO, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_OBJECT_CONTEXT_TYPE_INFO { - pub Size: ULONG, - pub ContextName: LPCSTR, - pub ContextSize: usize, - pub UniqueType: PCWDF_OBJECT_CONTEXT_TYPE_INFO, - pub EvtDriverGetUniqueContextType: PFN_GET_UNIQUE_CONTEXT_TYPE, -} -#[test] -fn bindgen_test_layout__WDF_OBJECT_CONTEXT_TYPE_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_OBJECT_CONTEXT_TYPE_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_OBJECT_CONTEXT_TYPE_INFO>(), - 40usize, - concat!("Size of: ", stringify!(_WDF_OBJECT_CONTEXT_TYPE_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_OBJECT_CONTEXT_TYPE_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_OBJECT_CONTEXT_TYPE_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_OBJECT_CONTEXT_TYPE_INFO), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContextName) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_OBJECT_CONTEXT_TYPE_INFO), - "::", - stringify!(ContextName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ContextSize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_OBJECT_CONTEXT_TYPE_INFO), - "::", - stringify!(ContextSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UniqueType) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_OBJECT_CONTEXT_TYPE_INFO), - "::", - stringify!(UniqueType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDriverGetUniqueContextType) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_OBJECT_CONTEXT_TYPE_INFO), - "::", - stringify!(EvtDriverGetUniqueContextType), - ), - ); -} -impl Default for _WDF_OBJECT_CONTEXT_TYPE_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_OBJECT_CONTEXT_TYPE_INFO = _WDF_OBJECT_CONTEXT_TYPE_INFO; -pub type PWDF_OBJECT_CONTEXT_TYPE_INFO = *mut _WDF_OBJECT_CONTEXT_TYPE_INFO; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_CUSTOM_TYPE_CONTEXT { - pub Size: ULONG, - pub Data: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__WDF_CUSTOM_TYPE_CONTEXT() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_CUSTOM_TYPE_CONTEXT> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_CUSTOM_TYPE_CONTEXT>(), - 16usize, - concat!("Size of: ", stringify!(_WDF_CUSTOM_TYPE_CONTEXT)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_CUSTOM_TYPE_CONTEXT>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_CUSTOM_TYPE_CONTEXT)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CUSTOM_TYPE_CONTEXT), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CUSTOM_TYPE_CONTEXT), - "::", - stringify!(Data), - ), - ); -} -pub type WDF_CUSTOM_TYPE_CONTEXT = _WDF_CUSTOM_TYPE_CONTEXT; -pub type PWDF_CUSTOM_TYPE_CONTEXT = *mut _WDF_CUSTOM_TYPE_CONTEXT; -pub type PFN_WDFOBJECTGETTYPEDCONTEXTWORKER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Handle: WDFOBJECT, - TypeInfo: PCWDF_OBJECT_CONTEXT_TYPE_INFO, - ) -> PVOID, ->; -pub type PFN_WDFOBJECTALLOCATECONTEXT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Handle: WDFOBJECT, - ContextAttributes: PWDF_OBJECT_ATTRIBUTES, - Context: *mut PVOID, - ) -> NTSTATUS, ->; -pub type PFN_WDFOBJECTCONTEXTGETOBJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ContextPointer: PVOID, - ) -> WDFOBJECT, ->; -pub type PFN_WDFOBJECTREFERENCEACTUAL = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Handle: WDFOBJECT, - Tag: PVOID, - Line: LONG, - File: PCCH, - ), ->; -pub type PFN_WDFOBJECTDEREFERENCEACTUAL = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Handle: WDFOBJECT, - Tag: PVOID, - Line: LONG, - File: PCCH, - ), ->; -pub type PFN_WDFOBJECTCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Attributes: PWDF_OBJECT_ATTRIBUTES, - Object: *mut WDFOBJECT, - ) -> NTSTATUS, ->; -pub type PFN_WDFOBJECTDELETE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Object: WDFOBJECT), ->; -pub type PFN_WDFOBJECTQUERY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Object: WDFOBJECT, - Guid: *const GUID, - QueryBufferLength: ULONG, - QueryBuffer: PVOID, - ) -> NTSTATUS, ->; -pub type PFN_WDFOBJECTACQUIRELOCK = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Object: WDFOBJECT), ->; -pub type PFN_WDFOBJECTRELEASELOCK = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Object: WDFOBJECT), ->; -pub type PFN_WDFWAITLOCKCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - LockAttributes: PWDF_OBJECT_ATTRIBUTES, - Lock: *mut WDFWAITLOCK, - ) -> NTSTATUS, ->; -pub type PFN_WDFWAITLOCKACQUIRE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Lock: WDFWAITLOCK, - Timeout: PLONGLONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFWAITLOCKRELEASE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Lock: WDFWAITLOCK), ->; -pub type PFN_WDFSPINLOCKCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - SpinLockAttributes: PWDF_OBJECT_ATTRIBUTES, - SpinLock: *mut WDFSPINLOCK, - ) -> NTSTATUS, ->; -pub type PFN_WDFSPINLOCKACQUIRE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, SpinLock: WDFSPINLOCK), ->; -pub type PFN_WDFSPINLOCKRELEASE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, SpinLock: WDFSPINLOCK), ->; -pub mod _WDF_DRIVER_INIT_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const WdfDriverInitNonPnpDriver: Type = 1; - pub const WdfDriverInitNoDispatchOverride: Type = 2; - pub const WdfVerifyOn: Type = 4; - pub const WdfVerifierOn: Type = 8; - pub const WdfDriverInitCompanion: Type = 16; -} -pub use self::_WDF_DRIVER_INIT_FLAGS::Type as WDF_DRIVER_INIT_FLAGS; -pub type PFN_WDF_DRIVER_DEVICE_ADD = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDRIVER, arg2: PWDFDEVICE_INIT) -> NTSTATUS, ->; -pub type PFN_WDF_DRIVER_UNLOAD = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDRIVER), ->; -pub type PFN_WDF_TRACE_CALLBACK = ::core::option::Option< - unsafe extern "C" fn( - arg1: UCHAR, - arg2: PVOID, - arg3: ULONG, - arg4: PVOID, - arg5: PVOID, - arg6: PULONG, - ) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_DRIVER_CONFIG { - pub Size: ULONG, - pub EvtDriverDeviceAdd: PFN_WDF_DRIVER_DEVICE_ADD, - pub EvtDriverUnload: PFN_WDF_DRIVER_UNLOAD, - pub DriverInitFlags: ULONG, - pub DriverPoolTag: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_DRIVER_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DRIVER_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DRIVER_CONFIG>(), - 32usize, - concat!("Size of: ", stringify!(_WDF_DRIVER_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DRIVER_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_DRIVER_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DRIVER_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDriverDeviceAdd) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DRIVER_CONFIG), - "::", - stringify!(EvtDriverDeviceAdd), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtDriverUnload) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DRIVER_CONFIG), - "::", - stringify!(EvtDriverUnload), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverInitFlags) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DRIVER_CONFIG), - "::", - stringify!(DriverInitFlags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DriverPoolTag) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DRIVER_CONFIG), - "::", - stringify!(DriverPoolTag), - ), - ); -} -pub type WDF_DRIVER_CONFIG = _WDF_DRIVER_CONFIG; -pub type PWDF_DRIVER_CONFIG = *mut _WDF_DRIVER_CONFIG; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_DRIVER_VERSION_AVAILABLE_PARAMS { - pub Size: ULONG, - pub MajorVersion: ULONG, - pub MinorVersion: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_DRIVER_VERSION_AVAILABLE_PARAMS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DRIVER_VERSION_AVAILABLE_PARAMS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DRIVER_VERSION_AVAILABLE_PARAMS>(), - 12usize, - concat!("Size of: ", stringify!(_WDF_DRIVER_VERSION_AVAILABLE_PARAMS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DRIVER_VERSION_AVAILABLE_PARAMS>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_DRIVER_VERSION_AVAILABLE_PARAMS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DRIVER_VERSION_AVAILABLE_PARAMS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorVersion) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DRIVER_VERSION_AVAILABLE_PARAMS), - "::", - stringify!(MajorVersion), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorVersion) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DRIVER_VERSION_AVAILABLE_PARAMS), - "::", - stringify!(MinorVersion), - ), - ); -} -pub type WDF_DRIVER_VERSION_AVAILABLE_PARAMS = _WDF_DRIVER_VERSION_AVAILABLE_PARAMS; -pub type PWDF_DRIVER_VERSION_AVAILABLE_PARAMS = *mut _WDF_DRIVER_VERSION_AVAILABLE_PARAMS; -pub type PFN_WDFDRIVERCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DriverObject: PDRIVER_OBJECT, - RegistryPath: PCUNICODE_STRING, - DriverAttributes: PWDF_OBJECT_ATTRIBUTES, - DriverConfig: PWDF_DRIVER_CONFIG, - Driver: *mut WDFDRIVER, - ) -> NTSTATUS, ->; -pub type PFN_WDFDRIVERGETREGISTRYPATH = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Driver: WDFDRIVER) -> PWSTR, ->; -pub type PFN_WDFDRIVERWDMGETDRIVEROBJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Driver: WDFDRIVER, - ) -> PDRIVER_OBJECT, ->; -pub type PFN_WDFDRIVEROPENPARAMETERSREGISTRYKEY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Driver: WDFDRIVER, - DesiredAccess: ACCESS_MASK, - KeyAttributes: PWDF_OBJECT_ATTRIBUTES, - Key: *mut WDFKEY, - ) -> NTSTATUS, ->; -pub type PFN_WDFWDMDRIVERGETWDFDRIVERHANDLE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DriverObject: PDRIVER_OBJECT, - ) -> WDFDRIVER, ->; -pub type PFN_WDFDRIVERREGISTERTRACEINFO = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DriverObject: PDRIVER_OBJECT, - EvtTraceCallback: PFN_WDF_TRACE_CALLBACK, - ControlBlock: PVOID, - ) -> NTSTATUS, ->; -pub type PFN_WDFDRIVERRETRIEVEVERSIONSTRING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Driver: WDFDRIVER, - String: WDFSTRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFDRIVERISVERSIONAVAILABLE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Driver: WDFDRIVER, - VersionAvailableParams: PWDF_DRIVER_VERSION_AVAILABLE_PARAMS, - ) -> BOOLEAN, ->; -pub type PFN_WDFDRIVERERRORREPORTAPIMISSING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Driver: WDFDRIVER, - FrameworkExtensionName: PCWSTR, - ApiIndex: ULONG, - DoesApiReturnNtstatus: BOOLEAN, - ) -> NTSTATUS, ->; -pub type PFN_WDFDRIVEROPENPERSISTENTSTATEREGISTRYKEY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Driver: WDFDRIVER, - DesiredAccess: ACCESS_MASK, - KeyAttributes: PWDF_OBJECT_ATTRIBUTES, - Key: *mut WDFKEY, - ) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFDEVICE, - arg2: LPGUID, - arg3: PINTERFACE, - arg4: PVOID, - ) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_QUERY_INTERFACE_CONFIG { - pub Size: ULONG, - pub Interface: PINTERFACE, - pub InterfaceType: *const GUID, - pub SendQueryToParentStack: BOOLEAN, - pub EvtDeviceProcessQueryInterfaceRequest: PFN_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST, - pub ImportInterface: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WDF_QUERY_INTERFACE_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_QUERY_INTERFACE_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_QUERY_INTERFACE_CONFIG>(), - 48usize, - concat!("Size of: ", stringify!(_WDF_QUERY_INTERFACE_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_QUERY_INTERFACE_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_QUERY_INTERFACE_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_QUERY_INTERFACE_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Interface) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_QUERY_INTERFACE_CONFIG), - "::", - stringify!(Interface), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterfaceType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_QUERY_INTERFACE_CONFIG), - "::", - stringify!(InterfaceType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SendQueryToParentStack) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_QUERY_INTERFACE_CONFIG), - "::", - stringify!(SendQueryToParentStack), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceProcessQueryInterfaceRequest) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_QUERY_INTERFACE_CONFIG), - "::", - stringify!(EvtDeviceProcessQueryInterfaceRequest), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ImportInterface) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_QUERY_INTERFACE_CONFIG), - "::", - stringify!(ImportInterface), - ), - ); -} -impl Default for _WDF_QUERY_INTERFACE_CONFIG { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_QUERY_INTERFACE_CONFIG = _WDF_QUERY_INTERFACE_CONFIG; -pub type PWDF_QUERY_INTERFACE_CONFIG = *mut _WDF_QUERY_INTERFACE_CONFIG; -pub type PFN_WDFDEVICEADDQUERYINTERFACE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - InterfaceConfig: PWDF_QUERY_INTERFACE_CONFIG, - ) -> NTSTATUS, ->; -pub mod _WDF_MEMORY_DESCRIPTOR_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WdfMemoryDescriptorTypeInvalid: Type = 0; - pub const WdfMemoryDescriptorTypeBuffer: Type = 1; - pub const WdfMemoryDescriptorTypeMdl: Type = 2; - pub const WdfMemoryDescriptorTypeHandle: Type = 3; -} -pub use self::_WDF_MEMORY_DESCRIPTOR_TYPE::Type as WDF_MEMORY_DESCRIPTOR_TYPE; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDFMEMORY_OFFSET { - pub BufferOffset: usize, - pub BufferLength: usize, -} -#[test] -fn bindgen_test_layout__WDFMEMORY_OFFSET() { - const UNINIT: ::core::mem::MaybeUninit<_WDFMEMORY_OFFSET> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDFMEMORY_OFFSET>(), - 16usize, - concat!("Size of: ", stringify!(_WDFMEMORY_OFFSET)), - ); - assert_eq!( - ::core::mem::align_of::<_WDFMEMORY_OFFSET>(), - 8usize, - concat!("Alignment of ", stringify!(_WDFMEMORY_OFFSET)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BufferOffset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDFMEMORY_OFFSET), - "::", - stringify!(BufferOffset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BufferLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDFMEMORY_OFFSET), - "::", - stringify!(BufferLength), - ), - ); -} -pub type WDFMEMORY_OFFSET = _WDFMEMORY_OFFSET; -pub type PWDFMEMORY_OFFSET = *mut _WDFMEMORY_OFFSET; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WDF_MEMORY_DESCRIPTOR { - pub Type: WDF_MEMORY_DESCRIPTOR_TYPE, - pub u: _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1 { - pub BufferType: _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - pub MdlType: _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2, - pub HandleType: _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1 { - pub Buffer: PVOID, - pub Length: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1>(), - 16usize, - concat!( - "Size of: ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Buffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Length), - ), - ); -} -impl Default for _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2 { - pub Mdl: PMDL, - pub BufferLength: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2>(), - 16usize, - concat!( - "Size of: ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mdl) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Mdl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BufferLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(BufferLength), - ), - ); -} -impl Default for _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3 { - pub Memory: WDFMEMORY, - pub Offsets: PWDFMEMORY_OFFSET, -} -#[test] -fn bindgen_test_layout__WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3>(), - 16usize, - concat!( - "Size of: ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Memory) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Memory), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offsets) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Offsets), - ), - ); -} -impl Default for _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_MEMORY_DESCRIPTOR__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1>(), - 16usize, - concat!("Size of: ", stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).BufferType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(BufferType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MdlType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(MdlType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).HandleType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_MEMORY_DESCRIPTOR__bindgen_ty_1), - "::", - stringify!(HandleType), - ), - ); -} -impl Default for _WDF_MEMORY_DESCRIPTOR__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_MEMORY_DESCRIPTOR() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_MEMORY_DESCRIPTOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_MEMORY_DESCRIPTOR>(), - 24usize, - concat!("Size of: ", stringify!(_WDF_MEMORY_DESCRIPTOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_MEMORY_DESCRIPTOR>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_MEMORY_DESCRIPTOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_MEMORY_DESCRIPTOR), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_MEMORY_DESCRIPTOR), - "::", - stringify!(u), - ), - ); -} -impl Default for _WDF_MEMORY_DESCRIPTOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_MEMORY_DESCRIPTOR = _WDF_MEMORY_DESCRIPTOR; -pub type PWDF_MEMORY_DESCRIPTOR = *mut _WDF_MEMORY_DESCRIPTOR; -pub type PFN_WDFMEMORYCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Attributes: PWDF_OBJECT_ATTRIBUTES, - PoolType: POOL_TYPE, - PoolTag: ULONG, - BufferSize: usize, - Memory: *mut WDFMEMORY, - Buffer: *mut PVOID, - ) -> NTSTATUS, ->; -pub type PFN_WDFMEMORYCREATEPREALLOCATED = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Attributes: PWDF_OBJECT_ATTRIBUTES, - Buffer: PVOID, - BufferSize: usize, - Memory: *mut WDFMEMORY, - ) -> NTSTATUS, ->; -pub type PFN_WDFMEMORYGETBUFFER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Memory: WDFMEMORY, - BufferSize: *mut usize, - ) -> PVOID, ->; -pub type PFN_WDFMEMORYASSIGNBUFFER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Memory: WDFMEMORY, - Buffer: PVOID, - BufferSize: usize, - ) -> NTSTATUS, ->; -pub type PFN_WDFMEMORYCOPYTOBUFFER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - SourceMemory: WDFMEMORY, - SourceOffset: usize, - Buffer: PVOID, - NumBytesToCopyTo: usize, - ) -> NTSTATUS, ->; -pub type PFN_WDFMEMORYCOPYFROMBUFFER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DestinationMemory: WDFMEMORY, - DestinationOffset: usize, - Buffer: PVOID, - NumBytesToCopyFrom: usize, - ) -> NTSTATUS, ->; -pub type PFN_WDFLOOKASIDELISTCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - LookasideAttributes: PWDF_OBJECT_ATTRIBUTES, - BufferSize: usize, - PoolType: POOL_TYPE, - MemoryAttributes: PWDF_OBJECT_ATTRIBUTES, - PoolTag: ULONG, - Lookaside: *mut WDFLOOKASIDE, - ) -> NTSTATUS, ->; -pub type PFN_WDFMEMORYCREATEFROMLOOKASIDE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Lookaside: WDFLOOKASIDE, - Memory: *mut WDFMEMORY, - ) -> NTSTATUS, ->; -pub mod _WDF_CHILD_LIST_RETRIEVE_DEVICE_STATUS { - pub type Type = ::core::ffi::c_int; - pub const WdfChildListRetrieveDeviceUndefined: Type = 0; - pub const WdfChildListRetrieveDeviceSuccess: Type = 1; - pub const WdfChildListRetrieveDeviceNotYetCreated: Type = 2; - pub const WdfChildListRetrieveDeviceNoSuchDevice: Type = 3; -} -pub use self::_WDF_CHILD_LIST_RETRIEVE_DEVICE_STATUS::Type as WDF_CHILD_LIST_RETRIEVE_DEVICE_STATUS; -pub type PWDF_CHILD_LIST_RETRIEVE_DEVICE_STATUS = *mut _WDF_CHILD_LIST_RETRIEVE_DEVICE_STATUS::Type; -pub mod _WDF_RETRIEVE_CHILD_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const WdfRetrieveUnspecified: Type = 0; - pub const WdfRetrievePresentChildren: Type = 1; - pub const WdfRetrieveMissingChildren: Type = 2; - pub const WdfRetrievePendingChildren: Type = 4; - pub const WdfRetrieveAddedChildren: Type = 5; - pub const WdfRetrieveAllChildren: Type = 7; -} -pub use self::_WDF_RETRIEVE_CHILD_FLAGS::Type as WDF_RETRIEVE_CHILD_FLAGS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER { - pub IdentificationDescriptionSize: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER>(), - 4usize, - concat!("Size of: ", stringify!(_WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IdentificationDescriptionSize) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER), - "::", - stringify!(IdentificationDescriptionSize), - ), - ); -} -pub type WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER = _WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER; -pub type PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER = *mut _WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_CHILD_ADDRESS_DESCRIPTION_HEADER { - pub AddressDescriptionSize: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_CHILD_ADDRESS_DESCRIPTION_HEADER() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_CHILD_ADDRESS_DESCRIPTION_HEADER> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_CHILD_ADDRESS_DESCRIPTION_HEADER>(), - 4usize, - concat!("Size of: ", stringify!(_WDF_CHILD_ADDRESS_DESCRIPTION_HEADER)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_CHILD_ADDRESS_DESCRIPTION_HEADER>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_CHILD_ADDRESS_DESCRIPTION_HEADER)), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AddressDescriptionSize) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_ADDRESS_DESCRIPTION_HEADER), - "::", - stringify!(AddressDescriptionSize), - ), - ); -} -pub type WDF_CHILD_ADDRESS_DESCRIPTION_HEADER = _WDF_CHILD_ADDRESS_DESCRIPTION_HEADER; -pub type PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER = *mut _WDF_CHILD_ADDRESS_DESCRIPTION_HEADER; -pub type PFN_WDF_CHILD_LIST_CREATE_DEVICE = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFCHILDLIST, - arg2: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - arg3: PWDFDEVICE_INIT, - ) -> NTSTATUS, ->; -pub type PFN_WDF_CHILD_LIST_SCAN_FOR_CHILDREN = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFCHILDLIST), ->; -pub type PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COPY = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFCHILDLIST, - arg2: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - arg3: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - ), ->; -pub type PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_DUPLICATE = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFCHILDLIST, - arg2: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - arg3: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - ) -> NTSTATUS, ->; -pub type PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COMPARE = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFCHILDLIST, - arg2: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - arg3: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - ) -> BOOLEAN, ->; -pub type PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_CLEANUP = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFCHILDLIST, - arg2: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - ), ->; -pub type PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_COPY = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFCHILDLIST, - arg2: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, - arg3: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, - ), ->; -pub type PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_DUPLICATE = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFCHILDLIST, - arg2: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, - arg3: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, - ) -> NTSTATUS, ->; -pub type PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_CLEANUP = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFCHILDLIST, arg2: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER), ->; -pub type PFN_WDF_CHILD_LIST_DEVICE_REENUMERATED = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFCHILDLIST, - arg2: WDFDEVICE, - arg3: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, - arg4: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, - ) -> BOOLEAN, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_CHILD_RETRIEVE_INFO { - pub Size: ULONG, - pub IdentificationDescription: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - pub AddressDescription: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, - pub Status: WDF_CHILD_LIST_RETRIEVE_DEVICE_STATUS, - pub EvtChildListIdentificationDescriptionCompare: PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COMPARE, -} -#[test] -fn bindgen_test_layout__WDF_CHILD_RETRIEVE_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_CHILD_RETRIEVE_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_CHILD_RETRIEVE_INFO>(), - 40usize, - concat!("Size of: ", stringify!(_WDF_CHILD_RETRIEVE_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_CHILD_RETRIEVE_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_CHILD_RETRIEVE_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_RETRIEVE_INFO), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IdentificationDescription) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_RETRIEVE_INFO), - "::", - stringify!(IdentificationDescription), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AddressDescription) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_RETRIEVE_INFO), - "::", - stringify!(AddressDescription), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_RETRIEVE_INFO), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtChildListIdentificationDescriptionCompare) - as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_RETRIEVE_INFO), - "::", - stringify!(EvtChildListIdentificationDescriptionCompare), - ), - ); -} -impl Default for _WDF_CHILD_RETRIEVE_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_CHILD_RETRIEVE_INFO = _WDF_CHILD_RETRIEVE_INFO; -pub type PWDF_CHILD_RETRIEVE_INFO = *mut _WDF_CHILD_RETRIEVE_INFO; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_CHILD_LIST_CONFIG { - pub Size: ULONG, - pub IdentificationDescriptionSize: ULONG, - pub AddressDescriptionSize: ULONG, - pub EvtChildListCreateDevice: PFN_WDF_CHILD_LIST_CREATE_DEVICE, - pub EvtChildListScanForChildren: PFN_WDF_CHILD_LIST_SCAN_FOR_CHILDREN, - pub EvtChildListIdentificationDescriptionCopy: PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COPY, - pub EvtChildListIdentificationDescriptionDuplicate: PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_DUPLICATE, - pub EvtChildListIdentificationDescriptionCleanup: PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_CLEANUP, - pub EvtChildListIdentificationDescriptionCompare: PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COMPARE, - pub EvtChildListAddressDescriptionCopy: PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_COPY, - pub EvtChildListAddressDescriptionDuplicate: PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_DUPLICATE, - pub EvtChildListAddressDescriptionCleanup: PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_CLEANUP, - pub EvtChildListDeviceReenumerated: PFN_WDF_CHILD_LIST_DEVICE_REENUMERATED, -} -#[test] -fn bindgen_test_layout__WDF_CHILD_LIST_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_CHILD_LIST_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_CHILD_LIST_CONFIG>(), - 96usize, - concat!("Size of: ", stringify!(_WDF_CHILD_LIST_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_CHILD_LIST_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_CHILD_LIST_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IdentificationDescriptionSize) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_CONFIG), - "::", - stringify!(IdentificationDescriptionSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AddressDescriptionSize) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_CONFIG), - "::", - stringify!(AddressDescriptionSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtChildListCreateDevice) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_CONFIG), - "::", - stringify!(EvtChildListCreateDevice), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtChildListScanForChildren) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_CONFIG), - "::", - stringify!(EvtChildListScanForChildren), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtChildListIdentificationDescriptionCopy) - as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_CONFIG), - "::", - stringify!(EvtChildListIdentificationDescriptionCopy), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtChildListIdentificationDescriptionDuplicate) - as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_CONFIG), - "::", - stringify!(EvtChildListIdentificationDescriptionDuplicate), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtChildListIdentificationDescriptionCleanup) - as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_CONFIG), - "::", - stringify!(EvtChildListIdentificationDescriptionCleanup), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtChildListIdentificationDescriptionCompare) - as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_CONFIG), - "::", - stringify!(EvtChildListIdentificationDescriptionCompare), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtChildListAddressDescriptionCopy) as usize - - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_CONFIG), - "::", - stringify!(EvtChildListAddressDescriptionCopy), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtChildListAddressDescriptionDuplicate) - as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_CONFIG), - "::", - stringify!(EvtChildListAddressDescriptionDuplicate), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtChildListAddressDescriptionCleanup) as usize - - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_CONFIG), - "::", - stringify!(EvtChildListAddressDescriptionCleanup), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtChildListDeviceReenumerated) as usize - - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_CONFIG), - "::", - stringify!(EvtChildListDeviceReenumerated), - ), - ); -} -pub type WDF_CHILD_LIST_CONFIG = _WDF_CHILD_LIST_CONFIG; -pub type PWDF_CHILD_LIST_CONFIG = *mut _WDF_CHILD_LIST_CONFIG; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_CHILD_LIST_ITERATOR { - pub Size: ULONG, - pub Flags: ULONG, - pub Reserved: [PVOID; 4usize], -} -#[test] -fn bindgen_test_layout__WDF_CHILD_LIST_ITERATOR() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_CHILD_LIST_ITERATOR> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_CHILD_LIST_ITERATOR>(), - 40usize, - concat!("Size of: ", stringify!(_WDF_CHILD_LIST_ITERATOR)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_CHILD_LIST_ITERATOR>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_CHILD_LIST_ITERATOR)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_ITERATOR), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_ITERATOR), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_CHILD_LIST_ITERATOR), - "::", - stringify!(Reserved), - ), - ); -} -impl Default for _WDF_CHILD_LIST_ITERATOR { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_CHILD_LIST_ITERATOR = _WDF_CHILD_LIST_ITERATOR; -pub type PWDF_CHILD_LIST_ITERATOR = *mut _WDF_CHILD_LIST_ITERATOR; -pub type PFN_WDFCHILDLISTCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Config: PWDF_CHILD_LIST_CONFIG, - ChildListAttributes: PWDF_OBJECT_ATTRIBUTES, - ChildList: *mut WDFCHILDLIST, - ) -> NTSTATUS, ->; -pub type PFN_WDFCHILDLISTGETDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ChildList: WDFCHILDLIST, - ) -> WDFDEVICE, ->; -pub type PFN_WDFCHILDLISTRETRIEVEPDO = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ChildList: WDFCHILDLIST, - RetrieveInfo: PWDF_CHILD_RETRIEVE_INFO, - ) -> WDFDEVICE, ->; -pub type PFN_WDFCHILDLISTRETRIEVEADDRESSDESCRIPTION = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ChildList: WDFCHILDLIST, - IdentificationDescription: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - AddressDescription: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, - ) -> NTSTATUS, ->; -pub type PFN_WDFCHILDLISTBEGINSCAN = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, ChildList: WDFCHILDLIST), ->; -pub type PFN_WDFCHILDLISTENDSCAN = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, ChildList: WDFCHILDLIST), ->; -pub type PFN_WDFCHILDLISTBEGINITERATION = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ChildList: WDFCHILDLIST, - Iterator: PWDF_CHILD_LIST_ITERATOR, - ), ->; -pub type PFN_WDFCHILDLISTRETRIEVENEXTDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ChildList: WDFCHILDLIST, - Iterator: PWDF_CHILD_LIST_ITERATOR, - Device: *mut WDFDEVICE, - Info: PWDF_CHILD_RETRIEVE_INFO, - ) -> NTSTATUS, ->; -pub type PFN_WDFCHILDLISTENDITERATION = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ChildList: WDFCHILDLIST, - Iterator: PWDF_CHILD_LIST_ITERATOR, - ), ->; -pub type PFN_WDFCHILDLISTADDORUPDATECHILDDESCRIPTIONASPRESENT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ChildList: WDFCHILDLIST, - IdentificationDescription: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - AddressDescription: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, - ) -> NTSTATUS, ->; -pub type PFN_WDFCHILDLISTUPDATECHILDDESCRIPTIONASMISSING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ChildList: WDFCHILDLIST, - IdentificationDescription: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - ) -> NTSTATUS, ->; -pub type PFN_WDFCHILDLISTUPDATEALLCHILDDESCRIPTIONSASPRESENT = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, ChildList: WDFCHILDLIST), ->; -pub type PFN_WDFCHILDLISTREQUESTCHILDEJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ChildList: WDFCHILDLIST, - IdentificationDescription: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - ) -> BOOLEAN, ->; -pub type PFN_WDFFILEOBJECTGETFILENAME = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - FileObject: WDFFILEOBJECT, - ) -> PUNICODE_STRING, ->; -pub type PFN_WDFFILEOBJECTGETFLAGS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - FileObject: WDFFILEOBJECT, - ) -> ULONG, ->; -pub type PFN_WDFFILEOBJECTGETDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - FileObject: WDFFILEOBJECT, - ) -> WDFDEVICE, ->; -pub type PFN_WDFFILEOBJECTGETINITIATORPROCESSID = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - FileObject: WDFFILEOBJECT, - ) -> ULONG, ->; -pub type PFN_WDFFILEOBJECTWDMGETFILEOBJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - FileObject: WDFFILEOBJECT, - ) -> PFILE_OBJECT, ->; -pub mod _WDF_DEVICE_STATE_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const WdfDevStateNP: Type = 32768; -} -pub use self::_WDF_DEVICE_STATE_FLAGS::Type as WDF_DEVICE_STATE_FLAGS; -pub mod _WDF_DEVICE_PNP_STATE { - pub type Type = ::core::ffi::c_int; - pub const WdfDevStatePnpInvalid: Type = 0; - pub const WdfDevStatePnpObjectCreated: Type = 256; - pub const WdfDevStatePnpCheckForDevicePresence: Type = 257; - pub const WdfDevStatePnpEjectFailed: Type = 258; - pub const WdfDevStatePnpEjectHardware: Type = 259; - pub const WdfDevStatePnpEjectedWaitingForRemove: Type = 260; - pub const WdfDevStatePnpInit: Type = 261; - pub const WdfDevStatePnpInitStarting: Type = 262; - pub const WdfDevStatePnpInitSurpriseRemoved: Type = 263; - pub const WdfDevStatePnpHardwareAvailable: Type = 264; - pub const WdfDevStatePnpEnableInterfaces: Type = 265; - pub const WdfDevStatePnpHardwareAvailablePowerPolicyFailed: Type = 266; - pub const WdfDevStatePnpQueryRemoveAskDriver: Type = 267; - pub const WdfDevStatePnpQueryRemovePending: Type = 268; - pub const WdfDevStatePnpQueryRemoveStaticCheck: Type = 269; - pub const WdfDevStatePnpQueriedRemoving: Type = 270; - pub const WdfDevStatePnpQueryStopAskDriver: Type = 271; - pub const WdfDevStatePnpQueryStopPending: Type = 272; - pub const WdfDevStatePnpQueryStopStaticCheck: Type = 273; - pub const WdfDevStatePnpQueryCanceled: Type = 274; - pub const WdfDevStatePnpRemoved: Type = 275; - pub const WdfDevStatePnpPdoRemoved: Type = 276; - pub const WdfDevStatePnpRemovedPdoWait: Type = 277; - pub const WdfDevStatePnpRemovedPdoSurpriseRemoved: Type = 278; - pub const WdfDevStatePnpRemovingDisableInterfaces: Type = 279; - pub const WdfDevStatePnpRestarting: Type = 280; - pub const WdfDevStatePnpStarted: Type = 281; - pub const WdfDevStatePnpStartedCancelStop: Type = 282; - pub const WdfDevStatePnpStartedCancelRemove: Type = 283; - pub const WdfDevStatePnpStartedRemoving: Type = 284; - pub const WdfDevStatePnpStartingFromStopped: Type = 285; - pub const WdfDevStatePnpStopped: Type = 286; - pub const WdfDevStatePnpStoppedWaitForStartCompletion: Type = 287; - pub const WdfDevStatePnpStartedStopping: Type = 288; - pub const WdfDevStatePnpSurpriseRemove: Type = 289; - pub const WdfDevStatePnpInitQueryRemove: Type = 290; - pub const WdfDevStatePnpInitQueryRemoveCanceled: Type = 291; - pub const WdfDevStatePnpFdoRemoved: Type = 292; - pub const WdfDevStatePnpRemovedWaitForChildren: Type = 293; - pub const WdfDevStatePnpQueriedSurpriseRemove: Type = 294; - pub const WdfDevStatePnpSurpriseRemoveIoStarted: Type = 295; - pub const WdfDevStatePnpFailedPowerDown: Type = 296; - pub const WdfDevStatePnpFailedIoStarting: Type = 297; - pub const WdfDevStatePnpFailedOwnHardware: Type = 298; - pub const WdfDevStatePnpFailed: Type = 299; - pub const WdfDevStatePnpFailedSurpriseRemoved: Type = 300; - pub const WdfDevStatePnpFailedStarted: Type = 301; - pub const WdfDevStatePnpFailedWaitForRemove: Type = 302; - pub const WdfDevStatePnpFailedInit: Type = 303; - pub const WdfDevStatePnpPdoInitFailed: Type = 304; - pub const WdfDevStatePnpRestart: Type = 305; - pub const WdfDevStatePnpRestartReleaseHardware: Type = 306; - pub const WdfDevStatePnpRestartHardwareAvailable: Type = 307; - pub const WdfDevStatePnpPdoRestart: Type = 308; - pub const WdfDevStatePnpFinal: Type = 309; - pub const WdfDevStatePnpRemovedChildrenRemoved: Type = 310; - pub const WdfDevStatePnpQueryRemoveEnsureDeviceAwake: Type = 311; - pub const WdfDevStatePnpQueryStopEnsureDeviceAwake: Type = 312; - pub const WdfDevStatePnpFailedPowerPolicyRemoved: Type = 313; - pub const WdfDevStatePnpNull: Type = 314; -} -pub use self::_WDF_DEVICE_PNP_STATE::Type as WDF_DEVICE_PNP_STATE; -pub type PWDF_DEVICE_PNP_STATE = *mut _WDF_DEVICE_PNP_STATE::Type; -pub mod _WDF_DEVICE_POWER_STATE { - pub type Type = ::core::ffi::c_int; - pub const WdfDevStatePowerInvalid: Type = 0; - pub const WdfDevStatePowerObjectCreated: Type = 768; - pub const WdfDevStatePowerCheckDeviceType: Type = 769; - pub const WdfDevStatePowerCheckDeviceTypeNP: Type = 33538; - pub const WdfDevStatePowerCheckParentState: Type = 771; - pub const WdfDevStatePowerCheckParentStateNP: Type = 33540; - pub const WdfDevStatePowerEnablingWakeAtBus: Type = 773; - pub const WdfDevStatePowerEnablingWakeAtBusNP: Type = 33542; - pub const WdfDevStatePowerD0: Type = 775; - pub const WdfDevStatePowerD0NP: Type = 33544; - pub const WdfDevStatePowerD0BusWakeOwner: Type = 777; - pub const WdfDevStatePowerD0BusWakeOwnerNP: Type = 33546; - pub const WdfDevStatePowerD0ArmedForWake: Type = 779; - pub const WdfDevStatePowerD0ArmedForWakeNP: Type = 33548; - pub const WdfDevStatePowerD0DisarmingWakeAtBus: Type = 781; - pub const WdfDevStatePowerD0DisarmingWakeAtBusNP: Type = 33550; - pub const WdfDevStatePowerD0Starting: Type = 783; - pub const WdfDevStatePowerD0StartingConnectInterrupt: Type = 784; - pub const WdfDevStatePowerD0StartingDmaEnable: Type = 785; - pub const WdfDevStatePowerD0StartingStartSelfManagedIo: Type = 786; - pub const WdfDevStatePowerDecideD0State: Type = 787; - pub const WdfDevStatePowerGotoD3Stopped: Type = 788; - pub const WdfDevStatePowerStopped: Type = 789; - pub const WdfDevStatePowerStartingCheckDeviceType: Type = 790; - pub const WdfDevStatePowerStartingChild: Type = 791; - pub const WdfDevStatePowerDxDisablingWakeAtBus: Type = 792; - pub const WdfDevStatePowerDxDisablingWakeAtBusNP: Type = 33561; - pub const WdfDevStatePowerGotoDx: Type = 794; - pub const WdfDevStatePowerGotoDxNP: Type = 33563; - pub const WdfDevStatePowerGotoDxIoStopped: Type = 796; - pub const WdfDevStatePowerGotoDxIoStoppedNP: Type = 33565; - pub const WdfDevStatePowerGotoDxNPFailed: Type = 33566; - pub const WdfDevStatePowerDx: Type = 799; - pub const WdfDevStatePowerDxNP: Type = 33568; - pub const WdfDevStatePowerGotoDxArmedForWake: Type = 801; - pub const WdfDevStatePowerGotoDxArmedForWakeNP: Type = 33570; - pub const WdfDevStatePowerGotoDxIoStoppedArmedForWake: Type = 803; - pub const WdfDevStatePowerGotoDxIoStoppedArmedForWakeNP: Type = 33572; - pub const WdfDevStatePowerDxArmedForWake: Type = 805; - pub const WdfDevStatePowerDxArmedForWakeNP: Type = 33574; - pub const WdfDevStatePowerCheckParentStateArmedForWake: Type = 807; - pub const WdfDevStatePowerCheckParentStateArmedForWakeNP: Type = 33576; - pub const WdfDevStatePowerWaitForParentArmedForWake: Type = 809; - pub const WdfDevStatePowerWaitForParentArmedForWakeNP: Type = 33578; - pub const WdfDevStatePowerStartSelfManagedIo: Type = 811; - pub const WdfDevStatePowerStartSelfManagedIoNP: Type = 33580; - pub const WdfDevStatePowerStartSelfManagedIoFailed: Type = 813; - pub const WdfDevStatePowerStartSelfManagedIoFailedNP: Type = 33582; - pub const WdfDevStatePowerWaitForParent: Type = 815; - pub const WdfDevStatePowerWaitForParentNP: Type = 33584; - pub const WdfDevStatePowerWakePending: Type = 817; - pub const WdfDevStatePowerWakePendingNP: Type = 33586; - pub const WdfDevStatePowerWaking: Type = 819; - pub const WdfDevStatePowerWakingNP: Type = 33588; - pub const WdfDevStatePowerWakingConnectInterrupt: Type = 821; - pub const WdfDevStatePowerWakingConnectInterruptNP: Type = 33590; - pub const WdfDevStatePowerWakingConnectInterruptFailed: Type = 823; - pub const WdfDevStatePowerWakingConnectInterruptFailedNP: Type = 33592; - pub const WdfDevStatePowerWakingDmaEnable: Type = 825; - pub const WdfDevStatePowerWakingDmaEnableNP: Type = 33594; - pub const WdfDevStatePowerWakingDmaEnableFailed: Type = 827; - pub const WdfDevStatePowerWakingDmaEnableFailedNP: Type = 33596; - pub const WdfDevStatePowerReportPowerUpFailedDerefParent: Type = 829; - pub const WdfDevStatePowerReportPowerUpFailed: Type = 830; - pub const WdfDevStatePowerPowerFailedPowerDown: Type = 831; - pub const WdfDevStatePowerReportPowerDownFailed: Type = 832; - pub const WdfDevStatePowerInitialConnectInterruptFailed: Type = 833; - pub const WdfDevStatePowerInitialDmaEnableFailed: Type = 834; - pub const WdfDevStatePowerInitialSelfManagedIoFailed: Type = 835; - pub const WdfDevStatePowerInitialPowerUpFailedDerefParent: Type = 836; - pub const WdfDevStatePowerInitialPowerUpFailed: Type = 837; - pub const WdfDevStatePowerDxStoppedDisarmWake: Type = 838; - pub const WdfDevStatePowerDxStoppedDisarmWakeNP: Type = 33607; - pub const WdfDevStatePowerGotoDxStoppedDisableInterruptNP: Type = 33608; - pub const WdfDevStatePowerGotoDxStopped: Type = 841; - pub const WdfDevStatePowerDxStopped: Type = 842; - pub const WdfDevStatePowerGotoStopped: Type = 843; - pub const WdfDevStatePowerStoppedCompleteDx: Type = 844; - pub const WdfDevStatePowerDxStoppedDecideDxState: Type = 845; - pub const WdfDevStatePowerDxStoppedArmForWake: Type = 846; - pub const WdfDevStatePowerDxStoppedArmForWakeNP: Type = 33615; - pub const WdfDevStatePowerFinalPowerDownFailed: Type = 848; - pub const WdfDevStatePowerFinal: Type = 849; - pub const WdfDevStatePowerGotoImplicitD3DisarmWakeAtBus: Type = 850; - pub const WdfDevStatePowerUpFailed: Type = 851; - pub const WdfDevStatePowerUpFailedDerefParent: Type = 852; - pub const WdfDevStatePowerGotoDxFailed: Type = 853; - pub const WdfDevStatePowerGotoDxStoppedDisableInterrupt: Type = 854; - pub const WdfDevStatePowerUpFailedNP: Type = 33623; - pub const WdfDevStatePowerUpFailedDerefParentNP: Type = 33624; - pub const WdfDevStatePowerNotifyingD0ExitToWakeInterrupts: Type = 857; - pub const WdfDevStatePowerNotifyingD0EntryToWakeInterrupts: Type = 858; - pub const WdfDevStatePowerNotifyingD0ExitToWakeInterruptsNP: Type = 33627; - pub const WdfDevStatePowerNotifyingD0EntryToWakeInterruptsNP: Type = 33628; - pub const WdfDevStatePowerInitialPowerUpFailedPowerDown: Type = 861; - pub const WdfDevStatePowerUpFailedPowerDown: Type = 862; - pub const WdfDevStatePowerUpFailedPowerDownNP: Type = 33631; - pub const WdfDevStatePowerInitialSelfManagedIoFailedStarted: Type = 864; - pub const WdfDevStatePowerStartSelfManagedIoFailedStarted: Type = 865; - pub const WdfDevStatePowerStartSelfManagedIoFailedStartedNP: Type = 33634; - pub const WdfDevStatePowerWakingPostHardwareEnabled: Type = 867; - pub const WdfDevStatePowerWakingPostHardwareEnabledNP: Type = 33636; - pub const WdfDevStatePowerWakingPostHardwareEnabledFailed: Type = 869; - pub const WdfDevStatePowerWakingPostHardwareEnabledFailedNP: Type = 33638; - pub const WdfDevStatePowerD0StartingPostHardwareEnabled: Type = 871; - pub const WdfDevStatePowerInitialPostHardwareEnabledFailed: Type = 872; - pub const WdfDevStatePowerNull: Type = 873; -} -pub use self::_WDF_DEVICE_POWER_STATE::Type as WDF_DEVICE_POWER_STATE; -pub type PWDF_DEVICE_POWER_STATE = *mut _WDF_DEVICE_POWER_STATE::Type; -pub mod _WDF_DEVICE_POWER_POLICY_STATE { - pub type Type = ::core::ffi::c_int; - pub const WdfDevStatePwrPolInvalid: Type = 0; - pub const WdfDevStatePwrPolObjectCreated: Type = 1280; - pub const WdfDevStatePwrPolStarting: Type = 1281; - pub const WdfDevStatePwrPolStartingSucceeded: Type = 1282; - pub const WdfDevStatePwrPolStartingFailed: Type = 1283; - pub const WdfDevStatePwrPolStartingDecideS0Wake: Type = 1284; - pub const WdfDevStatePwrPolStartedIdleCapable: Type = 1285; - pub const WdfDevStatePwrPolTimerExpiredNoWake: Type = 1286; - pub const WdfDevStatePwrPolTimerExpiredNoWakeCompletePowerDown: Type = 1287; - pub const WdfDevStatePwrPolWaitingUnarmed: Type = 1288; - pub const WdfDevStatePwrPolWaitingUnarmedQueryIdle: Type = 1289; - pub const WdfDevStatePwrPolS0NoWakePowerUp: Type = 1290; - pub const WdfDevStatePwrPolS0NoWakeCompletePowerUp: Type = 1291; - pub const WdfDevStatePwrPolSystemSleepFromDeviceWaitingUnarmed: Type = 1292; - pub const WdfDevStatePwrPolSystemSleepNeedWake: Type = 1293; - pub const WdfDevStatePwrPolSystemSleepNeedWakeCompletePowerUp: Type = 1294; - pub const WdfDevStatePwrPolSystemSleepPowerRequestFailed: Type = 1295; - pub const WdfDevStatePwrPolCheckPowerPageable: Type = 1296; - pub const WdfDevStatePwrPolSleepingWakeWakeArrived: Type = 1297; - pub const WdfDevStatePwrPolSleepingWakeRevertArmWake: Type = 1298; - pub const WdfDevStatePwrPolSystemAsleepWakeArmed: Type = 1299; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeEnabled: Type = 1300; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeEnabledWakeCanceled: Type = 1301; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeDisarm: Type = 1302; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeTriggered: Type = 1303; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeTriggeredS0: Type = 1304; - pub const WdfDevStatePwrPolSystemWakeDeviceWokeDisarm: Type = 1305; - pub const WdfDevStatePwrPolSleepingWakeWakeArrivedNP: Type = 34074; - pub const WdfDevStatePwrPolSleepingWakeRevertArmWakeNP: Type = 34075; - pub const WdfDevStatePwrPolSleepingWakePowerDownFailed: Type = 1308; - pub const WdfDevStatePwrPolSleepingWakePowerDownFailedWakeCanceled: Type = 1309; - pub const WdfDevStatePwrPolSystemAsleepWakeArmedNP: Type = 34078; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeEnabledNP: Type = 34079; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeEnabledWakeCanceledNP: Type = 34080; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeDisarmNP: Type = 34081; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeTriggeredNP: Type = 34082; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeTriggeredS0NP: Type = 34083; - pub const WdfDevStatePwrPolSystemWakeDeviceWokeDisarmNP: Type = 34084; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeCompletePowerUp: Type = 1317; - pub const WdfDevStatePwrPolSleeping: Type = 1318; - pub const WdfDevStatePwrPolSleepingNoWakePowerDown: Type = 1319; - pub const WdfDevStatePwrPolSleepingNoWakeCompletePowerDown: Type = 1320; - pub const WdfDevStatePwrPolSleepingNoWakeDxRequestFailed: Type = 1321; - pub const WdfDevStatePwrPolSleepingWakePowerDown: Type = 1322; - pub const WdfDevStatePwrPolSleepingSendWake: Type = 1323; - pub const WdfDevStatePwrPolSystemAsleepNoWake: Type = 1324; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeDisabled: Type = 1325; - pub const WdfDevStatePwrPolSystemWakeDeviceToD0: Type = 1326; - pub const WdfDevStatePwrPolSystemWakeDeviceToD0CompletePowerUp: Type = 1327; - pub const WdfDevStatePwrPolSystemWakeQueryIdle: Type = 1328; - pub const WdfDevStatePwrPolStartedWakeCapable: Type = 1329; - pub const WdfDevStatePwrPolTimerExpiredDecideUsbSS: Type = 1330; - pub const WdfDevStatePwrPolTimerExpiredWakeCapablePowerDown: Type = 1331; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableSendWake: Type = 1332; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableUsbSS: Type = 1333; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableWakeArrived: Type = 1334; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableCancelWake: Type = 1335; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableWakeCanceled: Type = 1336; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableCleanup: Type = 1337; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableDxAllocFailed: Type = 1338; - pub const WdfDevStatePwrPolTimerExpiredWakeCompletedPowerDown: Type = 1339; - pub const WdfDevStatePwrPolTimerExpiredWakeCompletedPowerUp: Type = 1340; - pub const WdfDevStatePwrPolWaitingArmedUsbSS: Type = 1341; - pub const WdfDevStatePwrPolWaitingArmed: Type = 1342; - pub const WdfDevStatePwrPolWaitingArmedQueryIdle: Type = 1343; - pub const WdfDevStatePwrPolIoPresentArmed: Type = 1344; - pub const WdfDevStatePwrPolIoPresentArmedWakeCanceled: Type = 1345; - pub const WdfDevStatePwrPolS0WakeDisarm: Type = 1346; - pub const WdfDevStatePwrPolS0WakeCompletePowerUp: Type = 1347; - pub const WdfDevStatePwrPolTimerExpiredWakeSucceeded: Type = 1348; - pub const WdfDevStatePwrPolTimerExpiredWakeCompletedDisarm: Type = 1349; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableWakeSucceeded: Type = 1350; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableWakeFailed: Type = 1351; - pub const WdfDevStatePwrPolWakeFailedUsbSS: Type = 1352; - pub const WdfDevStatePwrPolTimerExpiredWakeCapablePowerDownFailedCancelWake: Type = 1353; - pub const WdfDevStatePwrPolTimerExpiredWakeCapablePowerDownFailedWakeCanceled: Type = 1354; - pub const WdfDevStatePwrPolTimerExpiredWakeCapablePowerDownFailedUsbSS: Type = 1355; - pub const WdfDevStatePwrPolCancelingWakeForSystemSleep: Type = 1356; - pub const WdfDevStatePwrPolCancelingWakeForSystemSleepWakeCanceled: Type = 1357; - pub const WdfDevStatePwrPolDisarmingWakeForSystemSleepCompletePowerUp: Type = 1358; - pub const WdfDevStatePwrPolPowerUpForSystemSleepFailed: Type = 1359; - pub const WdfDevStatePwrPolWokeFromS0UsbSS: Type = 1360; - pub const WdfDevStatePwrPolWokeFromS0: Type = 1361; - pub const WdfDevStatePwrPolWokeFromS0NotifyDriver: Type = 1362; - pub const WdfDevStatePwrPolStoppingResetDevice: Type = 1363; - pub const WdfDevStatePwrPolStoppingResetDeviceCompletePowerUp: Type = 1364; - pub const WdfDevStatePwrPolStoppingResetDeviceFailed: Type = 1365; - pub const WdfDevStatePwrPolStoppingD0: Type = 1366; - pub const WdfDevStatePwrPolStoppingD0Failed: Type = 1367; - pub const WdfDevStatePwrPolStoppingDisarmWake: Type = 1368; - pub const WdfDevStatePwrPolStoppingDisarmWakeCancelWake: Type = 1369; - pub const WdfDevStatePwrPolStoppingDisarmWakeWakeCanceled: Type = 1370; - pub const WdfDevStatePwrPolStopping: Type = 1371; - pub const WdfDevStatePwrPolStoppingFailed: Type = 1372; - pub const WdfDevStatePwrPolStoppingSendStatus: Type = 1373; - pub const WdfDevStatePwrPolStoppingCancelTimer: Type = 1374; - pub const WdfDevStatePwrPolStoppingWaitForIdleTimeout: Type = 1375; - pub const WdfDevStatePwrPolStoppingCancelUsbSS: Type = 1376; - pub const WdfDevStatePwrPolStoppingWaitForUsbSSCompletion: Type = 1377; - pub const WdfDevStatePwrPolStoppingCancelWake: Type = 1378; - pub const WdfDevStatePwrPolStopped: Type = 1379; - pub const WdfDevStatePwrPolCancelUsbSS: Type = 1380; - pub const WdfDevStatePwrPolStarted: Type = 1381; - pub const WdfDevStatePwrPolStartedCancelTimer: Type = 1382; - pub const WdfDevStatePwrPolStartedWaitForIdleTimeout: Type = 1383; - pub const WdfDevStatePwrPolStartedWakeCapableCancelTimerForSleep: Type = 1384; - pub const WdfDevStatePwrPolStartedWakeCapableWaitForIdleTimeout: Type = 1385; - pub const WdfDevStatePwrPolStartedWakeCapableSleepingUsbSS: Type = 1386; - pub const WdfDevStatePwrPolStartedIdleCapableCancelTimerForSleep: Type = 1387; - pub const WdfDevStatePwrPolStartedIdleCapableWaitForIdleTimeout: Type = 1388; - pub const WdfDevStatePwrPolDeviceD0PowerRequestFailed: Type = 1389; - pub const WdfDevStatePwrPolDevicePowerRequestFailed: Type = 1390; - pub const WdfDevStatePwrPolGotoDx: Type = 1391; - pub const WdfDevStatePwrPolGotoDxInDx: Type = 1392; - pub const WdfDevStatePwrPolDx: Type = 1393; - pub const WdfDevStatePwrPolGotoD0: Type = 1394; - pub const WdfDevStatePwrPolGotoD0InD0: Type = 1395; - pub const WdfDevStatePwrPolFinal: Type = 1396; - pub const WdfDevStatePwrPolSleepingPowerDownNotProcessed: Type = 1397; - pub const WdfDevStatePwrPolTimerExpiredWakeCapablePowerDownNotProcessed: Type = 1398; - pub const WdfDevStatePwrPolTimerExpiredNoWakePowerDownNotProcessed: Type = 1399; - pub const WdfDevStatePwrPolTimerExpiredNoWakePoweredDownDisableIdleTimer: Type = 1400; - pub const WdfDevStatePwrPolStoppingWaitingForImplicitPowerDown: Type = 1401; - pub const WdfDevStatePwrPolStoppingPoweringUp: Type = 1402; - pub const WdfDevStatePwrPolStoppingPoweringDown: Type = 1403; - pub const WdfDevStatePwrPolPowerUpForSystemSleepNotSeen: Type = 1404; - pub const WdfDevStatePwrPolWaitingArmedStoppingCancelUsbSS: Type = 1405; - pub const WdfDevStatePwrPolWaitingArmedWakeFailedCancelUsbSS: Type = 1406; - pub const WdfDevStatePwrPolWaitingArmedIoPresentCancelUsbSS: Type = 1407; - pub const WdfDevStatePwrPolWaitingArmedWakeSucceededCancelUsbSS: Type = 1408; - pub const WdfDevStatePwrPolCancelingUsbSSForSystemSleep: Type = 1409; - pub const WdfDevStatePwrPolStoppingD0CancelUsbSS: Type = 1410; - pub const WdfDevStatePwrPolStartingPoweredUp: Type = 1411; - pub const WdfDevStatePwrPolIdleCapableDeviceIdle: Type = 1412; - pub const WdfDevStatePwrPolDeviceIdleReturnToActive: Type = 1413; - pub const WdfDevStatePwrPolDeviceIdleSleeping: Type = 1414; - pub const WdfDevStatePwrPolDeviceIdleStopping: Type = 1415; - pub const WdfDevStatePwrPolTimerExpiredNoWakeUndoPowerDown: Type = 1416; - pub const WdfDevStatePwrPolWakeCapableDeviceIdle: Type = 1417; - pub const WdfDevStatePwrPolWakeCapableUsbSSCompleted: Type = 1418; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableUndoPowerDown: Type = 1419; - pub const WdfDevStatePwrPolTimerExpiredWakeCompletedHardwareStarted: Type = 1420; - pub const WdfDevStatePwrPolStoppedRemoving: Type = 1421; - pub const WdfDevStatePwrPolRemoved: Type = 1422; - pub const WdfDevStatePwrPolRestarting: Type = 1423; - pub const WdfDevStatePwrPolRestartingFailed: Type = 1424; - pub const WdfDevStatePwrPolStartingPoweredUpFailed: Type = 1425; - pub const WdfDevStatePwrPolTimerExpiredNoWakeReturnToActive: Type = 1426; - pub const WdfDevStatePwrPolWaitingArmedWakeInterruptFired: Type = 1427; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeInterruptFired: Type = 1428; - pub const WdfDevStatePwrPolSystemWakeDeviceWakeInterruptFiredNP: Type = 34197; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableWakeInterruptArrived: Type = 1430; - pub const WdfDevStatePwrPolTimerExpiredWakeCapablePowerDownFailedWakeInterruptArrived: Type = 1431; - pub const WdfDevStatePwrPolWaitingArmedWakeInterruptFiredDuringPowerDown: Type = 1432; - pub const WdfDevStatePwrPolStartedNotIdleCapableDirectedDown: Type = 1433; - pub const WdfDevStatePwrPolStartedIdleCapableTimerCanceledForSleep: Type = 1434; - pub const WdfDevStatePwrPolTimerExpiredNoWakeUndoPowerDownWaitForDirectedUp: Type = 1435; - pub const WdfDevStatePwrPolIdleCapableTimerNotExpiredDirectedDown: Type = 1436; - pub const WdfDevStatePwrPolIdleCapableDirectedDownTriggerDPNR: Type = 1437; - pub const WdfDevStatePwrPolWaitingUnarmedDirectedDown: Type = 1438; - pub const WdfDevStatePwrPolIdleCapableDirectedDownTriggerDPR: Type = 1439; - pub const WdfDevStatePwrPolStartedWakeCapableTimerCanceledForSleep: Type = 1440; - pub const WdfDevStatePwrPolWakeCapableTimerNotExpiredDirectedDown: Type = 1441; - pub const WdfDevStatePwrPolWakeCapableDirectedDownTriggerDPNR: Type = 1442; - pub const WdfDevStatePwrPolTimerExpiredWakeCompletedPowerDownWaitForDirectedUp: Type = 1443; - pub const WdfDevStatePwrPolTimerExpiredWakeCompletedPowerDownDirectedTriggerDPR: Type = 1444; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableUndoPowerDownWaitForDirectedUp: Type = 1445; - pub const WdfDevStatePwrPolWakeCapableUsbSSCompletedUndoWaitForDirectedUp: Type = 1446; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableUsbSSDirectedDown: Type = 1447; - pub const WdfDevStatePwrPolWaitingArmedWakeInterruptFiredDuringPowerDownCheckDirected: Type = 1448; - pub const WdfDevStatePwrPolTimerExpiredWakeCompletedPowerDownCheckDirected: Type = 1449; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableWakeSucceededCheckDirected: Type = 1450; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableWakeSucceededWaitForDirectedUp: Type = 1451; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableWakeSucceededTriggerDPR: Type = 1452; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableWakeFailedCheckDirected: Type = 1453; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableWakeFailedWaitForDirectedUp: Type = 1454; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableWakeFailedTriggerDPR: Type = 1455; - pub const WdfDevStatePwrPolWaitingArmedDirectedDownWakeInterruptFiredTriggerDPR: Type = 1456; - pub const WdfDevStatePwrPolWaitingArmedDirectedDownWakeInterruptFired: Type = 1457; - pub const WdfDevStatePwrPolWaitingArmedDirectedDown: Type = 1458; - pub const WdfDevStatePwrPolWaitingArmedDirectedDownWakeSucceededCancelUsbSS: Type = 1459; - pub const WdfDevStatePwrPolWaitingArmedDirectedDownWakeFailedCancelUsbSS: Type = 1460; - pub const WdfDevStatePwrPolWaitingArmedDirectedDownTriggerDPR: Type = 1461; - pub const WdfDevStatePwrPolWaitingArmedDirectedDownWakeSucceededTriggerDPR: Type = 1462; - pub const WdfDevStatePwrPolWaitingArmedDirectedDownUsbSSCompleted: Type = 1463; - pub const WdfDevStatePwrPolWaitingArmedDirectedDownUsbSSCompletedTriggerDPR: Type = 1464; - pub const WdfDevStatePwrPolWaitingArmedDirectedDownWakeFailedCancelUsbSSTriggerDPR: Type = 1465; - pub const WdfDevStatePwrPolUsbSSCancelled: Type = 1466; - pub const WdfDevStatePwrPolTimerExpiredWakeCapableRevertArmWake: Type = 1467; - pub const WdfDevStatePwrPolSleepingWakeCancelWake: Type = 1468; - pub const WdfDevStatePwrPolSleepingWakeCancelWakeNP: Type = 34237; - pub const WdfDevStatePwrPolSystemWakeDeviceD0PowerRequestFailed: Type = 1470; - pub const WdfDevStatePwrPolSystemWakeDevicePowerRequestFailed: Type = 1471; - pub const WdfDevStatePwrPolNull: Type = 1472; -} -pub use self::_WDF_DEVICE_POWER_POLICY_STATE::Type as WDF_DEVICE_POWER_POLICY_STATE; -pub type PWDF_DEVICE_POWER_POLICY_STATE = *mut _WDF_DEVICE_POWER_POLICY_STATE::Type; -pub mod _WDF_STATE_NOTIFICATION_TYPE { - pub type Type = ::core::ffi::c_int; - pub const StateNotificationInvalid: Type = 0; - pub const StateNotificationEnterState: Type = 1; - pub const StateNotificationPostProcessState: Type = 2; - pub const StateNotificationLeaveState: Type = 4; - pub const StateNotificationAllStates: Type = 7; -} -pub use self::_WDF_STATE_NOTIFICATION_TYPE::Type as WDF_STATE_NOTIFICATION_TYPE; -pub mod _WDF_POWER_POLICY_S0_IDLE_CAPABILITIES { - pub type Type = ::core::ffi::c_int; - pub const IdleCapsInvalid: Type = 0; - pub const IdleCannotWakeFromS0: Type = 1; - pub const IdleCanWakeFromS0: Type = 2; - pub const IdleUsbSelectiveSuspend: Type = 3; -} -pub use self::_WDF_POWER_POLICY_S0_IDLE_CAPABILITIES::Type as WDF_POWER_POLICY_S0_IDLE_CAPABILITIES; -pub mod _WDF_POWER_POLICY_S0_IDLE_USER_CONTROL { - pub type Type = ::core::ffi::c_int; - pub const IdleUserControlInvalid: Type = 0; - pub const IdleDoNotAllowUserControl: Type = 1; - pub const IdleAllowUserControl: Type = 2; -} -pub use self::_WDF_POWER_POLICY_S0_IDLE_USER_CONTROL::Type as WDF_POWER_POLICY_S0_IDLE_USER_CONTROL; -pub mod _WDF_POWER_POLICY_IDLE_TIMEOUT_CONSTANTS { - pub type Type = ::core::ffi::c_int; - pub const IdleTimeoutDefaultConstant: Type = 0; -} -pub use self::_WDF_POWER_POLICY_IDLE_TIMEOUT_CONSTANTS::Type as WDF_POWER_POLICY_IDLE_TIMEOUT_CONSTANTS; -pub mod _WDF_POWER_POLICY_SX_WAKE_USER_CONTROL { - pub type Type = ::core::ffi::c_int; - pub const WakeUserControlInvalid: Type = 0; - pub const WakeDoNotAllowUserControl: Type = 1; - pub const WakeAllowUserControl: Type = 2; -} -pub use self::_WDF_POWER_POLICY_SX_WAKE_USER_CONTROL::Type as WDF_POWER_POLICY_SX_WAKE_USER_CONTROL; -pub mod _WDF_POWER_DEVICE_STATE { - pub type Type = ::core::ffi::c_int; - pub const WdfPowerDeviceInvalid: Type = 0; - pub const WdfPowerDeviceD0: Type = 1; - pub const WdfPowerDeviceD1: Type = 2; - pub const WdfPowerDeviceD2: Type = 3; - pub const WdfPowerDeviceD3: Type = 4; - pub const WdfPowerDeviceD3Final: Type = 5; - pub const WdfPowerDevicePrepareForHibernation: Type = 6; - pub const WdfPowerDeviceMaximum: Type = 7; -} -pub use self::_WDF_POWER_DEVICE_STATE::Type as WDF_POWER_DEVICE_STATE; -pub type PWDF_POWER_DEVICE_STATE = *mut _WDF_POWER_DEVICE_STATE::Type; -pub mod _WDF_DISPATCH_IRP_TO_IO_QUEUE_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const WDF_DISPATCH_IRP_TO_IO_QUEUE_NO_FLAGS: Type = 0; - pub const WDF_DISPATCH_IRP_TO_IO_QUEUE_INVOKE_INCALLERCTX_CALLBACK: Type = 1; - pub const WDF_DISPATCH_IRP_TO_IO_QUEUE_PREPROCESSED_IRP: Type = 2; -} -pub use self::_WDF_DISPATCH_IRP_TO_IO_QUEUE_FLAGS::Type as WDF_DISPATCH_IRP_TO_IO_QUEUE_FLAGS; -pub mod _WDF_SPECIAL_FILE_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WdfSpecialFileUndefined: Type = 0; - pub const WdfSpecialFilePaging: Type = 1; - pub const WdfSpecialFileHibernation: Type = 2; - pub const WdfSpecialFileDump: Type = 3; - pub const WdfSpecialFileBoot: Type = 4; - pub const WdfSpecialFilePostDisplay: Type = 5; - pub const WdfSpecialFileGuestAssigned: Type = 6; - pub const WdfSpecialFileMax: Type = 7; -} -pub use self::_WDF_SPECIAL_FILE_TYPE::Type as WDF_SPECIAL_FILE_TYPE; -pub type PWDF_SPECIAL_FILE_TYPE = *mut _WDF_SPECIAL_FILE_TYPE::Type; -pub mod _WDF_DEVICE_IO_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WdfDeviceIoUndefined: Type = 0; - pub const WdfDeviceIoNeither: Type = 1; - pub const WdfDeviceIoBuffered: Type = 2; - pub const WdfDeviceIoDirect: Type = 3; - pub const WdfDeviceIoBufferedOrDirect: Type = 4; - pub const WdfDeviceIoMaximum: Type = 5; -} -pub use self::_WDF_DEVICE_IO_TYPE::Type as WDF_DEVICE_IO_TYPE; -pub type PWDF_DEVICE_IO_TYPE = *mut _WDF_DEVICE_IO_TYPE::Type; -pub mod _WDF_FILEOBJECT_CLASS { - pub type Type = ::core::ffi::c_int; - pub const WdfFileObjectInvalid: Type = 0; - pub const WdfFileObjectNotRequired: Type = 1; - pub const WdfFileObjectWdfCanUseFsContext: Type = 2; - pub const WdfFileObjectWdfCanUseFsContext2: Type = 3; - pub const WdfFileObjectWdfCannotUseFsContexts: Type = 4; - pub const WdfFileObjectCanBeOptional: Type = -2147483648; -} -pub use self::_WDF_FILEOBJECT_CLASS::Type as WDF_FILEOBJECT_CLASS; -pub type PWDF_FILEOBJECT_CLASS = *mut _WDF_FILEOBJECT_CLASS::Type; -pub mod _WDF_DEVICE_FAILED_ACTION { - pub type Type = ::core::ffi::c_int; - pub const WdfDeviceFailedUndefined: Type = 0; - pub const WdfDeviceFailedAttemptRestart: Type = 1; - pub const WdfDeviceFailedNoRestart: Type = 2; -} -pub use self::_WDF_DEVICE_FAILED_ACTION::Type as WDF_DEVICE_FAILED_ACTION; -pub mod _WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE { - pub type Type = ::core::ffi::c_int; - pub const WdfReleaseHardwareOrderOnFailureInvalid: Type = 0; - pub const WdfReleaseHardwareOrderOnFailureEarly: Type = 1; - pub const WdfReleaseHardwareOrderOnFailureAfterDescendants: Type = 2; -} -pub use self::_WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE::Type as WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE; -pub type PWDF_RELEASE_HARDWARE_ORDER_ON_FAILURE = *mut _WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE::Type; -pub use self::_WDF_REQUEST_TYPE::Type as WDF_REQUEST_TYPE; -pub type PFN_WDF_DEVICE_FILE_CREATE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: WDFREQUEST, arg3: WDFFILEOBJECT), ->; -pub type PFN_WDF_FILE_CLOSE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFFILEOBJECT), ->; -pub type PFN_WDF_FILE_CLEANUP = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFFILEOBJECT), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_FILEOBJECT_CONFIG { - pub Size: ULONG, - pub EvtDeviceFileCreate: PFN_WDF_DEVICE_FILE_CREATE, - pub EvtFileClose: PFN_WDF_FILE_CLOSE, - pub EvtFileCleanup: PFN_WDF_FILE_CLEANUP, - pub AutoForwardCleanupClose: WDF_TRI_STATE, - pub FileObjectClass: WDF_FILEOBJECT_CLASS, -} -#[test] -fn bindgen_test_layout__WDF_FILEOBJECT_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_FILEOBJECT_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_FILEOBJECT_CONFIG>(), - 40usize, - concat!("Size of: ", stringify!(_WDF_FILEOBJECT_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_FILEOBJECT_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_FILEOBJECT_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_FILEOBJECT_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceFileCreate) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_FILEOBJECT_CONFIG), - "::", - stringify!(EvtDeviceFileCreate), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtFileClose) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_FILEOBJECT_CONFIG), - "::", - stringify!(EvtFileClose), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtFileCleanup) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_FILEOBJECT_CONFIG), - "::", - stringify!(EvtFileCleanup), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AutoForwardCleanupClose) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_FILEOBJECT_CONFIG), - "::", - stringify!(AutoForwardCleanupClose), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileObjectClass) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WDF_FILEOBJECT_CONFIG), - "::", - stringify!(FileObjectClass), - ), - ); -} -impl Default for _WDF_FILEOBJECT_CONFIG { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_FILEOBJECT_CONFIG = _WDF_FILEOBJECT_CONFIG; -pub type PWDF_FILEOBJECT_CONFIG = *mut _WDF_FILEOBJECT_CONFIG; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WDF_DEVICE_PNP_NOTIFICATION_DATA { - pub Type: WDF_STATE_NOTIFICATION_TYPE, - pub Data: _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1 { - pub EnterState: _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1, - pub PostProcessState: _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2, - pub LeaveState: _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1 { - pub CurrentState: WDF_DEVICE_PNP_STATE, - pub NewState: WDF_DEVICE_PNP_STATE, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(CurrentState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NewState) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(NewState), - ), - ); -} -impl Default for _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2 { - pub CurrentState: WDF_DEVICE_PNP_STATE, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(CurrentState), - ), - ); -} -impl Default for _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3 { - pub CurrentState: WDF_DEVICE_PNP_STATE, - pub NewState: WDF_DEVICE_PNP_STATE, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(CurrentState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NewState) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(NewState), - ), - ); -} -impl Default for _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EnterState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1), - "::", - stringify!(EnterState), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PostProcessState) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1), - "::", - stringify!(PostProcessState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LeaveState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1), - "::", - stringify!(LeaveState), - ), - ); -} -impl Default for _WDF_DEVICE_PNP_NOTIFICATION_DATA__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_PNP_NOTIFICATION_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DEVICE_PNP_NOTIFICATION_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DEVICE_PNP_NOTIFICATION_DATA>(), - 12usize, - concat!("Size of: ", stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DEVICE_PNP_NOTIFICATION_DATA>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_NOTIFICATION_DATA), - "::", - stringify!(Data), - ), - ); -} -impl Default for _WDF_DEVICE_PNP_NOTIFICATION_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_DEVICE_PNP_NOTIFICATION_DATA = _WDF_DEVICE_PNP_NOTIFICATION_DATA; -pub type PCWDF_DEVICE_PNP_NOTIFICATION_DATA = *const WDF_DEVICE_PNP_NOTIFICATION_DATA; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WDF_DEVICE_POWER_NOTIFICATION_DATA { - pub Type: WDF_STATE_NOTIFICATION_TYPE, - pub Data: _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1 { - pub EnterState: _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1, - pub PostProcessState: _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2, - pub LeaveState: _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1 { - pub CurrentState: WDF_DEVICE_POWER_STATE, - pub NewState: WDF_DEVICE_POWER_STATE, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(CurrentState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NewState) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(NewState), - ), - ); -} -impl Default for _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2 { - pub CurrentState: WDF_DEVICE_POWER_STATE, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Size of: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(CurrentState), - ), - ); -} -impl Default for _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3 { - pub CurrentState: WDF_DEVICE_POWER_STATE, - pub NewState: WDF_DEVICE_POWER_STATE, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(CurrentState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NewState) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(NewState), - ), - ); -} -impl Default for _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EnterState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1), - "::", - stringify!(EnterState), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PostProcessState) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1), - "::", - stringify!(PostProcessState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LeaveState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1), - "::", - stringify!(LeaveState), - ), - ); -} -impl Default for _WDF_DEVICE_POWER_NOTIFICATION_DATA__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_POWER_NOTIFICATION_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DEVICE_POWER_NOTIFICATION_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DEVICE_POWER_NOTIFICATION_DATA>(), - 12usize, - concat!("Size of: ", stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DEVICE_POWER_NOTIFICATION_DATA>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_NOTIFICATION_DATA), - "::", - stringify!(Data), - ), - ); -} -impl Default for _WDF_DEVICE_POWER_NOTIFICATION_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_DEVICE_POWER_NOTIFICATION_DATA = _WDF_DEVICE_POWER_NOTIFICATION_DATA; -pub type PCWDF_DEVICE_POWER_NOTIFICATION_DATA = *const WDF_DEVICE_POWER_NOTIFICATION_DATA; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA { - pub Type: WDF_STATE_NOTIFICATION_TYPE, - pub Data: _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1 { - pub EnterState: _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1, - pub PostProcessState: _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2, - pub LeaveState: _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1 { - pub CurrentState: WDF_DEVICE_POWER_POLICY_STATE, - pub NewState: WDF_DEVICE_POWER_POLICY_STATE, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!( - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(CurrentState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NewState) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(NewState), - ), - ); -} -impl Default for _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2 { - pub CurrentState: WDF_DEVICE_POWER_POLICY_STATE, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Size of: ", - stringify!( - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2 - ), - "::", - stringify!(CurrentState), - ), - ); -} -impl Default for _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3 { - pub CurrentState: WDF_DEVICE_POWER_POLICY_STATE, - pub NewState: WDF_DEVICE_POWER_POLICY_STATE, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3, - >(), - 8usize, - concat!( - "Size of: ", - stringify!( - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!( - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CurrentState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3 - ), - "::", - stringify!(CurrentState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NewState) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3 - ), - "::", - stringify!(NewState), - ), - ); -} -impl Default for _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1, - >(), - 4usize, - concat!( - "Alignment of ", - stringify!(_WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EnterState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1), - "::", - stringify!(EnterState), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PostProcessState) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1), - "::", - stringify!(PostProcessState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LeaveState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1), - "::", - stringify!(LeaveState), - ), - ); -} -impl Default for _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA>(), - 12usize, - concat!("Size of: ", stringify!(_WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Data) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA), - "::", - stringify!(Data), - ), - ); -} -impl Default for _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA = _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA; -pub type PCWDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA = *const WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA; -pub type PFN_WDF_DEVICE_PNP_STATE_CHANGE_NOTIFICATION = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: PCWDF_DEVICE_PNP_NOTIFICATION_DATA), ->; -pub type PFN_WDF_DEVICE_POWER_STATE_CHANGE_NOTIFICATION = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: PCWDF_DEVICE_POWER_NOTIFICATION_DATA), ->; -pub type PFN_WDF_DEVICE_POWER_POLICY_STATE_CHANGE_NOTIFICATION = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFDEVICE, - arg2: PCWDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA, - ), ->; -pub type PFN_WDF_DEVICE_D0_ENTRY = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: WDF_POWER_DEVICE_STATE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: WDF_POWER_DEVICE_STATE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_D0_ENTRY_POST_HARDWARE_ENABLED = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: WDF_POWER_DEVICE_STATE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_D0_EXIT = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: WDF_POWER_DEVICE_STATE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: WDF_POWER_DEVICE_STATE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_D0_EXIT_PRE_HARDWARE_DISABLED = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: WDF_POWER_DEVICE_STATE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_PREPARE_HARDWARE = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFDEVICE, - arg2: WDFCMRESLIST, - arg3: WDFCMRESLIST, - ) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_RELEASE_HARDWARE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: WDFCMRESLIST) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE), ->; -pub type PFN_WDF_DEVICE_SELF_MANAGED_IO_FLUSH = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE), ->; -pub type PFN_WDF_DEVICE_SELF_MANAGED_IO_INIT = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_SELF_MANAGED_IO_SUSPEND = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_SELF_MANAGED_IO_RESTART = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_QUERY_STOP = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_QUERY_REMOVE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_SURPRISE_REMOVAL = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE), ->; -pub type PFN_WDF_DEVICE_USAGE_NOTIFICATION = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: WDF_SPECIAL_FILE_TYPE, arg3: BOOLEAN), ->; -pub type PFN_WDF_DEVICE_USAGE_NOTIFICATION_EX = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFDEVICE, - arg2: WDF_SPECIAL_FILE_TYPE, - arg3: BOOLEAN, - ) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_RELATIONS_QUERY = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: DEVICE_RELATION_TYPE), ->; -pub type PFN_WDF_DEVICE_ARM_WAKE_FROM_S0 = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_ARM_WAKE_FROM_SX = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_ARM_WAKE_FROM_SX_WITH_REASON = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: BOOLEAN, arg3: BOOLEAN) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_DISARM_WAKE_FROM_S0 = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE), ->; -pub type PFN_WDF_DEVICE_DISARM_WAKE_FROM_SX = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE), ->; -pub type PFN_WDF_DEVICE_WAKE_FROM_S0_TRIGGERED = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE), ->; -pub type PFN_WDF_DEVICE_WAKE_FROM_SX_TRIGGERED = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_PNPPOWER_EVENT_CALLBACKS { - pub Size: ULONG, - pub EvtDeviceD0Entry: PFN_WDF_DEVICE_D0_ENTRY, - pub EvtDeviceD0EntryPostInterruptsEnabled: PFN_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED, - pub EvtDeviceD0Exit: PFN_WDF_DEVICE_D0_EXIT, - pub EvtDeviceD0ExitPreInterruptsDisabled: PFN_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED, - pub EvtDevicePrepareHardware: PFN_WDF_DEVICE_PREPARE_HARDWARE, - pub EvtDeviceReleaseHardware: PFN_WDF_DEVICE_RELEASE_HARDWARE, - pub EvtDeviceSelfManagedIoCleanup: PFN_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP, - pub EvtDeviceSelfManagedIoFlush: PFN_WDF_DEVICE_SELF_MANAGED_IO_FLUSH, - pub EvtDeviceSelfManagedIoInit: PFN_WDF_DEVICE_SELF_MANAGED_IO_INIT, - pub EvtDeviceSelfManagedIoSuspend: PFN_WDF_DEVICE_SELF_MANAGED_IO_SUSPEND, - pub EvtDeviceSelfManagedIoRestart: PFN_WDF_DEVICE_SELF_MANAGED_IO_RESTART, - pub EvtDeviceSurpriseRemoval: PFN_WDF_DEVICE_SURPRISE_REMOVAL, - pub EvtDeviceQueryRemove: PFN_WDF_DEVICE_QUERY_REMOVE, - pub EvtDeviceQueryStop: PFN_WDF_DEVICE_QUERY_STOP, - pub EvtDeviceUsageNotification: PFN_WDF_DEVICE_USAGE_NOTIFICATION, - pub EvtDeviceRelationsQuery: PFN_WDF_DEVICE_RELATIONS_QUERY, - pub EvtDeviceUsageNotificationEx: PFN_WDF_DEVICE_USAGE_NOTIFICATION_EX, -} -#[test] -fn bindgen_test_layout__WDF_PNPPOWER_EVENT_CALLBACKS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_PNPPOWER_EVENT_CALLBACKS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_PNPPOWER_EVENT_CALLBACKS>(), - 144usize, - concat!("Size of: ", stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_PNPPOWER_EVENT_CALLBACKS>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceD0Entry) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceD0Entry), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceD0EntryPostInterruptsEnabled) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceD0EntryPostInterruptsEnabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtDeviceD0Exit) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceD0Exit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceD0ExitPreInterruptsDisabled) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceD0ExitPreInterruptsDisabled), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDevicePrepareHardware) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDevicePrepareHardware), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceReleaseHardware) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceReleaseHardware), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceSelfManagedIoCleanup) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceSelfManagedIoCleanup), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceSelfManagedIoFlush) as usize - - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceSelfManagedIoFlush), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceSelfManagedIoInit) as usize - - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceSelfManagedIoInit), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceSelfManagedIoSuspend) as usize - - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceSelfManagedIoSuspend), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceSelfManagedIoRestart) as usize - - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceSelfManagedIoRestart), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceSurpriseRemoval) as usize - - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceSurpriseRemoval), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceQueryRemove) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceQueryRemove), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceQueryStop) as usize - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceQueryStop), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceUsageNotification) as usize - - ptr as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceUsageNotification), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceRelationsQuery) as usize - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceRelationsQuery), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceUsageNotificationEx) as usize - - ptr as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PNPPOWER_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceUsageNotificationEx), - ), - ); -} -pub type WDF_PNPPOWER_EVENT_CALLBACKS = _WDF_PNPPOWER_EVENT_CALLBACKS; -pub type PWDF_PNPPOWER_EVENT_CALLBACKS = *mut _WDF_PNPPOWER_EVENT_CALLBACKS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_POWER_POLICY_EVENT_CALLBACKS { - pub Size: ULONG, - pub EvtDeviceArmWakeFromS0: PFN_WDF_DEVICE_ARM_WAKE_FROM_S0, - pub EvtDeviceDisarmWakeFromS0: PFN_WDF_DEVICE_DISARM_WAKE_FROM_S0, - pub EvtDeviceWakeFromS0Triggered: PFN_WDF_DEVICE_WAKE_FROM_S0_TRIGGERED, - pub EvtDeviceArmWakeFromSx: PFN_WDF_DEVICE_ARM_WAKE_FROM_SX, - pub EvtDeviceDisarmWakeFromSx: PFN_WDF_DEVICE_DISARM_WAKE_FROM_SX, - pub EvtDeviceWakeFromSxTriggered: PFN_WDF_DEVICE_WAKE_FROM_SX_TRIGGERED, - pub EvtDeviceArmWakeFromSxWithReason: PFN_WDF_DEVICE_ARM_WAKE_FROM_SX_WITH_REASON, -} -#[test] -fn bindgen_test_layout__WDF_POWER_POLICY_EVENT_CALLBACKS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_POWER_POLICY_EVENT_CALLBACKS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_POWER_POLICY_EVENT_CALLBACKS>(), - 64usize, - concat!("Size of: ", stringify!(_WDF_POWER_POLICY_EVENT_CALLBACKS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_POWER_POLICY_EVENT_CALLBACKS>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_POWER_POLICY_EVENT_CALLBACKS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_POLICY_EVENT_CALLBACKS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceArmWakeFromS0) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_POLICY_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceArmWakeFromS0), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceDisarmWakeFromS0) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_POLICY_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceDisarmWakeFromS0), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceWakeFromS0Triggered) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_POLICY_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceWakeFromS0Triggered), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceArmWakeFromSx) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_POLICY_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceArmWakeFromSx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceDisarmWakeFromSx) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_POLICY_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceDisarmWakeFromSx), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceWakeFromSxTriggered) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_POLICY_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceWakeFromSxTriggered), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceArmWakeFromSxWithReason) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_POLICY_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceArmWakeFromSxWithReason), - ), - ); -} -pub type WDF_POWER_POLICY_EVENT_CALLBACKS = _WDF_POWER_POLICY_EVENT_CALLBACKS; -pub type PWDF_POWER_POLICY_EVENT_CALLBACKS = *mut _WDF_POWER_POLICY_EVENT_CALLBACKS; -pub mod _WDF_POWER_POLICY_IDLE_TIMEOUT_TYPE { - pub type Type = ::core::ffi::c_int; - pub const DriverManagedIdleTimeout: Type = 0; - pub const SystemManagedIdleTimeout: Type = 1; - pub const SystemManagedIdleTimeoutWithHint: Type = 2; -} -pub use self::_WDF_POWER_POLICY_IDLE_TIMEOUT_TYPE::Type as WDF_POWER_POLICY_IDLE_TIMEOUT_TYPE; -pub type PWDF_POWER_POLICY_IDLE_TIMEOUT_TYPE = *mut _WDF_POWER_POLICY_IDLE_TIMEOUT_TYPE::Type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS { - pub Size: ULONG, - pub IdleCaps: WDF_POWER_POLICY_S0_IDLE_CAPABILITIES, - pub DxState: DEVICE_POWER_STATE, - pub IdleTimeout: ULONG, - pub UserControlOfIdleSettings: WDF_POWER_POLICY_S0_IDLE_USER_CONTROL, - pub Enabled: WDF_TRI_STATE, - pub PowerUpIdleDeviceOnSystemWake: WDF_TRI_STATE, - pub IdleTimeoutType: WDF_POWER_POLICY_IDLE_TIMEOUT_TYPE, - pub ExcludeD3Cold: WDF_TRI_STATE, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS>(), - 36usize, - concat!("Size of: ", stringify!(_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdleCaps) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS), - "::", - stringify!(IdleCaps), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DxState) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS), - "::", - stringify!(DxState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdleTimeout) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS), - "::", - stringify!(IdleTimeout), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserControlOfIdleSettings) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS), - "::", - stringify!(UserControlOfIdleSettings), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PowerUpIdleDeviceOnSystemWake) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS), - "::", - stringify!(PowerUpIdleDeviceOnSystemWake), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IdleTimeoutType) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS), - "::", - stringify!(IdleTimeoutType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExcludeD3Cold) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS), - "::", - stringify!(ExcludeD3Cold), - ), - ); -} -impl Default for _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS = _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS; -pub type PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS = *mut _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS { - pub Size: ULONG, - pub DxState: DEVICE_POWER_STATE, - pub UserControlOfWakeSettings: WDF_POWER_POLICY_SX_WAKE_USER_CONTROL, - pub Enabled: WDF_TRI_STATE, - pub ArmForWakeIfChildrenAreArmedForWake: BOOLEAN, - pub IndicateChildWakeOnParentWake: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS>(), - 20usize, - concat!("Size of: ", stringify!(_WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DxState) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS), - "::", - stringify!(DxState), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UserControlOfWakeSettings) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS), - "::", - stringify!(UserControlOfWakeSettings), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS), - "::", - stringify!(Enabled), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ArmForWakeIfChildrenAreArmedForWake) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS), - "::", - stringify!(ArmForWakeIfChildrenAreArmedForWake), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IndicateChildWakeOnParentWake) as usize - - ptr as usize - }, - 17usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS), - "::", - stringify!(IndicateChildWakeOnParentWake), - ), - ); -} -impl Default for _WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS = _WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS; -pub type PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS = *mut _WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_STATE { - pub Size: ULONG, - pub Disabled: WDF_TRI_STATE, - pub DontDisplayInUI: WDF_TRI_STATE, - pub Failed: WDF_TRI_STATE, - pub NotDisableable: WDF_TRI_STATE, - pub Removed: WDF_TRI_STATE, - pub ResourcesChanged: WDF_TRI_STATE, - pub AssignedToGuest: WDF_TRI_STATE, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_STATE() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DEVICE_STATE> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DEVICE_STATE>(), - 32usize, - concat!("Size of: ", stringify!(_WDF_DEVICE_STATE)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DEVICE_STATE>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_DEVICE_STATE)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_STATE), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Disabled) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_STATE), - "::", - stringify!(Disabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DontDisplayInUI) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_STATE), - "::", - stringify!(DontDisplayInUI), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Failed) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_STATE), - "::", - stringify!(Failed), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NotDisableable) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_STATE), - "::", - stringify!(NotDisableable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Removed) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_STATE), - "::", - stringify!(Removed), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ResourcesChanged) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_STATE), - "::", - stringify!(ResourcesChanged), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AssignedToGuest) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_STATE), - "::", - stringify!(AssignedToGuest), - ), - ); -} -impl Default for _WDF_DEVICE_STATE { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_DEVICE_STATE = _WDF_DEVICE_STATE; -pub type PWDF_DEVICE_STATE = *mut _WDF_DEVICE_STATE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_PNP_CAPABILITIES { - pub Size: ULONG, - pub LockSupported: WDF_TRI_STATE, - pub EjectSupported: WDF_TRI_STATE, - pub Removable: WDF_TRI_STATE, - pub DockDevice: WDF_TRI_STATE, - pub UniqueID: WDF_TRI_STATE, - pub SilentInstall: WDF_TRI_STATE, - pub SurpriseRemovalOK: WDF_TRI_STATE, - pub HardwareDisabled: WDF_TRI_STATE, - pub NoDisplayInUI: WDF_TRI_STATE, - pub Address: ULONG, - pub UINumber: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_PNP_CAPABILITIES() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DEVICE_PNP_CAPABILITIES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DEVICE_PNP_CAPABILITIES>(), - 48usize, - concat!("Size of: ", stringify!(_WDF_DEVICE_PNP_CAPABILITIES)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DEVICE_PNP_CAPABILITIES>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_DEVICE_PNP_CAPABILITIES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_CAPABILITIES), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LockSupported) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_CAPABILITIES), - "::", - stringify!(LockSupported), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EjectSupported) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_CAPABILITIES), - "::", - stringify!(EjectSupported), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Removable) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_CAPABILITIES), - "::", - stringify!(Removable), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DockDevice) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_CAPABILITIES), - "::", - stringify!(DockDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UniqueID) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_CAPABILITIES), - "::", - stringify!(UniqueID), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SilentInstall) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_CAPABILITIES), - "::", - stringify!(SilentInstall), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).SurpriseRemovalOK) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_CAPABILITIES), - "::", - stringify!(SurpriseRemovalOK), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).HardwareDisabled) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_CAPABILITIES), - "::", - stringify!(HardwareDisabled), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NoDisplayInUI) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_CAPABILITIES), - "::", - stringify!(NoDisplayInUI), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Address) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_CAPABILITIES), - "::", - stringify!(Address), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).UINumber) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PNP_CAPABILITIES), - "::", - stringify!(UINumber), - ), - ); -} -impl Default for _WDF_DEVICE_PNP_CAPABILITIES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_DEVICE_PNP_CAPABILITIES = _WDF_DEVICE_PNP_CAPABILITIES; -pub type PWDF_DEVICE_PNP_CAPABILITIES = *mut _WDF_DEVICE_PNP_CAPABILITIES; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_POWER_CAPABILITIES { - pub Size: ULONG, - pub DeviceD1: WDF_TRI_STATE, - pub DeviceD2: WDF_TRI_STATE, - pub WakeFromD0: WDF_TRI_STATE, - pub WakeFromD1: WDF_TRI_STATE, - pub WakeFromD2: WDF_TRI_STATE, - pub WakeFromD3: WDF_TRI_STATE, - pub DeviceState: [DEVICE_POWER_STATE; 7usize], - pub DeviceWake: DEVICE_POWER_STATE, - pub SystemWake: SYSTEM_POWER_STATE, - pub D1Latency: ULONG, - pub D2Latency: ULONG, - pub D3Latency: ULONG, - pub IdealDxStateForSx: DEVICE_POWER_STATE, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_POWER_CAPABILITIES() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DEVICE_POWER_CAPABILITIES> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DEVICE_POWER_CAPABILITIES>(), - 80usize, - concat!("Size of: ", stringify!(_WDF_DEVICE_POWER_CAPABILITIES)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DEVICE_POWER_CAPABILITIES>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_DEVICE_POWER_CAPABILITIES)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceD1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(DeviceD1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceD2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(DeviceD2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WakeFromD0) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(WakeFromD0), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WakeFromD1) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(WakeFromD1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WakeFromD2) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(WakeFromD2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WakeFromD3) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(WakeFromD3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceState) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(DeviceState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceWake) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(DeviceWake), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SystemWake) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(SystemWake), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).D1Latency) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(D1Latency), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).D2Latency) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(D2Latency), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).D3Latency) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(D3Latency), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).IdealDxStateForSx) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_POWER_CAPABILITIES), - "::", - stringify!(IdealDxStateForSx), - ), - ); -} -impl Default for _WDF_DEVICE_POWER_CAPABILITIES { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_DEVICE_POWER_CAPABILITIES = _WDF_DEVICE_POWER_CAPABILITIES; -pub type PWDF_DEVICE_POWER_CAPABILITIES = *mut _WDF_DEVICE_POWER_CAPABILITIES; -pub mod _WDF_REMOVE_LOCK_OPTIONS_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const WDF_REMOVE_LOCK_OPTION_ACQUIRE_FOR_IO: Type = 1; -} -pub use self::_WDF_REMOVE_LOCK_OPTIONS_FLAGS::Type as WDF_REMOVE_LOCK_OPTIONS_FLAGS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_REMOVE_LOCK_OPTIONS { - pub Size: ULONG, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_REMOVE_LOCK_OPTIONS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_REMOVE_LOCK_OPTIONS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_REMOVE_LOCK_OPTIONS>(), - 8usize, - concat!("Size of: ", stringify!(_WDF_REMOVE_LOCK_OPTIONS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_REMOVE_LOCK_OPTIONS>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_REMOVE_LOCK_OPTIONS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REMOVE_LOCK_OPTIONS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REMOVE_LOCK_OPTIONS), - "::", - stringify!(Flags), - ), - ); -} -pub type WDF_REMOVE_LOCK_OPTIONS = _WDF_REMOVE_LOCK_OPTIONS; -pub type PWDF_REMOVE_LOCK_OPTIONS = *mut _WDF_REMOVE_LOCK_OPTIONS; -pub type PFN_WDFDEVICE_WDM_IRP_PREPROCESS = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: PIRP) -> NTSTATUS, ->; -pub type PFN_WDFDEVICE_WDM_IRP_DISPATCH = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFDEVICE, - arg2: UCHAR, - arg3: UCHAR, - arg4: ULONG, - arg5: WDFCONTEXT, - arg6: PIRP, - arg7: WDFCONTEXT, - ) -> NTSTATUS, ->; -pub type PFN_WDF_IO_IN_CALLER_CONTEXT = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: WDFREQUEST), ->; -pub type PFN_WDFDEVICE_WDM_POST_PO_FX_REGISTER_DEVICE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: POHANDLE) -> NTSTATUS, ->; -pub type PFN_WDFDEVICE_WDM_PRE_PO_FX_UNREGISTER_DEVICE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: POHANDLE), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_POWER_FRAMEWORK_SETTINGS { - pub Size: ULONG, - pub EvtDeviceWdmPostPoFxRegisterDevice: PFN_WDFDEVICE_WDM_POST_PO_FX_REGISTER_DEVICE, - pub EvtDeviceWdmPrePoFxUnregisterDevice: PFN_WDFDEVICE_WDM_PRE_PO_FX_UNREGISTER_DEVICE, - pub Component: PPO_FX_COMPONENT, - pub ComponentActiveConditionCallback: PPO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK, - pub ComponentIdleConditionCallback: PPO_FX_COMPONENT_IDLE_CONDITION_CALLBACK, - pub ComponentIdleStateCallback: PPO_FX_COMPONENT_IDLE_STATE_CALLBACK, - pub PowerControlCallback: PPO_FX_POWER_CONTROL_CALLBACK, - pub PoFxDeviceContext: PVOID, - pub PoFxDeviceFlags: ULONGLONG, - pub DirectedPoFxEnabled: WDF_TRI_STATE, -} -#[test] -fn bindgen_test_layout__WDF_POWER_FRAMEWORK_SETTINGS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_POWER_FRAMEWORK_SETTINGS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_POWER_FRAMEWORK_SETTINGS>(), - 88usize, - concat!("Size of: ", stringify!(_WDF_POWER_FRAMEWORK_SETTINGS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_POWER_FRAMEWORK_SETTINGS>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_POWER_FRAMEWORK_SETTINGS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_FRAMEWORK_SETTINGS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceWdmPostPoFxRegisterDevice) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_FRAMEWORK_SETTINGS), - "::", - stringify!(EvtDeviceWdmPostPoFxRegisterDevice), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceWdmPrePoFxUnregisterDevice) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_FRAMEWORK_SETTINGS), - "::", - stringify!(EvtDeviceWdmPrePoFxUnregisterDevice), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Component) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_FRAMEWORK_SETTINGS), - "::", - stringify!(Component), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ComponentActiveConditionCallback) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_FRAMEWORK_SETTINGS), - "::", - stringify!(ComponentActiveConditionCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ComponentIdleConditionCallback) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_FRAMEWORK_SETTINGS), - "::", - stringify!(ComponentIdleConditionCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ComponentIdleStateCallback) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_FRAMEWORK_SETTINGS), - "::", - stringify!(ComponentIdleStateCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PowerControlCallback) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_FRAMEWORK_SETTINGS), - "::", - stringify!(PowerControlCallback), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PoFxDeviceContext) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_FRAMEWORK_SETTINGS), - "::", - stringify!(PoFxDeviceContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PoFxDeviceFlags) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_FRAMEWORK_SETTINGS), - "::", - stringify!(PoFxDeviceFlags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DirectedPoFxEnabled) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_FRAMEWORK_SETTINGS), - "::", - stringify!(DirectedPoFxEnabled), - ), - ); -} -impl Default for _WDF_POWER_FRAMEWORK_SETTINGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_POWER_FRAMEWORK_SETTINGS = _WDF_POWER_FRAMEWORK_SETTINGS; -pub type PWDF_POWER_FRAMEWORK_SETTINGS = *mut _WDF_POWER_FRAMEWORK_SETTINGS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_IO_TYPE_CONFIG { - pub Size: ULONG, - pub ReadWriteIoType: WDF_DEVICE_IO_TYPE, - pub DeviceControlIoType: WDF_DEVICE_IO_TYPE, - pub DirectTransferThreshold: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_IO_TYPE_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_IO_TYPE_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_IO_TYPE_CONFIG>(), - 16usize, - concat!("Size of: ", stringify!(_WDF_IO_TYPE_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_IO_TYPE_CONFIG>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_IO_TYPE_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TYPE_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ReadWriteIoType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TYPE_CONFIG), - "::", - stringify!(ReadWriteIoType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DeviceControlIoType) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TYPE_CONFIG), - "::", - stringify!(DeviceControlIoType), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).DirectTransferThreshold) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TYPE_CONFIG), - "::", - stringify!(DirectTransferThreshold), - ), - ); -} -impl Default for _WDF_IO_TYPE_CONFIG { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_IO_TYPE_CONFIG = _WDF_IO_TYPE_CONFIG; -pub type PWDF_IO_TYPE_CONFIG = *mut _WDF_IO_TYPE_CONFIG; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DEVICE_PROPERTY_DATA { - pub Size: ULONG, - pub PropertyKey: *const DEVPROPKEY, - pub Lcid: LCID, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_DEVICE_PROPERTY_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DEVICE_PROPERTY_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DEVICE_PROPERTY_DATA>(), - 24usize, - concat!("Size of: ", stringify!(_WDF_DEVICE_PROPERTY_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DEVICE_PROPERTY_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_DEVICE_PROPERTY_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PROPERTY_DATA), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PropertyKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PROPERTY_DATA), - "::", - stringify!(PropertyKey), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Lcid) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PROPERTY_DATA), - "::", - stringify!(Lcid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DEVICE_PROPERTY_DATA), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _WDF_DEVICE_PROPERTY_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_DEVICE_PROPERTY_DATA = _WDF_DEVICE_PROPERTY_DATA; -pub type PWDF_DEVICE_PROPERTY_DATA = *mut _WDF_DEVICE_PROPERTY_DATA; -pub type PFN_WDFDEVICEGETDEVICESTATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - DeviceState: PWDF_DEVICE_STATE, - ), ->; -pub type PFN_WDFDEVICESETDEVICESTATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - DeviceState: PWDF_DEVICE_STATE, - ), ->; -pub type PFN_WDFWDMDEVICEGETWDFDEVICEHANDLE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceObject: PDEVICE_OBJECT, - ) -> WDFDEVICE, ->; -pub type PFN_WDFDEVICEWDMGETDEVICEOBJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - ) -> PDEVICE_OBJECT, ->; -pub type PFN_WDFDEVICEWDMGETATTACHEDDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - ) -> PDEVICE_OBJECT, ->; -pub type PFN_WDFDEVICEWDMGETPHYSICALDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - ) -> PDEVICE_OBJECT, ->; -pub type PFN_WDFDEVICEWDMDISPATCHPREPROCESSEDIRP = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Irp: PIRP, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEWDMDISPATCHIRP = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Irp: PIRP, - DispatchContext: WDFCONTEXT, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEWDMDISPATCHIRPTOIOQUEUE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Irp: PIRP, - Queue: WDFQUEUE, - Flags: ULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEADDDEPENDENTUSAGEDEVICEOBJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - DependentDevice: PDEVICE_OBJECT, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEREMOVEDEPENDENTUSAGEDEVICEOBJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - DependentDevice: PDEVICE_OBJECT, - ), ->; -pub type PFN_WDFDEVICEADDREMOVALRELATIONSPHYSICALDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - PhysicalDevice: PDEVICE_OBJECT, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEREMOVEREMOVALRELATIONSPHYSICALDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - PhysicalDevice: PDEVICE_OBJECT, - ), ->; -pub type PFN_WDFDEVICECLEARREMOVALRELATIONSDEVICES = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Device: WDFDEVICE), ->; -pub type PFN_WDFDEVICEGETDRIVER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - ) -> WDFDRIVER, ->; -pub type PFN_WDFDEVICERETRIEVEDEVICENAME = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - String: WDFSTRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEASSIGNMOFRESOURCENAME = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - MofResourceName: PCUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEGETIOTARGET = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - ) -> WDFIOTARGET, ->; -pub type PFN_WDFDEVICEGETDEVICEPNPSTATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - ) -> WDF_DEVICE_PNP_STATE, ->; -pub type PFN_WDFDEVICEGETDEVICEPOWERSTATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - ) -> WDF_DEVICE_POWER_STATE, ->; -pub type PFN_WDFDEVICEGETDEVICEPOWERPOLICYSTATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - ) -> WDF_DEVICE_POWER_POLICY_STATE, ->; -pub type PFN_WDFDEVICEASSIGNS0IDLESETTINGS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Settings: PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEASSIGNSXWAKESETTINGS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Settings: PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEOPENREGISTRYKEY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - DeviceInstanceKeyType: ULONG, - DesiredAccess: ACCESS_MASK, - KeyAttributes: PWDF_OBJECT_ATTRIBUTES, - Key: *mut WDFKEY, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEOPENDEVICEMAPKEY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - KeyName: PCUNICODE_STRING, - DesiredAccess: ACCESS_MASK, - KeyAttributes: PWDF_OBJECT_ATTRIBUTES, - Key: *mut WDFKEY, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICESETSPECIALFILESUPPORT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - FileType: WDF_SPECIAL_FILE_TYPE, - FileTypeIsSupported: BOOLEAN, - ), ->; -pub type PFN_WDFDEVICESETCHARACTERISTICS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - DeviceCharacteristics: ULONG, - ), ->; -pub type PFN_WDFDEVICEGETCHARACTERISTICS = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Device: WDFDEVICE) -> ULONG, ->; -pub type PFN_WDFDEVICEGETALIGNMENTREQUIREMENT = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Device: WDFDEVICE) -> ULONG, ->; -pub type PFN_WDFDEVICESETALIGNMENTREQUIREMENT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - AlignmentRequirement: ULONG, - ), ->; -pub type PFN_WDFDEVICEINITFREE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, DeviceInit: PWDFDEVICE_INIT), ->; -pub type PFN_WDFDEVICEINITSETPNPPOWEREVENTCALLBACKS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - PnpPowerEventCallbacks: PWDF_PNPPOWER_EVENT_CALLBACKS, - ), ->; -pub type PFN_WDFDEVICEINITSETPOWERPOLICYEVENTCALLBACKS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - PowerPolicyEventCallbacks: PWDF_POWER_POLICY_EVENT_CALLBACKS, - ), ->; -pub type PFN_WDFDEVICEINITSETPOWERPOLICYOWNERSHIP = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - IsPowerPolicyOwner: BOOLEAN, - ), ->; -pub type PFN_WDFDEVICEINITREGISTERPNPSTATECHANGECALLBACK = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - PnpState: WDF_DEVICE_PNP_STATE, - EvtDevicePnpStateChange: PFN_WDF_DEVICE_PNP_STATE_CHANGE_NOTIFICATION, - CallbackTypes: ULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEINITREGISTERPOWERSTATECHANGECALLBACK = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - PowerState: WDF_DEVICE_POWER_STATE, - EvtDevicePowerStateChange: PFN_WDF_DEVICE_POWER_STATE_CHANGE_NOTIFICATION, - CallbackTypes: ULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEINITREGISTERPOWERPOLICYSTATECHANGECALLBACK = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - PowerPolicyState: WDF_DEVICE_POWER_POLICY_STATE, - EvtDevicePowerPolicyStateChange: PFN_WDF_DEVICE_POWER_POLICY_STATE_CHANGE_NOTIFICATION, - CallbackTypes: ULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEINITSETEXCLUSIVE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - IsExclusive: BOOLEAN, - ), ->; -pub type PFN_WDFDEVICEINITSETIOTYPE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - IoType: WDF_DEVICE_IO_TYPE, - ), ->; -pub type PFN_WDFDEVICEINITSETPOWERNOTPAGEABLE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, DeviceInit: PWDFDEVICE_INIT), ->; -pub type PFN_WDFDEVICEINITSETPOWERPAGEABLE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, DeviceInit: PWDFDEVICE_INIT), ->; -pub type PFN_WDFDEVICEINITSETPOWERINRUSH = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, DeviceInit: PWDFDEVICE_INIT), ->; -pub type PFN_WDFDEVICEINITSETDEVICETYPE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - DeviceType: ULONG, - ), ->; -pub type PFN_WDFDEVICEINITASSIGNNAME = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - DeviceName: PCUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEINITASSIGNSDDLSTRING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - SDDLString: PCUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEINITSETDEVICECLASS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - DeviceClassGuid: *const GUID, - ), ->; -pub type PFN_WDFDEVICEINITSETCHARACTERISTICS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - DeviceCharacteristics: ULONG, - OrInValues: BOOLEAN, - ), ->; -pub type PFN_WDFDEVICEINITSETFILEOBJECTCONFIG = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - FileObjectConfig: PWDF_FILEOBJECT_CONFIG, - FileObjectAttributes: PWDF_OBJECT_ATTRIBUTES, - ), ->; -pub type PFN_WDFDEVICEINITSETREQUESTATTRIBUTES = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - RequestAttributes: PWDF_OBJECT_ATTRIBUTES, - ), ->; -pub type PFN_WDFDEVICEINITASSIGNWDMIRPPREPROCESSCALLBACK = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - EvtDeviceWdmIrpPreprocess: PFN_WDFDEVICE_WDM_IRP_PREPROCESS, - MajorFunction: UCHAR, - MinorFunctions: PUCHAR, - NumMinorFunctions: ULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEINITSETIOINCALLERCONTEXTCALLBACK = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - EvtIoInCallerContext: PFN_WDF_IO_IN_CALLER_CONTEXT, - ), ->; -pub type PFN_WDFDEVICEINITSETREMOVELOCKOPTIONS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - Options: PWDF_REMOVE_LOCK_OPTIONS, - ), ->; -pub type PFN_WDFDEVICECREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: *mut PWDFDEVICE_INIT, - DeviceAttributes: PWDF_OBJECT_ATTRIBUTES, - Device: *mut WDFDEVICE, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICESETSTATICSTOPREMOVE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Stoppable: BOOLEAN, - ), ->; -pub type PFN_WDFDEVICECREATEDEVICEINTERFACE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - InterfaceClassGUID: *const GUID, - ReferenceString: PCUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICESETDEVICEINTERFACESTATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - InterfaceClassGUID: *const GUID, - ReferenceString: PCUNICODE_STRING, - IsInterfaceEnabled: BOOLEAN, - ), ->; -pub type PFN_WDFDEVICESETDEVICEINTERFACESTATEEX = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - InterfaceClassGUID: *const GUID, - ReferenceString: PCUNICODE_STRING, - IsInterfaceEnabled: BOOLEAN, - ), ->; -pub type PFN_WDFDEVICERETRIEVEDEVICEINTERFACESTRING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - InterfaceClassGUID: *const GUID, - ReferenceString: PCUNICODE_STRING, - String: WDFSTRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICECREATESYMBOLICLINK = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - SymbolicLinkName: PCUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEQUERYPROPERTY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - DeviceProperty: DEVICE_REGISTRY_PROPERTY::Type, - BufferLength: ULONG, - PropertyBuffer: PVOID, - ResultLength: PULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEALLOCANDQUERYPROPERTY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - DeviceProperty: DEVICE_REGISTRY_PROPERTY::Type, - PoolType: POOL_TYPE, - PropertyMemoryAttributes: PWDF_OBJECT_ATTRIBUTES, - PropertyMemory: *mut WDFMEMORY, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICESETPNPCAPABILITIES = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - PnpCapabilities: PWDF_DEVICE_PNP_CAPABILITIES, - ), ->; -pub type PFN_WDFDEVICESETPOWERCAPABILITIES = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - PowerCapabilities: PWDF_DEVICE_POWER_CAPABILITIES, - ), ->; -pub type PFN_WDFDEVICESETBUSINFORMATIONFORCHILDREN = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - BusInformation: PPNP_BUS_INFORMATION, - ), ->; -pub type PFN_WDFDEVICEINDICATEWAKESTATUS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - WaitWakeStatus: NTSTATUS, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICESETFAILED = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - FailedAction: WDF_DEVICE_FAILED_ACTION, - ), ->; -pub type PFN_WDFDEVICESTOPIDLENOTRACK = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - WaitForD0: BOOLEAN, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICERESUMEIDLENOTRACK = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Device: WDFDEVICE), ->; -pub type PFN_WDFDEVICESTOPIDLEACTUAL = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - WaitForD0: BOOLEAN, - Tag: PVOID, - Line: LONG, - File: PCCH, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICERESUMEIDLEACTUAL = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Tag: PVOID, - Line: LONG, - File: PCCH, - ), ->; -pub type PFN_WDFDEVICEGETFILEOBJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - FileObject: PFILE_OBJECT, - ) -> WDFFILEOBJECT, ->; -pub type PFN_WDFDEVICEENQUEUEREQUEST = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Request: WDFREQUEST, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEGETDEFAULTQUEUE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - ) -> WDFQUEUE, ->; -pub type PFN_WDFDEVICECONFIGUREREQUESTDISPATCHING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Queue: WDFQUEUE, - RequestType: WDF_REQUEST_TYPE, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICECONFIGUREWDMIRPDISPATCHCALLBACK = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Driver: WDFDRIVER, - MajorFunction: UCHAR, - EvtDeviceWdmIrpDispatch: PFN_WDFDEVICE_WDM_IRP_DISPATCH, - DriverContext: WDFCONTEXT, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEGETSYSTEMPOWERACTION = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - ) -> POWER_ACTION::Type, ->; -pub type PFN_WDFDEVICEWDMASSIGNPOWERFRAMEWORKSETTINGS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - PowerFrameworkSettings: PWDF_POWER_FRAMEWORK_SETTINGS, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEINITSETRELEASEHARDWAREORDERONFAILURE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - ReleaseHardwareOrderOnFailure: WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE, - ), ->; -pub type PFN_WDFDEVICEINITSETIOTYPEEX = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - IoTypeConfig: PWDF_IO_TYPE_CONFIG, - ), ->; -pub type PFN_WDFDEVICEQUERYPROPERTYEX = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - DeviceProperty: PWDF_DEVICE_PROPERTY_DATA, - BufferLength: ULONG, - PropertyBuffer: PVOID, - RequiredSize: PULONG, - Type: PDEVPROPTYPE, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEALLOCANDQUERYPROPERTYEX = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - DeviceProperty: PWDF_DEVICE_PROPERTY_DATA, - PoolType: POOL_TYPE, - PropertyMemoryAttributes: PWDF_OBJECT_ATTRIBUTES, - PropertyMemory: *mut WDFMEMORY, - Type: PDEVPROPTYPE, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICEASSIGNPROPERTY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - DeviceProperty: PWDF_DEVICE_PROPERTY_DATA, - Type: DEVPROPTYPE, - Size: ULONG, - Data: PVOID, - ) -> NTSTATUS, ->; -pub type PFN_WDFDEVICERETRIEVECOMPANIONTARGET = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - CompanionTarget: *mut WDFCOMPANIONTARGET, - ) -> NTSTATUS, ->; -pub type PFN_WDFCOLLECTIONCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - CollectionAttributes: PWDF_OBJECT_ATTRIBUTES, - Collection: *mut WDFCOLLECTION, - ) -> NTSTATUS, ->; -pub type PFN_WDFCOLLECTIONGETCOUNT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Collection: WDFCOLLECTION, - ) -> ULONG, ->; -pub type PFN_WDFCOLLECTIONADD = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Collection: WDFCOLLECTION, - Object: WDFOBJECT, - ) -> NTSTATUS, ->; -pub type PFN_WDFCOLLECTIONREMOVE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Collection: WDFCOLLECTION, - Item: WDFOBJECT, - ), ->; -pub type PFN_WDFCOLLECTIONREMOVEITEM = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Collection: WDFCOLLECTION, - Index: ULONG, - ), ->; -pub type PFN_WDFCOLLECTIONGETITEM = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Collection: WDFCOLLECTION, - Index: ULONG, - ) -> WDFOBJECT, ->; -pub type PFN_WDFCOLLECTIONGETFIRSTITEM = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Collection: WDFCOLLECTION, - ) -> WDFOBJECT, ->; -pub type PFN_WDFCOLLECTIONGETLASTITEM = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Collection: WDFCOLLECTION, - ) -> WDFOBJECT, ->; -pub type PFN_WDF_DPC = ::core::option::Option; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_DPC_CONFIG { - pub Size: ULONG, - pub EvtDpcFunc: PFN_WDF_DPC, - pub AutomaticSerialization: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WDF_DPC_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DPC_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DPC_CONFIG>(), - 24usize, - concat!("Size of: ", stringify!(_WDF_DPC_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DPC_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_DPC_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(_WDF_DPC_CONFIG), "::", stringify!(Size)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtDpcFunc) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DPC_CONFIG), - "::", - stringify!(EvtDpcFunc), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AutomaticSerialization) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DPC_CONFIG), - "::", - stringify!(AutomaticSerialization), - ), - ); -} -pub type WDF_DPC_CONFIG = _WDF_DPC_CONFIG; -pub type PWDF_DPC_CONFIG = *mut _WDF_DPC_CONFIG; -pub type PFN_WDFDPCCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Config: PWDF_DPC_CONFIG, - Attributes: PWDF_OBJECT_ATTRIBUTES, - Dpc: *mut WDFDPC, - ) -> NTSTATUS, ->; -pub type PFN_WDFDPCENQUEUE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Dpc: WDFDPC) -> BOOLEAN, ->; -pub type PFN_WDFDPCCANCEL = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Dpc: WDFDPC, - Wait: BOOLEAN, - ) -> BOOLEAN, ->; -pub type PFN_WDFDPCGETPARENTOBJECT = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Dpc: WDFDPC) -> WDFOBJECT, ->; -pub type PFN_WDFDPCWDMGETDPC = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Dpc: WDFDPC) -> PKDPC, ->; -pub type PFN_WDF_TIMER = ::core::option::Option; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_TIMER_CONFIG { - pub Size: ULONG, - pub EvtTimerFunc: PFN_WDF_TIMER, - pub Period: ULONG, - pub AutomaticSerialization: BOOLEAN, - pub TolerableDelay: ULONG, - pub __bindgen_padding_0: [u8; 4usize], - pub UseHighResolutionTimer: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WDF_TIMER_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_TIMER_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_TIMER_CONFIG>(), - 40usize, - concat!("Size of: ", stringify!(_WDF_TIMER_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_TIMER_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_TIMER_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_TIMER_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtTimerFunc) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_TIMER_CONFIG), - "::", - stringify!(EvtTimerFunc), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Period) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_TIMER_CONFIG), - "::", - stringify!(Period), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AutomaticSerialization) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WDF_TIMER_CONFIG), - "::", - stringify!(AutomaticSerialization), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TolerableDelay) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_TIMER_CONFIG), - "::", - stringify!(TolerableDelay), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UseHighResolutionTimer) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_TIMER_CONFIG), - "::", - stringify!(UseHighResolutionTimer), - ), - ); -} -pub type WDF_TIMER_CONFIG = _WDF_TIMER_CONFIG; -pub type PWDF_TIMER_CONFIG = *mut _WDF_TIMER_CONFIG; -pub type PFN_WDFTIMERCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Config: PWDF_TIMER_CONFIG, - Attributes: PWDF_OBJECT_ATTRIBUTES, - Timer: *mut WDFTIMER, - ) -> NTSTATUS, ->; -pub type PFN_WDFTIMERSTART = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Timer: WDFTIMER, - DueTime: LONGLONG, - ) -> BOOLEAN, ->; -pub type PFN_WDFTIMERSTOP = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Timer: WDFTIMER, - Wait: BOOLEAN, - ) -> BOOLEAN, ->; -pub type PFN_WDFTIMERGETPARENTOBJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Timer: WDFTIMER, - ) -> WDFOBJECT, ->; -pub type PFN_WDF_WORKITEM = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFWORKITEM), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_WORKITEM_CONFIG { - pub Size: ULONG, - pub EvtWorkItemFunc: PFN_WDF_WORKITEM, - pub AutomaticSerialization: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WDF_WORKITEM_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_WORKITEM_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_WORKITEM_CONFIG>(), - 24usize, - concat!("Size of: ", stringify!(_WDF_WORKITEM_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_WORKITEM_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_WORKITEM_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WORKITEM_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtWorkItemFunc) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WORKITEM_CONFIG), - "::", - stringify!(EvtWorkItemFunc), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AutomaticSerialization) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WORKITEM_CONFIG), - "::", - stringify!(AutomaticSerialization), - ), - ); -} -pub type WDF_WORKITEM_CONFIG = _WDF_WORKITEM_CONFIG; -pub type PWDF_WORKITEM_CONFIG = *mut _WDF_WORKITEM_CONFIG; -pub type PFN_WDFWORKITEMCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Config: PWDF_WORKITEM_CONFIG, - Attributes: PWDF_OBJECT_ATTRIBUTES, - WorkItem: *mut WDFWORKITEM, - ) -> NTSTATUS, ->; -pub type PFN_WDFWORKITEMENQUEUE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, WorkItem: WDFWORKITEM), ->; -pub type PFN_WDFWORKITEMGETPARENTOBJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - WorkItem: WDFWORKITEM, - ) -> WDFOBJECT, ->; -pub type PFN_WDFWORKITEMFLUSH = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, WorkItem: WDFWORKITEM), ->; -pub mod _WDF_INTERRUPT_POLARITY { - pub type Type = ::core::ffi::c_int; - pub const WdfInterruptPolarityUnknown: Type = 0; - pub const WdfInterruptActiveHigh: Type = 1; - pub const WdfInterruptActiveLow: Type = 2; -} -pub use self::_WDF_INTERRUPT_POLARITY::Type as WDF_INTERRUPT_POLARITY; -pub type PWDF_INTERRUPT_POLARITY = *mut _WDF_INTERRUPT_POLARITY::Type; -pub mod _WDF_INTERRUPT_POLICY { - pub type Type = ::core::ffi::c_int; - pub const WdfIrqPolicyMachineDefault: Type = 0; - pub const WdfIrqPolicyAllCloseProcessors: Type = 1; - pub const WdfIrqPolicyOneCloseProcessor: Type = 2; - pub const WdfIrqPolicyAllProcessorsInMachine: Type = 3; - pub const WdfIrqPolicySpecifiedProcessors: Type = 4; - pub const WdfIrqPolicySpreadMessagesAcrossAllProcessors: Type = 5; -} -pub use self::_WDF_INTERRUPT_POLICY::Type as WDF_INTERRUPT_POLICY; -pub type PWDF_INTERRUPT_POLICY = *mut _WDF_INTERRUPT_POLICY::Type; -pub mod _WDF_INTERRUPT_PRIORITY { - pub type Type = ::core::ffi::c_int; - pub const WdfIrqPriorityUndefined: Type = 0; - pub const WdfIrqPriorityLow: Type = 1; - pub const WdfIrqPriorityNormal: Type = 2; - pub const WdfIrqPriorityHigh: Type = 3; -} -pub use self::_WDF_INTERRUPT_PRIORITY::Type as WDF_INTERRUPT_PRIORITY; -pub type PWDF_INTERRUPT_PRIORITY = *mut _WDF_INTERRUPT_PRIORITY::Type; -pub type PFN_WDF_INTERRUPT_ISR = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFINTERRUPT, arg2: ULONG) -> BOOLEAN, ->; -pub type PFN_WDF_INTERRUPT_SYNCHRONIZE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFINTERRUPT, arg2: WDFCONTEXT) -> BOOLEAN, ->; -pub type PFN_WDF_INTERRUPT_DPC = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFINTERRUPT, arg2: WDFOBJECT), ->; -pub type PFN_WDF_INTERRUPT_WORKITEM = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFINTERRUPT, arg2: WDFOBJECT), ->; -pub type PFN_WDF_INTERRUPT_ENABLE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFINTERRUPT, arg2: WDFDEVICE) -> NTSTATUS, ->; -pub type PFN_WDF_INTERRUPT_DISABLE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFINTERRUPT, arg2: WDFDEVICE) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_INTERRUPT_CONFIG { - pub Size: ULONG, - pub SpinLock: WDFSPINLOCK, - pub ShareVector: WDF_TRI_STATE, - pub FloatingSave: BOOLEAN, - pub AutomaticSerialization: BOOLEAN, - pub EvtInterruptIsr: PFN_WDF_INTERRUPT_ISR, - pub EvtInterruptDpc: PFN_WDF_INTERRUPT_DPC, - pub EvtInterruptEnable: PFN_WDF_INTERRUPT_ENABLE, - pub EvtInterruptDisable: PFN_WDF_INTERRUPT_DISABLE, - pub EvtInterruptWorkItem: PFN_WDF_INTERRUPT_WORKITEM, - pub InterruptRaw: PCM_PARTIAL_RESOURCE_DESCRIPTOR, - pub InterruptTranslated: PCM_PARTIAL_RESOURCE_DESCRIPTOR, - pub WaitLock: WDFWAITLOCK, - pub PassiveHandling: BOOLEAN, - pub ReportInactiveOnPowerDown: WDF_TRI_STATE, - pub CanWakeDevice: BOOLEAN, -} -#[test] -fn bindgen_test_layout__WDF_INTERRUPT_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_INTERRUPT_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_INTERRUPT_CONFIG>(), - 104usize, - concat!("Size of: ", stringify!(_WDF_INTERRUPT_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_INTERRUPT_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_INTERRUPT_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SpinLock) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(SpinLock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShareVector) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(ShareVector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FloatingSave) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(FloatingSave), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AutomaticSerialization) as usize - ptr as usize - }, - 21usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(AutomaticSerialization), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtInterruptIsr) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(EvtInterruptIsr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtInterruptDpc) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(EvtInterruptDpc), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtInterruptEnable) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(EvtInterruptEnable), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtInterruptDisable) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(EvtInterruptDisable), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtInterruptWorkItem) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(EvtInterruptWorkItem), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).InterruptRaw) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(InterruptRaw), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InterruptTranslated) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(InterruptTranslated), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).WaitLock) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(WaitLock), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PassiveHandling) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(PassiveHandling), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ReportInactiveOnPowerDown) as usize - - ptr as usize - }, - 92usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(ReportInactiveOnPowerDown), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CanWakeDevice) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_CONFIG), - "::", - stringify!(CanWakeDevice), - ), - ); -} -impl Default for _WDF_INTERRUPT_CONFIG { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_INTERRUPT_CONFIG = _WDF_INTERRUPT_CONFIG; -pub type PWDF_INTERRUPT_CONFIG = *mut _WDF_INTERRUPT_CONFIG; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_INTERRUPT_INFO { - pub Size: ULONG, - pub Reserved1: ULONG64, - pub TargetProcessorSet: KAFFINITY, - pub Reserved2: ULONG, - pub MessageNumber: ULONG, - pub Vector: ULONG, - pub Irql: KIRQL, - pub Mode: KINTERRUPT_MODE, - pub Polarity: WDF_INTERRUPT_POLARITY, - pub MessageSignaled: BOOLEAN, - pub ShareDisposition: UCHAR, - pub __bindgen_padding_0: [u16; 3usize], - pub Group: USHORT, -} -#[test] -fn bindgen_test_layout__WDF_INTERRUPT_INFO() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_INTERRUPT_INFO> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_INTERRUPT_INFO>(), - 64usize, - concat!("Size of: ", stringify!(_WDF_INTERRUPT_INFO)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_INTERRUPT_INFO>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_INTERRUPT_INFO)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_INFO), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved1) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_INFO), - "::", - stringify!(Reserved1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetProcessorSet) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_INFO), - "::", - stringify!(TargetProcessorSet), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved2) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_INFO), - "::", - stringify!(Reserved2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageNumber) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_INFO), - "::", - stringify!(MessageNumber), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Vector) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_INFO), - "::", - stringify!(Vector), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Irql) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_INFO), - "::", - stringify!(Irql), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Mode) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_INFO), - "::", - stringify!(Mode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Polarity) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_INFO), - "::", - stringify!(Polarity), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MessageSignaled) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_INFO), - "::", - stringify!(MessageSignaled), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ShareDisposition) as usize - ptr as usize - }, - 49usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_INFO), - "::", - stringify!(ShareDisposition), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Group) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_INFO), - "::", - stringify!(Group), - ), - ); -} -impl Default for _WDF_INTERRUPT_INFO { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_INTERRUPT_INFO = _WDF_INTERRUPT_INFO; -pub type PWDF_INTERRUPT_INFO = *mut _WDF_INTERRUPT_INFO; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_INTERRUPT_EXTENDED_POLICY { - pub Size: ULONG, - pub Policy: WDF_INTERRUPT_POLICY, - pub Priority: WDF_INTERRUPT_PRIORITY, - pub TargetProcessorSetAndGroup: GROUP_AFFINITY, -} -#[test] -fn bindgen_test_layout__WDF_INTERRUPT_EXTENDED_POLICY() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_INTERRUPT_EXTENDED_POLICY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_INTERRUPT_EXTENDED_POLICY>(), - 32usize, - concat!("Size of: ", stringify!(_WDF_INTERRUPT_EXTENDED_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_INTERRUPT_EXTENDED_POLICY>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_INTERRUPT_EXTENDED_POLICY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_EXTENDED_POLICY), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Policy) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_EXTENDED_POLICY), - "::", - stringify!(Policy), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Priority) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_EXTENDED_POLICY), - "::", - stringify!(Priority), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetProcessorSetAndGroup) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_INTERRUPT_EXTENDED_POLICY), - "::", - stringify!(TargetProcessorSetAndGroup), - ), - ); -} -impl Default for _WDF_INTERRUPT_EXTENDED_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_INTERRUPT_EXTENDED_POLICY = _WDF_INTERRUPT_EXTENDED_POLICY; -pub type PWDF_INTERRUPT_EXTENDED_POLICY = *mut _WDF_INTERRUPT_EXTENDED_POLICY; -pub type PFN_WDFINTERRUPTCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Configuration: PWDF_INTERRUPT_CONFIG, - Attributes: PWDF_OBJECT_ATTRIBUTES, - Interrupt: *mut WDFINTERRUPT, - ) -> NTSTATUS, ->; -pub type PFN_WDFINTERRUPTQUEUEDPCFORISR = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Interrupt: WDFINTERRUPT, - ) -> BOOLEAN, ->; -pub type PFN_WDFINTERRUPTQUEUEWORKITEMFORISR = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Interrupt: WDFINTERRUPT, - ) -> BOOLEAN, ->; -pub type PFN_WDFINTERRUPTSYNCHRONIZE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Interrupt: WDFINTERRUPT, - Callback: PFN_WDF_INTERRUPT_SYNCHRONIZE, - Context: WDFCONTEXT, - ) -> BOOLEAN, ->; -pub type PFN_WDFINTERRUPTACQUIRELOCK = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Interrupt: WDFINTERRUPT), ->; -pub type PFN_WDFINTERRUPTRELEASELOCK = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Interrupt: WDFINTERRUPT), ->; -pub type PFN_WDFINTERRUPTENABLE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Interrupt: WDFINTERRUPT), ->; -pub type PFN_WDFINTERRUPTDISABLE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Interrupt: WDFINTERRUPT), ->; -pub type PFN_WDFINTERRUPTWDMGETINTERRUPT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Interrupt: WDFINTERRUPT, - ) -> PKINTERRUPT, ->; -pub type PFN_WDFINTERRUPTGETINFO = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Interrupt: WDFINTERRUPT, - Info: PWDF_INTERRUPT_INFO, - ), ->; -pub type PFN_WDFINTERRUPTSETPOLICY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Interrupt: WDFINTERRUPT, - Policy: WDF_INTERRUPT_POLICY, - Priority: WDF_INTERRUPT_PRIORITY, - TargetProcessorSet: KAFFINITY, - ), ->; -pub type PFN_WDFINTERRUPTSETEXTENDEDPOLICY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Interrupt: WDFINTERRUPT, - PolicyAndGroup: PWDF_INTERRUPT_EXTENDED_POLICY, - ), ->; -pub type PFN_WDFINTERRUPTGETDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Interrupt: WDFINTERRUPT, - ) -> WDFDEVICE, ->; -pub type PFN_WDFINTERRUPTTRYTOACQUIRELOCK = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Interrupt: WDFINTERRUPT, - ) -> BOOLEAN, ->; -pub type PFN_WDFINTERRUPTREPORTACTIVE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Interrupt: WDFINTERRUPT), ->; -pub type PFN_WDFINTERRUPTREPORTINACTIVE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Interrupt: WDFINTERRUPT), ->; -pub type PFN_WDFIORESOURCEREQUIREMENTSLISTSETSLOTNUMBER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - RequirementsList: WDFIORESREQLIST, - SlotNumber: ULONG, - ), ->; -pub type PFN_WDFIORESOURCEREQUIREMENTSLISTSETINTERFACETYPE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - RequirementsList: WDFIORESREQLIST, - InterfaceType: INTERFACE_TYPE, - ), ->; -pub type PFN_WDFIORESOURCEREQUIREMENTSLISTAPPENDIORESLIST = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - RequirementsList: WDFIORESREQLIST, - IoResList: WDFIORESLIST, - ) -> NTSTATUS, ->; -pub type PFN_WDFIORESOURCEREQUIREMENTSLISTINSERTIORESLIST = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - RequirementsList: WDFIORESREQLIST, - IoResList: WDFIORESLIST, - Index: ULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFIORESOURCEREQUIREMENTSLISTGETCOUNT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - RequirementsList: WDFIORESREQLIST, - ) -> ULONG, ->; -pub type PFN_WDFIORESOURCEREQUIREMENTSLISTGETIORESLIST = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - RequirementsList: WDFIORESREQLIST, - Index: ULONG, - ) -> WDFIORESLIST, ->; -pub type PFN_WDFIORESOURCEREQUIREMENTSLISTREMOVE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - RequirementsList: WDFIORESREQLIST, - Index: ULONG, - ), ->; -pub type PFN_WDFIORESOURCEREQUIREMENTSLISTREMOVEBYIORESLIST = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - RequirementsList: WDFIORESREQLIST, - IoResList: WDFIORESLIST, - ), ->; -pub type PFN_WDFIORESOURCELISTCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - RequirementsList: WDFIORESREQLIST, - Attributes: PWDF_OBJECT_ATTRIBUTES, - ResourceList: *mut WDFIORESLIST, - ) -> NTSTATUS, ->; -pub type PFN_WDFIORESOURCELISTAPPENDDESCRIPTOR = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ResourceList: WDFIORESLIST, - Descriptor: PIO_RESOURCE_DESCRIPTOR, - ) -> NTSTATUS, ->; -pub type PFN_WDFIORESOURCELISTINSERTDESCRIPTOR = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ResourceList: WDFIORESLIST, - Descriptor: PIO_RESOURCE_DESCRIPTOR, - Index: ULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFIORESOURCELISTUPDATEDESCRIPTOR = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ResourceList: WDFIORESLIST, - Descriptor: PIO_RESOURCE_DESCRIPTOR, - Index: ULONG, - ), ->; -pub type PFN_WDFIORESOURCELISTGETCOUNT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ResourceList: WDFIORESLIST, - ) -> ULONG, ->; -pub type PFN_WDFIORESOURCELISTGETDESCRIPTOR = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ResourceList: WDFIORESLIST, - Index: ULONG, - ) -> PIO_RESOURCE_DESCRIPTOR, ->; -pub type PFN_WDFIORESOURCELISTREMOVE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ResourceList: WDFIORESLIST, - Index: ULONG, - ), ->; -pub type PFN_WDFIORESOURCELISTREMOVEBYDESCRIPTOR = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ResourceList: WDFIORESLIST, - Descriptor: PIO_RESOURCE_DESCRIPTOR, - ), ->; -pub type PFN_WDFCMRESOURCELISTAPPENDDESCRIPTOR = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - List: WDFCMRESLIST, - Descriptor: PCM_PARTIAL_RESOURCE_DESCRIPTOR, - ) -> NTSTATUS, ->; -pub type PFN_WDFCMRESOURCELISTINSERTDESCRIPTOR = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - List: WDFCMRESLIST, - Descriptor: PCM_PARTIAL_RESOURCE_DESCRIPTOR, - Index: ULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFCMRESOURCELISTGETCOUNT = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, List: WDFCMRESLIST) -> ULONG, ->; -pub type PFN_WDFCMRESOURCELISTGETDESCRIPTOR = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - List: WDFCMRESLIST, - Index: ULONG, - ) -> PCM_PARTIAL_RESOURCE_DESCRIPTOR, ->; -pub type PFN_WDFCMRESOURCELISTREMOVE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - List: WDFCMRESLIST, - Index: ULONG, - ), ->; -pub type PFN_WDFCMRESOURCELISTREMOVEBYDESCRIPTOR = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - List: WDFCMRESLIST, - Descriptor: PCM_PARTIAL_RESOURCE_DESCRIPTOR, - ), ->; -pub mod _WDF_REQUEST_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WdfRequestTypeCreate: Type = 0; - pub const WdfRequestTypeCreateNamedPipe: Type = 1; - pub const WdfRequestTypeClose: Type = 2; - pub const WdfRequestTypeRead: Type = 3; - pub const WdfRequestTypeWrite: Type = 4; - pub const WdfRequestTypeQueryInformation: Type = 5; - pub const WdfRequestTypeSetInformation: Type = 6; - pub const WdfRequestTypeQueryEA: Type = 7; - pub const WdfRequestTypeSetEA: Type = 8; - pub const WdfRequestTypeFlushBuffers: Type = 9; - pub const WdfRequestTypeQueryVolumeInformation: Type = 10; - pub const WdfRequestTypeSetVolumeInformation: Type = 11; - pub const WdfRequestTypeDirectoryControl: Type = 12; - pub const WdfRequestTypeFileSystemControl: Type = 13; - pub const WdfRequestTypeDeviceControl: Type = 14; - pub const WdfRequestTypeDeviceControlInternal: Type = 15; - pub const WdfRequestTypeShutdown: Type = 16; - pub const WdfRequestTypeLockControl: Type = 17; - pub const WdfRequestTypeCleanup: Type = 18; - pub const WdfRequestTypeCreateMailSlot: Type = 19; - pub const WdfRequestTypeQuerySecurity: Type = 20; - pub const WdfRequestTypeSetSecurity: Type = 21; - pub const WdfRequestTypePower: Type = 22; - pub const WdfRequestTypeSystemControl: Type = 23; - pub const WdfRequestTypeDeviceChange: Type = 24; - pub const WdfRequestTypeQueryQuota: Type = 25; - pub const WdfRequestTypeSetQuota: Type = 26; - pub const WdfRequestTypePnp: Type = 27; - pub const WdfRequestTypeOther: Type = 28; - pub const WdfRequestTypeUsb: Type = 64; - pub const WdfRequestTypeNoFormat: Type = 255; - pub const WdfRequestTypeMax: Type = 256; -} -pub mod _WDF_REQUEST_REUSE_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const WDF_REQUEST_REUSE_NO_FLAGS: Type = 0; - pub const WDF_REQUEST_REUSE_SET_NEW_IRP: Type = 1; -} -pub use self::_WDF_REQUEST_REUSE_FLAGS::Type as WDF_REQUEST_REUSE_FLAGS; -pub mod _WDF_REQUEST_STOP_ACTION_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const WdfRequestStopActionInvalid: Type = 0; - pub const WdfRequestStopActionSuspend: Type = 1; - pub const WdfRequestStopActionPurge: Type = 2; - pub const WdfRequestStopRequestCancelable: Type = 268435456; -} -pub use self::_WDF_REQUEST_STOP_ACTION_FLAGS::Type as WDF_REQUEST_STOP_ACTION_FLAGS; -pub mod _WDF_REQUEST_SEND_OPTIONS_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const WDF_REQUEST_SEND_OPTION_TIMEOUT: Type = 1; - pub const WDF_REQUEST_SEND_OPTION_SYNCHRONOUS: Type = 2; - pub const WDF_REQUEST_SEND_OPTION_IGNORE_TARGET_STATE: Type = 4; - pub const WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET: Type = 8; - pub const WDF_REQUEST_SEND_OPTION_IMPERSONATE_CLIENT: Type = 65536; - pub const WDF_REQUEST_SEND_OPTION_IMPERSONATION_IGNORE_FAILURE: Type = 131072; -} -pub use self::_WDF_REQUEST_SEND_OPTIONS_FLAGS::Type as WDF_REQUEST_SEND_OPTIONS_FLAGS; -pub type PFN_WDF_REQUEST_CANCEL = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFREQUEST), ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WDF_REQUEST_PARAMETERS { - pub Size: USHORT, - pub MinorFunction: UCHAR, - pub Type: WDF_REQUEST_TYPE, - pub Parameters: _WDF_REQUEST_PARAMETERS__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WDF_REQUEST_PARAMETERS__bindgen_ty_1 { - pub Create: _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1, - pub Read: _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_2, - pub Write: _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_3, - pub DeviceIoControl: _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_4, - pub Others: _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_5, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1 { - pub SecurityContext: PIO_SECURITY_CONTEXT, - pub Options: ULONG, - pub __bindgen_padding_0: [u16; 2usize], - pub FileAttributes: USHORT, - pub ShareAccess: USHORT, - pub __bindgen_padding_1: u32, - pub EaLength: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1>(), - 32usize, - concat!( - "Size of: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).SecurityContext) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(SecurityContext), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Options) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Options), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShareAccess) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(ShareAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(EaLength), - ), - ); -} -impl Default for _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_2 { - pub Length: usize, - pub Key: ULONG, - pub DeviceOffset: LONGLONG, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_2>(), - 24usize, - concat!( - "Size of: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_2>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Key) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Key), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceOffset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(DeviceOffset), - ), - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_3 { - pub Length: usize, - pub Key: ULONG, - pub DeviceOffset: LONGLONG, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_3>(), - 24usize, - concat!( - "Size of: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_3>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Key) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Key), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceOffset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(DeviceOffset), - ), - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_4 { - pub OutputBufferLength: usize, - pub InputBufferLength: usize, - pub IoControlCode: ULONG, - pub Type3InputBuffer: PVOID, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_4, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_4>(), - 32usize, - concat!( - "Size of: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_4), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_4>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_4), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OutputBufferLength) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(OutputBufferLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).InputBufferLength) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(InputBufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoControlCode) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(IoControlCode), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).Type3InputBuffer) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(Type3InputBuffer), - ), - ); -} -impl Default for _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_4 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_5 { - pub Arg1: PVOID, - pub Arg2: PVOID, - pub IoControlCode: ULONG, - pub Arg4: PVOID, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_5, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_5>(), - 32usize, - concat!( - "Size of: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_5), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_5>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_5), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Arg1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(Arg1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Arg2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(Arg2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoControlCode) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(IoControlCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Arg4) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(Arg4), - ), - ); -} -impl Default for _WDF_REQUEST_PARAMETERS__bindgen_ty_1__bindgen_ty_5 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_PARAMETERS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_REQUEST_PARAMETERS__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_REQUEST_PARAMETERS__bindgen_ty_1>(), - 32usize, - concat!("Size of: ", stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_REQUEST_PARAMETERS__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Create) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1), - "::", - stringify!(Create), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Read) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1), - "::", - stringify!(Read), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Write) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1), - "::", - stringify!(Write), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceIoControl) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1), - "::", - stringify!(DeviceIoControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Others) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS__bindgen_ty_1), - "::", - stringify!(Others), - ), - ); -} -impl Default for _WDF_REQUEST_PARAMETERS__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_PARAMETERS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_REQUEST_PARAMETERS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_REQUEST_PARAMETERS>(), - 40usize, - concat!("Size of: ", stringify!(_WDF_REQUEST_PARAMETERS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_REQUEST_PARAMETERS>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_REQUEST_PARAMETERS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MinorFunction) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS), - "::", - stringify!(MinorFunction), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_PARAMETERS), - "::", - stringify!(Parameters), - ), - ); -} -impl Default for _WDF_REQUEST_PARAMETERS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_REQUEST_PARAMETERS = _WDF_REQUEST_PARAMETERS; -pub type PWDF_REQUEST_PARAMETERS = *mut _WDF_REQUEST_PARAMETERS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_USB_REQUEST_COMPLETION_PARAMS { - _unused: [u8; 0], -} -pub type PWDF_USB_REQUEST_COMPLETION_PARAMS = *mut _WDF_USB_REQUEST_COMPLETION_PARAMS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WDF_REQUEST_COMPLETION_PARAMS { - pub Size: ULONG, - pub Type: WDF_REQUEST_TYPE, - pub IoStatus: IO_STATUS_BLOCK, - pub Parameters: _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1 { - pub Write: _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_1, - pub Read: _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_2, - pub Ioctl: _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3, - pub Others: _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4, - pub Usb: _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_5, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_1 { - pub Buffer: WDFMEMORY, - pub Length: usize, - pub Offset: usize, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_1, - >(), - 24usize, - concat!( - "Size of: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Buffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(Offset), - ), - ); -} -impl Default for _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_2 { - pub Buffer: WDFMEMORY, - pub Length: usize, - pub Offset: usize, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_2, - >(), - 24usize, - concat!( - "Size of: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_2, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Buffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Length), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(Offset), - ), - ); -} -impl Default for _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3 { - pub IoControlCode: ULONG, - pub Input: _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1, - pub Output: _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1 { - pub Buffer: WDFMEMORY, - pub Offset: usize, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1, - >(), - 16usize, - concat!( - "Size of: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1 - ), - "::", - stringify!(Buffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1 - ), - "::", - stringify!(Offset), - ), - ); -} -impl Default -for _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2 { - pub Buffer: WDFMEMORY, - pub Offset: usize, - pub Length: usize, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2, - >(), - 24usize, - concat!( - "Size of: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Buffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2 - ), - "::", - stringify!(Buffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Offset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2 - ), - "::", - stringify!(Offset), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2 - ), - "::", - stringify!(Length), - ), - ); -} -impl Default -for _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3, - >(), - 48usize, - concat!( - "Size of: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoControlCode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(IoControlCode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Input) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Input), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Output) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(Output), - ), - ); -} -impl Default for _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4 { - pub Argument1: _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, - pub Argument2: _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, - pub Argument3: _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_3, - pub Argument4: _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_4, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { - pub Ptr: PVOID, - pub Value: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 - ), - "::", - stringify!(Ptr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 - ), - "::", - stringify!(Value), - ), - ); -} -impl Default -for _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { - pub Ptr: PVOID, - pub Value: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, - >(), - 8usize, - concat!( - "Size of: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 - ), - "::", - stringify!(Ptr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 - ), - "::", - stringify!(Value), - ), - ); -} -impl Default -for _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_3 { - pub Ptr: PVOID, - pub Value: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_3() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_3, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_3, - >(), - 8usize, - concat!( - "Size of: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_3 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_3, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_3 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_3 - ), - "::", - stringify!(Ptr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_3 - ), - "::", - stringify!(Value), - ), - ); -} -impl Default -for _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_3 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_4 { - pub Ptr: PVOID, - pub Value: ULONG_PTR, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_4, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_4, - >(), - 8usize, - concat!( - "Size of: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_4 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_4, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_4 - ), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_4 - ), - "::", - stringify!(Ptr), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Value) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_4 - ), - "::", - stringify!(Value), - ), - ); -} -impl Default -for _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4__bindgen_ty_4 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4, - >(), - 32usize, - concat!( - "Size of: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Argument1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(Argument1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Argument2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(Argument2), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Argument3) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(Argument3), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Argument4) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(Argument4), - ), - ); -} -impl Default for _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_4 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_5 { - pub Completion: PWDF_USB_REQUEST_COMPLETION_PARAMS, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_5() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_5, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_5, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_5), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_5, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_5), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Completion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_5), - "::", - stringify!(Completion), - ), - ); -} -impl Default for _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1__bindgen_ty_5 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1>(), - 48usize, - concat!("Size of: ", stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Write) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1), - "::", - stringify!(Write), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Read) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1), - "::", - stringify!(Read), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Ioctl) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1), - "::", - stringify!(Ioctl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Others) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1), - "::", - stringify!(Others), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Usb) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1), - "::", - stringify!(Usb), - ), - ); -} -impl Default for _WDF_REQUEST_COMPLETION_PARAMS__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_COMPLETION_PARAMS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_REQUEST_COMPLETION_PARAMS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_REQUEST_COMPLETION_PARAMS>(), - 72usize, - concat!("Size of: ", stringify!(_WDF_REQUEST_COMPLETION_PARAMS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_REQUEST_COMPLETION_PARAMS>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_REQUEST_COMPLETION_PARAMS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).IoStatus) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS), - "::", - stringify!(IoStatus), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_COMPLETION_PARAMS), - "::", - stringify!(Parameters), - ), - ); -} -impl Default for _WDF_REQUEST_COMPLETION_PARAMS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_REQUEST_COMPLETION_PARAMS = _WDF_REQUEST_COMPLETION_PARAMS; -pub type PWDF_REQUEST_COMPLETION_PARAMS = *mut _WDF_REQUEST_COMPLETION_PARAMS; -pub type PFN_WDF_REQUEST_COMPLETION_ROUTINE = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFREQUEST, - arg2: WDFIOTARGET, - arg3: PWDF_REQUEST_COMPLETION_PARAMS, - arg4: WDFCONTEXT, - ), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_REQUEST_REUSE_PARAMS { - pub Size: ULONG, - pub Flags: ULONG, - pub Status: NTSTATUS, - pub NewIrp: PIRP, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_REUSE_PARAMS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_REQUEST_REUSE_PARAMS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_REQUEST_REUSE_PARAMS>(), - 24usize, - concat!("Size of: ", stringify!(_WDF_REQUEST_REUSE_PARAMS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_REQUEST_REUSE_PARAMS>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_REQUEST_REUSE_PARAMS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_REUSE_PARAMS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_REUSE_PARAMS), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_REUSE_PARAMS), - "::", - stringify!(Status), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).NewIrp) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_REUSE_PARAMS), - "::", - stringify!(NewIrp), - ), - ); -} -impl Default for _WDF_REQUEST_REUSE_PARAMS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_REQUEST_REUSE_PARAMS = _WDF_REQUEST_REUSE_PARAMS; -pub type PWDF_REQUEST_REUSE_PARAMS = *mut _WDF_REQUEST_REUSE_PARAMS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_REQUEST_SEND_OPTIONS { - pub Size: ULONG, - pub Flags: ULONG, - pub Timeout: LONGLONG, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_SEND_OPTIONS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_REQUEST_SEND_OPTIONS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_REQUEST_SEND_OPTIONS>(), - 16usize, - concat!("Size of: ", stringify!(_WDF_REQUEST_SEND_OPTIONS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_REQUEST_SEND_OPTIONS>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_REQUEST_SEND_OPTIONS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_SEND_OPTIONS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_SEND_OPTIONS), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Timeout) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_SEND_OPTIONS), - "::", - stringify!(Timeout), - ), - ); -} -pub type WDF_REQUEST_SEND_OPTIONS = _WDF_REQUEST_SEND_OPTIONS; -pub type PWDF_REQUEST_SEND_OPTIONS = *mut _WDF_REQUEST_SEND_OPTIONS; -pub mod _WDF_REQUEST_FORWARD_OPTIONS_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const WDF_REQUEST_FORWARD_OPTION_SEND_AND_FORGET: Type = 1; -} -pub use self::_WDF_REQUEST_FORWARD_OPTIONS_FLAGS::Type as WDF_REQUEST_FORWARD_OPTIONS_FLAGS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_REQUEST_FORWARD_OPTIONS { - pub Size: ULONG, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_FORWARD_OPTIONS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_REQUEST_FORWARD_OPTIONS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_REQUEST_FORWARD_OPTIONS>(), - 8usize, - concat!("Size of: ", stringify!(_WDF_REQUEST_FORWARD_OPTIONS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_REQUEST_FORWARD_OPTIONS>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_REQUEST_FORWARD_OPTIONS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_FORWARD_OPTIONS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_FORWARD_OPTIONS), - "::", - stringify!(Flags), - ), - ); -} -pub type WDF_REQUEST_FORWARD_OPTIONS = _WDF_REQUEST_FORWARD_OPTIONS; -pub type PWDF_REQUEST_FORWARD_OPTIONS = *mut _WDF_REQUEST_FORWARD_OPTIONS; -pub type PFN_WDFREQUESTCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - RequestAttributes: PWDF_OBJECT_ATTRIBUTES, - IoTarget: WDFIOTARGET, - Request: *mut WDFREQUEST, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTGETREQUESTORPROCESSID = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ) -> ULONG, ->; -pub type PFN_WDFREQUESTCREATEFROMIRP = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - RequestAttributes: PWDF_OBJECT_ATTRIBUTES, - Irp: PIRP, - RequestFreesIrp: BOOLEAN, - Request: *mut WDFREQUEST, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTREUSE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ReuseParams: PWDF_REQUEST_REUSE_PARAMS, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTCHANGETARGET = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - IoTarget: WDFIOTARGET, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTFORMATREQUESTUSINGCURRENTTYPE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Request: WDFREQUEST), ->; -pub type PFN_WDFREQUESTWDMFORMATUSINGSTACKLOCATION = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Stack: PIO_STACK_LOCATION, - ), ->; -pub type PFN_WDFREQUESTSEND = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Target: WDFIOTARGET, - Options: PWDF_REQUEST_SEND_OPTIONS, - ) -> BOOLEAN, ->; -pub type PFN_WDFREQUESTGETSTATUS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTMARKCANCELABLE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - EvtRequestCancel: PFN_WDF_REQUEST_CANCEL, - ), ->; -pub type PFN_WDFREQUESTMARKCANCELABLEEX = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - EvtRequestCancel: PFN_WDF_REQUEST_CANCEL, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTUNMARKCANCELABLE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTISCANCELED = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ) -> BOOLEAN, ->; -pub type PFN_WDFREQUESTCANCELSENTREQUEST = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ) -> BOOLEAN, ->; -pub type PFN_WDFREQUESTISFROM32BITPROCESS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ) -> BOOLEAN, ->; -pub type PFN_WDFREQUESTSETCOMPLETIONROUTINE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - CompletionRoutine: PFN_WDF_REQUEST_COMPLETION_ROUTINE, - CompletionContext: WDFCONTEXT, - ), ->; -pub type PFN_WDFREQUESTGETCOMPLETIONPARAMS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Params: PWDF_REQUEST_COMPLETION_PARAMS, - ), ->; -pub type PFN_WDFREQUESTALLOCATETIMER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTCOMPLETE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Status: NTSTATUS, - ), ->; -pub type PFN_WDFREQUESTCOMPLETEWITHPRIORITYBOOST = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Status: NTSTATUS, - PriorityBoost: CCHAR, - ), ->; -pub type PFN_WDFREQUESTCOMPLETEWITHINFORMATION = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Status: NTSTATUS, - Information: ULONG_PTR, - ), ->; -pub type PFN_WDFREQUESTGETPARAMETERS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Parameters: PWDF_REQUEST_PARAMETERS, - ), ->; -pub type PFN_WDFREQUESTRETRIEVEINPUTMEMORY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Memory: *mut WDFMEMORY, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTRETRIEVEOUTPUTMEMORY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Memory: *mut WDFMEMORY, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTRETRIEVEINPUTBUFFER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - MinimumRequiredLength: usize, - Buffer: *mut PVOID, - Length: *mut usize, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTRETRIEVEOUTPUTBUFFER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - MinimumRequiredSize: usize, - Buffer: *mut PVOID, - Length: *mut usize, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTRETRIEVEINPUTWDMMDL = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Mdl: *mut PMDL, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTRETRIEVEOUTPUTWDMMDL = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Mdl: *mut PMDL, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTRETRIEVEUNSAFEUSERINPUTBUFFER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - MinimumRequiredLength: usize, - InputBuffer: *mut PVOID, - Length: *mut usize, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTRETRIEVEUNSAFEUSEROUTPUTBUFFER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - MinimumRequiredLength: usize, - OutputBuffer: *mut PVOID, - Length: *mut usize, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTSETINFORMATION = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Information: ULONG_PTR, - ), ->; -pub type PFN_WDFREQUESTGETINFORMATION = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ) -> ULONG_PTR, ->; -pub type PFN_WDFREQUESTGETFILEOBJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ) -> WDFFILEOBJECT, ->; -pub type PFN_WDFREQUESTPROBEANDLOCKUSERBUFFERFORREAD = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Buffer: PVOID, - Length: usize, - MemoryObject: *mut WDFMEMORY, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTPROBEANDLOCKUSERBUFFERFORWRITE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Buffer: PVOID, - Length: usize, - MemoryObject: *mut WDFMEMORY, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTGETREQUESTORMODE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ) -> KPROCESSOR_MODE, ->; -pub type PFN_WDFREQUESTFORWARDTOIOQUEUE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - DestinationQueue: WDFQUEUE, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTGETIOQUEUE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ) -> WDFQUEUE, ->; -pub type PFN_WDFREQUESTREQUEUE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ) -> NTSTATUS, ->; -pub type PFN_WDFREQUESTSTOPACKNOWLEDGE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - Requeue: BOOLEAN, - ), ->; -pub type PFN_WDFREQUESTWDMGETIRP = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Request: WDFREQUEST) -> PIRP, ->; -pub type PFN_WDFREQUESTISRESERVED = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ) -> BOOLEAN, ->; -pub type PFN_WDFREQUESTFORWARDTOPARENTDEVICEIOQUEUE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Request: WDFREQUEST, - ParentDeviceQueue: WDFQUEUE, - ForwardOptions: PWDF_REQUEST_FORWARD_OPTIONS, - ) -> NTSTATUS, ->; -pub mod _WDF_IO_TARGET_STATE { - pub type Type = ::core::ffi::c_int; - pub const WdfIoTargetStateUndefined: Type = 0; - pub const WdfIoTargetStarted: Type = 1; - pub const WdfIoTargetStopped: Type = 2; - pub const WdfIoTargetClosedForQueryRemove: Type = 3; - pub const WdfIoTargetClosed: Type = 4; - pub const WdfIoTargetDeleted: Type = 5; - pub const WdfIoTargetPurged: Type = 6; -} -pub use self::_WDF_IO_TARGET_STATE::Type as WDF_IO_TARGET_STATE; -pub type PWDF_IO_TARGET_STATE = *mut _WDF_IO_TARGET_STATE::Type; -pub mod _WDF_IO_TARGET_OPEN_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WdfIoTargetOpenUndefined: Type = 0; - pub const WdfIoTargetOpenUseExistingDevice: Type = 1; - pub const WdfIoTargetOpenByName: Type = 2; - pub const WdfIoTargetOpenReopen: Type = 3; - pub const WdfIoTargetOpenLocalTargetByFile: Type = 4; -} -pub use self::_WDF_IO_TARGET_OPEN_TYPE::Type as WDF_IO_TARGET_OPEN_TYPE; -pub mod _WDF_IO_TARGET_SENT_IO_ACTION { - pub type Type = ::core::ffi::c_int; - pub const WdfIoTargetSentIoUndefined: Type = 0; - pub const WdfIoTargetCancelSentIo: Type = 1; - pub const WdfIoTargetWaitForSentIoToComplete: Type = 2; - pub const WdfIoTargetLeaveSentIoPending: Type = 3; -} -pub use self::_WDF_IO_TARGET_SENT_IO_ACTION::Type as WDF_IO_TARGET_SENT_IO_ACTION; -pub mod _WDF_IO_TARGET_PURGE_IO_ACTION { - pub type Type = ::core::ffi::c_int; - pub const WdfIoTargetPurgeIoUndefined: Type = 0; - pub const WdfIoTargetPurgeIoAndWait: Type = 1; - pub const WdfIoTargetPurgeIo: Type = 2; -} -pub use self::_WDF_IO_TARGET_PURGE_IO_ACTION::Type as WDF_IO_TARGET_PURGE_IO_ACTION; -pub type PFN_WDF_IO_TARGET_QUERY_REMOVE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFIOTARGET) -> NTSTATUS, ->; -pub type PFN_WDF_IO_TARGET_REMOVE_CANCELED = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFIOTARGET), ->; -pub type PFN_WDF_IO_TARGET_REMOVE_COMPLETE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFIOTARGET), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_IO_TARGET_OPEN_PARAMS { - pub Size: ULONG, - pub Type: WDF_IO_TARGET_OPEN_TYPE, - pub EvtIoTargetQueryRemove: PFN_WDF_IO_TARGET_QUERY_REMOVE, - pub EvtIoTargetRemoveCanceled: PFN_WDF_IO_TARGET_REMOVE_CANCELED, - pub EvtIoTargetRemoveComplete: PFN_WDF_IO_TARGET_REMOVE_COMPLETE, - pub TargetDeviceObject: PDEVICE_OBJECT, - pub TargetFileObject: PFILE_OBJECT, - pub TargetDeviceName: UNICODE_STRING, - pub DesiredAccess: ACCESS_MASK, - pub ShareAccess: ULONG, - pub FileAttributes: ULONG, - pub CreateDisposition: ULONG, - pub CreateOptions: ULONG, - pub EaBuffer: PVOID, - pub EaBufferLength: ULONG, - pub AllocationSize: PLONGLONG, - pub FileInformation: ULONG, - pub FileName: UNICODE_STRING, -} -#[test] -fn bindgen_test_layout__WDF_IO_TARGET_OPEN_PARAMS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_IO_TARGET_OPEN_PARAMS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_IO_TARGET_OPEN_PARAMS>(), - 136usize, - concat!("Size of: ", stringify!(_WDF_IO_TARGET_OPEN_PARAMS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_IO_TARGET_OPEN_PARAMS>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_IO_TARGET_OPEN_PARAMS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Type) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(Type), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtIoTargetQueryRemove) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(EvtIoTargetQueryRemove), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtIoTargetRemoveCanceled) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(EvtIoTargetRemoveCanceled), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtIoTargetRemoveComplete) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(EvtIoTargetRemoveComplete), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetDeviceObject) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(TargetDeviceObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetFileObject) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(TargetFileObject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TargetDeviceName) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(TargetDeviceName), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DesiredAccess) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(DesiredAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ShareAccess) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(ShareAccess), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(FileAttributes), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CreateDisposition) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(CreateDisposition), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).CreateOptions) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(CreateOptions), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaBuffer) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(EaBuffer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EaBufferLength) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(EaBufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(AllocationSize), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileInformation) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(FileInformation), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_TARGET_OPEN_PARAMS), - "::", - stringify!(FileName), - ), - ); -} -impl Default for _WDF_IO_TARGET_OPEN_PARAMS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_IO_TARGET_OPEN_PARAMS = _WDF_IO_TARGET_OPEN_PARAMS; -pub type PWDF_IO_TARGET_OPEN_PARAMS = *mut _WDF_IO_TARGET_OPEN_PARAMS; -pub type PFN_WDFIOTARGETCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - IoTargetAttributes: PWDF_OBJECT_ATTRIBUTES, - IoTarget: *mut WDFIOTARGET, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETOPEN = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - OpenParams: PWDF_IO_TARGET_OPEN_PARAMS, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETCLOSEFORQUERYREMOVE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, IoTarget: WDFIOTARGET), ->; -pub type PFN_WDFIOTARGETCLOSE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, IoTarget: WDFIOTARGET), ->; -pub type PFN_WDFIOTARGETSTART = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETSTOP = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - Action: WDF_IO_TARGET_SENT_IO_ACTION, - ), ->; -pub type PFN_WDFIOTARGETPURGE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - Action: WDF_IO_TARGET_PURGE_IO_ACTION, - ), ->; -pub type PFN_WDFIOTARGETGETSTATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - ) -> WDF_IO_TARGET_STATE, ->; -pub type PFN_WDFIOTARGETGETDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - ) -> WDFDEVICE, ->; -pub type PFN_WDFIOTARGETQUERYTARGETPROPERTY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - DeviceProperty: DEVICE_REGISTRY_PROPERTY::Type, - BufferLength: ULONG, - PropertyBuffer: PVOID, - ResultLength: PULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETALLOCANDQUERYTARGETPROPERTY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - DeviceProperty: DEVICE_REGISTRY_PROPERTY::Type, - PoolType: POOL_TYPE, - PropertyMemoryAttributes: PWDF_OBJECT_ATTRIBUTES, - PropertyMemory: *mut WDFMEMORY, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETQUERYFORINTERFACE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - InterfaceType: LPCGUID, - Interface: PINTERFACE, - Size: USHORT, - Version: USHORT, - InterfaceSpecificData: PVOID, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETWDMGETTARGETDEVICEOBJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - ) -> PDEVICE_OBJECT, ->; -pub type PFN_WDFIOTARGETWDMGETTARGETPHYSICALDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - ) -> PDEVICE_OBJECT, ->; -pub type PFN_WDFIOTARGETWDMGETTARGETFILEOBJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - ) -> PFILE_OBJECT, ->; -pub type PFN_WDFIOTARGETWDMGETTARGETFILEHANDLE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - ) -> HANDLE, ->; -pub type PFN_WDFIOTARGETSENDREADSYNCHRONOUSLY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - Request: WDFREQUEST, - OutputBuffer: PWDF_MEMORY_DESCRIPTOR, - DeviceOffset: PLONGLONG, - RequestOptions: PWDF_REQUEST_SEND_OPTIONS, - BytesRead: PULONG_PTR, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETFORMATREQUESTFORREAD = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - Request: WDFREQUEST, - OutputBuffer: WDFMEMORY, - OutputBufferOffset: PWDFMEMORY_OFFSET, - DeviceOffset: PLONGLONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETSENDWRITESYNCHRONOUSLY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - Request: WDFREQUEST, - InputBuffer: PWDF_MEMORY_DESCRIPTOR, - DeviceOffset: PLONGLONG, - RequestOptions: PWDF_REQUEST_SEND_OPTIONS, - BytesWritten: PULONG_PTR, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETFORMATREQUESTFORWRITE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - Request: WDFREQUEST, - InputBuffer: WDFMEMORY, - InputBufferOffset: PWDFMEMORY_OFFSET, - DeviceOffset: PLONGLONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETSENDIOCTLSYNCHRONOUSLY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - Request: WDFREQUEST, - IoctlCode: ULONG, - InputBuffer: PWDF_MEMORY_DESCRIPTOR, - OutputBuffer: PWDF_MEMORY_DESCRIPTOR, - RequestOptions: PWDF_REQUEST_SEND_OPTIONS, - BytesReturned: PULONG_PTR, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETFORMATREQUESTFORIOCTL = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - Request: WDFREQUEST, - IoctlCode: ULONG, - InputBuffer: WDFMEMORY, - InputBufferOffset: PWDFMEMORY_OFFSET, - OutputBuffer: WDFMEMORY, - OutputBufferOffset: PWDFMEMORY_OFFSET, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETSENDINTERNALIOCTLSYNCHRONOUSLY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - Request: WDFREQUEST, - IoctlCode: ULONG, - InputBuffer: PWDF_MEMORY_DESCRIPTOR, - OutputBuffer: PWDF_MEMORY_DESCRIPTOR, - RequestOptions: PWDF_REQUEST_SEND_OPTIONS, - BytesReturned: PULONG_PTR, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETFORMATREQUESTFORINTERNALIOCTL = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - Request: WDFREQUEST, - IoctlCode: ULONG, - InputBuffer: WDFMEMORY, - InputBufferOffset: PWDFMEMORY_OFFSET, - OutputBuffer: WDFMEMORY, - OutputBufferOffset: PWDFMEMORY_OFFSET, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETSENDINTERNALIOCTLOTHERSSYNCHRONOUSLY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - Request: WDFREQUEST, - IoctlCode: ULONG, - OtherArg1: PWDF_MEMORY_DESCRIPTOR, - OtherArg2: PWDF_MEMORY_DESCRIPTOR, - OtherArg4: PWDF_MEMORY_DESCRIPTOR, - RequestOptions: PWDF_REQUEST_SEND_OPTIONS, - BytesReturned: PULONG_PTR, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOTARGETFORMATREQUESTFORINTERNALIOCTLOTHERS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - IoTarget: WDFIOTARGET, - Request: WDFREQUEST, - IoctlCode: ULONG, - OtherArg1: WDFMEMORY, - OtherArg1Offset: PWDFMEMORY_OFFSET, - OtherArg2: WDFMEMORY, - OtherArg2Offset: PWDFMEMORY_OFFSET, - OtherArg4: WDFMEMORY, - OtherArg4Offset: PWDFMEMORY_OFFSET, - ) -> NTSTATUS, ->; -pub mod _WDF_IO_QUEUE_DISPATCH_TYPE { - pub type Type = ::core::ffi::c_int; - pub const WdfIoQueueDispatchInvalid: Type = 0; - pub const WdfIoQueueDispatchSequential: Type = 1; - pub const WdfIoQueueDispatchParallel: Type = 2; - pub const WdfIoQueueDispatchManual: Type = 3; - pub const WdfIoQueueDispatchMax: Type = 4; -} -pub use self::_WDF_IO_QUEUE_DISPATCH_TYPE::Type as WDF_IO_QUEUE_DISPATCH_TYPE; -pub mod _WDF_IO_QUEUE_STATE { - pub type Type = ::core::ffi::c_int; - pub const WdfIoQueueAcceptRequests: Type = 1; - pub const WdfIoQueueDispatchRequests: Type = 2; - pub const WdfIoQueueNoRequests: Type = 4; - pub const WdfIoQueueDriverNoRequests: Type = 8; - pub const WdfIoQueuePnpHeld: Type = 16; -} -pub use self::_WDF_IO_QUEUE_STATE::Type as WDF_IO_QUEUE_STATE; -pub type PFN_WDF_IO_QUEUE_IO_DEFAULT = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFQUEUE, arg2: WDFREQUEST), ->; -pub type PFN_WDF_IO_QUEUE_IO_STOP = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFQUEUE, arg2: WDFREQUEST, arg3: ULONG), ->; -pub type PFN_WDF_IO_QUEUE_IO_RESUME = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFQUEUE, arg2: WDFREQUEST), ->; -pub type PFN_WDF_IO_QUEUE_IO_READ = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFQUEUE, arg2: WDFREQUEST, arg3: usize), ->; -pub type PFN_WDF_IO_QUEUE_IO_WRITE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFQUEUE, arg2: WDFREQUEST, arg3: usize), ->; -pub type PFN_WDF_IO_QUEUE_IO_DEVICE_CONTROL = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFQUEUE, - arg2: WDFREQUEST, - arg3: usize, - arg4: usize, - arg5: ULONG, - ), ->; -pub type PFN_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFQUEUE, - arg2: WDFREQUEST, - arg3: usize, - arg4: usize, - arg5: ULONG, - ), ->; -pub type PFN_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFQUEUE, arg2: WDFREQUEST), ->; -pub type PFN_WDF_IO_QUEUE_STATE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFQUEUE, arg2: WDFCONTEXT), ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WDF_IO_QUEUE_CONFIG { - pub Size: ULONG, - pub DispatchType: WDF_IO_QUEUE_DISPATCH_TYPE, - pub PowerManaged: WDF_TRI_STATE, - pub AllowZeroLengthRequests: BOOLEAN, - pub DefaultQueue: BOOLEAN, - pub EvtIoDefault: PFN_WDF_IO_QUEUE_IO_DEFAULT, - pub EvtIoRead: PFN_WDF_IO_QUEUE_IO_READ, - pub EvtIoWrite: PFN_WDF_IO_QUEUE_IO_WRITE, - pub EvtIoDeviceControl: PFN_WDF_IO_QUEUE_IO_DEVICE_CONTROL, - pub EvtIoInternalDeviceControl: PFN_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL, - pub EvtIoStop: PFN_WDF_IO_QUEUE_IO_STOP, - pub EvtIoResume: PFN_WDF_IO_QUEUE_IO_RESUME, - pub EvtIoCanceledOnQueue: PFN_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE, - pub Settings: _WDF_IO_QUEUE_CONFIG__bindgen_ty_1, - pub Driver: WDFDRIVER, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WDF_IO_QUEUE_CONFIG__bindgen_ty_1 { - pub Parallel: _WDF_IO_QUEUE_CONFIG__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_IO_QUEUE_CONFIG__bindgen_ty_1__bindgen_ty_1 { - pub NumberOfPresentedRequests: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_IO_QUEUE_CONFIG__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_IO_QUEUE_CONFIG__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_IO_QUEUE_CONFIG__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Size of: ", - stringify!(_WDF_IO_QUEUE_CONFIG__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_IO_QUEUE_CONFIG__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(_WDF_IO_QUEUE_CONFIG__bindgen_ty_1__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).NumberOfPresentedRequests) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(NumberOfPresentedRequests), - ), - ); -} -#[test] -fn bindgen_test_layout__WDF_IO_QUEUE_CONFIG__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_IO_QUEUE_CONFIG__bindgen_ty_1> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_IO_QUEUE_CONFIG__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(_WDF_IO_QUEUE_CONFIG__bindgen_ty_1)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_IO_QUEUE_CONFIG__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_IO_QUEUE_CONFIG__bindgen_ty_1)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Parallel) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG__bindgen_ty_1), - "::", - stringify!(Parallel), - ), - ); -} -impl Default for _WDF_IO_QUEUE_CONFIG__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_IO_QUEUE_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_IO_QUEUE_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_IO_QUEUE_CONFIG>(), - 96usize, - concat!("Size of: ", stringify!(_WDF_IO_QUEUE_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_IO_QUEUE_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_IO_QUEUE_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DispatchType) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(DispatchType), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PowerManaged) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(PowerManaged), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AllowZeroLengthRequests) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(AllowZeroLengthRequests), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DefaultQueue) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(DefaultQueue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtIoDefault) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(EvtIoDefault), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtIoRead) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(EvtIoRead), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtIoWrite) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(EvtIoWrite), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtIoDeviceControl) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(EvtIoDeviceControl), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtIoInternalDeviceControl) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(EvtIoInternalDeviceControl), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtIoStop) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(EvtIoStop), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtIoResume) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(EvtIoResume), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtIoCanceledOnQueue) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(EvtIoCanceledOnQueue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Settings) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(Settings), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Driver) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_CONFIG), - "::", - stringify!(Driver), - ), - ); -} -impl Default for _WDF_IO_QUEUE_CONFIG { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_IO_QUEUE_CONFIG = _WDF_IO_QUEUE_CONFIG; -pub type PWDF_IO_QUEUE_CONFIG = *mut _WDF_IO_QUEUE_CONFIG; -pub mod _WDF_IO_FORWARD_PROGRESS_ACTION { - pub type Type = ::core::ffi::c_int; - pub const WdfIoForwardProgressActionInvalid: Type = 0; - pub const WdfIoForwardProgressActionFailRequest: Type = 1; - pub const WdfIoForwardProgressActionUseReservedRequest: Type = 2; -} -pub use self::_WDF_IO_FORWARD_PROGRESS_ACTION::Type as WDF_IO_FORWARD_PROGRESS_ACTION; -pub mod _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY { - pub type Type = ::core::ffi::c_int; - pub const WdfIoForwardProgressInvalidPolicy: Type = 0; - pub const WdfIoForwardProgressReservedPolicyAlwaysUseReservedRequest: Type = 1; - pub const WdfIoForwardProgressReservedPolicyUseExamine: Type = 2; - pub const WdfIoForwardProgressReservedPolicyPagingIO: Type = 3; -} -pub use self::_WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY::Type as WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY; -pub type PFN_WDF_IO_ALLOCATE_RESOURCES_FOR_RESERVED_REQUEST = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFQUEUE, arg2: WDFREQUEST) -> NTSTATUS, ->; -pub type PFN_WDF_IO_ALLOCATE_REQUEST_RESOURCES = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFQUEUE, arg2: WDFREQUEST) -> NTSTATUS, ->; -pub type PFN_WDF_IO_WDM_IRP_FOR_FORWARD_PROGRESS = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFQUEUE, arg2: PIRP) -> WDF_IO_FORWARD_PROGRESS_ACTION, ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS { - pub Policy: _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1 { - pub ExaminePolicy: _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1__bindgen_ty_1 { - pub EvtIoWdmIrpForForwardProgress: PFN_WDF_IO_WDM_IRP_FOR_FORWARD_PROGRESS, -} -#[test] -fn bindgen_test_layout__WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!( - _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!( - _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1__bindgen_ty_1 - ), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtIoWdmIrpForForwardProgress) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!( - _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1__bindgen_ty_1 - ), - "::", - stringify!(EvtIoWdmIrpForForwardProgress), - ), - ); -} -#[test] -fn bindgen_test_layout__WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1, - >(), - 8usize, - concat!( - "Size of: ", - stringify!(_WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ExaminePolicy) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1), - "::", - stringify!(ExaminePolicy), - ), - ); -} -impl Default for _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[test] -fn bindgen_test_layout__WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS>(), - 8usize, - concat!( - "Size of: ", - stringify!(_WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS), - ), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Policy) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS), - "::", - stringify!(Policy), - ), - ); -} -impl Default for _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS = _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY { - pub Size: ULONG, - pub TotalForwardProgressRequests: ULONG, - pub ForwardProgressReservedPolicy: WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY, - pub ForwardProgressReservePolicySettings: WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS, - pub EvtIoAllocateResourcesForReservedRequest: PFN_WDF_IO_ALLOCATE_RESOURCES_FOR_RESERVED_REQUEST, - pub EvtIoAllocateRequestResources: PFN_WDF_IO_ALLOCATE_REQUEST_RESOURCES, -} -#[test] -fn bindgen_test_layout__WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY>(), - 40usize, - concat!("Size of: ", stringify!(_WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TotalForwardProgressRequests) as usize - - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY), - "::", - stringify!(TotalForwardProgressRequests), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ForwardProgressReservedPolicy) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY), - "::", - stringify!(ForwardProgressReservedPolicy), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).ForwardProgressReservePolicySettings) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY), - "::", - stringify!(ForwardProgressReservePolicySettings), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtIoAllocateResourcesForReservedRequest) - as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY), - "::", - stringify!(EvtIoAllocateResourcesForReservedRequest), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtIoAllocateRequestResources) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY), - "::", - stringify!(EvtIoAllocateRequestResources), - ), - ); -} -impl Default for _WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY = _WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY; -pub type PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY = *mut _WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY; -pub type PFN_WDFIOQUEUECREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Config: PWDF_IO_QUEUE_CONFIG, - QueueAttributes: PWDF_OBJECT_ATTRIBUTES, - Queue: *mut WDFQUEUE, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOQUEUEGETSTATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Queue: WDFQUEUE, - QueueRequests: PULONG, - DriverRequests: PULONG, - ) -> WDF_IO_QUEUE_STATE, ->; -pub type PFN_WDFIOQUEUESTART = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Queue: WDFQUEUE), ->; -pub type PFN_WDFIOQUEUESTOP = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Queue: WDFQUEUE, - StopComplete: PFN_WDF_IO_QUEUE_STATE, - Context: WDFCONTEXT, - ), ->; -pub type PFN_WDFIOQUEUESTOPSYNCHRONOUSLY = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Queue: WDFQUEUE), ->; -pub type PFN_WDFIOQUEUEGETDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Queue: WDFQUEUE, - ) -> WDFDEVICE, ->; -pub type PFN_WDFIOQUEUERETRIEVENEXTREQUEST = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Queue: WDFQUEUE, - OutRequest: *mut WDFREQUEST, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOQUEUERETRIEVEREQUESTBYFILEOBJECT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Queue: WDFQUEUE, - FileObject: WDFFILEOBJECT, - OutRequest: *mut WDFREQUEST, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOQUEUEFINDREQUEST = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Queue: WDFQUEUE, - FoundRequest: WDFREQUEST, - FileObject: WDFFILEOBJECT, - Parameters: PWDF_REQUEST_PARAMETERS, - OutRequest: *mut WDFREQUEST, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOQUEUERETRIEVEFOUNDREQUEST = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Queue: WDFQUEUE, - FoundRequest: WDFREQUEST, - OutRequest: *mut WDFREQUEST, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOQUEUEDRAINSYNCHRONOUSLY = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Queue: WDFQUEUE), ->; -pub type PFN_WDFIOQUEUEDRAIN = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Queue: WDFQUEUE, - DrainComplete: PFN_WDF_IO_QUEUE_STATE, - Context: WDFCONTEXT, - ), ->; -pub type PFN_WDFIOQUEUEPURGESYNCHRONOUSLY = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Queue: WDFQUEUE), ->; -pub type PFN_WDFIOQUEUEPURGE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Queue: WDFQUEUE, - PurgeComplete: PFN_WDF_IO_QUEUE_STATE, - Context: WDFCONTEXT, - ), ->; -pub type PFN_WDFIOQUEUEREADYNOTIFY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Queue: WDFQUEUE, - QueueReady: PFN_WDF_IO_QUEUE_STATE, - Context: WDFCONTEXT, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOQUEUEASSIGNFORWARDPROGRESSPOLICY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Queue: WDFQUEUE, - ForwardProgressPolicy: PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY, - ) -> NTSTATUS, ->; -pub type PFN_WDFIOQUEUESTOPANDPURGE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Queue: WDFQUEUE, - StopAndPurgeComplete: PFN_WDF_IO_QUEUE_STATE, - Context: WDFCONTEXT, - ), ->; -pub type PFN_WDFIOQUEUESTOPANDPURGESYNCHRONOUSLY = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Queue: WDFQUEUE), ->; -pub type PFN_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: WDFIORESREQLIST) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_REMOVE_ADDED_RESOURCES = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFDEVICE, - arg2: WDFCMRESLIST, - arg3: WDFCMRESLIST, - ) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_FDO_EVENT_CALLBACKS { - pub Size: ULONG, - pub EvtDeviceFilterAddResourceRequirements: PFN_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS, - pub EvtDeviceFilterRemoveResourceRequirements: PFN_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS, - pub EvtDeviceRemoveAddedResources: PFN_WDF_DEVICE_REMOVE_ADDED_RESOURCES, -} -#[test] -fn bindgen_test_layout__WDF_FDO_EVENT_CALLBACKS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_FDO_EVENT_CALLBACKS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_FDO_EVENT_CALLBACKS>(), - 32usize, - concat!("Size of: ", stringify!(_WDF_FDO_EVENT_CALLBACKS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_FDO_EVENT_CALLBACKS>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_FDO_EVENT_CALLBACKS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_FDO_EVENT_CALLBACKS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceFilterAddResourceRequirements) as usize - - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_FDO_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceFilterAddResourceRequirements), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceFilterRemoveResourceRequirements) - as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_FDO_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceFilterRemoveResourceRequirements), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceRemoveAddedResources) as usize - - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_FDO_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceRemoveAddedResources), - ), - ); -} -pub type WDF_FDO_EVENT_CALLBACKS = _WDF_FDO_EVENT_CALLBACKS; -pub type PWDF_FDO_EVENT_CALLBACKS = *mut _WDF_FDO_EVENT_CALLBACKS; -pub type PFN_WDFFDOINITWDMGETPHYSICALDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - ) -> PDEVICE_OBJECT, ->; -pub type PFN_WDFFDOINITOPENREGISTRYKEY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - DeviceInstanceKeyType: ULONG, - DesiredAccess: ACCESS_MASK, - KeyAttributes: PWDF_OBJECT_ATTRIBUTES, - Key: *mut WDFKEY, - ) -> NTSTATUS, ->; -pub type PFN_WDFFDOINITQUERYPROPERTY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - DeviceProperty: DEVICE_REGISTRY_PROPERTY::Type, - BufferLength: ULONG, - PropertyBuffer: PVOID, - ResultLength: PULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFFDOINITALLOCANDQUERYPROPERTY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - DeviceProperty: DEVICE_REGISTRY_PROPERTY::Type, - PoolType: POOL_TYPE, - PropertyMemoryAttributes: PWDF_OBJECT_ATTRIBUTES, - PropertyMemory: *mut WDFMEMORY, - ) -> NTSTATUS, ->; -pub type PFN_WDFFDOINITQUERYPROPERTYEX = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - DeviceProperty: PWDF_DEVICE_PROPERTY_DATA, - BufferLength: ULONG, - PropertyBuffer: PVOID, - ResultLength: PULONG, - Type: PDEVPROPTYPE, - ) -> NTSTATUS, ->; -pub type PFN_WDFFDOINITALLOCANDQUERYPROPERTYEX = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - DeviceProperty: PWDF_DEVICE_PROPERTY_DATA, - PoolType: POOL_TYPE, - PropertyMemoryAttributes: PWDF_OBJECT_ATTRIBUTES, - PropertyMemory: *mut WDFMEMORY, - Type: PDEVPROPTYPE, - ) -> NTSTATUS, ->; -pub type PFN_WDFFDOINITSETEVENTCALLBACKS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - FdoEventCallbacks: PWDF_FDO_EVENT_CALLBACKS, - ), ->; -pub type PFN_WDFFDOINITSETFILTER = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, DeviceInit: PWDFDEVICE_INIT), ->; -pub type PFN_WDFFDOINITSETDEFAULTCHILDLISTCONFIG = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - Config: PWDF_CHILD_LIST_CONFIG, - DefaultChildListAttributes: PWDF_OBJECT_ATTRIBUTES, - ), ->; -pub type PFN_WDFFDOQUERYFORINTERFACE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Fdo: WDFDEVICE, - InterfaceType: LPCGUID, - Interface: PINTERFACE, - Size: USHORT, - Version: USHORT, - InterfaceSpecificData: PVOID, - ) -> NTSTATUS, ->; -pub type PFN_WDFFDOGETDEFAULTCHILDLIST = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Fdo: WDFDEVICE, - ) -> WDFCHILDLIST, ->; -pub type PFN_WDFFDOADDSTATICCHILD = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Fdo: WDFDEVICE, - Child: WDFDEVICE, - ) -> NTSTATUS, ->; -pub type PFN_WDFFDOLOCKSTATICCHILDLISTFORITERATION = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Fdo: WDFDEVICE), ->; -pub type PFN_WDFFDORETRIEVENEXTSTATICCHILD = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Fdo: WDFDEVICE, - PreviousChild: WDFDEVICE, - Flags: ULONG, - ) -> WDFDEVICE, ->; -pub type PFN_WDFFDOUNLOCKSTATICCHILDLISTFROMITERATION = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Fdo: WDFDEVICE), ->; -pub type PFN_WDF_DEVICE_RESOURCES_QUERY = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: WDFCMRESLIST) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: WDFIORESREQLIST) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_EJECT = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_SET_LOCK = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: BOOLEAN) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_ENABLE_WAKE_AT_BUS = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE, arg2: SYSTEM_POWER_STATE) -> NTSTATUS, ->; -pub type PFN_WDF_DEVICE_DISABLE_WAKE_AT_BUS = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE), ->; -pub type PFN_WDF_DEVICE_REPORTED_MISSING = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_PDO_EVENT_CALLBACKS { - pub Size: ULONG, - pub EvtDeviceResourcesQuery: PFN_WDF_DEVICE_RESOURCES_QUERY, - pub EvtDeviceResourceRequirementsQuery: PFN_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY, - pub EvtDeviceEject: PFN_WDF_DEVICE_EJECT, - pub EvtDeviceSetLock: PFN_WDF_DEVICE_SET_LOCK, - pub EvtDeviceEnableWakeAtBus: PFN_WDF_DEVICE_ENABLE_WAKE_AT_BUS, - pub EvtDeviceDisableWakeAtBus: PFN_WDF_DEVICE_DISABLE_WAKE_AT_BUS, - pub EvtDeviceReportedMissing: PFN_WDF_DEVICE_REPORTED_MISSING, -} -#[test] -fn bindgen_test_layout__WDF_PDO_EVENT_CALLBACKS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_PDO_EVENT_CALLBACKS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_PDO_EVENT_CALLBACKS>(), - 64usize, - concat!("Size of: ", stringify!(_WDF_PDO_EVENT_CALLBACKS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_PDO_EVENT_CALLBACKS>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_PDO_EVENT_CALLBACKS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PDO_EVENT_CALLBACKS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceResourcesQuery) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PDO_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceResourcesQuery), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceResourceRequirementsQuery) as usize - - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PDO_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceResourceRequirementsQuery), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).EvtDeviceEject) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PDO_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceEject), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceSetLock) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PDO_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceSetLock), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceEnableWakeAtBus) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PDO_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceEnableWakeAtBus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceDisableWakeAtBus) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PDO_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceDisableWakeAtBus), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDeviceReportedMissing) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WDF_PDO_EVENT_CALLBACKS), - "::", - stringify!(EvtDeviceReportedMissing), - ), - ); -} -pub type WDF_PDO_EVENT_CALLBACKS = _WDF_PDO_EVENT_CALLBACKS; -pub type PWDF_PDO_EVENT_CALLBACKS = *mut _WDF_PDO_EVENT_CALLBACKS; -pub type PFN_WDFPDOINITALLOCATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ParentDevice: WDFDEVICE, - ) -> PWDFDEVICE_INIT, ->; -pub type PFN_WDFPDOINITSETEVENTCALLBACKS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - DispatchTable: PWDF_PDO_EVENT_CALLBACKS, - ), ->; -pub type PFN_WDFPDOINITASSIGNDEVICEID = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - DeviceID: PCUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFPDOINITASSIGNINSTANCEID = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - InstanceID: PCUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFPDOINITADDHARDWAREID = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - HardwareID: PCUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFPDOINITADDCOMPATIBLEID = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - CompatibleID: PCUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFPDOINITASSIGNCONTAINERID = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - ContainerID: PCUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFPDOINITADDDEVICETEXT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - DeviceDescription: PCUNICODE_STRING, - DeviceLocation: PCUNICODE_STRING, - LocaleId: LCID, - ) -> NTSTATUS, ->; -pub type PFN_WDFPDOINITSETDEFAULTLOCALE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - LocaleId: LCID, - ), ->; -pub type PFN_WDFPDOINITASSIGNRAWDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - DeviceClassGuid: *const GUID, - ) -> NTSTATUS, ->; -pub type PFN_WDFPDOINITALLOWFORWARDINGREQUESTTOPARENT = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, DeviceInit: PWDFDEVICE_INIT), ->; -pub type PFN_WDFPDOMARKMISSING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - ) -> NTSTATUS, ->; -pub type PFN_WDFPDOREQUESTEJECT = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Device: WDFDEVICE), ->; -pub type PFN_WDFPDOGETPARENT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - ) -> WDFDEVICE, ->; -pub type PFN_WDFPDORETRIEVEIDENTIFICATIONDESCRIPTION = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - IdentificationDescription: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, - ) -> NTSTATUS, ->; -pub type PFN_WDFPDORETRIEVEADDRESSDESCRIPTION = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - AddressDescription: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, - ) -> NTSTATUS, ->; -pub type PFN_WDFPDOUPDATEADDRESSDESCRIPTION = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - AddressDescription: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, - ) -> NTSTATUS, ->; -pub type PFN_WDFPDOADDEJECTIONRELATIONSPHYSICALDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - PhysicalDevice: PDEVICE_OBJECT, - ) -> NTSTATUS, ->; -pub type PFN_WDFPDOREMOVEEJECTIONRELATIONSPHYSICALDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - PhysicalDevice: PDEVICE_OBJECT, - ), ->; -pub type PFN_WDFPDOCLEAREJECTIONRELATIONSDEVICES = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Device: WDFDEVICE), ->; -pub type PFN_WDFPDOINITREMOVEPOWERDEPENDENCYONPARENT = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, DeviceInit: PWDFDEVICE_INIT), ->; -pub type PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDEVICE), ->; -pub mod _WDF_DEVICE_SHUTDOWN_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const WdfDeviceShutdown: Type = 1; - pub const WdfDeviceLastChanceShutdown: Type = 2; -} -pub use self::_WDF_DEVICE_SHUTDOWN_FLAGS::Type as WDF_DEVICE_SHUTDOWN_FLAGS; -pub type PFN_WDFCONTROLDEVICEINITALLOCATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Driver: WDFDRIVER, - SDDLString: *const UNICODE_STRING, - ) -> PWDFDEVICE_INIT, ->; -pub type PFN_WDFCONTROLDEVICEINITSETSHUTDOWNNOTIFICATION = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DeviceInit: PWDFDEVICE_INIT, - Notification: PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION, - Flags: UCHAR, - ), ->; -pub type PFN_WDFCONTROLFINISHINITIALIZING = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Device: WDFDEVICE), ->; -pub mod _WDF_WMI_PROVIDER_CONTROL { - pub type Type = ::core::ffi::c_int; - pub const WdfWmiControlInvalid: Type = 0; - pub const WdfWmiEventControl: Type = 1; - pub const WdfWmiInstanceControl: Type = 2; -} -pub use self::_WDF_WMI_PROVIDER_CONTROL::Type as WDF_WMI_PROVIDER_CONTROL; -pub mod _WDF_WMI_PROVIDER_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const WdfWmiProviderEventOnly: Type = 1; - pub const WdfWmiProviderExpensive: Type = 2; - pub const WdfWmiProviderTracing: Type = 4; - pub const WdfWmiProviderValidFlags: Type = 7; -} -pub use self::_WDF_WMI_PROVIDER_FLAGS::Type as WDF_WMI_PROVIDER_FLAGS; -pub type PFN_WDF_WMI_INSTANCE_QUERY_INSTANCE = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFWMIINSTANCE, - arg2: ULONG, - arg3: PVOID, - arg4: PULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDF_WMI_INSTANCE_SET_INSTANCE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFWMIINSTANCE, arg2: ULONG, arg3: PVOID) -> NTSTATUS, ->; -pub type PFN_WDF_WMI_INSTANCE_SET_ITEM = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFWMIINSTANCE, - arg2: ULONG, - arg3: ULONG, - arg4: PVOID, - ) -> NTSTATUS, ->; -pub type PFN_WDF_WMI_INSTANCE_EXECUTE_METHOD = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFWMIINSTANCE, - arg2: ULONG, - arg3: ULONG, - arg4: ULONG, - arg5: PVOID, - arg6: PULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDF_WMI_PROVIDER_FUNCTION_CONTROL = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFWMIPROVIDER, - arg2: WDF_WMI_PROVIDER_CONTROL, - arg3: BOOLEAN, - ) -> NTSTATUS, ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_WMI_PROVIDER_CONFIG { - pub Size: ULONG, - pub Guid: GUID, - pub Flags: ULONG, - pub MinInstanceBufferSize: ULONG, - pub EvtWmiProviderFunctionControl: PFN_WDF_WMI_PROVIDER_FUNCTION_CONTROL, -} -#[test] -fn bindgen_test_layout__WDF_WMI_PROVIDER_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_WMI_PROVIDER_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_WMI_PROVIDER_CONFIG>(), - 40usize, - concat!("Size of: ", stringify!(_WDF_WMI_PROVIDER_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_WMI_PROVIDER_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_WMI_PROVIDER_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_PROVIDER_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Guid) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_PROVIDER_CONFIG), - "::", - stringify!(Guid), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_PROVIDER_CONFIG), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).MinInstanceBufferSize) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_PROVIDER_CONFIG), - "::", - stringify!(MinInstanceBufferSize), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtWmiProviderFunctionControl) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_PROVIDER_CONFIG), - "::", - stringify!(EvtWmiProviderFunctionControl), - ), - ); -} -pub type WDF_WMI_PROVIDER_CONFIG = _WDF_WMI_PROVIDER_CONFIG; -pub type PWDF_WMI_PROVIDER_CONFIG = *mut _WDF_WMI_PROVIDER_CONFIG; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_WMI_INSTANCE_CONFIG { - pub Size: ULONG, - pub Provider: WDFWMIPROVIDER, - pub ProviderConfig: PWDF_WMI_PROVIDER_CONFIG, - pub UseContextForQuery: BOOLEAN, - pub Register: BOOLEAN, - pub EvtWmiInstanceQueryInstance: PFN_WDF_WMI_INSTANCE_QUERY_INSTANCE, - pub EvtWmiInstanceSetInstance: PFN_WDF_WMI_INSTANCE_SET_INSTANCE, - pub EvtWmiInstanceSetItem: PFN_WDF_WMI_INSTANCE_SET_ITEM, - pub EvtWmiInstanceExecuteMethod: PFN_WDF_WMI_INSTANCE_EXECUTE_METHOD, -} -#[test] -fn bindgen_test_layout__WDF_WMI_INSTANCE_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_WMI_INSTANCE_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_WMI_INSTANCE_CONFIG>(), - 64usize, - concat!("Size of: ", stringify!(_WDF_WMI_INSTANCE_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_WMI_INSTANCE_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_WMI_INSTANCE_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_INSTANCE_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Provider) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_INSTANCE_CONFIG), - "::", - stringify!(Provider), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).ProviderConfig) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_INSTANCE_CONFIG), - "::", - stringify!(ProviderConfig), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).UseContextForQuery) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_INSTANCE_CONFIG), - "::", - stringify!(UseContextForQuery), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Register) as usize - ptr as usize }, - 25usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_INSTANCE_CONFIG), - "::", - stringify!(Register), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtWmiInstanceQueryInstance) as usize - - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_INSTANCE_CONFIG), - "::", - stringify!(EvtWmiInstanceQueryInstance), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtWmiInstanceSetInstance) as usize - - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_INSTANCE_CONFIG), - "::", - stringify!(EvtWmiInstanceSetInstance), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtWmiInstanceSetItem) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_INSTANCE_CONFIG), - "::", - stringify!(EvtWmiInstanceSetItem), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtWmiInstanceExecuteMethod) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WDF_WMI_INSTANCE_CONFIG), - "::", - stringify!(EvtWmiInstanceExecuteMethod), - ), - ); -} -impl Default for _WDF_WMI_INSTANCE_CONFIG { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_WMI_INSTANCE_CONFIG = _WDF_WMI_INSTANCE_CONFIG; -pub type PWDF_WMI_INSTANCE_CONFIG = *mut _WDF_WMI_INSTANCE_CONFIG; -pub type PFN_WDFWMIPROVIDERCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - WmiProviderConfig: PWDF_WMI_PROVIDER_CONFIG, - ProviderAttributes: PWDF_OBJECT_ATTRIBUTES, - WmiProvider: *mut WDFWMIPROVIDER, - ) -> NTSTATUS, ->; -pub type PFN_WDFWMIPROVIDERGETDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - WmiProvider: WDFWMIPROVIDER, - ) -> WDFDEVICE, ->; -pub type PFN_WDFWMIPROVIDERISENABLED = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - WmiProvider: WDFWMIPROVIDER, - ProviderControl: WDF_WMI_PROVIDER_CONTROL, - ) -> BOOLEAN, ->; -pub type PFN_WDFWMIPROVIDERGETTRACINGHANDLE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - WmiProvider: WDFWMIPROVIDER, - ) -> ULONGLONG, ->; -pub type PFN_WDFWMIINSTANCECREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - InstanceConfig: PWDF_WMI_INSTANCE_CONFIG, - InstanceAttributes: PWDF_OBJECT_ATTRIBUTES, - Instance: *mut WDFWMIINSTANCE, - ) -> NTSTATUS, ->; -pub type PFN_WDFWMIINSTANCEREGISTER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - WmiInstance: WDFWMIINSTANCE, - ) -> NTSTATUS, ->; -pub type PFN_WDFWMIINSTANCEDEREGISTER = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, WmiInstance: WDFWMIINSTANCE), ->; -pub type PFN_WDFWMIINSTANCEGETDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - WmiInstance: WDFWMIINSTANCE, - ) -> WDFDEVICE, ->; -pub type PFN_WDFWMIINSTANCEGETPROVIDER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - WmiInstance: WDFWMIINSTANCE, - ) -> WDFWMIPROVIDER, ->; -pub type PFN_WDFWMIINSTANCEFIREEVENT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - WmiInstance: WDFWMIINSTANCE, - EventDataSize: ULONG, - EventData: PVOID, - ) -> NTSTATUS, ->; -pub type PFN_WDFSTRINGCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - UnicodeString: PCUNICODE_STRING, - StringAttributes: PWDF_OBJECT_ATTRIBUTES, - String: *mut WDFSTRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFSTRINGGETUNICODESTRING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - String: WDFSTRING, - UnicodeString: PUNICODE_STRING, - ), ->; -pub type PFN_WDFREGISTRYOPENKEY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ParentKey: WDFKEY, - KeyName: PCUNICODE_STRING, - DesiredAccess: ACCESS_MASK, - KeyAttributes: PWDF_OBJECT_ATTRIBUTES, - Key: *mut WDFKEY, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYCREATEKEY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - ParentKey: WDFKEY, - KeyName: PCUNICODE_STRING, - DesiredAccess: ACCESS_MASK, - CreateOptions: ULONG, - CreateDisposition: PULONG, - KeyAttributes: PWDF_OBJECT_ATTRIBUTES, - Key: *mut WDFKEY, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYCLOSE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Key: WDFKEY), ->; -pub type PFN_WDFREGISTRYWDMGETHANDLE = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Key: WDFKEY) -> HANDLE, ->; -pub type PFN_WDFREGISTRYREMOVEKEY = ::core::option::Option< - unsafe extern "C" fn(DriverGlobals: PWDF_DRIVER_GLOBALS, Key: WDFKEY) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYREMOVEVALUE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Key: WDFKEY, - ValueName: PCUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYQUERYVALUE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Key: WDFKEY, - ValueName: PCUNICODE_STRING, - ValueLength: ULONG, - Value: PVOID, - ValueLengthQueried: PULONG, - ValueType: PULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYQUERYMEMORY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Key: WDFKEY, - ValueName: PCUNICODE_STRING, - PoolType: POOL_TYPE, - MemoryAttributes: PWDF_OBJECT_ATTRIBUTES, - Memory: *mut WDFMEMORY, - ValueType: PULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYQUERYMULTISTRING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Key: WDFKEY, - ValueName: PCUNICODE_STRING, - StringsAttributes: PWDF_OBJECT_ATTRIBUTES, - Collection: WDFCOLLECTION, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYQUERYUNICODESTRING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Key: WDFKEY, - ValueName: PCUNICODE_STRING, - ValueByteLength: PUSHORT, - Value: PUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYQUERYSTRING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Key: WDFKEY, - ValueName: PCUNICODE_STRING, - String: WDFSTRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYQUERYULONG = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Key: WDFKEY, - ValueName: PCUNICODE_STRING, - Value: PULONG, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYASSIGNVALUE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Key: WDFKEY, - ValueName: PCUNICODE_STRING, - ValueType: ULONG, - ValueLength: ULONG, - Value: PVOID, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYASSIGNMEMORY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Key: WDFKEY, - ValueName: PCUNICODE_STRING, - ValueType: ULONG, - Memory: WDFMEMORY, - MemoryOffsets: PWDFMEMORY_OFFSET, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYASSIGNMULTISTRING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Key: WDFKEY, - ValueName: PCUNICODE_STRING, - StringsCollection: WDFCOLLECTION, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYASSIGNUNICODESTRING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Key: WDFKEY, - ValueName: PCUNICODE_STRING, - Value: PCUNICODE_STRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYASSIGNSTRING = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Key: WDFKEY, - ValueName: PCUNICODE_STRING, - String: WDFSTRING, - ) -> NTSTATUS, ->; -pub type PFN_WDFREGISTRYASSIGNULONG = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Key: WDFKEY, - ValueName: PCUNICODE_STRING, - Value: ULONG, - ) -> NTSTATUS, ->; -pub mod _WDF_DMA_PROFILE { - pub type Type = ::core::ffi::c_int; - pub const WdfDmaProfileInvalid: Type = 0; - pub const WdfDmaProfilePacket: Type = 1; - pub const WdfDmaProfileScatterGather: Type = 2; - pub const WdfDmaProfilePacket64: Type = 3; - pub const WdfDmaProfileScatterGather64: Type = 4; - pub const WdfDmaProfileScatterGatherDuplex: Type = 5; - pub const WdfDmaProfileScatterGather64Duplex: Type = 6; - pub const WdfDmaProfileSystem: Type = 7; - pub const WdfDmaProfileSystemDuplex: Type = 8; -} -pub use self::_WDF_DMA_PROFILE::Type as WDF_DMA_PROFILE; -pub mod _WDF_DMA_DIRECTION { - pub type Type = ::core::ffi::c_int; - pub const WdfDmaDirectionReadFromDevice: Type = 0; - pub const WdfDmaDirectionWriteToDevice: Type = 1; -} -pub use self::_WDF_DMA_DIRECTION::Type as WDF_DMA_DIRECTION; -pub type PFN_WDF_DMA_ENABLER_FILL = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDMAENABLER) -> NTSTATUS, ->; -pub type PFN_WDF_DMA_ENABLER_FLUSH = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDMAENABLER) -> NTSTATUS, ->; -pub type PFN_WDF_DMA_ENABLER_ENABLE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDMAENABLER) -> NTSTATUS, ->; -pub type PFN_WDF_DMA_ENABLER_DISABLE = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDMAENABLER) -> NTSTATUS, ->; -pub type PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_START = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDMAENABLER) -> NTSTATUS, ->; -pub type PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_STOP = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDMAENABLER) -> NTSTATUS, ->; -pub mod _WDF_DMA_ENABLER_CONFIG_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const WDF_DMA_ENABLER_CONFIG_NO_SGLIST_PREALLOCATION: Type = 1; - pub const WDF_DMA_ENABLER_CONFIG_REQUIRE_SINGLE_TRANSFER: Type = 2; -} -pub use self::_WDF_DMA_ENABLER_CONFIG_FLAGS::Type as WDF_DMA_ENABLER_CONFIG_FLAGS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_DMA_ENABLER_CONFIG { - pub Size: ULONG, - pub Profile: WDF_DMA_PROFILE, - pub MaximumLength: usize, - pub EvtDmaEnablerFill: PFN_WDF_DMA_ENABLER_FILL, - pub EvtDmaEnablerFlush: PFN_WDF_DMA_ENABLER_FLUSH, - pub EvtDmaEnablerDisable: PFN_WDF_DMA_ENABLER_DISABLE, - pub EvtDmaEnablerEnable: PFN_WDF_DMA_ENABLER_ENABLE, - pub EvtDmaEnablerSelfManagedIoStart: PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_START, - pub EvtDmaEnablerSelfManagedIoStop: PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_STOP, - pub AddressWidthOverride: ULONG, - pub WdmDmaVersionOverride: ULONG, - pub Flags: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_DMA_ENABLER_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DMA_ENABLER_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DMA_ENABLER_CONFIG>(), - 80usize, - concat!("Size of: ", stringify!(_WDF_DMA_ENABLER_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DMA_ENABLER_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_DMA_ENABLER_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_ENABLER_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Profile) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_ENABLER_CONFIG), - "::", - stringify!(Profile), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MaximumLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_ENABLER_CONFIG), - "::", - stringify!(MaximumLength), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDmaEnablerFill) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_ENABLER_CONFIG), - "::", - stringify!(EvtDmaEnablerFill), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDmaEnablerFlush) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_ENABLER_CONFIG), - "::", - stringify!(EvtDmaEnablerFlush), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDmaEnablerDisable) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_ENABLER_CONFIG), - "::", - stringify!(EvtDmaEnablerDisable), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDmaEnablerEnable) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_ENABLER_CONFIG), - "::", - stringify!(EvtDmaEnablerEnable), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDmaEnablerSelfManagedIoStart) as usize - - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_ENABLER_CONFIG), - "::", - stringify!(EvtDmaEnablerSelfManagedIoStart), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).EvtDmaEnablerSelfManagedIoStop) as usize - - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_ENABLER_CONFIG), - "::", - stringify!(EvtDmaEnablerSelfManagedIoStop), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AddressWidthOverride) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_ENABLER_CONFIG), - "::", - stringify!(AddressWidthOverride), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).WdmDmaVersionOverride) as usize - ptr as usize - }, - 68usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_ENABLER_CONFIG), - "::", - stringify!(WdmDmaVersionOverride), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_ENABLER_CONFIG), - "::", - stringify!(Flags), - ), - ); -} -impl Default for _WDF_DMA_ENABLER_CONFIG { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_DMA_ENABLER_CONFIG = _WDF_DMA_ENABLER_CONFIG; -pub type PWDF_DMA_ENABLER_CONFIG = *mut _WDF_DMA_ENABLER_CONFIG; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _WDF_DMA_SYSTEM_PROFILE_CONFIG { - pub Size: ULONG, - pub DemandMode: BOOLEAN, - pub LoopedTransfer: BOOLEAN, - pub DmaWidth: DMA_WIDTH, - pub DeviceAddress: PHYSICAL_ADDRESS, - pub DmaDescriptor: PCM_PARTIAL_RESOURCE_DESCRIPTOR, -} -#[test] -fn bindgen_test_layout__WDF_DMA_SYSTEM_PROFILE_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_DMA_SYSTEM_PROFILE_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_DMA_SYSTEM_PROFILE_CONFIG>(), - 32usize, - concat!("Size of: ", stringify!(_WDF_DMA_SYSTEM_PROFILE_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_DMA_SYSTEM_PROFILE_CONFIG>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_DMA_SYSTEM_PROFILE_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_SYSTEM_PROFILE_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DemandMode) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_SYSTEM_PROFILE_CONFIG), - "::", - stringify!(DemandMode), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).LoopedTransfer) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_SYSTEM_PROFILE_CONFIG), - "::", - stringify!(LoopedTransfer), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DmaWidth) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_SYSTEM_PROFILE_CONFIG), - "::", - stringify!(DmaWidth), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceAddress) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_SYSTEM_PROFILE_CONFIG), - "::", - stringify!(DeviceAddress), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DmaDescriptor) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_DMA_SYSTEM_PROFILE_CONFIG), - "::", - stringify!(DmaDescriptor), - ), - ); -} -impl Default for _WDF_DMA_SYSTEM_PROFILE_CONFIG { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_DMA_SYSTEM_PROFILE_CONFIG = _WDF_DMA_SYSTEM_PROFILE_CONFIG; -pub type PWDF_DMA_SYSTEM_PROFILE_CONFIG = *mut _WDF_DMA_SYSTEM_PROFILE_CONFIG; -pub type PFN_WDFDMAENABLERCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - Device: WDFDEVICE, - Config: PWDF_DMA_ENABLER_CONFIG, - Attributes: PWDF_OBJECT_ATTRIBUTES, - DmaEnablerHandle: *mut WDFDMAENABLER, - ) -> NTSTATUS, ->; -pub type PFN_WDFDMAENABLERCONFIGURESYSTEMPROFILE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaEnabler: WDFDMAENABLER, - ProfileConfig: PWDF_DMA_SYSTEM_PROFILE_CONFIG, - ConfigDirection: WDF_DMA_DIRECTION, - ) -> NTSTATUS, ->; -pub type PFN_WDFDMAENABLERGETMAXIMUMLENGTH = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaEnabler: WDFDMAENABLER, - ) -> usize, ->; -pub type PFN_WDFDMAENABLERGETMAXIMUMSCATTERGATHERELEMENTS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaEnabler: WDFDMAENABLER, - ) -> usize, ->; -pub type PFN_WDFDMAENABLERSETMAXIMUMSCATTERGATHERELEMENTS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaEnabler: WDFDMAENABLER, - MaximumFragments: usize, - ), ->; -pub type PFN_WDFDMAENABLERGETFRAGMENTLENGTH = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaEnabler: WDFDMAENABLER, - DmaDirection: WDF_DMA_DIRECTION, - ) -> usize, ->; -pub type PFN_WDFDMAENABLERWDMGETDMAADAPTER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaEnabler: WDFDMAENABLER, - DmaDirection: WDF_DMA_DIRECTION, - ) -> PDMA_ADAPTER, ->; -pub type PFN_WDF_PROGRAM_DMA = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFDMATRANSACTION, - arg2: WDFDEVICE, - arg3: WDFCONTEXT, - arg4: WDF_DMA_DIRECTION, - arg5: PSCATTER_GATHER_LIST, - ) -> BOOLEAN, ->; -pub type PFN_WDF_DMA_TRANSACTION_CONFIGURE_DMA_CHANNEL = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFDMATRANSACTION, - arg2: WDFDEVICE, - arg3: PVOID, - arg4: PMDL, - arg5: usize, - arg6: usize, - ) -> BOOLEAN, ->; -pub type PFN_WDF_DMA_TRANSACTION_DMA_TRANSFER_COMPLETE = ::core::option::Option< - unsafe extern "C" fn( - arg1: WDFDMATRANSACTION, - arg2: WDFDEVICE, - arg3: WDFCONTEXT, - arg4: WDF_DMA_DIRECTION, - arg5: DMA_COMPLETION_STATUS::Type, - ), ->; -pub type PFN_WDF_RESERVE_DMA = ::core::option::Option< - unsafe extern "C" fn(arg1: WDFDMATRANSACTION, arg2: PVOID), ->; -pub type PFN_WDFDMATRANSACTIONCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaEnabler: WDFDMAENABLER, - Attributes: PWDF_OBJECT_ATTRIBUTES, - DmaTransaction: *mut WDFDMATRANSACTION, - ) -> NTSTATUS, ->; -pub type PFN_WDFDMATRANSACTIONINITIALIZE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - EvtProgramDmaFunction: PFN_WDF_PROGRAM_DMA, - DmaDirection: WDF_DMA_DIRECTION, - Mdl: PMDL, - VirtualAddress: PVOID, - Length: usize, - ) -> NTSTATUS, ->; -pub type PFN_WDFDMATRANSACTIONINITIALIZEUSINGOFFSET = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - EvtProgramDmaFunction: PFN_WDF_PROGRAM_DMA, - DmaDirection: WDF_DMA_DIRECTION, - Mdl: PMDL, - Offset: usize, - Length: usize, - ) -> NTSTATUS, ->; -pub type PFN_WDFDMATRANSACTIONINITIALIZEUSINGREQUEST = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - Request: WDFREQUEST, - EvtProgramDmaFunction: PFN_WDF_PROGRAM_DMA, - DmaDirection: WDF_DMA_DIRECTION, - ) -> NTSTATUS, ->; -pub type PFN_WDFDMATRANSACTIONEXECUTE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - Context: WDFCONTEXT, - ) -> NTSTATUS, ->; -pub type PFN_WDFDMATRANSACTIONRELEASE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - ) -> NTSTATUS, ->; -pub type PFN_WDFDMATRANSACTIONDMACOMPLETED = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - Status: *mut NTSTATUS, - ) -> BOOLEAN, ->; -pub type PFN_WDFDMATRANSACTIONDMACOMPLETEDWITHLENGTH = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - TransferredLength: usize, - Status: *mut NTSTATUS, - ) -> BOOLEAN, ->; -pub type PFN_WDFDMATRANSACTIONDMACOMPLETEDFINAL = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - FinalTransferredLength: usize, - Status: *mut NTSTATUS, - ) -> BOOLEAN, ->; -pub type PFN_WDFDMATRANSACTIONGETBYTESTRANSFERRED = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - ) -> usize, ->; -pub type PFN_WDFDMATRANSACTIONSETMAXIMUMLENGTH = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - MaximumLength: usize, - ), ->; -pub type PFN_WDFDMATRANSACTIONSETSINGLETRANSFERREQUIREMENT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - RequireSingleTransfer: BOOLEAN, - ), ->; -pub type PFN_WDFDMATRANSACTIONGETREQUEST = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - ) -> WDFREQUEST, ->; -pub type PFN_WDFDMATRANSACTIONGETCURRENTDMATRANSFERLENGTH = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - ) -> usize, ->; -pub type PFN_WDFDMATRANSACTIONGETDEVICE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - ) -> WDFDEVICE, ->; -pub type PFN_WDFDMATRANSACTIONGETTRANSFERINFO = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - MapRegisterCount: *mut ULONG, - ScatterGatherElementCount: *mut ULONG, - ), ->; -pub type PFN_WDFDMATRANSACTIONSETCHANNELCONFIGURATIONCALLBACK = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - ConfigureRoutine: PFN_WDF_DMA_TRANSACTION_CONFIGURE_DMA_CHANNEL, - ConfigureContext: PVOID, - ), ->; -pub type PFN_WDFDMATRANSACTIONSETTRANSFERCOMPLETECALLBACK = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - DmaCompletionRoutine: PFN_WDF_DMA_TRANSACTION_DMA_TRANSFER_COMPLETE, - DmaCompletionContext: PVOID, - ), ->; -pub type PFN_WDFDMATRANSACTIONSETIMMEDIATEEXECUTION = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - UseImmediateExecution: BOOLEAN, - ), ->; -pub type PFN_WDFDMATRANSACTIONALLOCATERESOURCES = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - DmaDirection: WDF_DMA_DIRECTION, - RequiredMapRegisters: ULONG, - EvtReserveDmaFunction: PFN_WDF_RESERVE_DMA, - EvtReserveDmaContext: PVOID, - ) -> NTSTATUS, ->; -pub type PFN_WDFDMATRANSACTIONSETDEVICEADDRESSOFFSET = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - Offset: ULONG, - ), ->; -pub type PFN_WDFDMATRANSACTIONFREERESOURCES = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - ), ->; -pub type PFN_WDFDMATRANSACTIONCANCEL = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - ) -> BOOLEAN, ->; -pub type PFN_WDFDMATRANSACTIONWDMGETTRANSFERCONTEXT = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - ) -> PVOID, ->; -pub type PFN_WDFDMATRANSACTIONSTOPSYSTEMTRANSFER = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaTransaction: WDFDMATRANSACTION, - ), ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_COMMON_BUFFER_CONFIG { - pub Size: ULONG, - pub AlignmentRequirement: ULONG, -} -#[test] -fn bindgen_test_layout__WDF_COMMON_BUFFER_CONFIG() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_COMMON_BUFFER_CONFIG> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_COMMON_BUFFER_CONFIG>(), - 8usize, - concat!("Size of: ", stringify!(_WDF_COMMON_BUFFER_CONFIG)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_COMMON_BUFFER_CONFIG>(), - 4usize, - concat!("Alignment of ", stringify!(_WDF_COMMON_BUFFER_CONFIG)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_COMMON_BUFFER_CONFIG), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).AlignmentRequirement) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_COMMON_BUFFER_CONFIG), - "::", - stringify!(AlignmentRequirement), - ), - ); -} -pub type WDF_COMMON_BUFFER_CONFIG = _WDF_COMMON_BUFFER_CONFIG; -pub type PWDF_COMMON_BUFFER_CONFIG = *mut _WDF_COMMON_BUFFER_CONFIG; -pub type PFN_WDFCOMMONBUFFERCREATE = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaEnabler: WDFDMAENABLER, - Length: usize, - Attributes: PWDF_OBJECT_ATTRIBUTES, - CommonBuffer: *mut WDFCOMMONBUFFER, - ) -> NTSTATUS, ->; -pub type PFN_WDFCOMMONBUFFERCREATEWITHCONFIG = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - DmaEnabler: WDFDMAENABLER, - Length: usize, - Config: PWDF_COMMON_BUFFER_CONFIG, - Attributes: PWDF_OBJECT_ATTRIBUTES, - CommonBuffer: *mut WDFCOMMONBUFFER, - ) -> NTSTATUS, ->; -pub type PFN_WDFCOMMONBUFFERGETALIGNEDVIRTUALADDRESS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - CommonBuffer: WDFCOMMONBUFFER, - ) -> PVOID, ->; -pub type PFN_WDFCOMMONBUFFERGETALIGNEDLOGICALADDRESS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - CommonBuffer: WDFCOMMONBUFFER, - ) -> PHYSICAL_ADDRESS, ->; -pub type PFN_WDFCOMMONBUFFERGETLENGTH = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - CommonBuffer: WDFCOMMONBUFFER, - ) -> usize, ->; -pub mod _WDF_BUGCHECK_CODES { - pub type Type = ::core::ffi::c_int; - pub const WDF_POWER_ROUTINE_TIMED_OUT: Type = 1; - pub const WDF_RECURSIVE_LOCK: Type = 2; - pub const WDF_VERIFIER_FATAL_ERROR: Type = 3; - pub const WDF_REQUIRED_PARAMETER_IS_NULL: Type = 4; - pub const WDF_INVALID_HANDLE: Type = 5; - pub const WDF_REQUEST_FATAL_ERROR: Type = 6; - pub const WDF_OBJECT_ERROR: Type = 7; - pub const WDF_DMA_FATAL_ERROR: Type = 8; - pub const WDF_INVALID_INTERRUPT: Type = 9; - pub const WDF_QUEUE_FATAL_ERROR: Type = 10; - pub const WDF_INVALID_LOCK_OPERATION: Type = 11; - pub const WDF_PNP_FATAL_ERROR: Type = 12; - pub const WDF_POWER_MULTIPLE_PPO: Type = 13; - pub const WDF_VERIFIER_IRQL_MISMATCH: Type = 14; - pub const WDF_VERIFIER_CRITICAL_REGION_MISMATCH: Type = 15; - pub const WDF_API_UNAVAILABLE: Type = 16; -} -pub use self::_WDF_BUGCHECK_CODES::Type as WDF_BUGCHECK_CODES; -pub mod _WDF_REQUEST_FATAL_ERROR_CODES { - pub type Type = ::core::ffi::c_int; - pub const WDF_REQUEST_FATAL_ERROR_NO_MORE_STACK_LOCATIONS: Type = 1; - pub const WDF_REQUEST_FATAL_ERROR_NULL_IRP: Type = 2; - pub const WDF_REQUEST_FATAL_ERROR_REQUEST_ALREADY_SENT: Type = 3; - pub const WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH: Type = 4; - pub const WDF_REQUEST_FATAL_ERROR_REQUEST_NOT_IN_QUEUE: Type = 5; -} -pub use self::_WDF_REQUEST_FATAL_ERROR_CODES::Type as WDF_REQUEST_FATAL_ERROR_CODES; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_POWER_ROUTINE_TIMED_OUT_DATA { - pub PowerState: WDF_DEVICE_POWER_STATE, - pub PowerPolicyState: WDF_DEVICE_POWER_POLICY_STATE, - pub DeviceObject: PDEVICE_OBJECT, - pub Device: WDFDEVICE, - pub TimedOutThread: PKTHREAD, -} -#[test] -fn bindgen_test_layout__WDF_POWER_ROUTINE_TIMED_OUT_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_POWER_ROUTINE_TIMED_OUT_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_POWER_ROUTINE_TIMED_OUT_DATA>(), - 32usize, - concat!("Size of: ", stringify!(_WDF_POWER_ROUTINE_TIMED_OUT_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_POWER_ROUTINE_TIMED_OUT_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_POWER_ROUTINE_TIMED_OUT_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).PowerState) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_ROUTINE_TIMED_OUT_DATA), - "::", - stringify!(PowerState), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).PowerPolicyState) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_ROUTINE_TIMED_OUT_DATA), - "::", - stringify!(PowerPolicyState), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).DeviceObject) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_ROUTINE_TIMED_OUT_DATA), - "::", - stringify!(DeviceObject), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Device) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_ROUTINE_TIMED_OUT_DATA), - "::", - stringify!(Device), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).TimedOutThread) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_POWER_ROUTINE_TIMED_OUT_DATA), - "::", - stringify!(TimedOutThread), - ), - ); -} -impl Default for _WDF_POWER_ROUTINE_TIMED_OUT_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_POWER_ROUTINE_TIMED_OUT_DATA = _WDF_POWER_ROUTINE_TIMED_OUT_DATA; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA { - pub Request: WDFREQUEST, - pub Irp: PIRP, - pub OutputBufferLength: ULONG, - pub Information: ULONG_PTR, - pub MajorFunction: UCHAR, -} -#[test] -fn bindgen_test_layout__WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA() { - const UNINIT: ::core::mem::MaybeUninit< - _WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA, - > = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::< - _WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA, - >(), - 40usize, - concat!( - "Size of: ", - stringify!(_WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA), - ), - ); - assert_eq!( - ::core::mem::align_of::< - _WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA, - >(), - 8usize, - concat!( - "Alignment of ", - stringify!(_WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Request) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA), - "::", - stringify!(Request), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Irp) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA), - "::", - stringify!(Irp), - ), - ); - assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).OutputBufferLength) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA), - "::", - stringify!(OutputBufferLength), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Information) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA), - "::", - stringify!(Information), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).MajorFunction) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA), - "::", - stringify!(MajorFunction), - ), - ); -} -impl Default for _WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA = _WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA; -pub type PWDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA = *mut _WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _WDF_QUEUE_FATAL_ERROR_DATA { - pub Queue: WDFQUEUE, - pub Request: WDFREQUEST, - pub Status: NTSTATUS, -} -#[test] -fn bindgen_test_layout__WDF_QUEUE_FATAL_ERROR_DATA() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_QUEUE_FATAL_ERROR_DATA> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_QUEUE_FATAL_ERROR_DATA>(), - 24usize, - concat!("Size of: ", stringify!(_WDF_QUEUE_FATAL_ERROR_DATA)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_QUEUE_FATAL_ERROR_DATA>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_QUEUE_FATAL_ERROR_DATA)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Queue) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_QUEUE_FATAL_ERROR_DATA), - "::", - stringify!(Queue), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Request) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_QUEUE_FATAL_ERROR_DATA), - "::", - stringify!(Request), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Status) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_WDF_QUEUE_FATAL_ERROR_DATA), - "::", - stringify!(Status), - ), - ); -} -impl Default for _WDF_QUEUE_FATAL_ERROR_DATA { - fn default() -> Self { - let mut s = ::core::mem::MaybeUninit::::uninit(); - unsafe { - ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub type WDF_QUEUE_FATAL_ERROR_DATA = _WDF_QUEUE_FATAL_ERROR_DATA; -pub type PWDF_QUEUE_FATAL_ERROR_DATA = *mut _WDF_QUEUE_FATAL_ERROR_DATA; -pub mod _WDF_TASK_SEND_OPTIONS_FLAGS { - pub type Type = ::core::ffi::c_int; - pub const WDF_TASK_SEND_OPTION_TIMEOUT: Type = 1; - pub const WDF_TASK_SEND_OPTION_SYNCHRONOUS: Type = 2; -} -pub use self::_WDF_TASK_SEND_OPTIONS_FLAGS::Type as WDF_TASK_SEND_OPTIONS_FLAGS; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _WDF_TASK_SEND_OPTIONS { - pub Size: ULONG, - pub Flags: ULONG, - pub Timeout: LONGLONG, -} -#[test] -fn bindgen_test_layout__WDF_TASK_SEND_OPTIONS() { - const UNINIT: ::core::mem::MaybeUninit<_WDF_TASK_SEND_OPTIONS> = ::core::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::core::mem::size_of::<_WDF_TASK_SEND_OPTIONS>(), - 16usize, - concat!("Size of: ", stringify!(_WDF_TASK_SEND_OPTIONS)), - ); - assert_eq!( - ::core::mem::align_of::<_WDF_TASK_SEND_OPTIONS>(), - 8usize, - concat!("Alignment of ", stringify!(_WDF_TASK_SEND_OPTIONS)), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_WDF_TASK_SEND_OPTIONS), - "::", - stringify!(Size), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_WDF_TASK_SEND_OPTIONS), - "::", - stringify!(Flags), - ), - ); - assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Timeout) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_WDF_TASK_SEND_OPTIONS), - "::", - stringify!(Timeout), - ), - ); -} -pub type WDF_TASK_SEND_OPTIONS = _WDF_TASK_SEND_OPTIONS; -pub type PWDF_TASK_SEND_OPTIONS = *mut _WDF_TASK_SEND_OPTIONS; -pub type PFN_WDFCOMPANIONTARGETSENDTASKSYNCHRONOUSLY = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - CompanionTarget: WDFCOMPANIONTARGET, - TaskQueueIdentifier: USHORT, - TaskOperationCode: ULONG, - InputBuffer: PWDF_MEMORY_DESCRIPTOR, - OutputBuffer: PWDF_MEMORY_DESCRIPTOR, - TaskOptions: PWDF_TASK_SEND_OPTIONS, - BytesReturned: PULONG_PTR, - ) -> NTSTATUS, ->; -pub type PFN_WDFCOMPANIONTARGETWDMGETCOMPANIONPROCESS = ::core::option::Option< - unsafe extern "C" fn( - DriverGlobals: PWDF_DRIVER_GLOBALS, - CompanionTarget: WDFCOMPANIONTARGET, - ) -> PEPROCESS, ->; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct lconv { - pub _address: u8, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _EPROCESS { - pub _address: u8, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _IORING_OBJECT { - pub _address: u8, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KTSS64 { - pub _address: u8, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _KPRCB { - pub _address: u8, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct _ECP_LIST { - pub _address: u8, -} diff --git a/crates/wdk-sys/generated_bindings/wdf.rs b/crates/wdk-sys/generated_bindings/wdf.rs deleted file mode 100644 index 4b19a5a9..00000000 --- a/crates/wdk-sys/generated_bindings/wdf.rs +++ /dev/null @@ -1,10 +0,0 @@ -/* automatically generated by rust-bindgen 0.69.4 */ - -extern "C" { - pub fn RtlAssert( - FailedAssertion: PVOID, - FileName: PVOID, - LineNumber: ULONG, - Message: PSTR, - ); -} diff --git a/crates/wdk-sys/src/constants.rs b/crates/wdk-sys/src/constants.rs index b84668c3..984f43fb 100644 --- a/crates/wdk-sys/src/constants.rs +++ b/crates/wdk-sys/src/constants.rs @@ -3,7 +3,13 @@ #![allow(missing_docs)] -use crate::types::{NTSTATUS, POOL_FLAGS, PVOID, PWDF_OBJECT_ATTRIBUTES}; +pub use bindings::*; +#[cfg(any(driver_model__driver_type = "WDM", driver_model__driver_type = "KMDF"))] +pub use kernel_mode::*; +#[cfg(any(driver_model__driver_type = "KMDF", driver_model__driver_type = "UMDF"))] +pub use wdf::*; + +use crate::types::NTSTATUS; #[allow(non_upper_case_globals)] #[rustversion::attr( @@ -23,31 +29,40 @@ mod bindings { include!(concat!(env!("OUT_DIR"), "/constants.rs")); } -pub use bindings::*; -pub const WDF_NO_OBJECT_ATTRIBUTES: PWDF_OBJECT_ATTRIBUTES = core::ptr::null_mut(); -pub const WDF_NO_EVENT_CALLBACK: PVOID = core::ptr::null_mut(); -pub const WDF_NO_HANDLE: PVOID = core::ptr::null_mut(); -pub const WDF_NO_CONTEXT: PVOID = core::ptr::null_mut(); -pub const WDF_NO_SEND_OPTIONS: PVOID = core::ptr::null_mut(); +#[cfg(any(driver_model__driver_type = "KMDF", driver_model__driver_type = "UMDF"))] +mod wdf { + use crate::types::{PVOID, PWDF_OBJECT_ATTRIBUTES}; -// Macros with MSVC C Integer Constant Suffixes are not supported by bindgen, so they must be manually ported or imported from elsewhere: https://github.com/rust-lang/rust-bindgen/issues/2600 -pub const POOL_FLAG_REQUIRED_START: POOL_FLAGS = 0x0000_0000_0000_0001; -pub const POOL_FLAG_USE_QUOTA: POOL_FLAGS = 0x0000_0000_0000_0001; // Charge quota -pub const POOL_FLAG_UNINITIALIZED: POOL_FLAGS = 0x0000_0000_0000_0002; // Don't zero-initialize allocation -pub const POOL_FLAG_SESSION: POOL_FLAGS = 0x0000_0000_0000_0004; // Use session specific pool -pub const POOL_FLAG_CACHE_ALIGNED: POOL_FLAGS = 0x0000_0000_0000_0008; // Cache aligned allocation -pub const POOL_FLAG_RESERVED1: POOL_FLAGS = 0x0000_0000_0000_0010; // Reserved for system use -pub const POOL_FLAG_RAISE_ON_FAILURE: POOL_FLAGS = 0x0000_0000_0000_0020; // Raise exception on failure -pub const POOL_FLAG_NON_PAGED: POOL_FLAGS = 0x0000_0000_0000_0040; // Non paged pool NX -pub const POOL_FLAG_NON_PAGED_EXECUTE: POOL_FLAGS = 0x0000_0000_0000_0080; // Non paged pool executable -pub const POOL_FLAG_PAGED: POOL_FLAGS = 0x0000_0000_0000_0100; // Paged pool -pub const POOL_FLAG_RESERVED2: POOL_FLAGS = 0x0000_0000_0000_0200; // Reserved for system use -pub const POOL_FLAG_RESERVED3: POOL_FLAGS = 0x0000_0000_0000_0400; // Reserved for system use -pub const POOL_FLAG_REQUIRED_END: POOL_FLAGS = 0x0000_0000_8000_0000; -pub const POOL_FLAG_OPTIONAL_START: POOL_FLAGS = 0x0000_0001_0000_0000; -pub const POOL_FLAG_SPECIAL_POOL: POOL_FLAGS = 0x0000_0001_0000_0000; // Make special pool allocation -pub const POOL_FLAG_OPTIONAL_END: POOL_FLAGS = 0x8000_0000_0000_0000; + pub const WDF_NO_OBJECT_ATTRIBUTES: PWDF_OBJECT_ATTRIBUTES = core::ptr::null_mut(); + pub const WDF_NO_EVENT_CALLBACK: PVOID = core::ptr::null_mut(); + pub const WDF_NO_HANDLE: PVOID = core::ptr::null_mut(); + pub const WDF_NO_CONTEXT: PVOID = core::ptr::null_mut(); + pub const WDF_NO_SEND_OPTIONS: PVOID = core::ptr::null_mut(); +} + +#[cfg(any(driver_model__driver_type = "WDM", driver_model__driver_type = "KMDF"))] +mod kernel_mode { + use crate::types::POOL_FLAGS; + + // Macros with MSVC C Integer Constant Suffixes are not supported by bindgen, so they must be manually ported or imported from elsewhere: https://github.com/rust-lang/rust-bindgen/issues/2600 + pub const POOL_FLAG_REQUIRED_START: POOL_FLAGS = 0x0000_0000_0000_0001; + pub const POOL_FLAG_USE_QUOTA: POOL_FLAGS = 0x0000_0000_0000_0001; // Charge quota + pub const POOL_FLAG_UNINITIALIZED: POOL_FLAGS = 0x0000_0000_0000_0002; // Don't zero-initialize allocation + pub const POOL_FLAG_SESSION: POOL_FLAGS = 0x0000_0000_0000_0004; // Use session specific pool + pub const POOL_FLAG_CACHE_ALIGNED: POOL_FLAGS = 0x0000_0000_0000_0008; // Cache aligned allocation + pub const POOL_FLAG_RESERVED1: POOL_FLAGS = 0x0000_0000_0000_0010; // Reserved for system use + pub const POOL_FLAG_RAISE_ON_FAILURE: POOL_FLAGS = 0x0000_0000_0000_0020; // Raise exception on failure + pub const POOL_FLAG_NON_PAGED: POOL_FLAGS = 0x0000_0000_0000_0040; // Non paged pool NX + pub const POOL_FLAG_NON_PAGED_EXECUTE: POOL_FLAGS = 0x0000_0000_0000_0080; // Non paged pool executable + pub const POOL_FLAG_PAGED: POOL_FLAGS = 0x0000_0000_0000_0100; // Paged pool + pub const POOL_FLAG_RESERVED2: POOL_FLAGS = 0x0000_0000_0000_0200; // Reserved for system use + pub const POOL_FLAG_RESERVED3: POOL_FLAGS = 0x0000_0000_0000_0400; // Reserved for system use + pub const POOL_FLAG_REQUIRED_END: POOL_FLAGS = 0x0000_0000_8000_0000; + pub const POOL_FLAG_OPTIONAL_START: POOL_FLAGS = 0x0000_0001_0000_0000; + pub const POOL_FLAG_SPECIAL_POOL: POOL_FLAGS = 0x0000_0001_0000_0000; // Make special pool allocation + pub const POOL_FLAG_OPTIONAL_END: POOL_FLAGS = 0x8000_0000_0000_0000; +} // Due to linker issues with windows_sys, these definitions are manually // imported definitions from windows_sys::Win32::Foundation: diff --git a/crates/wdk-sys/src/ntddk-input.h b/crates/wdk-sys/src/input.h similarity index 83% rename from crates/wdk-sys/src/ntddk-input.h rename to crates/wdk-sys/src/input.h index a53e9ae5..dec71ce3 100644 --- a/crates/wdk-sys/src/ntddk-input.h +++ b/crates/wdk-sys/src/input.h @@ -1,6 +1,12 @@ /* Copyright (c) Microsoft Corporation License: MIT OR Apache-2.0 */ +#if defined(UMDF_VERSION_MAJOR) + +#include + +#else // !defined(UMDF_VERSION_MAJOR) + #include "ntifs.h" #include "ntddk.h" @@ -57,3 +63,10 @@ typedef union _KIDTENTRY64 }; unsigned __int64 Alignment; } KIDTENTRY64, *PKIDTENTRY64; +#endif // !defined(UMDF_VERSION_MAJOR) + +#if defined(KMDF_VERSION_MAJOR) || defined(UMDF_VERSION_MAJOR) + +#include + +#endif // defined(KMDF_VERSION_MAJOR) || defined(UMDF_VERSION_MAJOR) diff --git a/crates/wdk-sys/src/lib.rs b/crates/wdk-sys/src/lib.rs index 63844a3e..bd76282f 100644 --- a/crates/wdk-sys/src/lib.rs +++ b/crates/wdk-sys/src/lib.rs @@ -5,19 +5,52 @@ #![no_std] -mod constants; -mod types; +#[cfg(any(driver_model__driver_type = "KMDF", driver_model__driver_type = "UMDF"))] +pub use wdf::WDF_FUNCTION_TABLE; +#[cfg(any( + driver_model__driver_type = "WDM", + driver_model__driver_type = "KMDF", + driver_model__driver_type = "UMDF" +))] +pub use wdk_macros as __proc_macros; +#[cfg(any( + driver_model__driver_type = "WDM", + driver_model__driver_type = "KMDF", + driver_model__driver_type = "UMDF" +))] pub use crate::{constants::*, types::*}; -pub mod macros; +#[cfg(any(driver_model__driver_type = "WDM", driver_model__driver_type = "KMDF"))] pub mod ntddk; +#[cfg(any(driver_model__driver_type = "KMDF", driver_model__driver_type = "UMDF"))] pub mod wdf; +#[cfg(driver_model__driver_type = "UMDF")] +pub mod windows; + #[cfg(feature = "test-stubs")] pub mod test_stubs; -use lazy_static::lazy_static; +#[cfg(any( + driver_model__driver_type = "WDM", + driver_model__driver_type = "KMDF", + driver_model__driver_type = "UMDF" +))] +mod constants; +#[cfg(any( + driver_model__driver_type = "WDM", + driver_model__driver_type = "KMDF", + driver_model__driver_type = "UMDF" +))] +mod types; + +#[cfg(any( + driver_model__driver_type = "WDM", + driver_model__driver_type = "KMDF", + driver_model__driver_type = "UMDF" +))] +mod macros; // This is fine because we don't actually have any floating point instruction in // our binary, thanks to our target defining soft-floats. fltused symbol is @@ -28,6 +61,7 @@ use lazy_static::lazy_static; pub static _fltused: () = (); // FIXME: Is there any way to avoid this stub? See https://github.com/rust-lang/rust/issues/101134 +#[cfg(panic = "abort")] #[allow(missing_docs)] #[allow(clippy::missing_const_for_fn)] // const extern is not yet supported: https://github.com/rust-lang/rust/issues/64926 #[no_mangle] @@ -35,32 +69,11 @@ pub extern "system" fn __CxxFrameHandler3() -> i32 { 0 } -// FIXME: dynamically find name of this struct based off of wdk-build settings -// FIXME: replace lazy_static with std::Lazy once available: https://github.com/rust-lang/rust/issues/109736 -lazy_static! { - #[allow(missing_docs)] - pub static ref WDF_FUNCTION_TABLE: &'static [WDFFUNC] = { - // SAFETY: `WdfFunctions_01033` is generated as a mutable static, but is not supposed to be ever mutated by WDF. - let wdf_function_table = unsafe { WdfFunctions_01033 }; - - // SAFETY: `WdfFunctionCount` is generated as a mutable static, but is not supposed to be ever mutated by WDF. - let wdf_function_count = unsafe { WdfFunctionCount } as usize; - - // SAFETY: This is safe because: - // 1. `WdfFunctions_01033` is valid for reads for `WdfFunctionCount` * `core::mem::size_of::()` - // bytes, and is guaranteed to be aligned and it must be properly aligned. - // 2. `WdfFunctions_01033` points to `WdfFunctionCount` consecutive properly initialized values of - // type `WDFFUNC`. - // 3. WDF does not mutate the memory referenced by the returned slice for for its entire `'static' lifetime. - // 4. The total size, `WdfFunctionCount` * `core::mem::size_of::()`, of the slice must be no - // larger than `isize::MAX`. This is proven by the below `debug_assert!`. - unsafe { - debug_assert!(isize::try_from(wdf_function_count * core::mem::size_of::()).is_ok()); - core::slice::from_raw_parts(wdf_function_table, wdf_function_count) - } - }; -} - +#[cfg(any( + driver_model__driver_type = "WDM", + driver_model__driver_type = "KMDF", + driver_model__driver_type = "UMDF" +))] #[allow(missing_docs)] #[must_use] #[allow(non_snake_case)] @@ -68,6 +81,7 @@ pub const fn NT_SUCCESS(nt_status: NTSTATUS) -> bool { nt_status >= 0 } +#[cfg(any(driver_model__driver_type = "WDM", driver_model__driver_type = "KMDF"))] #[allow(missing_docs)] #[macro_export] #[allow(non_snake_case)] diff --git a/crates/wdk-sys/src/macros.rs b/crates/wdk-sys/src/macros.rs index af7d39a8..000d69f6 100644 --- a/crates/wdk-sys/src/macros.rs +++ b/crates/wdk-sys/src/macros.rs @@ -5,4 +5,10 @@ //! interacting with WDK apis which are inlined, and so are impossible to //! generate with [bindgen](https://docs.rs/bindgen/latest/bindgen/). -pub use wdk_macros::*; +#[cfg(any(driver_model__driver_type = "KMDF", driver_model__driver_type = "UMDF"))] +mod wdf { + include!(concat!( + env!("OUT_DIR"), + "/call_unsafe_wdf_function_binding.rs" + )); +} diff --git a/crates/wdk-sys/src/ntddk.rs b/crates/wdk-sys/src/ntddk.rs index d4a44ecc..d7a703e9 100644 --- a/crates/wdk-sys/src/ntddk.rs +++ b/crates/wdk-sys/src/ntddk.rs @@ -1,11 +1,20 @@ // Copyright (c) Microsoft Corporation // License: MIT OR Apache-2.0 -#![allow(missing_docs)] +//! Direct FFI bindings to NTDDK APIs from the Windows Driver Kit (WDK) +//! +//! This module contains all bindings to functions, constants, methods, +//! constructors and destructors in `ntddk.h`. Types are not included in this +//! module, but are available in the top-level `wdk_sys` module. -// allow wildcards for types module since underlying c code relies on all -// type definitions being in scope -#[allow(clippy::wildcard_imports)] -use crate::types::*; +pub use bindings::*; -include!(concat!(env!("OUT_DIR"), "/ntddk.rs")); +#[allow(missing_docs)] +mod bindings { + // allow wildcards for types module since underlying c code relies on all + // type definitions being in scope + #[allow(clippy::wildcard_imports)] + use crate::types::*; + + include!(concat!(env!("OUT_DIR"), "/ntddk.rs")); +} diff --git a/crates/wdk-sys/src/test_stubs.rs b/crates/wdk-sys/src/test_stubs.rs index e7d6fd0d..a991b5c4 100644 --- a/crates/wdk-sys/src/test_stubs.rs +++ b/crates/wdk-sys/src/test_stubs.rs @@ -6,13 +6,26 @@ //! into scope by introducing `wdk-sys` with the `test-stubs` feature in the //! `dev-dependencies` of the crate's `Cargo.toml` -use crate::{DRIVER_OBJECT, NTSTATUS, PCUNICODE_STRING, ULONG, WDFFUNC}; +#[cfg(any(driver_model__driver_type = "KMDF", driver_model__driver_type = "UMDF"))] +pub use wdf::*; + +#[cfg(any( + driver_model__driver_type = "WDM", + driver_model__driver_type = "KMDF", + driver_model__driver_type = "UMDF" +))] +use crate::{DRIVER_OBJECT, NTSTATUS, PCUNICODE_STRING}; /// Stubbed version of `DriverEntry` Symbol so that test targets will compile /// /// # Safety /// /// This function should never be called, so its safety is irrelevant +#[cfg(any( + driver_model__driver_type = "WDM", + driver_model__driver_type = "KMDF", + driver_model__driver_type = "UMDF" +))] #[export_name = "DriverEntry"] // WDF expects a symbol with the name DriverEntry pub unsafe extern "system" fn driver_entry_stub( _driver: &mut DRIVER_OBJECT, @@ -21,12 +34,14 @@ pub unsafe extern "system" fn driver_entry_stub( 0 } -/// Stubbed version of `WdfFunctions_01033` Symbol so that test targets will -/// compile -#[no_mangle] -pub static mut WdfFunctions_01033: *const WDFFUNC = core::ptr::null(); +#[cfg(any(driver_model__driver_type = "KMDF", driver_model__driver_type = "UMDF"))] +mod wdf { + use crate::ULONG; + + /// Stubbed version of `WdfFunctionCount` Symbol so that test targets will + /// compile + #[no_mangle] + pub static mut WdfFunctionCount: ULONG = 0; -/// Stubbed version of `WdfFunctionCount` Symbol so that test targets will -/// compile -#[no_mangle] -pub static mut WdfFunctionCount: ULONG = 0; + include!(concat!(env!("OUT_DIR"), "/test_stubs.rs")); +} diff --git a/crates/wdk-sys/src/types.rs b/crates/wdk-sys/src/types.rs index 6f0536e2..3d0c2b87 100644 --- a/crates/wdk-sys/src/types.rs +++ b/crates/wdk-sys/src/types.rs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation // License: MIT OR Apache-2.0 +pub use bindings::*; + #[allow(missing_docs)] #[allow(non_upper_case_globals)] #[allow(non_camel_case_types)] @@ -58,4 +60,3 @@ mod bindings { include!(concat!(env!("OUT_DIR"), "/types.rs")); } -pub use bindings::*; diff --git a/crates/wdk-sys/src/wdf-input.h b/crates/wdk-sys/src/wdf.c similarity index 57% rename from crates/wdk-sys/src/wdf-input.h rename to crates/wdk-sys/src/wdf.c index ac70782c..37275965 100644 --- a/crates/wdk-sys/src/wdf-input.h +++ b/crates/wdk-sys/src/wdf.c @@ -1,6 +1,4 @@ /* Copyright (c) Microsoft Corporation License: MIT OR Apache-2.0 */ -#include "ntifs.h" -#include "ntddk.h" -#include "wdf.h" +#include "input.h" diff --git a/crates/wdk-sys/src/wdf.rs b/crates/wdk-sys/src/wdf.rs index 2a6615af..28e75fc8 100644 --- a/crates/wdk-sys/src/wdf.rs +++ b/crates/wdk-sys/src/wdf.rs @@ -2,8 +2,12 @@ // License: MIT OR Apache-2.0 //! Direct FFI bindings to WDF APIs from the Windows Driver Kit (WDK) +//! +//! This module contains all bindings to functions, constants, methods, +//! constructors and destructors in `wdf.h`. Types are not included in this +//! module, but are available in the top-level `wdk_sys` module. -use crate::types::ULONG; +pub use bindings::*; #[allow(missing_docs)] #[allow(clippy::unreadable_literal)] @@ -15,9 +19,5 @@ mod bindings { include!(concat!(env!("OUT_DIR"), "/wdf.rs")); } -pub use bindings::*; -// FIXME: UMDF >= 2.25 & KMDF >= 1.25 define this in wdffuncenum with -// _declspec(selectany) so they don't generate symbols -#[no_mangle] -static WdfMinimumVersionRequired: ULONG = 33; +include!(concat!(env!("OUT_DIR"), "/wdf_function_table.rs")); diff --git a/crates/wdk-sys/src/windows.rs b/crates/wdk-sys/src/windows.rs new file mode 100644 index 00000000..99d2bf53 --- /dev/null +++ b/crates/wdk-sys/src/windows.rs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! Direct FFI bindings to WIN32 APIs from the Windows Driver Kit (WDK) +//! +//! This module contains all bindings to functions, constants, methods, +//! constructors and destructors in `windows.h`. Types are not included in this +//! module, but are available in the top-level `wdk_sys` module. + +pub use bindings::*; + +#[allow(missing_docs)] +mod bindings { + // allow wildcards for types module since underlying c code relies on all + // type definitions being in scope + #[allow(clippy::wildcard_imports)] + use crate::types::*; + + include!(concat!(env!("OUT_DIR"), "/windows.rs")); +} diff --git a/crates/wdk/Cargo.toml b/crates/wdk/Cargo.toml index 4679bb51..24f11fb0 100644 --- a/crates/wdk/Cargo.toml +++ b/crates/wdk/Cargo.toml @@ -16,12 +16,14 @@ categories = [ "os", ] -[dependencies] -wdk-sys.workspace = true - [build-dependencies] +tracing.workspace = true +tracing-subscriber = { workspace = true, features = ["env-filter"] } wdk-build.workspace = true +[dependencies] +wdk-sys.workspace = true + [dev-dependencies] wdk-sys = { workspace = true, features = ["test-stubs"] } diff --git a/crates/wdk/build.rs b/crates/wdk/build.rs index c05a3eca..76819fd1 100644 --- a/crates/wdk/build.rs +++ b/crates/wdk/build.rs @@ -2,8 +2,13 @@ // License: MIT OR Apache-2.0 //! Build script for the `wdk` crate. +//! +//! Based on the [`wdk_build::Config`] parsed from the build tree, this build +//! script will provide the `wdk` crate with `cfg` settings to conditionally +//! compile code. fn main() -> Result<(), wdk_build::ConfigError> { - // Re-export config from wdk-sys - Ok(wdk_build::Config::from_env_auto()?.export_config()?) + tracing_subscriber::fmt().pretty().init(); + + wdk_build::configure_wdk_library_build() } diff --git a/crates/wdk/src/lib.rs b/crates/wdk/src/lib.rs index ad490dc3..b3f51f38 100644 --- a/crates/wdk/src/lib.rs +++ b/crates/wdk/src/lib.rs @@ -7,11 +7,33 @@ #![no_std] -#[cfg(feature = "alloc")] -mod print; -#[cfg(feature = "alloc")] +#[cfg(any( + all( + feature = "alloc", + any(driver_model__driver_type = "WDM", driver_model__driver_type = "KMDF") + ), + driver_model__driver_type = "UMDF", +))] pub use print::_print; -pub use wdk_sys::{NT_SUCCESS as nt_success, PAGED_CODE as paged_code}; +#[cfg(any( + driver_model__driver_type = "WDM", + driver_model__driver_type = "KMDF", + driver_model__driver_type = "UMDF" +))] +pub use wdk_sys::NT_SUCCESS as nt_success; +#[cfg(any(driver_model__driver_type = "WDM", driver_model__driver_type = "KMDF"))] +pub use wdk_sys::PAGED_CODE as paged_code; + +#[cfg(any( + all( + feature = "alloc", + any(driver_model__driver_type = "WDM", driver_model__driver_type = "KMDF") + ), + driver_model__driver_type = "UMDF", +))] +mod print; + +#[cfg(any(driver_model__driver_type = "KMDF", driver_model__driver_type = "UMDF"))] pub mod wdf; /// Trigger a breakpoint in debugger via architecture-specific inline assembly. @@ -19,7 +41,8 @@ pub mod wdf; /// Implementations derived from details outlined in [MSVC `__debugbreak` intrinsic documentation](https://learn.microsoft.com/en-us/cpp/intrinsics/debugbreak?view=msvc-170#remarks) /// /// # Panics -/// Will Panic if called on an unsupported architecture +/// +/// Will Panic if called from an unsupported architecture pub fn dbg_break() { // SAFETY: Abides all rules outlined in https://doc.rust-lang.org/reference/inline-assembly.html#rules-for-inline-assembly unsafe { diff --git a/crates/wdk/src/print.rs b/crates/wdk/src/print.rs index f994578e..5633dac6 100644 --- a/crates/wdk/src/print.rs +++ b/crates/wdk/src/print.rs @@ -5,8 +5,6 @@ extern crate alloc; use alloc::ffi::CString; -use wdk_sys::ntddk::DbgPrint; - /// print to kernel debugger via [`wdk_sys::ntddk::DbgPrint`] #[macro_export] macro_rules! print { @@ -41,6 +39,14 @@ pub fn _print(args: core::fmt::Arguments) { // SAFETY: `formatted_string` is a valid null terminated string unsafe { - DbgPrint(formatted_string.as_ptr()); + #[cfg(any(driver_model__driver_type = "WDM", driver_model__driver_type = "KMDF"))] + { + wdk_sys::ntddk::DbgPrint(formatted_string.as_ptr()); + } + + #[cfg(driver_model__driver_type = "UMDF")] + { + wdk_sys::windows::OutputDebugStringA(formatted_string.as_ptr()); + } } } diff --git a/crates/wdk/src/wdf/mod.rs b/crates/wdk/src/wdf/mod.rs index f8bb3347..be61dfa4 100644 --- a/crates/wdk/src/wdf/mod.rs +++ b/crates/wdk/src/wdf/mod.rs @@ -1,7 +1,10 @@ -//! Safe abstractions over WDF APIs +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 -mod spinlock; -mod timer; +//! Safe abstractions over WDF APIs pub use spinlock::*; pub use timer::*; + +mod spinlock; +mod timer; diff --git a/crates/wdk/src/wdf/spinlock.rs b/crates/wdk/src/wdf/spinlock.rs index ad0ffb0f..0edd567e 100644 --- a/crates/wdk/src/wdf/spinlock.rs +++ b/crates/wdk/src/wdf/spinlock.rs @@ -1,4 +1,7 @@ -use wdk_sys::{macros, NTSTATUS, WDFSPINLOCK, WDF_OBJECT_ATTRIBUTES}; +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +use wdk_sys::{call_unsafe_wdf_function_binding, NTSTATUS, WDFSPINLOCK, WDF_OBJECT_ATTRIBUTES}; use crate::nt_success; @@ -34,7 +37,7 @@ impl SpinLock { // accessible outside of this module, and this module guarantees that it is // always in a valid state. unsafe { - nt_status = macros::call_unsafe_wdf_function_binding!( + nt_status = call_unsafe_wdf_function_binding!( WdfSpinLockCreate, attributes, &mut spin_lock.wdf_spin_lock, @@ -58,7 +61,7 @@ impl SpinLock { // SAFETY: `wdf_spin_lock` is a private member of `SpinLock`, originally created // by WDF, and this module guarantees that it is always in a valid state. unsafe { - macros::call_unsafe_wdf_function_binding!(WdfSpinLockAcquire, self.wdf_spin_lock); + call_unsafe_wdf_function_binding!(WdfSpinLockAcquire, self.wdf_spin_lock); } } @@ -67,7 +70,7 @@ impl SpinLock { // SAFETY: `wdf_spin_lock` is a private member of `SpinLock`, originally created // by WDF, and this module guarantees that it is always in a valid state. unsafe { - macros::call_unsafe_wdf_function_binding!(WdfSpinLockRelease, self.wdf_spin_lock); + call_unsafe_wdf_function_binding!(WdfSpinLockRelease, self.wdf_spin_lock); } } } diff --git a/crates/wdk/src/wdf/timer.rs b/crates/wdk/src/wdf/timer.rs index 4a6cc5ea..7535ca02 100644 --- a/crates/wdk/src/wdf/timer.rs +++ b/crates/wdk/src/wdf/timer.rs @@ -1,4 +1,13 @@ -use wdk_sys::{macros, NTSTATUS, WDFTIMER, WDF_OBJECT_ATTRIBUTES, WDF_TIMER_CONFIG}; +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +use wdk_sys::{ + call_unsafe_wdf_function_binding, + NTSTATUS, + WDFTIMER, + WDF_OBJECT_ATTRIBUTES, + WDF_TIMER_CONFIG, +}; use crate::nt_success; @@ -25,7 +34,7 @@ impl Timer { // accessible outside of this module, and this module guarantees that it is // always in a valid state. unsafe { - nt_status = macros::call_unsafe_wdf_function_binding!( + nt_status = call_unsafe_wdf_function_binding!( WdfTimerCreate, timer_config, attributes, @@ -54,8 +63,7 @@ impl Timer { // SAFETY: `wdf_timer` is a private member of `Timer`, originally created by // WDF, and this module guarantees that it is always in a valid state. unsafe { - result = - macros::call_unsafe_wdf_function_binding!(WdfTimerStart, self.wdf_timer, due_time); + result = call_unsafe_wdf_function_binding!(WdfTimerStart, self.wdf_timer, due_time); } result != 0 } @@ -67,11 +75,8 @@ impl Timer { // SAFETY: `wdf_timer` is a private member of `Timer`, originally created by // WDF, and this module guarantees that it is always in a valid state. unsafe { - result = macros::call_unsafe_wdf_function_binding!( - WdfTimerStop, - self.wdf_timer, - u8::from(wait) - ); + result = + call_unsafe_wdf_function_binding!(WdfTimerStop, self.wdf_timer, u8::from(wait)); } result != 0 } diff --git a/examples/Makefile.toml b/examples/Makefile.toml new file mode 100644 index 00000000..4bced674 --- /dev/null +++ b/examples/Makefile.toml @@ -0,0 +1,9 @@ +extend = "../crates/wdk-build/rust-driver-makefile.toml" + +[env] +CARGO_MAKE_WORKSPACE_EMULATION = true +CARGO_MAKE_CRATE_WORKSPACE_MEMBERS = [ + "sample-kmdf-driver", + "sample-umdf-driver", + "sample-wdm-driver", +] diff --git a/examples/sample-kmdf-driver/Cargo.lock b/examples/sample-kmdf-driver/Cargo.lock new file mode 100644 index 00000000..94dc7081 --- /dev/null +++ b/examples/sample-kmdf-driver/Cargo.lock @@ -0,0 +1,941 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", + "which", +] + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "camino" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap-cargo" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e2fd20c8f8c7cc395f69a86a61eb9d93e1de8fadc00338508cde2ffc656388" +dependencies = [ + "anstyle", + "clap", +] + +[[package]] +name = "clap_builder" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libloading" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "sample-kmdf-driver" +version = "0.1.0" +dependencies = [ + "wdk", + "wdk-alloc", + "wdk-build", + "wdk-panic", + "wdk-sys", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.120" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "2.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "wdk" +version = "0.2.0" +dependencies = [ + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-sys", +] + +[[package]] +name = "wdk-alloc" +version = "0.2.0" +dependencies = [ + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-sys", +] + +[[package]] +name = "wdk-build" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "camino", + "cargo_metadata", + "clap", + "clap-cargo", + "lazy_static", + "paste", + "rustversion", + "serde", + "serde_json", + "thiserror", + "tracing", + "windows", +] + +[[package]] +name = "wdk-macros" +version = "0.2.0" +dependencies = [ + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "wdk-panic" +version = "0.2.0" + +[[package]] +name = "wdk-sys" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "cargo_metadata", + "cc", + "lazy_static", + "rustversion", + "serde_json", + "thiserror", + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-macros", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core", + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/examples/sample-kmdf-driver/Cargo.toml b/examples/sample-kmdf-driver/Cargo.toml new file mode 100644 index 00000000..c6003f6d --- /dev/null +++ b/examples/sample-kmdf-driver/Cargo.toml @@ -0,0 +1,68 @@ +[package] +edition = "2021" +name = "sample-kmdf-driver" +version = "0.1.0" +description = "A sample KMDF driver that demonstrates KMDF in RUST" +repository = "https://github.com/microsoft/windows-drivers-rs" +readme = "README.md" +license = "MIT OR Apache-2.0" +keywords = ["windows", "driver", "sample", "example", "wdf"] +categories = ["hardware-support"] +publish = false + +[package.metadata.wdk.driver-model] +driver-type = "KMDF" +kmdf-version-major = 1 +target-kmdf-version-minor = 33 + +[lib] +crate-type = ["cdylib"] +# Tests from root driver crates must be excluded since there's no way to prevent linker args from being passed to their unit tests: https://github.com/rust-lang/cargo/issues/12663 +test = false + +[build-dependencies] +wdk-build = { path = "../../crates/wdk-build", version = "0.2.0" } + +[dependencies] +wdk = { path = "../../crates/wdk", version = "0.2.0" } +wdk-alloc = { path = "../../crates/wdk-alloc", version = "0.2.0" } +wdk-panic = { path = "../../crates/wdk-panic", version = "0.2.0" } +wdk-sys = { path = "../../crates/wdk-sys", version = "0.2.0" } + +[features] +default = [] +nightly = ["wdk/nightly", "wdk-sys/nightly"] + +[profile.dev] +panic = "abort" +lto = true + +[profile.release] +panic = "abort" +lto = true + +[lints.rust] +missing_docs = "warn" +unsafe_op_in_unsafe_fn = "forbid" + +[lints.clippy] +# Lint Groups +all = { level = "deny", priority = -1 } +pedantic = { level = "warn", priority = -1 } +nursery = { level = "warn", priority = -1 } +cargo = { level = "warn", priority = -1 } +# Individual Lints +multiple_unsafe_ops_per_block = "forbid" +undocumented_unsafe_blocks = "forbid" +unnecessary_safety_doc = "forbid" + +[lints.rustdoc] +bare_urls = "warn" +broken_intra_doc_links = "warn" +invalid_codeblock_attributes = "warn" +invalid_html_tags = "warn" +invalid_rust_codeblocks = "warn" +missing_crate_level_docs = "warn" +private_intra_doc_links = "warn" +redundant_explicit_links = "warn" +unescaped_backticks = "warn" diff --git a/examples/sample-kmdf-driver/Makefile.toml b/examples/sample-kmdf-driver/Makefile.toml new file mode 100644 index 00000000..be118bb4 --- /dev/null +++ b/examples/sample-kmdf-driver/Makefile.toml @@ -0,0 +1,4 @@ +extend = [ + { path = "../../crates/wdk-build/rust-driver-makefile.toml" }, + { path = "../../crates/wdk-build/rust-driver-sample-makefile.toml" }, +] diff --git a/crates/sample-kmdf-driver/README.md b/examples/sample-kmdf-driver/README.md similarity index 100% rename from crates/sample-kmdf-driver/README.md rename to examples/sample-kmdf-driver/README.md diff --git a/examples/sample-kmdf-driver/build.rs b/examples/sample-kmdf-driver/build.rs new file mode 100644 index 00000000..56cd4398 --- /dev/null +++ b/examples/sample-kmdf-driver/build.rs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! Build script for the `sample-kmdf-driver` crate. +//! +//! Based on the [`wdk_build::Config`] parsed from the build tree, this build +//! script will provide `Cargo` with the necessary information to build the +//! driver binary (ex. linker flags) + +fn main() -> Result<(), wdk_build::ConfigError> { + wdk_build::configure_wdk_binary_build() +} diff --git a/crates/sample-kmdf-driver/sample_kmdf_driver.inx b/examples/sample-kmdf-driver/sample_kmdf_driver.inx similarity index 98% rename from crates/sample-kmdf-driver/sample_kmdf_driver.inx rename to examples/sample-kmdf-driver/sample_kmdf_driver.inx index a807154a..7103c311 100644 Binary files a/crates/sample-kmdf-driver/sample_kmdf_driver.inx and b/examples/sample-kmdf-driver/sample_kmdf_driver.inx differ diff --git a/crates/sample-kmdf-driver/src/lib.rs b/examples/sample-kmdf-driver/src/lib.rs similarity index 87% rename from crates/sample-kmdf-driver/src/lib.rs rename to examples/sample-kmdf-driver/src/lib.rs index 9bf39dc0..665c6974 100644 --- a/crates/sample-kmdf-driver/src/lib.rs +++ b/examples/sample-kmdf-driver/src/lib.rs @@ -15,12 +15,11 @@ extern crate wdk_panic; use alloc::{ffi::CString, slice, string::String}; -use static_assertions::const_assert; use wdk::println; #[cfg(not(test))] -use wdk_alloc::WDKAllocator; -use wdk_macros::call_unsafe_wdf_function_binding; +use wdk_alloc::WdkAllocator; use wdk_sys::{ + call_unsafe_wdf_function_binding, ntddk::DbgPrint, DRIVER_OBJECT, NTSTATUS, @@ -38,7 +37,7 @@ use wdk_sys::{ #[cfg(not(test))] #[global_allocator] -static GLOBAL_ALLOCATOR: WDKAllocator = WDKAllocator; +static GLOBAL_ALLOCATOR: WdkAllocator = WdkAllocator; /// `DriverEntry` function required by WDF /// @@ -64,13 +63,17 @@ pub unsafe extern "system" fn driver_entry( driver.DriverUnload = Some(driver_exit); let mut driver_config = { - // const_assert required since clippy::cast_possible_truncation must be silenced because of a false positive (since it currently doesn't handle checking compile-time constants): https://github.com/rust-lang/rust-clippy/issues/9613 - const WDF_DRIVER_CONFIG_SIZE: usize = core::mem::size_of::(); - const_assert!(WDF_DRIVER_CONFIG_SIZE <= ULONG::MAX as usize); let wdf_driver_config_size: ULONG; - // truncation not possible because of above const_assert + + // clippy::cast_possible_truncation cannot currently check compile-time constants: https://github.com/rust-lang/rust-clippy/issues/9613 #[allow(clippy::cast_possible_truncation)] { + const WDF_DRIVER_CONFIG_SIZE: usize = core::mem::size_of::(); + + // Manually assert there is not truncation since clippy doesn't work for + // compile-time constants + const { assert!(WDF_DRIVER_CONFIG_SIZE <= ULONG::MAX as usize) } + wdf_driver_config_size = WDF_DRIVER_CONFIG_SIZE as ULONG; } @@ -82,7 +85,7 @@ pub unsafe extern "system" fn driver_entry( }; let driver_attributes = WDF_NO_OBJECT_ATTRIBUTES; - let driver_handle_output = WDF_NO_HANDLE.cast::<*mut wdk_sys::WDFDRIVER__>(); + let driver_handle_output = WDF_NO_HANDLE.cast::(); let wdf_driver_create_ntstatus; // SAFETY: This is safe because: @@ -94,7 +97,7 @@ pub unsafe extern "system" fn driver_entry( unsafe { wdf_driver_create_ntstatus = call_unsafe_wdf_function_binding!( WdfDriverCreate, - driver as wdk_sys::PDRIVER_OBJECT, + driver as PDRIVER_OBJECT, registry_path, driver_attributes, &mut driver_config, @@ -162,7 +165,7 @@ extern "C" fn evt_driver_device_add( // null // 3. `device_handle_output` is expected to be null unsafe { - ntstatus = wdk_macros::call_unsafe_wdf_function_binding!( + ntstatus = call_unsafe_wdf_function_binding!( WdfDeviceCreate, &mut device_init, WDF_NO_OBJECT_ATTRIBUTES, diff --git a/examples/sample-umdf-driver/Cargo.lock b/examples/sample-umdf-driver/Cargo.lock new file mode 100644 index 00000000..70b7f029 --- /dev/null +++ b/examples/sample-umdf-driver/Cargo.lock @@ -0,0 +1,925 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", + "which", +] + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "camino" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap-cargo" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e2fd20c8f8c7cc395f69a86a61eb9d93e1de8fadc00338508cde2ffc656388" +dependencies = [ + "anstyle", + "clap", +] + +[[package]] +name = "clap_builder" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libloading" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "sample-umdf-driver" +version = "0.1.0" +dependencies = [ + "wdk", + "wdk-build", + "wdk-sys", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.120" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "2.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "wdk" +version = "0.2.0" +dependencies = [ + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-sys", +] + +[[package]] +name = "wdk-build" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "camino", + "cargo_metadata", + "clap", + "clap-cargo", + "lazy_static", + "paste", + "rustversion", + "serde", + "serde_json", + "thiserror", + "tracing", + "windows", +] + +[[package]] +name = "wdk-macros" +version = "0.2.0" +dependencies = [ + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "wdk-sys" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "cargo_metadata", + "cc", + "lazy_static", + "rustversion", + "serde_json", + "thiserror", + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-macros", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core", + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/examples/sample-umdf-driver/Cargo.toml b/examples/sample-umdf-driver/Cargo.toml new file mode 100644 index 00000000..a1d456d4 --- /dev/null +++ b/examples/sample-umdf-driver/Cargo.toml @@ -0,0 +1,64 @@ +[package] +edition = "2021" +name = "sample-umdf-driver" +version = "0.1.0" +description = "A sample UMDF driver that demonstrates UMDF in RUST" +repository = "https://github.com/microsoft/windows-drivers-rs" +readme = "README.md" +license = "MIT OR Apache-2.0" +keywords = ["windows", "driver", "sample", "example", "wdf"] +categories = ["hardware-support"] +publish = false + +[package.metadata.wdk.driver-model] +driver-type = "UMDF" +umdf-version-major = 2 +target-umdf-version-minor = 31 + +[lib] +crate-type = ["cdylib"] +# Tests from root driver crates must be excluded since there's no way to prevent linker args from being passed to their unit tests: https://github.com/rust-lang/cargo/issues/12663 +test = false + +[build-dependencies] +wdk-build = { path = "../../crates/wdk-build", version = "0.2.0" } + +[dependencies] +wdk = { path = "../../crates/wdk", version = "0.2.0" } +wdk-sys = { path = "../../crates/wdk-sys", version = "0.2.0" } + +[features] +default = [] +nightly = ["wdk/nightly", "wdk-sys/nightly"] + +[profile.dev] +lto = true + +[profile.release] +lto = true + +[lints.rust] +missing_docs = "warn" +unsafe_op_in_unsafe_fn = "forbid" + +[lints.clippy] +# Lint Groups +all = { level = "deny", priority = -1 } +pedantic = { level = "warn", priority = -1 } +nursery = { level = "warn", priority = -1 } +cargo = { level = "warn", priority = -1 } +# Individual Lints +multiple_unsafe_ops_per_block = "forbid" +undocumented_unsafe_blocks = "forbid" +unnecessary_safety_doc = "forbid" + +[lints.rustdoc] +bare_urls = "warn" +broken_intra_doc_links = "warn" +invalid_codeblock_attributes = "warn" +invalid_html_tags = "warn" +invalid_rust_codeblocks = "warn" +missing_crate_level_docs = "warn" +private_intra_doc_links = "warn" +redundant_explicit_links = "warn" +unescaped_backticks = "warn" diff --git a/examples/sample-umdf-driver/Makefile.toml b/examples/sample-umdf-driver/Makefile.toml new file mode 100644 index 00000000..be118bb4 --- /dev/null +++ b/examples/sample-umdf-driver/Makefile.toml @@ -0,0 +1,4 @@ +extend = [ + { path = "../../crates/wdk-build/rust-driver-makefile.toml" }, + { path = "../../crates/wdk-build/rust-driver-sample-makefile.toml" }, +] diff --git a/examples/sample-umdf-driver/README.md b/examples/sample-umdf-driver/README.md new file mode 100644 index 00000000..a0fa1a98 --- /dev/null +++ b/examples/sample-umdf-driver/README.md @@ -0,0 +1,43 @@ +# Sample UMDF Rust Driver + +## Pre-requisites + +* WDK environment (either via eWDK or installed WDK) +* LLVM + +## Build + +* Run `cargo make` in this directory + +## Install + +1. Copy the following to the DUT (Device Under Test: the computer you want to test the driver on): + 1. The driver `package` folder located in the [Cargo Output Directory](https://doc.rust-lang.org/cargo/guide/build-cache.html). The Cargo Output Directory changes based off of build profile, target architecture, etc. + * Ex. `\target\x86_64-pc-windows-msvc\debug\package`, `\target\x86_64-pc-windows-msvc\release\package`, `\target\aarch64-pc-windows-msvc\debug\package`, `\target\aarch64-pc-windows-msvc\release\package`, + `\target\debug\package`, + `\target\release\package` + 2. The version of `devgen.exe` from the WDK Developer Tools that matches the archtecture of your DUT + * Ex. `C:\Program Files\Windows Kits\10\Tools\10.0.22621.0\x64\devgen.exe`. Note: This path will vary based off your WDK environment +2. Install the Certificate on the DUT: + 1. Double click the certificate + 2. Click Install Certificate + 3. Store Location: Local Machine -> Next + 4. Place all certificates in the following Store -> Browse -> Trusted Root Certification Authorities -> Ok -> Next + 5. Repeat 2-4 for Store -> Browse -> Trusted Publishers -> Ok -> Next + 6. Finish +3. Install the driver: + * In the package directory, run: `pnputil.exe /add-driver sample_umdf_driver.inf /install` +4. Create a software device: + * In the directory that `devgen.exe` was copied to, run: `devgen.exe /add /hardwareid "root\SAMPLE_UMDF_HW_ID"` + +## Test + +* To capture prints: + * Start [DebugView](https://learn.microsoft.com/en-us/sysinternals/downloads/debugview) + 1. Enable `Capture Global Win32` + 2. Enable `Capture Events` + * Alternatively, you can see prints in an active Windbg session. + * User Mode Debugging: + * Attach WinDBG to WUDFHost Process the driver + * Kernel Mode Debugging: + * `ed nt!Kd_DEFAULT_Mask 0xFFFFFFFF` diff --git a/examples/sample-umdf-driver/build.rs b/examples/sample-umdf-driver/build.rs new file mode 100644 index 00000000..a434b873 --- /dev/null +++ b/examples/sample-umdf-driver/build.rs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! Build script for the `sample-umdf-driver` crate. +//! +//! Based on the [`wdk_build::Config`] parsed from the build tree, this build +//! script will provide `Cargo` with the necessary information to build the +//! driver binary (ex. linker flags) + +fn main() -> Result<(), wdk_build::ConfigError> { + wdk_build::configure_wdk_binary_build() +} diff --git a/examples/sample-umdf-driver/sample_umdf_driver.inx b/examples/sample-umdf-driver/sample_umdf_driver.inx new file mode 100644 index 00000000..e82d7d2d Binary files /dev/null and b/examples/sample-umdf-driver/sample_umdf_driver.inx differ diff --git a/examples/sample-umdf-driver/src/lib.rs b/examples/sample-umdf-driver/src/lib.rs new file mode 100644 index 00000000..70010e80 --- /dev/null +++ b/examples/sample-umdf-driver/src/lib.rs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! # Sample UMDF Driver +//! +//! This is a sample UMDF driver that demonstrates how to use the crates in +//! windows-driver-rs to create a skeleton of a UMDF driver. + +use std::{ffi::CString, slice, string::String}; + +use wdk::println; +use wdk_sys::{ + call_unsafe_wdf_function_binding, + windows::OutputDebugStringA, + NTSTATUS, + PCUNICODE_STRING, + PDRIVER_OBJECT, + ULONG, + UNICODE_STRING, + WCHAR, + WDFDEVICE, + WDFDEVICE_INIT, + WDFDRIVER, + WDF_DRIVER_CONFIG, + WDF_NO_HANDLE, + WDF_NO_OBJECT_ATTRIBUTES, +}; + +/// `DriverEntry` function required by WDF +/// +/// # Panics +/// Can panic from unwraps of `CStrings` used internally +/// +/// # Safety +/// Function is unsafe since it dereferences raw pointers passed to it from WDF +#[export_name = "DriverEntry"] // WDF expects a symbol with the name DriverEntry +pub unsafe extern "system" fn driver_entry( + driver: PDRIVER_OBJECT, + registry_path: PCUNICODE_STRING, +) -> NTSTATUS { + // This is an example of directly using OutputDebugStringA binding to print + let string = CString::new("Hello World!\n").unwrap(); + + // SAFETY: This is safe because `string` is a valid pointer to a null-terminated + // string + unsafe { + OutputDebugStringA(string.as_ptr()); + } + + let mut driver_config = { + let wdf_driver_config_size: ULONG; + + // clippy::cast_possible_truncation cannot currently check compile-time constants: https://github.com/rust-lang/rust-clippy/issues/9613 + #[allow(clippy::cast_possible_truncation)] + { + const WDF_DRIVER_CONFIG_SIZE: usize = core::mem::size_of::(); + + // Manually assert there is not truncation since clippy doesn't work for + // compile-time constants + const { assert!(WDF_DRIVER_CONFIG_SIZE <= ULONG::MAX as usize) } + + wdf_driver_config_size = WDF_DRIVER_CONFIG_SIZE as ULONG; + } + + WDF_DRIVER_CONFIG { + Size: wdf_driver_config_size, + EvtDriverDeviceAdd: Some(evt_driver_device_add), + EvtDriverUnload: Some(evt_driver_unload), + ..WDF_DRIVER_CONFIG::default() + } + }; + + let driver_attributes = WDF_NO_OBJECT_ATTRIBUTES; + let driver_handle_output = WDF_NO_HANDLE.cast::(); + + let wdf_driver_create_ntstatus; + // SAFETY: This is safe because: + // 1. `driver` is provided by `DriverEntry` and is never null + // 2. `registry_path` is provided by `DriverEntry` and is never null + // 3. `driver_attributes` is allowed to be null + // 4. `driver_config` is a valid pointer to a valid `WDF_DRIVER_CONFIG` + // 5. `driver_handle_output` is expected to be null + unsafe { + wdf_driver_create_ntstatus = call_unsafe_wdf_function_binding!( + WdfDriverCreate, + driver, + registry_path, + driver_attributes, + &mut driver_config, + driver_handle_output, + ); + } + + // Translate UTF16 string to rust string + let registry_path: UNICODE_STRING = + // SAFETY: This dereference is safe since `registry_path` is: + // * provided by `DriverEntry` and is never null + // * a valid pointer to a `UNICODE_STRING` + unsafe { *registry_path }; + let number_of_slice_elements = { + registry_path.Length as usize + / core::mem::size_of_val( + // SAFETY: This dereference is safe since `Buffer` is: + // * provided by `DriverEntry` and is never null + // * a valid pointer to `Buffer`'s type + &unsafe { *registry_path.Buffer }, + ) + }; + + let registry_path = String::from_utf16_lossy( + // SAFETY: This is safe because: + // 1. `registry_path.Buffer` is valid for reads for `number_of_slice_elements` * + // `core::mem::size_of::()` bytes, and is guaranteed to be aligned and it + // must be properly aligned. + // 2. `registry_path.Buffer` points to `number_of_slice_elements` consecutive + // properly initialized values of type `WCHAR`. + // 3. Windows does not mutate the memory referenced by the returned slice for for + // its entire lifetime. + // 4. The total size, `number_of_slice_elements` * `core::mem::size_of::()`, + // of the slice must be no larger than `isize::MAX`. This is proven by the below + // `debug_assert!`. + unsafe { + debug_assert!( + isize::try_from(number_of_slice_elements * core::mem::size_of::()).is_ok() + ); + slice::from_raw_parts(registry_path.Buffer, number_of_slice_elements) + }, + ); + + // It is much better to use the println macro that has an implementation in + // wdk::print.rs to call OutputDebugStringA. The println! implementation in + // wdk::print.rs has the same features as the one in std (ex. format args + // support). + println!("UMDF Driver Entry Complete! Driver Registry Parameter Key: {registry_path}"); + + wdf_driver_create_ntstatus +} + +extern "C" fn evt_driver_device_add( + _driver: WDFDRIVER, + mut device_init: *mut WDFDEVICE_INIT, +) -> NTSTATUS { + println!("EvtDriverDeviceAdd Entered!"); + + let mut device_handle_output: WDFDEVICE = WDF_NO_HANDLE.cast(); + + let ntstatus; + // SAFETY: This is safe because: + // 1. `device_init` is provided by `EvtDriverDeviceAdd` and is never null + // 2. the argument receiving `WDF_NO_OBJECT_ATTRIBUTES` is allowed to be + // null + // 3. `device_handle_output` is expected to be null + unsafe { + ntstatus = call_unsafe_wdf_function_binding!( + WdfDeviceCreate, + &mut device_init, + WDF_NO_OBJECT_ATTRIBUTES, + &mut device_handle_output, + ); + } + + println!("WdfDeviceCreate NTSTATUS: {ntstatus:#02x}"); + ntstatus +} + +extern "C" fn evt_driver_unload(_driver: WDFDRIVER) { + println!("Goodbye World!"); + println!("Driver Exit Complete!"); +} diff --git a/examples/sample-wdm-driver/Cargo.lock b/examples/sample-wdm-driver/Cargo.lock new file mode 100644 index 00000000..1725178b --- /dev/null +++ b/examples/sample-wdm-driver/Cargo.lock @@ -0,0 +1,941 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", + "which", +] + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "camino" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap-cargo" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e2fd20c8f8c7cc395f69a86a61eb9d93e1de8fadc00338508cde2ffc656388" +dependencies = [ + "anstyle", + "clap", +] + +[[package]] +name = "clap_builder" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libloading" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "sample-wdm-driver" +version = "0.0.0" +dependencies = [ + "wdk", + "wdk-alloc", + "wdk-build", + "wdk-panic", + "wdk-sys", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.120" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "2.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "wdk" +version = "0.2.0" +dependencies = [ + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-sys", +] + +[[package]] +name = "wdk-alloc" +version = "0.2.0" +dependencies = [ + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-sys", +] + +[[package]] +name = "wdk-build" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "camino", + "cargo_metadata", + "clap", + "clap-cargo", + "lazy_static", + "paste", + "rustversion", + "serde", + "serde_json", + "thiserror", + "tracing", + "windows", +] + +[[package]] +name = "wdk-macros" +version = "0.2.0" +dependencies = [ + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "wdk-panic" +version = "0.2.0" + +[[package]] +name = "wdk-sys" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "cargo_metadata", + "cc", + "lazy_static", + "rustversion", + "serde_json", + "thiserror", + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-macros", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core", + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/examples/sample-wdm-driver/Cargo.toml b/examples/sample-wdm-driver/Cargo.toml new file mode 100644 index 00000000..68474e7f --- /dev/null +++ b/examples/sample-wdm-driver/Cargo.toml @@ -0,0 +1,67 @@ +[package] +edition = "2021" +name = "sample-wdm-driver" +version = "0.0.0" +description = "A sample WDM driver that demonstrates WDM in RUST" +repository = "https://github.com/microsoft/windows-drivers-rs" +readme = "README.md" +license = "MIT OR Apache-2.0" +keywords = ["windows", "driver", "sample", "example", "wdm"] +categories = ["hardware-support"] +publish = false + +[package.metadata.wdk.driver-model] +driver-type = "WDM" + +[lib] +crate-type = ["cdylib"] +# Tests from root driver crates must be excluded since there's no way to prevent linker args from being passed to their unit tests: https://github.com/rust-lang/cargo/issues/12663 +test = false + +[build-dependencies] +wdk-build = { path = "../../crates/wdk-build", version = "0.2.0" } + +[dependencies] +wdk-alloc = { path = "../../crates/wdk-alloc", version = "0.2.0" } +wdk = { path = "../../crates/wdk", version = "0.2.0" } +wdk-panic = { path = "../../crates/wdk-panic", version = "0.2.0" } +wdk-sys = { path = "../../crates/wdk-sys", version = "0.2.0" } + + +[features] +default = [] +nightly = ["wdk/nightly", "wdk-sys/nightly"] + +[profile.dev] +panic = "abort" +lto = true + +[profile.release] +panic = "abort" +lto = true + +[lints.rust] +missing_docs = "warn" +unsafe_op_in_unsafe_fn = "forbid" + +[lints.clippy] +# Lint Groups +all = { level = "deny", priority = -1 } +pedantic = { level = "warn", priority = -1 } +nursery = { level = "warn", priority = -1 } +cargo = { level = "warn", priority = -1 } +# Individual Lints +multiple_unsafe_ops_per_block = "forbid" +undocumented_unsafe_blocks = "forbid" +unnecessary_safety_doc = "forbid" + +[lints.rustdoc] +bare_urls = "warn" +broken_intra_doc_links = "warn" +invalid_codeblock_attributes = "warn" +invalid_html_tags = "warn" +invalid_rust_codeblocks = "warn" +missing_crate_level_docs = "warn" +private_intra_doc_links = "warn" +redundant_explicit_links = "warn" +unescaped_backticks = "warn" diff --git a/examples/sample-wdm-driver/Makefile.toml b/examples/sample-wdm-driver/Makefile.toml new file mode 100644 index 00000000..be118bb4 --- /dev/null +++ b/examples/sample-wdm-driver/Makefile.toml @@ -0,0 +1,4 @@ +extend = [ + { path = "../../crates/wdk-build/rust-driver-makefile.toml" }, + { path = "../../crates/wdk-build/rust-driver-sample-makefile.toml" }, +] diff --git a/examples/sample-wdm-driver/README.md b/examples/sample-wdm-driver/README.md new file mode 100644 index 00000000..807fd163 --- /dev/null +++ b/examples/sample-wdm-driver/README.md @@ -0,0 +1,41 @@ +# Sample WDM Rust Driver + +## Pre-requisites + +* WDK environment (either via eWDK or installed WDK) +* LLVM + +## Build + +* Run `cargo make` in this directory + +## Install + +1. Copy the following to the DUT (Device Under Test: the computer you want to test the driver on): + 1. [`.\target\x86_64-pc-windows-msvc\debug\sample_wdm_driver.sys`](.\target\x86_64-pc-windows-msvc\debug\sample_wdm_driver.sys) + 2. [`.\DriverCertificate.cer`](.\DriverCertificate.cer) +2. Install the Certificate on the DUT: + 1. Double click the certificate + 2. Click Install Certificate + 3. Select a Store Location __(Either Store Location is Fine)__ -> Next + 4. Place all certificates in the following Store -> Browse -> Trusted Root Certification Authorities -> Ok -> Next + 5. Finish +3. Install the driver: + * In the package directory, run: `sc.exe create sample-wdm-rust-driver binPath=sample_wdm_driver.sys type= kernel` + +## Test + +1. To capture prints: + * Start [DebugView](https://learn.microsoft.com/en-us/sysinternals/downloads/debugview) + 1. Enable `Capture Kernel` + 2. Enable `Enable Verbose Kernel Output` + * Alternatively, you can see prints in an active Windbg session. + 1. Attach WinDBG + 2. `ed nt!Kd_DEFAULT_Mask 0xFFFFFFFF` + +2. Load and Start Driver: + * `sc.exe start sample-wdm-rust-driver` + +3. Post-testing cleanup: + * Stop Driver: `sc.exe stop sample-wdm-rust-driver` + * Delete Driver: `sc.exe delete sample-wdm-rust-driver` diff --git a/examples/sample-wdm-driver/build.rs b/examples/sample-wdm-driver/build.rs new file mode 100644 index 00000000..fc3e81d0 --- /dev/null +++ b/examples/sample-wdm-driver/build.rs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! Build script for the `sample-wdm-driver` crate. +//! +//! Based on the [`wdk_build::Config`] parsed from the build tree, this build +//! script will provide `Cargo` with the necessary information to build the +//! driver binary (ex. linker flags) + +fn main() -> Result<(), wdk_build::ConfigError> { + wdk_build::configure_wdk_binary_build() +} diff --git a/examples/sample-wdm-driver/sample_wdm_driver.inx b/examples/sample-wdm-driver/sample_wdm_driver.inx new file mode 100644 index 00000000..75fa79de Binary files /dev/null and b/examples/sample-wdm-driver/sample_wdm_driver.inx differ diff --git a/examples/sample-wdm-driver/src/lib.rs b/examples/sample-wdm-driver/src/lib.rs new file mode 100644 index 00000000..0066f69e --- /dev/null +++ b/examples/sample-wdm-driver/src/lib.rs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! # Sample WDM Driver +//! +//! This is a sample WDM driver that demonstrates how to use the crates in +//! windows-driver-rs to create a skeleton of a WDM driver. + +#![no_std] +extern crate alloc; + +#[cfg(not(test))] +extern crate wdk_panic; + +use alloc::{ffi::CString, slice, string::String}; + +use wdk::println; +#[cfg(not(test))] +use wdk_alloc::WdkAllocator; +use wdk_sys::{ntddk::DbgPrint, DRIVER_OBJECT, NTSTATUS, PCUNICODE_STRING, STATUS_SUCCESS}; + +#[cfg(not(test))] +#[global_allocator] +static GLOBAL_ALLOCATOR: WdkAllocator = WdkAllocator; + +/// `driver_entry` function required by WDM +/// +/// # Panics +/// Can panic from unwraps of `CStrings` used internally +/// +/// # Safety +/// Function is unsafe since it dereferences raw pointers passed to it from WDM +#[export_name = "DriverEntry"] +pub unsafe extern "system" fn driver_entry( + driver: &mut DRIVER_OBJECT, + registry_path: PCUNICODE_STRING, +) -> NTSTATUS { + // This is an example of directly using DbgPrint binding to print + let string = CString::new("Hello World!\n").unwrap(); + unsafe { + DbgPrint(string.as_ptr()); + } + + driver.DriverUnload = Some(driver_exit); + + // Translate UTF16 string to rust string + let registry_path = String::from_utf16_lossy(unsafe { + slice::from_raw_parts( + (*registry_path).Buffer, + (*registry_path).Length as usize / core::mem::size_of_val(&(*(*registry_path).Buffer)), + ) + }); + + // It is much better to use the println macro that has an implementation in + // wdk::print.rs to call DbgPrint. The println! implementation in + // wdk::print.rs has the same features as the one in std (ex. format args + // support). + println!("WDM Driver Entry Complete! Driver Registry Parameter Key: {registry_path}"); + + STATUS_SUCCESS +} + +extern "C" fn driver_exit(_driver: *mut DRIVER_OBJECT) { + println!("Goodbye World!"); + println!("Driver Exit Complete!"); +} diff --git a/tests/Makefile.toml b/tests/Makefile.toml new file mode 100644 index 00000000..2d397273 --- /dev/null +++ b/tests/Makefile.toml @@ -0,0 +1,12 @@ +extend = "../crates/wdk-build/rust-driver-makefile.toml" + +[env] +CARGO_MAKE_WORKSPACE_EMULATION = true +CARGO_MAKE_CRATE_WORKSPACE_MEMBERS = [ + "config-kmdf", + "config-umdf", + "config-wdm", + "mixed-package-kmdf-workspace", + "umdf-driver-workspace", + "wdk-macros-tests", +] diff --git a/tests/config-kmdf/Cargo.lock b/tests/config-kmdf/Cargo.lock new file mode 100644 index 00000000..84a67542 --- /dev/null +++ b/tests/config-kmdf/Cargo.lock @@ -0,0 +1,1087 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "basic-toml" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" +dependencies = [ + "serde", +] + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", + "which", +] + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "camino" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clang-sys" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap-cargo" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e2fd20c8f8c7cc395f69a86a61eb9d93e1de8fadc00338508cde2ffc656388" +dependencies = [ + "anstyle", + "clap", +] + +[[package]] +name = "clap_builder" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "config-kmdf" +version = "0.1.0" +dependencies = [ + "wdk-macros-tests", + "wdk-sys", +] + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "either" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "fs4" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7e180ac76c23b45e767bd7ae9579bc0bb458618c4bc71835926e098e61d15f8" +dependencies = [ + "rustix", + "windows-sys", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" + +[[package]] +name = "libloading" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "macrotest" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2035deb453578ff1cd2da2761ac78abbffffd1d06a0f59261c082ea713fdad" +dependencies = [ + "basic-toml", + "diff", + "glob", + "prettyplease", + "serde", + "serde_derive", + "serde_json", + "syn", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "owo-colors" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "prettyplease" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ac2cf0f2e4f42b49f5ffd07dae8d746508ef7526c13940e5f524012ae6c6550" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.200" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.200" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.116" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "2.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "toml" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "trybuild" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b1e5645f2ee8025c2f1d75e1138f2dd034d74e6ba54620f3c569ba2a2a1ea06" +dependencies = [ + "glob", + "serde", + "serde_derive", + "serde_json", + "termcolor", + "toml", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "wdk-build" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "camino", + "cargo_metadata", + "clap", + "clap-cargo", + "lazy_static", + "paste", + "rustversion", + "serde", + "serde_json", + "thiserror", + "tracing", + "windows", +] + +[[package]] +name = "wdk-macros" +version = "0.2.0" +dependencies = [ + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "wdk-macros-tests" +version = "0.1.0" +dependencies = [ + "fs4", + "lazy_static", + "macrotest", + "owo-colors", + "paste", + "pathdiff", + "rustversion", + "trybuild", +] + +[[package]] +name = "wdk-sys" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "cargo_metadata", + "cc", + "lazy_static", + "rustversion", + "serde_json", + "thiserror", + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-macros", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core", + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +dependencies = [ + "memchr", +] diff --git a/tests/config-kmdf/Cargo.toml b/tests/config-kmdf/Cargo.toml new file mode 100644 index 00000000..141c1843 --- /dev/null +++ b/tests/config-kmdf/Cargo.toml @@ -0,0 +1,21 @@ +[package] +edition = "2021" +name = "config-kmdf" +version = "0.1.0" +description = "An empty package that sets the `package.metadata` required for wdk-build to generate KMDF bindings for Rust" +license = "MIT OR Apache-2.0" +publish = false + +[package.metadata.wdk.driver-model] +driver-type = "KMDF" +kmdf-version-major = 1 +target-kmdf-version-minor = 33 + +[lib] + +[dev-dependencies] +wdk-macros-tests.path = "../wdk-macros-tests" +wdk-sys.path = "../../crates/wdk-sys" + +[features] +nightly = ["wdk-sys/nightly"] diff --git a/tests/config-kmdf/src/lib.rs b/tests/config-kmdf/src/lib.rs new file mode 100644 index 00000000..30594960 --- /dev/null +++ b/tests/config-kmdf/src/lib.rs @@ -0,0 +1,2 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 diff --git a/tests/config-kmdf/tests/call_unsafe_wdf_function_binding_tests.rs b/tests/config-kmdf/tests/call_unsafe_wdf_function_binding_tests.rs new file mode 100644 index 00000000..399b77a2 --- /dev/null +++ b/tests/config-kmdf/tests/call_unsafe_wdf_function_binding_tests.rs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +#[cfg(test)] +mod tests { + wdk_macros_tests::generate_call_unsafe_wdf_binding_tests!(); +} diff --git a/tests/config-umdf/Cargo.lock b/tests/config-umdf/Cargo.lock new file mode 100644 index 00000000..1d95d5e1 --- /dev/null +++ b/tests/config-umdf/Cargo.lock @@ -0,0 +1,1087 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "basic-toml" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" +dependencies = [ + "serde", +] + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", + "which", +] + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "camino" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clang-sys" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap-cargo" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e2fd20c8f8c7cc395f69a86a61eb9d93e1de8fadc00338508cde2ffc656388" +dependencies = [ + "anstyle", + "clap", +] + +[[package]] +name = "clap_builder" +version = "4.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "config-umdf" +version = "0.1.0" +dependencies = [ + "wdk-macros-tests", + "wdk-sys", +] + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "either" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "fs4" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7e180ac76c23b45e767bd7ae9579bc0bb458618c4bc71835926e098e61d15f8" +dependencies = [ + "rustix", + "windows-sys", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" + +[[package]] +name = "libloading" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "macrotest" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2035deb453578ff1cd2da2761ac78abbffffd1d06a0f59261c082ea713fdad" +dependencies = [ + "basic-toml", + "diff", + "glob", + "prettyplease", + "serde", + "serde_derive", + "serde_json", + "syn", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "owo-colors" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.200" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.200" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.116" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "2.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "toml" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "trybuild" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b1e5645f2ee8025c2f1d75e1138f2dd034d74e6ba54620f3c569ba2a2a1ea06" +dependencies = [ + "glob", + "serde", + "serde_derive", + "serde_json", + "termcolor", + "toml", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "wdk-build" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "camino", + "cargo_metadata", + "clap", + "clap-cargo", + "lazy_static", + "paste", + "rustversion", + "serde", + "serde_json", + "thiserror", + "tracing", + "windows", +] + +[[package]] +name = "wdk-macros" +version = "0.2.0" +dependencies = [ + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "wdk-macros-tests" +version = "0.1.0" +dependencies = [ + "fs4", + "lazy_static", + "macrotest", + "owo-colors", + "paste", + "pathdiff", + "rustversion", + "trybuild", +] + +[[package]] +name = "wdk-sys" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "cargo_metadata", + "cc", + "lazy_static", + "rustversion", + "serde_json", + "thiserror", + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-macros", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core", + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +dependencies = [ + "memchr", +] diff --git a/tests/config-umdf/Cargo.toml b/tests/config-umdf/Cargo.toml new file mode 100644 index 00000000..e9cbe5e0 --- /dev/null +++ b/tests/config-umdf/Cargo.toml @@ -0,0 +1,21 @@ +[package] +edition = "2021" +name = "config-umdf" +version = "0.1.0" +description = "An empty package that sets the `package.metadata` required for wdk-build to generate UMDF bindings for Rust" +license = "MIT OR Apache-2.0" +publish = false + +[package.metadata.wdk.driver-model] +driver-type = "UMDF" +umdf-version-major = 2 +target-umdf-version-minor = 33 + +[lib] + +[dev-dependencies] +wdk-macros-tests.path = "../wdk-macros-tests" +wdk-sys.path = "../../crates/wdk-sys" + +[features] +nightly = ["wdk-sys/nightly"] diff --git a/tests/config-umdf/src/lib.rs b/tests/config-umdf/src/lib.rs new file mode 100644 index 00000000..30594960 --- /dev/null +++ b/tests/config-umdf/src/lib.rs @@ -0,0 +1,2 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 diff --git a/tests/config-umdf/tests/call_unsafe_wdf_function_binding_tests.rs b/tests/config-umdf/tests/call_unsafe_wdf_function_binding_tests.rs new file mode 100644 index 00000000..399b77a2 --- /dev/null +++ b/tests/config-umdf/tests/call_unsafe_wdf_function_binding_tests.rs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +#[cfg(test)] +mod tests { + wdk_macros_tests::generate_call_unsafe_wdf_binding_tests!(); +} diff --git a/tests/config-wdm/Cargo.lock b/tests/config-wdm/Cargo.lock new file mode 100644 index 00000000..141ae0f5 --- /dev/null +++ b/tests/config-wdm/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "config-wdm" +version = "0.1.0" diff --git a/tests/config-wdm/Cargo.toml b/tests/config-wdm/Cargo.toml new file mode 100644 index 00000000..4c1491d3 --- /dev/null +++ b/tests/config-wdm/Cargo.toml @@ -0,0 +1,12 @@ +[package] +edition = "2021" +name = "config-wdm" +version = "0.1.0" +description = "An empty package that sets the `package.metadata` required for wdk-build to generate WDM bindings for Rust" +license = "MIT OR Apache-2.0" +publish = false + +[package.metadata.wdk.driver-model] +driver-type = "WDM" + +[lib] diff --git a/tests/config-wdm/src/lib.rs b/tests/config-wdm/src/lib.rs new file mode 100644 index 00000000..30594960 --- /dev/null +++ b/tests/config-wdm/src/lib.rs @@ -0,0 +1,2 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 diff --git a/tests/mixed-package-kmdf-workspace/Cargo.lock b/tests/mixed-package-kmdf-workspace/Cargo.lock new file mode 100644 index 00000000..8007d65a --- /dev/null +++ b/tests/mixed-package-kmdf-workspace/Cargo.lock @@ -0,0 +1,946 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" + +[[package]] +name = "anstyle-parse" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", + "which", +] + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "camino" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap-cargo" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2ea69cefa96b848b73ad516ad1d59a195cdf9263087d977f648a818c8b43e" +dependencies = [ + "anstyle", + "clap", +] + +[[package]] +name = "clap_builder" +version = "4.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" + +[[package]] +name = "colorchoice" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" + +[[package]] +name = "driver" +version = "0.0.0" +dependencies = [ + "wdk", + "wdk-alloc", + "wdk-build", + "wdk-panic", + "wdk-sys", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libloading" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "non_driver_crate" +version = "0.0.0" + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.121" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "2.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "wdk" +version = "0.2.0" +dependencies = [ + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-sys", +] + +[[package]] +name = "wdk-alloc" +version = "0.2.0" +dependencies = [ + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-sys", +] + +[[package]] +name = "wdk-build" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "camino", + "cargo_metadata", + "clap", + "clap-cargo", + "lazy_static", + "paste", + "rustversion", + "serde", + "serde_json", + "thiserror", + "tracing", + "windows", +] + +[[package]] +name = "wdk-macros" +version = "0.2.0" +dependencies = [ + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "wdk-panic" +version = "0.2.0" + +[[package]] +name = "wdk-sys" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "cargo_metadata", + "cc", + "lazy_static", + "rustversion", + "serde_json", + "thiserror", + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-macros", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core", + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/tests/mixed-package-kmdf-workspace/Cargo.toml b/tests/mixed-package-kmdf-workspace/Cargo.toml new file mode 100644 index 00000000..f3e4503e --- /dev/null +++ b/tests/mixed-package-kmdf-workspace/Cargo.toml @@ -0,0 +1,25 @@ +[workspace] +members = ["crates/*"] +resolver = "2" + +# This workspace is used as a test for workspace-level WDK metadata configuration in cargo workspace that also contains non-WDK packages +[workspace.metadata.wdk.driver-model] +driver-type = "KMDF" +kmdf-version-major = 1 +target-kmdf-version-minor = 33 + +[workspace.dependencies] +wdk = { path = "../../crates/wdk", version = "0.2.0" } +wdk-alloc = { path = "../../crates/wdk-alloc", version = "0.2.0" } +wdk-build = { path = "../../crates/wdk-build", version = "0.2.0" } +wdk-macros = { path = "../../crates/wdk-macros", version = "0.2.0" } +wdk-panic = { path = "../../crates/wdk-panic", version = "0.2.0" } +wdk-sys = { path = "../../crates/wdk-sys", version = "0.2.0" } + +[profile.dev] +panic = "abort" +lto = true + +[profile.release] +panic = "abort" +lto = true diff --git a/tests/mixed-package-kmdf-workspace/crates/driver/Cargo.toml b/tests/mixed-package-kmdf-workspace/crates/driver/Cargo.toml new file mode 100644 index 00000000..e1642fe2 --- /dev/null +++ b/tests/mixed-package-kmdf-workspace/crates/driver/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "driver" +version = "0.0.0" +edition = "2021" +publish = false + +# This driver package uses the metadata from the workspace, but still needs this tag to signal that its a driver crate that needs packaging +[package.metadata.wdk] + +[lib] +crate-type = ["cdylib"] +# Tests from root driver crates must be excluded since there's no way to prevent linker args from being passed to their unit tests: https://github.com/rust-lang/cargo/issues/12663 +test = false + +[build-dependencies] +wdk-build.workspace = true + +[dependencies] +wdk.workspace = true +wdk-alloc.workspace = true +wdk-panic.workspace = true +wdk-sys.workspace = true diff --git a/tests/mixed-package-kmdf-workspace/crates/driver/build.rs b/tests/mixed-package-kmdf-workspace/crates/driver/build.rs new file mode 100644 index 00000000..56cd4398 --- /dev/null +++ b/tests/mixed-package-kmdf-workspace/crates/driver/build.rs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! Build script for the `sample-kmdf-driver` crate. +//! +//! Based on the [`wdk_build::Config`] parsed from the build tree, this build +//! script will provide `Cargo` with the necessary information to build the +//! driver binary (ex. linker flags) + +fn main() -> Result<(), wdk_build::ConfigError> { + wdk_build::configure_wdk_binary_build() +} diff --git a/tests/mixed-package-kmdf-workspace/crates/driver/driver.inx b/tests/mixed-package-kmdf-workspace/crates/driver/driver.inx new file mode 100644 index 00000000..e8b8b4b4 Binary files /dev/null and b/tests/mixed-package-kmdf-workspace/crates/driver/driver.inx differ diff --git a/tests/mixed-package-kmdf-workspace/crates/driver/src/lib.rs b/tests/mixed-package-kmdf-workspace/crates/driver/src/lib.rs new file mode 100644 index 00000000..c7053e02 --- /dev/null +++ b/tests/mixed-package-kmdf-workspace/crates/driver/src/lib.rs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! # Sample KMDF Driver +//! +//! This is a sample KMDF driver that demonstrates how to use the crates in +//! windows-driver-rs to create a skeleton of a kmdf driver. + +#![no_std] + +extern crate alloc; + +#[cfg(not(test))] +extern crate wdk_panic; + +use alloc::{ffi::CString, slice, string::String}; + +use wdk::println; +#[cfg(not(test))] +use wdk_alloc::WdkAllocator; +use wdk_sys::{ + call_unsafe_wdf_function_binding, + ntddk::DbgPrint, + DRIVER_OBJECT, + NTSTATUS, + PCUNICODE_STRING, + ULONG, + UNICODE_STRING, + WCHAR, + WDFDEVICE, + WDFDEVICE_INIT, + WDFDRIVER, + WDF_DRIVER_CONFIG, + WDF_NO_HANDLE, + WDF_NO_OBJECT_ATTRIBUTES, +}; + +#[cfg(not(test))] +#[global_allocator] +static GLOBAL_ALLOCATOR: WdkAllocator = WdkAllocator; + +/// `DriverEntry` function required by WDF +/// +/// # Panics +/// Can panic from unwraps of `CStrings` used internally +/// +/// # Safety +/// Function is unsafe since it dereferences raw pointers passed to it from WDF +#[export_name = "DriverEntry"] // WDF expects a symbol with the name DriverEntry +pub unsafe extern "system" fn driver_entry( + driver: &mut DRIVER_OBJECT, + registry_path: PCUNICODE_STRING, +) -> NTSTATUS { + // This is an example of directly using DbgPrint binding to print + let string = CString::new("Hello World!\n").unwrap(); + + // SAFETY: This is safe because `string` is a valid pointer to a null-terminated + // string + unsafe { + DbgPrint(string.as_ptr()); + } + + let mut driver_config = { + let wdf_driver_config_size: ULONG; + + // clippy::cast_possible_truncation cannot currently check compile-time constants: https://github.com/rust-lang/rust-clippy/issues/9613 + #[allow(clippy::cast_possible_truncation)] + { + const WDF_DRIVER_CONFIG_SIZE: usize = core::mem::size_of::(); + + // Manually assert there is not truncation since clippy doesn't work for + // compile-time constants + const { assert!(WDF_DRIVER_CONFIG_SIZE <= ULONG::MAX as usize) } + + wdf_driver_config_size = WDF_DRIVER_CONFIG_SIZE as ULONG; + } + + WDF_DRIVER_CONFIG { + Size: wdf_driver_config_size, + EvtDriverDeviceAdd: Some(evt_driver_device_add), + ..WDF_DRIVER_CONFIG::default() + } + }; + + let driver_attributes = WDF_NO_OBJECT_ATTRIBUTES; + let driver_handle_output = WDF_NO_HANDLE.cast::(); + + let wdf_driver_create_ntstatus; + // SAFETY: This is safe because: + // 1. `driver` is provided by `DriverEntry` and is never null + // 2. `registry_path` is provided by `DriverEntry` and is never null + // 3. `driver_attributes` is allowed to be null + // 4. `driver_config` is a valid pointer to a valid `WDF_DRIVER_CONFIG` + // 5. `driver_handle_output` is expected to be null + unsafe { + wdf_driver_create_ntstatus = call_unsafe_wdf_function_binding!( + WdfDriverCreate, + driver as PDRIVER_OBJECT, + registry_path, + driver_attributes, + &mut driver_config, + driver_handle_output, + ); + } + + // Translate UTF16 string to rust string + let registry_path: UNICODE_STRING = + // SAFETY: This dereference is safe since `registry_path` is: + // * provided by `DriverEntry` and is never null + // * a valid pointer to a `UNICODE_STRING` + unsafe { *registry_path }; + let number_of_slice_elements = { + registry_path.Length as usize + / core::mem::size_of_val( + // SAFETY: This dereference is safe since `Buffer` is: + // * provided by `DriverEntry` and is never null + // * a valid pointer to `Buffer`'s type + &unsafe { *registry_path.Buffer }, + ) + }; + + let registry_path = String::from_utf16_lossy( + // SAFETY: This is safe because: + // 1. `registry_path.Buffer` is valid for reads for `number_of_slice_elements` * + // `core::mem::size_of::()` bytes, and is guaranteed to be aligned and it + // must be properly aligned. + // 2. `registry_path.Buffer` points to `number_of_slice_elements` consecutive + // properly initialized values of type `WCHAR`. + // 3. Windows does not mutate the memory referenced by the returned slice for for + // its entire lifetime. + // 4. The total size, `number_of_slice_elements` * `core::mem::size_of::()`, + // of the slice must be no larger than `isize::MAX`. This is proven by the below + // `debug_assert!`. + unsafe { + debug_assert!( + isize::try_from(number_of_slice_elements * core::mem::size_of::()).is_ok() + ); + slice::from_raw_parts(registry_path.Buffer, number_of_slice_elements) + }, + ); + + // It is much better to use the println macro that has an implementation in + // wdk::print.rs to call DbgPrint. The println! implementation in + // wdk::print.rs has the same features as the one in std (ex. format args + // support). + println!("KMDF Driver Entry Complete! Driver Registry Parameter Key: {registry_path}"); + + wdf_driver_create_ntstatus +} + +extern "C" fn evt_driver_device_add( + _driver: WDFDRIVER, + mut device_init: *mut WDFDEVICE_INIT, +) -> NTSTATUS { + println!("EvtDriverDeviceAdd Entered!"); + + let mut device_handle_output: WDFDEVICE = WDF_NO_HANDLE.cast(); + + let ntstatus; + // SAFETY: This is safe because: + // 1. `device_init` is provided by `EvtDriverDeviceAdd` and is never null + // 2. the argument receiving `WDF_NO_OBJECT_ATTRIBUTES` is allowed to be + // null + // 3. `device_handle_output` is expected to be null + unsafe { + ntstatus = call_unsafe_wdf_function_binding!( + WdfDeviceCreate, + &mut device_init, + WDF_NO_OBJECT_ATTRIBUTES, + &mut device_handle_output, + ); + } + + println!("WdfDeviceCreate NTSTATUS: {ntstatus:#02x}"); + ntstatus +} diff --git a/tests/mixed-package-kmdf-workspace/crates/non_driver_crate/Cargo.toml b/tests/mixed-package-kmdf-workspace/crates/non_driver_crate/Cargo.toml new file mode 100644 index 00000000..a154a9f4 --- /dev/null +++ b/tests/mixed-package-kmdf-workspace/crates/non_driver_crate/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "non_driver_crate" +version = "0.0.0" +edition = "2021" +publish = false + +[lib] + +[dependencies] diff --git a/tests/mixed-package-kmdf-workspace/crates/non_driver_crate/src/lib.rs b/tests/mixed-package-kmdf-workspace/crates/non_driver_crate/src/lib.rs new file mode 100644 index 00000000..3e4008f5 --- /dev/null +++ b/tests/mixed-package-kmdf-workspace/crates/non_driver_crate/src/lib.rs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +/// Adds two numbers together +pub fn add(a: i32, b: i32) -> i32 { + a + b +} diff --git a/tests/umdf-driver-workspace/Cargo.lock b/tests/umdf-driver-workspace/Cargo.lock new file mode 100644 index 00000000..238652d1 --- /dev/null +++ b/tests/umdf-driver-workspace/Cargo.lock @@ -0,0 +1,935 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" + +[[package]] +name = "anstyle-parse" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", + "which", +] + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "camino" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap-cargo" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2ea69cefa96b848b73ad516ad1d59a195cdf9263087d977f648a818c8b43e" +dependencies = [ + "anstyle", + "clap", +] + +[[package]] +name = "clap_builder" +version = "4.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" + +[[package]] +name = "colorchoice" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" + +[[package]] +name = "driver_1" +version = "0.0.0" +dependencies = [ + "wdk", + "wdk-build", + "wdk-sys", +] + +[[package]] +name = "driver_2" +version = "0.0.0" +dependencies = [ + "wdk", + "wdk-build", + "wdk-sys", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libloading" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.121" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "2.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "wdk" +version = "0.2.0" +dependencies = [ + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-sys", +] + +[[package]] +name = "wdk-build" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "camino", + "cargo_metadata", + "clap", + "clap-cargo", + "lazy_static", + "paste", + "rustversion", + "serde", + "serde_json", + "thiserror", + "tracing", + "windows", +] + +[[package]] +name = "wdk-macros" +version = "0.2.0" +dependencies = [ + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "wdk-sys" +version = "0.2.0" +dependencies = [ + "anyhow", + "bindgen", + "cargo_metadata", + "cc", + "lazy_static", + "rustversion", + "serde_json", + "thiserror", + "tracing", + "tracing-subscriber", + "wdk-build", + "wdk-macros", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core", + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/tests/umdf-driver-workspace/Cargo.toml b/tests/umdf-driver-workspace/Cargo.toml new file mode 100644 index 00000000..bd9b780d --- /dev/null +++ b/tests/umdf-driver-workspace/Cargo.toml @@ -0,0 +1,23 @@ +[workspace] +members = ["crates/*"] +resolver = "2" + +# This workspace is used as a test for workspace-level WDK metadata configuration +[workspace.metadata.wdk.driver-model] +driver-type = "UMDF" +umdf-version-major = 2 +target-umdf-version-minor = 33 + +[workspace.dependencies] +wdk = { path = "../../crates/wdk", version = "0.2.0" } +wdk-alloc = { path = "../../crates/wdk-alloc", version = "0.2.0" } +wdk-build = { path = "../../crates/wdk-build", version = "0.2.0" } +wdk-macros = { path = "../../crates/wdk-macros", version = "0.2.0" } +wdk-panic = { path = "../../crates/wdk-panic", version = "0.2.0" } +wdk-sys = { path = "../../crates/wdk-sys", version = "0.2.0" } + +[profile.dev] +lto = true + +[profile.release] +lto = true diff --git a/tests/umdf-driver-workspace/crates/driver_1/Cargo.toml b/tests/umdf-driver-workspace/crates/driver_1/Cargo.toml new file mode 100644 index 00000000..ed3cb876 --- /dev/null +++ b/tests/umdf-driver-workspace/crates/driver_1/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "driver_1" +version = "0.0.0" +edition = "2021" +publish = false + +[package.metadata.wdk] + +[lib] +crate-type = ["cdylib"] +# Tests from root driver crates must be excluded since there's no way to prevent linker args from being passed to their unit tests: https://github.com/rust-lang/cargo/issues/12663 +test = false + +[build-dependencies] +wdk-build.workspace = true + +[dependencies] +wdk.workspace = true +wdk-sys.workspace = true diff --git a/tests/umdf-driver-workspace/crates/driver_1/build.rs b/tests/umdf-driver-workspace/crates/driver_1/build.rs new file mode 100644 index 00000000..a434b873 --- /dev/null +++ b/tests/umdf-driver-workspace/crates/driver_1/build.rs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! Build script for the `sample-umdf-driver` crate. +//! +//! Based on the [`wdk_build::Config`] parsed from the build tree, this build +//! script will provide `Cargo` with the necessary information to build the +//! driver binary (ex. linker flags) + +fn main() -> Result<(), wdk_build::ConfigError> { + wdk_build::configure_wdk_binary_build() +} diff --git a/tests/umdf-driver-workspace/crates/driver_1/driver_1.inx b/tests/umdf-driver-workspace/crates/driver_1/driver_1.inx new file mode 100644 index 00000000..35b071db Binary files /dev/null and b/tests/umdf-driver-workspace/crates/driver_1/driver_1.inx differ diff --git a/tests/umdf-driver-workspace/crates/driver_1/src/lib.rs b/tests/umdf-driver-workspace/crates/driver_1/src/lib.rs new file mode 100644 index 00000000..a322d789 --- /dev/null +++ b/tests/umdf-driver-workspace/crates/driver_1/src/lib.rs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! # Sample UMDF Driver +//! +//! This is a sample UMDF driver that demonstrates how to use the crates in +//! windows-driver-rs to create a skeleton of a UMDF driver. + +use std::{ffi::CString, slice, string::String}; + +use wdk::println; +use wdk_sys::{ + call_unsafe_wdf_function_binding, + windows::OutputDebugStringA, + NTSTATUS, + PCUNICODE_STRING, + PDRIVER_OBJECT, + ULONG, + UNICODE_STRING, + WCHAR, + WDFDEVICE, + WDFDEVICE_INIT, + WDFDRIVER, + WDF_DRIVER_CONFIG, + WDF_NO_HANDLE, + WDF_NO_OBJECT_ATTRIBUTES, +}; + +/// `DriverEntry` function required by WDF +/// +/// # Panics +/// Can panic from unwraps of `CStrings` used internally +/// +/// # Safety +/// Function is unsafe since it dereferences raw pointers passed to it from WDF +#[export_name = "DriverEntry"] // WDF expects a symbol with the name DriverEntry +pub unsafe extern "system" fn driver_entry( + driver: PDRIVER_OBJECT, + registry_path: PCUNICODE_STRING, +) -> NTSTATUS { + // This is an example of directly using OutputDebugStringA binding to print + let string = CString::new("Hello World!\n").unwrap(); + + // SAFETY: This is safe because `string` is a valid pointer to a null-terminated + // string + unsafe { + OutputDebugStringA(string.as_ptr()); + } + + let mut driver_config = { + let wdf_driver_config_size: ULONG; + + // clippy::cast_possible_truncation cannot currently check compile-time constants: https://github.com/rust-lang/rust-clippy/issues/9613 + #[allow(clippy::cast_possible_truncation)] + { + const WDF_DRIVER_CONFIG_SIZE: usize = core::mem::size_of::(); + + // Manually assert there is not truncation since clippy doesn't work for + // compile-time constants + const { assert!(WDF_DRIVER_CONFIG_SIZE <= ULONG::MAX as usize) } + + wdf_driver_config_size = WDF_DRIVER_CONFIG_SIZE as ULONG; + } + + WDF_DRIVER_CONFIG { + Size: wdf_driver_config_size, + EvtDriverDeviceAdd: Some(evt_driver_device_add), + EvtDriverUnload: None, + ..WDF_DRIVER_CONFIG::default() + } + }; + + let driver_attributes = WDF_NO_OBJECT_ATTRIBUTES; + let driver_handle_output = WDF_NO_HANDLE.cast::(); + + let wdf_driver_create_ntstatus; + // SAFETY: This is safe because: + // 1. `driver` is provided by `DriverEntry` and is never null + // 2. `registry_path` is provided by `DriverEntry` and is never null + // 3. `driver_attributes` is allowed to be null + // 4. `driver_config` is a valid pointer to a valid `WDF_DRIVER_CONFIG` + // 5. `driver_handle_output` is expected to be null + unsafe { + wdf_driver_create_ntstatus = call_unsafe_wdf_function_binding!( + WdfDriverCreate, + driver, + registry_path, + driver_attributes, + &mut driver_config, + driver_handle_output, + ); + } + + // Translate UTF16 string to rust string + let registry_path: UNICODE_STRING = + // SAFETY: This dereference is safe since `registry_path` is: + // * provided by `DriverEntry` and is never null + // * a valid pointer to a `UNICODE_STRING` + unsafe { *registry_path }; + let number_of_slice_elements = { + registry_path.Length as usize + / core::mem::size_of_val( + // SAFETY: This dereference is safe since `Buffer` is: + // * provided by `DriverEntry` and is never null + // * a valid pointer to `Buffer`'s type + &unsafe { *registry_path.Buffer }, + ) + }; + + let registry_path = String::from_utf16_lossy( + // SAFETY: This is safe because: + // 1. `registry_path.Buffer` is valid for reads for `number_of_slice_elements` * + // `core::mem::size_of::()` bytes, and is guaranteed to be aligned and it + // must be properly aligned. + // 2. `registry_path.Buffer` points to `number_of_slice_elements` consecutive + // properly initialized values of type `WCHAR`. + // 3. Windows does not mutate the memory referenced by the returned slice for for + // its entire lifetime. + // 4. The total size, `number_of_slice_elements` * `core::mem::size_of::()`, + // of the slice must be no larger than `isize::MAX`. This is proven by the below + // `debug_assert!`. + unsafe { + debug_assert!( + isize::try_from(number_of_slice_elements * core::mem::size_of::()).is_ok() + ); + slice::from_raw_parts(registry_path.Buffer, number_of_slice_elements) + }, + ); + + // It is much better to use the println macro that has an implementation in + // wdk::print.rs to call OutputDebugStringA. The println! implementation in + // wdk::print.rs has the same features as the one in std (ex. format args + // support). + println!("UMDF Driver Entry Complete! Driver Registry Parameter Key: {registry_path}"); + + wdf_driver_create_ntstatus +} + +extern "C" fn evt_driver_device_add( + _driver: WDFDRIVER, + mut device_init: *mut WDFDEVICE_INIT, +) -> NTSTATUS { + println!("EvtDriverDeviceAdd Entered!"); + + let mut device_handle_output: WDFDEVICE = WDF_NO_HANDLE.cast(); + + let ntstatus; + // SAFETY: This is safe because: + // 1. `device_init` is provided by `EvtDriverDeviceAdd` and is never null + // 2. the argument receiving `WDF_NO_OBJECT_ATTRIBUTES` is allowed to be + // null + // 3. `device_handle_output` is expected to be null + unsafe { + ntstatus = call_unsafe_wdf_function_binding!( + WdfDeviceCreate, + &mut device_init, + WDF_NO_OBJECT_ATTRIBUTES, + &mut device_handle_output, + ); + } + + println!("WdfDeviceCreate NTSTATUS: {ntstatus:#02x}"); + ntstatus +} diff --git a/tests/umdf-driver-workspace/crates/driver_2/Cargo.toml b/tests/umdf-driver-workspace/crates/driver_2/Cargo.toml new file mode 100644 index 00000000..9c03fc47 --- /dev/null +++ b/tests/umdf-driver-workspace/crates/driver_2/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "driver_2" +version = "0.0.0" +edition = "2021" +publish = false + +[package.metadata.wdk] + +[lib] +crate-type = ["cdylib"] +# Tests from root driver crates must be excluded since there's no way to prevent linker args from being passed to their unit tests: https://github.com/rust-lang/cargo/issues/12663 +test = false + +[build-dependencies] +wdk-build.workspace = true + +[dependencies] +wdk.workspace = true +wdk-sys.workspace = true diff --git a/tests/umdf-driver-workspace/crates/driver_2/build.rs b/tests/umdf-driver-workspace/crates/driver_2/build.rs new file mode 100644 index 00000000..a434b873 --- /dev/null +++ b/tests/umdf-driver-workspace/crates/driver_2/build.rs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! Build script for the `sample-umdf-driver` crate. +//! +//! Based on the [`wdk_build::Config`] parsed from the build tree, this build +//! script will provide `Cargo` with the necessary information to build the +//! driver binary (ex. linker flags) + +fn main() -> Result<(), wdk_build::ConfigError> { + wdk_build::configure_wdk_binary_build() +} diff --git a/tests/umdf-driver-workspace/crates/driver_2/driver_2.inx b/tests/umdf-driver-workspace/crates/driver_2/driver_2.inx new file mode 100644 index 00000000..40e53e31 Binary files /dev/null and b/tests/umdf-driver-workspace/crates/driver_2/driver_2.inx differ diff --git a/tests/umdf-driver-workspace/crates/driver_2/src/lib.rs b/tests/umdf-driver-workspace/crates/driver_2/src/lib.rs new file mode 100644 index 00000000..a322d789 --- /dev/null +++ b/tests/umdf-driver-workspace/crates/driver_2/src/lib.rs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 + +//! # Sample UMDF Driver +//! +//! This is a sample UMDF driver that demonstrates how to use the crates in +//! windows-driver-rs to create a skeleton of a UMDF driver. + +use std::{ffi::CString, slice, string::String}; + +use wdk::println; +use wdk_sys::{ + call_unsafe_wdf_function_binding, + windows::OutputDebugStringA, + NTSTATUS, + PCUNICODE_STRING, + PDRIVER_OBJECT, + ULONG, + UNICODE_STRING, + WCHAR, + WDFDEVICE, + WDFDEVICE_INIT, + WDFDRIVER, + WDF_DRIVER_CONFIG, + WDF_NO_HANDLE, + WDF_NO_OBJECT_ATTRIBUTES, +}; + +/// `DriverEntry` function required by WDF +/// +/// # Panics +/// Can panic from unwraps of `CStrings` used internally +/// +/// # Safety +/// Function is unsafe since it dereferences raw pointers passed to it from WDF +#[export_name = "DriverEntry"] // WDF expects a symbol with the name DriverEntry +pub unsafe extern "system" fn driver_entry( + driver: PDRIVER_OBJECT, + registry_path: PCUNICODE_STRING, +) -> NTSTATUS { + // This is an example of directly using OutputDebugStringA binding to print + let string = CString::new("Hello World!\n").unwrap(); + + // SAFETY: This is safe because `string` is a valid pointer to a null-terminated + // string + unsafe { + OutputDebugStringA(string.as_ptr()); + } + + let mut driver_config = { + let wdf_driver_config_size: ULONG; + + // clippy::cast_possible_truncation cannot currently check compile-time constants: https://github.com/rust-lang/rust-clippy/issues/9613 + #[allow(clippy::cast_possible_truncation)] + { + const WDF_DRIVER_CONFIG_SIZE: usize = core::mem::size_of::(); + + // Manually assert there is not truncation since clippy doesn't work for + // compile-time constants + const { assert!(WDF_DRIVER_CONFIG_SIZE <= ULONG::MAX as usize) } + + wdf_driver_config_size = WDF_DRIVER_CONFIG_SIZE as ULONG; + } + + WDF_DRIVER_CONFIG { + Size: wdf_driver_config_size, + EvtDriverDeviceAdd: Some(evt_driver_device_add), + EvtDriverUnload: None, + ..WDF_DRIVER_CONFIG::default() + } + }; + + let driver_attributes = WDF_NO_OBJECT_ATTRIBUTES; + let driver_handle_output = WDF_NO_HANDLE.cast::(); + + let wdf_driver_create_ntstatus; + // SAFETY: This is safe because: + // 1. `driver` is provided by `DriverEntry` and is never null + // 2. `registry_path` is provided by `DriverEntry` and is never null + // 3. `driver_attributes` is allowed to be null + // 4. `driver_config` is a valid pointer to a valid `WDF_DRIVER_CONFIG` + // 5. `driver_handle_output` is expected to be null + unsafe { + wdf_driver_create_ntstatus = call_unsafe_wdf_function_binding!( + WdfDriverCreate, + driver, + registry_path, + driver_attributes, + &mut driver_config, + driver_handle_output, + ); + } + + // Translate UTF16 string to rust string + let registry_path: UNICODE_STRING = + // SAFETY: This dereference is safe since `registry_path` is: + // * provided by `DriverEntry` and is never null + // * a valid pointer to a `UNICODE_STRING` + unsafe { *registry_path }; + let number_of_slice_elements = { + registry_path.Length as usize + / core::mem::size_of_val( + // SAFETY: This dereference is safe since `Buffer` is: + // * provided by `DriverEntry` and is never null + // * a valid pointer to `Buffer`'s type + &unsafe { *registry_path.Buffer }, + ) + }; + + let registry_path = String::from_utf16_lossy( + // SAFETY: This is safe because: + // 1. `registry_path.Buffer` is valid for reads for `number_of_slice_elements` * + // `core::mem::size_of::()` bytes, and is guaranteed to be aligned and it + // must be properly aligned. + // 2. `registry_path.Buffer` points to `number_of_slice_elements` consecutive + // properly initialized values of type `WCHAR`. + // 3. Windows does not mutate the memory referenced by the returned slice for for + // its entire lifetime. + // 4. The total size, `number_of_slice_elements` * `core::mem::size_of::()`, + // of the slice must be no larger than `isize::MAX`. This is proven by the below + // `debug_assert!`. + unsafe { + debug_assert!( + isize::try_from(number_of_slice_elements * core::mem::size_of::()).is_ok() + ); + slice::from_raw_parts(registry_path.Buffer, number_of_slice_elements) + }, + ); + + // It is much better to use the println macro that has an implementation in + // wdk::print.rs to call OutputDebugStringA. The println! implementation in + // wdk::print.rs has the same features as the one in std (ex. format args + // support). + println!("UMDF Driver Entry Complete! Driver Registry Parameter Key: {registry_path}"); + + wdf_driver_create_ntstatus +} + +extern "C" fn evt_driver_device_add( + _driver: WDFDRIVER, + mut device_init: *mut WDFDEVICE_INIT, +) -> NTSTATUS { + println!("EvtDriverDeviceAdd Entered!"); + + let mut device_handle_output: WDFDEVICE = WDF_NO_HANDLE.cast(); + + let ntstatus; + // SAFETY: This is safe because: + // 1. `device_init` is provided by `EvtDriverDeviceAdd` and is never null + // 2. the argument receiving `WDF_NO_OBJECT_ATTRIBUTES` is allowed to be + // null + // 3. `device_handle_output` is expected to be null + unsafe { + ntstatus = call_unsafe_wdf_function_binding!( + WdfDeviceCreate, + &mut device_init, + WDF_NO_OBJECT_ATTRIBUTES, + &mut device_handle_output, + ); + } + + println!("WdfDeviceCreate NTSTATUS: {ntstatus:#02x}"); + ntstatus +} diff --git a/tests/wdk-macros-tests/Cargo.lock b/tests/wdk-macros-tests/Cargo.lock new file mode 100644 index 00000000..a963b997 --- /dev/null +++ b/tests/wdk-macros-tests/Cargo.lock @@ -0,0 +1,408 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "basic-toml" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "fs4" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7e180ac76c23b45e767bd7ae9579bc0bb458618c4bc71835926e098e61d15f8" +dependencies = [ + "rustix", + "windows-sys", +] + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "macrotest" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2035deb453578ff1cd2da2761ac78abbffffd1d06a0f59261c082ea713fdad" +dependencies = [ + "basic-toml", + "diff", + "glob", + "prettyplease", + "serde", + "serde_derive", + "serde_json", + "syn", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "owo-colors" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "serde" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.120" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + +[[package]] +name = "syn" +version = "2.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "toml" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "trybuild" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b1e5645f2ee8025c2f1d75e1138f2dd034d74e6ba54620f3c569ba2a2a1ea06" +dependencies = [ + "glob", + "serde", + "serde_derive", + "serde_json", + "termcolor", + "toml", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "wdk-macros-tests" +version = "0.1.0" +dependencies = [ + "fs4", + "lazy_static", + "macrotest", + "owo-colors", + "paste", + "pathdiff", + "rustversion", + "trybuild", +] + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +dependencies = [ + "memchr", +] diff --git a/tests/wdk-macros-tests/Cargo.toml b/tests/wdk-macros-tests/Cargo.toml new file mode 100644 index 00000000..7f16c6ef --- /dev/null +++ b/tests/wdk-macros-tests/Cargo.toml @@ -0,0 +1,19 @@ +[package] +edition = "2021" +name = "wdk-macros-tests" +version = "0.1.0" +description = "Package to provides wdk configuration-specific tests for the wdk-macros crate." +license = "MIT OR Apache-2.0" +publish = false + +[lib] + +[dependencies] +fs4 = { version = "0.8.4", features = ["sync"] } +lazy_static = "1.5.0" +macrotest = "1.0.13" +owo-colors = "4.0.0" +paste = "1.0.15" +pathdiff = "0.2.1" +rustversion = "1.0.17" +trybuild = "1.0.97" diff --git a/crates/wdk-macros/tests/integration_tests.rs b/tests/wdk-macros-tests/src/lib.rs similarity index 60% rename from crates/wdk-macros/tests/integration_tests.rs rename to tests/wdk-macros-tests/src/lib.rs index c44095a2..694f85e5 100644 --- a/crates/wdk-macros/tests/integration_tests.rs +++ b/tests/wdk-macros-tests/src/lib.rs @@ -1,13 +1,14 @@ // Copyright (c) Microsoft Corporation // License: MIT OR Apache-2.0 -use std::{ - fs::File, - path::{Path, PathBuf}, -}; +use std::path::PathBuf; use fs4::FileExt; use lazy_static::lazy_static; +pub use macrotest::{expand, expand_args}; +pub use owo_colors::OwoColorize; +pub use paste::paste; +pub use trybuild::TestCases; #[rustversion::stable] const TOOLCHAIN_CHANNEL_NAME: &str = "stable"; @@ -21,27 +22,22 @@ const TOOLCHAIN_CHANNEL_NAME: &str = "nightly"; lazy_static! { static ref TESTS_FOLDER_PATH: PathBuf = [env!("CARGO_MANIFEST_DIR"), "tests"].iter().collect(); static ref INPUTS_FOLDER_PATH: PathBuf = TESTS_FOLDER_PATH.join("inputs"); - static ref MACROTEST_INPUT_FOLDER_PATH: PathBuf = INPUTS_FOLDER_PATH.join("macrotest"); - static ref TRYBUILD_INPUT_FOLDER_PATH: PathBuf = INPUTS_FOLDER_PATH.join("trybuild"); + pub static ref MACROTEST_INPUT_FOLDER_PATH: PathBuf = INPUTS_FOLDER_PATH.join("macrotest"); + pub static ref TRYBUILD_INPUT_FOLDER_PATH: PathBuf = INPUTS_FOLDER_PATH.join("trybuild"); static ref OUTPUTS_FOLDER_PATH: PathBuf = TESTS_FOLDER_PATH.join("outputs"); static ref TOOLCHAIN_SPECIFIC_OUTPUTS_FOLDER_PATH: PathBuf = OUTPUTS_FOLDER_PATH.join(TOOLCHAIN_CHANNEL_NAME); - static ref MACROTEST_OUTPUT_FOLDER_PATH: PathBuf = + pub static ref MACROTEST_OUTPUT_FOLDER_PATH: PathBuf = TOOLCHAIN_SPECIFIC_OUTPUTS_FOLDER_PATH.join("macrotest"); - static ref TRYBUILD_OUTPUT_FOLDER_PATH: PathBuf = + pub static ref TRYBUILD_OUTPUT_FOLDER_PATH: PathBuf = TOOLCHAIN_SPECIFIC_OUTPUTS_FOLDER_PATH.join("trybuild"); } -use std::{io::Write, stringify}; - -use owo_colors::OwoColorize; -use paste::paste; - -/// Given a filename `f` which contains code utilizing macros in -/// `wdk-macros`, generates a pair of tests to verify that code in `f` -/// expands as expected, and compiles successfully. The test output will -/// show `_expansion` as the names of the expansion tests and -/// `_compilation` as the name of the compilation test. `f` must +/// Given a filename `f` which contains code utilizing +/// [`wdk_sys::call_unsafe_wdf_function_binding`], generates a pair of tests to +/// verify that code in `f` expands as expected, and compiles successfully. The +/// test output will show `_expansion` as the names of the expansion tests +/// and `_compilation` as the name of the compilation test. `f` must /// reside in the `tests/inputs/macrotest` folder, and may be a path to /// a file relative to the `tests/inputs/macrotest` folder. This macro is /// designed to use one test file per generated test to fully take advantage of @@ -49,8 +45,8 @@ use paste::paste; /// /// Note: Due to limitations in `trybuild`, a successful compilation /// test will include output that looks similar to the following: -/// ``` -/// test \\?\D:\git-repos\windows-drivers-rs\crates\wdk-macros\tests\macrotest\wdf_driver_create.rs ... error +/// ```ignore +/// test D:\windows-drivers-rs\crates\wdk-sys\tests\outputs\stable\macrotest\wdf_driver_create.rs ... error /// Expected test case to fail to compile, but it succeeded. /// ``` /// This is because `trybuild` will run `cargo check` when calling @@ -60,49 +56,52 @@ use paste::paste; /// work around this, `compile_fail` is used, and we mark the test as /// expecting to panic with a specific message using the `should_panic` /// attribute macro. +#[macro_export] macro_rules! generate_macrotest_tests { ($($filename:ident),+) => { - paste! { + $crate::paste! { // This module's tests are deliberately not feature-gated by #[cfg(feature = "nightly")] and #[cfg(not(feature = "nightly"))] since macrotest can control whether to expand with the nightly feature or not - mod macro_expansion { + pub mod macro_expansion { use super::*; $( #[test] - fn [<$filename _expansion>]() { - let symlink_target = &MACROTEST_INPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); - let symlink_path = &MACROTEST_OUTPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); - create_symlink_if_nonexistent(symlink_path, symlink_target); - macrotest::expand(symlink_path); + pub fn [<$filename _expansion>]() { + let symlink_target = &$crate::MACROTEST_INPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); + let symlink_path = &$crate::MACROTEST_OUTPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); + $crate::_create_symlink_if_nonexistent(symlink_path, symlink_target); + $crate::expand( symlink_path); } )? - mod nightly_feature { + pub mod nightly_feature { use super::*; $( #[test] - fn [<$filename _expansion>]() { - let symlink_target = &MACROTEST_INPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); - let symlink_path = &MACROTEST_OUTPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); - create_symlink_if_nonexistent(symlink_path, symlink_target); - macrotest::expand_args( + pub fn [<$filename _expansion>]() { + let symlink_target = &$crate::MACROTEST_INPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); + let symlink_path = &$crate::MACROTEST_OUTPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); + $crate::_create_symlink_if_nonexistent(symlink_path, symlink_target); + $crate::expand_args( symlink_path, &["--features", "nightly"]); } )? } } - mod macro_compilation { + pub mod macro_compilation { use super::*; + use $crate::OwoColorize; + use std::io::Write; pub trait TestCasesExt { - fn pass_cargo_check + std::panic::UnwindSafe>(path: P); + fn pass_cargo_check + std::panic::UnwindSafe>(path: P); } - impl TestCasesExt for trybuild::TestCases { - fn pass_cargo_check + std::panic::UnwindSafe>(path: P) { + impl TestCasesExt for $crate::TestCases { + fn pass_cargo_check + std::panic::UnwindSafe>(path: P) { // "compile_fail" tests that pass cargo check result in this panic message const SUCCESSFUL_CARGO_CHECK_STRING: &str = "1 of 1 tests failed"; @@ -110,7 +109,7 @@ macro_rules! generate_macrotest_tests { let failed_cargo_check = !std::panic::catch_unwind(|| { // A new TestCases is required because it relies on running the tests upon drop - trybuild::TestCases::new().compile_fail(path); + $crate::TestCases::new().compile_fail(path); }) .is_err_and(|cause| { if let Some(str) = cause.downcast_ref::<&str>() { @@ -156,25 +155,25 @@ macro_rules! generate_macrotest_tests { $( #[cfg(not(feature = "nightly"))] #[test] - fn [<$filename _compilation>]() { - let symlink_target = &MACROTEST_INPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); - let symlink_path = &MACROTEST_OUTPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); - create_symlink_if_nonexistent(symlink_path, symlink_target); - trybuild::TestCases::pass_cargo_check(symlink_path); + pub fn [<$filename _compilation>]() { + let symlink_target = &$crate::MACROTEST_INPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); + let symlink_path = &$crate::MACROTEST_OUTPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); + $crate::_create_symlink_if_nonexistent(symlink_path, symlink_target); + $crate::TestCases::pass_cargo_check(symlink_path); } )? #[cfg(feature = "nightly")] - mod nightly_feature { + pub mod nightly_feature { use super::*; $( #[test] - fn [<$filename _compilation>]() { - let symlink_target = &MACROTEST_INPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); - let symlink_path = &MACROTEST_OUTPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); - create_symlink_if_nonexistent(symlink_path, symlink_target); - trybuild::TestCases::pass_cargo_check(symlink_path); + pub fn [<$filename _compilation>]() { + let symlink_target = &$crate::MACROTEST_INPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); + let symlink_path = &$crate::MACROTEST_OUTPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); + $crate::_create_symlink_if_nonexistent(symlink_path, symlink_target); + $crate::TestCases::pass_cargo_check(symlink_path); } )? } @@ -183,20 +182,21 @@ macro_rules! generate_macrotest_tests { }; } +#[macro_export] macro_rules! generate_trybuild_tests { ($($filename:ident),+) => { - mod macro_usage_errors { + pub mod macro_usage_errors { use super::*; /// This test leverages `trybuild` to ensure that developer misuse of /// the macro cause compilation failures, with an appropriate message $( - #[test] - fn $filename() { - let symlink_target = &TRYBUILD_INPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); - let symlink_path = &TRYBUILD_OUTPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); - create_symlink_if_nonexistent(symlink_path, symlink_target); - trybuild::TestCases::new().compile_fail(symlink_path); + // #[test] + pub fn $filename() { + let symlink_target = &$crate::TRYBUILD_INPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); + let symlink_path = &$crate::TRYBUILD_OUTPUT_FOLDER_PATH.join(format!("{}.rs", stringify!($filename))); + $crate::_create_symlink_if_nonexistent(symlink_path, symlink_target); + $crate::TestCases::new().compile_fail(symlink_path); } )? } @@ -204,14 +204,37 @@ macro_rules! generate_trybuild_tests { } -fn create_symlink_if_nonexistent(link: &Path, target: &Path) { +#[macro_export] +macro_rules! generate_call_unsafe_wdf_binding_tests { + () => { + $crate::generate_macrotest_tests!( + wdf_driver_create, + wdf_device_create, + wdf_device_create_device_interface, + wdf_request_retrieve_output_buffer, + wdf_spin_lock_acquire, + wdf_verifier_dbg_break_point + ); + + $crate::generate_trybuild_tests!( + wdf_api_that_does_not_exist, + wdf_device_create_unused_return_type, + wdf_driver_create_missing_arg, + wdf_driver_create_wrong_arg_order, + wdf_timer_create_missing_unsafe + ); + }; +} + +#[doc(hidden)] +pub fn _create_symlink_if_nonexistent(link: &std::path::Path, target: &std::path::Path) { // Use relative paths for symlink creation let relative_target_path = pathdiff::diff_paths(target, link.parent().expect("link.parent() should exist")) .expect("target path should be resolvable as relative to link"); // Lock based off target_file so tests can run in parallel - let target_file = File::open( + let target_file = std::fs::File::open( target .canonicalize() .expect("canonicalize of symlink target should succeed"), @@ -239,19 +262,3 @@ fn create_symlink_if_nonexistent(link: &Path, target: &Path) { // symlink already exists and points to the correct place } } - -generate_macrotest_tests!( - wdf_driver_create, - wdf_device_create, - wdf_device_create_device_interface, - wdf_spin_lock_acquire, - wdf_verifier_dbg_break_point -); - -generate_trybuild_tests!( - wdf_api_that_does_not_exist, - wdf_device_create_unused_return_type, - wdf_driver_create_missing_arg, - wdf_driver_create_wrong_arg_order, - wdf_timer_create_missing_unsafe -); diff --git a/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_device_create.rs b/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_device_create.rs new file mode 100644 index 00000000..53b5fe95 --- /dev/null +++ b/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_device_create.rs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 +#![no_main] +#![deny(warnings)] + +extern "C" fn evt_driver_device_add( + _driver: wdk_sys::WDFDRIVER, + mut device_init: *mut wdk_sys::WDFDEVICE_INIT, +) -> wdk_sys::NTSTATUS { + let mut device_handle_output: wdk_sys::WDFDEVICE = wdk_sys::WDF_NO_HANDLE.cast(); + + unsafe { + wdk_sys::call_unsafe_wdf_function_binding!( + WdfDeviceCreate, + &mut device_init, + wdk_sys::WDF_NO_OBJECT_ATTRIBUTES, + &mut device_handle_output, + ) + } +} diff --git a/crates/wdk-macros/tests/inputs/macrotest/wdf_device_create_device_interface.rs b/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_device_create_device_interface.rs similarity index 57% rename from crates/wdk-macros/tests/inputs/macrotest/wdf_device_create_device_interface.rs rename to tests/wdk-macros-tests/tests/inputs/macrotest/wdf_device_create_device_interface.rs index a87ed303..36100950 100644 --- a/crates/wdk-macros/tests/inputs/macrotest/wdf_device_create_device_interface.rs +++ b/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_device_create_device_interface.rs @@ -3,19 +3,19 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; - // {86E0D1E0-8089-11D0-9CE4-08003E301F73} -const GUID_DEVINTERFACE_COMPORT: GUID = GUID { +const GUID_DEVINTERFACE_COMPORT: wdk_sys::GUID = wdk_sys::GUID { Data1: 0x86E0D1E0u32, Data2: 0x8089u16, Data3: 0x11D0u16, - Data4: [0x9Cu8, 0xE4u8, 0x08u8, 0x00u8, 0x3Eu8, 0x30u8, 0x1Fu8, 0x73u8], + Data4: [ + 0x9Cu8, 0xE4u8, 0x08u8, 0x00u8, 0x3Eu8, 0x30u8, 0x1Fu8, 0x73u8, + ], }; -fn create_device_interface(wdf_device: WDFDEVICE) -> NTSTATUS { +fn create_device_interface(wdf_device: wdk_sys::WDFDEVICE) -> wdk_sys::NTSTATUS { unsafe { - wdk_macros::call_unsafe_wdf_function_binding!( + wdk_sys::call_unsafe_wdf_function_binding!( WdfDeviceCreateDeviceInterface, wdf_device, &GUID_DEVINTERFACE_COMPORT, diff --git a/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_driver_create.rs b/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_driver_create.rs new file mode 100644 index 00000000..4b09d353 --- /dev/null +++ b/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_driver_create.rs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 +#![no_main] +#![deny(warnings)] + +#[export_name = "DriverEntry"] // WDF expects a symbol with the name DriverEntry +pub extern "system" fn driver_entry( + driver: wdk_sys::PDRIVER_OBJECT, + registry_path: wdk_sys::PCUNICODE_STRING, +) -> wdk_sys::NTSTATUS { + let mut driver_config = wdk_sys::WDF_DRIVER_CONFIG { + Size: core::mem::size_of::() as wdk_sys::ULONG, + ..Default::default() + }; + let driver_handle_output = wdk_sys::WDF_NO_HANDLE as *mut wdk_sys::WDFDRIVER; + + unsafe { + wdk_sys::call_unsafe_wdf_function_binding!( + WdfDriverCreate, + driver, + registry_path, + wdk_sys::WDF_NO_OBJECT_ATTRIBUTES, + &mut driver_config, + driver_handle_output, + ) + } +} diff --git a/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_request_retrieve_output_buffer.rs b/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_request_retrieve_output_buffer.rs new file mode 100644 index 00000000..6d79a31d --- /dev/null +++ b/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_request_retrieve_output_buffer.rs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 +#![no_main] +#![deny(warnings)] + +fn process_wdf_request(request: wdk_sys::WDFREQUEST) { + let minimum_required_buffer_size = 32; + let mut output_buffer_ptr = std::ptr::null_mut(); + let _nt_status = unsafe { + wdk_sys::call_unsafe_wdf_function_binding!( + WdfRequestRetrieveOutputBuffer, + request, + minimum_required_buffer_size, + &mut output_buffer_ptr, + std::ptr::null_mut() + ) + }; +} diff --git a/crates/wdk-macros/tests/inputs/macrotest/wdf_spin_lock_acquire.rs b/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_spin_lock_acquire.rs similarity index 60% rename from crates/wdk-macros/tests/inputs/macrotest/wdf_spin_lock_acquire.rs rename to tests/wdk-macros-tests/tests/inputs/macrotest/wdf_spin_lock_acquire.rs index 3d6ba611..109209b7 100644 --- a/crates/wdk-macros/tests/inputs/macrotest/wdf_spin_lock_acquire.rs +++ b/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_spin_lock_acquire.rs @@ -3,11 +3,9 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; - -fn acquire_lock(wdf_spin_lock: WDFSPINLOCK) { +fn acquire_lock(wdf_spin_lock: wdk_sys::WDFSPINLOCK) { // This demonstrates that the macro won't trigger a must_use warning on WDF APIs that don't return a value unsafe { - macros::call_unsafe_wdf_function_binding!(WdfSpinLockAcquire, wdf_spin_lock); + wdk_sys::call_unsafe_wdf_function_binding!(WdfSpinLockAcquire, wdf_spin_lock); } } diff --git a/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_verifier_dbg_break_point.rs b/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_verifier_dbg_break_point.rs new file mode 100644 index 00000000..9a387297 --- /dev/null +++ b/tests/wdk-macros-tests/tests/inputs/macrotest/wdf_verifier_dbg_break_point.rs @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation +// License: MIT OR Apache-2.0 +#![no_main] +#![deny(warnings)] + +fn foo() { + unsafe { wdk_sys::call_unsafe_wdf_function_binding!(WdfVerifierDbgBreakPoint) } +} diff --git a/crates/wdk-macros/tests/inputs/trybuild/wdf_api_that_does_not_exist.rs b/tests/wdk-macros-tests/tests/inputs/trybuild/wdf_api_that_does_not_exist.rs similarity index 56% rename from crates/wdk-macros/tests/inputs/trybuild/wdf_api_that_does_not_exist.rs rename to tests/wdk-macros-tests/tests/inputs/trybuild/wdf_api_that_does_not_exist.rs index 67940609..deb7c4f3 100644 --- a/crates/wdk-macros/tests/inputs/trybuild/wdf_api_that_does_not_exist.rs +++ b/tests/wdk-macros-tests/tests/inputs/trybuild/wdf_api_that_does_not_exist.rs @@ -5,16 +5,11 @@ use wdk_sys::*; -#[export_name = "DriverEntry"]// WDF expects a symbol with the name DriverEntry +#[export_name = "DriverEntry"] // WDF expects a symbol with the name DriverEntry pub extern "system" fn driver_entry( driver: &mut DRIVER_OBJECT, registry_path: PCUNICODE_STRING, ) -> NTSTATUS { // WdfApiThatDoesNotExist is a WDF API that does not exist! - unsafe { - wdk_macros::call_unsafe_wdf_function_binding!( - WdfApiThatDoesNotExist, - driver as PDRIVER_OBJECT, - ) - } + unsafe { call_unsafe_wdf_function_binding!(WdfApiThatDoesNotExist, driver as PDRIVER_OBJECT,) } } diff --git a/crates/wdk-macros/tests/inputs/trybuild/wdf_device_create_unused_return_type.rs b/tests/wdk-macros-tests/tests/inputs/trybuild/wdf_device_create_unused_return_type.rs similarity index 90% rename from crates/wdk-macros/tests/inputs/trybuild/wdf_device_create_unused_return_type.rs rename to tests/wdk-macros-tests/tests/inputs/trybuild/wdf_device_create_unused_return_type.rs index b5d3ab08..644a5005 100644 --- a/crates/wdk-macros/tests/inputs/trybuild/wdf_device_create_unused_return_type.rs +++ b/tests/wdk-macros-tests/tests/inputs/trybuild/wdf_device_create_unused_return_type.rs @@ -13,7 +13,7 @@ extern "C" fn evt_driver_device_add( // The NTSTATUS return value of WdfDeviceCreate is unused! unsafe { - wdk_macros::call_unsafe_wdf_function_binding!( + call_unsafe_wdf_function_binding!( WdfDeviceCreate, &mut device_init, WDF_NO_OBJECT_ATTRIBUTES, diff --git a/crates/wdk-macros/tests/inputs/trybuild/wdf_driver_create_missing_arg.rs b/tests/wdk-macros-tests/tests/inputs/trybuild/wdf_driver_create_missing_arg.rs similarity index 84% rename from crates/wdk-macros/tests/inputs/trybuild/wdf_driver_create_missing_arg.rs rename to tests/wdk-macros-tests/tests/inputs/trybuild/wdf_driver_create_missing_arg.rs index 05b0dd4f..fc8f46ce 100644 --- a/crates/wdk-macros/tests/inputs/trybuild/wdf_driver_create_missing_arg.rs +++ b/tests/wdk-macros-tests/tests/inputs/trybuild/wdf_driver_create_missing_arg.rs @@ -5,7 +5,7 @@ use wdk_sys::*; -#[export_name = "DriverEntry"]// WDF expects a symbol with the name DriverEntry +#[export_name = "DriverEntry"] // WDF expects a symbol with the name DriverEntry pub extern "system" fn driver_entry( driver: &mut DRIVER_OBJECT, registry_path: PCUNICODE_STRING, @@ -17,7 +17,7 @@ pub extern "system" fn driver_entry( let driver_handle_output = WDF_NO_HANDLE as *mut WDFDRIVER; unsafe { - wdk_macros::call_unsafe_wdf_function_binding!( + call_unsafe_wdf_function_binding!( WdfDriverCreate, driver as PDRIVER_OBJECT, registry_path, diff --git a/crates/wdk-macros/tests/inputs/trybuild/wdf_driver_create_wrong_arg_order.rs b/tests/wdk-macros-tests/tests/inputs/trybuild/wdf_driver_create_wrong_arg_order.rs similarity index 84% rename from crates/wdk-macros/tests/inputs/trybuild/wdf_driver_create_wrong_arg_order.rs rename to tests/wdk-macros-tests/tests/inputs/trybuild/wdf_driver_create_wrong_arg_order.rs index d61ecb75..f07cb6fb 100644 --- a/crates/wdk-macros/tests/inputs/trybuild/wdf_driver_create_wrong_arg_order.rs +++ b/tests/wdk-macros-tests/tests/inputs/trybuild/wdf_driver_create_wrong_arg_order.rs @@ -5,7 +5,7 @@ use wdk_sys::*; -#[export_name = "DriverEntry"]// WDF expects a symbol with the name DriverEntry +#[export_name = "DriverEntry"] // WDF expects a symbol with the name DriverEntry pub extern "system" fn driver_entry( driver: &mut DRIVER_OBJECT, registry_path: PCUNICODE_STRING, @@ -17,7 +17,7 @@ pub extern "system" fn driver_entry( let driver_handle_output = WDF_NO_HANDLE as *mut WDFDRIVER; unsafe { - wdk_macros::call_unsafe_wdf_function_binding!( + call_unsafe_wdf_function_binding!( WdfDriverCreate, driver as PDRIVER_OBJECT, registry_path, diff --git a/crates/wdk-macros/tests/inputs/trybuild/wdf_timer_create_missing_unsafe.rs b/tests/wdk-macros-tests/tests/inputs/trybuild/wdf_timer_create_missing_unsafe.rs similarity index 84% rename from crates/wdk-macros/tests/inputs/trybuild/wdf_timer_create_missing_unsafe.rs rename to tests/wdk-macros-tests/tests/inputs/trybuild/wdf_timer_create_missing_unsafe.rs index f3484e95..6172fe55 100644 --- a/crates/wdk-macros/tests/inputs/trybuild/wdf_timer_create_missing_unsafe.rs +++ b/tests/wdk-macros-tests/tests/inputs/trybuild/wdf_timer_create_missing_unsafe.rs @@ -7,7 +7,7 @@ use wdk_sys::*; fn foo(timer_config: &mut WDF_TIMER_CONFIG, attributes: &mut WDF_OBJECT_ATTRIBUTES,) { let mut timer = core::ptr::null_mut(); - let _nt_status = macros::call_unsafe_wdf_function_binding!( + let _nt_status = call_unsafe_wdf_function_binding!( WdfTimerCreate, timer_config, attributes, diff --git a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_device_create.expanded.rs b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_device_create.expanded.rs similarity index 74% rename from crates/wdk-macros/tests/outputs/beta/macrotest/wdf_device_create.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_device_create.expanded.rs index 0493e6bd..a14a2c7f 100644 --- a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_device_create.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_device_create.expanded.rs @@ -1,20 +1,21 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; extern "C" fn evt_driver_device_add( - _driver: WDFDRIVER, - mut device_init: *mut WDFDEVICE_INIT, -) -> NTSTATUS { - let mut device_handle_output: WDFDEVICE = WDF_NO_HANDLE.cast(); + _driver: wdk_sys::WDFDRIVER, + mut device_init: *mut wdk_sys::WDFDEVICE_INIT, +) -> wdk_sys::NTSTATUS { + let mut device_handle_output: wdk_sys::WDFDEVICE = wdk_sys::WDF_NO_HANDLE.cast(); unsafe { { + use wdk_sys::*; #[must_use] #[inline(always)] + #[allow(non_snake_case)] unsafe fn wdf_device_create_impl( - DeviceInit: *mut wdk_sys::PWDFDEVICE_INIT, - DeviceAttributes: wdk_sys::PWDF_OBJECT_ATTRIBUTES, - Device: *mut wdk_sys::WDFDEVICE, - ) -> wdk_sys::NTSTATUS { + DeviceInit: *mut PWDFDEVICE_INIT, + DeviceAttributes: PWDF_OBJECT_ATTRIBUTES, + Device: *mut WDFDEVICE, + ) -> NTSTATUS { let wdf_function: wdk_sys::PFN_WDFDEVICECREATE = Some(unsafe { core::mem::transmute( wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfDeviceCreateTableIndex @@ -43,7 +44,7 @@ extern "C" fn evt_driver_device_add( } wdf_device_create_impl( &mut device_init, - WDF_NO_OBJECT_ATTRIBUTES, + wdk_sys::WDF_NO_OBJECT_ATTRIBUTES, &mut device_handle_output, ) } diff --git a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_device_create.rs b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_device_create.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/beta/macrotest/wdf_device_create.rs rename to tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_device_create.rs diff --git a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_device_create_device_interface.expanded.rs b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_device_create_device_interface.expanded.rs similarity index 81% rename from crates/wdk-macros/tests/outputs/stable/macrotest/wdf_device_create_device_interface.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_device_create_device_interface.expanded.rs index afd81d27..86fa0492 100644 --- a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_device_create_device_interface.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_device_create_device_interface.expanded.rs @@ -1,22 +1,23 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; -const GUID_DEVINTERFACE_COMPORT: GUID = GUID { +const GUID_DEVINTERFACE_COMPORT: wdk_sys::GUID = wdk_sys::GUID { Data1: 0x86E0D1E0u32, Data2: 0x8089u16, Data3: 0x11D0u16, Data4: [0x9Cu8, 0xE4u8, 0x08u8, 0x00u8, 0x3Eu8, 0x30u8, 0x1Fu8, 0x73u8], }; -fn create_device_interface(wdf_device: WDFDEVICE) -> NTSTATUS { +fn create_device_interface(wdf_device: wdk_sys::WDFDEVICE) -> wdk_sys::NTSTATUS { unsafe { { + use wdk_sys::*; #[must_use] #[inline(always)] + #[allow(non_snake_case)] unsafe fn wdf_device_create_device_interface_impl( - Device: wdk_sys::WDFDEVICE, - InterfaceClassGUID: *const wdk_sys::GUID, - ReferenceString: wdk_sys::PCUNICODE_STRING, - ) -> wdk_sys::NTSTATUS { + Device: WDFDEVICE, + InterfaceClassGUID: *const GUID, + ReferenceString: PCUNICODE_STRING, + ) -> NTSTATUS { let wdf_function: wdk_sys::PFN_WDFDEVICECREATEDEVICEINTERFACE = Some(unsafe { core::mem::transmute( wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfDeviceCreateDeviceInterfaceTableIndex diff --git a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_device_create_device_interface.rs b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_device_create_device_interface.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/beta/macrotest/wdf_device_create_device_interface.rs rename to tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_device_create_device_interface.rs diff --git a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_driver_create.expanded.rs b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_driver_create.expanded.rs similarity index 66% rename from crates/wdk-macros/tests/outputs/stable/macrotest/wdf_driver_create.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_driver_create.expanded.rs index ab9abe4a..d59e4f62 100644 --- a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_driver_create.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_driver_create.expanded.rs @@ -1,27 +1,28 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; #[export_name = "DriverEntry"] pub extern "system" fn driver_entry( - driver: &mut DRIVER_OBJECT, - registry_path: PCUNICODE_STRING, -) -> NTSTATUS { - let mut driver_config = WDF_DRIVER_CONFIG { - Size: core::mem::size_of::() as ULONG, - ..WDF_DRIVER_CONFIG::default() + driver: wdk_sys::PDRIVER_OBJECT, + registry_path: wdk_sys::PCUNICODE_STRING, +) -> wdk_sys::NTSTATUS { + let mut driver_config = wdk_sys::WDF_DRIVER_CONFIG { + Size: core::mem::size_of::() as wdk_sys::ULONG, + ..Default::default() }; - let driver_handle_output = WDF_NO_HANDLE as *mut WDFDRIVER; + let driver_handle_output = wdk_sys::WDF_NO_HANDLE as *mut wdk_sys::WDFDRIVER; unsafe { { + use wdk_sys::*; #[must_use] #[inline(always)] + #[allow(non_snake_case)] unsafe fn wdf_driver_create_impl( - DriverObject: wdk_sys::PDRIVER_OBJECT, - RegistryPath: wdk_sys::PCUNICODE_STRING, - DriverAttributes: wdk_sys::PWDF_OBJECT_ATTRIBUTES, - DriverConfig: wdk_sys::PWDF_DRIVER_CONFIG, - Driver: *mut wdk_sys::WDFDRIVER, - ) -> wdk_sys::NTSTATUS { + DriverObject: PDRIVER_OBJECT, + RegistryPath: PCUNICODE_STRING, + DriverAttributes: PWDF_OBJECT_ATTRIBUTES, + DriverConfig: PWDF_DRIVER_CONFIG, + Driver: *mut WDFDRIVER, + ) -> NTSTATUS { let wdf_function: wdk_sys::PFN_WDFDRIVERCREATE = Some(unsafe { core::mem::transmute( wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfDriverCreateTableIndex @@ -51,9 +52,9 @@ pub extern "system" fn driver_entry( } } wdf_driver_create_impl( - driver as PDRIVER_OBJECT, + driver, registry_path, - WDF_NO_OBJECT_ATTRIBUTES, + wdk_sys::WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output, ) diff --git a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_driver_create.rs b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_driver_create.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/beta/macrotest/wdf_driver_create.rs rename to tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_driver_create.rs diff --git a/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_request_retrieve_output_buffer.expanded.rs b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_request_retrieve_output_buffer.expanded.rs new file mode 100644 index 00000000..1965dffa --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_request_retrieve_output_buffer.expanded.rs @@ -0,0 +1,53 @@ +#![no_main] +#![deny(warnings)] +fn process_wdf_request(request: wdk_sys::WDFREQUEST) { + let minimum_required_buffer_size = 32; + let mut output_buffer_ptr = std::ptr::null_mut(); + let _nt_status = unsafe { + { + use wdk_sys::*; + #[must_use] + #[inline(always)] + #[allow(non_snake_case)] + unsafe fn wdf_request_retrieve_output_buffer_impl( + Request: WDFREQUEST, + MinimumRequiredSize: usize, + Buffer: *mut PVOID, + Length: *mut usize, + ) -> NTSTATUS { + let wdf_function: wdk_sys::PFN_WDFREQUESTRETRIEVEOUTPUTBUFFER = Some(unsafe { + core::mem::transmute( + wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfRequestRetrieveOutputBufferTableIndex + as usize], + ) + }); + if let Some(wdf_function) = wdf_function { + unsafe { + (wdf_function)( + wdk_sys::WdfDriverGlobals, + Request, + MinimumRequiredSize, + Buffer, + Length, + ) + } + } else { + { + ::core::panicking::panic_fmt( + format_args!( + "internal error: entered unreachable code: {0}", + format_args!("Option should never be None"), + ), + ); + }; + } + } + wdf_request_retrieve_output_buffer_impl( + request, + minimum_required_buffer_size, + &mut output_buffer_ptr, + std::ptr::null_mut(), + ) + } + }; +} diff --git a/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_request_retrieve_output_buffer.rs b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_request_retrieve_output_buffer.rs new file mode 120000 index 00000000..f3862589 --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_request_retrieve_output_buffer.rs @@ -0,0 +1 @@ +../../../inputs/macrotest/wdf_request_retrieve_output_buffer.rs \ No newline at end of file diff --git a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_spin_lock_acquire.expanded.rs b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_spin_lock_acquire.expanded.rs similarity index 84% rename from crates/wdk-macros/tests/outputs/stable/macrotest/wdf_spin_lock_acquire.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_spin_lock_acquire.expanded.rs index 1ba0841a..4c5562ef 100644 --- a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_spin_lock_acquire.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_spin_lock_acquire.expanded.rs @@ -1,11 +1,12 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; -fn acquire_lock(wdf_spin_lock: WDFSPINLOCK) { +fn acquire_lock(wdf_spin_lock: wdk_sys::WDFSPINLOCK) { unsafe { { + use wdk_sys::*; #[inline(always)] - unsafe fn wdf_spin_lock_acquire_impl(SpinLock: wdk_sys::WDFSPINLOCK) { + #[allow(non_snake_case)] + unsafe fn wdf_spin_lock_acquire_impl(SpinLock: WDFSPINLOCK) { let wdf_function: wdk_sys::PFN_WDFSPINLOCKACQUIRE = Some(unsafe { core::mem::transmute( wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfSpinLockAcquireTableIndex diff --git a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_spin_lock_acquire.rs b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_spin_lock_acquire.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/beta/macrotest/wdf_spin_lock_acquire.rs rename to tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_spin_lock_acquire.rs diff --git a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_verifier_dbg_break_point.expanded.rs b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_verifier_dbg_break_point.expanded.rs similarity index 94% rename from crates/wdk-macros/tests/outputs/beta/macrotest/wdf_verifier_dbg_break_point.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_verifier_dbg_break_point.expanded.rs index ae3e107c..b56d8950 100644 --- a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_verifier_dbg_break_point.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_verifier_dbg_break_point.expanded.rs @@ -1,11 +1,11 @@ #![no_main] #![deny(warnings)] -#[allow(unused_imports)] -use wdk_sys::*; fn foo() { unsafe { { + use wdk_sys::*; #[inline(always)] + #[allow(non_snake_case)] unsafe fn wdf_verifier_dbg_break_point_impl() { let wdf_function: wdk_sys::PFN_WDFVERIFIERDBGBREAKPOINT = Some(unsafe { core::mem::transmute( diff --git a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_verifier_dbg_break_point.rs b/tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_verifier_dbg_break_point.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/beta/macrotest/wdf_verifier_dbg_break_point.rs rename to tests/wdk-macros-tests/tests/outputs/beta/macrotest/wdf_verifier_dbg_break_point.rs diff --git a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_api_that_does_not_exist.rs b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_api_that_does_not_exist.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/beta/trybuild/wdf_api_that_does_not_exist.rs rename to tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_api_that_does_not_exist.rs diff --git a/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_api_that_does_not_exist.stderr b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_api_that_does_not_exist.stderr new file mode 100644 index 00000000..53226295 --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_api_that_does_not_exist.stderr @@ -0,0 +1,5 @@ +error: Failed to find type alias definition for PFN_WDFAPITHATDOESNOTEXIST + --> tests/outputs/beta/trybuild/wdf_api_that_does_not_exist.rs + | + | unsafe { call_unsafe_wdf_function_binding!(WdfApiThatDoesNotExist, driver as PDRIVER_OBJECT,) } + | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_device_create_unused_return_type.rs b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_device_create_unused_return_type.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/beta/trybuild/wdf_device_create_unused_return_type.rs rename to tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_device_create_unused_return_type.rs diff --git a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_device_create_unused_return_type.stderr b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_device_create_unused_return_type.stderr similarity index 66% rename from crates/wdk-macros/tests/outputs/beta/trybuild/wdf_device_create_unused_return_type.stderr rename to tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_device_create_unused_return_type.stderr index 8fd0325b..0de5fe80 100644 --- a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_device_create_unused_return_type.stderr +++ b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_device_create_unused_return_type.stderr @@ -1,7 +1,7 @@ error: unused return value of `wdf_device_create_impl` that must be used --> tests/outputs/beta/trybuild/wdf_device_create_unused_return_type.rs | - | / wdk_macros::call_unsafe_wdf_function_binding!( + | / call_unsafe_wdf_function_binding!( | | WdfDeviceCreate, | | &mut device_init, | | WDF_NO_OBJECT_ATTRIBUTES, @@ -15,4 +15,4 @@ note: the lint level is defined here | #![deny(warnings)] | ^^^^^^^^ = note: `#[deny(unused_must_use)]` implied by `#[deny(warnings)]` - = note: this error originates in the macro `wdk_macros::call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::__proc_macros::call_unsafe_wdf_function_binding` which comes from the expansion of the macro `call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.rs b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.rs rename to tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.rs diff --git a/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.stderr b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.stderr new file mode 100644 index 00000000..951170c2 --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.stderr @@ -0,0 +1,36 @@ +error[E0061]: this function takes 5 arguments but 4 arguments were supplied + --> tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.rs + | + | / call_unsafe_wdf_function_binding!( + | | WdfDriverCreate, + | | driver as PDRIVER_OBJECT, + | | registry_path, +... | + | | &mut driver_config, + | | ------------------ an argument of type `*mut _WDF_OBJECT_ATTRIBUTES` is missing + | | driver_handle_output, + | | ) + | |_________^ + | +note: function defined here + --> tests/outputs/beta/trybuild/wdf_driver_create_missing_arg.rs + | + | / call_unsafe_wdf_function_binding!( + | | WdfDriverCreate, + | | driver as PDRIVER_OBJECT, + | | registry_path, +... | + | | driver_handle_output, + | | ) + | |_________^ + | |_________| + | |_________| + | |_________| + | |_________| + | + = note: this error originates in the macro `$crate::__proc_macros::call_unsafe_wdf_function_binding` which comes from the expansion of the macro `call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) +help: provide the argument + --> $OUT_DIR[wdk-sys]/call_unsafe_wdf_function_binding.rs + | + | )(driver as PDRIVER_OBJECT, registry_path, /* *mut _WDF_OBJECT_ATTRIBUTES */, &mut driver_config, driver_handle_output) + | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.rs b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.rs rename to tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.rs diff --git a/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.stderr b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.stderr new file mode 100644 index 00000000..e08bff01 --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.stderr @@ -0,0 +1,38 @@ +error[E0308]: arguments to this function are incorrect + --> tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.rs + | + | / call_unsafe_wdf_function_binding!( + | | WdfDriverCreate, + | | driver as PDRIVER_OBJECT, + | | registry_path, + | | // The order of the next two arguments is swapped! + | | &mut driver_config, + | | ------------------ expected `*mut _WDF_OBJECT_ATTRIBUTES`, found `&mut _WDF_DRIVER_CONFIG` + | | WDF_NO_OBJECT_ATTRIBUTES, + | | ------------------------ expected `*mut _WDF_DRIVER_CONFIG`, found `*mut _WDF_OBJECT_ATTRIBUTES` + | | driver_handle_output, + | | ) + | |_________^ + | +note: function defined here + --> tests/outputs/beta/trybuild/wdf_driver_create_wrong_arg_order.rs + | + | / call_unsafe_wdf_function_binding!( + | | WdfDriverCreate, + | | driver as PDRIVER_OBJECT, + | | registry_path, +... | + | | driver_handle_output, + | | ) + | |_________^ + | |_________| + | |_________| + | |_________| + | |_________| + | + = note: this error originates in the macro `$crate::__proc_macros::call_unsafe_wdf_function_binding` which comes from the expansion of the macro `call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) +help: swap these arguments + --> $OUT_DIR[wdk-sys]/call_unsafe_wdf_function_binding.rs + | + | )(driver as PDRIVER_OBJECT, registry_path, WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output) + | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_timer_create_missing_unsafe.rs b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_timer_create_missing_unsafe.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/beta/trybuild/wdf_timer_create_missing_unsafe.rs rename to tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_timer_create_missing_unsafe.rs diff --git a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_timer_create_missing_unsafe.stderr b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_timer_create_missing_unsafe.stderr similarity index 60% rename from crates/wdk-macros/tests/outputs/beta/trybuild/wdf_timer_create_missing_unsafe.stderr rename to tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_timer_create_missing_unsafe.stderr index 5575407b..cef3d5ef 100644 --- a/crates/wdk-macros/tests/outputs/beta/trybuild/wdf_timer_create_missing_unsafe.stderr +++ b/tests/wdk-macros-tests/tests/outputs/beta/trybuild/wdf_timer_create_missing_unsafe.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function `wdf_timer_create_impl` is unsafe and requires unsafe function or block --> tests/outputs/beta/trybuild/wdf_timer_create_missing_unsafe.rs | - | let _nt_status = macros::call_unsafe_wdf_function_binding!( + | let _nt_status = call_unsafe_wdf_function_binding!( | ______________________^ | | WdfTimerCreate, | | timer_config, @@ -11,4 +11,4 @@ error[E0133]: call to unsafe function `wdf_timer_create_impl` is unsafe and requ | |_____^ call to unsafe function | = note: consult the function's documentation for information on how to avoid undefined behavior - = note: this error originates in the macro `macros::call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::__proc_macros::call_unsafe_wdf_function_binding` which comes from the expansion of the macro `call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_device_create.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create.expanded.rs similarity index 74% rename from crates/wdk-macros/tests/outputs/stable/macrotest/wdf_device_create.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create.expanded.rs index 0493e6bd..a14a2c7f 100644 --- a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_device_create.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create.expanded.rs @@ -1,20 +1,21 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; extern "C" fn evt_driver_device_add( - _driver: WDFDRIVER, - mut device_init: *mut WDFDEVICE_INIT, -) -> NTSTATUS { - let mut device_handle_output: WDFDEVICE = WDF_NO_HANDLE.cast(); + _driver: wdk_sys::WDFDRIVER, + mut device_init: *mut wdk_sys::WDFDEVICE_INIT, +) -> wdk_sys::NTSTATUS { + let mut device_handle_output: wdk_sys::WDFDEVICE = wdk_sys::WDF_NO_HANDLE.cast(); unsafe { { + use wdk_sys::*; #[must_use] #[inline(always)] + #[allow(non_snake_case)] unsafe fn wdf_device_create_impl( - DeviceInit: *mut wdk_sys::PWDFDEVICE_INIT, - DeviceAttributes: wdk_sys::PWDF_OBJECT_ATTRIBUTES, - Device: *mut wdk_sys::WDFDEVICE, - ) -> wdk_sys::NTSTATUS { + DeviceInit: *mut PWDFDEVICE_INIT, + DeviceAttributes: PWDF_OBJECT_ATTRIBUTES, + Device: *mut WDFDEVICE, + ) -> NTSTATUS { let wdf_function: wdk_sys::PFN_WDFDEVICECREATE = Some(unsafe { core::mem::transmute( wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfDeviceCreateTableIndex @@ -43,7 +44,7 @@ extern "C" fn evt_driver_device_add( } wdf_device_create_impl( &mut device_init, - WDF_NO_OBJECT_ATTRIBUTES, + wdk_sys::WDF_NO_OBJECT_ATTRIBUTES, &mut device_handle_output, ) } diff --git a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_device_create.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_device_create.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create.rs diff --git a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_device_create_device_interface.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.expanded.rs similarity index 81% rename from crates/wdk-macros/tests/outputs/beta/macrotest/wdf_device_create_device_interface.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.expanded.rs index afd81d27..86fa0492 100644 --- a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_device_create_device_interface.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.expanded.rs @@ -1,22 +1,23 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; -const GUID_DEVINTERFACE_COMPORT: GUID = GUID { +const GUID_DEVINTERFACE_COMPORT: wdk_sys::GUID = wdk_sys::GUID { Data1: 0x86E0D1E0u32, Data2: 0x8089u16, Data3: 0x11D0u16, Data4: [0x9Cu8, 0xE4u8, 0x08u8, 0x00u8, 0x3Eu8, 0x30u8, 0x1Fu8, 0x73u8], }; -fn create_device_interface(wdf_device: WDFDEVICE) -> NTSTATUS { +fn create_device_interface(wdf_device: wdk_sys::WDFDEVICE) -> wdk_sys::NTSTATUS { unsafe { { + use wdk_sys::*; #[must_use] #[inline(always)] + #[allow(non_snake_case)] unsafe fn wdf_device_create_device_interface_impl( - Device: wdk_sys::WDFDEVICE, - InterfaceClassGUID: *const wdk_sys::GUID, - ReferenceString: wdk_sys::PCUNICODE_STRING, - ) -> wdk_sys::NTSTATUS { + Device: WDFDEVICE, + InterfaceClassGUID: *const GUID, + ReferenceString: PCUNICODE_STRING, + ) -> NTSTATUS { let wdf_function: wdk_sys::PFN_WDFDEVICECREATEDEVICEINTERFACE = Some(unsafe { core::mem::transmute( wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfDeviceCreateDeviceInterfaceTableIndex diff --git a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.rs diff --git a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_driver_create.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_driver_create.expanded.rs similarity index 66% rename from crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_driver_create.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_driver_create.expanded.rs index ab9abe4a..d59e4f62 100644 --- a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_driver_create.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_driver_create.expanded.rs @@ -1,27 +1,28 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; #[export_name = "DriverEntry"] pub extern "system" fn driver_entry( - driver: &mut DRIVER_OBJECT, - registry_path: PCUNICODE_STRING, -) -> NTSTATUS { - let mut driver_config = WDF_DRIVER_CONFIG { - Size: core::mem::size_of::() as ULONG, - ..WDF_DRIVER_CONFIG::default() + driver: wdk_sys::PDRIVER_OBJECT, + registry_path: wdk_sys::PCUNICODE_STRING, +) -> wdk_sys::NTSTATUS { + let mut driver_config = wdk_sys::WDF_DRIVER_CONFIG { + Size: core::mem::size_of::() as wdk_sys::ULONG, + ..Default::default() }; - let driver_handle_output = WDF_NO_HANDLE as *mut WDFDRIVER; + let driver_handle_output = wdk_sys::WDF_NO_HANDLE as *mut wdk_sys::WDFDRIVER; unsafe { { + use wdk_sys::*; #[must_use] #[inline(always)] + #[allow(non_snake_case)] unsafe fn wdf_driver_create_impl( - DriverObject: wdk_sys::PDRIVER_OBJECT, - RegistryPath: wdk_sys::PCUNICODE_STRING, - DriverAttributes: wdk_sys::PWDF_OBJECT_ATTRIBUTES, - DriverConfig: wdk_sys::PWDF_DRIVER_CONFIG, - Driver: *mut wdk_sys::WDFDRIVER, - ) -> wdk_sys::NTSTATUS { + DriverObject: PDRIVER_OBJECT, + RegistryPath: PCUNICODE_STRING, + DriverAttributes: PWDF_OBJECT_ATTRIBUTES, + DriverConfig: PWDF_DRIVER_CONFIG, + Driver: *mut WDFDRIVER, + ) -> NTSTATUS { let wdf_function: wdk_sys::PFN_WDFDRIVERCREATE = Some(unsafe { core::mem::transmute( wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfDriverCreateTableIndex @@ -51,9 +52,9 @@ pub extern "system" fn driver_entry( } } wdf_driver_create_impl( - driver as PDRIVER_OBJECT, + driver, registry_path, - WDF_NO_OBJECT_ATTRIBUTES, + wdk_sys::WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output, ) diff --git a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_driver_create.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_driver_create.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_driver_create.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_driver_create.rs diff --git a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_request_retrieve_output_buffer.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_request_retrieve_output_buffer.expanded.rs new file mode 100644 index 00000000..1965dffa --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_request_retrieve_output_buffer.expanded.rs @@ -0,0 +1,53 @@ +#![no_main] +#![deny(warnings)] +fn process_wdf_request(request: wdk_sys::WDFREQUEST) { + let minimum_required_buffer_size = 32; + let mut output_buffer_ptr = std::ptr::null_mut(); + let _nt_status = unsafe { + { + use wdk_sys::*; + #[must_use] + #[inline(always)] + #[allow(non_snake_case)] + unsafe fn wdf_request_retrieve_output_buffer_impl( + Request: WDFREQUEST, + MinimumRequiredSize: usize, + Buffer: *mut PVOID, + Length: *mut usize, + ) -> NTSTATUS { + let wdf_function: wdk_sys::PFN_WDFREQUESTRETRIEVEOUTPUTBUFFER = Some(unsafe { + core::mem::transmute( + wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfRequestRetrieveOutputBufferTableIndex + as usize], + ) + }); + if let Some(wdf_function) = wdf_function { + unsafe { + (wdf_function)( + wdk_sys::WdfDriverGlobals, + Request, + MinimumRequiredSize, + Buffer, + Length, + ) + } + } else { + { + ::core::panicking::panic_fmt( + format_args!( + "internal error: entered unreachable code: {0}", + format_args!("Option should never be None"), + ), + ); + }; + } + } + wdf_request_retrieve_output_buffer_impl( + request, + minimum_required_buffer_size, + &mut output_buffer_ptr, + std::ptr::null_mut(), + ) + } + }; +} diff --git a/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_request_retrieve_output_buffer.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_request_retrieve_output_buffer.rs new file mode 120000 index 00000000..f3862589 --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_request_retrieve_output_buffer.rs @@ -0,0 +1 @@ +../../../inputs/macrotest/wdf_request_retrieve_output_buffer.rs \ No newline at end of file diff --git a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_spin_lock_acquire.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.expanded.rs similarity index 84% rename from crates/wdk-macros/tests/outputs/beta/macrotest/wdf_spin_lock_acquire.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.expanded.rs index 1ba0841a..4c5562ef 100644 --- a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_spin_lock_acquire.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.expanded.rs @@ -1,11 +1,12 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; -fn acquire_lock(wdf_spin_lock: WDFSPINLOCK) { +fn acquire_lock(wdf_spin_lock: wdk_sys::WDFSPINLOCK) { unsafe { { + use wdk_sys::*; #[inline(always)] - unsafe fn wdf_spin_lock_acquire_impl(SpinLock: wdk_sys::WDFSPINLOCK) { + #[allow(non_snake_case)] + unsafe fn wdf_spin_lock_acquire_impl(SpinLock: WDFSPINLOCK) { let wdf_function: wdk_sys::PFN_WDFSPINLOCKACQUIRE = Some(unsafe { core::mem::transmute( wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfSpinLockAcquireTableIndex diff --git a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.rs diff --git a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_verifier_dbg_break_point.expanded.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.expanded.rs similarity index 94% rename from crates/wdk-macros/tests/outputs/stable/macrotest/wdf_verifier_dbg_break_point.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.expanded.rs index ae3e107c..b56d8950 100644 --- a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_verifier_dbg_break_point.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.expanded.rs @@ -1,11 +1,11 @@ #![no_main] #![deny(warnings)] -#[allow(unused_imports)] -use wdk_sys::*; fn foo() { unsafe { { + use wdk_sys::*; #[inline(always)] + #[allow(non_snake_case)] unsafe fn wdf_verifier_dbg_break_point_impl() { let wdf_function: wdk_sys::PFN_WDFVERIFIERDBGBREAKPOINT = Some(unsafe { core::mem::transmute( diff --git a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.rs b/tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.rs diff --git a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_api_that_does_not_exist.rs b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_api_that_does_not_exist.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_api_that_does_not_exist.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_api_that_does_not_exist.rs diff --git a/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_api_that_does_not_exist.stderr b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_api_that_does_not_exist.stderr new file mode 100644 index 00000000..94ccf54f --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_api_that_does_not_exist.stderr @@ -0,0 +1,5 @@ +error: Failed to find type alias definition for PFN_WDFAPITHATDOESNOTEXIST + --> tests/outputs/nightly/trybuild/wdf_api_that_does_not_exist.rs + | + | unsafe { call_unsafe_wdf_function_binding!(WdfApiThatDoesNotExist, driver as PDRIVER_OBJECT,) } + | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_device_create_unused_return_type.rs b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_device_create_unused_return_type.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_device_create_unused_return_type.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_device_create_unused_return_type.rs diff --git a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_device_create_unused_return_type.stderr b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_device_create_unused_return_type.stderr similarity index 66% rename from crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_device_create_unused_return_type.stderr rename to tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_device_create_unused_return_type.stderr index 6a23741c..e92eca92 100644 --- a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_device_create_unused_return_type.stderr +++ b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_device_create_unused_return_type.stderr @@ -1,7 +1,7 @@ error: unused return value of `wdf_device_create_impl` that must be used --> tests/outputs/nightly/trybuild/wdf_device_create_unused_return_type.rs | - | / wdk_macros::call_unsafe_wdf_function_binding!( + | / call_unsafe_wdf_function_binding!( | | WdfDeviceCreate, | | &mut device_init, | | WDF_NO_OBJECT_ATTRIBUTES, @@ -15,4 +15,4 @@ note: the lint level is defined here | #![deny(warnings)] | ^^^^^^^^ = note: `#[deny(unused_must_use)]` implied by `#[deny(warnings)]` - = note: this error originates in the macro `wdk_macros::call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::__proc_macros::call_unsafe_wdf_function_binding` which comes from the expansion of the macro `call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.rs b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.rs diff --git a/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.stderr b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.stderr new file mode 100644 index 00000000..a73e7eab --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.stderr @@ -0,0 +1,36 @@ +error[E0061]: this function takes 5 arguments but 4 arguments were supplied + --> tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.rs + | + | / call_unsafe_wdf_function_binding!( + | | WdfDriverCreate, + | | driver as PDRIVER_OBJECT, + | | registry_path, +... | + | | &mut driver_config, + | | ------------------ an argument of type `*mut _WDF_OBJECT_ATTRIBUTES` is missing + | | driver_handle_output, + | | ) + | |_________^ + | +note: function defined here + --> tests/outputs/nightly/trybuild/wdf_driver_create_missing_arg.rs + | + | / call_unsafe_wdf_function_binding!( + | | WdfDriverCreate, + | | driver as PDRIVER_OBJECT, + | | registry_path, +... | + | | driver_handle_output, + | | ) + | |_________^ + | |_________| + | |_________| + | |_________| + | |_________| + | + = note: this error originates in the macro `$crate::__proc_macros::call_unsafe_wdf_function_binding` which comes from the expansion of the macro `call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) +help: provide the argument + --> $OUT_DIR[wdk-sys]/call_unsafe_wdf_function_binding.rs + | + | )(driver as PDRIVER_OBJECT, registry_path, /* *mut _WDF_OBJECT_ATTRIBUTES */, &mut driver_config, driver_handle_output) + | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.rs b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.rs diff --git a/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.stderr b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.stderr new file mode 100644 index 00000000..0ccad099 --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.stderr @@ -0,0 +1,38 @@ +error[E0308]: arguments to this function are incorrect + --> tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.rs + | + | / call_unsafe_wdf_function_binding!( + | | WdfDriverCreate, + | | driver as PDRIVER_OBJECT, + | | registry_path, + | | // The order of the next two arguments is swapped! + | | &mut driver_config, + | | ------------------ expected `*mut _WDF_OBJECT_ATTRIBUTES`, found `&mut _WDF_DRIVER_CONFIG` + | | WDF_NO_OBJECT_ATTRIBUTES, + | | ------------------------ expected `*mut _WDF_DRIVER_CONFIG`, found `*mut _WDF_OBJECT_ATTRIBUTES` + | | driver_handle_output, + | | ) + | |_________^ + | +note: function defined here + --> tests/outputs/nightly/trybuild/wdf_driver_create_wrong_arg_order.rs + | + | / call_unsafe_wdf_function_binding!( + | | WdfDriverCreate, + | | driver as PDRIVER_OBJECT, + | | registry_path, +... | + | | driver_handle_output, + | | ) + | |_________^ + | |_________| + | |_________| + | |_________| + | |_________| + | + = note: this error originates in the macro `$crate::__proc_macros::call_unsafe_wdf_function_binding` which comes from the expansion of the macro `call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) +help: swap these arguments + --> $OUT_DIR[wdk-sys]/call_unsafe_wdf_function_binding.rs + | + | )(driver as PDRIVER_OBJECT, registry_path, WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output) + | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_timer_create_missing_unsafe.rs b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_timer_create_missing_unsafe.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_timer_create_missing_unsafe.rs rename to tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_timer_create_missing_unsafe.rs diff --git a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_timer_create_missing_unsafe.stderr b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_timer_create_missing_unsafe.stderr similarity index 60% rename from crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_timer_create_missing_unsafe.stderr rename to tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_timer_create_missing_unsafe.stderr index c2f6a1eb..69a5dada 100644 --- a/crates/wdk-macros/tests/outputs/nightly/trybuild/wdf_timer_create_missing_unsafe.stderr +++ b/tests/wdk-macros-tests/tests/outputs/nightly/trybuild/wdf_timer_create_missing_unsafe.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function `wdf_timer_create_impl` is unsafe and requires unsafe function or block --> tests/outputs/nightly/trybuild/wdf_timer_create_missing_unsafe.rs | - | let _nt_status = macros::call_unsafe_wdf_function_binding!( + | let _nt_status = call_unsafe_wdf_function_binding!( | ______________________^ | | WdfTimerCreate, | | timer_config, @@ -11,4 +11,4 @@ error[E0133]: call to unsafe function `wdf_timer_create_impl` is unsafe and requ | |_____^ call to unsafe function | = note: consult the function's documentation for information on how to avoid undefined behavior - = note: this error originates in the macro `macros::call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::__proc_macros::call_unsafe_wdf_function_binding` which comes from the expansion of the macro `call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_device_create.expanded.rs b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_device_create.expanded.rs similarity index 74% rename from crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_device_create.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_device_create.expanded.rs index 0493e6bd..a14a2c7f 100644 --- a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_device_create.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_device_create.expanded.rs @@ -1,20 +1,21 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; extern "C" fn evt_driver_device_add( - _driver: WDFDRIVER, - mut device_init: *mut WDFDEVICE_INIT, -) -> NTSTATUS { - let mut device_handle_output: WDFDEVICE = WDF_NO_HANDLE.cast(); + _driver: wdk_sys::WDFDRIVER, + mut device_init: *mut wdk_sys::WDFDEVICE_INIT, +) -> wdk_sys::NTSTATUS { + let mut device_handle_output: wdk_sys::WDFDEVICE = wdk_sys::WDF_NO_HANDLE.cast(); unsafe { { + use wdk_sys::*; #[must_use] #[inline(always)] + #[allow(non_snake_case)] unsafe fn wdf_device_create_impl( - DeviceInit: *mut wdk_sys::PWDFDEVICE_INIT, - DeviceAttributes: wdk_sys::PWDF_OBJECT_ATTRIBUTES, - Device: *mut wdk_sys::WDFDEVICE, - ) -> wdk_sys::NTSTATUS { + DeviceInit: *mut PWDFDEVICE_INIT, + DeviceAttributes: PWDF_OBJECT_ATTRIBUTES, + Device: *mut WDFDEVICE, + ) -> NTSTATUS { let wdf_function: wdk_sys::PFN_WDFDEVICECREATE = Some(unsafe { core::mem::transmute( wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfDeviceCreateTableIndex @@ -43,7 +44,7 @@ extern "C" fn evt_driver_device_add( } wdf_device_create_impl( &mut device_init, - WDF_NO_OBJECT_ATTRIBUTES, + wdk_sys::WDF_NO_OBJECT_ATTRIBUTES, &mut device_handle_output, ) } diff --git a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_device_create.rs b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_device_create.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/stable/macrotest/wdf_device_create.rs rename to tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_device_create.rs diff --git a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.expanded.rs b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_device_create_device_interface.expanded.rs similarity index 81% rename from crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_device_create_device_interface.expanded.rs index afd81d27..86fa0492 100644 --- a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_device_create_device_interface.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_device_create_device_interface.expanded.rs @@ -1,22 +1,23 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; -const GUID_DEVINTERFACE_COMPORT: GUID = GUID { +const GUID_DEVINTERFACE_COMPORT: wdk_sys::GUID = wdk_sys::GUID { Data1: 0x86E0D1E0u32, Data2: 0x8089u16, Data3: 0x11D0u16, Data4: [0x9Cu8, 0xE4u8, 0x08u8, 0x00u8, 0x3Eu8, 0x30u8, 0x1Fu8, 0x73u8], }; -fn create_device_interface(wdf_device: WDFDEVICE) -> NTSTATUS { +fn create_device_interface(wdf_device: wdk_sys::WDFDEVICE) -> wdk_sys::NTSTATUS { unsafe { { + use wdk_sys::*; #[must_use] #[inline(always)] + #[allow(non_snake_case)] unsafe fn wdf_device_create_device_interface_impl( - Device: wdk_sys::WDFDEVICE, - InterfaceClassGUID: *const wdk_sys::GUID, - ReferenceString: wdk_sys::PCUNICODE_STRING, - ) -> wdk_sys::NTSTATUS { + Device: WDFDEVICE, + InterfaceClassGUID: *const GUID, + ReferenceString: PCUNICODE_STRING, + ) -> NTSTATUS { let wdf_function: wdk_sys::PFN_WDFDEVICECREATEDEVICEINTERFACE = Some(unsafe { core::mem::transmute( wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfDeviceCreateDeviceInterfaceTableIndex diff --git a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_device_create_device_interface.rs b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_device_create_device_interface.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/stable/macrotest/wdf_device_create_device_interface.rs rename to tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_device_create_device_interface.rs diff --git a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_driver_create.expanded.rs b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_driver_create.expanded.rs similarity index 66% rename from crates/wdk-macros/tests/outputs/beta/macrotest/wdf_driver_create.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_driver_create.expanded.rs index ab9abe4a..d59e4f62 100644 --- a/crates/wdk-macros/tests/outputs/beta/macrotest/wdf_driver_create.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_driver_create.expanded.rs @@ -1,27 +1,28 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; #[export_name = "DriverEntry"] pub extern "system" fn driver_entry( - driver: &mut DRIVER_OBJECT, - registry_path: PCUNICODE_STRING, -) -> NTSTATUS { - let mut driver_config = WDF_DRIVER_CONFIG { - Size: core::mem::size_of::() as ULONG, - ..WDF_DRIVER_CONFIG::default() + driver: wdk_sys::PDRIVER_OBJECT, + registry_path: wdk_sys::PCUNICODE_STRING, +) -> wdk_sys::NTSTATUS { + let mut driver_config = wdk_sys::WDF_DRIVER_CONFIG { + Size: core::mem::size_of::() as wdk_sys::ULONG, + ..Default::default() }; - let driver_handle_output = WDF_NO_HANDLE as *mut WDFDRIVER; + let driver_handle_output = wdk_sys::WDF_NO_HANDLE as *mut wdk_sys::WDFDRIVER; unsafe { { + use wdk_sys::*; #[must_use] #[inline(always)] + #[allow(non_snake_case)] unsafe fn wdf_driver_create_impl( - DriverObject: wdk_sys::PDRIVER_OBJECT, - RegistryPath: wdk_sys::PCUNICODE_STRING, - DriverAttributes: wdk_sys::PWDF_OBJECT_ATTRIBUTES, - DriverConfig: wdk_sys::PWDF_DRIVER_CONFIG, - Driver: *mut wdk_sys::WDFDRIVER, - ) -> wdk_sys::NTSTATUS { + DriverObject: PDRIVER_OBJECT, + RegistryPath: PCUNICODE_STRING, + DriverAttributes: PWDF_OBJECT_ATTRIBUTES, + DriverConfig: PWDF_DRIVER_CONFIG, + Driver: *mut WDFDRIVER, + ) -> NTSTATUS { let wdf_function: wdk_sys::PFN_WDFDRIVERCREATE = Some(unsafe { core::mem::transmute( wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfDriverCreateTableIndex @@ -51,9 +52,9 @@ pub extern "system" fn driver_entry( } } wdf_driver_create_impl( - driver as PDRIVER_OBJECT, + driver, registry_path, - WDF_NO_OBJECT_ATTRIBUTES, + wdk_sys::WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output, ) diff --git a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_driver_create.rs b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_driver_create.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/stable/macrotest/wdf_driver_create.rs rename to tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_driver_create.rs diff --git a/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_request_retrieve_output_buffer.expanded.rs b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_request_retrieve_output_buffer.expanded.rs new file mode 100644 index 00000000..1965dffa --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_request_retrieve_output_buffer.expanded.rs @@ -0,0 +1,53 @@ +#![no_main] +#![deny(warnings)] +fn process_wdf_request(request: wdk_sys::WDFREQUEST) { + let minimum_required_buffer_size = 32; + let mut output_buffer_ptr = std::ptr::null_mut(); + let _nt_status = unsafe { + { + use wdk_sys::*; + #[must_use] + #[inline(always)] + #[allow(non_snake_case)] + unsafe fn wdf_request_retrieve_output_buffer_impl( + Request: WDFREQUEST, + MinimumRequiredSize: usize, + Buffer: *mut PVOID, + Length: *mut usize, + ) -> NTSTATUS { + let wdf_function: wdk_sys::PFN_WDFREQUESTRETRIEVEOUTPUTBUFFER = Some(unsafe { + core::mem::transmute( + wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfRequestRetrieveOutputBufferTableIndex + as usize], + ) + }); + if let Some(wdf_function) = wdf_function { + unsafe { + (wdf_function)( + wdk_sys::WdfDriverGlobals, + Request, + MinimumRequiredSize, + Buffer, + Length, + ) + } + } else { + { + ::core::panicking::panic_fmt( + format_args!( + "internal error: entered unreachable code: {0}", + format_args!("Option should never be None"), + ), + ); + }; + } + } + wdf_request_retrieve_output_buffer_impl( + request, + minimum_required_buffer_size, + &mut output_buffer_ptr, + std::ptr::null_mut(), + ) + } + }; +} diff --git a/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_request_retrieve_output_buffer.rs b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_request_retrieve_output_buffer.rs new file mode 120000 index 00000000..f3862589 --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_request_retrieve_output_buffer.rs @@ -0,0 +1 @@ +../../../inputs/macrotest/wdf_request_retrieve_output_buffer.rs \ No newline at end of file diff --git a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.expanded.rs b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_spin_lock_acquire.expanded.rs similarity index 84% rename from crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_spin_lock_acquire.expanded.rs index 1ba0841a..4c5562ef 100644 --- a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_spin_lock_acquire.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_spin_lock_acquire.expanded.rs @@ -1,11 +1,12 @@ #![no_main] #![deny(warnings)] -use wdk_sys::*; -fn acquire_lock(wdf_spin_lock: WDFSPINLOCK) { +fn acquire_lock(wdf_spin_lock: wdk_sys::WDFSPINLOCK) { unsafe { { + use wdk_sys::*; #[inline(always)] - unsafe fn wdf_spin_lock_acquire_impl(SpinLock: wdk_sys::WDFSPINLOCK) { + #[allow(non_snake_case)] + unsafe fn wdf_spin_lock_acquire_impl(SpinLock: WDFSPINLOCK) { let wdf_function: wdk_sys::PFN_WDFSPINLOCKACQUIRE = Some(unsafe { core::mem::transmute( wdk_sys::WDF_FUNCTION_TABLE[wdk_sys::_WDFFUNCENUM::WdfSpinLockAcquireTableIndex diff --git a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_spin_lock_acquire.rs b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_spin_lock_acquire.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/stable/macrotest/wdf_spin_lock_acquire.rs rename to tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_spin_lock_acquire.rs diff --git a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.expanded.rs b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_verifier_dbg_break_point.expanded.rs similarity index 94% rename from crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.expanded.rs rename to tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_verifier_dbg_break_point.expanded.rs index ae3e107c..b56d8950 100644 --- a/crates/wdk-macros/tests/outputs/nightly/macrotest/wdf_verifier_dbg_break_point.expanded.rs +++ b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_verifier_dbg_break_point.expanded.rs @@ -1,11 +1,11 @@ #![no_main] #![deny(warnings)] -#[allow(unused_imports)] -use wdk_sys::*; fn foo() { unsafe { { + use wdk_sys::*; #[inline(always)] + #[allow(non_snake_case)] unsafe fn wdf_verifier_dbg_break_point_impl() { let wdf_function: wdk_sys::PFN_WDFVERIFIERDBGBREAKPOINT = Some(unsafe { core::mem::transmute( diff --git a/crates/wdk-macros/tests/outputs/stable/macrotest/wdf_verifier_dbg_break_point.rs b/tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_verifier_dbg_break_point.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/stable/macrotest/wdf_verifier_dbg_break_point.rs rename to tests/wdk-macros-tests/tests/outputs/stable/macrotest/wdf_verifier_dbg_break_point.rs diff --git a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_api_that_does_not_exist.rs b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_api_that_does_not_exist.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/stable/trybuild/wdf_api_that_does_not_exist.rs rename to tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_api_that_does_not_exist.rs diff --git a/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_api_that_does_not_exist.stderr b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_api_that_does_not_exist.stderr new file mode 100644 index 00000000..38cf6a55 --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_api_that_does_not_exist.stderr @@ -0,0 +1,5 @@ +error: Failed to find type alias definition for PFN_WDFAPITHATDOESNOTEXIST + --> tests/outputs/stable/trybuild/wdf_api_that_does_not_exist.rs + | + | unsafe { call_unsafe_wdf_function_binding!(WdfApiThatDoesNotExist, driver as PDRIVER_OBJECT,) } + | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_device_create_unused_return_type.rs b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_device_create_unused_return_type.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/stable/trybuild/wdf_device_create_unused_return_type.rs rename to tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_device_create_unused_return_type.rs diff --git a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_device_create_unused_return_type.stderr b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_device_create_unused_return_type.stderr similarity index 66% rename from crates/wdk-macros/tests/outputs/stable/trybuild/wdf_device_create_unused_return_type.stderr rename to tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_device_create_unused_return_type.stderr index e6f9f649..3c82121a 100644 --- a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_device_create_unused_return_type.stderr +++ b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_device_create_unused_return_type.stderr @@ -1,7 +1,7 @@ error: unused return value of `wdf_device_create_impl` that must be used --> tests/outputs/stable/trybuild/wdf_device_create_unused_return_type.rs | - | / wdk_macros::call_unsafe_wdf_function_binding!( + | / call_unsafe_wdf_function_binding!( | | WdfDeviceCreate, | | &mut device_init, | | WDF_NO_OBJECT_ATTRIBUTES, @@ -15,4 +15,4 @@ note: the lint level is defined here | #![deny(warnings)] | ^^^^^^^^ = note: `#[deny(unused_must_use)]` implied by `#[deny(warnings)]` - = note: this error originates in the macro `wdk_macros::call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::__proc_macros::call_unsafe_wdf_function_binding` which comes from the expansion of the macro `call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.rs b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.rs rename to tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.rs diff --git a/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.stderr b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.stderr new file mode 100644 index 00000000..49c29fb5 --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.stderr @@ -0,0 +1,36 @@ +error[E0061]: this function takes 5 arguments but 4 arguments were supplied + --> tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.rs + | + | / call_unsafe_wdf_function_binding!( + | | WdfDriverCreate, + | | driver as PDRIVER_OBJECT, + | | registry_path, +... | + | | &mut driver_config, + | | ------------------ an argument of type `*mut _WDF_OBJECT_ATTRIBUTES` is missing + | | driver_handle_output, + | | ) + | |_________^ + | +note: function defined here + --> tests/outputs/stable/trybuild/wdf_driver_create_missing_arg.rs + | + | / call_unsafe_wdf_function_binding!( + | | WdfDriverCreate, + | | driver as PDRIVER_OBJECT, + | | registry_path, +... | + | | driver_handle_output, + | | ) + | |_________^ + | |_________| + | |_________| + | |_________| + | |_________| + | + = note: this error originates in the macro `$crate::__proc_macros::call_unsafe_wdf_function_binding` which comes from the expansion of the macro `call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) +help: provide the argument + --> $OUT_DIR[wdk-sys]/call_unsafe_wdf_function_binding.rs + | + | )(driver as PDRIVER_OBJECT, registry_path, /* *mut _WDF_OBJECT_ATTRIBUTES */, &mut driver_config, driver_handle_output) + | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.rs b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.rs rename to tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.rs diff --git a/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.stderr b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.stderr new file mode 100644 index 00000000..423f58b1 --- /dev/null +++ b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.stderr @@ -0,0 +1,38 @@ +error[E0308]: arguments to this function are incorrect + --> tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.rs + | + | / call_unsafe_wdf_function_binding!( + | | WdfDriverCreate, + | | driver as PDRIVER_OBJECT, + | | registry_path, + | | // The order of the next two arguments is swapped! + | | &mut driver_config, + | | ------------------ expected `*mut _WDF_OBJECT_ATTRIBUTES`, found `&mut _WDF_DRIVER_CONFIG` + | | WDF_NO_OBJECT_ATTRIBUTES, + | | ------------------------ expected `*mut _WDF_DRIVER_CONFIG`, found `*mut _WDF_OBJECT_ATTRIBUTES` + | | driver_handle_output, + | | ) + | |_________^ + | +note: function defined here + --> tests/outputs/stable/trybuild/wdf_driver_create_wrong_arg_order.rs + | + | / call_unsafe_wdf_function_binding!( + | | WdfDriverCreate, + | | driver as PDRIVER_OBJECT, + | | registry_path, +... | + | | driver_handle_output, + | | ) + | |_________^ + | |_________| + | |_________| + | |_________| + | |_________| + | + = note: this error originates in the macro `$crate::__proc_macros::call_unsafe_wdf_function_binding` which comes from the expansion of the macro `call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) +help: swap these arguments + --> $OUT_DIR[wdk-sys]/call_unsafe_wdf_function_binding.rs + | + | )(driver as PDRIVER_OBJECT, registry_path, WDF_NO_OBJECT_ATTRIBUTES, &mut driver_config, driver_handle_output) + | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_timer_create_missing_unsafe.rs b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_timer_create_missing_unsafe.rs similarity index 100% rename from crates/wdk-macros/tests/outputs/stable/trybuild/wdf_timer_create_missing_unsafe.rs rename to tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_timer_create_missing_unsafe.rs diff --git a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_timer_create_missing_unsafe.stderr b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_timer_create_missing_unsafe.stderr similarity index 60% rename from crates/wdk-macros/tests/outputs/stable/trybuild/wdf_timer_create_missing_unsafe.stderr rename to tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_timer_create_missing_unsafe.stderr index 089f1ccb..df223a99 100644 --- a/crates/wdk-macros/tests/outputs/stable/trybuild/wdf_timer_create_missing_unsafe.stderr +++ b/tests/wdk-macros-tests/tests/outputs/stable/trybuild/wdf_timer_create_missing_unsafe.stderr @@ -1,7 +1,7 @@ error[E0133]: call to unsafe function `wdf_timer_create_impl` is unsafe and requires unsafe function or block --> tests/outputs/stable/trybuild/wdf_timer_create_missing_unsafe.rs | - | let _nt_status = macros::call_unsafe_wdf_function_binding!( + | let _nt_status = call_unsafe_wdf_function_binding!( | ______________________^ | | WdfTimerCreate, | | timer_config, @@ -11,4 +11,4 @@ error[E0133]: call to unsafe function `wdf_timer_create_impl` is unsafe and requ | |_____^ call to unsafe function | = note: consult the function's documentation for information on how to avoid undefined behavior - = note: this error originates in the macro `macros::call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `$crate::__proc_macros::call_unsafe_wdf_function_binding` which comes from the expansion of the macro `call_unsafe_wdf_function_binding` (in Nightly builds, run with -Z macro-backtrace for more info)