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

Manually merged
github merged 1 commit from gh-pr/335/head into gh-pr/335/base 2026-11-26 03:59:43 +00:00
Owner

@⁠marquezinii on GitHub · 2026-11-24 02:22 UTC · original
marquezinii:fix/store-package-identifier-error → main · +15 −3 · 1 files · 1 commits · merged 2026-11-25 00:08 UTC

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

**@⁠marquezinii** on GitHub · 2026-11-24 02:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/335) `marquezinii:fix/store-package-identifier-error` → `main` · +15 −3 · 1 files · 1 commits · merged 2026-11-25 00:08 UTC `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
XStoreQueryPackageIdentifier documents E_INVALIDARG for a store id that
has no installed package. We returned XPackage's 0x89245208 instead.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:59:42 +00:00
github manually merged commit e3bef08985 into gh-pr/335/base 2026-11-26 03:59:43 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-24 04:21 UTC · original

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

**@⁠jeremygold02** on GitHub · 2026-11-24 04:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/335#issuecomment-7121948520) 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)
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!335
No description provided.