Files
time-mocker/crates/time-mocker-hook/Cargo.toml
T
tiennm99 f4bd35ae5b fix(hook): harden detour install, unload, and delta reconnection
Initialize every detour before enabling any, so a hook body that calls
another detour's trampoline can never hit an uninitialized detour and abort
the process. Pin the module on load so unloading can no longer leave
kernel32/ntdll patched to jump into freed memory. On a failed FILETIME
conversion, fall through to the real time instead of returning an
uninitialized SYSTEMTIME. Reconnect the shared delta mapping lazily so
setting a delta after injection takes effect instead of being disabled
forever. Add host-agnostic tick-conversion tests.
2026-09-21 16:13:17 +07:00

30 lines
837 B
TOML

[package]
name = "time-mocker-hook"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
rust-version.workspace = true
description = "Injected DLL that hooks Win32 time APIs"
[lib]
name = "time_mocker_hook"
crate-type = ["cdylib"]
path = "src/lib.rs"
[dependencies]
time-mocker-core = { path = "../time-mocker-core" }
# Pre-release range: no stable retour release ships static-detour inline x64 hooking yet.
retour = { version = "0.4.0-alpha.4", features = ["static-detour"] }
once_cell = "1.20"
windows-sys = { workspace = true, features = [
"Win32_Foundation",
"Win32_System_Diagnostics_Debug",
"Win32_System_LibraryLoader",
"Win32_System_Memory",
"Win32_System_Threading",
"Win32_System_SystemServices",
"Win32_System_Time",
] }