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

# IDStorageFactoryX

> IDStorageFactoryX

# IDStorageFactoryX

Represents the static DirectStorage factory object.

## Syntax

```cpp theme={null}
class IDStorageFactoryX : public IUnknown  
```

## Methods

| Method                                                                                                                         | Description                                  |
| ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------- |
| [CreateQueue](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_createqueue)                   | Creates a DirectStorage queue object.        |
| [CreateStatusArray](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_createstatusarray)       | Creates a DirectStorage status array object. |
| [OpenFile](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile)                         | Opens a file for DirectStorage access.       |
| [SetCpuAffinity](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_setcpuaffinity)             | Sets a CPU affinity mask for DirectStorage.  |
| [SetDebugFlags](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_setdebugflags)               | Sets flags used to control the debug layer.  |
| [SetStagingBufferSize](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_setstagingbuffersize) | Sets the size of the staging buffer.         |

## Remarks

Use the DirectStorage factory object to create DirectStorage queues, open files for DirectStorage access, and perform global operations.

To obtain a pointer to the `IDStorageFactoryX` singleton, use [DStorageGetFactory](/reference/system/dstorage/functions/dstoragegetfactory).

For more information, see the "IDStorageFactoryX" section of [DirectStorage Overview](/build/console-features/storage/directstorage/directstorage-overview).

## Requirements

**Header:** dstorage\_xs.h

**Library:** dstorage.lib

**Supported platforms:** XBOX Series consoles

## See also

[DStorageGetFactory](/reference/system/dstorage/functions/dstoragegetfactory)\
[DStorage](/reference/system/dstorage/dstorage_members)


## Related topics

- [DirectStorage Overview](/build/console-features/storage/directstorage/directstorage-overview.md)
- [IDStorageFactoryX::CreateQueue](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_createqueue.md)
- [IDStorageFactoryX::OpenFile](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_openfile.md)
- [IDStorageFactoryX2](/reference/system/dstorage/interfaces/IDStorageFactoryX2/idstoragefactoryx2.md)
- [IDStorageFactoryX1](/reference/system/dstorage/interfaces/IDStorageFactoryX1/idstoragefactoryx1.md)
