You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: windows.services.store/storecontext_getappandoptionalstorepackageupdatesasync_399599716.md
+55Lines changed: 55 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,68 @@ Gets the collection of packages for the current app that have updates available
15
15
## -returns
16
16
An asynchronous operation that, on successful completion, returns a collection of [StorePackageUpdate](storepackageupdate.md) objects that represent the packages that have updates available.
17
17
18
+
## -exceptions
19
+
### T:System.Runtime.InteropServices.COMException
20
+
21
+
If the **ErrorCode** property of the exception has the value 0x80070578 (ERROR_INVALID_WINDOW_HANDLE), this indicates that the method was not called on the UI thread. If you are calling this method in a desktop application that uses the Desktop Bridge, this can also indicate that you did not configure the [StoreContext](storecontext.md) object to specify which application window is the owner window for modal dialogs shown by this method. For more information, see [this article](/windows/uwp/monetize/in-app-purchases-and-trials#desktop).
22
+
23
+
### T:System.Exception
24
+
25
+
The method may throw exceptions when the Microsoft Store service is unavailable or not properly configured. Common scenarios include:
26
+
27
+
-**"Object server is stopping when OLE service contacts it"**: This error typically occurs when the Microsoft Store service is not running, is shutting down, or when there are issues with the Windows Store infrastructure. This can happen if:
28
+
- The Windows Store app is not installed or is corrupted
29
+
- The Microsoft Store service is disabled or not running
30
+
- There are permission issues accessing the Store service
31
+
- The system is in an inconsistent state during shutdown or startup
32
+
33
+
-**Service unavailable errors**: Network connectivity issues or Microsoft Store service outages can cause the operation to fail.
34
+
18
35
## -remarks
19
36
For more information about using this method, including a code example, see [Download and install package updates for your app](/windows/uwp/packaging/self-install-package-updates).
20
37
21
38
There is a latency of up to a day between the time when a package passes the certification process and when the GetAppAndOptionalStorePackageUpdatesAsync method recognizes that the package update is available to the app.
22
39
23
40
After you call GetAppAndOptionalStorePackageUpdatesAsync to determine which packages have updates available, you can call [RequestDownloadStorePackageUpdatesAsync](storecontext_requestdownloadstorepackageupdatesasync_889669938.md) to download the updated packages or you can call [RequestDownloadAndInstallStorePackageUpdatesAsync](storecontext_requestdownloadandinstallstorepackageupdatesasync_1750789617.md) to download and install the updated packages.
24
41
42
+
### Prerequisites and Environment Requirements
43
+
44
+
For this method to work correctly, the following conditions must be met:
45
+
46
+
-**Microsoft Store app**: The Microsoft Store app must be installed and functional on the system.
47
+
-**Microsoft account**: While a signed-in Microsoft account is not strictly required to check for updates, certain scenarios may require authentication.
48
+
-**Store services**: The Microsoft Store licensing and update services must be running and accessible.
49
+
-**Network connectivity**: An active internet connection is required to communicate with the Microsoft Store service.
50
+
51
+
### Assigned Access Mode Compatibility
52
+
53
+
This method can be used in Assigned Access (kiosk) mode, but the following considerations apply:
54
+
55
+
- The assigned access account must have permission to access Microsoft Store services.
56
+
- Network access must be configured to allow communication with Microsoft Store endpoints.
57
+
- Some Store UI elements may be restricted depending on the assigned access configuration.
58
+
59
+
### Error Handling Recommendations
60
+
61
+
When calling this method, it's recommended to implement proper error handling:
0 commit comments