XPersistentLocalStoragePromptUserForSpaceAsync

Allows titles to prompt users to free up a requested total number of Bytes of Growable Persistent Local Storage.

Syntax

HRESULT XPersistentLocalStoragePromptUserForSpaceAsync(  
         uint64_t requestedBytes,  
         XAsyncBlock* asyncBlock  
)  

Parameters

requestedBytes   _In_
Type: uint64_t

The total amount of space the title wishes to be made available for use.

asyncBlock   _Inout_
Type: XAsyncBlock*

An XAsyncBlock for monitoring the status of the asynchronous call.

Return value

Type: HRESULT

Returns S_OK if succesful; otherwise, returns an error code. For a list of error codes, see Error Codes.

Remarks

Prior to calling, titles should check free space availability by using XPersistentLocalStorageGetSpaceInfo.

The result of the request should be checked within the callback function by calling XPersistentLocalStoragePromptUserForSpaceResult. This is not a guarantee that the user freed the requested number of bytes; only that the user took action. Your game should query free space again using XPersistentLocalStorageGetSpaceInfo when the user retries the operation that resulted in the space request. Result of the async operation is E_ABORT if the user chose not to free up space.

Persistent Local Storage is not implemented on PC platforms. Although present, this method should not be used on PC.

This is disabled on datacenter streaming servers. It will always return E_ABORT when called on datacenter streaming servers.

Requirements

Header: XPersistentLocalStorage.h

Library: xgameruntime.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

XPersistentLocalStorage