HLE: implement IUnknown::QueryInterface and unit tests for xgame objects #901
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#901
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@geiyiliyabumo on GitHub · 2026-11-24 13:48 UTC · original
Summary
Implements
IUnknown::QueryInterfaceacross all four staticxgameCOM objects (TITLE_OBJECT,FEATURES_OBJECT,INVITES_OBJECT,EVENTS_OBJECT, replacing all 4missing::<0>slots) and adds comprehensive synthetic unit tests incrates/victory-hle/src/modules/xgame.rs.Because external PR creation is currently restricted (
collaborators_only), the CI-green branch is ready on my fork for cherry-pick / review:geiyiliyabumo/VIctory@feat/xgame-missing-slotsgeiyiliyabumo/VIctory@299bc17(based onmainffe310e)Changes (
crates/victory-hle/src/modules/xgame.rs)query_interface: validatesoutandiid(E_POINTER, always zeroing*outbefore returning on error), answersIID_IUNKNOWNand each object's own IID withthis+S_OK, and returnsE_NOINTERFACEfor unknown IIDs or mismatched objects.query_interfaceat slot0inTITLE_VTABLE,FEATURES_VTABLE,INVITES_VTABLE, andEVENTS_VTABLE.QueryInterface(all 4 objects,IUnknown, own IID, wrong IID, nullout/iid) and existingxgamemethods.Verification (Windows 11 x64 MSVC)
rustfmt --edition 2024 --check crates/victory-hle/src/modules/xgame.rs: PASScargo xtask policy: PASS (154 files ok)cargo clippy -p victory-hle --all-targets --locked -- -D warnings(default +--features diagnostics): PASS (0 warnings)cargo test -p victory-hle --locked -- xgame: 15 passed, 0 failedAI-assisted; synthetic tests only, no game files.
@MichaelSmithAI on GitHub · 2026-11-24 13:57 UTC · original
Independent Win64/Wine check on 299bc17 with one additional fixture. It obtained title, features, invites and events through the runtime’s QueryApiImpl entry point. Each returned a distinct IUnknown pointer. Querying each IUnknown for its own interface returned the original pointer, and the fixture released all three references acquired per object.
All 16 tests selected by the
xgamefilter passed, including the new runtime lookup check. This verifies identity through the guest entry point. The objects use the existing static lifetime and fixed Release return value, so the test does not measure object destruction.@Marvisak on GitHub · 2026-11-25 06:53 UTC · original
Automated triage for the maintainers.
On
mainslot 0 (QueryInterface) of the four static objects incrates/victory-hle/src/modules/xgame.rsis stillmissing::<0>, so this fits the project. The change is already open as pull request #1174 by the same author (branchfeat/xgame-missing-slots), which is where review belongs. The decision is left to the maintainers there.Generated by Claude Code