RynthCore/tools/DatShareSlotTests/DatShareSlotTests.csproj
BlankenshipG bd97e41345 fix(engine): DAT share hook covers the 2025 client's private CreateFileW slot
The 2025 ACClient.exe (0.0.11.6096) resolves kernel32!CreateFileW on first use
into a private slot (0x00837374) and opens every DAT through it. Since
2026.10.5.61 the hook only patched import tables, so no DAT open was shared:
the first client held the DATs deny-write and every later client failed with
"Can't open the data files".

- LazyImportSlotScanner finds the Layer-for-Unicode stubs by their full byte
  pattern and returns the slots they fill.
- DatFileShareHooks hooks those slots with the same detours and restores them
  on uninstall; an unresolved slot calls the kernel32 export directly.
- tools/DatShareSlotTests: 20 checks, including the real 2025 client.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-15 21:56:24 -04:00

24 lines
1 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<!--
Offline checks for src\RynthCore.Engine\Compatibility\LazyImportSlotScanner.cs (2026-10-15):
the 2025 ACClient.exe resolves kernel32!CreateFileW into a private slot on first use and opens
its DAT files through it, so the DAT share hook has to find that slot as well as the import
slots. Synthetic images cover the stub shape and the near misses that must not match; when the
2025 client is on this PC (or RYNTH_ACCLIENT points at one) its real slot is checked too.
Run: dotnet run -c Release (exit 0 = pass, 1 = fail)
-->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<RootNamespace>DatShareSlotTests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\src\RynthCore.Engine\Compatibility\LazyImportSlotScanner.cs" Link="Engine\LazyImportSlotScanner.cs" />
</ItemGroup>
</Project>