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

# PFPlatformLocalStorageSetHandlers

> Sets the storage event handlers. If custom storage handlers are not set, a default implementation based on cstdio and std::fstream objects will be used.

Sets the storage event handlers. If custom storage handlers are not set, a default implementation based on cstdio and std::fstream objects will be used.

## Syntax

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

### Parameters

**`hooks`**   [PFLocalStorageHooks\*](https://docs.xbox.com/services/playfab/api-references/c/pfplatform/structs/pflocalstoragehooks.md)

Custom local storage hooks to be used by the SDK.

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

Must be called before PFInitialize.

## Requirements

**Header:** PFPlatform.h

## See also

[PFPlatform members](https://docs.xbox.com/services/playfab/api-references/c/pfplatform/pfplatform_members.md)


## Related topics

- [Services C API overview - PFPlatform.h](https://docs.xbox.com/services/playfab/api-references/c/pfplatform/pfplatform_members.md)
- [XblLocalStorageSetHandlers](https://docs.xbox.com/reference/live/xsapi-c/platform_c/functions/xbllocalstoragesethandlers.md)
- [platform_c (contents)](https://docs.xbox.com/reference/live/xsapi-c/platform_c/platform_c_members.md)
- [XblLocalStorageWriteHandler](https://docs.xbox.com/reference/live/xsapi-c/platform_c/functions/xbllocalstoragewritehandler.md)
- [XblLocalStorageReadHandler](https://docs.xbox.com/reference/live/xsapi-c/platform_c/functions/xbllocalstoragereadhandler.md)
