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

# XblLocalStorageSetHandlers

> 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.14x.GDK.C.lib

## See also

[platform\_c](/reference/live/xsapi-c/platform_c/platform_c_members)


## Related topics

- [XblLocalStorageReadHandler](/reference/live/xsapi-c/platform_c/functions/xbllocalstoragereadhandler.md)
- [XblLocalStorageWriteHandler](/reference/live/xsapi-c/platform_c/functions/xbllocalstoragewritehandler.md)
- [XblLocalStorageClearHandler](/reference/live/xsapi-c/platform_c/functions/xbllocalstorageclearhandler.md)
- [PFPlatformLocalStorageSetHandlers](/services/playfab/api-references/c/pfplatform/functions/pfplatformlocalstoragesethandlers.md)
- [XblLocalStorageReadComplete](/reference/live/xsapi-c/platform_c/functions/xbllocalstoragereadcomplete.md)
