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

# XblLocalStorageSetHandlers

> XblLocalStorageSetHandlers

Sets the storage handlers.

## Syntax

```cpp theme={null}
HRESULT XblLocalStorageSetHandlers(  
         XTaskQueueHandle queue,  
         XblLocalStorageWriteHandler writeHandler,  
         XblLocalStorageReadHandler readHandler,  
         XblLocalStorageClearHandler clearHandler,  
         void* context  
)  
```

### Parameters

*queue*   \_In\_opt\_\
Type: XTaskQueueHandle

The async queue the callbacks should be invoked on.

*writeHandler*   \_In\_\
Type: XblLocalStorageWriteHandler

Handler to be invoked when XSAPI needs to write to local storage.

*readHandler*   \_In\_\
Type: XblLocalStorageReadHandler

Handler to be invoked when XSAPI needs to read from local storage.

*clearHandler*   \_In\_\
Type: XblLocalStorageClearHandler

Handler to be invoked when XSAPI needs to clear local storage.

*context*   \_In\_opt\_\
Type: void\*

Client context to be passed back to the handlers.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

Must be called before XblInitialize and all three handlers must be set together.

## Requirements

**Header:** platform\_c.h

**Library:** Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

## See also

[platform\_c](https://docs.xbox.com/reference/live/xsapi-c/platform_c/platform_c_members.md)


## Related topics

- [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)
- [XblLocalStorageClearHandler](https://docs.xbox.com/reference/live/xsapi-c/platform_c/functions/xbllocalstorageclearhandler.md)
- [PFPlatformLocalStorageSetHandlers](https://docs.xbox.com/services/playfab/api-references/c/pfplatform/functions/pfplatformlocalstoragesethandlers.md)
