Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

PsCreateSiloContext function (ntddk.h)

This routine creates an object that will be inserted in a Silo.

Syntax

NTSTATUS PsCreateSiloContext(
 [in] PESILO Silo,
 [in] ULONG Size,
 [in] POOL_TYPE PoolType,
 [in, optional] SILO_CONTEXT_CLEANUP_CALLBACK ContextCleanupCallback,
 PVOID *ReturnedSiloContext
);

Parameters

[in] Silo

A pointer to a silo.  This parameter is required and it cannot be NULL.

[in] Size

The size, in bytes, of the portion of the object defined by the caller.

[in] PoolType

The type of pool to allocate from. This parameter is required and must be one of the following: NonPagedPoolNx or PagedPool.

[in, optional] ContextCleanupCallback

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.

ReturnedSiloContext

A pointer to a caller-allocated variable that receives the address of the newly created object.

Return value

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.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1607
Minimum supported server Windows Server 2016
Target Platform Windows
Header ntddk.h

Feedback

Was this page helpful?

Additional resources