// ntddk.h
NTSTATUS PsCreateSiloContext(
[in] PESILO Silo,
[in] ULONG Size,
[in] POOL_TYPE PoolType,
[in, optional] SILO_CONTEXT_CLEANUP_CALLBACK ContextCleanupCallback,
PVOID *ReturnedSiloContext
);
View the official Windows Driver Kit DDI referenceNo description available.
This routine creates an object that will be inserted in a Silo.
Silo [in]A pointer to a silo. This parameter is required and it cannot be NULL.
Size [in]The size, in bytes, of the portion of the object defined by the caller.
PoolType [in]The type of pool to allocate from. This parameter is required and must be one of the following: NonPagedPoolNx or PagedPool.
ContextCleanupCallback [in, optional]A pointer to a SILO_CONTEXT_CLEANUP_CALLBACK callback function. The function will be called when the returned object has zero references to it. This parameter is optional and can be NULL.
ReturnedSiloContextA pointer to a caller-allocated variable that receives the address of the newly created object.
The following NT status codes are returned.
| Return code | Description |
|---|---|
| STATUS_INSUFFICIENT_RESOURCES | The routine encountered a pool allocation failure. This is an error code. |
| STATUS_INVALID_PARAMETER | The pool type is not valid. This is an error code. |
| STATUS_SUCCESS | The operation completed successfully. |