---
name: "SDL_OpenStorage"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_OpenStorage"
---

# SDL\_OpenStorage(3)

Opens up a container using a client-provided storage interface.

## NAME

SDL\_OpenStorage - Opens up a container using a client-provided storage interface.

## HEADER FILE

Defined in SDL3/SDL\_storage.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**SDL\_Storage \* SDL\_OpenStorage(const SDL\_StorageInterface \*iface, void \*userdata);**

## DESCRIPTION

Applications do not need to use this function unless they are providing their own  **SDL\_Storage**\
  implementation. If you just need an

**SDL\_Storage** , you should use the built-in implementations in SDL, like  **SDL\_OpenTitleStorage** () or

**SDL\_OpenUserStorage** ().

This function makes a copy of **iface** and the caller does not need to keep it around after this call.

## FUNCTION PARAMETERS

- *iface*

  the interface that implements this storage, initialized using  **SDL\_INIT\_INTERFACE** ().

- *userdata*

  the pointer that will be passed to the interface functions.

## RETURN VALUE

( **SDL\_Storage**\
  \*) Returns a storage container on success or NULL on failure; call  **SDL\_GetError** () for more information.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_CloseStorage**(3)](/SDL_CloseStorage/3.md), **•**(3), [**SDL\_GetStorageFileSize**(3)](/SDL_GetStorageFileSize/3.md), **•**(3), [**SDL\_GetStorageSpaceRemaining**(3)](/SDL_GetStorageSpaceRemaining/3.md), **•**(3), [**SDL\_INIT\_INTERFACE**(3)](/SDL_INIT_INTERFACE/3.md), **•**(3), [**SDL\_ReadStorageFile**(3)](/SDL_ReadStorageFile/3.md), **•**(3), [**SDL\_StorageReady**(3)](/SDL_StorageReady/3.md), **•**(3), [**SDL\_WriteStorageFile**(3)](/SDL_WriteStorageFile/3.md)
