XStore: a store id without an installed package is an invalid argument #335

Merged
marquezinii merged 1 commit from upstream-pr/335 into main 2026-11-25 00:08:24 +00:00
marquezinii commented 2026-11-24 02:22:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by marquezinii on 2026-11-24T02:22:24Z.


XStoreQueryPackageIdentifier (slot 0x208) returned xpackage::NO_PACKAGE (0x89245208) for a store id that has no installed package. The GDK reference lists one error for this function: E_INVALIDARG (0x80070057), "There is no installed package corresponding to the Store ID". 0x89245208 is the XPackage functions' code, so a title that checks for the documented value would not recognise the failure.

The fallback arm now returns E_INVALIDARG. The XPackage functions keep NO_PACKAGE.

Tested with a new unit test that calls slot 0x208 with an unknown store id; it failed before the change (0x89245208) and passes now. cargo test -p victory-hle (87 + 1 passed), clippy and rustfmt are clean, and the policy hook passed. No game data used, and not tried against a title run.

https://learn.microsoft.com/gaming/gdk/docs/reference/system/xstore/functions/xstorequerypackageidentifier

<!-- greyfinch-sync:Marvisak/VIctory:issue:6573170403 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/335). Originally posted by [marquezinii](https://github.com/marquezinii) on 2026-11-24T02:22:24Z. --- `XStoreQueryPackageIdentifier` (slot 0x208) returned `xpackage::NO_PACKAGE` (0x89245208) for a store id that has no installed package. The GDK reference lists one error for this function: `E_INVALIDARG` (0x80070057), "There is no installed package corresponding to the Store ID". 0x89245208 is the XPackage functions' code, so a title that checks for the documented value would not recognise the failure. The fallback arm now returns `E_INVALIDARG`. The XPackage functions keep `NO_PACKAGE`. Tested with a new unit test that calls slot 0x208 with an unknown store id; it failed before the change (0x89245208) and passes now. `cargo test -p victory-hle` (87 + 1 passed), clippy and rustfmt are clean, and the policy hook passed. No game data used, and not tried against a title run. https://learn.microsoft.com/gaming/gdk/docs/reference/system/xstore/functions/xstorequerypackageidentifier
jeremygold02 commented 2026-11-24 06:55:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-24T04:21:47Z.


Tested PR #335 at head e3bef089855cc4b463a0ce7e1a70f6abf7c859e5 (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at e3bef089855cc4b463a0ce7e1a70f6abf7c859e5.

  • cargo test --locked -p victory-hle a_store_id_without_a_package_is_an_invalid_argument — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 86 filtered out; finished in 0.00s ); cases: modules::xstore::tests::a_store_id_without_a_package_is_an_invalid_argument.

Behavior covered: Checks XStore returns invalid argument for a store ID without an installed package.
Code: crates/victory-hle/src/modules/xstore.rs

<!-- greyfinch-sync:Marvisak/VIctory:comment:7121948520 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/335#issuecomment-7121948520). Originally posted by [jeremygold02](https://github.com/jeremygold02) on 2026-11-24T04:21:47Z. --- Tested PR #335 at head `e3bef089855cc4b463a0ce7e1a70f6abf7c859e5` (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at `e3bef089855cc4b463a0ce7e1a70f6abf7c859e5`. - `cargo test --locked -p victory-hle a_store_id_without_a_package_is_an_invalid_argument` — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 86 filtered out; finished in 0.00s ); cases: modules::xstore::tests::a_store_id_without_a_package_is_an_invalid_argument. Behavior covered: Checks XStore returns invalid argument for a store ID without an installed package. Code: [crates/victory-hle/src/modules/xstore.rs](https://github.com/Marvisak/VIctory/blob/e3bef089855cc4b463a0ce7e1a70f6abf7c859e5/crates/victory-hle/src/modules/xstore.rs)
mercuryVM commented 2026-11-24 08:02:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T07:27:02Z.

Review: APPROVED


Tested e3bef08 on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (265 passed, 0 failed), including a_store_id_without_a_package_is_an_invalid_argument.

The GDK page lists E_INVALIDARG as this function's only error for an uninstalled store id. Only the fallback arm of package_identifier changes, and the XPackage functions keep NO_PACKAGE.

No issues found.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:review:6035248248 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/335#pullrequestreview-6035248248). Originally posted by [mercuryVM](https://github.com/mercuryVM) on 2026-11-24T07:27:02Z. **Review:** APPROVED --- Tested e3bef08 on Windows 11, RTX 5070, MSVC: `cargo test --workspace --no-fail-fast` passes (265 passed, 0 failed), including `a_store_id_without_a_package_is_an_invalid_argument`. The GDK page lists `E_INVALIDARG` as this function's only error for an uninstalled store id. Only the fallback arm of `package_identifier` changes, and the XPackage functions keep `NO_PACKAGE`. No issues found. AI-assisted (Claude Code).
upstream-sync closed this pull request 2026-11-25 01:03:26 +00:00
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!335
No description provided.