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

# IDStorageFactoryX2

> IDStorageFactoryX2

# IDStorageFactoryX2

代表静态 DirectStorage 工厂对象。
扩展了 [IDStorageFactoryX1](/reference/system/dstorage/interfaces/IDStorageFactoryX1/idstoragefactoryx1) 接口。

## Syntax

```cpp theme={null}
class IDStorageFactoryX2 : public IDStorageFactoryX1  
```

## Methods

| 方法                                                                                                              | 说明                     |
| --------------------------------------------------------------------------------------------------------------- | ---------------------- |
| [CreateQueue1](/reference/system/dstorage/interfaces/IDStorageFactoryX2/methods/idstoragefactoryx_createqueue1) | 创建 DirectStorage 队列对象。 |

## Remarks

使用 DirectStorage 工厂对象可以创建 DirectStorage 队列、打开供 DirectStorage 访问的文件以及执行全局操作。

若要获取 `IDStorageFactoryX2` 单例的指针，请使用 [DStorageGetFactory](/reference/system/dstorage/functions/dstoragegetfactory)。

有关详细信息，请参阅 [DirectStorage 概述](/build/console-features/storage/directstorage/directstorage-overview) 中的“IDStorageFactoryX”“IDStorageFactoryX1”和“IDStorageFactoryX2”几节。

## Requirements

**头文件：** dstorage\_xs.h

**库：** dstorage.lib

**受支持的平台：** XBOX Series 主机

## See also

[IDStorageFactoryX](/reference/system/dstorage/interfaces/IDStorageFactoryX/idstoragefactoryx)\
[IDStorageFactoryX1](/reference/system/dstorage/interfaces/IDStorageFactoryX1/idstoragefactoryx1)\
[DStorageGetFactory](/reference/system/dstorage/functions/dstoragegetfactory)\
[DStorage](/reference/system/dstorage/dstorage_members)


## Related topics

- [DirectStorage 概述](/zh-CN/build/console-features/storage/directstorage/directstorage-overview.md)
- [IDStorageFactoryX2::CreateQueue1](/zh-CN/reference/system/dstorage/interfaces/IDStorageFactoryX2/methods/idstoragefactoryx_createqueue1.md)
- [IDStorageQueueX2](/zh-CN/reference/system/dstorage/interfaces/IDStorageQueueX2/idstoragequeuex2.md)
- [DStorageGetFactory](/zh-CN/reference/system/dstorage/functions/dstoragegetfactory.md)
- [DStorage](/zh-CN/reference/system/dstorage/dstorage_members.md)
