Export (0) Print
Expand All
Expand Minimize

RxPrepareContextForReuse function

RxPrepareContextForReuse prepares an RX_CONTEXT data structure for reuse by resetting all of the operation-specific allocations and acquisitions that have been made (the ReferenceCount member to the RX_CONTEXT structure is set to zero). Parameters that have been obtained from the IRP are not modified.

Syntax


VOID RxPrepareContextForReuse(
  _Inout_  PRX_CONTEXT RxContext
);

Parameters

RxContext [in, out]

A pointer to the RX_CONTEXT structure.

Return value

None

Remarks

The RxPrepareContextForReuse routine checks that several operation-specific members in the RX_CONTEXT structure are NULL before setting the ReferenceCount member to zero. These operation-specific tests that must be met include the following:

  • If the MajorFunction member of the associated IRP is IRP_MJ_CREATE, then the Create.CanonicalNameBuffer member must be NULL.

  • If the MajorFunction member of the associated IRP is IRP_MJ_READ or IRP_MJ_WRITE, then the RxContextSerializationQLinks.Flink and RxContextSerializationQLinks.Blink members must be NULL.

If either of the above conditions are not met, RxPrepareContextForReuse causes the system to ASSERT on checked builds.

The RxPrepareContextForReuse routine would normally only be used by network mini-redirector drivers that reinitialize RX_CONTEXT structures directly.

Requirements

Header

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

IRQL

<= APC_LEVEL

See also

RxCompleteRequest
RxCompleteRequest_Real
RxCreateRxContext
RxDereference
RxDereferenceAndDeleteRxContext_Real
RxInitializeContext
RxResumeBlockedOperations_Serially
__RxSynchronizeBlockingOperations
__RxSynchronizeBlockingOperationsMaybeDroppingFcbLock

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft