XPackage: wire XPackageUnregisterInstallationProgressChanged returning bool #1367

Closed
ashrafsdrop wants to merge 1 commit from upstream-pr/1367 into main
ashrafsdrop commented 2026-11-24 17:36:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ashrafsdrop on 2026-11-24T17:36:58Z.


Summary
Resolves VIC-BT-034 from #1249:

  • Wires slot 10 (0x50) in xpackage.rs to unregister_progress (XPackageUnregisterInstallationProgressChanged).
  • Fixes signature to return bool (true) instead of missing::<10> (HRESULT), conforming to Microsoft GDK specification where unregistering a progress token returns a boolean.
  • Adds unit test in crates/victory-hle/src/modules/xpackage.rs testing registration at slot 0x48 and unregistration at slot 0x50.

Verification

  • cargo test -p victory-hle: 94 tests passed, 0 failed.
  • cargo clippy -p victory-hle --all-targets --all-features -- -D warnings: clean, 0 warnings.
  • cargo run -p xtask -- policy: 154 files ok.
<!-- greyfinch-sync:Marvisak/VIctory:issue:6587764202 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1367). Originally posted by [ashrafsdrop](https://github.com/ashrafsdrop) on 2026-11-24T17:36:58Z. --- Summary Resolves VIC-BT-034 from #1249: - Wires slot 10 (0x50) in `xpackage.rs` to `unregister_progress` (`XPackageUnregisterInstallationProgressChanged`). - Fixes signature to return `bool (true)` instead of `missing::<10>` (`HRESULT`), conforming to Microsoft GDK specification where unregistering a progress token returns a boolean. - Adds unit test in `crates/victory-hle/src/modules/xpackage.rs` testing registration at slot 0x48 and unregistration at slot 0x50. Verification - `cargo test -p victory-hle`: 94 tests passed, 0 failed. - `cargo clippy -p victory-hle --all-targets --all-features -- -D warnings`: clean, 0 warnings. - `cargo run -p xtask -- policy`: 154 files ok.
mercuryVM commented 2026-11-24 21:02:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T20:15:34Z.

Review: APPROVED


Tested 62d367a on Windows 11, RTX 5070, MSVC: builds, cargo test --workspace --no-fail-fast 633 passed, 0 failed (on our fork main).

  • XPackageUnregisterInstallationProgressChanged(monitor, token, wait) returns bool in the GDK, so the slot now has the right return type instead of missing's HRESULT.
  • register_progress stores no callback (it only hands out a token), so there is nothing to remove, and answering true without waiting is correct. If registration ever starts keeping the callback, this needs to remove it and honour wait.
  • The test goes through the vtable slots 0x48 and 0x50, which also pins the offsets.

Merged into our fork's main.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:review:6046644303 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1367#pullrequestreview-6046644303). Originally posted by [mercuryVM](https://github.com/mercuryVM) on 2026-11-24T20:15:34Z. **Review:** APPROVED --- Tested 62d367a on Windows 11, RTX 5070, MSVC: builds, `cargo test --workspace --no-fail-fast` 633 passed, 0 failed (on our fork main). - `XPackageUnregisterInstallationProgressChanged(monitor, token, wait)` returns `bool` in the GDK, so the slot now has the right return type instead of `missing`'s HRESULT. - `register_progress` stores no callback (it only hands out a token), so there is nothing to remove, and answering `true` without waiting is correct. If registration ever starts keeping the callback, this needs to remove it and honour `wait`. - The test goes through the vtable slots 0x48 and 0x50, which also pins the offsets. Merged into our fork's main. AI-assisted (Claude Code).
upstream-sync closed this pull request 2026-11-25 01:06:21 +00:00
Marvisak commented 2026-11-25 01:08:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:38:41Z.


Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #1274. Same slot 0x50 change as #1274.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148727338 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1367#issuecomment-7148727338). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:38:41Z. --- Automated triage for the maintainers. Closing because another open pull request covers the same change. See #1274. Same slot 0x50 change as #1274. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1367
No description provided.