6 Commits
Author SHA1 Message Date
Raymond Bennett fd3875f197 feat: replace only listed system libraries with a program's own copy
A copy in the program's folder now loads for d3d8, d3d9, d3d10core, d3d11,
dxgi, ddraw, dinput, dinput8, winmm, version, xinput1_3 and xinput1_4,
the libraries graphics wrappers and mod loaders ship. Every other system
library stays the runtime's whatever the program ships, as before this
series, so a bundled dbghelp.dll or winhttp.dll is still answered by
Raven. RAVEN_PREFER_LOCAL_DLLS=1 loads the program's copy of any system
library outside the core list instead.

The program's folder is no longer read file by file at each start: it is
listed once, on the first listed name the runtime asks about, and only a
file that matches such a name is mapped to check that it is a DLL of the
program's width. The C runtime ordering change in main.cpp is dropped, as
msvcrt.dll and ucrtbase.dll are again never looked for there.

Assisted-by: Claude Code:claude-opus-5-5
AI-Scope: Reworked the change to the maintainer's review: the allowlist,
 the RAVEN_PREFER_LOCAL_DLLS setting, the per-name ProgramLibraries
 lookup shared by the x64 and x86 paths, and the dependencies_test case
 and CTest entry for both modes.
2026-10-28 14:20:02 -04:00
Raymond Bennett 10515aecda feat: load a program's own copy of a non-core system library
On Windows only the KnownDLLs are protected from a copy in the program's
folder; graphics wrappers, overlays and plugin loaders ship their own
winmm.dll, version.dll, dinput8.dll, d3d9.dll or dxgi.dll there and
forward to the system copy. Raven served every system library itself.

A short core list (ntdll, kernel32, kernelbase, user32, gdi32, comctl32,
advapi32, msvcrt, ucrtbase, ole32, oleaut32, combase, rpcrt4, shell32,
shlwapi, setupapi, comdlg32) is still always Raven's. For any other
system library a copy beside the program loads, and Raven's own
implementation stays reachable under its System32 or SysWOW64 path and
through LOAD_LIBRARY_SEARCH_SYSTEM32. Copies an installer leaves in the
prefix's system directory are still ignored. The x86 path shares the
program-folder scan, which replaces the d3d9.dll special case.

Assisted-by: Claude Code:claude-opus-5-5
AI-Scope: Wrote the loader, provider and dependency changes and the new
 dependencies_test case, after a program's own winmm.dll was found to be
 replaced by Raven's. Prompt: find what stops the program's own DLL
 from loading and fix it in Raven.
2026-10-28 14:13:17 -04:00
mirkobrombin 1fc462a544 fix: preserve handles and security tokens across processes 2026-10-25 08:52:34 +01:00
Mirko Brombin ea32d26a36 feat: load .NET images, mixed and nested libraries, and unload a library whose DllMain refuses 2026-09-23 00:12:49 +00:00
Mirko Brombin dd4dba704e feat: map libraries and read-only file views from the host file, cache guest registers per stop and serve completed one-time inits in the guest 2026-09-20 13:02:13 +02:00
Mirko Brombin 154272073d feat: preserve native C++ migration 2026-07-31 16:46:25 +02:00