From 73ec61d39db4e8ea677d1c3c4f5adec0e8da4ffb Mon Sep 17 00:00:00 2001 From: Andrea Casale Date: Tue, 24 Nov 2026 01:57:51 +0100 Subject: [PATCH] net: skip newer-Windows-only exports in only_loopback_is_reachable WinHttpGetProxySettingsEx is absent from Windows 10's winhttp.dll, so the host-presence assertion panicked there. The HLE supplies it itself; skip it only when the host lacks it, keeping the check for every other export. Fixes #118 --- crates/victory-hle/src/modules/net.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/victory-hle/src/modules/net.rs b/crates/victory-hle/src/modules/net.rs index 6f61a27..09bd266 100644 --- a/crates/victory-hle/src/modules/net.rs +++ b/crates/victory-hle/src/modules/net.rs @@ -1048,15 +1048,23 @@ mod tests { named.name ); } - // Every override names a real export of its DLL. + // Every override names a real export of its DLL. Some exports only + // exist on newer Windows (WinHttpGetProxySettingsEx is absent from + // Windows 10's winhttp.dll); the HLE supplies those itself, so skip + // them only when the host really lacks them. + const NEWER_WINDOWS_ONLY: &[&str] = &["WinHttpGetProxySettingsEx"]; for e in m.exports.iter().filter(|e| !e.name.starts_with('#')) { let dll = if e.name.starts_with("WinHttp") { "winhttp.dll" } else { "ws2_32.dll" }; + let present = crate::host::function(dll, e.name).is_some(); + if !present && NEWER_WINDOWS_ONLY.contains(&e.name) { + continue; + } assert!( - crate::host::function(dll, e.name).is_some(), + present, "{dll} lacks {}", e.name );