HLE: implement IUnknown queries for COM objects #1576
No reviewers
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!1576
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1576/head"
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?
@Calvix2k on GitHub · 2026-11-24 19:24 UTC · original
Calvix2k:codex/hle-iunknown-query-interface-032→main· +348 −84 · 14 files · 2 commits · closed without mergingAddresses
VIC-BT-032from audit #1242.Summary
QueryInterfacefor the HLE COM objects in XAsync, XUser, XGameSave, DirectStorage, and the remaining runtime areas (display, speech, storage, xgame, xgameui, xnetworking, xpackage, xstore, xsystem).IUnknownIID, call the object's actualAddRefslot, and returnE_NOINTERFACEwith a cleared output pointer for unsupported IIDs.E_POINTERfor null required pointers.Validation
cargo test -p victory-hle --locked -- --test-threads=1— passed (97 unit tests and 1 integration test).cargo clippy -p victory-hle --all-targets --all-features --locked -- -D warnings— passed.cargo xtask policy— passed (154 files).rustfmt --edition 2024 --checkon changed files — passed.This implements IUnknown identity behavior; object-specific interface IIDs remain unsupported unless separately implemented.
@Calvix2k on GitHub · 2026-11-24 22:18 UTC · original
Rebased onto
70564ae; only a formatting hunk indstorage.rsconflicted (upstream addedpage_destinationsto the trace line). Kept upstream's field and finished the rebase.Validation:
cargo test -p victory-hle --locked -- --test-threads=1— 100 passed + 1 + 1, 0 failed; clippy-D warningsandcargo xtask policy(174 files) clean.@Marvisak on GitHub · 2026-11-25 03:30 UTC · original
Automated triage for the maintainers.
Needs work. A shared
query_interfaceinxgameruntime.rsreplacesmissing::<0>in every runtime vtable. It answers only IID_IUnknown and returns E_NOINTERFACE for everything else, including each object's own interface id, although COM requires a query for the object's own interface to succeed. The change also stops the "runtime method not implemented" log that would show when a title calls slot 0, andxuser.rsnotes that no title has been seen calling these slots. Please answer the object's own interface id (fromINTERFACES), keep a warning for other ids, and show that a title calls QueryInterface. Please also drop the unrelated reformatting inxasync.rs,dstorage.rs,xgamesave.rsand others. CI passes.Generated by Claude Code
@Calvix2k on GitHub · 2026-11-25 08:38 UTC · original
Closing this one: as the triage says, the helper as written answers only
IID_IUnknownand returnsE_NOINTERFACEfor each object's own id, which is not a correct COM object — it trades a logged "not implemented" for a wrong answer. Fixing it properly means threading each object's own id through the vtables, and the PR as it stands also carries formatting-only changes across a dozen modules, which makes it hard to review for that.The trigger is also still unobserved: the note in
xuser.rssays no title has been seen calling slot 0 on these tables, and this PR never shows one either. The GameInput objects, where a title does query, are covered by #1942.If a trace turns up a title calling
QueryInterfaceon one of these runtime vtables, the narrow change is: answerIID_IUnknownand the object's own id from its table, warn for any other id, and touch nothing else. I will do that then.Pull request closed