Skip to main content

XPersistentLocalStorageMountForPackage

Mounts the persistent local storage (PLS) of the specified package as a read-only disc.

Syntax

Parameters

packageIdentifier   _In_
Type: char*
A string that uniquely identifies the store package to which the PLS belongs. For more information about package identifiers, see Manage and license downloadable content (DLC). mountHandle   _Out_writes_to_(pathSize,pathUsed)
Type: XPackageMountHandle
The mount handle for the disc where the PLS was mounted.

Return value

Type: HRESULT Returns S_OK if successful; otherwise, returns an error code. For a list of error codes, see Error Codes. If the function fails because the PLS for the specified title does not exist, it will be set to FILE_NOT_FOUND. If the function fails because it tries to access the PLS of a title that has not enabled shareable persistent local storage, then it will get ACCESS_DENIED.

Remarks

This function isn’t safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.
For a title to support shareable PLS, it needs to declare as such in MicrosoftGame.config. More details about Shareable Persistent Local Storage are found in Local Storage
If a title marks the PLS as shareable, then it should make sure that before suspending the game, it closes all the handles to its PLS, otherwise the game suspend will fail and the game will be terminated.
The following code snippet shows an example of accessing the Shareable PLS of another title.

Requirements

Header: XPersistentLocalStorage.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

Conceptual documentation

See also

XPersistentLocalStorage
How to use the new MicrosoftGame.config file
Local Storage
Last modified on August 20, 2026