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

# IDStorageQueueX::EnqueueStatus

> IDStorageQueueX::EnqueueStatus

# IDStorageQueueX::EnqueueStatus

Enqueues a status write.

## Syntax

```cpp theme={null}
void EnqueueStatus(  
         IDStorageStatusArrayX *statusArray,  
         UINT32 index  
)  
```

### Parameters

*statusArray*\
Type: IDStorageStatusArrayX

An [IDStorageStatusArrayX](/reference/system/dstorage/interfaces/IDStorageStatusArrayX/idstoragestatusarrayx) object.

*index*\
Type: UINT32

Index of the status entry in the `IDStorageStatusArrayX` object to receive the status.

### Return value

Type: void

## Remarks

The status array is signaled when all requests enqueued before it complete.

After calling this method, a title thread can poll the `IDStorageStatusArrayX`
object as needed. (The state of the status is undefined until this method is
called.) If any failures occurred since the previous status entry, the *HResult*
of the enqueued status entry stores the failure code of the first failed
request.

If the `EnqueueStatus` method fills half of the queue's capacity since the last
submission, it triggers an automatic submission as part of the `EnqueueStatus`
call.

In most cases, this method simply does a memory write to the queue, thus takes
very little CPU time to complete. However, if automatic submission is triggered,
it takes significantly more CPU time, including a kernel mode transition and
processing all of the previously submitted requests in the caller thread.

If automatic submission is not desirable, games are recommended to use a queue
with large enough capacity and call [Submit](/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_submit) manually
when appropriate.

For more information, see the "Notification" and
"EnqueueStatus/EnqueueSignal/EnqueueSetEvent" sections 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::CreateStatusArray](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_createstatusarray)\
[IDStorageQueueX::EnqueueSignal](/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_enqueuesignal)\
[IDStorageQueueX](/reference/system/dstorage/interfaces/IDStorageQueueX/idstoragequeuex)\
[DStorage](/reference/system/dstorage/dstorage_members)


## Related topics

- [IDStorageQueueX::EnqueueSignal](/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_enqueuesignal.md)
- [IDStorageQueueX1::EnqueueSetEvent](/reference/system/dstorage/interfaces/IDStorageQueueX1/methods/idstoragequeuex_enqueuesetevent.md)
- [IDStorageFactoryX::CreateStatusArray](/reference/system/dstorage/interfaces/IDStorageFactoryX/methods/idstoragefactoryx_createstatusarray.md)
- [IDStorageStatusArrayX](/reference/system/dstorage/interfaces/IDStorageStatusArrayX/idstoragestatusarrayx.md)
- [IDStorageQueueX::EnqueueRequest](/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_enqueuerequest.md)
