HLE: oleaut32 is not in the host pass-through list, so the title's BSTR ordinals do not resolve #2906

Open
github-bot wants to merge 1 commit from github-bot/gh-2906 into main AGit
Owner

@⁠Jackster on GitHub · 2026-11-25 23:35 UTC · original
Jackster:hle/oleaut32-passthrough → main · +24 −0 · 2 files · 1 commits · open

HostPolicy::default() allows ole32.dll but not oleaut32.dll, and the host lookup is gated on that list, so every oleaut32.dll import fell through to the unimplemented-import stub. A title imports two of them by ordinal, which victory census <dump> --missing reported as unresolved:

oleaut32.dll        2 funcs   0 hle   0 host   2 missing      (oleaut32.dll!#4, oleaut32.dll!#6)

They are SysAllocStringLen (#4) and SysFreeString (#6). dumpbin /exports on the host's own oleaut32.dll confirms the ordinals:

    2   6F 00010CF0 SysAllocString
    4   71 00010C10 SysAllocStringLen
    6   72 00017450 SysFreeString
    7   77 00003990 SysStringLen

Allocating and freeing a BSTR does not differ between the console and the host, exactly like the ole32.dll calls already allowed next to it — the omission looked like an oversight rather than a policy decision.

Change

  • crates/victory-hle/src/host.rs: oleaut32.dll added to the default allow list, with a comment.
  • crates/victory-hle/src/lib.rs: oleaut32_bstr_ordinals_pass_through_to_host, which classifies ordinals 4 and 6 as Provenance::Host and checks that an ordinal the DLL does not export still resolves to nothing.

No HLE implementations are added: the host's exports answer these, by ordinal, through the existing pass-through.

Verified

On the retail dump used for the report:

before:  oleaut32.dll   2 funcs   0 hle   0 host   2 missing     (74 missing overall)
after:   oleaut32.dll   2 funcs   0 hle   2 host   0 missing     (72 missing overall)

cargo test -p victory-hle: 153 passed, 0 failed. Full workspace suite (--exclude victory-core, absent from this checkout only): 0 failures.

Claimed in #1633: #1633

AI-assisted (drafted with an AI coding agent); the census runs, the dumpbin check and the test runs above are my own. No game data beyond the DLL name and ordinals the census prints.

**@⁠Jackster** on GitHub · 2026-11-25 23:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/2906) `Jackster:hle/oleaut32-passthrough` → `main` · +24 −0 · 2 files · 1 commits · open `HostPolicy::default()` allows `ole32.dll` but not `oleaut32.dll`, and the host lookup is gated on that list, so every `oleaut32.dll` import fell through to the unimplemented-import stub. A title imports two of them **by ordinal**, which `victory census <dump> --missing` reported as unresolved: ``` oleaut32.dll 2 funcs 0 hle 0 host 2 missing (oleaut32.dll!#4, oleaut32.dll!#6) ``` They are `SysAllocStringLen` (#4) and `SysFreeString` (#6). `dumpbin /exports` on the host's own `oleaut32.dll` confirms the ordinals: ``` 2 6F 00010CF0 SysAllocString 4 71 00010C10 SysAllocStringLen 6 72 00017450 SysFreeString 7 77 00003990 SysStringLen ``` Allocating and freeing a BSTR does not differ between the console and the host, exactly like the `ole32.dll` calls already allowed next to it — the omission looked like an oversight rather than a policy decision. ### Change * `crates/victory-hle/src/host.rs`: `oleaut32.dll` added to the default allow list, with a comment. * `crates/victory-hle/src/lib.rs`: `oleaut32_bstr_ordinals_pass_through_to_host`, which classifies ordinals 4 and 6 as `Provenance::Host` and checks that an ordinal the DLL does not export still resolves to nothing. No HLE implementations are added: the host's exports answer these, by ordinal, through the existing pass-through. ### Verified On the retail dump used for the report: ``` before: oleaut32.dll 2 funcs 0 hle 0 host 2 missing (74 missing overall) after: oleaut32.dll 2 funcs 0 hle 2 host 0 missing (72 missing overall) ``` `cargo test -p victory-hle`: 153 passed, 0 failed. Full workspace suite (`--exclude victory-core`, absent from this checkout only): 0 failures. Claimed in #1633: https://git.gtahub.st/github/Marvisak--VIctory/issues/1633 AI-assisted (drafted with an AI coding agent); the census runs, the `dumpbin` check and the test runs above are my own. No game data beyond the DLL name and ordinals the census prints.
`HostPolicy::default()` allows `ole32.dll` but not `oleaut32.dll`, and the
host lookup is gated on that list, so every `oleaut32.dll` import fell
through to the unimplemented-import stub. The title imports two of them by
ordinal, which `victory census <dump> --missing` reported as unresolved:

    oleaut32.dll        2 funcs   0 hle   0 host   2 missing

They are `SysAllocStringLen` (#4) and `SysFreeString` (#6), whose ordinals
`dumpbin /exports` confirms on the host's own oleaut32.dll: allocating and
freeing a BSTR is the same on both, like the `ole32.dll` calls next to them.

Add `oleaut32.dll` to the policy, with a test that the two ordinals classify
as host and that an ordinal the DLL does not export still resolves to
nothing.

On the retail dump used for the report, the census now reads

    oleaut32.dll        2 funcs   0 hle   2 host   0 missing

and the missing count over the whole dump goes from 74 to 72. Full workspace
suite green (0 failures); the `victory-core` crate is excluded only because
`victory.example.toml` is absent from this checkout.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:17:11 +00:00
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 23:38 UTC · original

Heads-up on overlap: #2065 (currently triage: merge candidate for #811) already adds "oleaut32.dll" to HostPolicy::default() in crates/victory-hle/src/host.rs alongside ole32.dll and tests ordinal #4 (SysAllocStringLen) and #6 (SysFreeString) resolution.

Nice addition here testing resolve_import through crates/victory-hle/src/lib.rs as well — leaving this cross-reference so maintainers can pick whichever they prefer.

**@⁠fuzeofficlal** on GitHub · 2026-11-25 23:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/2906#issuecomment-7177852758) Heads-up on overlap: `#2065` (currently `triage: merge candidate` for `#811`) already adds `"oleaut32.dll"` to `HostPolicy::default()` in `crates/victory-hle/src/host.rs` alongside `ole32.dll` and tests ordinal `#4` (`SysAllocStringLen`) and `#6` (`SysFreeString`) resolution. Nice addition here testing `resolve_import` through `crates/victory-hle/src/lib.rs` as well — leaving this cross-reference so maintainers can pick whichever they prefer.
Author
Owner

@⁠Kajanos on GitHub · 2026-11-26 00:07 UTC · original

Windows 11 / NVIDIA test run, head c42ee14369 merged onto main 63bcca43c6.

Setup: Windows 11 Home build 26300, RTX 5080, NVIDIA 621.40, rustc 1.98.1 MSVC, VS 2022 Build Tools, Windows SDK 10.0.26100 (dxil.dll from the SDK).

  • cargo test --locked -p victory-hle: 152 passed, 1 failed.
  • The one failure is lifecycle::tests::showing_a_title_window_shows_its_stand_in, and it also fails on main in this run. The tests ran over SSH, i.e. in session 0 with no interactive desktop, so the window can't be shown. On the desktop session the same test passes on main (12/12 lifecycle). This PR doesn't touch lifecycle.

Not run: the retail title, clippy, and other crates.

AI-assisted (Claude Code)

**@⁠Kajanos** on GitHub · 2026-11-26 00:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/2906#issuecomment-7178418428) **Windows 11 / NVIDIA test run**, head `c42ee14369` merged onto `main` `63bcca43c6`. Setup: Windows 11 Home build 26300, RTX 5080, NVIDIA 621.40, rustc 1.98.1 MSVC, VS 2022 Build Tools, Windows SDK 10.0.26100 (`dxil.dll` from the SDK). - `cargo test --locked -p victory-hle`: 152 passed, 1 failed. - The one failure is `lifecycle::tests::showing_a_title_window_shows_its_stand_in`, and it also fails on `main` in this run. The tests ran over SSH, i.e. in session 0 with no interactive desktop, so the window can't be shown. On the desktop session the same test passes on `main` (12/12 `lifecycle`). This PR doesn't touch lifecycle. Not run: the retail title, clippy, and other crates. AI-assisted (Claude Code)
Author
Owner

@⁠Marvisak on GitHub · 2026-11-26 02:18 UTC · original

Automated triage for the maintainers.

Proposed close: duplicate of #2065. #2065 makes the same change, adding "oleaut32.dll" to HostPolicy::default() in crates/victory-hle/src/host.rs. It merges cleanly, is already marked as a merge candidate, and tests ordinals 4 and 6 resolving to the host. The extra classify test here could be offered on #2065 instead.

This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the triage: proposed close label.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-26 02:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/2906#issuecomment-7180678293) <!-- victory-triage v1 head=c42ee14369f8562945ab2e682df5bbb086988a2c verdict=proposed-close at=2026-11-26T02:18:50Z --> Automated triage for the maintainers. **Proposed close: duplicate of #2065.** #2065 makes the same change, adding `"oleaut32.dll"` to `HostPolicy::default()` in `crates/victory-hle/src/host.rs`. It merges cleanly, is already marked as a merge candidate, and tests ordinals 4 and 6 resolving to the host. The extra `classify` test here could be offered on #2065 instead. This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the `triage: proposed close` label. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 23:38 UTC · original · reviewed

Verified: BSTR helpers are semantically identical host-side, and the test locks in both directions — ordinals 4/6 pass through while a non-existent ordinal resolves to nothing (so classify does real per-DLL ordinal validation, not blind pass-through). LGTM.

**@⁠kotekompotek** on GitHub · 2026-11-25 23:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/2906#pullrequestreview-6066508884) · **reviewed** Verified: BSTR helpers are semantically identical host-side, and the test locks in both directions — ordinals 4/6 pass through while a non-existent ordinal resolves to nothing (so classify does real per-DLL ordinal validation, not blind pass-through). LGTM.
Author
Owner

@⁠cloph-dsp on GitHub · 2026-11-26 12:29 UTC · original

Independent local verification of head c42ee14 on Windows 11, Rust 1.100.0/MSVC:

  • cargo test --locked -p victory-hle --lib -- tests::oleaut32_bstr_ordinals_pass_through_to_host --exact — 1 passed, 0 failed.
  • git diff --check origin/main HEAD — clean.

Used a worktree-local CARGO_TARGET_DIR. Synthetic ordinal inputs only; no game assets or DRM material used. AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only).

**@⁠cloph-dsp** on GitHub · 2026-11-26 12:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/2906#issuecomment-7192071017) Independent local verification of head `c42ee14` on Windows 11, Rust 1.100.0/MSVC: - `cargo test --locked -p victory-hle --lib -- tests::oleaut32_bstr_ordinals_pass_through_to_host --exact` — 1 passed, 0 failed. - `git diff --check origin/main HEAD` — clean. Used a worktree-local `CARGO_TARGET_DIR`. Synthetic ordinal inputs only; no game assets or DRM material used. AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2906/head:github-bot/gh-2906'
git switch 'github-bot/gh-2906'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2906'
git switch 'github-bot/gh-2906'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2906'
git switch 'github-bot/gh-2906'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2906'
git switch 'main'
git merge --squash 'github-bot/gh-2906'
git switch 'main'
git merge --ff-only 'github-bot/gh-2906'
git switch 'main'
git merge 'github-bot/gh-2906'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2906
No description provided.