[INFO] fetching crate hook_king 0.1.4... [INFO] checking hook_king-0.1.4 against try#a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d for pr-145342-1 [INFO] extracting crate hook_king 0.1.4 into /workspace/builds/worker-0-tc2/source [INFO] started tweaking crates.io crate hook_king 0.1.4 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate hook_king 0.1.4 [INFO] tweaked toml for crates.io crate hook_king 0.1.4 written to /workspace/builds/worker-0-tc2/source/Cargo.toml [INFO] validating manifest of crates.io crate hook_king 0.1.4 on toolchain a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate hook_king 0.1.4 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: only one of `license` or `license-file` is necessary [INFO] [stderr] `license` should be used if the package license can be expressed with a standard SPDX expression. [INFO] [stderr] `license-file` should be used if the package uses a non-standard license. [INFO] [stderr] See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information. [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0e57db005a96604f0a7d26574cdb9f4c239e4038e9ae7dcfd9894c3c552723f9 [INFO] running `Command { std: "docker" "start" "-a" "0e57db005a96604f0a7d26574cdb9f4c239e4038e9ae7dcfd9894c3c552723f9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0e57db005a96604f0a7d26574cdb9f4c239e4038e9ae7dcfd9894c3c552723f9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0e57db005a96604f0a7d26574cdb9f4c239e4038e9ae7dcfd9894c3c552723f9", kill_on_drop: false }` [INFO] [stdout] 0e57db005a96604f0a7d26574cdb9f4c239e4038e9ae7dcfd9894c3c552723f9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] fce47253517201f3f056b69dbadfe5a0cb4bbd833984757e16b7ed199175af2f [INFO] running `Command { std: "docker" "start" "-a" "fce47253517201f3f056b69dbadfe5a0cb4bbd833984757e16b7ed199175af2f", kill_on_drop: false }` [INFO] [stderr] warning: only one of `license` or `license-file` is necessary [INFO] [stderr] `license` should be used if the package license can be expressed with a standard SPDX expression. [INFO] [stderr] `license-file` should be used if the package uses a non-standard license. [INFO] [stderr] See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information. [INFO] [stderr] Compiling autocfg v1.5.0 [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Compiling parking_lot_core v0.9.11 [INFO] [stderr] Compiling winapi v0.3.9 [INFO] [stderr] Compiling crossbeam-utils v0.8.21 [INFO] [stderr] Compiling ntapi v0.4.1 [INFO] [stderr] Checking cfg-if v1.0.1 [INFO] [stderr] Compiling paste v1.0.15 [INFO] [stderr] Checking scopeguard v1.2.0 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking lazy_static v1.5.0 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Checking iced-x86 v1.21.0 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Checking hook_king v0.1.4 (/opt/rustwide/workdir) [INFO] [stdout] error[E0433]: failed to resolve: could not find `windows` in `os` [INFO] [stdout] --> src/lib.rs:5:38 [INFO] [stdout] | [INFO] [stdout] 5 | use std::{ffi::{CString, OsStr}, os::windows::ffi::OsStrExt, sync::{Arc, OnceLock}}; [INFO] [stdout] | ^^^^^^^ could not find `windows` in `os` [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> /rustc/a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d/library/std/src/os/mod.rs:56:5 [INFO] [stdout] | [INFO] [stdout] = note: the item is gated here [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> /rustc/a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d/library/std/src/os/mod.rs:120:10 [INFO] [stdout] | [INFO] [stdout] = note: the item is gated here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: could not find `windows` in `os` [INFO] [stdout] --> src/lib.rs:5:38 [INFO] [stdout] | [INFO] [stdout] 5 | use std::{ffi::{CString, OsStr}, os::windows::ffi::OsStrExt, sync::{Arc, OnceLock}}; [INFO] [stdout] | ^^^^^^^ could not find `windows` in `os` [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> /rustc/a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d/library/std/src/os/mod.rs:56:5 [INFO] [stdout] | [INFO] [stdout] = note: the item is gated here [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> /rustc/a4980311fb7bb9e7893708e6bd3fbbfb2819fd3d/library/std/src/os/mod.rs:120:10 [INFO] [stdout] | [INFO] [stdout] = note: the item is gated here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: could not find `um` in `winapi` [INFO] [stdout] --> src/lib.rs:623:48 [INFO] [stdout] | [INFO] [stdout] 623 | NT_SUCCESS(status) && mbi.State == winapi::um::winnt::MEM_COMMIT [INFO] [stdout] | ^^ could not find `um` in `winapi` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: could not find `um` in `winapi` [INFO] [stdout] --> src/lib.rs:1078:37 [INFO] [stdout] | [INFO] [stdout] 1078 | fn get_architecture(handle: winapi::um::winnt::HANDLE) -> Result> { [INFO] [stdout] | ^^ could not find `um` in `winapi` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of unresolved module or unlinked crate `process` [INFO] [stdout] --> src/lib.rs:339:17 [INFO] [stdout] | [INFO] [stdout] 339 | let pid = process::id(); [INFO] [stdout] | ^^^^^^^ use of unresolved module or unlinked crate `process` [INFO] [stdout] | [INFO] [stdout] help: an enum with a similar name exists [INFO] [stdout] | [INFO] [stdout] 339 - let pid = process::id(); [INFO] [stdout] 339 + let pid = Process::id(); [INFO] [stdout] | [INFO] [stdout] help: there is a crate or module with a similar name [INFO] [stdout] | [INFO] [stdout] 339 - let pid = process::id(); [INFO] [stdout] 339 + let pid = Process::id(); [INFO] [stdout] | [INFO] [stdout] help: consider importing this module [INFO] [stdout] | [INFO] [stdout] 1 + use std::process; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `MEMORY_BASIC_INFORMATION` in this scope [INFO] [stdout] --> src/lib.rs:618:18 [INFO] [stdout] | [INFO] [stdout] 618 | let mut mbi: MEMORY_BASIC_INFORMATION = unsafe { std::mem::zeroed() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:539 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, P... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `MemoryBasicInformation` in this scope [INFO] [stdout] --> src/lib.rs:621:87 [INFO] [stdout] | [INFO] [stdout] 621 | let status = unsafe { NtQueryVirtualMemory(self.process.get() as _, address as _, MemoryBasicInformation, &mut mbi as *mut _ as _, si... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:23 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `MEMORY_BASIC_INFORMATION` in this scope [INFO] [stdout] --> src/lib.rs:621:146 [INFO] [stdout] | [INFO] [stdout] 621 | ...mation, &mut mbi as *mut _ as _, size_of::(), &mut ret_len) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:539 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, P... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] help: you might be missing a type parameter [INFO] [stdout] | [INFO] [stdout] 319 | impl HookKing { [INFO] [stdout] | ++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `PAGE_EXECUTE_READWRITE` in this scope [INFO] [stdout] --> src/lib.rs:632:93 [INFO] [stdout] | [INFO] [stdout] 632 | let status = NtProtectVirtualMemory(self.process.get() as _, &mut address, &mut size, PAGE_EXECUTE_READWRITE, &mut old_protect); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:565 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, PAGE_EXECUTE_READWRITE}, ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `MEMORY_BASIC_INFORMATION` in this scope [INFO] [stdout] --> src/lib.rs:797:23 [INFO] [stdout] | [INFO] [stdout] 797 | let mut mem_info: MEMORY_BASIC_INFORMATION = unsafe { std::mem::zeroed() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:539 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, P... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `MemoryBasicInformation` in this scope [INFO] [stdout] --> src/lib.rs:806:81 [INFO] [stdout] | [INFO] [stdout] 806 | let status = unsafe { NtQueryVirtualMemory(process, current_address as _, MemoryBasicInformation, &mut mem_info as *mut _ as _, siz... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:23 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `MEMORY_BASIC_INFORMATION` in this scope [INFO] [stdout] --> src/lib.rs:806:145 [INFO] [stdout] | [INFO] [stdout] 806 | ...n, &mut mem_info as *mut _ as _, size_of::(), &mut return_length as *mut _ as *mut _) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:539 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, P... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] help: you might be missing a type parameter [INFO] [stdout] | [INFO] [stdout] 319 | impl HookKing { [INFO] [stdout] | ++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `MEM_FREE` in this scope [INFO] [stdout] --> src/lib.rs:809:30 [INFO] [stdout] | [INFO] [stdout] 809 | if mem_info.State == MEM_FREE && mem_info.RegionSize >= PAGE_SIZE { [INFO] [stdout] | ^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:516 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, M... [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `MEM_RESERVE` in this scope [INFO] [stdout] --> src/lib.rs:813:112 [INFO] [stdout] | [INFO] [stdout] 813 | ...process, &mut base_address, 0, &mut region_size, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE) }; [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:526 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, M... [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `MEM_COMMIT` in this scope [INFO] [stdout] --> src/lib.rs:813:126 [INFO] [stdout] | [INFO] [stdout] 813 | ... base_address, 0, &mut region_size, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE) }; [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:504 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, M... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `PAGE_EXECUTE_READWRITE` in this scope [INFO] [stdout] --> src/lib.rs:813:138 [INFO] [stdout] | [INFO] [stdout] 813 | ...&mut region_size, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:565 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, PAGE_EXECUTE_READWRITE}, ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `MEMORY_BASIC_INFORMATION` in this scope [INFO] [stdout] --> src/lib.rs:835:23 [INFO] [stdout] | [INFO] [stdout] 835 | let mut mem_info: MEMORY_BASIC_INFORMATION = unsafe { std::mem::zeroed() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:539 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, P... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `MemoryBasicInformation` in this scope [INFO] [stdout] --> src/lib.rs:838:87 [INFO] [stdout] | [INFO] [stdout] 838 | let status = unsafe { NtQueryVirtualMemory(self.process.get() as _, address as _, MemoryBasicInformation, &mut mem_info as *mut _ as ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:23 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `MEMORY_BASIC_INFORMATION` in this scope [INFO] [stdout] --> src/lib.rs:838:151 [INFO] [stdout] | [INFO] [stdout] 838 | ...n, &mut mem_info as *mut _ as _, size_of::(), &mut return_length as *mut _ as *mut _) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:539 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, P... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] help: you might be missing a type parameter [INFO] [stdout] | [INFO] [stdout] 319 | impl HookKing { [INFO] [stdout] | ++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `CString` and `OsStr` [INFO] [stdout] --> src/lib.rs:5:17 [INFO] [stdout] | [INFO] [stdout] 5 | use std::{ffi::{CString, OsStr}, os::windows::ffi::OsStrExt, sync::{Arc, OnceLock}}; [INFO] [stdout] | ^^^^^^^ ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NtQueryVirtualMemory` in this scope [INFO] [stdout] --> src/lib.rs:621:27 [INFO] [stdout] | [INFO] [stdout] 621 | let status = unsafe { NtQueryVirtualMemory(self.process.get() as _, address as _, MemoryBasicInformation, &mut mbi as *mut _ as _, si... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:96 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NT_SUCCESS` in this scope [INFO] [stdout] --> src/lib.rs:623:5 [INFO] [stdout] | [INFO] [stdout] 623 | NT_SUCCESS(status) && mbi.State == winapi::um::winnt::MEM_COMMIT [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:29 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessM... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NtProtectVirtualMemory` in this scope [INFO] [stdout] --> src/lib.rs:632:20 [INFO] [stdout] | [INFO] [stdout] 632 | let status = NtProtectVirtualMemory(self.process.get() as _, &mut address, &mut size, PAGE_EXECUTE_READWRITE, &mut old_protect); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:72 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NT_SUCCESS` in this scope [INFO] [stdout] --> src/lib.rs:634:10 [INFO] [stdout] | [INFO] [stdout] 634 | if NT_SUCCESS(status) { Ok(()) } else { Err(format!("Failed to change protection. Status: {:#X}, error: {:#X?}", status, std::io::E... [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:29 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessM... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `ReadProcessMemory` in this scope [INFO] [stdout] --> src/lib.rs:792:17 [INFO] [stdout] | [INFO] [stdout] 792 | if unsafe { ReadProcessMemory(self.process.get() as _, address as _, bytes.as_mut_ptr() as *mut _, length, &mut bytes_read) == 1 } { ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:106 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessM... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NtQueryVirtualMemory` in this scope [INFO] [stdout] --> src/lib.rs:806:29 [INFO] [stdout] | [INFO] [stdout] 806 | let status = unsafe { NtQueryVirtualMemory(process, current_address as _, MemoryBasicInformation, &mut mem_info as *mut _ as _, siz... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:96 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NT_SUCCESS` in this scope [INFO] [stdout] --> src/lib.rs:808:10 [INFO] [stdout] | [INFO] [stdout] 808 | if NT_SUCCESS(status) { [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:29 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessM... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NtAllocateVirtualMemory` in this scope [INFO] [stdout] --> src/lib.rs:813:39 [INFO] [stdout] | [INFO] [stdout] 813 | ... let alloc_status = unsafe { NtAllocateVirtualMemory(process, &mut base_address, 0, &mut region_size, MEM_RESERVE | MEM_COMMIT, PAGE... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:47 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NT_SUCCESS` in this scope [INFO] [stdout] --> src/lib.rs:815:14 [INFO] [stdout] | [INFO] [stdout] 815 | if NT_SUCCESS(alloc_status) && !base_address.is_null() { [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:29 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessM... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NtQueryVirtualMemory` in this scope [INFO] [stdout] --> src/lib.rs:838:27 [INFO] [stdout] | [INFO] [stdout] 838 | let status = unsafe { NtQueryVirtualMemory(self.process.get() as _, address as _, MemoryBasicInformation, &mut mem_info as *mut _ as ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:96 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NT_SUCCESS` in this scope [INFO] [stdout] --> src/lib.rs:840:8 [INFO] [stdout] | [INFO] [stdout] 840 | if NT_SUCCESS(status) { Ok(mem_info.RegionSize) } else { Err(format!("Failed to retrieve region size, status {:#X?}, error: {:#X?}", ... [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:29 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessM... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `GetCurrentProcess` in this scope [INFO] [stdout] --> src/lib.rs:1076:75 [INFO] [stdout] | [INFO] [stdout] 1076 | fn arch() -> u32 { *ARCHITECTURE.get_or_init(|| get_architecture(unsafe { GetCurrentProcess() }).unwrap_or(64)) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:477 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, w... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `IsWow64Process` in this scope [INFO] [stdout] --> src/lib.rs:1080:25 [INFO] [stdout] | [INFO] [stdout] 1080 | let result = unsafe { IsWow64Process(handle, &mut is_wow64) }; [INFO] [stdout] | ^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:603 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, PAGE_EXECUTE_READWRITE}, wow64apiset::IsWow64Process}}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: could not find `um` in `winapi` [INFO] [stdout] --> src/lib.rs:623:48 [INFO] [stdout] | [INFO] [stdout] 623 | NT_SUCCESS(status) && mbi.State == winapi::um::winnt::MEM_COMMIT [INFO] [stdout] | ^^ could not find `um` in `winapi` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0412, E0425, E0433. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0412`. [INFO] [stdout] [INFO] [stderr] error: could not compile `hook_king` (lib) due to 31 previous errors; 1 warning emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0433]: failed to resolve: could not find `um` in `winapi` [INFO] [stdout] --> src/lib.rs:1078:37 [INFO] [stdout] | [INFO] [stdout] 1078 | fn get_architecture(handle: winapi::um::winnt::HANDLE) -> Result> { [INFO] [stdout] | ^^ could not find `um` in `winapi` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of unresolved module or unlinked crate `process` [INFO] [stdout] --> src/lib.rs:339:17 [INFO] [stdout] | [INFO] [stdout] 339 | let pid = process::id(); [INFO] [stdout] | ^^^^^^^ use of unresolved module or unlinked crate `process` [INFO] [stdout] | [INFO] [stdout] help: an enum with a similar name exists [INFO] [stdout] | [INFO] [stdout] 339 - let pid = process::id(); [INFO] [stdout] 339 + let pid = Process::id(); [INFO] [stdout] | [INFO] [stdout] help: there is a crate or module with a similar name [INFO] [stdout] | [INFO] [stdout] 339 - let pid = process::id(); [INFO] [stdout] 339 + let pid = Process::id(); [INFO] [stdout] | [INFO] [stdout] help: consider importing this module [INFO] [stdout] | [INFO] [stdout] 1 + use std::process; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `MEMORY_BASIC_INFORMATION` in this scope [INFO] [stdout] --> src/lib.rs:618:18 [INFO] [stdout] | [INFO] [stdout] 618 | let mut mbi: MEMORY_BASIC_INFORMATION = unsafe { std::mem::zeroed() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:539 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, P... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `MemoryBasicInformation` in this scope [INFO] [stdout] --> src/lib.rs:621:87 [INFO] [stdout] | [INFO] [stdout] 621 | let status = unsafe { NtQueryVirtualMemory(self.process.get() as _, address as _, MemoryBasicInformation, &mut mbi as *mut _ as _, si... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:23 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `MEMORY_BASIC_INFORMATION` in this scope [INFO] [stdout] --> src/lib.rs:621:146 [INFO] [stdout] | [INFO] [stdout] 621 | ...mation, &mut mbi as *mut _ as _, size_of::(), &mut ret_len) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:539 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, P... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] help: you might be missing a type parameter [INFO] [stdout] | [INFO] [stdout] 319 | impl HookKing { [INFO] [stdout] | ++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `PAGE_EXECUTE_READWRITE` in this scope [INFO] [stdout] --> src/lib.rs:632:93 [INFO] [stdout] | [INFO] [stdout] 632 | let status = NtProtectVirtualMemory(self.process.get() as _, &mut address, &mut size, PAGE_EXECUTE_READWRITE, &mut old_protect); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:565 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, PAGE_EXECUTE_READWRITE}, ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `MEMORY_BASIC_INFORMATION` in this scope [INFO] [stdout] --> src/lib.rs:797:23 [INFO] [stdout] | [INFO] [stdout] 797 | let mut mem_info: MEMORY_BASIC_INFORMATION = unsafe { std::mem::zeroed() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:539 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, P... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `MemoryBasicInformation` in this scope [INFO] [stdout] --> src/lib.rs:806:81 [INFO] [stdout] | [INFO] [stdout] 806 | let status = unsafe { NtQueryVirtualMemory(process, current_address as _, MemoryBasicInformation, &mut mem_info as *mut _ as _, siz... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:23 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `MEMORY_BASIC_INFORMATION` in this scope [INFO] [stdout] --> src/lib.rs:806:145 [INFO] [stdout] | [INFO] [stdout] 806 | ...n, &mut mem_info as *mut _ as _, size_of::(), &mut return_length as *mut _ as *mut _) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:539 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, P... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] help: you might be missing a type parameter [INFO] [stdout] | [INFO] [stdout] 319 | impl HookKing { [INFO] [stdout] | ++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `MEM_FREE` in this scope [INFO] [stdout] --> src/lib.rs:809:30 [INFO] [stdout] | [INFO] [stdout] 809 | if mem_info.State == MEM_FREE && mem_info.RegionSize >= PAGE_SIZE { [INFO] [stdout] | ^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:516 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, M... [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `MEM_RESERVE` in this scope [INFO] [stdout] --> src/lib.rs:813:112 [INFO] [stdout] | [INFO] [stdout] 813 | ...process, &mut base_address, 0, &mut region_size, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE) }; [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:526 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, M... [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `MEM_COMMIT` in this scope [INFO] [stdout] --> src/lib.rs:813:126 [INFO] [stdout] | [INFO] [stdout] 813 | ... base_address, 0, &mut region_size, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE) }; [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:504 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, M... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `PAGE_EXECUTE_READWRITE` in this scope [INFO] [stdout] --> src/lib.rs:813:138 [INFO] [stdout] | [INFO] [stdout] 813 | ...&mut region_size, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:565 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, PAGE_EXECUTE_READWRITE}, ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `MEMORY_BASIC_INFORMATION` in this scope [INFO] [stdout] --> src/lib.rs:835:23 [INFO] [stdout] | [INFO] [stdout] 835 | let mut mem_info: MEMORY_BASIC_INFORMATION = unsafe { std::mem::zeroed() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:539 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, P... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `MemoryBasicInformation` in this scope [INFO] [stdout] --> src/lib.rs:838:87 [INFO] [stdout] | [INFO] [stdout] 838 | let status = unsafe { NtQueryVirtualMemory(self.process.get() as _, address as _, MemoryBasicInformation, &mut mem_info as *mut _ as ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:23 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `MEMORY_BASIC_INFORMATION` in this scope [INFO] [stdout] --> src/lib.rs:838:151 [INFO] [stdout] | [INFO] [stdout] 838 | ...n, &mut mem_info as *mut _ as _, size_of::(), &mut return_length as *mut _ as *mut _) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:539 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, P... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] help: you might be missing a type parameter [INFO] [stdout] | [INFO] [stdout] 319 | impl HookKing { [INFO] [stdout] | ++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `CString` and `OsStr` [INFO] [stdout] --> src/lib.rs:5:17 [INFO] [stdout] | [INFO] [stdout] 5 | use std::{ffi::{CString, OsStr}, os::windows::ffi::OsStrExt, sync::{Arc, OnceLock}}; [INFO] [stdout] | ^^^^^^^ ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NtQueryVirtualMemory` in this scope [INFO] [stdout] --> src/lib.rs:621:27 [INFO] [stdout] | [INFO] [stdout] 621 | let status = unsafe { NtQueryVirtualMemory(self.process.get() as _, address as _, MemoryBasicInformation, &mut mbi as *mut _ as _, si... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:96 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NT_SUCCESS` in this scope [INFO] [stdout] --> src/lib.rs:623:5 [INFO] [stdout] | [INFO] [stdout] 623 | NT_SUCCESS(status) && mbi.State == winapi::um::winnt::MEM_COMMIT [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:29 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessM... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NtProtectVirtualMemory` in this scope [INFO] [stdout] --> src/lib.rs:632:20 [INFO] [stdout] | [INFO] [stdout] 632 | let status = NtProtectVirtualMemory(self.process.get() as _, &mut address, &mut size, PAGE_EXECUTE_READWRITE, &mut old_protect); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:72 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NT_SUCCESS` in this scope [INFO] [stdout] --> src/lib.rs:634:10 [INFO] [stdout] | [INFO] [stdout] 634 | if NT_SUCCESS(status) { Ok(()) } else { Err(format!("Failed to change protection. Status: {:#X}, error: {:#X?}", status, std::io::E... [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:29 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessM... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `ReadProcessMemory` in this scope [INFO] [stdout] --> src/lib.rs:792:17 [INFO] [stdout] | [INFO] [stdout] 792 | if unsafe { ReadProcessMemory(self.process.get() as _, address as _, bytes.as_mut_ptr() as *mut _, length, &mut bytes_read) == 1 } { ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:106 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessM... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NtQueryVirtualMemory` in this scope [INFO] [stdout] --> src/lib.rs:806:29 [INFO] [stdout] | [INFO] [stdout] 806 | let status = unsafe { NtQueryVirtualMemory(process, current_address as _, MemoryBasicInformation, &mut mem_info as *mut _ as _, siz... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:96 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NT_SUCCESS` in this scope [INFO] [stdout] --> src/lib.rs:808:10 [INFO] [stdout] | [INFO] [stdout] 808 | if NT_SUCCESS(status) { [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:29 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessM... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NtAllocateVirtualMemory` in this scope [INFO] [stdout] --> src/lib.rs:813:39 [INFO] [stdout] | [INFO] [stdout] 813 | ... let alloc_status = unsafe { NtAllocateVirtualMemory(process, &mut base_address, 0, &mut region_size, MEM_RESERVE | MEM_COMMIT, PAGE... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:47 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NT_SUCCESS` in this scope [INFO] [stdout] --> src/lib.rs:815:14 [INFO] [stdout] | [INFO] [stdout] 815 | if NT_SUCCESS(alloc_status) && !base_address.is_null() { [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:29 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessM... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NtQueryVirtualMemory` in this scope [INFO] [stdout] --> src/lib.rs:838:27 [INFO] [stdout] | [INFO] [stdout] 838 | let status = unsafe { NtQueryVirtualMemory(self.process.get() as _, address as _, MemoryBasicInformation, &mut mem_info as *mut _ as ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:4:96 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 4 | use ntapi::{ntmmapi::{MemoryBasicInformation, NtAllocateVirtualMemory, NtProtectVirtualMemory, NtQueryVirtualMemory}, ntpsapi::NtCurrentP... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `NT_SUCCESS` in this scope [INFO] [stdout] --> src/lib.rs:840:8 [INFO] [stdout] | [INFO] [stdout] 840 | if NT_SUCCESS(status) { Ok(mem_info.RegionSize) } else { Err(format!("Failed to retrieve region size, status {:#X?}, error: {:#X?}", ... [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:29 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessM... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `GetCurrentProcess` in this scope [INFO] [stdout] --> src/lib.rs:1076:75 [INFO] [stdout] | [INFO] [stdout] 1076 | fn arch() -> u32 { *ARCHITECTURE.get_or_init(|| get_architecture(unsafe { GetCurrentProcess() }).unwrap_or(64)) } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:477 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, w... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function, tuple struct or tuple variant `IsWow64Process` in this scope [INFO] [stdout] --> src/lib.rs:1080:25 [INFO] [stdout] | [INFO] [stdout] 1080 | let result = unsafe { IsWow64Process(handle, &mut is_wow64) }; [INFO] [stdout] | ^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:7:603 [INFO] [stdout] | [INFO] [stdout] 6 | #[cfg(target_os = "windows")] [INFO] [stdout] | --------------------- the item is gated behind the `windows` feature [INFO] [stdout] 7 | use winapi::{shared::ntdef::NT_SUCCESS, um::{handleapi::{CloseHandle, INVALID_HANDLE_VALUE}, memoryapi::{ReadProcessMemory, WriteProcessMemory}, processthreadsapi::{GetCurrentProcessId, OpenProcess}, tlhelp32::{CreateToolhelp32Snapshot, MODULEENTRY32W, Module32FirstW, Module32NextW, PROCESSENTRY32, Process32First, Process32Next, TH32CS_SNAPMODULE, TH32CS_SNAPMODULE32, TH32CS_SNAPPROCESS}, winnt::PROCESS_ALL_ACCESS}, um::{libloaderapi::GetModuleHandleA, processthreadsapi::GetCurrentProcess, winnt::{MEM_COMMIT, MEM_FREE, MEM_RESERVE, MEMORY_BASIC_INFORMATION, PAGE_EXECUTE_READWRITE}, wow64apiset::IsWow64Process}}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0412, E0425, E0433. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0412`. [INFO] [stdout] [INFO] [stderr] error: could not compile `hook_king` (lib test) due to 31 previous errors; 1 warning emitted [INFO] running `Command { std: "docker" "inspect" "fce47253517201f3f056b69dbadfe5a0cb4bbd833984757e16b7ed199175af2f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fce47253517201f3f056b69dbadfe5a0cb4bbd833984757e16b7ed199175af2f", kill_on_drop: false }` [INFO] [stdout] fce47253517201f3f056b69dbadfe5a0cb4bbd833984757e16b7ed199175af2f