RxInitializeContext - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// rxcontx.h

VOID RxInitializeContext(
  [in, optional] IN PIRP                 Irp,
  [in]           IN PRDBSS_DEVICE_OBJECT RxDeviceObject,
  [in]           IN ULONG                InitialContextFlags,
  [in, out]      IN OUT PRX_CONTEXT      RxContext
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-rxcontx-rxinitializecontext)

RxInitializeContext function

Description

RxInitializeContext initializes an existing RX_CONTEXT data structure.

Parameters

Irp [in, optional]

A pointer to the IRP to be encapsulated by this RX_CONTEXT structure.

RxDeviceObject [in]

A pointer to the device object to which this RX_CONTEXT and IRP apply.

InitialContextFlags [in]

The set of initial values for Flags member of the RX_CONTEXT data structure to be stored in the RX_CONTEXT structure. These initial values can be any combination of the following enumerations:

RX_CONTEXT_FLAG_WAIT

When this value is set, the IRP should be not be posted for later execution by the file system process, but should be waited on to complete.

RX_CONTEXT_FLAG_MUST_SUCCEED

When this value is set, the operation must succeed. This value is not currently used by RDBSS, but it may be used by network mini-redirector drivers.

RX_CONTEXT_FLAG_MUST_SUCCEED_NONBLOCKING

When this value is set, the operation must succeed for non-blocking operations. This value is not currently used by RDBSS, but it may be used by network mini-redirector drivers.

RxContext [in, out]

Pointer to the RX_CONTEXT to be initialized.

Remarks

RxInitializeContext is called internally by the RxCreateRxContext routine. So the RxInitializeContext routine would normally only be used by network min-redirector drivers that allocate RX_CONTEXT structures directly rather than calling the RxCreateRxContext routine to allocate and initialize an RX_CONTEXT structure.

If the Irp parameter is configured for asynchronous operation, then the Flags member of the RX_CONTEXT structure pointed to by RxContext also has the following value set:

RX_CONTEXT_FLAG_ASYNC_OPERATION is also set for the following conditions:

If this is a recursive file system call (the TopLevelIrp member in the thread local storage is the current Irp) then the Flags member of RxContext also has the following value set:

If the RxDeviceObject parameter indicates that this is the top level RDBSS device object, then the Flags member of the RX_CONTEXT structure also has the following value set:

If the Irp FileObject Flags member has the FO_WRITE_THROUGH option set, then the Flags member of the RX_CONTEXT structure also has the following value set:

RxInitializeContext sets a number of other members in the RX_CONTEXT structure including the following:

See also

RX_CONTEXT

RxCompleteRequest

RxCompleteRequest_Real

RxCreateRxContext

RxDereference

RxDereferenceAndDeleteRxContext_Real

RxPrepareContextForReuse

RxResumeBlockedOperations_Serially

__RxSynchronizeBlockingOperations

__RxSynchronizeBlockingOperationsMaybeDroppingFcbLock