// ntddk.h
NTSTATUS PsAllocSiloContextSlot(
[in] ULONG_PTR Reserved,
[out] ULONG *ReturnedContextSlot
);
View the official Windows Driver Kit DDI referenceNo description available.
This routine allocates a slot that can be used to insert, retrieve, and delete an object in all silos.
Reserved [in]This parameter is reserved for future use and must be set to zero.
ReturnedContextSlot [out]A pointer to a caller-allocated variable that receives the newly allocated slot index. This parameter is required and it cannot be NULL.
The following NT status codes are returned.
| Return code | Description |
|---|---|
| STATUS_INSUFFICIENT_RESOURCES | There are no more slots available in the system. This is an error code. |
| STATUS_SUCCESS | The operation completed successfully. |
Use of this API is uncommon because all silo monitors are assigned a storage slot when calling the PsRegisterSiloMonitor routine. That slot can be retrieved with the PsGetSiloMonitorContextSlot routine and used by a driver for its context operations.