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

# XblEventsSetStorageAllotment

> XblEventsSetStorageAllotment

# XblEventsSetStorageAllotment

設定 Xsapi 在開始刪除最舊檔案之前，可用來儲存等待重試和上傳之事件的磁碟空間上限。

## 語法

```cpp theme={null}
HRESULT XblEventsSetStorageAllotment(  
         uint64_t storageAllotmentInBytes  
)  
```

### 參數

*storageAllotmentInBytes*   \
類型：uint64\_t

用來儲存擱置事件的儲存空間上限 (以位元組為單位)。

### 傳回值

類型：HRESULT

此 API 作業的 HRESULT 傳回碼。

## 備註

超過儲存空間上限時，最舊的檔案將會以無訊息方式刪除。請注意，這是全域設定，將套用至所有 XBOX Live 內容。預設值約為 20MB。

## 需求

**標頭：** events\_c.h

**程式庫：** Microsoft.Xbox.Services.14x.GDK.C.lib

## 另請參閱

[events\_c](/zh-TW/reference/live/xsapi-c/events_c/events_c_members)


## Related topics

- [XblEventsSetStorageAllotment](/reference/live/xsapi-c/events_c/functions/xbleventssetstorageallotment.md)
- [IDStorageQueueX1::EnqueueSetEvent](/reference/system/dstorage/interfaces/IDStorageQueueX1/methods/idstoragequeuex_enqueuesetevent.md)
