Export (0) Print
Expand All
Expand Minimize

RxCreateRxContext function

RxCreateRxContext allocates a new RX_CONTEXT structure and initializes the data structure.

Syntax


PRX_CONTEXT RxCreateRxContext(
  _In_opt_  PIRP Irp,
  _In_      PRDBSS_DEVICE_OBJECT RxDeviceObject,
  _In_      ULONG InitialContextFlags
);

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 the 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.

Return value

RxCreateRxContext returns a pointer to an allocated RX_CONTEXT data structure on success or a NULL pointer on failure.

Remarks

RxCreateRxContext calls RxInitializeContext to initialize the newly created RX_CONTEXT structure before returning.

RxCreateRxContext allocates non-paged pool memory when creating a new RX_CONTEXT data structure and sets the following value in the Flags member of the RX_CONTEXT:

RX_CONTEXT_FLAG_FROM_POOL

When this value is set, the RX_CONTEXT structure was allocated from non-paged pool memory.

Requirements

Header

Rxcontx.h (include Rxprocs.h and rxcontx.h)

IRQL

<= APC_LEVEL

See also

RxCompleteRequest
RxCompleteRequest_Real
RxDereference
RxDereferenceAndDeleteRxContext_Real
RxInitializeContext
RxPrepareContextForReuse
RxResumeBlockedOperations_Serially
__RxSynchronizeBlockingOperations
__RxSynchronizeBlockingOperationsMaybeDroppingFcbLock
RX_CONTEXT

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft