> ## 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.

# PFPlatformLocalStorageSetHandlers

> 设置存储事件处理程序。如果未设置自定义存储处理程序，将使用基于 cstdio 和 std::fstream 对象的默认实现。

设置存储事件处理程序。如果未设置自定义存储处理程序，将使用基于 cstdio 和 std::fstream 对象的默认实现。

## 语法

```cpp theme={null}
HRESULT PFPlatformLocalStorageSetHandlers(  
    PFLocalStorageHooks* hooks  
)  
```

### 参数

**`hooks`**   [PFLocalStorageHooks\*](/services/playfab/api-references/c/pfplatform/structs/pflocalstoragehooks)

要由 SDK 使用的自定义本地存储挂钩。

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 备注

必须在 PFInitialize 之前调用。

## 要求

**头文件：** PFPlatform.h

## 另请参阅

[PFPlatform 成员](/services/playfab/api-references/c/pfplatform/pfplatform_members)


## Related topics

- [服务 C API 概览 - PFPlatform.h](/zh-CN/services/playfab/api-references/c/pfplatform/pfplatform_members.md)
- [XblLocalStorageSetHandlers](/zh-CN/reference/live/xsapi-c/platform_c/functions/xbllocalstoragesethandlers.md)
- [XblLocalStorageWriteHandler](/zh-CN/reference/live/xsapi-c/platform_c/functions/xbllocalstoragewritehandler.md)
- [XblLocalStorageClearHandler](/zh-CN/reference/live/xsapi-c/platform_c/functions/xbllocalstorageclearhandler.md)
- [XblLocalStorageReadHandler](/zh-CN/reference/live/xsapi-c/platform_c/functions/xbllocalstoragereadhandler.md)
