> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XPersistentLocalStoragePromptUserForSpaceResult

> XPersistentLocalStoragePromptUserForSpaceResult

# XPersistentLocalStoragePromptUserForSpaceResult

傳回呼叫 [XPersistentLocalStoragePromptUserForSpaceAsync](https://docs.xbox.com/zh-TW/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragepromptuserforspaceasync.md) 函式的結果。

## 語法

```cpp theme={null}
HRESULT XPersistentLocalStoragePromptUserForSpaceResult(
         XAsyncBlock* asyncBlock
)
```

### 參數

*asyncBlock*   \_Inout\_\
類型：XAsyncBlock\d\*

`XAsyncBlock` 物件的指標，可用來監視非同步呼叫的狀態。

### 傳回值

類型：HRESULT

如果使用者嘗試釋放所要求的空間，則傳回 **S\_OK**；否則傳回錯誤碼。如需錯誤碼的清單，請參閱[錯誤碼](https://docs.xbox.com/zh-TW/reference/errorcodes.md)。如果使用者選擇不嘗試釋放空間，則傳回 **E\_ABORT**。

## 備註

如果使用者選擇釋放空間，非同步作業的結果即為成功。這並不保證使用者已釋放所要求的位元組數，只表示使用者已採取動作。

當使用者重試導致空間要求的作業時，您的遊戲應再次使用 [XPersistentLocalStorageGetSpaceInfo](https://docs.xbox.com/zh-TW/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragegetspaceinfo.md) 查詢可用空間。

如果使用者選擇不釋放空間，非同步作業的結果會是 `E_ABORT`。

由於 PC 平台上未實作永續性本機儲存體，請勿在該平台上使用此函式。

## 需求

**標頭：** XPersistentLocalStorage.h

**程式庫：** xgameruntime.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[XPersistentLocalStorage](https://docs.xbox.com/zh-TW/reference/system/xpersistentlocalstorage/xpersistentlocalstorage_members.md)\
[XPersistentLocalStorageGetSpaceInfo](https://docs.xbox.com/zh-TW/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragegetspaceinfo.md)


## Related topics

- [XPersistentLocalStoragePromptUserForSpaceAsync](https://docs.xbox.com/zh-TW/reference/system/xpersistentlocalstorage/functions/xpersistentlocalstoragepromptuserforspaceasync.md)
- [XPersistentLocalStorage (API 內容)](https://docs.xbox.com/zh-TW/reference/system/xpersistentlocalstorage/xpersistentlocalstorage_members.md)
- [在 Unity 專案中使用 GDK API 的 C# 包裝函式](https://docs.xbox.com/zh-TW/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XPersistentLocalStorageSpaceInfo](https://docs.xbox.com/zh-TW/reference/system/xpersistentlocalstorage/structs/xpersistentlocalstoragespaceinfo.md)
- [Xbox 主機上的本機儲存空間](https://docs.xbox.com/zh-TW/build/console-features/storage/local-storage.md)
