> ## 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::CreateQueue

> IDStorageFactoryX::CreateQueue

# IDStorageFactoryX::CreateQueue

Creates a DirectStorage queue object.

## Syntax

```cpp theme={null}
HRESULT CreateQueue(  
         const DSTORAGE_QUEUE_DESC *desc,  
         REFIID riid,  
         void **ppv  
)  
```

### Parameters

*desc*\
Type: [DSTORAGE\_QUEUE\_DESC](/reference/system/dstorage/structs/dstorage_queue_desc) \*

Descriptor that specifies the properties of the queue.

*riid*\
Type: REFIID

Specifies the DirectStorage queue interface, such as `__uuidof(IDStorageQueueX)`.

*ppv*   \_COM\_Outptr\_\
Type: void \*\*

Returns a pointer to the created object.

### Return value

Type: HRESULT

Standard HRESULT error code.

## Remarks

A DirectStorage queue holds read requests until the title calls [Submit](/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_submit) on the queue. All entries in a DirectStorage queue complete in the order they are enqueued.

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

## Requirements

**Header:** dstorage\_xs.h

**Library:** dstorage\_xs.lib

**Supported platforms:** XBOX Series consoles

## See also

[IDStorageFactoryX](/reference/system/dstorage/interfaces/IDStorageFactoryX/idstoragefactoryx)\
[DStorage](/reference/system/dstorage/dstorage_members)


## Related topics

- [IDStorageQueueX2](/reference/system/dstorage/interfaces/IDStorageQueueX2/idstoragequeuex2.md)
- [IDStorageQueueX](/reference/system/dstorage/interfaces/IDStorageQueueX/idstoragequeuex.md)
- [IDStorageQueueX1](/reference/system/dstorage/interfaces/IDStorageQueueX1/idstoragequeuex1.md)
- [IDStorageQueueX::Close](/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_close.md)
- [DSTORAGE_QUEUE_DESC](/reference/system/dstorage/structs/dstorage_queue_desc.md)
