> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# EnqueueSetEvent

> IDStorageQueueX1::EnqueueSetEvent

Enqueues a **SetEvent** operation.

## Syntax

```cpp theme={null}
void EnqueueSetEvent(  
         HANDLE handle  
)  
```

### Parameters

*handle*\
Type: HANDLE

An event handle.

### Return value

Type: void

## Remarks

The specified event is signaled when all enqueued requests before it complete.
The event can be either auto-reset or manual-reset.

After calling this method, a title thread can wait on the event as needed. If
the event is already in signaled state when the set event operation happens, a
warning message will be printed in the debugger if DSTORAGE\_DEBUG\_SHOW\_ERRORS is
on.

If the `EnqueueSetEvent` method fills half of the queue's capacity since the
last submission, it triggers an automatic submission as part of the
`EnqueueSetEvent` 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](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_submit.md) manually
when appropriate.

For more information, see the "Notification" and
"EnqueueStatus/EnqueueSignal/EnqueueSetEvent" sections in [DirectStorage
overview](https://docs.xbox.com/build/console-features/storage/directstorage/directstorage-overview.md).

## Requirements

**Header:** dstorage\_xs.h

**Library:** dstorage\_xs.lib

**Supported platforms:** XBOX Series consoles

## See also

[IDStorageQueueX::EnqueueStatus](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_enqueuestatus.md)\
[IDStorageQueueX::EnqueueSignal](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_enqueuesignal.md)\
[IDStorageQueueX](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageQueueX/idstoragequeuex.md)\
[DStorage](https://docs.xbox.com/reference/system/dstorage/dstorage_members.md)


## Related topics

- [DirectStorage Overview](https://docs.xbox.com/build/console-features/storage/directstorage/directstorage-overview.md)
- [IDStorageQueueX1 (Interface contents)](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageQueueX1/idstoragequeuex1.md)
- [EnqueueSignal](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_enqueuesignal.md)
- [EnqueueStatus](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_enqueuestatus.md)
- [Submit](https://docs.xbox.com/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_submit.md)
