> ## 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](/reference/live/xsapi-c/events_c/events_c_members)


## Related topics

- [IDStorageQueueX1::EnqueueSetEvent](/zh-CN/reference/system/dstorage/interfaces/IDStorageQueueX1/methods/idstoragequeuex_enqueuesetevent.md)
- [XblLocalStorageSetHandlers](/zh-CN/reference/live/xsapi-c/platform_c/functions/xbllocalstoragesethandlers.md)
- [IDStorageQueueX1](/zh-CN/reference/system/dstorage/interfaces/IDStorageQueueX1/idstoragequeuex1.md)
- [DirectStorage 概述](/zh-CN/build/console-features/storage/directstorage/directstorage-overview.md)
- [XblEventsSetMaxFileSize](/zh-CN/reference/live/xsapi-c/events_c/functions/xbleventssetmaxfilesize.md)
